[Libreoffice-commits] .: svl/inc svl/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Oct 3 04:45:21 PDT 2011


 svl/inc/svl/style.hxx      |    1 +
 svl/source/items/style.cxx |   19 +++++++++++++++++++
 2 files changed, 20 insertions(+)

New commits:
commit d1420b9235649af5cbba8f515c69afc362e09b1c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 3 12:43:42 2011 +0100

    revert this, reported windows bustage

diff --git a/svl/inc/svl/style.hxx b/svl/inc/svl/style.hxx
index c948c58..ceb8050 100644
--- a/svl/inc/svl/style.hxx
+++ b/svl/inc/svl/style.hxx
@@ -100,6 +100,7 @@ protected:
 
     sal_Bool                    bMySet;         // sal_True: Set loeschen im dtor
 
+    SfxStyleSheetBase(); // do not use!
     SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool&, SfxStyleFamily eFam, sal_uInt16 mask );
     SfxStyleSheetBase( const SfxStyleSheetBase& );
     virtual ~SfxStyleSheetBase();
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 595ed7b..2a1929e 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -154,6 +154,25 @@ SfxStyleSheetBase::SfxStyleSheetBase( const SfxStyleSheetBase& r )
         pSet = NULL;
 }
 
+static SfxStyleSheetBasePool& implGetStaticPool()
+{
+    static SfxStyleSheetBasePool* pSheetPool = 0;
+    static SfxItemPool* pBasePool = 0;
+    if( !pSheetPool )
+    {
+        UniString aName;
+        pBasePool = new SfxItemPool( aName, 0, 0, 0 );
+        pSheetPool = new SfxStyleSheetBasePool(*pBasePool);
+    }
+    return *pSheetPool;
+}
+
+SfxStyleSheetBase::SfxStyleSheetBase()
+: comphelper::OWeakTypeObject()
+, rPool( implGetStaticPool() )
+{
+}
+
 SfxStyleSheetBase::~SfxStyleSheetBase()
 {
 #ifdef DBG_UTIL


More information about the Libreoffice-commits mailing list