summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-09-18 10:15:03 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-09-18 10:15:03 +0000
commitb5d0edea37b43a55f4d6a730bb5961250e1984c4 (patch)
tree259c23a3e0b3f716360a486af766ba104d6f2b07
parente50d2f7ae804b5a219cf4a440d19f7ac2d000c10 (diff)
CWS-TOOLING: integrate CWS mba32issues02
2009-09-17 mb93783 merge commit 2009-09-03 tb121644 #i104748 - slot unification to .uno:PasteSpecial 2009-09-01 mba #101455#: code simplification 2009-08-31 mb93783 iso locales for norwegian builds are nb and nn, not no 2009-08-25 mba merge to m55 2009-07-29 mba cleanup after rebase 2009-07-29 mba #i103200#: wrong order of first and last name in CJK UI 2009-07-27 mba adding dictionary changes from broken svn CWS 2009-07-27 mba adding dictionary changes from broken svn CWS 2009-07-27 mba apply patch from broken svn CWS
-rw-r--r--desktop/source/app/app.cxx11
-rw-r--r--framework/inc/classes/fwktabwindow.hxx4
-rw-r--r--framework/inc/dispatch/menudispatcher.hxx2
-rw-r--r--framework/inc/helper/opluginframedispatcher.hxx353
-rw-r--r--framework/inc/interaction/quietinteraction.hxx (renamed from framework/inc/interaction/stillinteraction.hxx)8
-rw-r--r--framework/inc/services/desktop.hxx5
-rw-r--r--framework/inc/services/frame.hxx7
-rw-r--r--framework/inc/services/layoutmanager.hxx4
-rw-r--r--framework/inc/services/license.hxx2
-rw-r--r--framework/source/accelerators/presethandler.cxx9
-rw-r--r--framework/source/classes/fwktabwindow.cxx22
-rw-r--r--framework/source/dispatch/closedispatcher.cxx22
-rw-r--r--framework/source/dispatch/dispatchprovider.cxx37
-rw-r--r--framework/source/dispatch/menudispatcher.cxx20
-rw-r--r--framework/source/inc/accelerators/presethandler.hxx2
-rw-r--r--framework/source/inc/loadenv/loadenv.hxx4
-rw-r--r--framework/source/interaction/makefile.mk2
-rw-r--r--framework/source/interaction/quietinteraction.cxx (renamed from framework/source/interaction/stillinteraction.cxx)18
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx7
-rw-r--r--framework/source/loadenv/loadenv.cxx32
-rw-r--r--framework/source/services/desktop.cxx50
-rw-r--r--framework/source/services/frame.cxx44
-rw-r--r--framework/source/services/license.cxx3
-rw-r--r--framework/util/makefile.mk2
-rw-r--r--idl/source/objects/bastype.cxx41
-rw-r--r--idl/source/prj/command.cxx2
-rw-r--r--idl/source/prj/globals.cxx4
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Accelerators.xcu4
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu2
-rw-r--r--sfx2/inc/sfx2/dinfdlg.hxx6
-rw-r--r--sfx2/inc/sfx2/event.hxx37
-rw-r--r--sfx2/inc/sfx2/evntconf.hxx31
-rw-r--r--sfx2/inc/sfx2/objsh.hxx2
-rw-r--r--sfx2/inc/sfx2/sfx.hrc3
-rw-r--r--sfx2/inc/sfx2/sfxbasemodel.hxx2
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc6
-rw-r--r--sfx2/inc/sfx2/viewsh.hxx6
-rw-r--r--sfx2/sdi/appslots.sdi8
-rw-r--r--sfx2/sdi/sfx.sdi129
-rw-r--r--sfx2/sdi/sfxslots.sdi1
-rw-r--r--sfx2/source/appl/app.cxx4
-rw-r--r--sfx2/source/appl/app.hrc16
-rw-r--r--sfx2/source/appl/app.src71
-rw-r--r--sfx2/source/appl/appcfg.cxx20
-rw-r--r--sfx2/source/appl/appinit.cxx33
-rw-r--r--sfx2/source/appl/appserv.cxx17
-rw-r--r--sfx2/source/config/evntconf.cxx418
-rw-r--r--sfx2/source/control/bindings.cxx515
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx26
-rw-r--r--sfx2/source/doc/makefile.mk2
-rw-r--r--sfx2/source/doc/objcont.cxx48
-rw-r--r--sfx2/source/doc/objembed.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx10
-rw-r--r--sfx2/source/doc/objstor.cxx6
-rw-r--r--sfx2/source/doc/objxtor.cxx100
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx38
-rw-r--r--sfx2/source/doc/sfxbasemodel.src94
-rw-r--r--sfx2/source/inc/eventsupplier.hxx3
-rw-r--r--sfx2/source/inc/objshimp.hxx6
-rw-r--r--sfx2/source/notify/eventsupplier.cxx26
-rw-r--r--sfx2/source/view/frame.cxx2
-rw-r--r--sfx2/source/view/frmload.cxx139
-rw-r--r--sfx2/source/view/prnmon.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx4
-rw-r--r--sfx2/source/view/topfrm.cxx5
-rw-r--r--sfx2/source/view/viewfrm.cxx22
-rw-r--r--sfx2/source/view/viewimp.hxx17
-rw-r--r--sfx2/source/view/viewprn.cxx51
-rw-r--r--sfx2/source/view/viewsh.cxx98
-rw-r--r--svx/inc/optgenrl.hrc1
-rw-r--r--svx/inc/svx/dialogs.hrc23
-rw-r--r--svx/inc/svx/svxids.hrc2
-rw-r--r--svx/sdi/svx.sdi44
-rw-r--r--svx/sdi/svxitems.sdi1
-rw-r--r--svx/source/cui/cuioptgenrl.hxx1
-rw-r--r--svx/source/cui/macropg.cxx35
-rw-r--r--svx/source/cui/macropg.src113
-rw-r--r--svx/source/cui/optgenrl.cxx18
-rw-r--r--svx/source/intro/intro_tmpl.hrc4
-rw-r--r--svx/source/mnuctrls/clipboardctl.cxx10
-rw-r--r--svx/source/options/optgenrl.src8
-rw-r--r--uui/source/passworddlg.src1
82 files changed, 827 insertions, 2183 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 75533bcd0f..a8ebfee188 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1257,6 +1257,7 @@ void Desktop::Main()
std::auto_ptr<SvtLanguageOptions> pLanguageOptions;
std::auto_ptr<SvtPathOptions> pPathOptions;
+ Reference < css::document::XEventListener > xGlobalBroadcaster;
try
{
RegisterServices( xSMgr );
@@ -1379,7 +1380,8 @@ void Desktop::Main()
}
// create service for loadin SFX (still needed in startup)
- Reference < css::document::XEventListener > xGlobalBroadcaster( xSMgr->createInstance(
+ xGlobalBroadcaster = Reference < css::document::XEventListener >
+ ( xSMgr->createInstance(
DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY );
// initialize test-tool library (if available)
@@ -1617,6 +1619,13 @@ void Desktop::Main()
FatalError( MakeStartupErrorMessage(exAnyCfg.Message) );
}
+ if (xGlobalBroadcaster.is())
+ {
+ css::document::EventObject aEvent;
+ aEvent.EventName = ::rtl::OUString::createFromAscii("OnCloseApp");
+ xGlobalBroadcaster->notifyEvent(aEvent);
+ }
+
delete pResMgr;
// Restore old value
diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx
index 166c9377ef..e9d7f0bd4b 100644
--- a/framework/inc/classes/fwktabwindow.hxx
+++ b/framework/inc/classes/fwktabwindow.hxx
@@ -84,9 +84,6 @@ public:
virtual void ActivatePage();
virtual void DeactivatePage();
virtual void Resize();
-
- void Reset();
- void Save();
};
struct TabEntry
@@ -131,7 +128,6 @@ public:
FwkTabPage* AddTabPage( sal_Int32 nIndex, const css::uno::Sequence< css::beans::NamedValue >& rProperties );
void ActivatePage( sal_Int32 nIndex );
void RemovePage( sal_Int32 nIndex );
- sal_Int32 GetActivePageId() const;
virtual void Resize();
};
diff --git a/framework/inc/dispatch/menudispatcher.hxx b/framework/inc/dispatch/menudispatcher.hxx
index 058b9a7e6e..485d436ffe 100644
--- a/framework/inc/dispatch/menudispatcher.hxx
+++ b/framework/inc/dispatch/menudispatcher.hxx
@@ -312,8 +312,6 @@ class MenuDispatcher : // interfaces
static sal_Bool impldbg_checkParameter_MenuDispatcher ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ,
const css::uno::Reference< css::frame::XFrame >& xOwner );
- static sal_Bool impldbg_checkParameter_dispatch ( const css::util::URL& aURL ,
- const css::uno::Sequence< css::beans::PropertyValue >& seqArguments );
static sal_Bool impldbg_checkParameter_addStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& xControl ,
const css::util::URL& aURL );
static sal_Bool impldbg_checkParameter_removeStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& xControl ,
diff --git a/framework/inc/helper/opluginframedispatcher.hxx b/framework/inc/helper/opluginframedispatcher.hxx
deleted file mode 100644
index c3000e67a4..0000000000
--- a/framework/inc/helper/opluginframedispatcher.hxx
+++ /dev/null
@@ -1,353 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: opluginframedispatcher.hxx,v $
- * $Revision: 1.8 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __FRAMEWORK_HELPER_OPLUGINFRAMEDISPATCHER_HXX_
-#define __FRAMEWORK_HELPER_OPLUGINFRAMEDISPATCHER_HXX_
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <macros/generic.hxx>
-#include <macros/xinterface.hxx>
-#include <macros/debug.hxx>
-#include <general.h>
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/mozilla/XPluginInstance.hpp>
-#include <com/sun/star/mozilla/XPluginInstancePeer.hpp>
-#include <com/sun/star/mozilla/XPluginInstanceNotifySink.hpp>
-#include <com/sun/star/util/URL.hpp>
-#include <com/sun/star/frame/DispatchDescriptor.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/beans/PROPERTYVALUE.hpp>
-
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/weakref.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
-
-//_________________________________________________________________________________________________________________
-// namespace
-//_________________________________________________________________________________________________________________
-
-namespace framework{
-
-//_________________________________________________________________________________________________________________
-// exported const
-//_________________________________________________________________________________________________________________
-
-//_________________________________________________________________________________________________________________
-// exported definitions
-//_________________________________________________________________________________________________________________
-
-/*-************************************************************************************************************//**
- Use OMultiTypeInterfaceContainerHelperVar-template to create new class to get a container
- to combine string values with listeners.
-*//*-*************************************************************************************************************/
-
-struct IMPL_hashCode
-{
- size_t operator()(const ::rtl::OUString& sString) const
- {
- return sString.hashCode();
- }
-};
-
-typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< ::rtl::OUString ,
- IMPL_hashCode ,
- ::std::equal_to< ::rtl::OUString > > IMPL_ListenerContainerHelper ;
-
-/*-************************************************************************************************************//**
- @short -
- @descr -
-
- @implements XInterface
- XDispatchProvider
- XDispatch
- XPluginInstanceNotifySink
- @base OWeakObject
-
- @devstatus ready to use
-*//*-*************************************************************************************************************/
-
-class OPlugInFrameDispatcher : private ThreadHelpBase ,
- public ::cppu::WeakImplHelper3< ::com::sun::star::frame::XDispatchProvider, ::com::sun::star::frame::XDispatch, ::com::sun::star::mozilla::XPluginInstanceNotifySink >
-{
- //-------------------------------------------------------------------------------------------------------------
- // public methods
- //-------------------------------------------------------------------------------------------------------------
-
- public:
-
- static void AddArguments ( const css::uno::Sequence< css::beans::PropertyValue > & rArgs ,
- const ::rtl::OUString& rURL );
- static const css::uno::Sequence < css::beans::PropertyValue >* GetArguments ( const ::rtl::OUString& rURL );
- static void RemoveArguments ( const ::rtl::OUString& rURL );
-
- //---------------------------------------------------------------------------------------------------------
- // constructor / destructor
- //---------------------------------------------------------------------------------------------------------
-
- /*-****************************************************************************************************//**
- @short standard ctor
- @descr These initialize a new instance of ths class with needed informations for work.
-
- @seealso using at owner
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- OPlugInFrameDispatcher( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ,
- const css::uno::Reference< css::mozilla::XPluginInstance >& xOwner ,
- const css::uno::Reference< css::mozilla::XPluginInstancePeer >& xPlugInDLL );
-
- //---------------------------------------------------------------------------------------------------------
- // XDispatchProvider
- //---------------------------------------------------------------------------------------------------------
-
- /*-****************************************************************************************************//**
- @short search a dispatcher for given URL
- @descr If no interceptor is set on owner, we search for right frame and dispatch URL to it.
- If no frame was found, we do nothing.
-
- @seealso -
-
- @param "aURL" , URL to dispatch.
- @param "sTargetFrameName" , name of searched frame.
- @param "nSearchFlags" , flags for searching.
- @return A reference a dispatcher for these URL (if someone was found!).
-
- @onerror We return a NULL-reference.
- *//*-*****************************************************************************************************/
-
- virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL& aURL ,
- const ::rtl::OUString& sTargetFrameName ,
- sal_Int32 nSearchFlags ) throw( css::uno::RuntimeException );
-
- /*-****************************************************************************************************//**
- @short search dispatcher for more the one URL
- @descr Call this method, if you search dispatcher for more then one URL at the same time.
- ( But these mode is not supported yet! )
-
- @seealso -
-
- @param "seqDescripts", descriptor to search more then one dispatcher.
- @return A list of founded dispatcher. (if somewhere exist!)
-
- @onerror An empty list is returned.
- *//*-*****************************************************************************************************/
-
- virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& seqDescripts ) throw( css::uno::RuntimeException );
-
- //---------------------------------------------------------------------------------------------------------
- // XDispatch
- //---------------------------------------------------------------------------------------------------------
-
- /*-****************************************************************************************************//**
- @short dispatch URL with arguments
- @descr This class implement XDispatch interface to. We use the implementation of ouer owner
- directly to do this. He must support a function impl_loadComponent().
-
- @seealso methode <owner>::impl_loadComponent()
-
- @param "aURL" , URL to dispatch.
- @param "seqArguments" , list of optional arguments.
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- virtual void SAL_CALL dispatch( const css::util::URL& aURL ,
- const css::uno::Sequence< css::beans::PropertyValue >& seqArguments) throw( css::uno::RuntimeException );
-
- /*-****************************************************************************************************//**
- @short add listener for state events
- @descr -
-
- @seealso -
-
- @param "xControl" , reference to a valid listener for state events.
- @param "aURL" , URL about listener will be informed, if something occured.
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl,
- const css::util::URL& aURL ) throw( css::uno::RuntimeException );
-
- /*-****************************************************************************************************//**
- @short remove listener
- @descr -
-
- @seealso -
-
- @param "xControl" , reference to a valid listener.
- @param "aURL" , URL on which listener has registered.
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl,
- const css::util::URL& aURL ) throw( css::uno::RuntimeException );
-
- //---------------------------------------------------------------------------------------------------------
- // XPluginInstanceNotifySink
- //---------------------------------------------------------------------------------------------------------
-
- /*-****************************************************************************************************//**
- @short -
- @descr -
-
- @seealso -
-
- @param -
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- void SAL_CALL notifyURL( const ::rtl::OUString& sURL ) throw( css::uno::RuntimeException );
-
- //-------------------------------------------------------------------------------------------------------------
- // protected methods
- //-------------------------------------------------------------------------------------------------------------
-
- protected:
-
- /*-****************************************************************************************************//**
- @short standard destructor
- @descr This method destruct an instance of this class and clear some member.
- This method is protected, because its not allowed to use an instance of this class as a member!
- You MUST use a pointer.
-
- @seealso -
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- virtual ~OPlugInFrameDispatcher();
-
- //-------------------------------------------------------------------------------------------------------------
- // private methods
- //-------------------------------------------------------------------------------------------------------------
-
- private:
-
- /*-****************************************************************************************************//**
- @short -
- @descr -
-
- @seealso -
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- void impl_sendStatusEvent( const ::rtl::OUString& sURL ,
- sal_Bool bLoadingSuccessful );
-
- //-------------------------------------------------------------------------------------------------------------
- // debug methods
- // (should be private everyway!)
- //-------------------------------------------------------------------------------------------------------------
-
- /*-****************************************************************************************************//**
- @short debug-method to check incoming parameter of some other mehods of this class
- @descr The following methods are used to check parameters for other methods
- of this class. The return value is used directly for an ASSERT(...).
-
- @seealso ASSERTs in implementation!
-
- @param references to checking variables
- @return sal_False on invalid parameter<BR>
- sal_True otherway
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- #ifdef ENABLE_ASSERTIONS
-
- private:
-
- static sal_Bool impldbg_checkParameter_OPlugInFrameDispatcherCtor ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ,
- const css::uno::Reference< css::mozilla::XPluginInstance >& xOwner ,
- const css::uno::Reference< css::mozilla::XPluginInstancePeer >& xPlugInDLL );
- static sal_Bool impldbg_checkParameter_queryDispatch ( const css::util::URL& aURL ,
- const ::rtl::OUString& sTargetFrameName ,
- sal_Int32 nSearchFlags );
- static sal_Bool impldbg_checkParameter_queryDispatches ( const css::uno::Sequence< css::frame::DispatchDescriptor >& seqDescriptor );
- static sal_Bool impldbg_checkParameter_dispatch ( const css::util::URL& aURL ,
- const css::uno::Sequence< css::beans::PropertyValue >& seqArguments );
- static sal_Bool impldbg_checkParameter_addStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& xControl ,
- const css::util::URL& aURL );
- static sal_Bool impldbg_checkParameter_removeStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& xControl ,
- const css::util::URL& aURL );
- static sal_Bool impldbg_checkParameter_notifyURL ( const ::rtl::OUString& sURL );
-
- #endif // #ifdef ENABLE_ASSERTIONS
-
- //-------------------------------------------------------------------------------------------------------------
- // variables
- // (should be private everyway!)
- //-------------------------------------------------------------------------------------------------------------
-
- private:
-
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; /// servicemanager to create uno services
- css::uno::WeakReference< css::mozilla::XPluginInstance > m_xOwnerWeak ; /// weakreference to owner (Don't use a hard reference. Owner can't delete us then!)
- css::uno::Reference< css::mozilla::XPluginInstancePeer > m_xPlugInDLL ; /// Interface for communication with browser.
- ::rtl::OUString m_sTargetFrameName ; /// We need it as target for get/postURL.
- IMPL_ListenerContainerHelper m_aListenerContainer ; /// Container to combine listeners and URLs.
-
-}; // class OPlugInFrameDispatcher
-
-} // namespace framework
-
-#endif // #ifndef __FRAMEWORK_HELPER_OPLUGINFRAMEDISPATCHER_HXX_
diff --git a/framework/inc/interaction/stillinteraction.hxx b/framework/inc/interaction/quietinteraction.hxx
index bfa557d5ee..737802d513 100644
--- a/framework/inc/interaction/stillinteraction.hxx
+++ b/framework/inc/interaction/quietinteraction.hxx
@@ -28,8 +28,8 @@
*
************************************************************************/
-#ifndef __FRAMEWORK_INTERACTION_STILLINTERACTION_HXX_
-#define __FRAMEWORK_INTERACTION_STILLINTERACTION_HXX_
+#ifndef __FRAMEWORK_INTERACTION_QUIETINTERACTION_HXX_
+#define __FRAMEWORK_INTERACTION_QUIETINTERACTION_HXX_
//_________________________________________________________________________________________________________________
// my own includes
@@ -80,7 +80,7 @@ namespace framework{
@modified 12.07.2002 14:06
@by Andreas Schlüns
*/
-class StillInteraction : public css::lang::XTypeProvider
+class QuietInteraction : public css::lang::XTypeProvider
, public css::task::XInteractionHandler
, private ThreadHelpBase
, public ::cppu::OWeakObject
@@ -130,7 +130,7 @@ class StillInteraction : public css::lang::XTypeProvider
@threadsafe not neccessary
*/
- StillInteraction();
+ QuietInteraction();
//_________________________________
/**
diff --git a/framework/inc/services/desktop.hxx b/framework/inc/services/desktop.hxx
index 11ea93b50c..3e3fffaa7f 100644
--- a/framework/inc/services/desktop.hxx
+++ b/framework/inc/services/desktop.hxx
@@ -440,13 +440,8 @@ class Desktop : // interfaces
private:
static sal_Bool implcp_ctor ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
- static sal_Bool implcp_addTerminateListener ( const css::uno::Reference< css::frame::XTerminateListener >& xListener );
- static sal_Bool implcp_removeTerminateListener ( const css::uno::Reference< css::frame::XTerminateListener >& xListener );
- static sal_Bool implcp_findFrame ( const ::rtl::OUString& sTargetFrameName ,
- sal_Int32 nSearchFlags );
static sal_Bool implcp_addEventListener ( const css::uno::Reference< css::lang::XEventListener >& xListener );
static sal_Bool implcp_removeEventListener ( const css::uno::Reference< css::lang::XEventListener >& xListener );
- static sal_Bool implcp_statusChanged ( const css::frame::FeatureStateEvent& aEvent );
sal_Bool m_bIsTerminated ; /// check flag to protect us against dispose before terminate!
/// see dispose() for further informations!
diff --git a/framework/inc/services/frame.hxx b/framework/inc/services/frame.hxx
index 743de3c086..48402d5720 100644
--- a/framework/inc/services/frame.hxx
+++ b/framework/inc/services/frame.hxx
@@ -400,13 +400,6 @@ class Frame : // interfaces
static sal_Bool implcp_ctor ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
static sal_Bool implcp_setActiveFrame ( const css::uno::Reference< css::frame::XFrame >& xFrame );
- static sal_Bool implcp_initialize ( const css::uno::Reference< css::awt::XWindow >& xWindow );
- static sal_Bool implcp_setCreator ( const css::uno::Reference< css::frame::XFramesSupplier >& xCreator );
- static sal_Bool implcp_setName ( const ::rtl::OUString& sName );
- static sal_Bool implcp_findFrame ( const ::rtl::OUString& sTargetFrameName ,
- sal_Int32 nSearchFlags );
- static sal_Bool implcp_setComponent ( const css::uno::Reference< css::awt::XWindow >& xComponentWindow ,
- const css::uno::Reference< css::frame::XController >& xController );
static sal_Bool implcp_addFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener >& xListener );
static sal_Bool implcp_removeFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener >& xListener );
static sal_Bool implcp_addEventListener ( const css::uno::Reference< css::lang::XEventListener >& xListener );
diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx
index 7b4828676b..7df1747c7b 100644
--- a/framework/inc/services/layoutmanager.hxx
+++ b/framework/inc/services/layoutmanager.hxx
@@ -397,7 +397,6 @@ namespace framework
SingleRowColumnWindowData& rRowColumnWindowData );
::Point implts_findNextCascadeFloatingPos();
void implts_findNextDockingPos( ::com::sun::star::ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos );
- void implts_sortActiveElement( const UIElement& aElementData );
::com::sun::star::awt::Rectangle implts_calcDockingAreaSizes();
void implts_setDockingAreaWindowSizes( const com::sun::star::awt::Rectangle& rBorderSpace );
sal_Bool implts_doLayout( sal_Bool bForceRequestBorderSpace );
@@ -428,8 +427,9 @@ namespace framework
sal_Bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName );
void implts_notifyListeners( short nEvent, ::com::sun::star::uno::Any aInfoParam );
-
+#ifdef DBG_UTIL
void implts_checkElementContainer();
+#endif
DECL_LINK( OptionsChanged, void* );
DECL_LINK( SettingsChanged, void* );
diff --git a/framework/inc/services/license.hxx b/framework/inc/services/license.hxx
index fd99aa492b..ef498b10fa 100644
--- a/framework/inc/services/license.hxx
+++ b/framework/inc/services/license.hxx
@@ -91,7 +91,9 @@ namespace framework
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
+#if 0
DECL_STATIC_LINK( License, Terminate, void* );
+#endif
/*
XJob...
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index 44d0daeaef..0937ee0888 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -613,15 +613,6 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
}
//-----------------------------------------------
-sal_Bool PresetHandler::existsTarget(const ::rtl::OUString& sTarget) const
-{
- // SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
- return (m_lTargets.findConst(sTarget) != m_lTargets.end());
- // <- SAFE ----------------------------------
-}
-
-//-----------------------------------------------
void PresetHandler::copyPresetToTarget(const ::rtl::OUString& sPreset,
const ::rtl::OUString& sTarget)
{
diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx
index 973d3cbdc0..8ffa00a492 100644
--- a/framework/source/classes/fwktabwindow.cxx
+++ b/framework/source/classes/fwktabwindow.cxx
@@ -205,21 +205,6 @@ void FwkTabPage::Resize()
}
}
-// -----------------------------------------------------------------------
-
-void FwkTabPage::Reset()
-{
- CallMethod( BACK_METHOD );
- ActivatePage();
-}
-
-// -----------------------------------------------------------------------
-
-void FwkTabPage::Save()
-{
- CallMethod( OK_METHOD );
-}
-
// class FwkTabWindow ---------------------------------------------
FwkTabWindow::FwkTabWindow( Window* pParent ) :
@@ -416,13 +401,6 @@ void FwkTabWindow::RemovePage( sal_Int32 nIndex )
}
// -----------------------------------------------------------------------
-
-sal_Int32 FwkTabWindow::GetActivePageId() const
-{
- return m_aTabCtrl.GetCurPageId();
-}
-
-// -----------------------------------------------------------------------
void FwkTabWindow::Resize()
{
Size aPageSize = GetSizePixel();
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index f93613bcf9..b49c29e2c8 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -48,6 +48,7 @@
#include <com/sun/star/frame/CommandGroup.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
+#include <com/sun/star/document/XActionLockable.hpp>
#include "com/sun/star/beans/XFastPropertySet.hpp"
#include <toolkit/helper/vclunohelper.hxx>
@@ -171,7 +172,7 @@ void SAL_CALL CloseDispatcher::removeStatusListener(const css::uno::Reference< c
//-----------------------------------------------
void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL& aURL ,
- const css::uno::Sequence< css::beans::PropertyValue >& /*lArguments*/,
+ const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
throw(css::uno::RuntimeException)
{
@@ -236,7 +237,20 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL&
aWriteLock.unlock();
// <- SAFE ----------------------------------
- m_aAsyncCallback.Post(0);
+ sal_Bool bIsSynchron = sal_False;
+ for (sal_Int32 nArgs=0; nArgs<lArguments.getLength(); nArgs++ )
+ {
+ if ( lArguments[nArgs].Name.equalsAscii("SynchronMode") )
+ {
+ lArguments[nArgs].Value >>= bIsSynchron;
+ break;
+ }
+ }
+
+ if ( bIsSynchron )
+ impl_asyncCallback(0);
+ else
+ m_aAsyncCallback.Post(0);
}
//-----------------------------------------------
@@ -540,6 +554,10 @@ sal_Bool CloseDispatcher::implts_establishBackingMode()
if (!xFrame.is())
return sal_False;
+ css::uno::Reference < css::document::XActionLockable > xLock( xFrame, css::uno::UNO_QUERY );
+ if ( xLock.is() && xLock->isActionLocked() )
+ return sal_False;
+
css::uno::Reference< css::awt::XWindow > xContainerWindow = xFrame->getContainerWindow();
css::uno::Sequence< css::uno::Any > lArgs(1);
lArgs[0] <<= xContainerWindow;
diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx
index 4c98599484..1dfee32e85 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -47,7 +47,7 @@
#include <pattern/window.hxx>
#include <threadhelp/transactionguard.hxx>
#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/writeguard.hxx>
#include <dispatchcommands.h>
#include <protocols.h>
#include <services.h>
@@ -224,24 +224,13 @@ css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL Disp
return lDispatcher;
}
-//_________________________________________________________________________________________________________________
-
-::sal_Bool lcl_isCloseDispatch (const css::util::URL& aURL)
-{
- return (
- (aURL.Complete.equals(CMD_UNO_CLOSEDOC )) ||
- (aURL.Complete.equals(CMD_UNO_CLOSEWIN )) ||
- (aURL.Complete.equals(CMD_UNO_CLOSEFRAME))
- );
-}
-
-//_________________________________________________________________________________________________________________
-
-::sal_Bool lcl_isStartModuleDispatch (const css::util::URL& aURL)
-{
- return (aURL.Complete.equals(CMD_UNO_SHOWSTARTMODULE));
-}
-
+//_________________________________________________________________________________________________________________
+
+::sal_Bool lcl_isStartModuleDispatch (const css::util::URL& aURL)
+{
+ return (aURL.Complete.equals(CMD_UNO_SHOWSTARTMODULE));
+}
+
//_________________________________________________________________________________________________________________
/**
@@ -296,10 +285,10 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryDeskt
if (sTargetFrameName==SPECIALTARGET_DEFAULT)
{
if (implts_isLoadableContent(aURL))
- xDispatcher = implts_getOrCreateDispatchHelper( E_DEFAULTDISPATCHER, xDesktop );
-
- if (lcl_isStartModuleDispatch(aURL))
- xDispatcher = implts_getOrCreateDispatchHelper( E_STARTMODULEDISPATCHER, xDesktop );
+ xDispatcher = implts_getOrCreateDispatchHelper( E_DEFAULTDISPATCHER, xDesktop );
+
+ if (lcl_isStartModuleDispatch(aURL))
+ xDispatcher = implts_getOrCreateDispatchHelper( E_STARTMODULEDISPATCHER, xDesktop );
}
//-----------------------------------------------------------------------------------------------------
@@ -772,7 +761,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
CloseDispatcher* pDispatcher = new CloseDispatcher( xFactory, xOwner, sTarget );
xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
}
- break;
+ break;
case E_STARTMODULEDISPATCHER :
{
diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx
index 5fd964341d..c7282fbcc9 100644
--- a/framework/source/dispatch/menudispatcher.cxx
+++ b/framework/source/dispatch/menudispatcher.cxx
@@ -445,26 +445,6 @@ sal_Bool MenuDispatcher::impldbg_checkParameter_MenuDispatcher( const uno::R
}
//*****************************************************************************************************************
-// We don't know anything about right values of aURL and seqArguments!
-// Check valid references only.
-sal_Bool MenuDispatcher::impldbg_checkParameter_dispatch( const URL& aURL ,
- const Sequence< PropertyValue >& seqArguments)
-{
- // Set default return value.
- sal_Bool bOK = sal_True;
- // Check parameter.
- if (
- ( &aURL == NULL ) ||
- ( &seqArguments == NULL )
- )
- {
- bOK = sal_False ;
- }
- // Return result of check.
- return bOK ;
-}
-
-//*****************************************************************************************************************
// We need a valid URL. What is meaning with "register for nothing"?!
// xControl must correct to - nobody can advised otherwise!
sal_Bool MenuDispatcher::impldbg_checkParameter_addStatusListener( const uno::Reference< XStatusListener >& xControl,
diff --git a/framework/source/inc/accelerators/presethandler.hxx b/framework/source/inc/accelerators/presethandler.hxx
index 9b00760d97..4b226b106b 100644
--- a/framework/source/inc/accelerators/presethandler.hxx
+++ b/framework/source/inc/accelerators/presethandler.hxx
@@ -356,8 +356,6 @@ class PresetHandler : private ThreadHelpBase // attention! Must be the first bas
const css::uno::Reference< css::embed::XStorage >& xDocumentRoot ,
const ::comphelper::Locale& aLocale = ::comphelper::Locale(::comphelper::Locale::X_NOTRANSLATE()));
- sal_Bool existsTarget(const ::rtl::OUString& sTarget) const;
-
//---------------------------------------
/** @short try to copy the specified preset from the share
layer to the user layer and establish it as the
diff --git a/framework/source/inc/loadenv/loadenv.hxx b/framework/source/inc/loadenv/loadenv.hxx
index 9952a2cd8d..ed73c0a859 100644
--- a/framework/source/inc/loadenv/loadenv.hxx
+++ b/framework/source/inc/loadenv/loadenv.hxx
@@ -67,7 +67,7 @@
namespace framework{
namespace css = ::com::sun::star;
-
+class QuietInteraction;
//_______________________________________________
// definitions
@@ -232,6 +232,8 @@ class LoadEnv : private ThreadHelpBase
/** TODO document me ... */
void* m_pCheck;
+ QuietInteraction* m_pQuietInteraction;
+
//___________________________________________
// native interface
diff --git a/framework/source/interaction/makefile.mk b/framework/source/interaction/makefile.mk
index 1399335b6c..4ae3564c21 100644
--- a/framework/source/interaction/makefile.mk
+++ b/framework/source/interaction/makefile.mk
@@ -45,7 +45,7 @@ CDEFS+=-DCOMPMOD_NAMESPACE=framework
# --- Generate -----------------------------------------------------
-SLOFILES= $(SLO)$/stillinteraction.obj \
+SLOFILES= $(SLO)$/quietinteraction.obj \
$(SLO)$/preventduplicateinteraction.obj
# --- Targets ------------------------------------------------------
diff --git a/framework/source/interaction/stillinteraction.cxx b/framework/source/interaction/quietinteraction.cxx
index af6268d407..83c7675b26 100644
--- a/framework/source/interaction/stillinteraction.cxx
+++ b/framework/source/interaction/quietinteraction.cxx
@@ -1,12 +1,12 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: stillinteraction.cxx,v $
+ * $RCSfile: QuietInteraction.cxx,v $
* $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_framework.hxx"
-#include "interaction/stillinteraction.hxx"
+#include "interaction/quietinteraction.hxx"
//_________________________________________________________________________________________________________________
// my own includes
@@ -77,18 +77,18 @@ namespace framework{
// exported definitions
//_________________________________________________________________________________________________________________
-DEFINE_XINTERFACE_2( StillInteraction ,
+DEFINE_XINTERFACE_2( QuietInteraction ,
OWeakObject ,
DIRECT_INTERFACE(css::lang::XTypeProvider ) ,
DIRECT_INTERFACE(css::task::XInteractionHandler) )
-DEFINE_XTYPEPROVIDER_2( StillInteraction ,
+DEFINE_XTYPEPROVIDER_2( QuietInteraction ,
css::lang::XTypeProvider ,
css::task::XInteractionHandler )
//_________________________________________________________________________________________________________________
-StillInteraction::StillInteraction()
+QuietInteraction::QuietInteraction()
: ThreadHelpBase ( &Application::GetSolarMutex() )
, ::cppu::OWeakObject( )
, m_aRequest ( )
@@ -97,7 +97,7 @@ StillInteraction::StillInteraction()
//_________________________________________________________________________________________________________________
-void SAL_CALL StillInteraction::handle( const css::uno::Reference< css::task::XInteractionRequest >& xRequest ) throw( css::uno::RuntimeException )
+void SAL_CALL QuietInteraction::handle( const css::uno::Reference< css::task::XInteractionRequest >& xRequest ) throw( css::uno::RuntimeException )
{
// safe the request for outside analyzing everytime!
css::uno::Any aRequest = xRequest->getRequest();
@@ -172,7 +172,7 @@ void SAL_CALL StillInteraction::handle( const css::uno::Reference< css::task::XI
//_________________________________________________________________________________________________________________
-css::uno::Any StillInteraction::getRequest() const
+css::uno::Any QuietInteraction::getRequest() const
{
/* SAFE { */
ReadGuard aReadLock(m_aLock);
@@ -182,7 +182,7 @@ css::uno::Any StillInteraction::getRequest() const
//_________________________________________________________________________________________________________________
-sal_Bool StillInteraction::wasUsed() const
+sal_Bool QuietInteraction::wasUsed() const
{
/* SAFE { */
ReadGuard aReadLock(m_aLock);
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 3ea3d2759d..f4d4f2ce7e 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -3068,11 +3068,6 @@ void LayoutManager::implts_renumberRowColumnData(
return aSize;
}
-void LayoutManager::implts_sortActiveElement( const UIElement& )
-{
- implts_sortUIElements();
-}
-
Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString& aName )
{
Reference< ::com::sun::star::ui::XUIElement > xUIElement;
@@ -7038,6 +7033,7 @@ IMPL_LINK( LayoutManager, AsyncLayoutHdl, Timer *, EMPTYARG )
return 0;
}
+#ifdef DBG_UTIL
void LayoutManager::implts_checkElementContainer()
{
#ifdef DBG_UTIL
@@ -7062,6 +7058,7 @@ void LayoutManager::implts_checkElementContainer()
} // for ( ; pCheckIter != aUIElementHash.end(); pCheckIter++ )
#endif
}
+#endif
//---------------------------------------------------------------------------------------------------------
// XFrameActionListener
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 902a5a970f..ed86195618 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -55,7 +55,7 @@
#ifndef __FRAMEWORK_CONSTANT_CONTAINERQUERY_HXX_
#include <constant/containerquery.hxx>
#endif
-#include <interaction/stillinteraction.hxx>
+#include <interaction/quietinteraction.hxx>
#include <threadhelp/writeguard.hxx>
#include <threadhelp/readguard.hxx>
#include <threadhelp/resetableguard.hxx>
@@ -172,6 +172,7 @@ LoadEnv::LoadEnv(const css::uno::Reference< css::lang::XMultiServiceFactory >& x
: ThreadHelpBase( )
, m_xSMGR (xSMGR)
, m_pCheck (this )
+ , m_pQuietInteraction( 0 )
{
}
@@ -348,8 +349,9 @@ void LoadEnv::initializeLoading(const ::rtl::OUString&
{
nMacroMode = css::document::MacroExecMode::NEVER_EXECUTE;
nUpdateMode = css::document::UpdateDocMode::NO_UPDATE;
- StillInteraction* pInteraction = new StillInteraction();
- xInteractionHandler = css::uno::Reference< css::task::XInteractionHandler >(static_cast< css::task::XInteractionHandler* >(pInteraction), css::uno::UNO_QUERY);
+ m_pQuietInteraction = new QuietInteraction();
+ m_pQuietInteraction->acquire();
+ xInteractionHandler = css::uno::Reference< css::task::XInteractionHandler >(static_cast< css::task::XInteractionHandler* >(m_pQuietInteraction), css::uno::UNO_QUERY);
}
if (
@@ -1660,8 +1662,7 @@ void LoadEnv::impl_reactForLoadingState()
m_xTargetFrame->setName(sFrameName);
}
}
- else
- if (m_bReactivateControllerOnError)
+ else if (m_bReactivateControllerOnError)
{
// Try to reactivate the old document (if any exists!)
css::uno::Reference< css::frame::XController > xOldDoc = m_xTargetFrame->getController();
@@ -1677,8 +1678,7 @@ void LoadEnv::impl_reactForLoadingState()
m_bReactivateControllerOnError = sal_False;
}
}
- else
- if (m_bCloseFrameOnError)
+ else if (m_bCloseFrameOnError)
{
// close empty frames
css::uno::Reference< css::util::XCloseable > xCloseable (m_xTargetFrame, css::uno::UNO_QUERY);
@@ -1712,7 +1712,25 @@ void LoadEnv::impl_reactForLoadingState()
// Otherwhise it hold a might existing stream open!
m_lMediaDescriptor.clear();
+ css::uno::Any aRequest;
+ bool bThrow = false;
+ if ( !m_bLoaded && m_pQuietInteraction && m_pQuietInteraction->wasUsed() )
+ {
+ aRequest = m_pQuietInteraction->getRequest();
+ m_pQuietInteraction->release();
+ m_pQuietInteraction = 0;
+ bThrow = true;
+ }
+
aReadLock.unlock();
+
+ if (bThrow)
+ {
+ css::uno::Exception aEx;
+ if ( aRequest >>= aEx )
+ throw LoadEnvException( LoadEnvException::ID_GENERAL_ERROR, aEx );
+ }
+
// <- SAFE ----------------------------------
}
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 679554eabc..fd983ed492 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -2016,47 +2016,6 @@ sal_Bool Desktop::implcp_ctor( const css::uno::Reference< css::lang::XMultiServi
//*****************************************************************************************************************
// We work with valid listener only.
-sal_Bool Desktop::implcp_addTerminateListener( const css::uno::Reference< css::frame::XTerminateListener >& xListener )
-{
- return(
- ( &xListener == NULL ) ||
- ( xListener.is() == sal_False )
- );
-}
-
-//*****************************************************************************************************************
-// We work with valid listener only.
-sal_Bool Desktop::implcp_removeTerminateListener( const css::uno::Reference< css::frame::XTerminateListener >& xListener )
-{
- return(
- ( &xListener == NULL ) ||
- ( xListener.is() == sal_False )
- );
-}
-
-//*****************************************************************************************************************
-// The target frame could be ""(!), but flags must be in range of right enum.
-sal_Bool Desktop::implcp_findFrame( const ::rtl::OUString& sTargetFrameName,
- sal_Int32 nSearchFlags )
-{
- return(
- ( &sTargetFrameName == NULL ) ||
- (
- ( nSearchFlags != css::frame::FrameSearchFlag::AUTO ) &&
- ( !( nSearchFlags & css::frame::FrameSearchFlag::PARENT ) ) &&
- ( !( nSearchFlags & css::frame::FrameSearchFlag::SELF ) ) &&
- ( !( nSearchFlags & css::frame::FrameSearchFlag::CHILDREN ) ) &&
- ( !( nSearchFlags & css::frame::FrameSearchFlag::CREATE ) ) &&
- ( !( nSearchFlags & css::frame::FrameSearchFlag::SIBLINGS ) ) &&
- ( !( nSearchFlags & css::frame::FrameSearchFlag::TASKS ) ) &&
- ( !( nSearchFlags & css::frame::FrameSearchFlag::ALL ) ) &&
- ( !( nSearchFlags & css::frame::FrameSearchFlag::GLOBAL ) )
- )
- );
-}
-
-//*****************************************************************************************************************
-// We work with valid listener only.
sal_Bool Desktop::implcp_addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener )
{
return(
@@ -2075,15 +2034,6 @@ sal_Bool Desktop::implcp_removeEventListener( const css::uno::Reference< css::la
);
}
-//*****************************************************************************************************************
-sal_Bool Desktop::implcp_statusChanged( const css::frame::FeatureStateEvent& aEvent )
-{
- return(
- ( &aEvent == NULL ) ||
- ( aEvent.FeatureDescriptor.getLength() < 1 )
- );
-}
-
#endif // #ifdef ENABLE_ASSERTIONS
} // namespace framework
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index f6e55c671c..1d63a503b2 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -3243,50 +3243,6 @@ sal_Bool Frame::implcp_setActiveFrame( const css::uno::Reference< css::frame::XF
}
//*****************************************************************************************************************
-// We don't accept null pointer ... but NULL-References are allowed!
-sal_Bool Frame::implcp_initialize( const css::uno::Reference< css::awt::XWindow >& xWindow )
-{
- return( &xWindow == NULL );
-}
-
-//*****************************************************************************************************************
-// We don't accept null pointer or references!
-sal_Bool Frame::implcp_setCreator( const css::uno::Reference< css::frame::XFramesSupplier >& xCreator )
-{
- return (
- ( &xCreator == NULL ) ||
- ( xCreator.is() == sal_False )
- );
-}
-
-//*****************************************************************************************************************
-// We don't accept null pointer or references!
-sal_Bool Frame::implcp_setName( const ::rtl::OUString& sName )
-{
- return( &sName == NULL );
-}
-
-//*****************************************************************************************************************
-// We don't accept null pointer or references!
-// An empty target name is allowed => is the same like "_self"
-sal_Bool Frame::implcp_findFrame( const ::rtl::OUString& sTargetFrameName,
- sal_Int32 /*nSearchFlags*/ )
-{
- return( &sTargetFrameName == NULL );
-}
-
-//*****************************************************************************************************************
-// We don't accept null pointer!
-sal_Bool Frame::implcp_setComponent( const css::uno::Reference< css::awt::XWindow >& xComponentWindow ,
- const css::uno::Reference< css::frame::XController >& xController )
-{
- return (
- ( &xComponentWindow == NULL ) ||
- ( &xController == NULL )
- );
-}
-
-//*****************************************************************************************************************
sal_Bool Frame::implcp_addFrameActionListener( const css::uno::Reference< css::frame::XFrameActionListener >& xListener )
{
return (
diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx
index 0627707de0..c34d7908d1 100644
--- a/framework/source/services/license.cxx
+++ b/framework/source/services/license.cxx
@@ -167,7 +167,7 @@ DEFINE_INIT_SERVICE ( License,
)
-
+#if 0
IMPL_STATIC_LINK_NOINSTANCE( License, Terminate, void*, EMPTYARG )
{
/*
@@ -182,6 +182,7 @@ IMPL_STATIC_LINK_NOINSTANCE( License, Terminate, void*, EMPTYARG )
*/
return 0;
}
+#endif
static DateTime _oslDateTimeToDateTime(const oslDateTime& aDateTime)
{
diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk
index 61d0da2a4c..60a44dba70 100644
--- a/framework/util/makefile.mk
+++ b/framework/util/makefile.mk
@@ -316,7 +316,7 @@ SHL4OBJS= \
$(SLO)$/statusindicatorfactory.obj \
$(SLO)$/statusindicatorinterfacewrapper.obj \
$(SLO)$/statusindicator.obj \
- $(SLO)$/stillinteraction.obj \
+ $(SLO)$/quietinteraction.obj \
$(SLO)$/storageholder.obj \
$(SLO)$/substitutepathvars.obj \
$(SLO)$/tagwindowasmodified.obj \
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index dfa60d043d..4c9d9bb089 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,50 +44,31 @@
#ifdef IDL_COMPILER
/************************************************************************/
static BOOL ReadRangeSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm,
- long nMin, ULONG nMax, long * pValue )
+ ULONG nMin, ULONG nMax, ULONG* pValue )
{
UINT32 nTokPos = rInStm.Tell();
SvToken * pTok = rInStm.GetToken_Next();
-
if( pTok->Is( pName ) )
{
- BOOL bOk = TRUE;
- BOOL bBraket = rInStm.Read( '(' );
- if( bBraket || rInStm.Read( '=' ) )
+ BOOL bOk = FALSE;
+ if( rInStm.Read( '=' ) )
{
- short nSign = 1;
pTok = rInStm.GetToken_Next();
- if( pTok->IsChar() && pTok->GetChar() == '-' )
- {
- nSign = -1;
- pTok = rInStm.GetToken_Next();
- }
- else if( pTok->IsChar() && pTok->GetChar() == '+' )
- pTok = rInStm.GetToken_Next();
-
if( pTok->IsInteger() )
{
ULONG n = pTok->GetNumber();
- if( nSign == -1 || n <= nMax )
- { // nicht ueber dem Maximum
- if( (nSign == -1 && n < 0x8000000
- && -(long)n >= nMin)
- || ( (nSign == 1 && n >= 0x8000000) || (long)n > nMin) )
- {
- *pValue = (long)n;
- }
- else
- bOk = FALSE;
+ if ( n >= nMin && n <= nMax )
+ {
+ *pValue = n;
+ bOk = TRUE;
}
- if( bOk && bBraket )
- bOk = rInStm.Read( ')' );
}
- else
- bOk = pTok->IsChar() && pTok->GetChar() == ')';
}
+
if( bOk )
return TRUE;
}
+
rInStm.Seek( nTokPos );
return FALSE;
}
@@ -590,7 +571,7 @@ BOOL SvUUId::WriteSvIdl( SvStream & rOutStm )
*************************************************************************/
BOOL SvVersion::ReadSvIdl( SvTokenStream & rInStm )
{
- long n = 0;
+ ULONG n = 0;
UINT32 nTokPos = rInStm.Tell();
if( ReadRangeSvIdl( SvHash_Version(), rInStm, 0 , 0xFFFF, &n ) )
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 9bae4b7478..861b809127 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -93,7 +93,7 @@ char const * SyntaxStrings[] = {
"\t\tAccelConfig, MenuConfig, StatusBarConfig, ToolbarConfig",
"\t\tAutomation*",
"\t\tAutoUpdate",
-"\t\tCachable*, Volatile",
+// "\t\tCachable*, Volatile",
"\t\tContainer",
"\t\tDefault = Identifier",
"\t\tExecMethod = Identifier",
diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx
index ec62d29120..8e75479346 100644
--- a/idl/source/prj/globals.cxx
+++ b/idl/source/prj/globals.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -132,7 +132,7 @@ SvGlobalHashNames::SvGlobalHashNames()
, MM_SlotId( INS( "SlotId" ) )
, MM_HasCoreId( INS( "HasCoreId" ) )
, MM_Cachable( INS( "Cachable" ) )
- , MM_Volatile( INS( "Volatile" ) )
+// , MM_Volatile( INS( "Volatile" ) )
, MM_Toggle( INS( "Toggle" ) )
, MM_AutoUpdate( INS( "AutoUpdate" ) )
, MM_Synchron( INS( "Synchron" ) )
diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index e8aae4006f..6b04763a57 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -1245,7 +1245,7 @@
</node>
<node oor:name="V_SHIFT_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
- <value xml:lang="en-US">.uno:PasteClipboard</value>
+ <value xml:lang="en-US">.uno:PasteSpecial</value>
</prop>
</node>
<node oor:name="X_MOD1" oor:op="replace">
@@ -2212,7 +2212,7 @@
</node>
<node oor:name="V_SHIFT_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
- <value xml:lang="en-US">.uno:PasteClipboard</value>
+ <value xml:lang="en-US">.uno:PasteSpecial</value>
</prop>
</node>
<node oor:name="X_MOD1" oor:op="replace">
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index f8e9d43191..b4d7127a2c 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -651,7 +651,7 @@
<value xml:lang="en-US">~Page...</value>
</prop>
</node>
- <node oor:name=".uno:PasteClipboard" oor:op="replace">
+ <node oor:name=".uno:PasteSpecial" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Paste ~Special...</value>
diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx
index e33a3f89a9..ce84acd12a 100644
--- a/sfx2/inc/sfx2/dinfdlg.hxx
+++ b/sfx2/inc/sfx2/dinfdlg.hxx
@@ -417,12 +417,14 @@ private:
ImageButton m_aRemoveButton;
sal_Int32 m_nLineHeight;
+ sal_Int32 m_nScrollPos;
SvtSysLocale m_aSysLocale;
std::vector< CustomPropertyLine* > m_aCustomPropertiesLines;
CustomPropertyLine* m_pCurrentLine;
SvNumberFormatter m_aNumberFormatter;
Timer m_aEditLoseFocusTimer;
Timer m_aBoxLoseFocusTimer;
+ Link m_aRemovedHdl;
DECL_LINK( TypeHdl, CustomPropertiesTypeBox* );
DECL_LINK( RemoveHdl, CustomPropertiesRemoveButton* );
@@ -449,6 +451,7 @@ public:
bool DoesCustomPropertyExist( const String& rName ) const;
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
GetCustomProperties() const;
+ void SetRemovedHdl( const Link& rLink ) { m_aRemovedHdl = rLink; }
};
// class CustomPropertiesControl -----------------------------------------
@@ -466,12 +469,13 @@ private:
void Initialize();
DECL_LINK( ScrollHdl, ScrollBar* );
+ DECL_LINK( RemovedHdl, void* );
public:
CustomPropertiesControl( Window* pParent, const ResId& rResId );
~CustomPropertiesControl();
- void AddLine( const ::rtl::OUString& sName, com::sun::star::uno::Any& rAny );
+ void AddLine( const ::rtl::OUString& sName, com::sun::star::uno::Any& rAny, bool bInteractive );
inline bool AreAllLinesValid() const { return m_aPropertiesWin.AreAllLinesValid(); }
inline void ClearAllLines() { m_aPropertiesWin.ClearAllLines(); }
diff --git a/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx
index 9c3d022983..60255b4b21 100644
--- a/sfx2/inc/sfx2/event.hxx
+++ b/sfx2/inc/sfx2/event.hxx
@@ -34,6 +34,8 @@
#include "sfx2/dllapi.h"
#include <tools/string.hxx>
#include <svtools/hint.hxx>
+#include <svtools/eventcfg.hxx>
+#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -44,33 +46,24 @@ class SfxObjectShell;
class SFX2_DLLPUBLIC SfxEventHint : public SfxHint
{
- USHORT nEventId;
SfxObjectShell* pObjShell;
- String _aArgs;
- BOOL _bDummy;
- BOOL _bAddToHistory;
+ ::rtl::OUString aEventName;
+ USHORT nEventId;
public:
TYPEINFO();
- SfxEventHint( USHORT nId,
- const String& rArgs,
- SfxObjectShell *pObj = 0 )
- : nEventId(nId),
- pObjShell(pObj),
- _aArgs( rArgs ),
- _bAddToHistory(FALSE)
- {}
- SfxEventHint( USHORT nId, SfxObjectShell *pObj = 0 )
- : nEventId(nId),
- pObjShell(pObj),
- _bAddToHistory(FALSE)
+ SfxEventHint( USHORT nId, const ::rtl::OUString& aName, SfxObjectShell *pObj = 0 )
+ : pObjShell(pObj),
+ aEventName(aName),
+ nEventId(nId)
{}
- const String& GetArgs() const { return _aArgs;}
-
USHORT GetEventId() const
{ return nEventId; }
+ ::rtl::OUString GetEventName() const
+ { return aEventName; }
+
SfxObjectShell* GetObjShell() const
{ return pObjShell; }
};
@@ -82,8 +75,6 @@ class SfxNamedHint : public SfxHint
String _aEventName;
SfxObjectShell* _pObjShell;
String _aArgs;
- BOOL _bDummy;
- BOOL _bAddToHistory;
public:
TYPEINFO();
@@ -93,15 +84,13 @@ public:
SfxObjectShell *pObj = 0 )
: _aEventName( rName ),
_pObjShell( pObj),
- _aArgs( rArgs ),
- _bAddToHistory( FALSE )
+ _aArgs( rArgs )
{}
SfxNamedHint( const String& rName,
SfxObjectShell *pObj = 0 )
: _aEventName( rName ),
- _pObjShell( pObj ),
- _bAddToHistory( FALSE )
+ _pObjShell( pObj )
{}
const String& GetArgs() const { return _aArgs;}
diff --git a/sfx2/inc/sfx2/evntconf.hxx b/sfx2/inc/sfx2/evntconf.hxx
index e7038ba2f7..d228f4e4d6 100644
--- a/sfx2/inc/sfx2/evntconf.hxx
+++ b/sfx2/inc/sfx2/evntconf.hxx
@@ -118,36 +118,9 @@ public:
class SFX2_DLLPUBLIC SfxEventConfiguration
{
-friend class SfxEventConfigItem_Impl;
-
- SvxMacroTableDtor* pAppTable;
- SvxMacroTableDtor* pDocTable;
- sal_Bool bIgnoreConfigure;
-
public:
- SfxEventConfiguration();
- ~SfxEventConfiguration();
-
- void ConfigureEvent(USHORT nId, const SvxMacro&,
- SfxObjectShell* pObjSh);
- void ConfigureEvent(USHORT nId, const String& rMacro,
- SfxObjectShell* pObjSh);
-
- SvxMacroTableDtor* GetDocEventTable(SfxObjectShell*);
-
- static void RegisterEvent( USHORT nId, const String& rName,
- const String& rMacroName );
-
- SAL_DLLPRIVATE BOOL Warn_Impl( SfxObjectShell *pDoc, const SvxMacro* pMacro );
- SAL_DLLPRIVATE void PropagateEvent_Impl( SfxObjectShell *pDoc,
- USHORT nId,
- const SvxMacro* pMacro );
- SAL_DLLPRIVATE static rtl::OUString GetEventName_Impl( ULONG nID );
- SAL_DLLPRIVATE static ULONG GetEventId_Impl( const rtl::OUString& rEventName );
- SAL_DLLPRIVATE ::com::sun::star::uno::Any CreateEventData_Impl( const SvxMacro *pMacro );
-
- SAL_DLLPRIVATE static ULONG GetPos_Impl( USHORT nID, sal_Bool &rFound );
- SAL_DLLPRIVATE static ULONG GetPos_Impl( const String& rName, sal_Bool &rFound );
+ static void ConfigureEvent( ::rtl::OUString aName, const SvxMacro&, SfxObjectShell* pObjSh);
+ static SvxMacro* ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, BOOL bBlowUp );
};
#endif
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index a2c1e1eb68..d9996b0d4b 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -734,7 +734,7 @@ public:
const ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation >& aInfos );
SAL_DLLPRIVATE void CheckEncryption_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler );
- SAL_DLLPRIVATE static SEQUENCE< OUSTRING > GetEventNames_Impl();
+ SAL_DLLPRIVATE SEQUENCE< OUSTRING > GetEventNames_Impl();
SAL_DLLPRIVATE void InitBasicManager_Impl();
SAL_DLLPRIVATE SfxObjectShell_Impl* Get_Impl() { return pImp; }
diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
index 385a2d889c..ce6b09adbb 100644
--- a/sfx2/inc/sfx2/sfx.hrc
+++ b/sfx2/inc/sfx2/sfx.hrc
@@ -111,6 +111,9 @@
#define SFX_EVENT_SAVEDOCFAILED (EVENT_SFX_START + 28)
#define SFX_EVENT_SAVETODOCFAILED (EVENT_SFX_START + 29)
+#define SFX_EVENT_TITLECHANGED (EVENT_SFX_START + 30)
+#define SFX_EVENT_MODECHANGED (EVENT_SFX_START + 31)
+
// Events f"ur Controls etc.
#define SFX_EVENT_MOUSEOVER_OBJECT ( EVENT_SFX_START + 100 )
#define SFX_EVENT_MOUSECLICK_OBJECT ( EVENT_SFX_START + 101 )
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx
index 175e8afb74..e6d68889e4 100644
--- a/sfx2/inc/sfx2/sfxbasemodel.hxx
+++ b/sfx2/inc/sfx2/sfxbasemodel.hxx
@@ -1513,7 +1513,7 @@ private:
SAL_DLLPRIVATE void impl_store( const OUSTRING& sURL ,
const SEQUENCE< PROPERTYVALUE >& seqArguments ,
sal_Bool bSaveTo ) ;
- SAL_DLLPRIVATE void postEvent_Impl( ULONG nEventID );
+ SAL_DLLPRIVATE void postEvent_Impl( ::rtl::OUString );
SAL_DLLPRIVATE String getEventName_Impl( long nID );
SAL_DLLPRIVATE void NotifyStorageListeners_Impl();
SAL_DLLPRIVATE bool QuerySaveSizeExceededModules( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler );
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 2a68235f7f..09a9849d7c 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -140,8 +140,10 @@
//#define SID_TITLE (SID_SFX_START + 307)
#define SID_CONTEXT (SID_SFX_START + 310)
-#define SID_CURRENTTIME (SID_SFX_START + 311)
-#define SID_CURRENTDATE (SID_SFX_START + 312)
+
+#define SID_PASTE_SPECIAL (SID_SFX_START + 311)
+#define SID_CLIPBOARD_FORMAT_ITEMS (SID_SFX_START + 312)
+
#define SID_VERSION_VISIBLE (SID_SFX_START + 313)
#define SID_PASTE_UNFORMATTED (SID_SFX_START + 314)
#define SID_PRINTER_NOTFOUND_WARN (SID_SFX_START + 320)
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index 0750f8592d..ae45545cba 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -38,6 +38,7 @@
#include <com/sun/star/uno/Reference.h>
#include <svtools/lstner.hxx>
#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp>
#include <cppuhelper/interfacecontainer.hxx>
#include "shell.hxx"
#include <tools/gen.hxx>
@@ -77,6 +78,9 @@ class NotifyEvent;
#define SFX_PRINTER_CHG_ORIENTATION_FLAG 3
#define SFX_PRINTER_CHG_SIZE_FLAG 4
+#define SFX_PRINTERROR_NONE 0
+#define SFX_PRINTERROR_BUSY 1
+
enum SfxScrollingMode
{
SCROLLING_NO,
@@ -302,6 +306,8 @@ public:
void SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
+ void AddRemoveClipboardListener( const com::sun::star::uno::Reference < com::sun::star::datatransfer::clipboard::XClipboardListener>&, BOOL );
+
#if _SOLAR__PRIVATE
SAL_DLLPRIVATE SfxInPlaceClient* GetUIActiveIPClient_Impl() const;
SAL_DLLPRIVATE void AddContextMenuInterceptor_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::ui::XContextMenuInterceptor >& xInterceptor );
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index 61b897bace..5da69fa977 100644
--- a/sfx2/sdi/appslots.sdi
+++ b/sfx2/sdi/appslots.sdi
@@ -92,14 +92,6 @@ interface Application
ExecMethod = MiscExec_Impl ;
StateMethod = MiscState_Impl ;
]
- SID_CURRENTTIME // ole(no) api(final/play/norec)
- [
- StateMethod = MiscState_Impl ;
- ]
- SID_CURRENTDATE // ole(no) api(final/play/norec)
- [
- StateMethod = MiscState_Impl ;
- ]
SID_LOADCONFIG // ole(no) api(final/play)
[
ExecMethod = MiscExec_Impl ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index db625a9386..26f55ccdd1 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -853,7 +853,7 @@ SfxBoolItem BrowseView SID_BROWSER_MODE
[
/* flags: */
AutoUpdate = TRUE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -1041,7 +1041,7 @@ SfxVoidItem ClearHistory SID_CLEARHISTORY
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -1447,60 +1447,6 @@ SfxVoidItem CreateMacro SID_BASICIDE_CREATEMACRO
]
//--------------------------------------------------------------------------
-SfxStringItem CurrentDate SID_CURRENTDATE
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Volatile,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = TRUE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = TRUE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-//--------------------------------------------------------------------------
-SfxStringItem CurrentTime SID_CURRENTTIME
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Volatile,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = TRUE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = TRUE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-//--------------------------------------------------------------------------
SfxStringItem CurrentURL SID_CURRENT_URL
[
@@ -1842,7 +1788,7 @@ SfxBoolItem EditDoc SID_EDITDOC
[
/* flags: */
AutoUpdate = TRUE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -4287,7 +4233,7 @@ SfxBoolItem Modified SID_MODIFIED
[
/* flags: */
AutoUpdate = TRUE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -5015,7 +4961,7 @@ SfxVoidItem Paste SID_PASTE
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = TRUE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -5035,6 +4981,59 @@ SfxVoidItem Paste SID_PASTE
]
//--------------------------------------------------------------------------
+SfxVoidItem ClipboardFormatItems SID_CLIPBOARD_FORMAT_ITEMS
+(SfxUInt32Item SelectedFormat SID_CLIPBOARD_FORMAT_ITEMS)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SvxClipboardFmtItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxInt16Item PasteSpecial SID_PASTE_SPECIAL
+(SfxUInt32Item Format SID_PASTE_SPECIAL)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
SfxStringItem DocPath SID_DOCPATH
[
@@ -5486,7 +5485,7 @@ SfxVoidItem Redo SID_REDO
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -5539,7 +5538,7 @@ SfxBoolItem Reload SID_RELOAD
[
/* flags: */
AutoUpdate = TRUE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -5643,7 +5642,7 @@ SfxStringItem RepeatAction SID_REPEAT
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -5747,7 +5746,7 @@ SfxBoolItem Save SID_SAVEDOC
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = TRUE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -7179,7 +7178,7 @@ SfxVoidItem Undo SID_UNDO
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -8809,7 +8808,7 @@ SfxInt16Item PasteUnformatted SID_PASTE_UNFORMATTED
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = TRUE,
HasCoreId = FALSE,
HasDialog = FALSE,
diff --git a/sfx2/sdi/sfxslots.sdi b/sfx2/sdi/sfxslots.sdi
index 7e851ae414..7954591236 100644
--- a/sfx2/sdi/sfxslots.sdi
+++ b/sfx2/sdi/sfxslots.sdi
@@ -59,6 +59,7 @@ TypeLibFile( "sfxslots.tlb" )
item String SfxFrameItem; //! Dummy
item String SfxObjectShellItem //! Dummy
item String SfxUsrAnyItem //! Dummy
+ item String SvxClipboardFmtItem; //! Dummy
struct Point
{
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 135f2f3f2b..d1aa10f5de 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -505,7 +505,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
if ( pOldContainerFrame )
{
if ( bTaskActivate )
- NotifyEvent( SfxEventHint( SFX_EVENT_DEACTIVATEDOC, pOldContainerFrame->GetObjectShell() ) );
+ NotifyEvent( SfxEventHint( SFX_EVENT_DEACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_DEACTIVATEDOC), pOldContainerFrame->GetObjectShell() ) );
pOldContainerFrame->DoDeactivate( bTaskActivate, pFrame );
if( pOldContainerFrame->GetProgress() )
@@ -529,7 +529,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
if ( bTaskActivate && pNewContainerFrame->GetObjectShell() )
{
pNewContainerFrame->GetObjectShell()->PostActivateEvent_Impl( pNewContainerFrame );
- NotifyEvent(SfxEventHint(SFX_EVENT_ACTIVATEDOC, pNewContainerFrame->GetObjectShell() ) );
+ NotifyEvent(SfxEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_ACTIVATEDOC), pNewContainerFrame->GetObjectShell() ) );
}
SfxProgress *pProgress = pNewContainerFrame->GetProgress();
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index b1c2c84498..112c5c4506 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -78,27 +78,11 @@
#define RID_RECORDINGTOOLBOX (RID_SFX_APP_START+43)
#define RID_ENVTOOLBOX (RID_SFX_APP_START+44)
-#define STR_EVENT_STARTAPP (RID_SFX_APP_START+50)
-#define STR_EVENT_CLOSEAPP (RID_SFX_APP_START+51)
-#define STR_EVENT_CREATEDOC (RID_SFX_APP_START+52)
-#define STR_EVENT_OPENDOC (RID_SFX_APP_START+53)
-#define STR_EVENT_CLOSEDOC (RID_SFX_APP_START+54)
-#define STR_EVENT_SAVEDOC (RID_SFX_APP_START+55)
-#define STR_EVENT_SAVEASDOC (RID_SFX_APP_START+56)
-#define STR_EVENT_ACTIVATEDOC (RID_SFX_APP_START+57)
-#define STR_EVENT_DEACTIVATEDOC (RID_SFX_APP_START+58)
-#define STR_EVENT_ONERROR (RID_SFX_APP_START+78)
-#define STR_EVENT_PREPARECLOSEDOC (RID_SFX_APP_START+89)
-#define STR_EVENT_MODIFYCHANGED (RID_SFX_APP_START+90)
-#define STR_EVENT_SAVEDOCDONE (RID_SFX_APP_START+95)
-#define STR_EVENT_SAVEASDOCDONE (RID_SFX_APP_START+96)
-
#define STR_QUITAPP (RID_SFX_APP_START+59)
#define STR_EXITANDRETURN (RID_SFX_APP_START+60)
#define STR_ERR_NOFILE (RID_SFX_APP_START+61)
#define STR_EXTHELPSTATUS (RID_SFX_APP_START+62)
-#define STR_EVENT_PRINTDOC (RID_SFX_APP_START+64)
#define STR_ADDRESS_NAME (RID_SFX_APP_START+65)
#define RID_STR_HLPFILENOTEXIST (RID_SFX_APP_START+68)
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index 9b7ea4e64f..555c7467aa 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -502,76 +502,6 @@ ToolBox RID_FULLSCREENTOOLBOX
};
};
-String STR_EVENT_STARTAPP
-{
- Text [ en-US ] = "Start Application" ;
-};
-
-String STR_EVENT_CLOSEAPP
-{
- Text [ en-US ] = "Close Application" ;
-};
-
-String STR_EVENT_CREATEDOC
-{
- Text [ en-US ] = "Create Document" ;
-};
-
-String STR_EVENT_CLOSEDOC
-{
- Text [ en-US ] = "Document closed" ;
-};
-
-String STR_EVENT_PREPARECLOSEDOC
-{
- Text [ en-US ] = "Document is closing" ;
-};
-
-String STR_EVENT_OPENDOC
-{
- Text [ en-US ] = "Open Document" ;
-};
-
-String STR_EVENT_SAVEDOC
-{
- Text [ en-US ] = "Save Document" ;
-};
-
-String STR_EVENT_SAVEASDOC
-{
- Text [ en-US ] = "Save Document As" ;
-};
-
-String STR_EVENT_SAVEDOCDONE
-{
- Text [ en-US ] = "Document has been saved" ;
-};
-
-String STR_EVENT_SAVEASDOCDONE
-{
- Text [ en-US ] = "Document has been saved as" ;
-};
-
-String STR_EVENT_ACTIVATEDOC
-{
- Text [ en-US ] = "Activate Document" ;
-};
-
-String STR_EVENT_DEACTIVATEDOC
-{
- Text [ en-US ] = "Deactivate Document" ;
-};
-
-String STR_EVENT_PRINTDOC
-{
- Text [ en-US ] = "Print Document" ;
-};
-
-String STR_EVENT_MODIFYCHANGED
-{
- Text [ en-US ] = "'Modified' status was changed" ;
-};
-
String STR_ERR_NOTEMPLATE
{
Text [ en-US ] = "The selected template has an incorrect format" ;
@@ -582,7 +512,6 @@ String STR_ERR_NOFILE
Text [ en-US ] = "Can't open file $." ;
};
-
String STR_QUITAPP
{
Text [ en-US ] = "E~xit" ;
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index c99f00a09d..d7be1bbf66 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -160,10 +160,12 @@ IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer)
SfxObjectShellRef xRef( aHint.GetObjShell() );
pAsyncTimer->Stop();
#ifdef DBG_UTIL
- ::rtl::OUString aName = SfxEventConfiguration::GetEventName_Impl( aHint.GetEventId() );
- ByteString aTmp( "SfxEvent: ");
- aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTmp.GetBuffer() );
+ if (!xRef.Is())
+ {
+ ByteString aTmp( "SfxEvent: ");
+ aTmp += ByteString( String( aHint.GetEventName() ), RTL_TEXTENCODING_UTF8 );
+ DBG_TRACE( aTmp.GetBuffer() );
+ }
#endif
SFX_APP()->Broadcast( aHint );
if ( xRef.Is() )
@@ -1037,7 +1039,7 @@ SfxEventConfiguration* SfxApplication::GetEventConfig() const
//--------------------------------------------------------------------
void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, FASTBOOL bSynchron )
{
- DBG_ASSERT(pAppData_Impl->pEventConfig,"Keine Events angemeldet!");
+ //DBG_ASSERT(pAppData_Impl->pEventConfig,"Keine Events angemeldet!");
SfxObjectShell *pDoc = rEventHint.GetObjShell();
if ( pDoc && ( pDoc->IsPreview() || !pDoc->Get_Impl()->bInitialized ) )
@@ -1052,6 +1054,14 @@ void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, FASTBOOL bSync
if ( bSynchron )
{
+#ifdef DBG_UTIL
+ if (!pDoc)
+ {
+ ByteString aTmp( "SfxEvent: ");
+ aTmp += ByteString( String( rEventHint.GetEventName() ), RTL_TEXTENCODING_UTF8 );
+ DBG_TRACE( aTmp.GetBuffer() );
+ }
+#endif
Broadcast(rEventHint);
if ( pDoc )
pDoc->Broadcast( rEventHint );
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 13173dba77..a995006238 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -144,7 +144,6 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a
pApp->Broadcast( SfxSimpleHint( SFX_HINT_DEINITIALIZING ) );
pApp->Get_Impl()->pAppDispatch->ReleaseAll();
pApp->Get_Impl()->pAppDispatch->release();
- pApp->NotifyEvent(SfxEventHint( SFX_EVENT_CLOSEAPP) );
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
css::uno::Reference< css::document::XEventListener > xGlobalBroadcaster(xSMGR->createInstance(SERVICE_GLOBALEVENTBROADCASTER), css::uno::UNO_QUERY);
@@ -301,38 +300,6 @@ FASTBOOL SfxApplication::Initialize_Impl()
Registrations_Impl();
-// ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- // TODO/LATER: exchange confusing defines; CREATEDOC -> NEWDOC, DOCCREATED -> CREATEDOC
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_STARTAPP, String(SfxResId(STR_EVENT_STARTAPP)), SfxObjectShell::GetEventNames_Impl()[0] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_CLOSEAPP, String(SfxResId(STR_EVENT_CLOSEAPP)), SfxObjectShell::GetEventNames_Impl()[1] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_CREATEDOC, String(SfxResId(STR_EVENT_CREATEDOC)), SfxObjectShell::GetEventNames_Impl()[2] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_OPENDOC, String(SfxResId(STR_EVENT_OPENDOC)), SfxObjectShell::GetEventNames_Impl()[3] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_SAVEASDOC, String(SfxResId(STR_EVENT_SAVEASDOC)), SfxObjectShell::GetEventNames_Impl()[4] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_SAVEASDOCDONE, String(SfxResId(STR_EVENT_SAVEASDOCDONE)), SfxObjectShell::GetEventNames_Impl()[5] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_SAVEDOC, String(SfxResId(STR_EVENT_SAVEDOC)), SfxObjectShell::GetEventNames_Impl()[6] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_SAVEDOCDONE, String(SfxResId(STR_EVENT_SAVEDOCDONE)), SfxObjectShell::GetEventNames_Impl()[7] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_PREPARECLOSEDOC, String(SfxResId(STR_EVENT_PREPARECLOSEDOC)),SfxObjectShell::GetEventNames_Impl()[8] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_CLOSEDOC, String(SfxResId(STR_EVENT_CLOSEDOC)), SfxObjectShell::GetEventNames_Impl()[9] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_ACTIVATEDOC, String(SfxResId(STR_EVENT_ACTIVATEDOC)), SfxObjectShell::GetEventNames_Impl()[10] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_DEACTIVATEDOC, String(SfxResId(STR_EVENT_DEACTIVATEDOC)), SfxObjectShell::GetEventNames_Impl()[11] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_PRINTDOC, String(SfxResId(STR_EVENT_PRINTDOC)), SfxObjectShell::GetEventNames_Impl()[12] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_MODIFYCHANGED, String(SfxResId(STR_EVENT_MODIFYCHANGED)), SfxObjectShell::GetEventNames_Impl()[13] );
-
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_SAVETODOC, String(), SfxObjectShell::GetEventNames_Impl()[14] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_SAVETODOCDONE, String(), SfxObjectShell::GetEventNames_Impl()[15] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_VIEWCREATED, String(), SfxObjectShell::GetEventNames_Impl()[16] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_PREPARECLOSEVIEW, String(), SfxObjectShell::GetEventNames_Impl()[17] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_CLOSEVIEW, String(), SfxObjectShell::GetEventNames_Impl()[18] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_VISAREACHANGED, String(), SfxObjectShell::GetEventNames_Impl()[19] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_DOCCREATED, String(), SfxObjectShell::GetEventNames_Impl()[20] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_LOADFINISHED, String(), SfxObjectShell::GetEventNames_Impl()[21] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_SAVEASDOCFAILED, String(), SfxObjectShell::GetEventNames_Impl()[22] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_SAVEDOCFAILED, String(), SfxObjectShell::GetEventNames_Impl()[23] );
- SfxEventConfiguration::RegisterEvent(SFX_EVENT_SAVETODOCFAILED, String(), SfxObjectShell::GetEventNames_Impl()[24] );
- SfxEventConfiguration::RegisterEvent(SFX_HINT_TITLECHANGED, String(), SfxObjectShell::GetEventNames_Impl()[25] );
- SfxEventConfiguration::RegisterEvent(SFX_HINT_MODECHANGED, String(), SfxObjectShell::GetEventNames_Impl()[26] );
-
// Subklasse initialisieren
pAppData_Impl->bDowning = sal_False;
Init();
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index cfa60d4e8c..7a70f6f094 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -668,17 +668,6 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
rSet.DisableItem(nWhich);
break;
- case SID_CURRENTTIME:
- {
- rSet.Put( SfxStringItem( nWhich, aLocaleWrapper.getTime( Time(), FALSE ) ) );
- break;
- }
- case SID_CURRENTDATE:
- {
- rSet.Put( SfxStringItem( nWhich, aLocaleWrapper.getDate( Date() ) ) );
- break;
- }
-
case SID_HELPTIPS:
{
rSet.Put( SfxBoolItem( SID_HELPTIPS, Help::IsQuickHelpEnabled() ) );
@@ -859,6 +848,12 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
pFact->CreateFrameDialog( NULL, xFrame, rReq.GetSlot(), sPageURL );
pDlg->Execute();
delete pDlg;
+ SfxViewFrame* pView = SfxViewFrame::GetFirst();
+ while ( pView )
+ {
+ pView->GetBindings().InvalidateAll(FALSE);
+ pView = SfxViewFrame::GetNext( *pView );
+ }
}
break;
}
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 1b76a3c795..ec52cacbeb 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -69,23 +69,6 @@
#include <com/sun/star/uno/Reference.hxx>
// -----------------------------------------------------------------------
-
-#define PROPERTYVALUE ::com::sun::star::beans::PropertyValue
-#define XNAMEREPLACE ::com::sun::star::container::XNameReplace
-#define XEVENTSSUPPLIER ::com::sun::star::document::XEventsSupplier
-#define ANY ::com::sun::star::uno::Any
-#define REFERENCE ::com::sun::star::uno::Reference
-#define SEQUENCE ::com::sun::star::uno::Sequence
-#define UNO_QUERY ::com::sun::star::uno::UNO_QUERY
-
-#define OUSTRING ::rtl::OUString
-
-// -----------------------------------------------------------------------
-
-static const USHORT nCompatVersion = 3;
-static const USHORT nOldVersion = 4;
-static const USHORT nVersion = 5;
-
TYPEINIT1(SfxEventHint, SfxHint);
TYPEINIT1(SfxEventNamesItem, SfxPoolItem);
@@ -176,195 +159,11 @@ void SfxEventNamesItem::AddEvent( const String& rName, const String& rUIName, US
aEventsList.Insert( new SfxEventName( nID, rName, rUIName.Len() ? rUIName : rName ) );
}
-// class SfxAsyncEvent_Impl ----------------------------------------------
-
-class SfxAsyncEvent_Impl : public SfxListener
-{
- String aArgs;
- SfxObjectShell* pSh;
- const SvxMacro* pMacro;
- Timer *pTimer;
-
-public:
-
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- SfxAsyncEvent_Impl( SfxObjectShell *pDoc, const SvxMacro *pMacro, const String& rArgs );
- ~SfxAsyncEvent_Impl();
- DECL_LINK( TimerHdl, Timer*);
-};
-
-// -----------------------------------------------------------------------
-
-void SfxAsyncEvent_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
-{
- SfxSimpleHint* pHint = PTR_CAST( SfxSimpleHint, &rHint );
- if( pHint && pHint->GetId() == SFX_HINT_DYING && pTimer->IsActive() )
- {
- pTimer->Stop();
- delete this;
- }
-}
-
-// -----------------------------------------------------------------------
-
-SfxAsyncEvent_Impl::SfxAsyncEvent_Impl( SfxObjectShell *pDoc, const SvxMacro *pMac, const String& rArgs )
- : aArgs( rArgs )
- , pSh( pDoc )
- , pMacro( pMac )
-{
- if( pSh ) StartListening( *pSh );
- pTimer = new Timer;
- pTimer->SetTimeoutHdl( LINK(this, SfxAsyncEvent_Impl, TimerHdl) );
- pTimer->SetTimeout( 0 );
- pTimer->Start();
-}
-
-// -----------------------------------------------------------------------
-
-SfxAsyncEvent_Impl::~SfxAsyncEvent_Impl()
-{
- delete pTimer;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK(SfxAsyncEvent_Impl, TimerHdl, Timer*, pAsyncTimer)
-{
- pAsyncTimer->Stop();
- ScriptType eSType = pMacro->GetScriptType();
- BOOL bIsBasic = ( eSType == STARBASIC );
- if ( bIsBasic && StarBASIC::IsRunning() )
- // Neues eventgebundenes Macro erst ausf"uhren, wenn gerade kein anderes Macro mehr l"auft
- pAsyncTimer->Start();
- else
- {
- SFX_APP()->GetMacroConfig()->ExecuteMacro( pSh, pMacro, aArgs );
- delete this;
- }
-
- return 0L;
-}
-
-SfxEventNamesList *gp_Id_SortList = NULL;
-SfxEventNamesList *gp_Name_SortList = NULL;
-
-//==========================================================================
-
-SfxEventConfiguration::SfxEventConfiguration()
- : pAppTable( NULL )
- , pDocTable( NULL )
-{
- bIgnoreConfigure = sal_False;
-}
-
-//==========================================================================
-
-SfxEventConfiguration::~SfxEventConfiguration()
-{
- delete pDocTable;
-
- if ( gp_Id_SortList )
- {
- delete gp_Id_SortList;
- delete gp_Name_SortList;
- gp_Id_SortList = NULL;
- gp_Name_SortList = NULL;
- }
-}
-
-void SfxEventConfiguration::ConfigureEvent( USHORT nId, const SvxMacro& rMacro, SfxObjectShell *pDoc )
-{
- if ( bIgnoreConfigure )
- return;
-
- SvxMacro *pMacro = NULL;
- if ( rMacro.GetMacName().Len() )
- pMacro = new SvxMacro( rMacro.GetMacName(), rMacro.GetLibName(), rMacro.GetScriptType() );
- if ( pDoc )
- {
- PropagateEvent_Impl( pDoc, nId, pMacro );
- }
- else
- {
- PropagateEvent_Impl( NULL, nId, pMacro );
- }
-}
//==========================================================================
-SvxMacroTableDtor* SfxEventConfiguration::GetDocEventTable( SfxObjectShell*pDoc )
-{
- if ( pDocTable )
- delete pDocTable;
-
- pDocTable = new SvxMacroTableDtor;
-
- if ( pDoc )
- {
- REFERENCE< XEVENTSSUPPLIER > xSup( pDoc->GetModel(), UNO_QUERY );
- uno::Reference < container::XNameReplace > xEvents = xSup->getEvents();
-
- uno::Sequence < ::rtl::OUString > aNames = xEvents->getElementNames();
- for ( sal_Int32 i=0; i<aNames.getLength(); i++ )
- {
- SvxMacro* pMacro = SfxEvents_Impl::ConvertToMacro( xEvents->getByName( aNames[i] ), pDoc, TRUE );
- USHORT nID = (USHORT) GetEventId_Impl( aNames[i] );
- if ( nID && pMacro )
- pDocTable->Insert( nID, pMacro );
- }
- }
-
- return pDocTable;
-}
-
//--------------------------------------------------------------------------
-void SfxEventConfiguration::PropagateEvent_Impl( SfxObjectShell *pDoc,
- USHORT nId,
- const SvxMacro* pMacro )
-{
- REFERENCE< XEVENTSSUPPLIER > xSupplier;
- if ( pDoc )
- {
- xSupplier = REFERENCE< XEVENTSSUPPLIER >( pDoc->GetModel(), UNO_QUERY );
- }
- else
- {
- xSupplier = REFERENCE< XEVENTSSUPPLIER >
- ( ::comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString::createFromAscii("com.sun.star.frame.GlobalEventBroadcaster" )), UNO_QUERY );
- }
-
- if ( xSupplier.is() )
- {
- REFERENCE< XNAMEREPLACE > xEvents = xSupplier->getEvents();
-
- bIgnoreConfigure = sal_True;
-
- OUSTRING aEventName = GetEventName_Impl( nId );
-
- if ( aEventName.getLength() )
- {
- ANY aEventData = CreateEventData_Impl( pMacro );
-
- try
- {
- xEvents->replaceByName( aEventName, aEventData );
- }
- catch( ::com::sun::star::lang::IllegalArgumentException )
- { DBG_ERRORFILE( "PropagateEvents_Impl: caught IllegalArgumentException" ); }
- catch( ::com::sun::star::container::NoSuchElementException )
- { DBG_ERRORFILE( "PropagateEvents_Impl: caught NoSuchElementException" ); }
- }
- else {
- DBG_WARNING( "PropagateEvents_Impl: Got unkown event" );
- }
-
- bIgnoreConfigure = sal_False;
- }
-}
-
-// -------------------------------------------------------------------------------------------------------
-ANY SfxEventConfiguration::CreateEventData_Impl( const SvxMacro *pMacro )
+uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
{
/*
This function converts a SvxMacro into an Any containing three
@@ -376,57 +175,57 @@ ANY SfxEventConfiguration::CreateEventData_Impl( const SvxMacro *pMacro )
If pMacro is NULL, we return an empty property sequence, so PropagateEvent_Impl
can delete an event binding.
*/
- ANY aEventData;
+ uno::Any aEventData;
if ( pMacro )
{
if ( pMacro->GetScriptType() == STARBASIC )
{
- SEQUENCE < PROPERTYVALUE > aProperties(3);
- PROPERTYVALUE *pValues = aProperties.getArray();
+ uno::Sequence < beans::PropertyValue > aProperties(3);
+ beans::PropertyValue *pValues = aProperties.getArray();
- OUSTRING aType = OUSTRING::createFromAscii( STAR_BASIC );;
- OUSTRING aLib = pMacro->GetLibName();
- OUSTRING aMacro = pMacro->GetMacName();
+ ::rtl::OUString aType = ::rtl::OUString::createFromAscii( STAR_BASIC );;
+ ::rtl::OUString aLib = pMacro->GetLibName();
+ ::rtl::OUString aMacro = pMacro->GetMacName();
- pValues[ 0 ].Name = OUSTRING::createFromAscii( PROP_EVENT_TYPE );
+ pValues[ 0 ].Name = ::rtl::OUString::createFromAscii( PROP_EVENT_TYPE );
pValues[ 0 ].Value <<= aType;
- pValues[ 1 ].Name = OUSTRING::createFromAscii( PROP_LIBRARY );
+ pValues[ 1 ].Name = ::rtl::OUString::createFromAscii( PROP_LIBRARY );
pValues[ 1 ].Value <<= aLib;
- pValues[ 2 ].Name = OUSTRING::createFromAscii( PROP_MACRO_NAME );
+ pValues[ 2 ].Name = ::rtl::OUString::createFromAscii( PROP_MACRO_NAME );
pValues[ 2 ].Value <<= aMacro;
aEventData <<= aProperties;
}
else if ( pMacro->GetScriptType() == EXTENDED_STYPE )
{
- SEQUENCE < PROPERTYVALUE > aProperties(2);
- PROPERTYVALUE *pValues = aProperties.getArray();
+ uno::Sequence < beans::PropertyValue > aProperties(2);
+ beans::PropertyValue *pValues = aProperties.getArray();
- OUSTRING aLib = pMacro->GetLibName();
- OUSTRING aMacro = pMacro->GetMacName();
+ ::rtl::OUString aLib = pMacro->GetLibName();
+ ::rtl::OUString aMacro = pMacro->GetMacName();
- pValues[ 0 ].Name = OUSTRING::createFromAscii( PROP_EVENT_TYPE );
+ pValues[ 0 ].Name = ::rtl::OUString::createFromAscii( PROP_EVENT_TYPE );
pValues[ 0 ].Value <<= aLib;
- pValues[ 1 ].Name = OUSTRING::createFromAscii( PROP_SCRIPT );
+ pValues[ 1 ].Name = ::rtl::OUString::createFromAscii( PROP_SCRIPT );
pValues[ 1 ].Value <<= aMacro;
aEventData <<= aProperties;
}
else if ( pMacro->GetScriptType() == JAVASCRIPT )
{
- SEQUENCE < PROPERTYVALUE > aProperties(2);
- PROPERTYVALUE *pValues = aProperties.getArray();
+ uno::Sequence < beans::PropertyValue > aProperties(2);
+ beans::PropertyValue *pValues = aProperties.getArray();
- OUSTRING aMacro = pMacro->GetMacName();
+ ::rtl::OUString aMacro = pMacro->GetMacName();
- pValues[ 0 ].Name = OUSTRING::createFromAscii( PROP_EVENT_TYPE );
+ pValues[ 0 ].Name = ::rtl::OUString::createFromAscii( PROP_EVENT_TYPE );
pValues[ 0 ].Value <<= ::rtl::OUString::createFromAscii(SVX_MACRO_LANGUAGE_JAVASCRIPT);
- pValues[ 1 ].Name = OUSTRING::createFromAscii( PROP_MACRO_NAME );
+ pValues[ 1 ].Name = ::rtl::OUString::createFromAscii( PROP_MACRO_NAME );
pValues[ 1 ].Value <<= aMacro;
aEventData <<= aProperties;
@@ -438,171 +237,68 @@ ANY SfxEventConfiguration::CreateEventData_Impl( const SvxMacro *pMacro )
}
else
{
- SEQUENCE < PROPERTYVALUE > aProperties;
+ uno::Sequence < beans::PropertyValue > aProperties;
aEventData <<= aProperties;
}
return aEventData;
}
-// -------------------------------------------------------------------------------------------------------
-ULONG SfxEventConfiguration::GetPos_Impl( USHORT nId, sal_Bool &rFound )
+//--------------------------------------------------------------------------
+void PropagateEvent_Impl( SfxObjectShell *pDoc, rtl::OUString aEventName, const SvxMacro* pMacro )
{
- rFound = sal_False;
-
- if ( ! gp_Id_SortList->Count() )
- return 0;
-
- // use binary search to find the correct position
- // in the list
-
- int nCompVal = 1;
- long nStart = 0;
- long nEnd = gp_Id_SortList->Count() - 1;
- long nMid = 0;
-
- SfxEventName* pMid;
-
- rFound = sal_False;
-
- while ( nCompVal && ( nStart <= nEnd ) )
- {
- nMid = ( nEnd - nStart ) / 2 + nStart;
- pMid = gp_Id_SortList->GetObject( (USHORT) nMid );
-
- nCompVal = pMid->mnId - nId;
-
- if ( nCompVal < 0 ) // pMid < pData
- nStart = nMid + 1;
- else
- nEnd = nMid - 1;
- }
-
- if ( nCompVal == 0 )
+ uno::Reference < document::XEventsSupplier > xSupplier;
+ if ( pDoc )
{
- rFound = sal_True;
+ xSupplier = uno::Reference < document::XEventsSupplier >( pDoc->GetModel(), uno::UNO_QUERY );
}
else
{
- if ( nCompVal < 0 ) // pMid < pData
- nMid++;
+ xSupplier = uno::Reference < document::XEventsSupplier >
+ ( ::comphelper::getProcessServiceFactory()->createInstance(
+ rtl::OUString::createFromAscii("com.sun.star.frame.GlobalEventBroadcaster" )), uno::UNO_QUERY );
}
- return (USHORT) nMid;
-}
-
-// -------------------------------------------------------------------------------------------------------
-ULONG SfxEventConfiguration::GetPos_Impl( const String& rName, sal_Bool &rFound )
-{
- rFound = sal_False;
-
- if ( ! gp_Name_SortList->Count() )
- return 0;
-
- // use binary search to find the correct position
- // in the list
-
- int nCompVal = 1;
- long nStart = 0;
- long nEnd = gp_Name_SortList->Count() - 1;
- long nMid = 0;
-
- SfxEventName* pMid;
-
- rFound = sal_False;
-
- while ( nCompVal && ( nStart <= nEnd ) )
+ if ( xSupplier.is() )
{
- nMid = ( nEnd - nStart ) / 2 + nStart;
- pMid = gp_Name_SortList->GetObject( (USHORT) nMid );
-
- nCompVal = rName.CompareTo( pMid->maEventName );
-
- if ( nCompVal < 0 ) // pMid < pData
- nStart = nMid + 1;
- else
- nEnd = nMid - 1;
- }
+ uno::Reference < container::XNameReplace > xEvents = xSupplier->getEvents();
+ if ( aEventName.getLength() )
+ {
+ uno::Any aEventData = CreateEventData_Impl( pMacro );
- if ( nCompVal == 0 )
- {
- rFound = sal_True;
- }
- else
- {
- if ( nCompVal < 0 ) // pMid < pData
- nMid++;
+ try
+ {
+ xEvents->replaceByName( aEventName, aEventData );
+ }
+ catch( ::com::sun::star::lang::IllegalArgumentException )
+ { DBG_ERRORFILE( "PropagateEvents_Impl: caught IllegalArgumentException" ); }
+ catch( ::com::sun::star::container::NoSuchElementException )
+ { DBG_ERRORFILE( "PropagateEvents_Impl: caught NoSuchElementException" ); }
+ }
+ else {
+ DBG_WARNING( "PropagateEvents_Impl: Got unkown event" );
+ }
}
-
- return (USHORT) nMid;
}
//--------------------------------------------------------------------------------------------------------
-OUSTRING SfxEventConfiguration::GetEventName_Impl( ULONG nID )
+void SfxEventConfiguration::ConfigureEvent( rtl::OUString aName, const SvxMacro& rMacro, SfxObjectShell *pDoc )
{
- OUSTRING aRet;
-
- if ( gp_Id_SortList )
+ SvxMacro *pMacro = NULL;
+ if ( rMacro.GetMacName().Len() )
+ pMacro = new SvxMacro( rMacro.GetMacName(), rMacro.GetLibName(), rMacro.GetScriptType() );
+ if ( pDoc )
{
- sal_Bool bFound;
- ULONG nPos = GetPos_Impl( (USHORT) nID, bFound );
-
- if ( bFound )
- {
- SfxEventName *pData = gp_Id_SortList->GetObject( nPos );
- aRet = pData->maEventName;
- }
+ PropagateEvent_Impl( pDoc, aName, pMacro );
}
-
- return aRet;
-}
-
-//--------------------------------------------------------------------------------------------------------
-ULONG SfxEventConfiguration::GetEventId_Impl( const OUSTRING& rEventName )
-{
- ULONG nRet = 0;
-
- if ( gp_Name_SortList )
+ else
{
- sal_Bool bFound;
- ULONG nPos = GetPos_Impl( rEventName, bFound );
-
- if ( bFound )
- {
- SfxEventName *pData = gp_Name_SortList->GetObject( nPos );
- nRet = pData->mnId;
- }
+ PropagateEvent_Impl( NULL, aName, pMacro );
}
-
- return nRet;
}
// -------------------------------------------------------------------------------------------------------
-void SfxEventConfiguration::RegisterEvent( USHORT nId,
- const String& rUIName,
- const String& rMacroName )
+SvxMacro* SfxEventConfiguration::ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, BOOL bBlowUp )
{
- if ( ! gp_Id_SortList )
- {
- gp_Id_SortList = new SfxEventNamesList;
- gp_Name_SortList = new SfxEventNamesList;
- }
-
- sal_Bool bFound = sal_False;
- ULONG nPos = GetPos_Impl( nId, bFound );
-
- if ( bFound )
- {
- DBG_ERRORFILE( "RegisterEvent: Event already registered?" );
- return;
- }
-
- gp_Id_SortList->Insert( new SfxEventName( nId, rMacroName, rUIName ), nPos );
- nPos = GetPos_Impl( rMacroName, bFound );
-
- DBG_ASSERT( !bFound, "RegisterEvent: Name in List, but ID not?" );
-
- gp_Name_SortList->Insert( new SfxEventName( nId, rMacroName, rUIName ), nPos );
-
- SFX_APP()->GetEventConfig();
+ return SfxEvents_Impl::ConvertToMacro( rElement, pDoc, bBlowUp );
}
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 487c460de6..02efe0aeba 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -145,16 +145,6 @@ IMPL_LINK(SfxAsyncExec_Impl, TimerHdl, Timer*, pTimer)
}
class SfxBindings_Impl
-
-/* [Beschreibung]
-
- Diese Implementations-Struktur der Klasse SfxBindings dient
- der Entkopplung von "Anderungen vom exportierten Interface sowie
- der Verringerung von extern sichtbaren Symbolen.
-
- Eine Instanz exisitiert pro SfxBindings-Instanz f"ur deren Laufzeit.
-*/
-
{
public:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchRecorder > xRecorder;
@@ -186,20 +176,6 @@ public:
//--------------------------------------------------------------------
struct SfxFoundCache_Impl
-
-/* [Beschreibung]
-
- In Instanzen dieser Struktur werden in <SfxBindings::CreateSet_Impl()>
- weitere Informationen zu den gemeinsam von einem <Slot-Server> zu
- erfragenden Status gesammelt, deren Ids dort in die Ranges eines
- <SfxItemSet>s aufgenommen werden.
-
- Diese Informationen werden w"ahrend der Suche nach den zusammen
- upzudatenden Ids sowieso als Zwischenergebnis ermittelt und nachher
- wieder ben"otigt, daher macht es Sinn, sie f"ur diesen kurzen Zeitraum
- gleich aufzubewahren.
-*/
-
{
sal_uInt16 nSlotId; // die Slot-Id
sal_uInt16 nWhichId; // falls verf"ugbar die Which-Id, sonst nSlotId
@@ -242,20 +218,6 @@ SV_IMPL_OP_PTRARR_SORT(SfxFoundCacheArr_Impl, SfxFoundCache_Impl*);
//==========================================================================
SfxBindings::SfxBindings()
-
-/* [Beschreibung]
-
- Konstruktor der Klasse SfxBindings. Genau eine Instanz wird automatisch
- von der <SfxApplication> vor <SfxApplication::Init()> angelegt. Wird
- eine Instanz ben"otigt, z.B. zum Invalidieren von Slots, sollte diese
- "uber den zugeh"origen <SfxViewFrame> besorgt werden. Bestimmte
- SfxViewFrame Subklassen (z.B. <SfxInPlaceFrame>) legen ihre eigene
- Instanz der SfxBindings an.
-
- <SfxControllerItem> Instanzen k"onnen erst angelegt werden, wenn
- die zugeh"orige SfxBindings Instanz existiert.
-*/
-
: pImp(new SfxBindings_Impl),
pDispatcher(0),
nRegLevel(1) // geht erst auf 0, wenn Dispatcher gesetzt
@@ -324,23 +286,6 @@ SfxBindings::~SfxBindings()
//--------------------------------------------------------------------
void SfxBindings::DeleteControllers_Impl()
-
-/* [Beschreibung]
-
- Interne Methode zum l"oschen noch existierender <SfxControllerItem>
- Instanzen, die bei dieser SfxBindings Instanz angemeldet sind.
-
- Dies sind i.d.R. <SfxPopupWindow>s. Nich sich selbst geh"orende
- SfxControllerItems d"urfen bei Aufruf nur noch existieren, wenn sie
- einem der restlichen SfxPopupWindows geh"oren.
-
-
- [Anmerkung]
-
- Wird beim Beenden der Applikation gerufen, bevor das Applikations-
- Fenster gel"oscht wird.
-*/
-
{
// in der ersten Runde den SfxPopupWindows l"oschen
sal_uInt16 nCount = pImp->pCaches->Count();
@@ -415,20 +360,6 @@ SfxPopupAction SfxBindings::GetPopupAction_Impl() const
//--------------------------------------------------------------------
void SfxBindings::HidePopups( bool bHide )
-
-/* [Beschreibung]
-
- Dieser Methode versteckt und zeigt die <SfxPopupWindows>, die aus
- <SfxToolboxControl>s dieser SfxBindings-Instanz abgerissen wurden bzw.
- floating <SfxChildWindow>-Instanzen dieser SfxBindings-Instanz.
-
-
- [Anmerkung]
-
- Es k"onnten noch weitere Floating-Windows exisitieren, die durch
- diese Methode nicht erfa\st werden.
-*/
-
{
// SfxPopupWindows hiden
HidePopupCtrls_Impl( bHide );
@@ -469,13 +400,6 @@ void SfxBindings::Update_Impl
(
SfxStateCache* pCache // der upzudatende SfxStatusCache
)
-
-/* [Beschreibung]
-
- Interne Methode zum Updaten eines Caches und den von derselben
- Status-Methode in derselben Shell bedienten und dirty Slots.
-*/
-
{
if( pCache->GetDispatch().is() && pCache->GetItemLink() )
{
@@ -558,35 +482,6 @@ void SfxBindings::Update
(
sal_uInt16 nId // die gebundene und upzudatende Slot-Id
)
-
-/* [Beschreibung]
-
- Diese Methode sorgt f"ur synchrones Updaten der auf die Slot-Id nId
- gebundenen <SfxContollerItem> Instanzen, die an dieser SfxBindings
- Instanz angemeldet sind. Vergleichbar zu Window::Update()
- (StarView) erfolgt ein Update nur, wenn entweder ein auf diese
- Slot-Id gebundenes SfxContollerItem dirty ist, oder die Slot-Id
- selbst dirty ist. Dies kann durch einen vorhergehendes Aufruf von
- <SfxBindings::Invalidate(sal_uInt16)> erzwungen werden.
-
-
- [Anmerkung]
-
- Es ist g"unstiger, zun"achst alle zu invalidierenden Slot-Ids per
- <SfxBindings::Invalidate(sal_uInt16)> zu invalidieren und dann
- Update() aufzurufen, als einzelne abwechselnde Invalidate/Update,
- da von derselben Status-Methode bediente Status-Anfragen von
- den SfxBindings automatisch zusammengefa"st werden.
-
-
- [Querverweise]
-
- <SfxShell::Invalidate(sal_uInt16)>
- <SfxBindings::Invalidate(sal_uInt16)>
- <SfxBindings::InvalidateAll(sal_Bool)>
- <SfxBindings::Update()>
-*/
-
{
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
@@ -654,26 +549,6 @@ void SfxBindings::Update
//--------------------------------------------------------------------
void SfxBindings::Update()
-
-/* [Beschreibung]
-
- Diese Methode sorgt f"ur synchrones Updaten aller <SfxContollerItem>
- Instanzen, die an dieser SfxBindings Instanz angemeldet sind. Vergleichbar
- zu Window::Update() (StarView) erfolgt ein Update nur, wenn entweder ein
- SfxContollerItem dirty ist, in einem Status-Cache der Zeiger auf den
- <Slot-Server> dirty ist. Ersteres kann durch einen Aufruf von
- <SfxBindings::Invalidate(sal_uInt16)> erzwungen werden, letzters durch
- <SfxBindings::InvalidateAll(sal_Bool)>.
-
-
- [Querverweise]
-
- <SfxShell::Invalidate(sal_uInt16)>
- <SfxBindings::Invalidate(sal_uInt16)>
- <SfxBindings::InvalidateAll(sal_Bool)>
- <SfxBindings::Update(sal_uInt16)>
-*/
-
{
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
@@ -702,19 +577,6 @@ void SfxBindings::SetState
(
const SfxItemSet& rSet // zu setzende Status-Werte
)
-
-/* [Beschreibung]
-
- Diese Methode erlaubt das direkte Setzen neuer Status-Werte, ohne
- den Umweg "uber <SfxBindings::Invalidate()> und das dann im Update
- erfolgende Rufen der Status-Methoden an den <SfxShell>s.
-
-
- [Querverweise]
-
- <SfxBindings::SetState(const SfxPoolItem&)>
-*/
-
{
// wenn gelockt, dann nur invalidieren
if ( nRegLevel )
@@ -759,23 +621,6 @@ void SfxBindings::SetState
(
const SfxPoolItem& rItem // zu setzender Status-Wert
)
-
-/* [Beschreibung]
-
- Diese Methode erlaubt das direkte Setzen eines neuen Status-Wertes,
- ohne den Umweg "uber <SfxBindings::Invalidate()> und das dann im Update
- erfolgende Rufen der Status-Methoden an den <SfxShell>s.
-
- Mit dieser Methode k"onnen nur <SfxPoolItem>s mit Slot, nicht
- aber mit Which-Id gesetzt werden, da kein <SfxItemPool> bekannt ist,
- "uber den gemappt werden k"onnte.
-
-
- [Querverweise]
-
- <SfxBindings::SetState(const SfxItemSet&)>
-*/
-
{
if ( nRegLevel )
{
@@ -824,25 +669,6 @@ SfxStateCache* SfxBindings::GetStateCache
wurde, bzw. an der es einfef"ugt werden
w"urde. */
)
-
-/* [Beschreibung]
-
- Diese Methode sucht die zu einer Slot-Id geh"orige <SfxStatusCache>
- Instanz. Falls die Slot-Id in keinem Controller gebunden ist, wird
- ein 0-Pointer zur"uckgegeben.
-
- Falls pPos != 0, wird erst ab der Position mit der Suche angefangen.
- Dieses ist eine Optimierung, f"ur den Fall, da"s die kleineren
- Ids bereits abgearbeitet wurden.
-
- In *pPos wird der ::com::sun::star::sdbcx::Index innerhalb der SfxBindings zur"uckgegeben,
- unter dem dieser Cache z.Zt. abgelegt ist. Dieser ::com::sun::star::sdbcx::Index ist bis zum
- n"achsten Aufruf von <SfxBindings::EnterRegistrations()> g"ultig.
- W"ahrend der Umkonfiguration (<SfxBindings::IsInRegistrations()> == sal_True)
- kann ist der ::com::sun::star::sdbcx::Index und der R"uckgabewert nur sehr kurzfristig
- g"ultig.
-*/
-
{
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
@@ -870,27 +696,6 @@ void SfxBindings::InvalidateAll
sal_False
Slot-Server bleiben g"ultig */
)
-
-/* [Beschreibung]
-
- Invalidiert alle <SfxControllerItem> Instanzen, die an dieser
- SfxBindings Instanz angemeldet sind, und bei bWithMsg == sal_True
- ebenfalls die <Slot-Server>-Caches.
-
- Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
- beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
- bevor "uberhaupt etwas passiert.
-
-
- [Querverweise]
-
- <SfxShell::Invalidate(sal_uInt16)>
- <SfxBindings::Invalidate(sal_uInt16)>
- <SfxBindings::Invalidate(sal_uInt16*)>
- <SfxBindings::Update()>
- <SfxBindings::Update(sal_uInt16)>
-*/
-
{
DBG_PROFSTART(SfxBindingsInvalidateAll);
DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
@@ -942,26 +747,6 @@ void SfxBindings::Invalidate
const sal_uInt16* pIds /* numerisch sortiertes 0-terminiertes Array
von Slot-Ids (einzel, nicht als Paare!) */
)
-
-/* [Beschreibung]
-
- Invalidiert die <SfxControllerItem> Instanzen der Slot-Ids in 'pIds',
- die an dieser SfxBindings Instanz angemeldet sind.
-
- Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
- beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
- bevor "uberhaupt etwas passiert.
-
-
- [Querverweise]
-
- <SfxShell::Invalidate(sal_uInt16)>
- <SfxBindings::Invalidate(sal_uInt16)>
- <SfxBindings::InvalidateAll(sal_uInt16)>
- <SfxBindings::Update()>
- <SfxBindings::Update(sal_uInt16)>
-*/
-
{
DBG_PROFSTART(SfxBindingsInvalidateAll);
// DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
@@ -1032,26 +817,6 @@ void SfxBindings::InvalidateShell
Slot-Ids werden invalidiert */
//! MI: z. Zt. immer bDeep
)
-
-/* [Beschreibung]
-
- Invalidiert alle <SfxControllerItem> Instanzen, die zur Zeit von
- der angegebenen SfxShell Instanz bedient werden und an dieser
- SfxBindings Instanz angemeldet sind
-
- Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
- beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
- bevor "uberhaupt etwas passiert.
-
-
- [Querverweise]
-
- <SfxShell::Invalidate(sal_uInt16)>
- <SfxBindings::Invalidate(sal_uInt16)>
- <SfxBindings::Update()>
- <SfxBindings::Update(sal_uInt16)>
-*/
-
{
DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
@@ -1108,24 +873,6 @@ void SfxBindings::Invalidate
(
sal_uInt16 nId // zu invalidierende Slot-Id
)
-
-/* [Beschreibung]
-
- Invalidiert alle <SfxControllerItem> Instanzen, die auf die Slot-Id
- nId gebunden sind und an dieser SfxBindings Instanz angemeldet sind.
-
- Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
- beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
- bevor "uberhaupt etwas passiert.
-
-
- [Querverweise]
- <SfxBindings::Invalidate(sal_uInt16*)>
- <SfxBindings::InvalidateAll(sal_Bool)>
- <SfxBindings::Update()>
- <SfxBindings::Update(sal_uInt16)>
-*/
-
{
DBG_MEMTEST();
// DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
@@ -1166,24 +913,6 @@ void SfxBindings::Invalidate
sal_Bool bWithItem, // StateCache clearen ?
sal_Bool bWithMsg // SlotServer neu holen ?
)
-
-/* [Beschreibung]
-
- Invalidiert alle <SfxControllerItem> Instanzen, die auf die Slot-Id
- nId gebunden sind und an dieser SfxBindings Instanz angemeldet sind,
- und bei bWithMsg == sal_True ebenfalls den <Slot-Server>-Cache.
-
- Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
- beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
- bevor "uberhaupt etwas passiert.
-
- [Querverweise]
- <SfxBindings::Invalidate(sal_uInt16*)>
- <SfxBindings::InvalidateAll(sal_Bool)>
- <SfxBindings::Update()>
- <SfxBindings::Update(sal_uInt16)>
-*/
-
{
DBG_MEMTEST();
DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
@@ -1214,52 +943,9 @@ void SfxBindings::Invalidate
}
}
-void SfxBindings::Invalidate
-(
- sal_uInt16, // zu invalidierende Slot-Id
- sal_Bool // SlotServer neu holen ?
-)
-
-/* [Beschreibung]
-
- Invalidiert alle <SfxControllerItem> Instanzen, die auf die Slot-Id
- nId gebunden sind und an dieser SfxBindings Instanz angemeldet sind,
- und bei bWithMsg == sal_True ebenfalls den <Slot-Server>-Cache.
-
- Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
- beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
- bevor "uberhaupt etwas passiert.
-
- [Querverweise]
- <SfxBindings::Invalidate(sal_uInt16*)>
- <SfxBindings::InvalidateAll(sal_Bool)>
- <SfxBindings::Update()>
- <SfxBindings::Update(sal_uInt16)>
-*/
-
-{
- DBG_ERROR( "Methode veraltet!" );
-}
-
//--------------------------------------------------------------------
sal_Bool SfxBindings::IsBound( sal_uInt16 nSlotId, sal_uInt16 nStartSearchAt )
-
-/* [Beschreibung]
-
- Stellt fest, ob die angegebene Slot-Id in einem <SfxControllerItem>
- gebunden ist, der an dieser SfxBindings Instanz angemeldet ist.
-
-
- [R"uckgabewert]
-
- sal_Bool sal_True
- Die angegeben Slot-Id ist gebunden.
-
- sal_False
- Die angegeben Slot-Id ist nicht gebunden.
-*/
-
{
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
@@ -1269,14 +955,6 @@ sal_Bool SfxBindings::IsBound( sal_uInt16 nSlotId, sal_uInt16 nStartSearchAt )
//--------------------------------------------------------------------
sal_uInt16 SfxBindings::GetSlotPos( sal_uInt16 nId, sal_uInt16 nStartSearchAt )
-
-/* [Beschreibung]
-
- Ermittelt den ::com::sun::star::sdbcx::Index der angegebenen Slot-Id in den SfxBindings.
- Falls die Slot-Id nicht gebunden ist, wird der ::com::sun::star::sdbcx::Index zur"uckgegeben,
- an dem sie eingef"ugt w"urde.
-*/
-
{
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
@@ -1471,30 +1149,6 @@ const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolIt
sal_Bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode,
const SfxPoolItem **ppInternalArgs )
-
-/* [Beschreibung]
-
- F"uhrt den Slot mit der Slot-Id nId "uber den <Slot-Server> Cache
- aus. Dies ist nur bei in dieser SfxBindings INstanz gebundenen
- Slot-Ids m"oglich.
-
-
- [R"uckgabewert]
-
- sal_Bool sal_True
- Das Execute wurde ausgef"uhrt.
-
- sal_False
- Das Execute konnte nicht ausgef"uhrt werden,
- weil der Slot entweder nicht zur Verf"ugung steht
- (in keiner aktiven <SfxShell> vorhanden oder
- disabled) ist oder der Anwender die Ausf"uhrung
- abgebrochen hat (Cancel in einem Dialog).
-
-
- [Querverweise]
- <SfxDispatcher>
-*/
{
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
@@ -1716,13 +1370,6 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
//--------------------------------------------------------------------
void SfxBindings::UpdateSlotServer_Impl()
-
-/* [Beschreibung]
-
- Interne Methode zum Updaten der Pointer auf die SlotServer
- nach <SfxBindings::InvalidateAll(sal_Bool)>.
-*/
-
{
DBG_PROFSTART(SfxBindingsUpdateServers);
DBG_MEMTEST();
@@ -1785,16 +1432,6 @@ SfxItemSet* SfxBindings::CreateSet_Impl
const SfxSlotServer** pMsgServer, // out: Slot-Server zu nId
SfxFoundCacheArr_Impl& rFound // out: Liste der Caches der Siblings
)
-
-/* [Beschreibung]
-
- Diese interne Methode sucht zu pCache die Slot-Ids, die von derselben
- Status-Methode bedient werden und ebenfalls gebunden und dirty sind.
- Es wird ein SfxItemSet zusammengestellt, das die Slot-Ids (oder falls
- vorhanden die mit dem Pool der Shell gemappten Which-Ids) enth"alt.
- Die Caches dieser Slots werden in pFoundCaches zur"uckgeliefert.
-*/
-
{
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
@@ -1942,18 +1579,6 @@ void SfxBindings::UpdateControllers_Impl
const SfxPoolItem* pItem, // item to send to controller
SfxItemState eState // state of item
)
-
-/* [Beschreibung]
-
- Dieses ist eine Hilfsmethode f"ur NextJob_Impl mit der die SfxController,
- welche auf nSlotId gebunden sind, upgedated werden. Dabei wird der
- Wert aus dem SfxPoolItem unter dem Which-Wert nWhich aus dem Set rSet
- genommen.
-
- Falls zu rSlot Enum-Werte in der Slotmap eingetragen sind, und diese
- gebunden sind, werden sie ebenfalls upgedated.
-*/
-
{
DBG_ASSERT( !pFound->pSlot || SFX_KIND_ENUM != pFound->pSlot->GetKind(),
"direct update of enum slot isn't allowed" );
@@ -2059,13 +1684,6 @@ void SfxBindings::UpdateControllers_Impl
//--------------------------------------------------------------------
IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
-
-/* [Beschreibung]
-
- Die SfxController werden "uber einen Timer updated. Dieses ist der
- dazugeh"orige interne TimeOut-Handler.
- */
-
{
#ifdef DBG_UTIL
// on Windows very often C++ Exceptions (GPF etc.) are caught by MSVCRT or another MS library
@@ -2178,18 +1796,26 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
}
}
- // volatiles wieder von vorne starten
pImp->nMsgPos = 0;
- pImp->aTimer.SetTimeout(TIMEOUT_IDLE);
+
+ // check for volatile slots
+ bool bVolatileSlotsPresent = false;
for ( sal_uInt16 n = 0; n < nCount; ++n )
{
SfxStateCache* pCache = (*pImp->pCaches)[n];
const SfxSlotServer *pSlotServer = pCache->GetSlotServer(*pDispatcher, pImp->xProv);
- if ( pSlotServer &&
- pSlotServer->GetSlot()->IsMode(SFX_SLOT_VOLATILE) )
+ if ( pSlotServer && pSlotServer->GetSlot()->IsMode(SFX_SLOT_VOLATILE) )
+ {
pCache->Invalidate(sal_False);
+ bVolatileSlotsPresent = true;
+ }
}
+ if (bVolatileSlotsPresent)
+ pImp->aTimer.SetTimeout(TIMEOUT_IDLE);
+ else
+ pImp->aTimer.Stop();
+
// Update-Runde ist beendet
pImp->bInNextJob = sal_False;
Broadcast(SfxSimpleHint(SFX_HINT_UPDATEDONE));
@@ -2210,35 +1836,6 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
//--------------------------------------------------------------------
sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine)
-
-/* [Beschreibung]
-
- Die An- oder Abmeldung von <SfxControllerItem> Instanzen mu"s in
- EnterRegistrations() und LeaveRegistrations() geklammert werden.
- W"ahrend dieser Zeit erfolgen keine Udates der <SfxContollerItem>
- Instanzen (weder der alten noch der neu angemeldeten).
-
- [Parameter]
-
- pFile, nLine Dateiname und Zeilennummer der rufenden
- Methode (nur Debug)
-
- [R"uckgabewert]
-
- sal_uInt16 Level der Registrierung. Dieser kann in
- <SfxBindings::LeaveRegistrations(sal_uInt16)> als
- Parameter angegeben werden, um die Paarigkeit
- der EnterRegistrations() und LeaveRegistrations()
- zu pr"ufen.
-
-
- [Querverweise]
- <SfxBindings::IsInRegistrations()>
- <SfxBindings::Register(SfxControllerItem&)>
- <SfxBindings::Release(SfxControllerItem&)>
- <SfxBindings::LeaveRegistrations()>
-*/
-
{
(void)pFile;
(void)nLine;
@@ -2296,36 +1893,6 @@ sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine)
//--------------------------------------------------------------------
void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int nLine )
-
-/* [Beschreibung]
-
- Die An- oder Abmeldung von <SfxControllerItem> Instanzen mu"s in
- EnterRegistrations() und LeaveRegistrations() geklammert werden.
- W"ahrend dieser Zeit erfolgen keine Udates der <SfxContollerItem>
- Instanzen (weder der alten noch der neu angemeldeten).
-
-
- [Parameter]
-
- sal_uInt16 nLevel == USRT_MAX
- keine Paarigkeits-Pr"ufung f"ur diese Klammerung
-
-
- pFile, nLine Dateiname und Zeilennummer der rufenden
- Methode (nur Debug)
-
- < USHRT_MAX
- R"uckgabewert des zugeh"origen EnterRegistrations()
- zum pr"ufen der Paarigkeit.
-
-
- [Querverweise]
- <SfxBindings::IsInRegistrations()>
- <SfxBindings::Register(SfxControllerItem&)>
- <SfxBindings::Release(SfxControllerItem&)>
- <SfxBindings::EnterRegistrations()>
-*/
-
{
(void)nLevel; // unused variable
(void)pFile;
@@ -2425,26 +1992,6 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int
//--------------------------------------------------------------------
const SfxSlot* SfxBindings::GetSlot(sal_uInt16 nSlotId)
-
-/* [Beschreibung]
-
- Diese Methode liefert einen Pointer auf den zur Zeit gecacheten
- SfxSlot f"ur die angegebene Slot-Id.
-
-
- [R"uckgabewert]
-
- const <SfxSlot>* 0
- Falls die Slot-Id nicht gebunden ist oder
- ein solcher Slot momentan in keiner aktiven
- <SfxShell> vorhanden ist.
-
- != 0
- Falls die Slot-Id gebunden ist und ein solcher
- Slot momentan in einer aktiven <SfxShell>
- vorhanden ist.
-*/
-
{
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
@@ -2463,17 +2010,6 @@ const SfxSlot* SfxBindings::GetSlot(sal_uInt16 nSlotId)
//--------------------------------------------------------------------
void SfxBindings::SetDispatcher( SfxDispatcher *pDisp )
-
-/* [Beschreibung]
-
- Setzt den zur Zeit von dieser SfxBindings Instanz zu verwendenden
- Dispatcher um.
-
- Falls sich der Dispatcher dadurch "andert, wird intern
- <SFxBindings::InvalidateAll(sal_Bool)> mit sal_True gerufen, also jegliche
- gecachete Information der Bindings weggeworfen.
-*/
-
{
SfxDispatcher *pOldDispat = pDispatcher;
if ( pDisp != pDispatcher )
@@ -2541,17 +2077,11 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp )
//--------------------------------------------------------------------
void SfxBindings::ClearCache_Impl( sal_uInt16 nSlotId )
-
-// interne Methode zum forwarden dieses Methodenaufrufs
-
{
GetStateCache(nSlotId)->ClearCache();
}
//--------------------------------------------------------------------
-
-// interne Methode zum Ansto\sen des Statusupdates
-
void SfxBindings::StartUpdate_Impl( sal_Bool bComplete )
{
if ( pImp->pSubBindings )
@@ -2568,18 +2098,6 @@ void SfxBindings::StartUpdate_Impl( sal_Bool bComplete )
//-------------------------------------------------------------------------
SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState )
-/* [Beschreibung]
-
- Wird gerufen, um den Status f"ur 'nSlot' zu erfragen. Wenn der return
- value SFX_ITEM_SET ist, wird ein SfxPoolItem zur"uckgegeben, indem der
- rpState entsprechend gesetzt wird. Es findet dabei ein Eigent"umer"ubergang
- statt, d.h. die aufrufende Methode mu\s das Item l"oschen.
-
- Anmerkung: diese Methode ist sehr teuer und sollte nur gerufen werden,
- wenn kein Controller f"ur das Erfragen des Status angelegt werden kann oder
- der Status unbedingt sofort geliefert werden mu\s.
-*/
-
{
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp;
SfxStateCache *pCache = GetStateCache( nSlot );
@@ -2870,15 +2388,6 @@ BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand )
return FALSE;
}
-//REMOVE SfxConfigManager* SfxBindings::GetConfigManager( USHORT nType ) const
-//{
-//REMOVE SfxConfigManager *pMgr = pDispatcher->GetFrame()->GetObjectShell()->GetConfigManager();
-//REMOVE if ( pMgr && pMgr->HasConfigItem( nType ) )
-//REMOVE return pMgr;
-//REMOVE else
-// return SFX_APP()->GetConfigManager_Impl();
-//}
-
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxBindings::GetRecorder() const
{
return pImp->xRecorder;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index d6be5de2a1..d59d36855c 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1619,7 +1619,7 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR
m_aValueEdit ( this, SfxResId( SFX_ED_PROPERTY_VALUE ) ),
m_aYesNoButton ( this, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
m_aRemoveButton ( this, SfxResId( SFX_PB_PROPERTY_REMOVE ) ),
-
+ m_nScrollPos (0),
m_aNumberFormatter( ::comphelper::getProcessServiceFactory(),
Application::GetSettings().GetLanguage() )
@@ -1676,6 +1676,8 @@ IMPL_LINK( CustomPropertiesWindow, RemoveHdl, CustomPropertiesRemoveButton*, pBu
}
}
}
+
+ m_aRemovedHdl.Call(0);
return 0;
}
@@ -1852,6 +1854,7 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
Size aSize = (*pCurrent)->GetSizePixel();
Point aPos = (*pCurrent)->GetPosPixel();
aPos.Y() += nPos;
+ aPos.Y() += m_nScrollPos;
(*pNewCurrent)->SetPosSizePixel( aPos, aSize );
(*pNewCurrent)->Show();
pCurrent++;
@@ -1974,10 +1977,12 @@ void CustomPropertiesWindow::ClearAllLines()
delete pLine;
}
m_aCustomPropertiesLines.clear();
+ m_nScrollPos = 0;
}
void CustomPropertiesWindow::DoScroll( sal_Int32 nNewPos )
{
+ m_nScrollPos += nNewPos;
std::vector< CustomPropertyLine* >::iterator pIter;
for ( pIter = m_aCustomPropertiesLines.begin();
pIter != m_aCustomPropertiesLines.end(); ++pIter )
@@ -2141,6 +2146,7 @@ CustomPropertiesControl::CustomPropertiesControl( Window* pParent, const ResId&
XubString sTEST = m_aHeaderBar.GetItemText( HI_NAME );
m_aPropertiesWin.InitControls( &m_aHeaderBar, &m_aVertScroll );
+ m_aPropertiesWin.SetRemovedHdl( LINK( this, CustomPropertiesControl, RemovedHdl ) );
m_aVertScroll.SetRangeMin( 0 );
sal_Int32 nScrollOffset = m_aPropertiesWin.GetLineHeight();
@@ -2156,7 +2162,7 @@ CustomPropertiesControl::CustomPropertiesControl( Window* pParent, const ResId&
Link aScrollLink = LINK( this, CustomPropertiesControl, ScrollHdl );
m_aVertScroll.SetScrollHdl( aScrollLink );
- m_aVertScroll.SetEndScrollHdl( aScrollLink );
+// m_aVertScroll.SetEndScrollHdl( aScrollLink );
}
CustomPropertiesControl::~CustomPropertiesControl()
@@ -2176,10 +2182,20 @@ IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar )
return 0;
}
-void CustomPropertiesControl::AddLine( const ::rtl::OUString& sName, Any& rAny )
+IMPL_LINK( CustomPropertiesControl, RemovedHdl, void*, EMPTYARG )
+{
+ m_aVertScroll.SetRangeMax( m_aPropertiesWin.GetVisibleLineCount() + 1 );
+ if ( m_aPropertiesWin.GetOutputSizePixel().Height() < m_aPropertiesWin.GetVisibleLineCount() * m_aPropertiesWin.GetLineHeight() )
+ m_aVertScroll.DoScrollAction ( SCROLL_LINEUP );
+ return 0;
+}
+
+void CustomPropertiesControl::AddLine( const ::rtl::OUString& sName, Any& rAny, bool bInteractive )
{
m_aPropertiesWin.AddLine( sName, rAny );
m_aVertScroll.SetRangeMax( m_aPropertiesWin.GetVisibleLineCount() + 1 );
+ if ( bInteractive && m_aPropertiesWin.GetOutputSizePixel().Height() < m_aPropertiesWin.GetVisibleLineCount() * m_aPropertiesWin.GetLineHeight() )
+ m_aVertScroll.DoScroll( m_aPropertiesWin.GetVisibleLineCount() + 1 );
}
// class SfxCustomPropertiesPage -----------------------------------------
@@ -2200,7 +2216,7 @@ SfxCustomPropertiesPage::SfxCustomPropertiesPage( Window* pParent, const SfxItem
IMPL_LINK( SfxCustomPropertiesPage, AddHdl, PushButton*, EMPTYARG )
{
Any aAny;
- m_aPropertiesCtrl.AddLine( ::rtl::OUString(), aAny );
+ m_aPropertiesCtrl.AddLine( ::rtl::OUString(), aAny, true );
return 0;
}
@@ -2250,7 +2266,7 @@ void SfxCustomPropertiesPage::Reset( const SfxItemSet& rItemSet )
std::vector< CustomProperty* > aCustomProps = pInfoItem->GetCustomProperties();
for ( sal_uInt32 i = 0; i < aCustomProps.size(); i++ )
{
- m_aPropertiesCtrl.AddLine( aCustomProps[i]->m_sName, aCustomProps[i]->m_aValue );
+ m_aPropertiesCtrl.AddLine( aCustomProps[i]->m_sName, aCustomProps[i]->m_aValue, false );
}
}
diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk
index 4c893288eb..986755558c 100644
--- a/sfx2/source/doc/makefile.mk
+++ b/sfx2/source/doc/makefile.mk
@@ -48,7 +48,7 @@ CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS)
SRS1NAME=$(TARGET)
SRC1FILES = \
- doc.src new.src doctdlg.src docvor.src doctempl.src sfxbasemodel.src graphhelp.src
+ doc.src new.src doctdlg.src docvor.src doctempl.src graphhelp.src
SLOFILES = \
$(SLO)$/printhelper.obj \
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 15c883b421..8398679302 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -1383,54 +1383,6 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
}
}
-/*
-SfxEventConfigItem_Impl* SfxObjectShell::GetEventConfig_Impl( BOOL bForce )
-{
- if ( bForce && !pImp->pEventConfig )
- {
- pImp->pEventConfig = new SfxEventConfigItem_Impl( SFX_ITEMTYPE_DOCEVENTCONFIG,
- SFX_APP()->GetEventConfig(), this );
- if (pImp->pCfgMgr)
- pImp->pEventConfig->Connect( pImp->pCfgMgr );
- pImp->pEventConfig->Initialize();
- }
-
- return pImp->pEventConfig;
-} */
-
-//REMOVE SvStorageRef SfxObjectShell::GetConfigurationStorage( SotStorage* pStor )
-//REMOVE {
-//REMOVE // configuration storage shall be opened in own storage or a new storage, if the
-//REMOVE // document is getting stored into this storage
-//REMOVE if ( !pStor )
-//REMOVE pStor = GetStorage();
-//REMOVE
-//REMOVE if ( pStor->IsOLEStorage() )
-//REMOVE return (SvStorageRef) SotStorageRef();
-//REMOVE
-//REMOVE // storage is always opened in transacted mode, so changes must be commited
-//REMOVE SotStorageRef xStorage = pStor->OpenSotStorage( DEFINE_CONST_UNICODE("Configurations"),
-//REMOVE IsReadOnly() ? STREAM_STD_READ : STREAM_STD_READWRITE );
-//REMOVE if ( xStorage.Is() && xStorage->GetError() )
-//REMOVE xStorage.Clear();
-//REMOVE return (SvStorageRef) xStorage;
-//REMOVE }
-
-//REMOVE SotStorageStreamRef SfxObjectShell::GetConfigurationStream( const String& rName, BOOL bCreate )
-//REMOVE {
-//REMOVE SotStorageStreamRef xStream;
-//REMOVE SvStorageRef xStorage = GetConfigurationStorage();
-//REMOVE if ( xStorage.Is() )
-//REMOVE {
-//REMOVE xStream = xStorage->OpenSotStream( rName,
-//REMOVE bCreate ? STREAM_STD_READWRITE|STREAM_TRUNC : STREAM_STD_READ );
-//REMOVE if ( xStream.Is() && xStream->GetError() )
-//REMOVE xStream.Clear();
-//REMOVE }
-//REMOVE
-//REMOVE return xStream;
-//REMOVE }
-
SfxObjectShellRef MakeObjectShellForOrganizer_Impl( const String& aTargetURL, BOOL bForWriting )
{
// check for own format
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 8641281d50..c50539a0bd 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -136,7 +136,7 @@ void SfxObjectShell::SetVisArea( const Rectangle & rVisArea )
if ( IsEnableSetModified() )
SetModified( TRUE );
- SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, this));
+ SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
/*
Size aSize (GetVisArea().GetSize());
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 847ae205cb..ff4ed98058 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -423,7 +423,7 @@ void SfxObjectShell::ModifyChanged()
Invalidate( SID_MACRO_SIGNATURE );
Broadcast( SfxSimpleHint( SFX_HINT_TITLECHANGED ) ); // xmlsec05, signed state might change in title...
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_MODIFYCHANGED, this ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_MODIFYCHANGED, GlobalEventConfig::GetEventName(STR_EVENT_MODIFYCHANGED), this ) );
}
//-------------------------------------------------------------------------
@@ -1137,8 +1137,10 @@ void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame )
{
sal_uInt16 nId = pImp->nEventId;
pImp->nEventId = 0;
- if ( nId )
- pSfxApp->NotifyEvent(SfxEventHint( nId, this ), sal_False);
+ if ( nId == SFX_EVENT_OPENDOC )
+ pSfxApp->NotifyEvent(SfxEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_OPENDOC), this ), sal_False);
+ else if (nId == SFX_EVENT_CREATEDOC )
+ pSfxApp->NotifyEvent(SfxEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_CREATEDOC), this ), sal_False);
}
}
}
@@ -1432,7 +1434,7 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags )
}
pImp->bInitialized = sal_True;
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_LOADFINISHED, this ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_LOADFINISHED, GlobalEventConfig::GetEventName(STR_EVENT_LOADFINISHED), this ) );
// Title is not available until loading has finished
Broadcast( SfxSimpleHint( SFX_HINT_TITLECHANGED ) );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 52e00f3b36..6ab2bf2d81 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -522,7 +522,7 @@ sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
pImp->bInitialized = sal_True;
SetActivateEvent_Impl( SFX_EVENT_CREATEDOC );
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_DOCCREATED, this ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_DOCCREATED, GlobalEventConfig::GetEventName(STR_EVENT_DOCCREATED), this ) );
return sal_True;
}
@@ -3257,7 +3257,7 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage()
SetupStorage( pImp->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, sal_False );
pImp->m_bCreateTempStor = sal_False;
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, this ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, GlobalEventConfig::GetEventName(STR_EVENT_STORAGECHANGED), this ) );
}
catch( uno::Exception& )
{
@@ -3417,7 +3417,7 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >&
if ( bSendNotification )
{
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, this ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, GlobalEventConfig::GetEventName(STR_EVENT_STORAGECHANGED), this ) );
}
return bResult;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index d5292df407..acc91515df 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -61,6 +61,7 @@
#include <basic/sbstar.hxx>
#include <svtools/stritem.hxx>
#include <basic/sbx.hxx>
+#include <svtools/eventcfg.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/signaturestate.hxx>
@@ -251,7 +252,6 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,pModule( 0 )
,pFrame( 0 )
,pTbxConfig( 0 )
- ,pEventConfig(NULL)
,eFlags( SFXOBJECTSHELL_UNDEFINED )
,pCloser( 0 )
,bReadOnlyUI( sal_False )
@@ -597,6 +597,9 @@ sal_uInt16 SfxObjectShell::PrepareClose
while ( pFrame && (pFrame->GetFrameType() & SFXFRAME_SERVER ) )
pFrame = SfxViewFrame::GetNext( *pFrame, this );
+ SfxApplication *pSfxApp = SFX_APP();
+ pSfxApp->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEDOC, GlobalEventConfig::GetEventName(STR_EVENT_PREPARECLOSEDOC), this) );
+
sal_Bool bClose = sal_False;
if ( bUI && IsModified() )
{
@@ -887,11 +890,6 @@ SfxObjectShell* SfxObjectShell::GetObjectShell()
SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames()
{
- return GetEventNames_Impl();
-}
-
-SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames_Impl()
-{
static uno::Sequence< ::rtl::OUString >* pEventNameContainer = NULL;
if ( !pEventNameContainer )
@@ -899,88 +897,7 @@ SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames_Impl()
::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( !pEventNameContainer )
{
- static uno::Sequence< ::rtl::OUString > aEventNameContainer( 27 );
- // SFX_EVENT_STARTAPP
- aEventNameContainer[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnStartApp" ) );
-
- // SFX_EVENT_CLOSEAPP
- aEventNameContainer[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnCloseApp" ) );
-
- // SFX_EVENT_CREATEDOC
- aEventNameContainer[2] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnNew" ) );
-
- // SFX_EVENT_OPENDOC
- aEventNameContainer[3] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnLoad" ) );
-
- // SFX_EVENT_SAVEASDOC
- aEventNameContainer[4] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" ) );
-
- // SFX_EVENT_SAVEASDOCDONE
- aEventNameContainer[5] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" ) );
-
- // SFX_EVENT_SAVEDOC
- aEventNameContainer[6] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnSave" ) );
-
- // SFX_EVENT_SAVEDOCDONE
- aEventNameContainer[7] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnSaveDone" ) );
-
- // SFX_EVENT_PREPARECLOSEDOC
- aEventNameContainer[8] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnPrepareUnload" ) );
-
- // SFX_EVENT_CLOSEDOC
- aEventNameContainer[9] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnUnload" ) );
-
- // SFX_EVENT_ACTIVATEDOC
- aEventNameContainer[10] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnFocus" ) );
-
- // SFX_EVENT_DEACTIVATEDOC
- aEventNameContainer[11] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnUnfocus" ) );
-
- // SFX_EVENT_PRINTDOC
- aEventNameContainer[12] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnPrint" ) );
-
- // SFX_EVENT_MODIFYCHANGED
- aEventNameContainer[13] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnModifyChanged" ) );
-
- // SFX_EVENT_SAVETODOC
- aEventNameContainer[14] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnCopyTo" ) );
-
- // SFX_EVENT_SAVETODOCDONE
- aEventNameContainer[15] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnCopyToDone" ) );
-
- // SFX_EVENT_VIEWCREATED
- aEventNameContainer[16] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnViewCreated" ) );
-
- // SFX_EVENT_PREPARECLOSEVIEW
- aEventNameContainer[17] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnPrepareViewClosing" ) );
-
- // SFX_EVENT_CLOSEVIEW
- aEventNameContainer[18] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnViewClosed" ) );
-
- // SFX_EVENT_VISAREACHANGED
- aEventNameContainer[19] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) );
-
- // SFX_EVENT_DOCCREATED
- aEventNameContainer[20] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnCreate" ) );
-
- // SFX_EVENT_LOADFINISHED
- aEventNameContainer[21] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnLoadFinished" ) );
-
- // SFX_EVENT_SAVEASDOCFAILED
- aEventNameContainer[22] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsFailed" ) );
-
- // SFX_EVENT_SAVEDOCFAILED
- aEventNameContainer[23] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnSaveFailed" ) );
-
- // SFX_EVENT_SAVETODOCFAILED
- aEventNameContainer[24] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnCopyToFailed" ) );
-
- // SFX_HINT_TITLECHANGED
- aEventNameContainer[25] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnTitleChanged" ) );
-
- // SFX_HINT_MODECHANGED
- aEventNameContainer[26] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnModeChanged" ) );
-
+ static uno::Sequence< ::rtl::OUString > aEventNameContainer = GlobalEventConfig().getElementNames();
pEventNameContainer = &aEventNameContainer;
}
}
@@ -988,6 +905,13 @@ SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames_Impl()
return *pEventNameContainer;
}
+SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames_Impl()
+{
+ if (!pImp->xEventNames.getLength())
+ pImp->xEventNames = GetEventNames();
+ return pImp->xEventNames;
+}
+
//--------------------------------------------------------------------
void SfxObjectShell::SetModel( SfxBaseModel* pModel )
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 8b5c32feeb..25d2d964e9 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -1614,7 +1614,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const uno::Sequence< beans::PropertyVa
SfxAllItemSet *pParams = new SfxAllItemSet( SFX_APP()->GetPool() );
TransformParameters( SID_SAVEDOC, aSeqArgs, *pParams );
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOC, m_pData->m_pObjectShell ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOC, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOC), m_pData->m_pObjectShell ) );
sal_Bool bRet = sal_False;
@@ -1645,14 +1645,12 @@ void SAL_CALL SfxBaseModel::storeSelf( const uno::Sequence< beans::PropertyVa
: ERRCODE_IO_CANTWRITE;
m_pData->m_pObjectShell->ResetError();
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEFINISHED, m_pData->m_pObjectShell ) );
-
if ( bRet )
{
m_pData->m_pObjectShell->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "successful saving." ) ) );
m_pData->m_aPreusedFilterName = GetMediumFilterName_Impl();
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCDONE, m_pData->m_pObjectShell ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCDONE, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOCDONE), m_pData->m_pObjectShell ) );
}
else
{
@@ -1660,7 +1658,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const uno::Sequence< beans::PropertyVa
m_pData->m_pObjectShell->StoreLog();
// write the contents of the logger to the file
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCFAILED, m_pData->m_pObjectShell ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCFAILED, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOCFAILED), m_pData->m_pObjectShell ) );
throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), nErrCode );
}
@@ -2546,7 +2544,7 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
impl_getPrintHelper();
}
- postEvent_Impl( pNamedHint->GetEventId() );
+ postEvent_Impl( pNamedHint->GetEventName() );
}
if ( pSimpleHint )
@@ -2555,11 +2553,11 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
{
::rtl::OUString aTitle = m_pData->m_pObjectShell->GetTitle();
addTitle_Impl( m_pData->m_seqArguments, aTitle );
- postEvent_Impl( pSimpleHint->GetId() );
+ postEvent_Impl( GlobalEventConfig::GetEventName( STR_EVENT_TITLECHANGED ) );
}
if ( pSimpleHint->GetId() == SFX_HINT_MODECHANGED )
{
- postEvent_Impl( pSimpleHint->GetId() );
+ postEvent_Impl( GlobalEventConfig::GetEventName( STR_EVENT_MODECHANGED ) );
}
/*
else if ( pSimpleHint->GetId() == SFX_HINT_DYING
@@ -2760,7 +2758,7 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
if ( !bSaved && m_pData->m_pObjectShell )
{
- SFX_APP()->NotifyEvent( SfxEventHint( bSaveTo ? SFX_EVENT_SAVETODOC : SFX_EVENT_SAVEASDOC,
+ SFX_APP()->NotifyEvent( SfxEventHint( bSaveTo ? SFX_EVENT_SAVETODOC : SFX_EVENT_SAVEASDOC, GlobalEventConfig::GetEventName( bSaveTo ? STR_EVENT_SAVETODOC : STR_EVENT_SAVEASDOC ),
m_pData->m_pObjectShell ) );
SfxAllItemSet *aParams = new SfxAllItemSet( SFX_APP()->GetPool() );
@@ -2783,7 +2781,7 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
}
// since saving a document modifies its DocumentInfo, the current
- // DocumentInfo must be saved on "SaveTo", so it can be restored
+ // DocumentInfo must be saved on "SaveTo", so it can be restored
// after saving
sal_Bool bCopyTo = bSaveTo ||
m_pData->m_pObjectShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED;
@@ -2860,11 +2858,11 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
if ( !bSaveTo )
{
m_pData->m_aPreusedFilterName = GetMediumFilterName_Impl();
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEASDOCDONE, m_pData->m_pObjectShell ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEASDOCDONE, GlobalEventConfig::GetEventName(STR_EVENT_SAVEASDOCDONE), m_pData->m_pObjectShell ) );
}
else
{
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVETODOCDONE, m_pData->m_pObjectShell ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVETODOCDONE, GlobalEventConfig::GetEventName(STR_EVENT_SAVETODOCDONE), m_pData->m_pObjectShell ) );
}
}
else
@@ -2873,7 +2871,7 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
m_pData->m_pObjectShell->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Storing failed!" ) ) );
m_pData->m_pObjectShell->StoreLog();
- SFX_APP()->NotifyEvent( SfxEventHint( bSaveTo ? SFX_EVENT_SAVETODOCFAILED : SFX_EVENT_SAVEASDOCFAILED,
+ SFX_APP()->NotifyEvent( SfxEventHint( bSaveTo ? SFX_EVENT_SAVETODOCFAILED : SFX_EVENT_SAVEASDOCFAILED, GlobalEventConfig::GetEventName( bSaveTo ? STR_EVENT_SAVETODOCFAILED : STR_EVENT_SAVEASDOCFAILED),
m_pData->m_pObjectShell ) );
throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), nErrCode );
@@ -2883,18 +2881,26 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
//********************************************************************************************************
-void SfxBaseModel::postEvent_Impl( ULONG nEventID )
+void SfxBaseModel::postEvent_Impl( ::rtl::OUString aName )
{
// object already disposed?
if ( impl_isDisposed() )
return;
+ DBG_ASSERT( aName.getLength(), "Empty event name!" );
+ if (!aName.getLength())
+ return;
+
::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer(
::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0) );
if( pIC )
{
- ::rtl::OUString aName = SfxEventConfiguration::GetEventName_Impl( nEventID );
+#ifdef DBG_UTIL
+ ByteString aTmp( "SfxEvent: ");
+ aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
+ DBG_TRACE( aTmp.GetBuffer() );
+#endif
document::EventObject aEvent( (frame::XModel *)this, aName );
::cppu::OInterfaceContainerHelper aIC( m_aMutex );
uno::Sequence < uno::Reference < uno::XInterface > > aElements = pIC->getElements();
diff --git a/sfx2/source/doc/sfxbasemodel.src b/sfx2/source/doc/sfxbasemodel.src
deleted file mode 100644
index 6c1753dcf1..0000000000
--- a/sfx2/source/doc/sfxbasemodel.src
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: sfxbasemodel.src,v $
- * $Revision: 1.10 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <sfx2/sfx.hrc>
-#include "sfxlocal.hrc"
-
-/*
-// the following events names are now hardcoded in the code
-StringArray EVENT_NAMES_ARY
-{
- ItemList =
- {
- < "OnStartApp" ; SFX_EVENT_STARTAPP ; > ;
- < "OnCloseApp" ; SFX_EVENT_CLOSEAPP ; > ;
- < "OnNew" ; SFX_EVENT_CREATEDOC ; > ;
- < "OnLoad" ; SFX_EVENT_OPENDOC ; > ;
- < "OnSaveAs" ; SFX_EVENT_SAVEASDOC ; > ;
- < "OnSaveAsDone" ; SFX_EVENT_SAVEASDOCDONE ; > ;
- < "OnSave" ; SFX_EVENT_SAVEDOC ; > ;
- < "OnSaveDone" ; SFX_EVENT_SAVEDOCDONE ; > ;
- < "OnPrepareUnload" ; SFX_EVENT_PREPARECLOSEDOC ; > ;
- < "OnUnload" ; SFX_EVENT_CLOSEDOC ; > ;
- < "OnFocus" ; SFX_EVENT_ACTIVATEDOC ; > ;
- < "OnUnfocus" ; SFX_EVENT_DEACTIVATEDOC ; > ;
- < "OnPrint" ; SFX_EVENT_PRINTDOC ; > ;
- < "OnModifyChanged" ; SFX_EVENT_MODIFYCHANGED ; > ;
- < "OnCopyTo" ; SFX_EVENT_SAVETODOC ; > ;
- < "OnCopyToDone" ; SFX_EVENT_SAVETODOCDONE ; > ;
- < "OnViewCreated" ; SFX_EVENT_VIEWCREATED ; > ;
- < "OnPrepareViewClosing"; SFX_EVENT_PREPARECLOSEVIEW ; > ;
- < "OnViewClosed" ; SFX_EVENT_CLOSEVIEW ; > ;
- < "OnVisAreaChanged" ; SFX_EVENT_VISAREACHANGED ; > ;
- < "OnCreate" ; SFX_EVENT_DOCCREATED ; > ;
- < "OnLoadFinished" ; SFX_EVENT_LOADFINISHED ; > ;
- < "OnSaveAsFailed" ; SFX_EVENT_SAVEASDOCFAILED ; > ;
- < "OnSaveFailed" ; SFX_EVENT_SAVEDOCFAILED ; > ;
- < "OnCopyToFailed" ; SFX_EVENT_SAVETODOCFAILED ; > ;
- };
-};
-*/
-
-/*
- these events are defined by the applications or aren't used
- any longer
-
- < "OnNewMail" ; SFX_EVENT_NEWMESSAGE ; > ;
- < "OnError" ; SFX_EVENT_ONERROR ; > ;
- < "OnSelect" ; > ;
- < "OnInsertStart" ; > ;
- < "OnInsertDone" ; > ;
- < "OnMailMerge" ; > ;
- < "OnAlphaCharInput" ; > ;
- < "OnNonAlphaCharInput" ; > ;
- < "OnResize" ; > ;
- < "OnMove" ; > ;
- < "OnPageCountChange" ; > ;
- < "OnMouseOver" ; SFX_EVENT_MOUSEOVER_OBJECT ; > ;
- < "OnClick" ; SFX_EVENT_MOUSECLICK_OBJECT ; > ;
- < "OnMouseOut" ; SFX_EVENT_MOUSEOUT_OBJECT ; > ;
- < "OnLoadError" ; > ;
- < "OnLoadCancel" ; > ;
- < "OnLoadDone" ; > ;
- < "OnLoadFinished" ; SFX_EVENT_LOADFINISHED ; > ;
- < "OnSaveFinished" ; SFX_EVENT_SAVEFINISHED ; > ;
- < "OnModifyChanged" ; SFX_EVENT_MODIFYCHANGED ; > ;
- < "OnToggleFullscreen" ; SFX_EVENT_TOGGLEFULLSCREENMODE ; > ;
-*/
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index 4520fd6c3d..f1a10d7b5f 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -187,7 +187,6 @@ class SfxGlobalEvents_Impl : public ModelCollectionMutexBase
, ::com::sun::star::document::XEventListener
, ::com::sun::star::document::XDocumentEventListener
, ::com::sun::star::container::XSet >
- , public SfxListener
{
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMGR;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xEvents;
@@ -197,8 +196,6 @@ class SfxGlobalEvents_Impl : public ModelCollectionMutexBase
TModelList m_lModels;
GlobalEventConfig* pImp;
- void Notify( SfxBroadcaster& aBC, const SfxHint& aHint );
-
public:
SfxGlobalEvents_Impl(const com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& xSMGR);
virtual ~SfxGlobalEvents_Impl();
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 54a5f2eca6..8ee3b79a6f 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,6 +33,8 @@
//#include <hash_map>
#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ustring.hxx>
#include <com/sun/star/logging/XSimpleLogRing.hpp>
#include <tools/datetime.hxx>
@@ -72,6 +74,7 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
xBasicLibraries;
::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
xDialogLibraries;
+ com::sun::star::uno::Sequence < rtl::OUString > xEventNames;
::sfx2::DocumentMacroMode
aMacroMode;
SfxProgress* pProgress;
@@ -141,7 +144,6 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
SfxModule* pModule;
SfxFrame* pFrame;
SfxToolBoxConfig* pTbxConfig;
- SfxEventConfigItem_Impl* pEventConfig;
SfxObjectShellFlags eFlags;
svtools::AsynchronLink* pCloser;
String aBaseURL;
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 226da37c66..933581c7fd 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -98,12 +98,6 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const OUSTRING & aName, const ANY &
// create Configuration at first, creation might call this method also and that would overwrite everything
// we might have stored before!
- USHORT nID = (USHORT) SfxEventConfiguration::GetEventId_Impl( aName );
- OSL_ENSURE( nID, "SfxEvents_Impl::replaceByName: no ID for the given event!" );
- if ( !nID )
- // throw?
- return;
-
if ( mpObjShell && !mpObjShell->IsLoading() )
mpObjShell->SetModified( TRUE );
@@ -370,7 +364,7 @@ SfxEvents_Impl::SfxEvents_Impl( SfxObjectShell* pShell,
if ( pShell )
maEventNames = pShell->GetEventNames();
else
- maEventNames = SfxObjectShell::GetEventNames_Impl();
+ maEventNames = GlobalEventConfig().getElementNames();
maEventData = SEQUENCE < ANY > ( maEventNames.getLength() );
@@ -646,24 +640,6 @@ SfxGlobalEvents_Impl::~SfxGlobalEvents_Impl()
}
//-----------------------------------------------------------------------------
-void SfxGlobalEvents_Impl::Notify( SfxBroadcaster& /*aBC*/, const SfxHint& aHint )
-{
- SfxEventHint* pNamedHint = PTR_CAST(SfxEventHint, &aHint);
- if (!pNamedHint)
- return;
-
- css::uno::Reference< css::document::XEventsSupplier > xSup;
-
- ::rtl::OUString sName = SfxEventConfiguration::GetEventName_Impl(pNamedHint->GetEventId());
- SfxObjectShell* pShell = pNamedHint->GetObjShell();
- if (pShell)
- xSup = css::uno::Reference< css::document::XEventsSupplier >(pShell->GetModel(), UNO_QUERY);
-
- css::document::EventObject aEvent(xSup, sName);
- notifyEvent(aEvent);
-}
-
-//-----------------------------------------------------------------------------
css::uno::Reference< css::container::XNameReplace > SAL_CALL SfxGlobalEvents_Impl::getEvents()
throw(css::uno::RuntimeException)
{
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index d1487d3ebb..e5d7ca0693 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -296,7 +296,7 @@ sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing )
bOther = ( pFrame->GetFrame() != this );
}
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEVIEW, pCur) );
+ SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur) );
if ( bOther )
// if there are other views only the current view of this frame must be asked
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 3d95c81f6e..cab7101731 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -79,6 +79,7 @@
namespace css = ::com::sun::star;
#endif
+#include <sfx2/doctempl.hxx>
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
#include <sfx2/sfxsids.hrc>
@@ -396,76 +397,88 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const css::uno::Sequence< css::bean
return bLoadState;
}
- String sStandardTemplate = SfxObjectFactory::GetStandardTemplate( aServiceName );
- BOOL bUseDefaultTemplate = (sStandardTemplate.Len()>0);
- if( bUseDefaultTemplate )
- {
- // #i21583#
- // Forget the filter, which was detected for the corresponding "private:factory/xxx" URL.
- // We must use the right filter, matching to this document ... not to the private URL!
- const SfxFilter* pTemplateFilter = impl_detectFilterForURL(sStandardTemplate, rArgs, rMatcher);
- if (pTemplateFilter)
- {
- pFilter = pTemplateFilter;
- aFilterName = pTemplateFilter->GetName();
- // standard template set -> load it "AsTemplate"
- aSet.Put( SfxStringItem ( SID_FILE_NAME, sStandardTemplate ) );
- aSet.Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
- }
+ String sTemplateURL;
+ SFX_ITEMSET_ARG( &aSet, pTemplateRegionItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, FALSE );
+ SFX_ITEMSET_ARG( &aSet, pTemplateNameItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE );
+ if ( pTemplateRegionItem && pTemplateNameItem )
+ {
+ SfxDocumentTemplates aTmpFac;
+ aTmpFac.GetFull( pTemplateRegionItem->GetValue(), pTemplateNameItem->GetValue(), sTemplateURL );
+ }
+ else
+ {
+ sTemplateURL = SfxObjectFactory::GetStandardTemplate( aServiceName );
+ }
- // #119268#
- // something is wrong with the set default template (e.g. unknown format, missing file etcpp)
- // The we have to jump into the following special code, where "private:factory/ URL's are handled.
- // We cant "load" such private/factory URL's!
- else
- bUseDefaultTemplate = FALSE;
+ BOOL bUseTemplate = (sTemplateURL.Len()>0);
+ if( bUseTemplate )
+ {
+ // #i21583#
+ // Forget the filter, which was detected for the corresponding "private:factory/xxx" URL.
+ // We must use the right filter, matching to this document ... not to the private URL!
+ const SfxFilter* pTemplateFilter = impl_detectFilterForURL(sTemplateURL, rArgs, rMatcher);
+ if (pTemplateFilter)
+ {
+ pFilter = pTemplateFilter;
+ aFilterName = pTemplateFilter->GetName();
+ // standard template set -> load it "AsTemplate"
+ aSet.Put( SfxStringItem ( SID_FILE_NAME, sTemplateURL ) );
+ aSet.Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
}
- if ( !bUseDefaultTemplate )
- {
- // execute "NewDocument" request
- /* Attention!
- #107913#
- Pointers can't be used to check if two objects are equals!
- E.g. the memory manager can reuse freed memory ...
- and then the holded copy of a pointer will point to another
- (and different!) object - may using the same type then before.
- In such case we compare one object with itself ...
- */
- SfxRequest aReq( SID_NEWDOCDIRECT, SFX_CALLMODE_SYNCHRON, aSet );
- aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, pFrame ) );
- aReq.AppendItem( SfxStringItem( SID_NEWDOCDIRECT, aFact ) );
-
- if ( pDocumentTitleItem )
- aReq.AppendItem( *pDocumentTitleItem );
-
- const SfxPoolItem* pRet = pApp->NewDocDirectExec_ImplOld(aReq);
- if (pRet)
- {
- // default must be set to true, because some return values
- // cant be checked ... but indicates "success"!
- bLoadState = sal_True;
+ // #119268#
+ // something is wrong with the set default template (e.g. unknown format, missing file etcpp)
+ // The we have to jump into the following special code, where "private:factory/ URL's are handled.
+ // We cant "load" such private/factory URL's!
+ else
+ bUseTemplate = FALSE;
+ }
- // On the other side some special slots return a boolean state,
- // which can be set to FALSE.
- SfxBoolItem *pItem = PTR_CAST( SfxBoolItem, pRet );
- if (pItem)
- bLoadState = pItem->GetValue();
- }
- else
- bLoadState = sal_False;
+ if ( !bUseTemplate )
+ {
+ // execute "NewDocument" request
+ /* Attention!
+ #107913#
+ Pointers can't be used to check if two objects are equals!
+ E.g. the memory manager can reuse freed memory ...
+ and then the holded copy of a pointer will point to another
+ (and different!) object - may using the same type then before.
+ In such case we compare one object with itself ...
+ */
+ SfxRequest aReq( SID_NEWDOCDIRECT, SFX_CALLMODE_SYNCHRON, aSet );
+ aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, pFrame ) );
+ aReq.AppendItem( SfxStringItem( SID_NEWDOCDIRECT, aFact ) );
+
+ if ( pDocumentTitleItem )
+ aReq.AppendItem( *pDocumentTitleItem );
+
+ const SfxPoolItem* pRet = pApp->NewDocDirectExec_ImplOld(aReq);
+ if (pRet)
+ {
+ // default must be set to true, because some return values
+ // cant be checked ... but indicates "success"!
+ bLoadState = sal_True;
- if ( !bLoadState && bFrameCreated && wFrame && !wFrame->GetCurrentDocument() )
- {
- css::uno::Reference< css::frame::XFrame > axFrame;
- wFrame->SetFrameInterface_Impl( axFrame );
- wFrame->DoClose();
- }
+ // On the other side some special slots return a boolean state,
+ // which can be set to FALSE.
+ SfxBoolItem *pItem = PTR_CAST( SfxBoolItem, pRet );
+ if (pItem)
+ bLoadState = pItem->GetValue();
+ }
+ else
+ bLoadState = sal_False;
- xFrame.clear();
- xListener.clear();
- return bLoadState;
+ if ( !bLoadState && bFrameCreated && wFrame && !wFrame->GetCurrentDocument() )
+ {
+ css::uno::Reference< css::frame::XFrame > axFrame;
+ wFrame->SetFrameInterface_Impl( axFrame );
+ wFrame->DoClose();
}
+
+ xFrame.clear();
+ xListener.clear();
+ return bLoadState;
+ }
}
else
{
diff --git a/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx
index 6be24a75e2..899b082c89 100644
--- a/sfx2/source/view/prnmon.cxx
+++ b/sfx2/source/view/prnmon.cxx
@@ -388,7 +388,7 @@ IMPL_LINK_INLINE_END( SfxPrintProgress, PrintErrorNotify, void *, EMPTYARG )
IMPL_LINK( SfxPrintProgress, StartPrintNotify, void *, EMPTYARG )
{
SfxObjectShell *pObjShell = pImp->pViewShell->GetObjectShell();
- SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_PRINTDOC, pObjShell));
+ SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_PRINTDOC, GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ), pObjShell));
pObjShell->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_STARTED, NULL, NULL ) );
return 0;
}
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 029a160fa3..5a64421423 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1148,9 +1148,9 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
if ( m_pData->m_bIsFrameReleasedWithController )
{
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEVIEW, pDoc ) );
+ SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc ) );
if ( !pView )
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, pDoc) );
+ SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), pDoc) );
}
REFERENCE< XMODEL > xModel = pDoc->GetModel();
diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx
index ea7dd77f98..bf88a5775d 100644
--- a/sfx2/source/view/topfrm.cxx
+++ b/sfx2/source/view/topfrm.cxx
@@ -210,6 +210,9 @@ long SfxTopWindow_Impl::Notify( NotifyEvent& rNEvt )
if ( nHelpId )
SfxHelp::OpenHelpAgent( pFrame, nHelpId );
+ // if focus was on an external window, the clipboard content might have been changed
+ pView->GetBindings().Invalidate( SID_PASTE );
+ pView->GetBindings().Invalidate( SID_PASTE_SPECIAL );
return sal_True;
}
else if( rNEvt.GetType() == EVENT_KEYINPUT )
@@ -1016,7 +1019,7 @@ sal_Bool SfxTopFrame::InsertDocument( SfxObjectShell* pDoc )
GetCurrentViewFrame()->Resize(TRUE);
}
- SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_VIEWCREATED, pDoc ) );
+ SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), pDoc ) );
return sal_True;
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 2ad6ea9377..8f406833a5 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -867,7 +867,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( xNewObj.Is() )
{
// Propagate document closure.
- SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_CLOSEDOC, xOldObj ) );
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), xOldObj ) );
}
// als erledigt recorden
@@ -1145,7 +1145,7 @@ void SfxViewFrame::SetObjectShell_Impl
SwitchToViewShell_Impl( !IsRestoreView_Impl() ? (sal_uInt16) 0 : GetCurViewId() );
rObjSh.PostActivateEvent_Impl( this );
if ( Current() == this )
- SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_ACTIVATEDOC, &rObjSh ) );
+ SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC ), &rObjSh ) );
Notify( rObjSh, SfxSimpleHint(SFX_HINT_TITLECHANGED) );
Notify( rObjSh, SfxSimpleHint(SFX_HINT_DOCCHANGED) );
@@ -1518,6 +1518,8 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
case SFX_HINT_MODECHANGED:
{
// r/o Umschaltung?
+ SfxBindings& rBind = GetBindings();
+ rBind.Invalidate( SID_RELOAD );
SfxDispatcher *pDispat = GetDispatcher();
sal_Bool bWasReadOnly = pDispat->GetReadOnly_Impl();
sal_Bool bIsReadOnly = xObjSh->IsReadOnly();
@@ -1525,8 +1527,9 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
// Dann auch TITLE_CHANGED
UpdateTitle();
- GetBindings().Invalidate( SID_FILE_NAME );
- GetBindings().Invalidate( SID_DOCINFO_TITLE );
+ rBind.Invalidate( SID_FILE_NAME );
+ rBind.Invalidate( SID_DOCINFO_TITLE );
+ rBind.Invalidate( SID_EDITDOC );
pDispat->GetBindings()->InvalidateAll(sal_True);
pDispat->SetReadOnly_Impl( bIsReadOnly );
@@ -1547,8 +1550,11 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
case SFX_HINT_TITLECHANGED:
{
UpdateTitle();
- GetBindings().Invalidate( SID_FILE_NAME );
- GetBindings().Invalidate( SID_DOCINFO_TITLE );
+ SfxBindings& rBind = GetBindings();
+ rBind.Invalidate( SID_FILE_NAME );
+ rBind.Invalidate( SID_DOCINFO_TITLE );
+ rBind.Invalidate( SID_EDITDOC );
+ rBind.Invalidate( SID_RELOAD );
break;
}
@@ -1576,12 +1582,16 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
rBind.Invalidate( SID_DOC_MODIFIED );
rBind.Invalidate( SID_SAVEDOC );
rBind.Invalidate( SID_RELOAD );
+ rBind.Invalidate( SID_EDITDOC );
break;
}
case SFX_EVENT_OPENDOC:
case SFX_EVENT_CREATEDOC:
{
+ SfxBindings& rBind = GetBindings();
+ rBind.Invalidate( SID_RELOAD );
+ rBind.Invalidate( SID_EDITDOC );
if ( !xObjSh->IsReadOnly() )
{
// Im Gegensatz zu oben (TITLE_CHANGED) mu\s das UI nicht
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index e26b788ed1..81809c8980 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -45,6 +45,8 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <svtools/acceleratorexecute.hxx>
+#include <queue>
+
// forward ---------------------------------------------------------------
class SfxOfficeDispatch;
@@ -54,6 +56,20 @@ typedef SfxShell* SfxShellPtr_Impl;
SV_DECL_PTRARR( SfxShellArr_Impl, SfxShellPtr_Impl, 4, 4 )
// struct SfxViewShell_Impl ----------------------------------------------
+class SfxAsyncPrintExec_Impl : public SfxListener
+{
+ SfxViewShell* pView;
+ ::std::queue < SfxRequest*> aReqs;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+public:
+ SfxAsyncPrintExec_Impl( SfxViewShell* pShell)
+ : pView( pShell )
+ {}
+
+ void AddRequest( SfxRequest& rReq );
+};
struct SfxViewShell_Impl
{
@@ -78,6 +94,7 @@ struct SfxViewShell_Impl
USHORT nFamily;
SfxBaseController* pController;
::svt::AcceleratorExecute* pAccExec;
+ SfxAsyncPrintExec_Impl* pPrinterCommandQueue;
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts;
SfxViewShell_Impl()
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index eb7c3b11ee..0f1ae3d110 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -53,6 +53,7 @@
#include <tools/datetime.hxx>
#include <sfx2/viewsh.hxx>
+#include <sfx2/dispatch.hxx>
#include "viewimp.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/prnmon.hxx>
@@ -71,6 +72,43 @@ TYPEINIT1(SfxPrintingHint, SfxHint);
// -----------------------------------------------------------------------
+void SfxAsyncPrintExec_Impl::AddRequest( SfxRequest& rReq )
+{
+ if ( rReq.GetArgs() )
+ {
+ // only queue API requests
+ if ( aReqs.empty() )
+ StartListening( *pView->GetObjectShell() );
+
+ aReqs.push( new SfxRequest( rReq ) );
+ }
+}
+
+void SfxAsyncPrintExec_Impl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ if ( &rBC == pView->GetObjectShell() )
+ {
+ SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint );
+ if ( pPrintHint && pPrintHint->GetWhich() == com::sun::star::view::PrintableState_JOB_COMPLETED )
+ {
+ while ( aReqs.front() )
+ {
+ SfxRequest* pReq = aReqs.front();
+ aReqs.pop();
+ pView->GetViewFrame()->GetDispatcher()->Execute( pReq->GetSlot(), SFX_CALLMODE_ASYNCHRON, *pReq->GetArgs() );
+ USHORT nSlot = pReq->GetSlot();
+ delete pReq;
+ if ( nSlot == SID_PRINTDOC || nSlot == SID_PRINTDOCDIRECT )
+ // print jobs must be executed before the next command can be dispatched
+ break;
+ }
+
+ if ( aReqs.empty() )
+ EndListening( *pView->GetObjectShell() );
+ }
+ }
+}
+
void DisableRanges( PrintDialog& rDlg, SfxPrinter* pPrinter )
/* [Beschreibung]
@@ -389,13 +427,19 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
USHORT nCopies=1;
USHORT nDialogRet = RET_CANCEL;
- BOOL bCollate=FALSE;
+ BOOL bCollate=TRUE;
SfxPrinter* pPrinter = 0;
PrintDialog* pPrintDlg = 0;
SfxDialogExecutor_Impl* pExecutor = 0;
bool bSilent = false;
BOOL bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count();
+ if ( bIsAPI && GetPrinter( FALSE ) && GetPrinter( FALSE )->IsPrinting() )
+ {
+ pImp->pPrinterCommandQueue->AddRequest( rReq );
+ return;
+ }
+
const USHORT nId = rReq.GetSlot();
switch( nId )
{
@@ -866,8 +910,11 @@ ErrCode SfxViewShell::DoPrint( SfxPrinter *pPrinter,
else if ( pDocPrinter != pPrinter )
{
pProgress->RestoreOnEndPrint( pDocPrinter->Clone() );
- SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
+ USHORT nError = SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
+ if ( nError != SFX_PRINTERROR_NONE )
+ return PRINTER_ACCESSDENIED;
}
+
pProgress->SetWaitMode(FALSE);
// Drucker starten
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 426e9bb953..7d41d2bfa0 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -47,6 +47,9 @@
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/container/XContainerQuery.hpp>
#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
+#include <cppuhelper/implbase1.hxx>
#include <osl/file.hxx>
#include <vos/mutex.hxx>
@@ -112,6 +115,68 @@ DBG_NAME(SfxViewShell)
//=========================================================================
+class SfxClipboardChangeListener : public ::cppu::WeakImplHelper1<
+ datatransfer::clipboard::XClipboardListener >
+{
+ SfxViewShell* pViewShell;
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const lang::EventObject& rEventObject )
+ throw ( uno::RuntimeException );
+
+ // XClipboardListener
+ virtual void SAL_CALL changedContents( const datatransfer::clipboard::ClipboardEvent& rEventObject )
+ throw ( uno::RuntimeException );
+
+public:
+ SfxClipboardChangeListener( SfxViewShell* pView );
+ virtual ~SfxClipboardChangeListener();
+};
+
+SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView )
+: pViewShell( 0 )
+{
+ uno::Reference < lang::XComponent > xCtrl( pView->GetController(), uno::UNO_QUERY );
+ if ( xCtrl.is() )
+ {
+ xCtrl->addEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) );
+ pViewShell = pView;
+ }
+}
+
+SfxClipboardChangeListener::~SfxClipboardChangeListener()
+{
+}
+
+void SAL_CALL SfxClipboardChangeListener::disposing( const lang::EventObject& /*rEventObject*/ )
+throw ( uno::RuntimeException )
+{
+ // either clipboard or ViewShell is going to be destroyed -> no interest in listening anymore
+ const ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( pViewShell )
+ {
+ uno::Reference < lang::XComponent > xCtrl( pViewShell->GetController(), uno::UNO_QUERY );
+ if ( xCtrl.is() )
+ xCtrl->removeEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) );
+ pViewShell->AddRemoveClipboardListener( uno::Reference < datatransfer::clipboard::XClipboardListener > (this), FALSE );
+ pViewShell = 0;
+ }
+}
+
+void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::clipboard::ClipboardEvent& )
+ throw ( RuntimeException )
+{
+ const ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if( pViewShell )
+ {
+ SfxBindings& rBind = pViewShell->GetViewFrame()->GetBindings();
+ rBind.Invalidate( SID_PASTE );
+ rBind.Invalidate( SID_PASTE_SPECIAL );
+ rBind.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
+ }
+}
+
+
static ::rtl::OUString RetrieveLabelFromCommand(
const ::rtl::OUString& rCommandURL,
const css::uno::Reference< css::frame::XFrame >& rFrame )
@@ -687,6 +752,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
case SID_PRINTDOC:
case SID_PRINTDOCDIRECT:
case SID_SETUPPRINTER:
+ case SID_PRINTER_NAME:
{
BOOL bEnabled = pImp->bCanPrint && !pImp->nPrinterLocks;
bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
@@ -720,9 +786,10 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
}
if ( !bEnabled )
{
- rSet.DisableItem( SID_PRINTDOC );
+ // will now be handled by requeing the request
+ /* rSet.DisableItem( SID_PRINTDOC );
rSet.DisableItem( SID_PRINTDOCDIRECT );
- rSet.DisableItem( SID_SETUPPRINTER );
+ rSet.DisableItem( SID_SETUPPRINTER ); */
}
break;
}
@@ -1187,6 +1254,7 @@ SfxViewShell::SfxViewShell
{
DBG_CTOR(SfxViewShell, 0);
+ pImp->pPrinterCommandQueue = new SfxAsyncPrintExec_Impl( this );
pImp->pController = 0;
pImp->bIsShowView =
!(SFX_VIEW_NO_SHOW == (nFlags & SFX_VIEW_NO_SHOW));
@@ -1240,6 +1308,8 @@ SfxViewShell::~SfxViewShell()
delete pImp->pAccExec;
pImp->pAccExec = 0;
}
+
+ delete pImp->pPrinterCommandQueue;
delete pImp;
delete pIPClientList;
}
@@ -1926,6 +1996,8 @@ void SfxViewShell::SetController( SfxBaseController* pController )
pImp->pController = pController;
pImp->pController->acquire();
pImp->bControllerSet = TRUE;
+
+ AddRemoveClipboardListener( new SfxClipboardChangeListener( this ), TRUE );
}
Reference < XController > SfxViewShell::GetController()
@@ -2128,3 +2200,25 @@ BOOL SfxViewShell::Escape()
{
return GetViewFrame()->GetBindings().Execute( SID_TERMINATE_INPLACEACTIVATION );
}
+
+void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, BOOL bAdd )
+{
+ try
+ {
+ uno::Reference< datatransfer::clipboard::XClipboard > xClipboard( GetViewFrame()->GetWindow().GetClipboard() );
+ if( !xClipboard.is() )
+ return;
+
+ uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClpbrdNtfr( xClipboard, uno::UNO_QUERY );
+ if( xClpbrdNtfr.is() )
+ {
+ if( bAdd )
+ xClpbrdNtfr->addClipboardListener( rClp );
+ else
+ xClpbrdNtfr->removeClipboardListener( rClp );
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ }
+}
diff --git a/svx/inc/optgenrl.hrc b/svx/inc/optgenrl.hrc
index a0d06878a9..898b66b520 100644
--- a/svx/inc/optgenrl.hrc
+++ b/svx/inc/optgenrl.hrc
@@ -63,6 +63,7 @@
#define ED_EMAIL 38
#define GB_ADDRESS 39
#define CB_USEDATA 40
+#define FT_NAME_EASTERN 41
#define STR_US_STATE 10
#define STR_QUERY_REG 11
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index c97d7bb74f..08652fad52 100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -1239,7 +1239,7 @@
#define RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION (RID_SVX_START + 1050)
#define RID_SVXSTR_EVENT_STARTAPP (RID_SVX_START + 1051)
#define RID_SVXSTR_EVENT_CLOSEAPP (RID_SVX_START + 1052)
-#define RID_SVXSTR_EVENT_CREATEDOC (RID_SVX_START + 1053)
+#define RID_SVXSTR_EVENT_NEWDOC (RID_SVX_START + 1053)
#define RID_SVXSTR_EVENT_CLOSEDOC (RID_SVX_START + 1054)
#define RID_SVXSTR_EVENT_PREPARECLOSEDOC (RID_SVX_START + 1055)
#define RID_SVXSTR_EVENT_OPENDOC (RID_SVX_START + 1056)
@@ -1370,9 +1370,28 @@
#define STR_LINKEDDOC_NO_SYSTEM_FILE (RID_SVX_START + 1169)
#define RID_SVXSTR_EVENT_SUBCOMPONENT_OPENED (RID_SVX_START + 1170)
#define RID_SVXSTR_EVENT_SUBCOMPONENT_CLOSED (RID_SVX_START + 1171)
+
+#define RID_SVXSTR_EVENT_CREATEDOC (RID_SVX_START + 1172)
+#define RID_SVXSTR_EVENT_LOADDOCFINISHED (RID_SVX_START + 1173)
+#define RID_SVXSTR_EVENT_SAVEDOCFAILED (RID_SVX_START + 1174)
+#define RID_SVXSTR_EVENT_SAVEASDOCFAILED (RID_SVX_START + 1175)
+#define RID_SVXSTR_EVENT_COPYTODOC (RID_SVX_START + 1176)
+#define RID_SVXSTR_EVENT_COPYTODOCDONE (RID_SVX_START + 1177)
+#define RID_SVXSTR_EVENT_COPYTODOCFAILED (RID_SVX_START + 1178)
+#define RID_SVXSTR_EVENT_VIEWCREATED (RID_SVX_START + 1179)
+#define RID_SVXSTR_EVENT_PREPARECLOSEVIEW (RID_SVX_START + 1180)
+#define RID_SVXSTR_EVENT_CLOSEVIEW (RID_SVX_START + 1181)
+#define RID_SVXSTR_EVENT_TITLECHANGED (RID_SVX_START + 1182)
+#define RID_SVXSTR_EVENT_MODECHANGED (RID_SVX_START + 1183)
+#define RID_SVXSTR_EVENT_VISAREACHANGED (RID_SVX_START + 1184)
+#define RID_SVXSTR_EVENT_STORAGECHANGED (RID_SVX_START + 1185)
+#define RID_SVXSTR_EVENT_MAILMERGE_END (RID_SVX_START + 1186)
+#define RID_SVXSTR_EVENT_FIELDMERGE (RID_SVX_START + 1187)
+#define RID_SVXSTR_EVENT_FIELDMERGE_FINISHED (RID_SVX_START + 1188)
+#define RID_SVXSTR_EVENT_LAYOUT_FINISHED (RID_SVX_START + 1189)
// if you add here, remember to adjust RID_SVXSTR_NEXTFREE
-#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1172)
+#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1190)
// ----------------------------------------------------------------------------
// if we have _a_lot_ time, we should group the resource ids by type, instead
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index c6e3f62d3e..eb35d48735 100644
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -1177,7 +1177,6 @@
#define SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ( SID_SVX_START + 919 )
#define SID_ATTR_CHAR_RELIEF ( SID_SVX_START + 920 )
#define SID_LANGUAGE_OPTIONS ( SID_SVX_START + 921 )
-#define SID_CLIPBOARD_FORMAT_ITEMS ( SID_SVX_START + 922 )
#define SID_GETUNDOSTRINGS ( SID_SVX_START + 923 )
#define SID_GETREDOSTRINGS ( SID_SVX_START + 924 )
#define SID_PARA_VERTALIGN ( SID_SVX_START + 925 )
@@ -1350,6 +1349,7 @@
#define SID_CHAR_DLG_PREVIEW_STRING (SID_SVX_START+1090)
#define SID_RECHECK_DOCUMENT (SID_SVX_START+1091)
#define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092)
+#define SID_OBJECT_MIRROR (SID_SVX_START+1093)
#define SID_INSERT_POSTIT (SID_SVX_START+1093)
#define SID_DELETE_POSTIT (SID_SVX_START+1094)
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index dc303bad57..28f50ef89b 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -1974,34 +1974,6 @@ SfxVoidItem ClearOutline SID_OUTLINE_DELETEALL
]
//--------------------------------------------------------------------------
-SfxVoidItem ClipboardFormatItems SID_CLIPBOARD_FORMAT_ITEMS
-(SfxUInt32Item SelectedFormat SID_CLIPBOARD_FORMAT_ITEMS)
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = TRUE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* status: */
- SlotType = SvxClipboardFmtItem
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_EDIT;
-]
-
-//--------------------------------------------------------------------------
SvxColorItem Color SID_ATTR_CHAR_COLOR
[
@@ -3797,7 +3769,7 @@ SfxObjectItem FmFilterNavigatorController SID_FM_FILTER_NAVIGATOR_CONTROL
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -4806,7 +4778,7 @@ SfxStringListItem GetRedoStrings SID_GETREDOSTRINGS
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = TRUE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -4833,7 +4805,7 @@ SfxStringListItem GetUndoStrings SID_GETUNDOSTRINGS
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = TRUE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -7672,7 +7644,7 @@ SfxVoidItem OutlineBullet SID_OUTLINE_BULLET
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = TRUE,
@@ -8654,7 +8626,7 @@ SfxBoolItem ReadOnlyMode SID_READONLY_MODE
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = TRUE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -9526,7 +9498,7 @@ SfxVoidItem Select SID_SELECT
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -11130,7 +11102,7 @@ SfxBoolItem TwainSelect SID_TWAIN_SELECT
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = TRUE,
@@ -11155,7 +11127,7 @@ SfxVoidItem TwainTransfer SID_TWAIN_TRANSFER
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = TRUE,
diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi
index 38baee2567..377b40130c 100644
--- a/svx/sdi/svxitems.sdi
+++ b/svx/sdi/svxitems.sdi
@@ -668,7 +668,6 @@ struct SvxCharRotate
};
item SvxCharRotate SvxCharRotateItem;
-item String SvxClipboardFmtItem; // dummy
item String SfxSetItem; // dummy
item INT16 SvxRotateModeItem; // enum
item INT16 SvxOrientationItem; // enum
diff --git a/svx/source/cui/cuioptgenrl.hxx b/svx/source/cui/cuioptgenrl.hxx
index bed2f38296..818c23478d 100644
--- a/svx/source/cui/cuioptgenrl.hxx
+++ b/svx/source/cui/cuioptgenrl.hxx
@@ -80,6 +80,7 @@ private:
SvxUserEdit aCompanyEdit;
FixedText aNameLbl;
FixedText aNameLblRuss;
+ FixedText aNameLblEastern;
SvxUserEdit aFirstName;
SvxUserEdit aFatherName;
SvxUserEdit aName;
diff --git a/svx/source/cui/macropg.cxx b/svx/source/cui/macropg.cxx
index 91ed9830f5..f705df676b 100644
--- a/svx/source/cui/macropg.cxx
+++ b/svx/source/cui/macropg.cxx
@@ -271,22 +271,42 @@ void _SvxMacroTabPage::InitResources()
// the event name to UI string mappings for App Events
aDisplayNames.push_back( EventDisplayName( "OnStartApp", RID_SVXSTR_EVENT_STARTAPP ) );
aDisplayNames.push_back( EventDisplayName( "OnCloseApp", RID_SVXSTR_EVENT_CLOSEAPP ) );
- aDisplayNames.push_back( EventDisplayName( "OnNew", RID_SVXSTR_EVENT_CREATEDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnCreate", RID_SVXSTR_EVENT_CREATEDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnNew", RID_SVXSTR_EVENT_NEWDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnLoadFinished", RID_SVXSTR_EVENT_LOADDOCFINISHED ) );
aDisplayNames.push_back( EventDisplayName( "OnLoad", RID_SVXSTR_EVENT_OPENDOC ) );
- aDisplayNames.push_back( EventDisplayName( "OnSaveAs", RID_SVXSTR_EVENT_SAVEASDOC ) );
- aDisplayNames.push_back( EventDisplayName( "OnSaveAsDone", RID_SVXSTR_EVENT_SAVEASDOCDONE ) );
- aDisplayNames.push_back( EventDisplayName( "OnSave", RID_SVXSTR_EVENT_SAVEDOC ) );
- aDisplayNames.push_back( EventDisplayName( "OnSaveDone", RID_SVXSTR_EVENT_SAVEDOCDONE ) );
aDisplayNames.push_back( EventDisplayName( "OnPrepareUnload", RID_SVXSTR_EVENT_PREPARECLOSEDOC ) );
aDisplayNames.push_back( EventDisplayName( "OnUnload", RID_SVXSTR_EVENT_CLOSEDOC ) ) ;
+ aDisplayNames.push_back( EventDisplayName( "OnViewCreated", RID_SVXSTR_EVENT_VIEWCREATED ) );
+ aDisplayNames.push_back( EventDisplayName( "OnPrepareViewClosing", RID_SVXSTR_EVENT_PREPARECLOSEVIEW ) );
+ aDisplayNames.push_back( EventDisplayName( "OnViewClosed", RID_SVXSTR_EVENT_CLOSEVIEW ) ) ;
aDisplayNames.push_back( EventDisplayName( "OnFocus", RID_SVXSTR_EVENT_ACTIVATEDOC ) );
aDisplayNames.push_back( EventDisplayName( "OnUnfocus", RID_SVXSTR_EVENT_DEACTIVATEDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSave", RID_SVXSTR_EVENT_SAVEDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveDone", RID_SVXSTR_EVENT_SAVEDOCDONE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveFailed", RID_SVXSTR_EVENT_SAVEDOCFAILED ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveAs", RID_SVXSTR_EVENT_SAVEASDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveAsDone", RID_SVXSTR_EVENT_SAVEASDOCDONE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveAsFailed", RID_SVXSTR_EVENT_SAVEASDOCFAILED ) );
+ aDisplayNames.push_back( EventDisplayName( "OnCopyTo", RID_SVXSTR_EVENT_COPYTODOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnCopyToDone", RID_SVXSTR_EVENT_COPYTODOCDONE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnCopyToFailed", RID_SVXSTR_EVENT_COPYTODOCFAILED ) );
aDisplayNames.push_back( EventDisplayName( "OnPrint", RID_SVXSTR_EVENT_PRINTDOC ) );
aDisplayNames.push_back( EventDisplayName( "OnModifyChanged", RID_SVXSTR_EVENT_MODIFYCHANGED ) );
+ aDisplayNames.push_back( EventDisplayName( "OnTitleChanged", RID_SVXSTR_EVENT_TITLECHANGED ) );
+// aDisplayNames.push_back( EventDisplayName( "OnModeChanged", RID_SVXSTR_EVENT_MODECHANGED ) );
+// aDisplayNames.push_back( EventDisplayName( "OnVisAreaChanged", RID_SVXSTR_EVENT_VISAREACHANGED ) );
+// aDisplayNames.push_back( EventDisplayName( "OnStorageChanged", RID_SVXSTR_EVENT_STORAGECHANGED ) );
+
+ // application specific events
aDisplayNames.push_back( EventDisplayName( "OnMailMerge", RID_SVXSTR_EVENT_MAILMERGE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnMailMergeFinished", RID_SVXSTR_EVENT_MAILMERGE_END ) );
+ aDisplayNames.push_back( EventDisplayName( "OnFieldMerge", RID_SVXSTR_EVENT_FIELDMERGE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnFieldMergeFinished", RID_SVXSTR_EVENT_FIELDMERGE_FINISHED ) );
aDisplayNames.push_back( EventDisplayName( "OnPageCountChange", RID_SVXSTR_EVENT_PAGECOUNTCHANGE ) );
aDisplayNames.push_back( EventDisplayName( "OnSubComponentOpened", RID_SVXSTR_EVENT_SUBCOMPONENT_OPENED ) );
aDisplayNames.push_back( EventDisplayName( "OnSubComponentClosed", RID_SVXSTR_EVENT_SUBCOMPONENT_CLOSED ) );
+// aDisplayNames.push_back( EventDisplayName( "OnLayoutFinished", RID_SVXSTR_EVENT_LAYOUT_FINISHED ) );
// the event name to UI string mappings for forms & dialogs
//
@@ -571,9 +591,14 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents)
rListBox.Select( _pE );
rListBox.MakeVisible( _pE );
}
+
pE = rListBox.GetEntry(0);
if( pE )
+ {
rListBox.Select( pE );
+ rListBox.MakeVisible( pE );
+ }
+
rListBox.SetUpdateMode( TRUE );
EnableButtons( String() );
}
diff --git a/svx/source/cui/macropg.src b/svx/source/cui/macropg.src
index 63de9ec0d4..20201ec2b1 100644
--- a/svx/source/cui/macropg.src
+++ b/svx/source/cui/macropg.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,7 +65,7 @@ TabPage RID_SVXPAGE_MACROASSIGN
Pos = MAP_APPFONT ( COL4 , ROW0 ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Assign:" ;
- };
+ };
PushButton PB_ASSIGN
{
Pos = MAP_APPFONT ( COL4 , ROW0A ) ;
@@ -94,22 +94,22 @@ TabPage RID_SVXPAGE_MACROASSIGN
{
ImageBitmap = Bitmap { File = "id018.png"; };
MASKCOLOR
- };
+ };
Image IMG_COMPONENT
{
ImageBitmap = Bitmap { File = "component_16.png"; };
MASKCOLOR
- };
+ };
Image IMG_MACRO_H
{
ImageBitmap = Bitmap { File = "idh018.png"; };
MASKCOLOR
- };
+ };
Image IMG_COMPONENT_H
{
ImageBitmap = Bitmap { File = "component_16_h.png"; };
MASKCOLOR
- };
+ };
};
ModalDialog RID_SVXDLG_ASSIGNCOMPONENT
@@ -137,13 +137,13 @@ ModalDialog RID_SVXDLG_ASSIGNCOMPONENT
{
Pos = MAP_APPFONT ( COMP_COL1 , COMP_ROW2 ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- };
+ };
FixedText FT_METHOD
{
Pos = MAP_APPFONT ( COMP_COL0 , ROW0 ) ;
Size = MAP_APPFONT ( COMP_EDIT_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Component method name" ;
- };
+ };
Edit EDIT_METHOD
{
Border = TRUE ;
@@ -152,7 +152,7 @@ ModalDialog RID_SVXDLG_ASSIGNCOMPONENT
TabStop = TRUE ;
};
};
-
+
//DF
String RID_SVXSTR_EVENT_STARTAPP
@@ -165,9 +165,9 @@ String RID_SVXSTR_EVENT_CLOSEAPP
Text [ en-US ] = "Close Application" ;
};
-String RID_SVXSTR_EVENT_CREATEDOC
+String RID_SVXSTR_EVENT_NEWDOC
{
- Text [ en-US ] = "Create Document" ;
+ Text [ en-US ] = "New Document" ;
};
String RID_SVXSTR_EVENT_CLOSEDOC
@@ -177,7 +177,7 @@ String RID_SVXSTR_EVENT_CLOSEDOC
String RID_SVXSTR_EVENT_PREPARECLOSEDOC
{
- Text [ en-US ] = "Document is closing" ;
+ Text [ en-US ] = "Document is going to be closed" ;
};
String RID_SVXSTR_EVENT_OPENDOC
@@ -226,7 +226,19 @@ String RID_SVXSTR_EVENT_MODIFYCHANGED
};
String RID_SVXSTR_EVENT_MAILMERGE
{
- Text [ en-US ] = "Print form letters" ;
+ Text [ en-US ] = "Printing of form letters started" ;
+};
+String RID_SVXSTR_EVENT_MAILMERGE_END
+{
+ Text [ en-US ] = "Printing of form letters finished" ;
+};
+String RID_SVXSTR_EVENT_FIELDMERGE
+{
+ Text [ en-US ] = "Merging of form fields started" ;
+};
+String RID_SVXSTR_EVENT_FIELDMERGE_FINISHED
+{
+ Text [ en-US ] = "Merging of form fields finished" ;
};
String RID_SVXSTR_EVENT_PAGECOUNTCHANGE
{
@@ -372,3 +384,78 @@ String RID_SVXSTR_EVENT_CHANGED
{
Text [ en-US ] = "Changed" ;
};
+
+String RID_SVXSTR_EVENT_CREATEDOC
+{
+ Text [ en-US ] = "Document created" ;
+};
+
+String RID_SVXSTR_EVENT_LOADDOCFINISHED
+{
+ Text [ en-US ] = "Document loading finished" ;
+};
+
+String RID_SVXSTR_EVENT_SAVEDOCFAILED
+{
+ Text [ en-US ] = "Saving of document failed" ;
+};
+
+String RID_SVXSTR_EVENT_SAVEASDOCFAILED
+{
+ Text [ en-US ] = "'Save as' has failed" ;
+};
+
+String RID_SVXSTR_EVENT_COPYTODOC
+{
+ Text [ en-US ] = "Storing or exporting copy of document" ;
+};
+
+String RID_SVXSTR_EVENT_COPYTODOCDONE
+{
+ Text [ en-US ] = "Document copy has been created" ;
+};
+
+String RID_SVXSTR_EVENT_COPYTODOCFAILED
+{
+ Text [ en-US ] = "Creating of document copy failed" ;
+};
+
+String RID_SVXSTR_EVENT_VIEWCREATED
+{
+ Text [ en-US ] = "View created" ;
+};
+
+String RID_SVXSTR_EVENT_PREPARECLOSEVIEW
+{
+ Text [ en-US ] = "View is going to be closed" ;
+};
+
+String RID_SVXSTR_EVENT_CLOSEVIEW
+{
+ Text [ en-US ] = "View closed" ;
+};
+
+String RID_SVXSTR_EVENT_TITLECHANGED
+{
+ Text [ en-US ] = "Document title changed" ;
+};
+
+String RID_SVXSTR_EVENT_MODECHANGED
+{
+ Text [ en-US ] = "Document mode changed" ;
+};
+
+String RID_SVXSTR_EVENT_VISAREACHANGED
+{
+ Text [ en-US ] = "Visible area changed" ;
+};
+
+String RID_SVXSTR_EVENT_STORAGECHANGED
+{
+ Text [ en-US ] = "Document has got a new storage" ;
+};
+
+String RID_SVXSTR_EVENT_LAYOUT_FINISHED
+{
+ Text [ en-US ] = "Document layout finished" ;
+};
diff --git a/svx/source/cui/optgenrl.cxx b/svx/source/cui/optgenrl.cxx
index ae977c7fcc..dd30e74da2 100644
--- a/svx/source/cui/optgenrl.cxx
+++ b/svx/source/cui/optgenrl.cxx
@@ -103,6 +103,7 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSe
aCompanyEdit ( this, SVX_RES( ED_COMPANY ), INDEX_NOTSET, &aCompanyLbl ),
aNameLbl ( this, SVX_RES( FT_NAME ), true ),
aNameLblRuss ( this, SVX_RES( FT_NAME_RUSS ), true ),
+ aNameLblEastern ( this, SVX_RES( FT_NAME_EASTERN ), true ),
aFirstName ( this, SVX_RES( ED_FIRSTNAME ), 0, &aNameLbl ),
aFatherName ( this, SVX_RES( ED_FATHERNAME ) ),
aName ( this, SVX_RES( ED_NAME ), 1, &aNameLbl ),
@@ -189,6 +190,23 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSe
aFirstName.SetZOrder( &aName, WINDOW_ZORDER_BEHIND );
aFatherName.SetZOrder( &aFirstName, WINDOW_ZORDER_BEHIND );
}
+ else if ( LANGUAGE_JAPANESE == eLang ||
+ LANGUAGE_KOREAN == eLang ||
+ LANGUAGE_CHINESE_TRADITIONAL == eLang ||
+ LANGUAGE_CHINESE_SIMPLIFIED == eLang)
+ {
+ aUsCityEdit.Hide();
+ aUsStateEdit.Hide();
+ aUsZipEdit.Hide();
+ aNameLbl.Hide();
+ aNameLblEastern.Show();
+
+ // swap "first name" field and "last name" field
+ Point aPosTmp = aFirstName.GetPosPixel();
+ aFirstName.SetPosPixel( aName.GetPosPixel() );
+ aName.SetPosPixel( aPosTmp );
+ aFirstName.SetZOrder( &aName, WINDOW_ZORDER_BEHIND );
+ }
else
{
aUsCityEdit.Hide();
diff --git a/svx/source/intro/intro_tmpl.hrc b/svx/source/intro/intro_tmpl.hrc
index 680a85c933..ad3a628213 100644
--- a/svx/source/intro/intro_tmpl.hrc
+++ b/svx/source/intro/intro_tmpl.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -269,9 +269,9 @@ ItemList = \
< "Darin Fisher" ; > ; \
< "Nicole M. Follet-Dunn" ; > ; \
< "Kenneth Foskey" ; > ; \
- < "Peter Frandsen" ; > ; \
< "Duncan Foster" ; > ; \
< "Tim Foster" ; > ; \
+ < "Peter Frandsen" ; > ; \
< "Gary Frederick" ; > ; \
< "Nils Fuhrmann" ; > ; \
< "Jan Funken" ; > ; \
diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx
index fdda4c01b0..ddb8671064 100644
--- a/svx/source/mnuctrls/clipboardctl.cxx
+++ b/svx/source/mnuctrls/clipboardctl.cxx
@@ -143,16 +143,6 @@ void SvxClipBoardControl::StateChanged( USHORT nSID, SfxItemState eState, const
GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) & ~TIB_DROPDOWN );
GetToolBox().Invalidate( GetToolBox().GetItemRect( GetId() ) );
}
- #ifdef UNIX
- // #b6673979# enable some slots hardly, because UNIX clipboard does not notify all changes
- // Can be removed if follow up task will be fixed directly within applications.
- else
- if ( SID_PASTE == nSID )
- {
- bDisabled = false;
- GetToolBox().EnableItem( GetId(), true );
- }
- #endif
else
{
// enable the item as a whole
diff --git a/svx/source/options/optgenrl.src b/svx/source/options/optgenrl.src
index 681c42ced0..68e9e8ced7 100644
--- a/svx/source/options/optgenrl.src
+++ b/svx/source/options/optgenrl.src
@@ -74,6 +74,14 @@ TabPage RID_SFXPAGE_GENERAL
Hide = TRUE;
Text [ en-US ] = "Last Name/First name/Father's name/Initials";
};
+ FixedText FT_NAME_EASTERN
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 1 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Hide = TRUE;
+ Text [ en-US ] = "Last/First ~name/Initials" ;
+ };
Edit ED_FATHERNAME
{
Border = TRUE ;
diff --git a/uui/source/passworddlg.src b/uui/source/passworddlg.src
index cfc91d2725..1a22bc1f08 100644
--- a/uui/source/passworddlg.src
+++ b/uui/source/passworddlg.src
@@ -67,6 +67,7 @@ ModalDialog DLG_UUI_PASSWORD
Pos = MAP_APPFONT( 27, 56 );
Size = MAP_APPFONT( 37, 15 );
DefButton = TRUE ;
+ DefButton = TRUE;
};
CancelButton BTN_PASSWORD_CANCEL