Resolves: #i123497# corrected modify implementations for bitmap...
lineend and color (cherry picked from commit 03fa6020a862b1b6faf69f33274022cb871e8f4b) Conflicts: cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tplneend.cxx Change-Id: Ib99e8f0a59fb611972133bab1e864d59d019457b
This commit is contained in:
committed by
Caolán McNamara
parent
2c6b6ba446
commit
518d3592e6
@@ -685,9 +685,12 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
|
|||||||
bLoop = sal_False;
|
bLoop = sal_False;
|
||||||
|
|
||||||
const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
|
const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
|
||||||
const XBitmapEntry aEntry(Graphic(aBitmapEx), aName);
|
|
||||||
|
|
||||||
m_pLbBitmaps->Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), aEntry, nPos );
|
// #i123497# Need to replace the existing entry with a new one (old returned needs to be deleted)
|
||||||
|
XBitmapEntry* pEntry = new XBitmapEntry(Graphic(aBitmapEx), aName);
|
||||||
|
delete pBitmapList->Replace(pEntry, nPos);
|
||||||
|
|
||||||
|
m_pLbBitmaps->Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry, nPos );
|
||||||
m_pLbBitmaps->SelectEntryPos( nPos );
|
m_pLbBitmaps->SelectEntryPos( nPos );
|
||||||
|
|
||||||
*pnBitmapListState |= CT_MODIFIED;
|
*pnBitmapListState |= CT_MODIFIED;
|
||||||
|
@@ -794,13 +794,15 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl)
|
|||||||
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 pColorList->Replace(pEntry, nPos);
|
||||||
|
|
||||||
m_pLbColor->Modify( aEntry, nPos );
|
m_pLbColor->Modify( *pEntry, nPos );
|
||||||
m_pLbColor->SelectEntryPos( nPos );
|
m_pLbColor->SelectEntryPos( nPos );
|
||||||
|
|
||||||
m_pValSetColorList->SetItemColor( nPos + 1, aEntry.GetColor() );
|
m_pValSetColorList->SetItemColor( nPos + 1, pEntry->GetColor() );
|
||||||
m_pValSetColorList->SetItemText( nPos + 1, aEntry.GetName() );
|
m_pValSetColorList->SetItemText( nPos + 1, pEntry->GetName() );
|
||||||
m_pEdtName->SetText( aName );
|
m_pEdtName->SetText( aName );
|
||||||
|
|
||||||
m_pCtlPreviewOld->Invalidate();
|
m_pCtlPreviewOld->Invalidate();
|
||||||
|
@@ -358,19 +358,29 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl)
|
|||||||
// if not existing, enter the entry
|
// if not existing, enter the entry
|
||||||
if( bDifferent )
|
if( bDifferent )
|
||||||
{
|
{
|
||||||
const XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nPos );
|
const XLineEndEntry* pOldEntry = pLineEndList->GetLineEnd( nPos );
|
||||||
|
|
||||||
|
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 pLineEndList->Replace(pEntry, nPos);
|
||||||
|
|
||||||
m_pEdtName->SetText( aName );
|
m_pEdtName->SetText( aName );
|
||||||
|
|
||||||
const XLineEndEntry aEntry(pEntry->GetLineEnd(), aName);
|
m_pLbLineEnds->Modify( *pEntry, nPos, pLineEndList->GetUiBitmap( nPos ) );
|
||||||
|
|
||||||
m_pLbLineEnds->Modify( aEntry, nPos, pLineEndList->GetUiBitmap( nPos ) );
|
|
||||||
m_pLbLineEnds->SelectEntryPos( nPos );
|
m_pLbLineEnds->SelectEntryPos( nPos );
|
||||||
|
|
||||||
|
// 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 );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user