summaryrefslogtreecommitdiff
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
commitdfd2a489721db71a0a5632bf57cf2ef92407702b (patch)
tree222cf4187046d0992369dead4084b4f579e73987
parent2003566a1022818e604e431ed97b5586462e74fe (diff)
parente4117cc28612762e68c373d7c6836574adec7881 (diff)
CWS-TOOLING: integrate CWS mba33issues01
-rw-r--r--framework/source/services/frame.cxx3
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Paths.xcu8
-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
-rw-r--r--svx/source/svdraw/svdoole2.cxx46
15 files changed, 54 insertions, 123 deletions
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 08f9b171a9..b2bd849417 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -1551,8 +1551,9 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL Frame::getComponentWindow() th
css::uno::Reference< css::frame::XController > SAL_CALL Frame::getController() throw( css::uno::RuntimeException )
{
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
+ // It seems to be unavoidable that disposed frames allow to ask for a Controller (#111452)
// Register transaction and reject wrong calls.
- TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
+ // TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
ReadGuard aReadLock( m_aLock );
diff --git a/officecfg/registry/data/org/openoffice/Office/Paths.xcu b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
index bb062d94a8..8fef51ca23 100644
--- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
@@ -98,7 +98,13 @@
</node>
</node>
- <node oor:name="Gallery" oor:op="fuse" oor:mandatory="true">
+ <node oor:name="Libraries" oor:op="fuse" oor:mandatory="true">
+ <node oor:name="InternalPaths">
+ <node oor:name="$(progpath)/libraries" oor:op="fuse" />
+ </node>
+ </node>
+
+ <node oor:name="Gallery" oor:op="fuse" oor:mandatory="true">
<node oor:name="InternalPaths">
<node oor:name="$(insturl)/share/gallery" oor:op="fuse" />
</node>
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 9811bf838b..6c330b023a 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 7936110356..148f44cc1c 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 aee82150a8..89de71d7c6 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 7c41c802bb..4cde428a57 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 2885f60bb9..53639a65df 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 cbfe2c4748..2d310c60c7 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 9fd7a95a3c..1e3f5dde97 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 8159fc8430..14b3fe06e9 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 77b60b7fe8..fba842e129 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 96aafcfbf7..eff70fb605 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 eb41088cd1..ff1d963ab5 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 87fee8e7bd..21d10471fc 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;
}
//--------------------------------------------------------------------
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 68ebcca102..0a4aef117b 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1714,8 +1714,8 @@ void SdrOle2Obj::ImpSetVisAreaSize()
if ( pClient || bHasOwnClient )
{
// TODO/LATER: IMHO we need to do similar things when object is UIActive or OutplaceActive?! (MBA)
- if ( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
- svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() )
+ if ( ((nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
+ svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() ))
|| xObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE
)
{
@@ -1832,11 +1832,7 @@ void SdrOle2Obj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
// if the object needs recompose on resize
// the client site should be created before the resize will take place
// check whether there is no client site and create it if necessary
- if ( !SfxInPlaceClient::GetClient( dynamic_cast<SfxObjectShell*>(pModel->GetPersist()), xObjRef.GetObject() )
- && !( mpImpl->pLightClient && xObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->pLightClient ) ) )
- {
- AddOwnLightClient();
- }
+ AddOwnLightClient();
}
}
@@ -2197,26 +2193,32 @@ sal_Bool SdrOle2Obj::CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScal
sal_Bool SdrOle2Obj::AddOwnLightClient()
{
// The Own Light Client must be registered in object only using this method!
- Connect();
-
- if ( xObjRef.is() && mpImpl->pLightClient )
+ if ( !SfxInPlaceClient::GetClient( dynamic_cast<SfxObjectShell*>(pModel->GetPersist()), xObjRef.GetObject() )
+ && !( mpImpl->pLightClient && xObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->pLightClient ) ) )
{
- Fraction aScaleWidth;
- Fraction aScaleHeight;
- Size aObjAreaSize;
- if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) )
+ Connect();
+
+ if ( xObjRef.is() && mpImpl->pLightClient )
{
- mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
- try {
- xObjRef->setClientSite( mpImpl->pLightClient );
- return sal_True;
- } catch( uno::Exception& )
- {}
+ Fraction aScaleWidth;
+ Fraction aScaleHeight;
+ Size aObjAreaSize;
+ if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) )
+ {
+ mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
+ try {
+ xObjRef->setClientSite( mpImpl->pLightClient );
+ return sal_True;
+ } catch( uno::Exception& )
+ {}
+ }
+
}
- }
+ return sal_False;
+ }
- return sal_False;
+ return sal_True;
}
//////////////////////////////////////////////////////////////////////////////