summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-22 09:56:28 +0200
committerobo <obo@openoffice.org>2010-06-22 09:56:28 +0200
commit6450c0c301a92f948ade6d616305a48cc1e16663 (patch)
treea2ca141078a4fd1e3901f6b80751958aaf12feda /sfx2
parentf3153bf650c7204b8263422fba1eb972b30b78c9 (diff)
parent32a69fe0c6918c01a32c36b1281a359ea0214863 (diff)
CWS-TOOLING: integrate CWS mba33issues01
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/app.hxx2
-rw-r--r--sfx2/source/appl/appdata.cxx5
-rw-r--r--sfx2/source/appl/appmain.cxx3
-rw-r--r--sfx2/source/appl/appquit.cxx50
-rw-r--r--sfx2/source/appl/imestatuswindow.cxx6
-rw-r--r--sfx2/source/appl/imestatuswindow.hxx7
-rw-r--r--sfx2/source/bastyp/progress.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx2
-rw-r--r--sfx2/source/dialog/about.cxx30
-rw-r--r--sfx2/source/inc/appdata.hxx3
-rw-r--r--sfx2/source/view/ipclient.cxx8
-rw-r--r--sfx2/source/view/viewfrm.cxx2
12 files changed, 21 insertions, 99 deletions
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 8a49fde7b958..980eec04cfa6 100644
--- a/sfx2/inc/sfx2/app.hxx
+++ b/sfx2/inc/sfx2/app.hxx
@@ -259,7 +259,7 @@ public:
void ResetLastDir();
//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE static SfxApplication* Is_Impl() { return pApp;}
+ SAL_DLLPRIVATE static SfxApplication* Get() { return pApp;}
SAL_DLLPRIVATE SfxDispatcher* GetAppDispatcher_Impl();
SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index a07623df46b1..38ea69280c49 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -89,7 +89,7 @@ void SfxBasicManagerCreationListener::onBasicManagerCreated( const Reference< XM
m_rAppData.OnApplicationBasicManagerCreated( _rBasicManager );
}
-SfxAppData_Impl::SfxAppData_Impl( SfxApplication* pApp ) :
+SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) :
pDdeService( 0 ),
pDocTopics( 0 ),
pTriggerTopic(0),
@@ -116,8 +116,7 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* pApp ) :
nRescheduleLocks(0),
nInReschedule(0),
nAsynchronCalls(0),
- m_xImeStatusWindow(new sfx2::appl::ImeStatusWindow(
- *pApp, comphelper::getProcessServiceFactory()))
+ m_xImeStatusWindow(new sfx2::appl::ImeStatusWindow(comphelper::getProcessServiceFactory()))
, pTbxCtrlFac(0)
, pStbCtrlFac(0)
, pViewFrames(0)
diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx
index 020f68d01e8d..cf097b900b52 100644
--- a/sfx2/source/appl/appmain.cxx
+++ b/sfx2/source/appl/appmain.cxx
@@ -93,9 +93,6 @@ static SfxItemInfo __READONLY_DATA aItemInfos[] =
//===================================================================
-typedef Link* LinkPtr;
-SV_DECL_PTRARR(SfxInitLinkList, LinkPtr, 4, 4)
-
TYPEINIT2(SfxApplication,SfxShell,SfxBroadcaster);
//--------------------------------------------------------------------
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index 4da32cf9f566..d615d90ff37a 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -74,57 +74,11 @@
using ::basic::BasicManagerRepository;
-#ifdef DBG_UTIL
-DECLARE_LIST( SfxFrameWindowFactoryArray_Impl, SfxFrameWindowFactory* )
-SV_DECL_PTRARR(SfxInitLinkList, Link*, 2, 2)
-#endif
-
//===================================================================
BOOL SfxApplication::QueryExit_Impl()
{
BOOL bQuit = TRUE;
-/*
- BOOL bPrinting = FALSE;
- for ( SfxViewShell *pViewSh = SfxViewShell::GetFirst();
- !bPrinting && pViewSh;
- pViewSh = SfxViewShell::GetNext(*pViewSh) )
- {
- SfxPrinter *pPrinter = pViewSh->GetPrinter();
- bPrinting = pPrinter && pPrinter->IsPrinting();
- }
-
- if ( bPrinting )
- {
- // Benutzer fragen, ob abgebrochen werden soll
- if ( RET_OK == QueryBox( 0, SfxResId( MSG_ISPRINTING_QUERYABORT ) ).Execute() )
- {
- // alle Jobs canceln
- for ( SfxViewShell *pViewSh = SfxViewShell::GetFirst();
- !bPrinting && pViewSh;
- pViewSh = SfxViewShell::GetNext(*pViewSh) )
- {
- SfxPrinter *pPrinter = pViewSh->GetPrinter();
- if ( pPrinter && pPrinter->IsPrinting() )
- pPrinter->AbortJob();
- }
-
- // da das Canceln asynchron ist, Quit erstmal wieder verlassen
- GetDispatcher_Impl()->Execute( SID_QUITAPP, SFX_CALLMODE_ASYNCHRON );
- DBG_TRACE( "QueryExit => FALSE (printing)" );
- return FALSE;
- }
- }
-*/
-/*
- SfxObjectShell *pLastDocSh = SfxObjectShell::GetFirst();
- if ( bQuit )
- {
- // Jetzt zur Sicherheit auch hidden Frames abr"aumen
- SfxViewFrame::CloseHiddenFrames_Impl();
- pLastDocSh = SfxObjectShell::GetFirst();
- }
-*/
// will trotzdem noch jemand, den man nicht abschiessen kann, die App haben?
if ( !bQuit )
{
@@ -197,22 +151,18 @@ void SfxApplication::Deinitialize()
delete pAppData_Impl->pLabelResMgr;
-#ifdef DBG_UTIL
DELETEX(pAppData_Impl->pSlotPool);
DELETEX(pAppData_Impl->pEventConfig);
SfxMacroConfig::Release_Impl();
DELETEX(pAppData_Impl->pFactArr);
DELETEX(pAppData_Impl->pInitLinkList);
-#endif
-#ifdef DBG_UTIL
DELETEX(pAppData_Impl->pTbxCtrlFac);
DELETEX(pAppData_Impl->pStbCtrlFac);
DELETEX(pAppData_Impl->pMenuCtrlFac);
DELETEX(pAppData_Impl->pViewFrames);
DELETEX(pAppData_Impl->pViewShells);
DELETEX(pAppData_Impl->pObjShells);
-#endif
//TODO/CLEANTUP
//ReleaseArgs could be used instead!
diff --git a/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx
index 3cdc3064fb81..07eb47bd92ad 100644
--- a/sfx2/source/appl/imestatuswindow.cxx
+++ b/sfx2/source/appl/imestatuswindow.cxx
@@ -57,10 +57,8 @@ namespace css = com::sun::star;
using sfx2::appl::ImeStatusWindow;
ImeStatusWindow::ImeStatusWindow(
- SfxApplication & rApplication,
css::uno::Reference< css::lang::XMultiServiceFactory > const &
rServiceFactory):
- m_rApplication(rApplication),
m_xServiceFactory(rServiceFactory),
m_bDisposed(false)
{}
@@ -161,7 +159,9 @@ ImeStatusWindow::propertyChange(css::beans::PropertyChangeEvent const & )
throw (css::uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
- m_rApplication.Invalidate(SID_SHOW_IME_STATUS_WINDOW);
+ SfxApplication* pApp = SfxApplication::Get();
+ if (pApp)
+ pApp->Invalidate(SID_SHOW_IME_STATUS_WINDOW);
}
css::uno::Reference< css::beans::XPropertySet > ImeStatusWindow::getConfig()
diff --git a/sfx2/source/appl/imestatuswindow.hxx b/sfx2/source/appl/imestatuswindow.hxx
index 71c0b371f796..4edba523ed30 100644
--- a/sfx2/source/appl/imestatuswindow.hxx
+++ b/sfx2/source/appl/imestatuswindow.hxx
@@ -37,7 +37,6 @@ namespace com { namespace sun { namespace star {
namespace beans { class XPropertySet; }
namespace lang { class XMultiServiceFactory; }
} } }
-class SfxApplication;
namespace sfx2 { namespace appl {
@@ -56,10 +55,7 @@ ImeStatusWindow_Impl;
class ImeStatusWindow: private ImeStatusWindow_Impl
{
public:
- ImeStatusWindow(SfxApplication & rApplication,
- com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > const &
- rServiceFactory);
+ ImeStatusWindow( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > const& rServiceFactory );
/** Set up VCL according to the configuration.
@@ -115,7 +111,6 @@ private:
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >
getConfig();
- SfxApplication & m_rApplication;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
m_xServiceFactory;
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 649ae121c274..3af0ba2b0a6f 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -706,7 +706,7 @@ SfxProgress* SfxProgress::GetActiveProgress
*/
{
- if ( !SfxApplication::Is_Impl() )
+ if ( !SfxApplication::Get() )
return 0;
SfxProgress *pProgress = 0;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index d2ad8c645eb7..e53f1766b7b9 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -823,7 +823,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
pItem = pDispatcher->Execute( GetId(), nCall, 0, &aInternalSet, nModifier );
// no bindings, no invalidate ( usually done in SfxDispatcher::Call_Impl()! )
- if ( SfxApplication::Is_Impl() )
+ if ( SfxApplication::Get() )
{
SfxDispatcher* pAppDispat = SFX_APP()->GetAppDispatcher_Impl();
if ( pAppDispat )
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
index 4635733b934d..fab379f9f215 100644
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.cxx
@@ -172,20 +172,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
rtl::OUString sProduct;
utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct;
- if ( sProduct.equals( rtl::OUString::createFromAscii("StarOffice") ) ||
- sProduct.equals( rtl::OUString::createFromAscii("StarSuite") ) )
- {
- // --> PB 2004-11-18 #118455# new copyright text (only in french version show a french text)
- ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
- ::rtl::OUString sFrenchLang( DEFINE_CONST_OUSTRING( "fr" ) );
- if ( aLocale.Language.equals( sFrenchLang ) )
- {
- String sNewCopyrightText( ResId( ABOUT_STR_FRENCH_COPYRIGHT, *rId.GetResMgr() ) );
- aCopyrightText.SetText( sNewCopyrightText );
- }
- // <--
- }
-
// load image from module path
aAppLogo = SfxApplication::GetApplicationLogo();
@@ -299,22 +285,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
// explizite Help-Id
SetHelpId( SID_ABOUT );
-
- //#112429# replace occurences of "StarOffice" in the "StarSuite" version
- String sCopyright( aCopyrightText.GetText() );
- if(sProduct.equals(rtl::OUString::createFromAscii("StarSuite")))
- {
- String sSO(String::CreateFromAscii("StarOffice"));
- sCopyright.SearchAndReplaceAll(sSO, sProduct);
- }
-
- String sNewYear( DEFINE_CONST_UNICODE("2005") );
- xub_StrLen nIdx = sCopyright.SearchAndReplace( DEFINE_CONST_UNICODE("2002"), sNewYear );
- if ( STRING_NOTFOUND == nIdx )
- nIdx = sCopyright.SearchAndReplace( DEFINE_CONST_UNICODE("2003"), sNewYear );
- if ( STRING_NOTFOUND == nIdx )
- nIdx = sCopyright.SearchAndReplace( DEFINE_CONST_UNICODE("2004"), sNewYear );
- aCopyrightText.SetText( sCopyright );
}
// -----------------------------------------------------------------------
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index 91305eb95cce..bd12f3db80dc 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -82,6 +82,9 @@ class SfxBasicManagerCreationListener;
namespace sfx2 { namespace appl { class ImeStatusWindow; } }
+typedef Link* LinkPtr;
+SV_DECL_PTRARR(SfxInitLinkList, LinkPtr, 4, 4)
+
//=========================================================================
// SfxAppData_Impl
//=========================================================================
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 6d61f4182bbb..328d88d8b2b9 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -131,6 +131,8 @@ public:
, m_bResizeNoScale( sal_False )
{}
+ ~SfxInPlaceClient_Impl();
+
void SizeHasChanged();
DECL_LINK (TimerHdl, Timer*);
uno::Reference < frame::XFrame > GetFrame() const;
@@ -168,6 +170,10 @@ public:
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
};
+SfxInPlaceClient_Impl::~SfxInPlaceClient_Impl()
+{
+}
+
void SAL_CALL SfxInPlaceClient_Impl::changingState(
const ::com::sun::star::lang::EventObject& /*aEvent*/,
::sal_Int32 /*nOldState*/,
@@ -645,6 +651,7 @@ SfxInPlaceClient::SfxInPlaceClient( SfxViewShell* pViewShell, Window *pDraw, sal
m_pViewSh( pViewShell ),
m_pEditWin( pDraw )
{
+ m_pImp->acquire();
m_pImp->m_pClient = this;
m_pImp->m_nAspect = nAspect;
m_pImp->m_aScaleWidth = m_pImp->m_aScaleHeight = Fraction(1,1);
@@ -668,6 +675,7 @@ SfxInPlaceClient::~SfxInPlaceClient()
// the next call will destroy m_pImp if no other reference to it exists
m_pImp->m_xClient = uno::Reference < embed::XEmbeddedClient >();
+ m_pImp->release();
// TODO/LATER:
// the class is not intended to be used in multithreaded environment;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index d00229e8a73c..035fd3f794de 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1591,7 +1591,7 @@ void SfxViewFrame::KillDispatcher_Impl()
//------------------------------------------------------------------------
SfxViewFrame* SfxViewFrame::Current()
{
- return SfxApplication::Is_Impl() ? SFX_APP()->Get_Impl()->pViewFrame : NULL;
+ return SfxApplication::Get() ? SFX_APP()->Get_Impl()->pViewFrame : NULL;
}
//--------------------------------------------------------------------