summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/backgrnd.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/backgrnd.cxx')
-rw-r--r--cui/source/tabpages/backgrnd.cxx17
1 files changed, 5 insertions, 12 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 86eb2220cf1e..8d27b17701bc 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1133,20 +1133,16 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SfxPoolItem* pItem = NULL;
- XColorList* pColorTable = NULL;
+ XColorListRef pColorTable = NULL;
const Size aSize15x15 = Size( 15, 15 );
- bool bOwn = false;
if ( pDocSh && ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) )
- pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+ pColorTable = ( (SvxColorListItem*)pItem )->GetColorList();
- if ( !pColorTable )
- {
- bOwn = true;
- pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
- }
+ if ( !pColorTable.is() )
+ pColorTable = XColorList::CreateStdColorList();
- if ( pColorTable )
+ if ( pColorTable.is() )
{
short i = 0;
long nCount = pColorTable->Count();
@@ -1175,9 +1171,6 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
}
}
- if ( bOwn )
- delete pColorTable;
-
aBackgroundColorSet.SetColCount( 8 );
aBackgroundColorSet.SetLineCount( 13 );
aBackgroundColorSet.CalcWindowSizePixel( aSize15x15 );