summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-11 10:26:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-11 11:08:02 +0100
commit0e4b36269097f8865bdbc1b9d299a2776ae0cc06 (patch)
treee5446ab0d7a42b98ed9333c25ac66ba54c438f53 /sc/inc
parent5c4d1b05faa8a3d704fc74a186a173f8cc019cc1 (diff)
ScGlobal::GetAutoFormat not always required to create fresh instance.
...at least in ~ScAutoFormatObj it appears unnecessary and can lead to crashes during Desktop::DeregisterServices (when ScGlobal::ppRscString is already null and ScAutoFormat ctor calls ScGlobal::GetRscString). Therefore split GetAutoFormat in two, GetOrCreateAutoFormat for cases that probably need a non-null return and GetAutoFormat for those that are OK with a null return.
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/global.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index a810400da767..ac10094ab4d1 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -562,6 +562,7 @@ public:
SC_DLLPUBLIC static const SvxSearchItem& GetSearchItem();
SC_DLLPUBLIC static void SetSearchItem( const SvxSearchItem& rNew );
SC_DLLPUBLIC static ScAutoFormat* GetAutoFormat();
+ SC_DLLPUBLIC static ScAutoFormat* GetOrCreateAutoFormat();
static void ClearAutoFormat(); //BugId 54209
static FuncCollection* GetFuncCollection();
SC_DLLPUBLIC static ScUnoAddInCollection* GetAddInCollection();