summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-05-17 10:00:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-05-20 15:21:50 +0100
commitdb61126356b89db63d54b7f76b33008c5e7177ce (patch)
treed948b709ed257eceb3799dc96a8bd0f77a570a92
parente1d6a1c542ca2b21f11c581fa6e4be6235deb3af (diff)
adjust for modified singleton
-rw-r--r--sc/source/core/data/drwlayer.cxx5
-rw-r--r--sc/source/ui/docshell/docsh2.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx2
-rw-r--r--sc/source/ui/optdlg/opredlin.cxx7
-rw-r--r--sc/source/ui/optdlg/tpview.cxx2
5 files changed, 8 insertions, 10 deletions
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 8e133fca7..9b37ed61f 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -242,14 +242,13 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) :
// set color table
SvxColorTableItem* pColItem = (SvxColorTableItem*) pObjSh->GetItem( SID_COLOR_TABLE );
- XColorTable* pXCol = pColItem ? pColItem->GetColorTable() : XColorTable::GetStdColorTable();
+ XColorTable* pXCol = pColItem ? pColItem->GetColorTable() : &XColorTable::GetStdColorTable();
SetColorTable( pXCol );
}
else
- SetColorTable( XColorTable::GetStdColorTable() );
+ SetColorTable( &XColorTable::GetStdColorTable() );
SetSwapGraphics(sal_True);
-// SetSwapAsynchron(sal_True); // an der View
SetScaleUnit(MAP_100TH_MM);
SfxItemPool& rPool = GetItemPool();
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 0a163a795..a2e676b3b 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -144,7 +144,7 @@ void ScDocShell::InitItems()
else
{
// always use global color table instead of local copy
- PutItem( SvxColorTableItem( XColorTable::GetStdColorTable(), SID_COLOR_TABLE ) );
+ PutItem( SvxColorTableItem( &XColorTable::GetStdColorTable(), SID_COLOR_TABLE ) );
}
if ( !aDocument.GetForbiddenCharacters().is() ||
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index c8e16b2c2..45fb2f134 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -422,7 +422,7 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
// (see SwDrawShell::ExecDrawDlg)
const SvxColorTableItem* pColorItem =
static_cast<const SvxColorTableItem*>( pViewData->GetSfxDocShell()->GetItem(SID_COLOR_TABLE) );
- if (pColorItem->GetColorTable() == XColorTable::GetStdColorTable())
+ if (pColorItem->GetColorTable() == &XColorTable::GetStdColorTable())
pDlg->DontDeleteColorTable();
if ( nTabPage != 0xffff )
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 03d966db9..8c88e2298 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -159,8 +159,6 @@ sal_Bool ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ )
void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
{
-
- XColorTable* pColorTbl = XColorTable::GetStdColorTable();
aContentColorLB.InsertEntry(aAuthorStr);
aMoveColorLB.InsertEntry(aAuthorStr);
aInsertColorLB.InsertEntry(aAuthorStr);
@@ -171,9 +169,10 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
aInsertColorLB.SetUpdateMode( false);
aRemoveColorLB.SetUpdateMode( false);
- for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i )
+ XColorTable& rColorTbl = XColorTable::GetStdColorTable();
+ for( sal_uInt16 i = 0; i < rColorTbl.Count(); ++i )
{
- XColorEntry* pEntry = pColorTbl->GetColor( i );
+ XColorEntry* pEntry = rColorTbl.GetColor( i );
Color aColor = pEntry->GetColor();
String sName = pEntry->GetName();
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 9bbc4452f..ce555fe2e 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -335,7 +335,7 @@ void ScTpContentOptions::InitGridOpt()
pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable();
}
else
- pColorTable = XColorTable::GetStdColorTable();
+ pColorTable = &XColorTable::GetStdColorTable();
if ( !pColorTable )
return;