diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-16 23:43:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-05-20 15:23:08 +0100 |
commit | c3f4ddfcc633f893316b12ab199fd52914ad7f50 (patch) | |
tree | 641dc6905d776313f12d3232afee0877cf206449 /svx/source/xoutdev | |
parent | cd012c149bab935986be21e66566bd3ff72b5cd7 (diff) |
valgrind: make this a well behaved singleton
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r-- | svx/source/xoutdev/xtabcolr.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx index dad41b9ff77f..eae0c09360e2 100644 --- a/svx/source/xoutdev/xtabcolr.cxx +++ b/svx/source/xoutdev/xtabcolr.cxx @@ -57,12 +57,6 @@ static char const aChckColor[] = { 0x04, 0x00, 'S','O','C','L'}; // < 5.2 static char const aChckColor0[] = { 0x04, 0x00, 'S','O','C','0'}; // = 5.2 static char const aChckXML[] = { '<', '?', 'x', 'm', 'l' }; // = 6.0 -// ------------------ -// class XColorTable -// ------------------ - -static XColorTable* pTable=0; - /************************************************************************* |* |* XColorTable::XColorTable() @@ -84,11 +78,10 @@ XColorTable::~XColorTable() { } -XColorTable* XColorTable::GetStdColorTable() +XColorTable& XColorTable::GetStdColorTable() { - if ( !pTable ) - pTable = new XColorTable( SvtPathOptions().GetPalettePath() ); - return pTable; + static XColorTable aTable(SvtPathOptions().GetPalettePath()); + return aTable; } /************************************************************************/ |