summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/numpages.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/numpages.cxx')
-rw-r--r--cui/source/tabpages/numpages.cxx17
1 files changed, 5 insertions, 12 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 4a47004c8b11..dd5d346b95d6 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1342,31 +1342,24 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
- XColorList* pColorTable = NULL;
- bool bKillTable = false;
+ XColorListRef pColorTable;
if ( pDocSh )
{
pItem = pDocSh->GetItem( SID_COLOR_TABLE );
if ( pItem )
- pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+ pColorTable = ( (SvxColorListItem*)pItem )->GetColorList();
}
- if ( !pColorTable )
- {
- pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
- bKillTable = true;
- }
+ if ( !pColorTable.is() )
+ pColorTable = XColorList::CreateStdColorList();
- aBulColLB.InsertEntry( Color( COL_AUTO ), SVX_RESSTR( RID_SVXSTR_AUTOMATIC ));
+ aBulColLB.InsertEntry( Color( COL_AUTO ), SVX_RESSTR( RID_SVXSTR_AUTOMATIC ));
for ( long i = 0; i < pColorTable->Count(); i++ )
{
XColorEntry* pEntry = pColorTable->GetColor(i);
aBulColLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
-
- if ( bKillTable )
- delete pColorTable;
}
SfxObjectShell* pShell;