Kaydet (Commit) c3f4ddfc authored tarafından Caolán McNamara's avatar Caolán McNamara

valgrind: make this a well behaved singleton

üst cd012c14
......@@ -316,7 +316,7 @@ public:
virtual sal_Bool CreateBitmapsForUI();
virtual Bitmap* CreateBitmapForUI( long nIndex, sal_Bool bDelete = sal_True );
static XColorTable* GetStdColorTable();
static XColorTable& GetStdColorTable();
};
// -------------------
......
......@@ -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;
}
/************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment