summaryrefslogtreecommitdiff
path: root/sw/source/ui/dialog/swuiexp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/dialog/swuiexp.cxx')
-rw-r--r--sw/source/ui/dialog/swuiexp.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index ba351e57ced5..c016cc6189a4 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -52,12 +52,10 @@
namespace swui
{
- static SwAbstractDialogFactory_Impl* pFactory=nullptr;
- SwAbstractDialogFactory * GetFactory()
+ SwAbstractDialogFactory& GetFactory()
{
- if ( !pFactory )
- pFactory = new SwAbstractDialogFactory_Impl;
- return pFactory;
+ static SwAbstractDialogFactory_Impl aFactory;
+ return aFactory;
}
}
@@ -65,7 +63,7 @@ extern "C"
{
SAL_DLLPUBLIC_EXPORT SwAbstractDialogFactory* SwCreateDialogFactory()
{
- return ::swui::GetFactory();
+ return &::swui::GetFactory();
}
}