Kaydet (Commit) 03fa6020 authored tarafından Armin Le Grand's avatar Armin Le Grand

i123497 corrected modify implementations for bitmap, lineend and color

üst 3b16c984
...@@ -756,9 +756,12 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) ...@@ -756,9 +756,12 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
bLoop = sal_False; bLoop = sal_False;
const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx()); 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 ); aLbBitmaps.SelectEntryPos( nPos );
// Flag fuer modifiziert setzen // Flag fuer modifiziert setzen
......
...@@ -631,13 +631,15 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) ...@@ -631,13 +631,15 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
if (eCM != CM_RGB) if (eCM != CM_RGB)
ConvertColorValues (aTmpColor, 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 ); aLbColor.SelectEntryPos( nPos );
aValSetColorTable.SetItemColor( nPos + 1, aEntry.GetColor() ); aValSetColorTable.SetItemColor( nPos + 1, pEntry->GetColor() );
aValSetColorTable.SetItemText( nPos + 1, aEntry.GetName() ); aValSetColorTable.SetItemText( nPos + 1, pEntry->GetName() );
aEdtName.SetText( aName ); aEdtName.SetText( aName );
aCtlPreviewOld.Invalidate(); aCtlPreviewOld.Invalidate();
......
...@@ -402,19 +402,28 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) ...@@ -402,19 +402,28 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
// Wenn nicht vorhanden, wird Eintrag aufgenommen // Wenn nicht vorhanden, wird Eintrag aufgenommen
if( bDifferent ) if( bDifferent )
{ {
const XLineEndEntry* pEntry = maLineEndList->GetLineEnd( nPos ); const XLineEndEntry* pOldEntry = maLineEndList->GetLineEnd( nPos );
aEdtName.SetText( aName ); 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);
const XLineEndEntry aEntry(pEntry->GetLineEnd(), aName); aEdtName.SetText( aName );
aLbLineEnds.Modify( aEntry, nPos, maLineEndList->GetUiBitmap( nPos ) ); aLbLineEnds.Modify( *pEntry, nPos, maLineEndList->GetUiBitmap( nPos ) );
aLbLineEnds.SelectEntryPos( nPos ); aLbLineEnds.SelectEntryPos( nPos );
// Flag fuer modifiziert setzen // Flag fuer modifiziert setzen
*pnLineEndListState |= CT_MODIFIED; *pnLineEndListState |= CT_MODIFIED;
*pPageType = 3; *pPageType = 3;
}
else
{
OSL_ENSURE(false, "LineEnd to be modified not existing (!)");
}
} }
} }
return( 0L ); return( 0L );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment