You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/10/25 18:22:16 UTC
svn commit: r1535772 - in /openoffice/trunk/main/cui/source/tabpages:
tpbitmap.cxx tpcolor.cxx tplneend.cxx
Author: alg
Date: Fri Oct 25 16:22:15 2013
New Revision: 1535772
URL: http://svn.apache.org/r1535772
Log:
i123497 corrected modify implementations for bitmap, lineend and color
Modified:
openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx
openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx
openoffice/trunk/main/cui/source/tabpages/tplneend.cxx
Modified: openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx?rev=1535772&r1=1535771&r2=1535772&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx Fri Oct 25 16:22:15 2013
@@ -756,9 +756,12 @@ IMPL_LINK( SvxBitmapTabPage, ClickModify
bLoop = sal_False;
const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx());
- const XBitmapEntry aEntry(Graphic(aBitmapEx), aName);
- aLbBitmaps.Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), aEntry, nPos );
+ // #123497# Need to replace the existing entry with a new one (old returned needs to be deleted)
+ XBitmapEntry* pEntry = new XBitmapEntry(Graphic(aBitmapEx), aName);
+ delete maBitmapList->Replace(pEntry, nPos);
+
+ aLbBitmaps.Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry, nPos );
aLbBitmaps.SelectEntryPos( nPos );
// Flag fuer modifiziert setzen
Modified: openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx?rev=1535772&r1=1535771&r2=1535772&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx Fri Oct 25 16:22:15 2013
@@ -631,13 +631,15 @@ IMPL_LINK( SvxColorTabPage, ClickModifyH
if (eCM != CM_RGB)
ConvertColorValues (aTmpColor, CM_RGB);
- const XColorEntry aEntry(aTmpColor, aName);
+ // #123497# Need to replace the existing entry with a new one (old returned needs to be deleted)
+ XColorEntry* pEntry = new XColorEntry(aTmpColor, aName);
+ delete maColorTab->Replace(pEntry, nPos);
- aLbColor.Modify( aEntry, nPos );
+ aLbColor.Modify( *pEntry, nPos );
aLbColor.SelectEntryPos( nPos );
- aValSetColorTable.SetItemColor( nPos + 1, aEntry.GetColor() );
- aValSetColorTable.SetItemText( nPos + 1, aEntry.GetName() );
+ aValSetColorTable.SetItemColor( nPos + 1, pEntry->GetColor() );
+ aValSetColorTable.SetItemText( nPos + 1, pEntry->GetName() );
aEdtName.SetText( aName );
aCtlPreviewOld.Invalidate();
Modified: openoffice/trunk/main/cui/source/tabpages/tplneend.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tplneend.cxx?rev=1535772&r1=1535771&r2=1535772&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tplneend.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tplneend.cxx Fri Oct 25 16:22:15 2013
@@ -402,19 +402,28 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickMo
// Wenn nicht vorhanden, wird Eintrag aufgenommen
if( bDifferent )
{
- const XLineEndEntry* pEntry = maLineEndList->GetLineEnd( nPos );
+ const XLineEndEntry* pOldEntry = maLineEndList->GetLineEnd( nPos );
- aEdtName.SetText( aName );
-
- const XLineEndEntry aEntry(pEntry->GetLineEnd(), aName);
-
- aLbLineEnds.Modify( aEntry, nPos, maLineEndList->GetUiBitmap( nPos ) );
- aLbLineEnds.SelectEntryPos( nPos );
-
- // Flag fuer modifiziert setzen
- *pnLineEndListState |= CT_MODIFIED;
-
- *pPageType = 3;
+ if(pOldEntry)
+ {
+ // #123497# Need to replace the existing entry with a new one (old returned needs to be deleted)
+ XLineEndEntry* pEntry = new XLineEndEntry(pOldEntry->GetLineEnd(), aName);
+ delete maLineEndList->Replace(pEntry, nPos);
+
+ aEdtName.SetText( aName );
+
+ aLbLineEnds.Modify( *pEntry, nPos, maLineEndList->GetUiBitmap( nPos ) );
+ aLbLineEnds.SelectEntryPos( nPos );
+
+ // Flag fuer modifiziert setzen
+ *pnLineEndListState |= CT_MODIFIED;
+
+ *pPageType = 3;
+ }
+ else
+ {
+ OSL_ENSURE(false, "LineEnd to be modified not existing (!)");
+ }
}
}
return( 0L );