summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-05-20 09:08:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-05-20 15:24:33 +0100
commit4863771f3e7f884a3bffcde5fd4b2a8e978c0c94 (patch)
tree45775594446aa8ab821ed38a0b39c4d52189e7bc /sw/source/ui/uno
parent4cd346f6485e05b3b2cf8a289d5d3068cbf3df43 (diff)
tweak globals to be well-behaved singleton
Diffstat (limited to 'sw/source/ui/uno')
-rw-r--r--sw/source/ui/uno/SwXFilterOptions.cxx2
-rw-r--r--sw/source/ui/uno/dlelstnr.cxx4
-rw-r--r--sw/source/ui/uno/unoatxt.cxx6
-rw-r--r--sw/source/ui/uno/unodoc.cxx6
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx2
-rw-r--r--sw/source/ui/uno/unomodule.cxx4
6 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/ui/uno/SwXFilterOptions.cxx b/sw/source/ui/uno/SwXFilterOptions.cxx
index f0b647c9fc29..3af6e74bb922 100644
--- a/sw/source/ui/uno/SwXFilterOptions.cxx
+++ b/sw/source/ui/uno/SwXFilterOptions.cxx
@@ -185,7 +185,7 @@ uno::Reference<uno::XInterface> SAL_CALL SwXFilterOptions_createInstance(
const uno::Reference<lang::XMultiServiceFactory>& )
{
SolarMutexGuard aGuard;
- SwDLL::Init();
+ SwGlobals::ensure();
return (::cppu::OWeakObject*) new SwXFilterOptions;
}
diff --git a/sw/source/ui/uno/dlelstnr.cxx b/sw/source/ui/uno/dlelstnr.cxx
index 25ea3c96fa7a..374abaa693fa 100644
--- a/sw/source/ui/uno/dlelstnr.cxx
+++ b/sw/source/ui/uno/dlelstnr.cxx
@@ -155,9 +155,9 @@ void SAL_CALL SwLinguServiceEventListener::disposing(
{
SolarMutexGuard aGuard;
- if (xLngSvcMgr.is() && rEventObj.Source == xLngSvcMgr)
+ if (xLngSvcMgr.is() && rEventObj.Source == xLngSvcMgr)
xLngSvcMgr = 0;
- if (xLngSvcMgr.is() && rEventObj.Source == xGCIterator)
+ if (xLngSvcMgr.is() && rEventObj.Source == xGCIterator)
xGCIterator = 0;
}
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index e5943aab71e7..22944dd40713 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -76,7 +76,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwXAutoTextContainer_createInstance(
{
//the module may not be loaded
SolarMutexGuard aGuard;
- SwDLL::Init();
+ SwGlobals::ensure();
static uno::Reference< uno::XInterface > xAText = (cppu::OWeakObject*)new SwXAutoTextContainer();;
return xAText;
}
@@ -415,12 +415,12 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
pOnlyTxt = &sOnlyTxt;
}
- const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
+ const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
SwDoc* pGDoc = pGlosGroup->GetDoc();
// Bis es eine Option dafuer gibt, base util::URL loeschen
- if(pCfg->IsSaveRelFile())
+ if(rCfg.IsSaveRelFile())
{
INetURLObject aTemp(pGlosGroup->GetFileName());
pGlosGroup->SetBaseURL( aTemp.GetMainURL(INetURLObject::NO_DECODE));
diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx
index 30b8c0d79e87..e85dfead75ec 100644
--- a/sw/source/ui/uno/unodoc.cxx
+++ b/sw/source/ui/uno/unodoc.cxx
@@ -66,7 +66,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance(
throw( uno::Exception )
{
SolarMutexGuard aGuard;
- SwDLL::Init();
+ SwGlobals::ensure();
SfxObjectShell* pShell = new SwDocShell( _nCreationFlags );
return uno::Reference< uno::XInterface >( pShell->GetModel() );
}
@@ -95,7 +95,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwWebDocument_createInstance(
throw( uno::Exception )
{
SolarMutexGuard aGuard;
- SwDLL::Init();
+ SwGlobals::ensure();
SfxObjectShell* pShell = new SwWebDocShell( SFX_CREATE_MODE_STANDARD );
return uno::Reference< uno::XInterface >( pShell->GetModel() );
}
@@ -122,7 +122,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwGlobalDocument_createInstance(
throw( uno::Exception )
{
SolarMutexGuard aGuard;
- SwDLL::Init();
+ SwGlobals::ensure();
SfxObjectShell* pShell = new SwGlobalDocShell( SFX_CREATE_MODE_STANDARD );
return uno::Reference< uno::XInterface >( pShell->GetModel() );
}
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index bdc995d47a75..66054e61d833 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -1241,7 +1241,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMailMerge_createInstance(
SolarMutexGuard aGuard;
//the module may not be loaded
- SwDLL::Init();
+ SwGlobals::ensure();
uno::Reference< uno::XInterface > xRef = (cppu::OWeakObject *) new SwXMailMerge();
return xRef;
}
diff --git a/sw/source/ui/uno/unomodule.cxx b/sw/source/ui/uno/unomodule.cxx
index 91a3d07098e9..5a7f3be41516 100644
--- a/sw/source/ui/uno/unomodule.cxx
+++ b/sw/source/ui/uno/unomodule.cxx
@@ -71,7 +71,7 @@ void SAL_CALL SwUnoModule::dispatchWithNotification( const util::URL& aURL, cons
uno::Reference< uno::XInterface > xThis(static_cast< frame::XNotifyingDispatch* >(this));
SolarMutexGuard aGuard;
- SwDLL::Init();
+ SwGlobals::ensure();
const SfxSlot* pSlot = SW_MOD()->GetInterface()->GetSlot( aURL.Complete );
sal_Int16 aState = frame::DispatchResultState::DONTKNOW;
@@ -138,7 +138,7 @@ REFERENCE< XDISPATCH > SAL_CALL SwUnoModule::queryDispatch(
REFERENCE< XDISPATCH > xReturn;
SolarMutexGuard aGuard;
- SwDLL::Init();
+ SwGlobals::ensure();
const SfxSlot* pSlot = SW_MOD()->GetInterface()->GetSlot( aURL.Complete );
if ( pSlot )
xReturn = REFERENCE< XDISPATCH >(static_cast< XDISPATCH* >(this), uno::UNO_QUERY);