From 9c10c47f9cfb8f7641f0bb16908e0d19ad7d08ec Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Apr 2010 23:00:12 +0200 Subject: [PATCH 001/279] CWS gnumake2: move delivered header files in from svtools/inc to svtools/inc/svtools; remove ununsed files; remove svp.res --- svx/source/form/fmshell.cxx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 2819045c237d..10c0b88903d9 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -323,10 +323,6 @@ sal_uInt16 FmFormShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing) if ( bModified && bUI ) { QueryBox aQry(NULL, SVX_RES(RID_QRY_SAVEMODIFIED)); - if (bForBrowsing) - aQry.AddButton(SVX_RES(RID_STR_NEW_TASK), RET_NEWTASK, - BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON); - switch (aQry.Execute()) { case RET_NO: From 39e9098c77157ea38411a237a6b52e0f76f12ce1 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Apr 2010 23:01:28 +0200 Subject: [PATCH 002/279] CWS gnumake2: export all symbols in framework using declspec --- .../inc/classes/actiontriggercontainer.hxx | 4 +- .../inc/classes/actiontriggerpropertyset.hxx | 3 +- .../actiontriggerseparatorpropertyset.hxx | 2 + framework/inc/classes/addonmenu.hxx | 7 +- framework/inc/classes/addonsoptions.hxx | 8 +- framework/inc/classes/bmkmenu.hxx | 4 +- framework/inc/classes/converter.hxx | 3 +- framework/inc/classes/framelistanalyzer.hxx | 3 +- framework/inc/classes/fwkresid.hxx | 3 +- framework/inc/classes/imagewrapper.hxx | 3 +- .../inc/classes/menuextensionsupplier.hxx | 7 +- framework/inc/classes/propertysethelper.hxx | 3 +- .../inc/classes/protocolhandlercache.hxx | 11 +- .../classes/rootactiontriggercontainer.hxx | 3 +- framework/inc/classes/sfxhelperfunctions.hxx | 21 +-- framework/inc/dispatch/interaction.hxx | 11 +- framework/inc/fwedllapi.h | 16 ++ framework/inc/fwidllapi.h | 13 ++ framework/inc/fwkdllapi.h | 10 ++ framework/inc/helper/acceleratorinfo.hxx | 1 + framework/inc/helper/actiontriggerhelper.hxx | 3 +- framework/inc/helper/configimporter.hxx | 3 +- framework/inc/helper/imageproducer.hxx | 5 +- framework/inc/helper/mischelper.hxx | 135 ++++++++--------- framework/inc/helper/networkdomain.hxx | 3 +- .../inc/helper/popupmenucontrollerbase.hxx | 3 +- framework/inc/helper/propertysetcontainer.hxx | 3 +- framework/inc/helper/shareablemutex.hxx | 3 +- framework/inc/helper/titlehelper.hxx | 3 +- .../inc/helper/uiconfigelementwrapperbase.hxx | 3 +- framework/inc/helper/uielementwrapperbase.hxx | 3 +- .../preventduplicateinteraction.hxx | 3 +- framework/inc/jobs/configaccess.hxx | 3 +- framework/inc/jobs/jobconst.hxx | 4 +- framework/inc/threadhelp/lockhelper.hxx | 5 +- .../inc/threadhelp/transactionmanager.hxx | 3 +- .../inc/uielement/constitemcontainer.hxx | 3 +- framework/inc/uielement/itemcontainer.hxx | 4 +- framework/inc/uielement/rootitemcontainer.hxx | 5 +- framework/inc/xml/eventsconfiguration.hxx | 5 +- framework/inc/xml/eventsdocumenthandler.hxx | 5 +- framework/inc/xml/imagesconfiguration.hxx | 13 +- framework/inc/xml/imagesdocumenthandler.hxx | 7 +- framework/inc/xml/menuconfiguration.hxx | 3 +- framework/inc/xml/menudocumenthandler.hxx | 13 +- framework/inc/xml/saxnamespacefilter.hxx | 3 +- framework/inc/xml/statusbarconfiguration.hxx | 5 +- .../inc/xml/statusbardocumenthandler.hxx | 5 +- framework/inc/xml/toolboxconfiguration.hxx | 3 +- framework/inc/xml/toolboxdocumenthandler.hxx | 5 +- framework/inc/xml/xmlnamespaces.hxx | 3 +- framework/prj/build.lst | 38 +++-- framework/prj/d.lst | 3 + framework/source/classes/makefile.mk | 33 ++--- framework/source/dispatch/makefile.mk | 1 - .../classes/actiontriggercontainer.cxx | 0 .../classes/actiontriggerpropertyset.cxx | 2 + .../actiontriggerseparatorpropertyset.cxx | 0 .../source/{ => fwe}/classes/addonmenu.cxx | 0 .../{ => fwe}/classes/addonsoptions.cxx | 0 .../source/{ => fwe}/classes/bmkmenu.cxx | 0 .../source/{ => fwe}/classes/fwkresid.cxx | 0 .../source/{ => fwe}/classes/imagewrapper.cxx | 0 framework/source/fwe/classes/makefile.mk | 62 ++++++++ .../classes/menuextensionsupplier.cxx | 0 .../classes/rootactiontriggercontainer.cxx | 0 .../{ => fwe}/classes/sfxhelperfunctions.cxx | 2 - .../source/{ => fwe}/dispatch/interaction.cxx | 1 + framework/source/fwe/dispatch/makefile.mk | 52 +++++++ .../{ => fwe}/helper/acceleratorinfo.cxx | 0 .../{ => fwe}/helper/actiontriggerhelper.cxx | 0 .../{ => fwe}/helper/configimporter.cxx | 0 .../source/{ => fwe}/helper/imageproducer.cxx | 0 framework/source/fwe/helper/makefile.mk | 59 ++++++++ .../{ => fwe}/helper/propertysetcontainer.cxx | 0 .../source/{ => fwe}/helper/titlehelper.cxx | 0 .../helper/uiconfigelementwrapperbase.cxx | 0 .../{ => fwe}/helper/uielementwrapperbase.cxx | 0 framework/source/fwe/interaction/makefile.mk | 52 +++++++ .../preventduplicateinteraction.cxx | 0 .../{ => fwe}/xml/eventsconfiguration.cxx | 0 .../{ => fwe}/xml/eventsdocumenthandler.cxx | 1 + .../{ => fwe}/xml/imagesconfiguration.cxx | 0 .../{ => fwe}/xml/imagesdocumenthandler.cxx | 0 framework/source/fwe/xml/makefile.mk | 63 ++++++++ .../{ => fwe}/xml/menuconfiguration.cxx | 0 .../{ => fwe}/xml/menudocumenthandler.cxx | 0 .../{ => fwe}/xml/saxnamespacefilter.cxx | 0 .../{ => fwe}/xml/statusbarconfiguration.cxx | 0 .../xml/statusbardocumenthandler.cxx | 0 .../{ => fwe}/xml/toolboxconfiguration.cxx | 0 .../{ => fwe}/xml/toolboxdocumenthandler.cxx | 0 .../xml/toolboxlayoutdocumenthandler.cxx | 0 .../source/{ => fwe}/xml/xmlnamespaces.cxx | 0 .../source/{ => fwi}/classes/converter.cxx | 0 .../{ => fwi}/classes/framelistanalyzer.cxx | 0 framework/source/fwi/classes/makefile.mk | 54 +++++++ .../{ => fwi}/classes/propertysethelper.cxx | 0 .../classes/protocolhandlercache.cxx | 2 +- framework/source/fwi/helper/makefile.mk | 55 +++++++ .../source/{ => fwi}/helper/mischelper.cxx | 140 +++++++++--------- .../source/{ => fwi}/helper/networkdomain.cxx | 0 .../helper/popupmenucontrollerbase.cxx | 0 .../{ => fwi}/helper/shareablemutex.cxx | 0 .../source/{ => fwi}/jobs/configaccess.cxx | 0 framework/source/{ => fwi}/jobs/jobconst.cxx | 0 framework/source/fwi/jobs/makefile.mk | 52 +++++++ .../{ => fwi}/threadhelp/lockhelper.cxx | 0 .../source/{ => fwi}/threadhelp/makefile.mk | 4 +- .../threadhelp/transactionmanager.cxx | 3 +- .../uielement/constitemcontainer.cxx | 0 .../{ => fwi}/uielement/itemcontainer.cxx | 0 framework/source/fwi/uielement/makefile.mk | 52 +++++++ .../{ => fwi}/uielement/rootitemcontainer.cxx | 0 framework/source/helper/makefile.mk | 35 ++--- framework/source/interaction/makefile.mk | 3 +- framework/source/jobs/makefile.mk | 2 - framework/source/services/autorecovery.cxx | 4 + framework/source/services/desktop.cxx | 2 + framework/source/services/pathsettings.cxx | 2 + framework/source/uielement/makefile.mk | 3 - framework/source/xml/makefile.mk | 17 +-- framework/util/makefile.mk | 88 ++--------- 123 files changed, 896 insertions(+), 394 deletions(-) create mode 100644 framework/inc/fwedllapi.h create mode 100644 framework/inc/fwidllapi.h create mode 100644 framework/inc/fwkdllapi.h rename framework/source/{ => fwe}/classes/actiontriggercontainer.cxx (100%) rename framework/source/{ => fwe}/classes/actiontriggerpropertyset.cxx (99%) rename framework/source/{ => fwe}/classes/actiontriggerseparatorpropertyset.cxx (100%) rename framework/source/{ => fwe}/classes/addonmenu.cxx (100%) rename framework/source/{ => fwe}/classes/addonsoptions.cxx (100%) rename framework/source/{ => fwe}/classes/bmkmenu.cxx (100%) rename framework/source/{ => fwe}/classes/fwkresid.cxx (100%) rename framework/source/{ => fwe}/classes/imagewrapper.cxx (100%) create mode 100644 framework/source/fwe/classes/makefile.mk rename framework/source/{ => fwe}/classes/menuextensionsupplier.cxx (100%) rename framework/source/{ => fwe}/classes/rootactiontriggercontainer.cxx (100%) rename framework/source/{ => fwe}/classes/sfxhelperfunctions.cxx (98%) rename framework/source/{ => fwe}/dispatch/interaction.cxx (99%) create mode 100644 framework/source/fwe/dispatch/makefile.mk rename framework/source/{ => fwe}/helper/acceleratorinfo.cxx (100%) rename framework/source/{ => fwe}/helper/actiontriggerhelper.cxx (100%) rename framework/source/{ => fwe}/helper/configimporter.cxx (100%) rename framework/source/{ => fwe}/helper/imageproducer.cxx (100%) create mode 100644 framework/source/fwe/helper/makefile.mk rename framework/source/{ => fwe}/helper/propertysetcontainer.cxx (100%) rename framework/source/{ => fwe}/helper/titlehelper.cxx (100%) rename framework/source/{ => fwe}/helper/uiconfigelementwrapperbase.cxx (100%) rename framework/source/{ => fwe}/helper/uielementwrapperbase.cxx (100%) create mode 100644 framework/source/fwe/interaction/makefile.mk rename framework/source/{ => fwe}/interaction/preventduplicateinteraction.cxx (100%) rename framework/source/{ => fwe}/xml/eventsconfiguration.cxx (100%) rename framework/source/{ => fwe}/xml/eventsdocumenthandler.cxx (99%) rename framework/source/{ => fwe}/xml/imagesconfiguration.cxx (100%) rename framework/source/{ => fwe}/xml/imagesdocumenthandler.cxx (100%) create mode 100644 framework/source/fwe/xml/makefile.mk rename framework/source/{ => fwe}/xml/menuconfiguration.cxx (100%) rename framework/source/{ => fwe}/xml/menudocumenthandler.cxx (100%) rename framework/source/{ => fwe}/xml/saxnamespacefilter.cxx (100%) rename framework/source/{ => fwe}/xml/statusbarconfiguration.cxx (100%) rename framework/source/{ => fwe}/xml/statusbardocumenthandler.cxx (100%) rename framework/source/{ => fwe}/xml/toolboxconfiguration.cxx (100%) rename framework/source/{ => fwe}/xml/toolboxdocumenthandler.cxx (100%) rename framework/source/{ => fwe}/xml/toolboxlayoutdocumenthandler.cxx (100%) rename framework/source/{ => fwe}/xml/xmlnamespaces.cxx (100%) rename framework/source/{ => fwi}/classes/converter.cxx (100%) rename framework/source/{ => fwi}/classes/framelistanalyzer.cxx (100%) create mode 100644 framework/source/fwi/classes/makefile.mk rename framework/source/{ => fwi}/classes/propertysethelper.cxx (100%) rename framework/source/{ => fwi}/classes/protocolhandlercache.cxx (99%) create mode 100644 framework/source/fwi/helper/makefile.mk rename framework/source/{ => fwi}/helper/mischelper.cxx (98%) rename framework/source/{ => fwi}/helper/networkdomain.cxx (100%) rename framework/source/{ => fwi}/helper/popupmenucontrollerbase.cxx (100%) rename framework/source/{ => fwi}/helper/shareablemutex.cxx (100%) rename framework/source/{ => fwi}/jobs/configaccess.cxx (100%) rename framework/source/{ => fwi}/jobs/jobconst.cxx (100%) create mode 100644 framework/source/fwi/jobs/makefile.mk rename framework/source/{ => fwi}/threadhelp/lockhelper.cxx (100%) rename framework/source/{ => fwi}/threadhelp/makefile.mk (97%) rename framework/source/{ => fwi}/threadhelp/transactionmanager.cxx (99%) rename framework/source/{ => fwi}/uielement/constitemcontainer.cxx (100%) rename framework/source/{ => fwi}/uielement/itemcontainer.cxx (100%) create mode 100644 framework/source/fwi/uielement/makefile.mk rename framework/source/{ => fwi}/uielement/rootitemcontainer.cxx (100%) diff --git a/framework/inc/classes/actiontriggercontainer.hxx b/framework/inc/classes/actiontriggercontainer.hxx index 44186f2f7080..b523590f9abc 100644 --- a/framework/inc/classes/actiontriggercontainer.hxx +++ b/framework/inc/classes/actiontriggercontainer.hxx @@ -35,14 +35,16 @@ #include #include #include +#include #define SERVICENAME_ACTIONTRIGGERCONTAINER "com.sun.star.ui.ActionTriggerContainer" #define IMPLEMENTATIONNAME_ACTIONTRIGGERCONTAINER "com.sun.star.comp.ui.ActionTriggerContainer" + namespace framework { -class ActionTriggerContainer : public PropertySetContainer, +class FWE_DLLPUBLIC ActionTriggerContainer : public PropertySetContainer, public com::sun::star::lang::XMultiServiceFactory, public com::sun::star::lang::XServiceInfo, public com::sun::star::lang::XTypeProvider diff --git a/framework/inc/classes/actiontriggerpropertyset.hxx b/framework/inc/classes/actiontriggerpropertyset.hxx index 5c987ffebbc8..6d612c6f4751 100644 --- a/framework/inc/classes/actiontriggerpropertyset.hxx +++ b/framework/inc/classes/actiontriggerpropertyset.hxx @@ -44,6 +44,7 @@ #include #include #include +#include #define SERVICENAME_ACTIONTRIGGER "com.sun.star.ui.ActionTrigger" #define IMPLEMENTATIONNAME_ACTIONTRIGGER "com.sun.star.comp.ui.ActionTrigger" @@ -51,7 +52,7 @@ namespace framework { -class ActionTriggerPropertySet : public ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. +class FWE_DLLPUBLIC ActionTriggerPropertySet : public ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. public ::com::sun::star::lang::XServiceInfo , public ::com::sun::star::lang::XTypeProvider, public ::cppu::OBroadcastHelper , diff --git a/framework/inc/classes/actiontriggerseparatorpropertyset.hxx b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx index d940f3d85eea..17053edf57f0 100644 --- a/framework/inc/classes/actiontriggerseparatorpropertyset.hxx +++ b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx @@ -40,10 +40,12 @@ #include #include #include +#include #define SERVICENAME_ACTIONTRIGGERSEPARATOR "com.sun.star.ui.ActionTriggerSeparator" #define IMPLEMENTATIONNAME_ACTIONTRIGGERSEPARATOR "com.sun.star.comp.ui.ActionTriggerSeparator" + namespace framework { diff --git a/framework/inc/classes/addonmenu.hxx b/framework/inc/classes/addonmenu.hxx index 0bce4509297d..3b60233eeaa7 100644 --- a/framework/inc/classes/addonmenu.hxx +++ b/framework/inc/classes/addonmenu.hxx @@ -43,6 +43,7 @@ //_________________________________________________________________________________________________________________ #include +#include #define ADDONMENU_ITEMID_START 2000 #define ADDONMENU_ITEMID_END 3000 @@ -50,7 +51,7 @@ namespace framework { -class AddonMenu : public PopupMenu +class FWE_DLLPUBLIC AddonMenu : public PopupMenu { public: AddonMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); @@ -61,7 +62,7 @@ class AddonMenu : public PopupMenu }; class AddonMenuManager; -class AddonPopupMenu : public AddonMenu +class FWE_DLLPUBLIC AddonPopupMenu : public AddonMenu { public: ~AddonPopupMenu(); @@ -83,7 +84,7 @@ class AddonPopupMenu : public AddonMenu friend class AddonMenuManager; }; -class AddonMenuManager +class FWE_DLLPUBLIC AddonMenuManager { public: enum MenuType diff --git a/framework/inc/classes/addonsoptions.hxx b/framework/inc/classes/addonsoptions.hxx index f1cc49cf5a72..fdd265491cb1 100644 --- a/framework/inc/classes/addonsoptions.hxx +++ b/framework/inc/classes/addonsoptions.hxx @@ -41,7 +41,7 @@ #include #include #include - +#include //_________________________________________________________________________________________________________________ // types, enums, ... //_________________________________________________________________________________________________________________ @@ -84,7 +84,7 @@ namespace framework typedef ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > MergeMenuDefinition; -struct MergeMenuInstruction +struct FWE_DLLPUBLIC MergeMenuInstruction { ::rtl::OUString aMergePoint; ::rtl::OUString aMergeCommand; @@ -95,7 +95,7 @@ struct MergeMenuInstruction }; typedef ::std::vector< MergeMenuInstruction > MergeMenuInstructionContainer; -struct MergeToolbarInstruction +struct FWE_DLLPUBLIC MergeToolbarInstruction { ::rtl::OUString aMergeToolbar; ::rtl::OUString aMergePoint; @@ -135,7 +135,7 @@ class AddonsOptions_Impl; @devstatus ready to use *//*-*************************************************************************************************************/ -class AddonsOptions +class FWE_DLLPUBLIC AddonsOptions { //------------------------------------------------------------------------------------------------------------- // public methods diff --git a/framework/inc/classes/bmkmenu.hxx b/framework/inc/classes/bmkmenu.hxx index 5e4b2818afeb..8b624c6880ae 100644 --- a/framework/inc/classes/bmkmenu.hxx +++ b/framework/inc/classes/bmkmenu.hxx @@ -36,7 +36,7 @@ //_________________________________________________________________________________________________________________ #include - +#include //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ @@ -53,7 +53,7 @@ namespace framework { class BmkMenu_Impl; -class BmkMenu : public AddonMenu +class FWE_DLLPUBLIC BmkMenu : public AddonMenu { public: enum BmkMenuType diff --git a/framework/inc/classes/converter.hxx b/framework/inc/classes/converter.hxx index 7d792fa077b9..b36c9f1f7ca3 100644 --- a/framework/inc/classes/converter.hxx +++ b/framework/inc/classes/converter.hxx @@ -50,6 +50,7 @@ #include #include #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -65,7 +66,7 @@ namespace framework{ // exported definitions //_________________________________________________________________________________________________________________ -class Converter +class FWI_DLLPUBLIC Converter { public: // Seq <=> Seq diff --git a/framework/inc/classes/framelistanalyzer.hxx b/framework/inc/classes/framelistanalyzer.hxx index 1680ab994f11..3c921186a2d7 100644 --- a/framework/inc/classes/framelistanalyzer.hxx +++ b/framework/inc/classes/framelistanalyzer.hxx @@ -44,6 +44,7 @@ //_______________________________________________ // other includes +#include //_______________________________________________ // namespace @@ -63,7 +64,7 @@ namespace framework{ to switch into the backing mode, close the current active frame only or exit the whole application explicitly or implicitly. */ -class FrameListAnalyzer +class FWI_DLLPUBLIC FrameListAnalyzer { //_______________________________________ // types diff --git a/framework/inc/classes/fwkresid.hxx b/framework/inc/classes/fwkresid.hxx index 8157dc6e15dd..8c541db028ec 100644 --- a/framework/inc/classes/fwkresid.hxx +++ b/framework/inc/classes/fwkresid.hxx @@ -32,11 +32,12 @@ #define __FRAMEWORK_CLASSES_FWKRESID_HXX_ #include +#include namespace framework { -class FwkResId : public ResId +class FWE_DLLPUBLIC FwkResId : public ResId { public: FwkResId( USHORT nId ); diff --git a/framework/inc/classes/imagewrapper.hxx b/framework/inc/classes/imagewrapper.hxx index eb9e2fd00a74..a12bdec59ee5 100644 --- a/framework/inc/classes/imagewrapper.hxx +++ b/framework/inc/classes/imagewrapper.hxx @@ -37,11 +37,12 @@ #include #include #include +#include namespace framework { -class ImageWrapper : public ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. +class FWE_DLLPUBLIC ImageWrapper : public ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. public ::cppu::WeakImplHelper2< ::com::sun::star::awt::XBitmap, ::com::sun::star::lang::XUnoTunnel > { diff --git a/framework/inc/classes/menuextensionsupplier.hxx b/framework/inc/classes/menuextensionsupplier.hxx index e747c9e23a80..2ea5c160993b 100644 --- a/framework/inc/classes/menuextensionsupplier.hxx +++ b/framework/inc/classes/menuextensionsupplier.hxx @@ -32,8 +32,9 @@ #define __FRAMEWORK_CLASSES_MENUEXTENSIONSUPPLIER_HXX_ #include +#include -struct MenuExtensionItem +struct FWE_DLLPUBLIC MenuExtensionItem { rtl::OUString aLabel; rtl::OUString aURL; @@ -44,9 +45,9 @@ typedef MenuExtensionItem ( *pfunc_setMenuExtensionSupplier)(); namespace framework { -pfunc_setMenuExtensionSupplier SAL_CALL SetMenuExtensionSupplier( pfunc_setMenuExtensionSupplier pSetMenuExtensionSupplier ); +FWE_DLLPUBLIC pfunc_setMenuExtensionSupplier SAL_CALL SetMenuExtensionSupplier( pfunc_setMenuExtensionSupplier pSetMenuExtensionSupplier ); -MenuExtensionItem SAL_CALL GetMenuExtension(); +FWE_DLLPUBLIC MenuExtensionItem SAL_CALL GetMenuExtension(); } diff --git a/framework/inc/classes/propertysethelper.hxx b/framework/inc/classes/propertysethelper.hxx index d6b24561da51..0e7cdde3d72c 100644 --- a/framework/inc/classes/propertysethelper.hxx +++ b/framework/inc/classes/propertysethelper.hxx @@ -52,6 +52,7 @@ // other includes #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -69,7 +70,7 @@ namespace framework{ * Further the derived and this base class share the same lock. * So it's possible to be threadsafe if it's needed. */ -class PropertySetHelper : public css::beans::XPropertySet +class FWI_DLLPUBLIC PropertySetHelper : public css::beans::XPropertySet , public css::beans::XPropertySetInfo { //------------------------------------------------------------------------- diff --git a/framework/inc/classes/protocolhandlercache.hxx b/framework/inc/classes/protocolhandlercache.hxx index 595b358a789a..b2af31bdf967 100644 --- a/framework/inc/classes/protocolhandlercache.hxx +++ b/framework/inc/classes/protocolhandlercache.hxx @@ -50,6 +50,7 @@ #include #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -79,7 +80,7 @@ namespace framework{ This struct holds the information about one such registered protocol handler. A list of handler objects is defined as ProtocolHandlerHash. see below */ -struct ProtocolHandler +struct FWI_DLLPUBLIC ProtocolHandler { /* member */ public: @@ -97,7 +98,7 @@ struct ProtocolHandler uno implementation names as value. Overloading of the index operator makes it possible to search for a key by using a full qualified URL on list of all possible pattern keys. */ -class PatternHash : public BaseHash< ::rtl::OUString > +class FWI_DLLPUBLIC PatternHash : public BaseHash< ::rtl::OUString > { /* interface */ public: @@ -135,8 +136,8 @@ typedef BaseHash< ProtocolHandler > HandlerHash; @modified 30.04.2002 11:19, as96863 */ -class HandlerCFGAccess; -class HandlerCache +class FWI_DLLPUBLIC HandlerCFGAccess; +class FWI_DLLPUBLIC HandlerCache { /* member */ private: @@ -181,7 +182,7 @@ class HandlerCache @modified 30.04.2002 09:58, as96863 */ -class HandlerCFGAccess : public ::utl::ConfigItem +class FWI_DLLPUBLIC HandlerCFGAccess : public ::utl::ConfigItem { private: HandlerCache* m_pCache; diff --git a/framework/inc/classes/rootactiontriggercontainer.hxx b/framework/inc/classes/rootactiontriggercontainer.hxx index 70e00d09033e..be6a11c0a9cb 100644 --- a/framework/inc/classes/rootactiontriggercontainer.hxx +++ b/framework/inc/classes/rootactiontriggercontainer.hxx @@ -38,6 +38,7 @@ #include #include #include +#include #define IMPLEMENTATIONNAME_ROOTACTIONTRIGGERCONTAINER "com.sun.star.comp.ui.RootActionTriggerContainer" @@ -45,7 +46,7 @@ namespace framework { -class RootActionTriggerContainer : public PropertySetContainer, +class FWE_DLLPUBLIC RootActionTriggerContainer : public PropertySetContainer, public com::sun::star::lang::XMultiServiceFactory, public com::sun::star::lang::XServiceInfo, public com::sun::star::lang::XUnoTunnel, diff --git a/framework/inc/classes/sfxhelperfunctions.hxx b/framework/inc/classes/sfxhelperfunctions.hxx index f34411edbb27..2d99c9796beb 100644 --- a/framework/inc/classes/sfxhelperfunctions.hxx +++ b/framework/inc/classes/sfxhelperfunctions.hxx @@ -31,6 +31,7 @@ #ifndef __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_HXX_ #define __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_HXX_ +#include #include #include #include @@ -47,25 +48,25 @@ typedef bool ( *pfunc_isDockingWindowVisible)( const ::com::sun::star::uno::Refe namespace framework { -pfunc_setToolBoxControllerCreator SAL_CALL SetToolBoxControllerCreator( pfunc_setToolBoxControllerCreator pSetToolBoxControllerCreator ); +FWE_DLLPUBLIC pfunc_setToolBoxControllerCreator SAL_CALL SetToolBoxControllerCreator( pfunc_setToolBoxControllerCreator pSetToolBoxControllerCreator ); -svt::ToolboxController* SAL_CALL CreateToolBoxController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const ::rtl::OUString& aCommandURL ); +FWE_DLLPUBLIC svt::ToolboxController* SAL_CALL CreateToolBoxController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const ::rtl::OUString& aCommandURL ); -pfunc_setStatusBarControllerCreator SAL_CALL SetStatusBarControllerCreator( pfunc_setStatusBarControllerCreator pSetStatusBarControllerCreator ); +FWE_DLLPUBLIC pfunc_setStatusBarControllerCreator SAL_CALL SetStatusBarControllerCreator( pfunc_setStatusBarControllerCreator pSetStatusBarControllerCreator ); -svt::StatusbarController* SAL_CALL CreateStatusBarController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, StatusBar* pStatusBar, unsigned short nID, const ::rtl::OUString& aCommandURL ); +FWE_DLLPUBLIC svt::StatusbarController* SAL_CALL CreateStatusBarController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, StatusBar* pStatusBar, unsigned short nID, const ::rtl::OUString& aCommandURL ); -pfunc_getRefreshToolbars SAL_CALL SetRefreshToolbars( pfunc_getRefreshToolbars pRefreshToolbarsFunc ); +FWE_DLLPUBLIC pfunc_getRefreshToolbars SAL_CALL SetRefreshToolbars( pfunc_getRefreshToolbars pRefreshToolbarsFunc ); -void SAL_CALL RefreshToolbars( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); +FWE_DLLPUBLIC void SAL_CALL RefreshToolbars( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); -pfunc_createDockingWindow SAL_CALL SetDockingWindowCreator( pfunc_createDockingWindow pCreateDockingWindow ); +FWE_DLLPUBLIC pfunc_createDockingWindow SAL_CALL SetDockingWindowCreator( pfunc_createDockingWindow pCreateDockingWindow ); -void SAL_CALL CreateDockingWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); +FWE_DLLPUBLIC void SAL_CALL CreateDockingWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); -pfunc_isDockingWindowVisible SAL_CALL SetIsDockingWindowVisible( pfunc_isDockingWindowVisible pIsDockingWindowVisible ); +FWE_DLLPUBLIC pfunc_isDockingWindowVisible SAL_CALL SetIsDockingWindowVisible( pfunc_isDockingWindowVisible pIsDockingWindowVisible ); -bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); +FWE_DLLPUBLIC bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); } #endif // __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_HXX_ diff --git a/framework/inc/dispatch/interaction.hxx b/framework/inc/dispatch/interaction.hxx index e2ef1cfec504..f5883b89a300 100644 --- a/framework/inc/dispatch/interaction.hxx +++ b/framework/inc/dispatch/interaction.hxx @@ -57,6 +57,7 @@ #include #include #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -142,6 +143,8 @@ class ContinuationBase : public ::cppu::WeakImplHelper1< TContinuationType > }; // class ContinuationBase +//template class FWE_DLLEXPORT ContinuationBase; + /*-************************************************************************************************************//** @short declaration of some simple continuations @descr These derived classes implements some simple continuations, which doesnt need and additional @@ -180,7 +183,7 @@ typedef ContinuationBase< ::com::sun::star::task::XInteractionRetry > Continuati @devstatus ready to use @threadsafe no (used on once position only!) *//*-*************************************************************************************************************/ -class ContinuationFilterSelect : public ContinuationBase< ::com::sun::star::document::XInteractionFilterSelect > +class FWE_DLLPUBLIC ContinuationFilterSelect : public ContinuationBase< ::com::sun::star::document::XInteractionFilterSelect > { // c++ interface public: @@ -219,7 +222,7 @@ class ContinuationFilterSelect : public ContinuationBase< ::com::sun::star::docu @devstatus ready to use @threadsafe no (used on once position only!) *//*-*************************************************************************************************************/ -class RequestFilterSelect : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +class FWE_DLLPUBLIC RequestFilterSelect : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > { // c++ interface public: @@ -254,7 +257,7 @@ class RequestFilterSelect : public ::cppu::WeakImplHelper1< ::com::sun::star::ta @devstatus ready to use @threadsafe no (used on once position only!) *//*-*************************************************************************************************************/ -class RequestAmbigousFilter : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +class FWE_DLLPUBLIC RequestAmbigousFilter : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > { // c++ interface public: @@ -291,7 +294,7 @@ class RequestAmbigousFilter : public ::cppu::WeakImplHelper1< ::com::sun::star:: @devstatus ready to use @threadsafe no (used on once position only!) *//*-*************************************************************************************************************/ -class InteractionRequest : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +class FWE_DLLPUBLIC InteractionRequest : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > { // c++ interface public: diff --git a/framework/inc/fwedllapi.h b/framework/inc/fwedllapi.h new file mode 100644 index 000000000000..2742d09ab134 --- /dev/null +++ b/framework/inc/fwedllapi.h @@ -0,0 +1,16 @@ +#ifndef INCLUDED_FWEDLLAPI_H +#define INCLUDED_FWEDLLAPI_H + +#include "sal/types.h" + +#if defined(FWE_DLLIMPLEMENTATION) +#define FWE_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#include +template struct FWE_DLLPUBLIC cppu::OBroadcastHelperVar; +//class FWE_DLLPUBLIC SvPtrarr; +#else +#define FWE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif +#define FWE_DLLPRIVATE SAL_DLLPRIVATE + +#endif /* INCLUDED_FWEDLLAPI_H */ diff --git a/framework/inc/fwidllapi.h b/framework/inc/fwidllapi.h new file mode 100644 index 000000000000..8f4b50cf77e0 --- /dev/null +++ b/framework/inc/fwidllapi.h @@ -0,0 +1,13 @@ +#ifndef INCLUDED_FWIDLLAPI_H +#define INCLUDED_FWIDLLAPI_H + +#include "sal/types.h" + +#if defined(FWI_DLLIMPLEMENTATION) +#define FWI_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define FWI_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif +#define FWI_DLLPRIVATE SAL_DLLPRIVATE + +#endif /* INCLUDED_FWIDLLAPI_H */ diff --git a/framework/inc/fwkdllapi.h b/framework/inc/fwkdllapi.h new file mode 100644 index 000000000000..45c65b166eb5 --- /dev/null +++ b/framework/inc/fwkdllapi.h @@ -0,0 +1,10 @@ +#ifndef INCLUDED_FWKDLLAPI_H +#define INCLUDED_FWKDLLAPI_H + +#include "sal/types.h" + +#include +#include +template struct FWI_DLLPUBLIC cppu::OBroadcastHelperVar; + +#endif /* INCLUDED_FWKDLLAPI_H */ diff --git a/framework/inc/helper/acceleratorinfo.hxx b/framework/inc/helper/acceleratorinfo.hxx index d68c5964cc98..70169439b7db 100644 --- a/framework/inc/helper/acceleratorinfo.hxx +++ b/framework/inc/helper/acceleratorinfo.hxx @@ -34,6 +34,7 @@ #include #include #include +#include namespace framework { diff --git a/framework/inc/helper/actiontriggerhelper.hxx b/framework/inc/helper/actiontriggerhelper.hxx index 76ae24a70a89..dc249e315489 100644 --- a/framework/inc/helper/actiontriggerhelper.hxx +++ b/framework/inc/helper/actiontriggerhelper.hxx @@ -36,11 +36,12 @@ // #110897# #include #include +#include namespace framework { - class ActionTriggerHelper + class FWE_DLLPUBLIC ActionTriggerHelper { public: // Fills the submitted menu with the structure contained in the second diff --git a/framework/inc/helper/configimporter.hxx b/framework/inc/helper/configimporter.hxx index 8357676ffc8f..7a44b73f9790 100644 --- a/framework/inc/helper/configimporter.hxx +++ b/framework/inc/helper/configimporter.hxx @@ -37,10 +37,11 @@ #include #include +#include namespace framework { - class UIConfigurationImporterOOo1x + class FWE_DLLPUBLIC UIConfigurationImporterOOo1x { public: static sal_Bool ImportCustomToolbars( diff --git a/framework/inc/helper/imageproducer.hxx b/framework/inc/helper/imageproducer.hxx index 4a427b911775..a661c4cafbb7 100644 --- a/framework/inc/helper/imageproducer.hxx +++ b/framework/inc/helper/imageproducer.hxx @@ -38,15 +38,16 @@ #include #include #include +#include namespace framework { typedef Image ( *pfunc_getImage)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); -pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pGetImageFunc ); +pfunc_getImage FWE_DLLPUBLIC SAL_CALL SetImageProducer( pfunc_getImage pGetImageFunc ); -Image SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); +Image FWE_DLLPUBLIC SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); } diff --git a/framework/inc/helper/mischelper.hxx b/framework/inc/helper/mischelper.hxx index 1bd908b266c6..511ea63d74b9 100644 --- a/framework/inc/helper/mischelper.hxx +++ b/framework/inc/helper/mischelper.hxx @@ -1,72 +1,73 @@ -/************************************************************************* - * - * 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: acceleratorinfo.hxx,v $ - * $Revision: 1.6 $ - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __MISC_HELPER_HXX_ -#define __MISC_HELPER_HXX_ - -#include -#include -#include - -#include -#include - -namespace framework -{ - -inline bool IsScriptTypeMatchingToLanguage( sal_Int16 nScriptType, LanguageType nLang ) -{ - return 0 != (nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang )); -} - - -class LanguageGuessingHelper -{ - mutable ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLanguageGuessing > m_xLanguageGuesser; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; - -public: - LanguageGuessingHelper(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceManager) : m_xServiceManager(_xServiceManager){} - - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLanguageGuessing > GetGuesser() const; -}; - -::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL +/************************************************************************* + * + * 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: acceleratorinfo.hxx,v $ + * $Revision: 1.6 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __MISC_HELPER_HXX_ +#define __MISC_HELPER_HXX_ + +#include +#include +#include + +#include +#include +#include + +namespace framework +{ + +inline bool IsScriptTypeMatchingToLanguage( sal_Int16 nScriptType, LanguageType nLang ) +{ + return 0 != (nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang )); +} + + +class FWI_DLLPUBLIC LanguageGuessingHelper +{ + mutable ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLanguageGuessing > m_xLanguageGuesser; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; + +public: + LanguageGuessingHelper(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceManager) : m_xServiceManager(_xServiceManager){} + + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLanguageGuessing > GetGuesser() const; +}; + +FWI_DLLPUBLIC ::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory ,::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xUICommandLabels ,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame ,::rtl::OUString& _rModuleIdentifier ,sal_Bool& _rIni - ,const sal_Char* _pName); - -} // namespace framework - -#endif // __MISC_HELPER_HXX_ - + ,const sal_Char* _pName); + +} // namespace framework + +#endif // __MISC_HELPER_HXX_ + diff --git a/framework/inc/helper/networkdomain.hxx b/framework/inc/helper/networkdomain.hxx index ad939b5e6c8d..621ddf837cb0 100644 --- a/framework/inc/helper/networkdomain.hxx +++ b/framework/inc/helper/networkdomain.hxx @@ -32,11 +32,12 @@ #define __FRAMEWORK_HELPER_NETWORKDOMAIN_HXX_ #include +#include namespace framework { -class NetworkDomain +class FWI_DLLPUBLIC NetworkDomain { public: static rtl::OUString GetNTDomainName(); diff --git a/framework/inc/helper/popupmenucontrollerbase.hxx b/framework/inc/helper/popupmenucontrollerbase.hxx index 25d308a72641..c02fd1bb99ca 100644 --- a/framework/inc/helper/popupmenucontrollerbase.hxx +++ b/framework/inc/helper/popupmenucontrollerbase.hxx @@ -63,10 +63,11 @@ #include #include #include +#include namespace framework { - class PopupMenuControllerBase : public com::sun::star::lang::XTypeProvider , + class FWI_DLLPUBLIC PopupMenuControllerBase : public com::sun::star::lang::XTypeProvider , public com::sun::star::lang::XServiceInfo , public ::com::sun::star::frame::XPopupMenuController , public com::sun::star::lang::XInitialization , diff --git a/framework/inc/helper/propertysetcontainer.hxx b/framework/inc/helper/propertysetcontainer.hxx index 4fd8893e2ef9..180977bb9e25 100644 --- a/framework/inc/helper/propertysetcontainer.hxx +++ b/framework/inc/helper/propertysetcontainer.hxx @@ -40,11 +40,12 @@ #include #include #include +#include namespace framework { -class PropertySetContainer : public com::sun::star::container::XIndexContainer , +class FWE_DLLPUBLIC PropertySetContainer : public com::sun::star::container::XIndexContainer , public ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. public ::cppu::OWeakObject { diff --git a/framework/inc/helper/shareablemutex.hxx b/framework/inc/helper/shareablemutex.hxx index b8d9eadfb0f9..2537dd1c1c8d 100644 --- a/framework/inc/helper/shareablemutex.hxx +++ b/framework/inc/helper/shareablemutex.hxx @@ -33,11 +33,12 @@ #include #include +#include namespace framework { -class ShareableMutex +class FWI_DLLPUBLIC ShareableMutex { public: ShareableMutex(); diff --git a/framework/inc/helper/titlehelper.hxx b/framework/inc/helper/titlehelper.hxx index 01ba60837073..22400c5618b1 100644 --- a/framework/inc/helper/titlehelper.hxx +++ b/framework/inc/helper/titlehelper.hxx @@ -55,6 +55,7 @@ #include #include +#include //_______________________________________________ // namespace @@ -74,7 +75,7 @@ namespace framework{ @threadsafe */ -class TitleHelper : private ::cppu::BaseMutex +class FWE_DLLPUBLIC TitleHelper : private ::cppu::BaseMutex , public ::cppu::WeakImplHelper5< css::frame::XTitle , css::frame::XTitleChangeBroadcaster, css::frame::XTitleChangeListener , diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx index 2069f6b983f0..cbd30212a555 100644 --- a/framework/inc/helper/uiconfigelementwrapperbase.hxx +++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx @@ -61,11 +61,12 @@ #include #include #include +#include namespace framework { -class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider , +class FWE_DLLPUBLIC UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider , public ::com::sun::star::ui::XUIElement , public ::com::sun::star::ui::XUIElementSettings , public ::com::sun::star::lang::XInitialization , diff --git a/framework/inc/helper/uielementwrapperbase.hxx b/framework/inc/helper/uielementwrapperbase.hxx index 9ca92aca36b2..eb8a5430789a 100644 --- a/framework/inc/helper/uielementwrapperbase.hxx +++ b/framework/inc/helper/uielementwrapperbase.hxx @@ -56,11 +56,12 @@ #include #include #include +#include namespace framework { -class UIElementWrapperBase : public ::com::sun::star::lang::XTypeProvider , +class FWE_DLLPUBLIC UIElementWrapperBase : public ::com::sun::star::lang::XTypeProvider , public ::com::sun::star::ui::XUIElement , public ::com::sun::star::lang::XInitialization , public ::com::sun::star::lang::XComponent , diff --git a/framework/inc/interaction/preventduplicateinteraction.hxx b/framework/inc/interaction/preventduplicateinteraction.hxx index 2b43ab02fcdc..de6e2eab5ad4 100644 --- a/framework/inc/interaction/preventduplicateinteraction.hxx +++ b/framework/inc/interaction/preventduplicateinteraction.hxx @@ -31,6 +31,7 @@ #ifndef __FRAMEWORK_INTERACTION_PREVENTDUPLICATEINTERACTION_HXX_ #define __FRAMEWORK_INTERACTION_PREVENTDUPLICATEINTERACTION_HXX_ +#include //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ @@ -85,7 +86,7 @@ struct ThreadHelpBase2 mutable ::osl::Mutex m_aLock; }; -class PreventDuplicateInteraction : private ThreadHelpBase2 +class FWE_DLLPUBLIC PreventDuplicateInteraction : private ThreadHelpBase2 ,public ::cppu::WeakImplHelper1< css::task::XInteractionHandler > { //_____________________________________ diff --git a/framework/inc/jobs/configaccess.hxx b/framework/inc/jobs/configaccess.hxx index 2b773cb6a7b4..2110aa7f338d 100644 --- a/framework/inc/jobs/configaccess.hxx +++ b/framework/inc/jobs/configaccess.hxx @@ -45,6 +45,7 @@ //_______________________________________ // other includes #include +#include //_______________________________________ // namespace @@ -61,7 +62,7 @@ namespace framework{ instead of using soecialize config items of the svtools project. This class can wrapp such configuration access. */ -class ConfigAccess : public ThreadHelpBase +class FWI_DLLPUBLIC ConfigAccess : public ThreadHelpBase { //___________________________________ // const diff --git a/framework/inc/jobs/jobconst.hxx b/framework/inc/jobs/jobconst.hxx index a7bccde7cb9b..16cbb1ff396a 100644 --- a/framework/inc/jobs/jobconst.hxx +++ b/framework/inc/jobs/jobconst.hxx @@ -44,6 +44,7 @@ // other includes #include +#include //_______________________________________ // namespace @@ -62,10 +63,9 @@ namespace framework{ it's code. Typos can occure or code will be changed by new developers ... Shared set of constant values can help to improve the mentainance of this code. */ -class JobConst +class FWI_DLLPUBLIC JobConst { public: - static const ::rtl::OUString ANSWER_DEACTIVATE_JOB(); static const ::rtl::OUString ANSWER_SAVE_ARGUMENTS(); static const ::rtl::OUString ANSWER_SEND_DISPATCHRESULT(); diff --git a/framework/inc/threadhelp/lockhelper.hxx b/framework/inc/threadhelp/lockhelper.hxx index d4e0b4572fba..8982a2703762 100644 --- a/framework/inc/threadhelp/lockhelper.hxx +++ b/framework/inc/threadhelp/lockhelper.hxx @@ -49,6 +49,7 @@ //_________________________________________________________________________________________________________________ #include #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -66,7 +67,7 @@ namespace framework{ of your implementation - because base classes are initialized by his order and before your member! Thats why ist a good place to declare your thread help member so. *//*-*************************************************************************************************************/ -enum ELockType +enum FWI_DLLPUBLIC ELockType { E_NOTHING = 0 , E_OWNMUTEX = 1 , @@ -107,7 +108,7 @@ enum ELockType @devstatus draft *//*-*************************************************************************************************************/ -class LockHelper : public IMutex +class FWI_DLLPUBLIC LockHelper : public IMutex , public IRWLock , private INonCopyable { diff --git a/framework/inc/threadhelp/transactionmanager.hxx b/framework/inc/threadhelp/transactionmanager.hxx index 72baadf5bff2..fcd0d3a9ec46 100644 --- a/framework/inc/threadhelp/transactionmanager.hxx +++ b/framework/inc/threadhelp/transactionmanager.hxx @@ -52,6 +52,7 @@ // other includes //_________________________________________________________________________________________________________________ #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -81,7 +82,7 @@ namespace framework{ @devstatus draft *//*-*************************************************************************************************************/ -class TransactionManager : public ITransactionManager +class FWI_DLLPUBLIC TransactionManager : public ITransactionManager , private INonCopyable { //------------------------------------------------------------------------------------------------------------- diff --git a/framework/inc/uielement/constitemcontainer.hxx b/framework/inc/uielement/constitemcontainer.hxx index d1278564d22c..1d41eacc8e5f 100644 --- a/framework/inc/uielement/constitemcontainer.hxx +++ b/framework/inc/uielement/constitemcontainer.hxx @@ -59,13 +59,14 @@ #include #include +#include namespace framework { class RootItemContainer; class ItemContainer; -class ConstItemContainer : public ::com::sun::star::lang::XTypeProvider , +class FWI_DLLPUBLIC ConstItemContainer : public ::com::sun::star::lang::XTypeProvider , public com::sun::star::container::XIndexAccess , public ::com::sun::star::lang::XUnoTunnel , public ::com::sun::star::beans::XFastPropertySet, diff --git a/framework/inc/uielement/itemcontainer.hxx b/framework/inc/uielement/itemcontainer.hxx index f9499e83edb8..8910d5ca66f6 100644 --- a/framework/inc/uielement/itemcontainer.hxx +++ b/framework/inc/uielement/itemcontainer.hxx @@ -55,12 +55,12 @@ #include #include +#include namespace framework { - class ConstItemContainer; -class ItemContainer : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XIndexContainer> +class FWI_DLLPUBLIC ItemContainer : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XIndexContainer> { friend class ConstItemContainer; diff --git a/framework/inc/uielement/rootitemcontainer.hxx b/framework/inc/uielement/rootitemcontainer.hxx index 284ce9136457..599ea220112d 100644 --- a/framework/inc/uielement/rootitemcontainer.hxx +++ b/framework/inc/uielement/rootitemcontainer.hxx @@ -60,13 +60,12 @@ #include #include +#include namespace framework { - class ConstItemContainer; -class ItemContainer; -class RootItemContainer : public ::com::sun::star::lang::XTypeProvider , +class FWI_DLLPUBLIC RootItemContainer : public ::com::sun::star::lang::XTypeProvider , public ::com::sun::star::container::XIndexContainer , public ::com::sun::star::lang::XSingleComponentFactory , public ::com::sun::star::lang::XUnoTunnel , diff --git a/framework/inc/xml/eventsconfiguration.hxx b/framework/inc/xml/eventsconfiguration.hxx index 69e6f85c6f90..ebc821fca547 100644 --- a/framework/inc/xml/eventsconfiguration.hxx +++ b/framework/inc/xml/eventsconfiguration.hxx @@ -31,6 +31,7 @@ #ifndef __FRAMEWORK_XML_EVENTSCONFIGURATION_HXX_ #define __FRAMEWORK_XML_EVENTSCONFIGURATION_HXX_ +#include #include #include #include @@ -43,13 +44,13 @@ namespace framework { -struct EventsConfig +struct FWE_DLLPUBLIC EventsConfig { ::com::sun::star::uno::Sequence< ::rtl::OUString > aEventNames; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aEventsProperties; }; -class EventsConfiguration +class FWE_DLLPUBLIC EventsConfiguration { public: // #110897# diff --git a/framework/inc/xml/eventsdocumenthandler.hxx b/framework/inc/xml/eventsdocumenthandler.hxx index db490dbb6c18..df9e0e0f9e4c 100644 --- a/framework/inc/xml/eventsdocumenthandler.hxx +++ b/framework/inc/xml/eventsdocumenthandler.hxx @@ -53,6 +53,7 @@ #include #include +#include //_________________________________________________________________________________________________________________ // namespace //_________________________________________________________________________________________________________________ @@ -62,7 +63,7 @@ namespace framework{ //***************************************************************************************************************** // Hash code function for using in all hash maps of follow implementation. -class OReadEventsDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses. +class FWE_DLLPUBLIC OReadEventsDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses. public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler > { public: @@ -152,7 +153,7 @@ class OReadEventsDocumentHandler : private ThreadHelpBase, // Struct for right ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator; }; -class OWriteEventsDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses. +class FWE_DLLPUBLIC OWriteEventsDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses. { public: OWriteEventsDocumentHandler( diff --git a/framework/inc/xml/imagesconfiguration.hxx b/framework/inc/xml/imagesconfiguration.hxx index d0961892b96b..be362e5f9779 100644 --- a/framework/inc/xml/imagesconfiguration.hxx +++ b/framework/inc/xml/imagesconfiguration.hxx @@ -31,6 +31,7 @@ #ifndef __FRAMEWORK_XML_IMAGESCONFIGURATION_HXX_ #define __FRAMEWORK_XML_IMAGESCONFIGURATION_HXX_ +#include #include #include #include @@ -46,13 +47,13 @@ namespace framework { -enum ImageMaskMode +enum FWE_DLLPUBLIC ImageMaskMode { ImageMaskMode_Color, ImageMaskMode_Bitmap }; -struct ImageItemDescriptor +struct FWE_DLLPUBLIC ImageItemDescriptor { ImageItemDescriptor() : nIndex( -1 ) {} @@ -60,7 +61,7 @@ struct ImageItemDescriptor long nIndex; // index of the bitmap inside the bitmaplist }; -struct ExternalImageItemDescriptor +struct FWE_DLLPUBLIC ExternalImageItemDescriptor { String aCommandURL; // URL command to dispatch String aURL; // a URL to an external bitmap @@ -72,7 +73,7 @@ SV_DECL_PTRARR_DEL( ImageItemListDescriptor, ImageItemDescriptorPtr, 10, 2) typedef ExternalImageItemDescriptor* ExternalImageItemDescriptorPtr; SV_DECL_PTRARR_DEL( ExternalImageItemListDescriptor, ExternalImageItemDescriptorPtr, 10, 2) -struct ImageListItemDescriptor +struct FWE_DLLPUBLIC ImageListItemDescriptor { ImageListItemDescriptor() : nMaskMode( ImageMaskMode_Color ), pImageItemList( 0 ) {} @@ -91,7 +92,7 @@ struct ImageListItemDescriptor typedef ImageListItemDescriptor* ImageListItemDescriptorPtr; SV_DECL_PTRARR_DEL( ImageListDescriptor, ImageListItemDescriptorPtr, 10, 2) -struct ImageListsDescriptor +struct FWE_DLLPUBLIC ImageListsDescriptor { ImageListsDescriptor() : pImageList( 0 ), pExternalImageList( 0 ) {} @@ -101,7 +102,7 @@ struct ImageListsDescriptor ExternalImageItemListDescriptor* pExternalImageList; }; -class ImagesConfiguration +class FWE_DLLPUBLIC ImagesConfiguration { public: // #110897# diff --git a/framework/inc/xml/imagesdocumenthandler.hxx b/framework/inc/xml/imagesdocumenthandler.hxx index a58da84b89aa..794b3bb8e88c 100644 --- a/framework/inc/xml/imagesdocumenthandler.hxx +++ b/framework/inc/xml/imagesdocumenthandler.hxx @@ -31,6 +31,8 @@ #ifndef __FRAMEWORK_XML_IMAGEDOCUMENTHANDLER_HXX_ #define __FRAMEWORK_XML_IMAGEDOCUMENTHANDLER_HXX_ +#include + //_________________________________________________________________________________________________________________ // interface includes //_________________________________________________________________________________________________________________ @@ -50,6 +52,7 @@ #include #include + //_________________________________________________________________________________________________________________ // namespace //_________________________________________________________________________________________________________________ @@ -59,7 +62,7 @@ namespace framework{ //***************************************************************************************************************** // Hash code function for using in all hash maps of follow implementation. -class OReadImagesDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses. +class FWE_DLLPUBLIC OReadImagesDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses. public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler > { public: @@ -160,7 +163,7 @@ class OReadImagesDocumentHandler : private ThreadHelpBase, // Struct for right ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator; }; -class OWriteImagesDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses. +class FWE_DLLPUBLIC OWriteImagesDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses. { public: OWriteImagesDocumentHandler( diff --git a/framework/inc/xml/menuconfiguration.hxx b/framework/inc/xml/menuconfiguration.hxx index 954fc2ae5e3e..36b84f9af6b0 100644 --- a/framework/inc/xml/menuconfiguration.hxx +++ b/framework/inc/xml/menuconfiguration.hxx @@ -43,6 +43,7 @@ #include #include #include +#include //_________________________________________________________________________________________________________________ // includes of other projects @@ -73,7 +74,7 @@ const USHORT ITEMID_ADDONHELP = FWK_SID_ADDONHELP; namespace framework { -class MenuConfiguration +class FWE_DLLPUBLIC MenuConfiguration { public: struct Attributes diff --git a/framework/inc/xml/menudocumenthandler.hxx b/framework/inc/xml/menudocumenthandler.hxx index a85a4c200086..149f481bb9a9 100644 --- a/framework/inc/xml/menudocumenthandler.hxx +++ b/framework/inc/xml/menudocumenthandler.hxx @@ -51,6 +51,7 @@ #include #include #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -58,7 +59,7 @@ namespace framework{ -class ReadMenuDocumentHandlerBase : public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses. +class FWE_DLLPUBLIC ReadMenuDocumentHandlerBase : public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses. public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler > { public: @@ -120,7 +121,7 @@ class ReadMenuDocumentHandlerBase : public ThreadHelpBase, // Struct for right }; -class OReadMenuDocumentHandler : public ReadMenuDocumentHandlerBase +class FWE_DLLPUBLIC OReadMenuDocumentHandler : public ReadMenuDocumentHandlerBase { public: // #110897# @@ -164,7 +165,7 @@ class OReadMenuDocumentHandler : public ReadMenuDocumentHandlerBase }; // OReadMenuDocumentHandler -class OReadMenuBarHandler : public ReadMenuDocumentHandlerBase +class FWE_DLLPUBLIC OReadMenuBarHandler : public ReadMenuDocumentHandlerBase { public: // #110897# @@ -211,7 +212,7 @@ class OReadMenuBarHandler : public ReadMenuDocumentHandlerBase }; // OReadMenuBarHandler -class OReadMenuHandler : public ReadMenuDocumentHandlerBase +class FWE_DLLPUBLIC OReadMenuHandler : public ReadMenuDocumentHandlerBase { public: OReadMenuHandler( const com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& rMenuContainer, @@ -249,7 +250,7 @@ class OReadMenuHandler : public ReadMenuDocumentHandlerBase }; // OReadMenuHandler -class OReadMenuPopupHandler : public ReadMenuDocumentHandlerBase +class FWE_DLLPUBLIC OReadMenuPopupHandler : public ReadMenuDocumentHandlerBase { public: OReadMenuPopupHandler( const com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& rMenuContainer, @@ -292,7 +293,7 @@ class OReadMenuPopupHandler : public ReadMenuDocumentHandlerBase }; // OReadMenuPopupHandler -class OWriteMenuDocumentHandler +class FWE_DLLPUBLIC OWriteMenuDocumentHandler { public: OWriteMenuDocumentHandler( diff --git a/framework/inc/xml/saxnamespacefilter.hxx b/framework/inc/xml/saxnamespacefilter.hxx index 9f0a5bbf2646..777c23600a9d 100644 --- a/framework/inc/xml/saxnamespacefilter.hxx +++ b/framework/inc/xml/saxnamespacefilter.hxx @@ -39,6 +39,7 @@ #include #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -47,7 +48,7 @@ namespace framework { -class SaxNamespaceFilter : public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses. +class FWE_DLLPUBLIC SaxNamespaceFilter : public ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses. public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler > { public: diff --git a/framework/inc/xml/statusbarconfiguration.hxx b/framework/inc/xml/statusbarconfiguration.hxx index 8619ae423622..70bf1a966d31 100644 --- a/framework/inc/xml/statusbarconfiguration.hxx +++ b/framework/inc/xml/statusbarconfiguration.hxx @@ -1,6 +1,7 @@ #ifndef __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_ #define __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_ +#include #include #include #include @@ -14,7 +15,7 @@ namespace framework { -struct StatusBarItemDescriptor +struct FWE_DLLPUBLIC StatusBarItemDescriptor { String aURL; // URL command to dispatch long nItemBits; // properties for this statusbar item (WinBits) @@ -31,7 +32,7 @@ struct StatusBarItemDescriptor typedef StatusBarItemDescriptor* StatusBarItemDescriptorPtr; SV_DECL_PTRARR_DEL( StatusBarDescriptor, StatusBarItemDescriptorPtr, 10, 2) -class StatusBarConfiguration +class FWE_DLLPUBLIC StatusBarConfiguration { public: static sal_Bool LoadStatusBar( diff --git a/framework/inc/xml/statusbardocumenthandler.hxx b/framework/inc/xml/statusbardocumenthandler.hxx index 6e66fa6ae403..bfa0dbaf9d98 100644 --- a/framework/inc/xml/statusbardocumenthandler.hxx +++ b/framework/inc/xml/statusbardocumenthandler.hxx @@ -52,6 +52,7 @@ #include #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -62,7 +63,7 @@ namespace framework{ //***************************************************************************************************************** // Hash code function for using in all hash maps of follow implementation. -class OReadStatusBarDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses. +class FWE_DLLPUBLIC OReadStatusBarDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses. public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler > { public: @@ -151,7 +152,7 @@ class OReadStatusBarDocumentHandler : private ThreadHelpBase, // Struct for ri ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator; }; -class OWriteStatusBarDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses. +class FWE_DLLPUBLIC OWriteStatusBarDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses. { public: OWriteStatusBarDocumentHandler( diff --git a/framework/inc/xml/toolboxconfiguration.hxx b/framework/inc/xml/toolboxconfiguration.hxx index 924c601ac689..d386eef4323d 100644 --- a/framework/inc/xml/toolboxconfiguration.hxx +++ b/framework/inc/xml/toolboxconfiguration.hxx @@ -1,6 +1,7 @@ #ifndef __FRAMEWORK_XML_TOOLBOXCONFIGURATION_HXX_ #define __FRAMEWORK_XML_TOOLBOXCONFIGURATION_HXX_ +#include #include #include #include @@ -17,7 +18,7 @@ namespace framework { -class ToolBoxConfiguration +class FWE_DLLPUBLIC ToolBoxConfiguration { public: // #110897# diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx index ccf64e6d0033..953f684c742c 100644 --- a/framework/inc/xml/toolboxdocumenthandler.hxx +++ b/framework/inc/xml/toolboxdocumenthandler.hxx @@ -46,6 +46,7 @@ #include #include #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -56,7 +57,7 @@ namespace framework{ //***************************************************************************************************************** // Hash code function for using in all hash maps of follow implementation. -class OReadToolBoxDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses. +class FWE_DLLPUBLIC OReadToolBoxDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses. public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler > { public: @@ -168,7 +169,7 @@ class OReadToolBoxDocumentHandler : private ThreadHelpBase, // Struct for right }; -class OWriteToolBoxDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses. +class FWE_DLLPUBLIC OWriteToolBoxDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses. { public: OWriteToolBoxDocumentHandler( diff --git a/framework/inc/xml/xmlnamespaces.hxx b/framework/inc/xml/xmlnamespaces.hxx index 42cac853e133..f951ffaf348e 100644 --- a/framework/inc/xml/xmlnamespaces.hxx +++ b/framework/inc/xml/xmlnamespaces.hxx @@ -34,11 +34,12 @@ #include #include +#include namespace framework { -class XMLNamespaces +class FWE_DLLPUBLIC XMLNamespaces { public: XMLNamespaces(); diff --git a/framework/prj/build.lst b/framework/prj/build.lst index b9814037e729..12e597204710 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,23 +1,31 @@ fr framework : l10n svtools NULL fr framework usr1 - all fr_mkout NULL fr framework\inc nmake - all fr_inc NULL -fr framework\source\constant nmake - all fr_constant fr_inc NULL -fr framework\source\threadhelp nmake - all fr_threadhelp fr_constant fr_inc NULL -fr framework\source\loadenv nmake - all fr_loadenv fr_threadhelp fr_constant fr_inc NULL +fr framework\source\accelerators nmake - all fr_accelerators fr_threadhelp fr_inc NULL fr framework\source\classes nmake - all fr_classes fr_threadhelp fr_constant fr_inc NULL -fr framework\source\jobs nmake - all fr_jobs fr_threadhelp fr_constant fr_inc NULL -fr framework\source\interaction nmake - all fr_interaction fr_threadhelp fr_constant fr_inc NULL -fr framework\source\helper nmake - all fr_helper fr_threadhelp fr_constant fr_inc NULL +fr framework\source\constant nmake - all fr_constant fr_inc NULL fr framework\source\dispatch nmake - all fr_dispatch fr_threadhelp fr_constant fr_inc NULL -fr framework\source\services nmake - all fr_services fr_threadhelp fr_constant fr_inc NULL -fr framework\source\register nmake - all fr_register fr_threadhelp fr_constant fr_inc NULL -fr framework\source\recording nmake - all fr_recording fr_threadhelp fr_constant fr_inc NULL -fr framework\source\xml nmake - all fr_xml fr_threadhelp fr_inc NULL +fr framework\source\fwe\classes nmake - all fr_fweclasses fr_threadhelp fr_constant fr_inc NULL +fr framework\source\fwe\dispatch nmake - all fr_fwedispatch fr_threadhelp fr_constant fr_inc NULL +fr framework\source\fwe\helper nmake - all fr_fwehelper fr_threadhelp fr_constant fr_inc NULL +fr framework\source\fwe\interaction nmake - all fr_fweinteraction fr_threadhelp fr_constant fr_inc NULL +fr framework\source\fwe\xml nmake - all fr_fwexml fr_threadhelp fr_inc NULL +fr framework\source\fwi\classes nmake - all fr_fwiclasses fr_threadhelp fr_constant fr_inc NULL +fr framework\source\fwi\helper nmake - all fr_fwihelper fr_threadhelp fr_constant fr_inc NULL +fr framework\source\fwi\jobs nmake - all fr_fwijobs fr_threadhelp fr_constant fr_inc NULL +fr framework\source\fwi\threadhelp nmake - all fr_threadhelp fr_constant fr_inc NULL +fr framework\source\fwi\uielement nmake - all fr_fwiuielement fr_threadhelp fr_inc NULL +fr framework\source\helper nmake - all fr_helper fr_threadhelp fr_constant fr_inc NULL +fr framework\source\interaction nmake - all fr_interaction fr_threadhelp fr_constant fr_inc NULL +fr framework\source\jobs nmake - all fr_jobs fr_threadhelp fr_constant fr_inc NULL fr framework\source\layoutmanager nmake - all fr_layoutmanager fr_threadhelp fr_inc NULL +fr framework\source\loadenv nmake - all fr_loadenv fr_threadhelp fr_constant fr_inc NULL +fr framework\source\recording nmake - all fr_recording fr_threadhelp fr_constant fr_inc NULL +fr framework\source\register nmake - all fr_register fr_threadhelp fr_constant fr_inc NULL +fr framework\source\services nmake - all fr_services fr_threadhelp fr_constant fr_inc NULL +fr framework\source\tabwin nmake - all fr_tabwin fr_threadhelp fr_inc NULL +fr framework\source\uiconfiguration nmake - all fr_uiconfiguration fr_threadhelp fr_inc NULL fr framework\source\uielement nmake - all fr_uielement fr_threadhelp fr_inc NULL fr framework\source\uifactory nmake - all fr_uifactory fr_threadhelp fr_inc NULL -fr framework\source\uiconfiguration nmake - all fr_uiconfiguration fr_threadhelp fr_inc NULL -fr framework\source\accelerators nmake - all fr_accelerators fr_threadhelp fr_inc NULL -fr framework\source\tabwin nmake - all fr_tabwin fr_threadhelp fr_inc NULL -fr framework\util nmake - all fr_util fr_constant fr_threadhelp fr_classes fr_loadenv fr_jobs fr_interaction fr_helper fr_dispatch fr_services fr_register fr_recording fr_layoutmanager fr_uielement fr_uifactory fr_xml fr_uiconfiguration fr_accelerators fr_tabwin NULL - +fr framework\source\xml nmake - all fr_xml fr_threadhelp fr_inc NULL +fr framework\util nmake - all fr_util fr_constant fr_threadhelp fr_classes fr_loadenv fr_jobs fr_interaction fr_helper fr_dispatch fr_services fr_register fr_recording fr_layoutmanager fr_uielement fr_uifactory fr_xml fr_uiconfiguration fr_accelerators fr_tabwin fr_fweclasses fr_fwedispatch fr_fwehelper fr_fweinteraction fr_fwexml fr_fwiclasses fr_fwihelper fr_fwijobs fr_fwiuielement NULL diff --git a/framework/prj/d.lst b/framework/prj/d.lst index a8640138ba25..bf17da0a7164 100644 --- a/framework/prj/d.lst +++ b/framework/prj/d.lst @@ -27,6 +27,9 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar ..\%__SRC%\lib\ifwe.lib %_DEST%\lib%_EXT%\ifwe.lib ..\%__SRC%\lib\ifwi.lib %_DEST%\lib%_EXT%\ifwi.lib +..\inc\fwedllapi.h %_DEST%\inc%_EXT%\fwedllapi.h +..\inc\fwidllapi.h %_DEST%\inc%_EXT%\fwidllapi.h +..\inc\fwkdllapi.h %_DEST%\inc%_EXT%\fwkdllapi.h ..\inc\helper\imageproducer.hxx %_DEST%\inc%_EXT%\framework\imageproducer.hxx ..\inc\helper\acceleratorinfo.hxx %_DEST%\inc%_EXT%\framework\acceleratorinfo.hxx ..\inc\helper\actiontriggerhelper.hxx %_DEST%\inc%_EXT%\framework\actiontriggerhelper.hxx diff --git a/framework/source/classes/makefile.mk b/framework/source/classes/makefile.mk index c55af1cdf8e4..1482a2162511 100644 --- a/framework/source/classes/makefile.mk +++ b/framework/source/classes/makefile.mk @@ -18,12 +18,12 @@ # # 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 +# 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 +# version 3 along with OpenOffice.org. If not, see # # for a copy of the LGPLv3 License. # @@ -36,32 +36,17 @@ ENABLE_EXCEPTIONS= TRUE # --- Settings ----------------------------------------------------- -.INCLUDE : settings.mk +.INCLUDE : settings.mk # --- Generate ----------------------------------------------------- -SLOFILES= \ - $(SLO)$/propertysethelper.obj \ - $(SLO)$/framecontainer.obj \ - $(SLO)$/taskcreator.obj \ - $(SLO)$/menumanager.obj \ - $(SLO)$/bmkmenu.obj \ +SLOFILES= \ $(SLO)$/droptargetlistener.obj \ - $(SLO)$/converter.obj \ - $(SLO)$/actiontriggerpropertyset.obj \ - $(SLO)$/actiontriggerseparatorpropertyset.obj \ - $(SLO)$/actiontriggercontainer.obj \ - $(SLO)$/imagewrapper.obj \ - $(SLO)$/rootactiontriggercontainer.obj \ - $(SLO)$/protocolhandlercache.obj \ - $(SLO)$/addonmenu.obj \ - $(SLO)$/addonsoptions.obj \ - $(SLO)$/fwkresid.obj \ - $(SLO)$/fwlresid.obj \ - $(SLO)$/framelistanalyzer.obj \ - $(SLO)$/sfxhelperfunctions.obj \ - $(SLO)$/menuextensionsupplier.obj \ - $(SLO)$/fwktabwindow.obj + $(SLO)$/framecontainer.obj \ + $(SLO)$/fwktabwindow.obj \ + $(SLO)$/fwlresid.obj \ + $(SLO)$/menumanager.obj \ + $(SLO)$/taskcreator.obj \ SRS1NAME=$(TARGET) SRC1FILES =\ diff --git a/framework/source/dispatch/makefile.mk b/framework/source/dispatch/makefile.mk index 352aa66bfda7..38eee4683580 100644 --- a/framework/source/dispatch/makefile.mk +++ b/framework/source/dispatch/makefile.mk @@ -50,7 +50,6 @@ SLOFILES=\ $(SLO)$/dispatchinformationprovider.obj \ $(SLO)$/dispatchprovider.obj \ $(SLO)$/helpagentdispatcher.obj \ - $(SLO)$/interaction.obj \ $(SLO)$/interceptionhelper.obj \ $(SLO)$/loaddispatcher.obj \ $(SLO)$/mailtodispatcher.obj \ diff --git a/framework/source/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx similarity index 100% rename from framework/source/classes/actiontriggercontainer.cxx rename to framework/source/fwe/classes/actiontriggercontainer.cxx diff --git a/framework/source/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx similarity index 99% rename from framework/source/classes/actiontriggerpropertyset.cxx rename to framework/source/fwe/classes/actiontriggerpropertyset.cxx index aafc45601399..dd6d6b3c6415 100644 --- a/framework/source/classes/actiontriggerpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx @@ -44,6 +44,8 @@ using namespace com::sun::star::beans; using namespace com::sun::star::lang; using namespace com::sun::star::awt; +//struct SAL_DLLPUBLIC_IMPORT ::cppu::OBroadcastHelperVar< OMultiTypeInterfaceContainerHelper, OMultiTypeInterfaceContainerHelper::keyType >; + // Handles for properties // (PLEASE SORT THIS FIELD, IF YOU ADD NEW PROPERTIES!) // We use an enum to define these handles, to use all numbers from 0 to nn and diff --git a/framework/source/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx similarity index 100% rename from framework/source/classes/actiontriggerseparatorpropertyset.cxx rename to framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx diff --git a/framework/source/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx similarity index 100% rename from framework/source/classes/addonmenu.cxx rename to framework/source/fwe/classes/addonmenu.cxx diff --git a/framework/source/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx similarity index 100% rename from framework/source/classes/addonsoptions.cxx rename to framework/source/fwe/classes/addonsoptions.cxx diff --git a/framework/source/classes/bmkmenu.cxx b/framework/source/fwe/classes/bmkmenu.cxx similarity index 100% rename from framework/source/classes/bmkmenu.cxx rename to framework/source/fwe/classes/bmkmenu.cxx diff --git a/framework/source/classes/fwkresid.cxx b/framework/source/fwe/classes/fwkresid.cxx similarity index 100% rename from framework/source/classes/fwkresid.cxx rename to framework/source/fwe/classes/fwkresid.cxx diff --git a/framework/source/classes/imagewrapper.cxx b/framework/source/fwe/classes/imagewrapper.cxx similarity index 100% rename from framework/source/classes/imagewrapper.cxx rename to framework/source/fwe/classes/imagewrapper.cxx diff --git a/framework/source/fwe/classes/makefile.mk b/framework/source/fwe/classes/makefile.mk new file mode 100644 index 000000000000..06f29986340e --- /dev/null +++ b/framework/source/fwe/classes/makefile.mk @@ -0,0 +1,62 @@ +#************************************************************************* +# +# 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: makefile.mk,v $ +# +# $Revision: 1.36.82.1 $ +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/..$/.. + +PRJNAME= framework +TARGET= fwk_fweclasses +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +CDEFS+=-DFWE_DLLIMPLEMENTATION + +# --- Generate ----------------------------------------------------- + +SLOFILES= \ + $(SLO)$/actiontriggercontainer.obj \ + $(SLO)$/actiontriggerpropertyset.obj \ + $(SLO)$/actiontriggerseparatorpropertyset.obj \ + $(SLO)$/addonmenu.obj \ + $(SLO)$/addonsoptions.obj \ + $(SLO)$/bmkmenu.obj \ + $(SLO)$/fwkresid.obj \ + $(SLO)$/imagewrapper.obj \ + $(SLO)$/menuextensionsupplier.obj \ + $(SLO)$/rootactiontriggercontainer.obj \ + $(SLO)$/sfxhelperfunctions.obj \ + + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + diff --git a/framework/source/classes/menuextensionsupplier.cxx b/framework/source/fwe/classes/menuextensionsupplier.cxx similarity index 100% rename from framework/source/classes/menuextensionsupplier.cxx rename to framework/source/fwe/classes/menuextensionsupplier.cxx diff --git a/framework/source/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx similarity index 100% rename from framework/source/classes/rootactiontriggercontainer.cxx rename to framework/source/fwe/classes/rootactiontriggercontainer.cxx diff --git a/framework/source/classes/sfxhelperfunctions.cxx b/framework/source/fwe/classes/sfxhelperfunctions.cxx similarity index 98% rename from framework/source/classes/sfxhelperfunctions.cxx rename to framework/source/fwe/classes/sfxhelperfunctions.cxx index c5dfd6c2a6ee..0bb9fa58d7ab 100644 --- a/framework/source/classes/sfxhelperfunctions.cxx +++ b/framework/source/fwe/classes/sfxhelperfunctions.cxx @@ -31,9 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#ifndef __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_CXX_ #include -#endif static pfunc_setToolBoxControllerCreator pToolBoxControllerCreator = NULL; static pfunc_setStatusBarControllerCreator pStatusBarControllerCreator = NULL; diff --git a/framework/source/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx similarity index 99% rename from framework/source/dispatch/interaction.cxx rename to framework/source/fwe/dispatch/interaction.cxx index da03355a5e48..9f86b64e278f 100644 --- a/framework/source/dispatch/interaction.cxx +++ b/framework/source/fwe/dispatch/interaction.cxx @@ -51,6 +51,7 @@ namespace framework{ +//template class FWE_DLLEXPORT ContinuationBase; //_________________________________________________________________________________________________________________ // non exported const //_________________________________________________________________________________________________________________ diff --git a/framework/source/fwe/dispatch/makefile.mk b/framework/source/fwe/dispatch/makefile.mk new file mode 100644 index 000000000000..1490555d3432 --- /dev/null +++ b/framework/source/fwe/dispatch/makefile.mk @@ -0,0 +1,52 @@ +#************************************************************************* +# +# 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: makefile.mk,v $ +# +# $Revision: 1.17 $ +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/..$/.. + +PRJNAME= framework +TARGET= fwk_fwedispatch +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- defines ------------------------------------------------------ + +CDEFS+=-DCOMPMOD_NAMESPACE=framework -DFWE_DLLIMPLEMENTATION + +# --- Generate ----------------------------------------------------- + +SLOFILES=\ + $(SLO)$/interaction.obj \ + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/framework/source/helper/acceleratorinfo.cxx b/framework/source/fwe/helper/acceleratorinfo.cxx similarity index 100% rename from framework/source/helper/acceleratorinfo.cxx rename to framework/source/fwe/helper/acceleratorinfo.cxx diff --git a/framework/source/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx similarity index 100% rename from framework/source/helper/actiontriggerhelper.cxx rename to framework/source/fwe/helper/actiontriggerhelper.cxx diff --git a/framework/source/helper/configimporter.cxx b/framework/source/fwe/helper/configimporter.cxx similarity index 100% rename from framework/source/helper/configimporter.cxx rename to framework/source/fwe/helper/configimporter.cxx diff --git a/framework/source/helper/imageproducer.cxx b/framework/source/fwe/helper/imageproducer.cxx similarity index 100% rename from framework/source/helper/imageproducer.cxx rename to framework/source/fwe/helper/imageproducer.cxx diff --git a/framework/source/fwe/helper/makefile.mk b/framework/source/fwe/helper/makefile.mk new file mode 100644 index 000000000000..af762a055bcc --- /dev/null +++ b/framework/source/fwe/helper/makefile.mk @@ -0,0 +1,59 @@ +#************************************************************************* +# +# 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: makefile.mk,v $ +# +# $Revision: 1.34.82.1 $ +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/..$/.. + +PRJNAME= framework +TARGET= fwk_fwehelper +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- defines ------------------------------------------------------ + +CDEFS+=-DCOMPMOD_NAMESPACE=framework -DFWE_DLLIMPLEMENTATION + +# --- Generate ----------------------------------------------------- + +SLOFILES=\ +$(SLO)$/acceleratorinfo.obj \ +$(SLO)$/actiontriggerhelper.obj \ +$(SLO)$/configimporter.obj \ +$(SLO)$/imageproducer.obj \ +$(SLO)$/propertysetcontainer.obj \ +$(SLO)$/titlehelper.obj \ +$(SLO)$/uiconfigelementwrapperbase.obj \ +$(SLO)$/uielementwrapperbase.obj \ + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/framework/source/helper/propertysetcontainer.cxx b/framework/source/fwe/helper/propertysetcontainer.cxx similarity index 100% rename from framework/source/helper/propertysetcontainer.cxx rename to framework/source/fwe/helper/propertysetcontainer.cxx diff --git a/framework/source/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx similarity index 100% rename from framework/source/helper/titlehelper.cxx rename to framework/source/fwe/helper/titlehelper.cxx diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/fwe/helper/uiconfigelementwrapperbase.cxx similarity index 100% rename from framework/source/helper/uiconfigelementwrapperbase.cxx rename to framework/source/fwe/helper/uiconfigelementwrapperbase.cxx diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/fwe/helper/uielementwrapperbase.cxx similarity index 100% rename from framework/source/helper/uielementwrapperbase.cxx rename to framework/source/fwe/helper/uielementwrapperbase.cxx diff --git a/framework/source/fwe/interaction/makefile.mk b/framework/source/fwe/interaction/makefile.mk new file mode 100644 index 000000000000..206c2ab46806 --- /dev/null +++ b/framework/source/fwe/interaction/makefile.mk @@ -0,0 +1,52 @@ +#************************************************************************* +# +# 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: makefile.mk,v $ +# +# $Revision: 1.5.82.1 $ +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/..$/.. + +PRJNAME= framework +TARGET= fwk_fweinteraction +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- defines ------------------------------------------------------ + +CDEFS+=-DCOMPMOD_NAMESPACE=framework -DFWE_DLLIMPLEMENTATION + +# --- Generate ----------------------------------------------------- + +SLOFILES= \ + $(SLO)$/preventduplicateinteraction.obj + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/framework/source/interaction/preventduplicateinteraction.cxx b/framework/source/fwe/interaction/preventduplicateinteraction.cxx similarity index 100% rename from framework/source/interaction/preventduplicateinteraction.cxx rename to framework/source/fwe/interaction/preventduplicateinteraction.cxx diff --git a/framework/source/xml/eventsconfiguration.cxx b/framework/source/fwe/xml/eventsconfiguration.cxx similarity index 100% rename from framework/source/xml/eventsconfiguration.cxx rename to framework/source/fwe/xml/eventsconfiguration.cxx diff --git a/framework/source/xml/eventsdocumenthandler.cxx b/framework/source/fwe/xml/eventsdocumenthandler.cxx similarity index 99% rename from framework/source/xml/eventsdocumenthandler.cxx rename to framework/source/fwe/xml/eventsdocumenthandler.cxx index a741b2096e86..27627428bf5f 100644 --- a/framework/source/xml/eventsdocumenthandler.cxx +++ b/framework/source/fwe/xml/eventsdocumenthandler.cxx @@ -31,6 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" +#include #include //_________________________________________________________________________________________________________________ diff --git a/framework/source/xml/imagesconfiguration.cxx b/framework/source/fwe/xml/imagesconfiguration.cxx similarity index 100% rename from framework/source/xml/imagesconfiguration.cxx rename to framework/source/fwe/xml/imagesconfiguration.cxx diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/fwe/xml/imagesdocumenthandler.cxx similarity index 100% rename from framework/source/xml/imagesdocumenthandler.cxx rename to framework/source/fwe/xml/imagesdocumenthandler.cxx diff --git a/framework/source/fwe/xml/makefile.mk b/framework/source/fwe/xml/makefile.mk new file mode 100644 index 000000000000..6f7f104b2a77 --- /dev/null +++ b/framework/source/fwe/xml/makefile.mk @@ -0,0 +1,63 @@ +#************************************************************************* +# +# 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: makefile.mk,v $ +# +# $Revision: 1.7 $ +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/..$/.. + +PRJNAME= framework +TARGET= fwk_fwexml +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +CDEFS += -DFWE_DLLIMPLEMENTATION + +# --- Generate ----------------------------------------------------- + +SLOFILES= \ + $(SLO)$/eventsconfiguration.obj \ + $(SLO)$/eventsdocumenthandler.obj \ + $(SLO)$/imagesconfiguration.obj \ + $(SLO)$/imagesdocumenthandler.obj \ + $(SLO)$/menuconfiguration.obj \ + $(SLO)$/menudocumenthandler.obj \ + $(SLO)$/saxnamespacefilter.obj \ + $(SLO)$/statusbarconfiguration.obj \ + $(SLO)$/statusbardocumenthandler.obj \ + $(SLO)$/toolboxconfiguration.obj \ + $(SLO)$/toolboxdocumenthandler.obj \ + $(SLO)$/toolboxlayoutdocumenthandler.obj \ + $(SLO)$/xmlnamespaces.obj \ + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + diff --git a/framework/source/xml/menuconfiguration.cxx b/framework/source/fwe/xml/menuconfiguration.cxx similarity index 100% rename from framework/source/xml/menuconfiguration.cxx rename to framework/source/fwe/xml/menuconfiguration.cxx diff --git a/framework/source/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx similarity index 100% rename from framework/source/xml/menudocumenthandler.cxx rename to framework/source/fwe/xml/menudocumenthandler.cxx diff --git a/framework/source/xml/saxnamespacefilter.cxx b/framework/source/fwe/xml/saxnamespacefilter.cxx similarity index 100% rename from framework/source/xml/saxnamespacefilter.cxx rename to framework/source/fwe/xml/saxnamespacefilter.cxx diff --git a/framework/source/xml/statusbarconfiguration.cxx b/framework/source/fwe/xml/statusbarconfiguration.cxx similarity index 100% rename from framework/source/xml/statusbarconfiguration.cxx rename to framework/source/fwe/xml/statusbarconfiguration.cxx diff --git a/framework/source/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx similarity index 100% rename from framework/source/xml/statusbardocumenthandler.cxx rename to framework/source/fwe/xml/statusbardocumenthandler.cxx diff --git a/framework/source/xml/toolboxconfiguration.cxx b/framework/source/fwe/xml/toolboxconfiguration.cxx similarity index 100% rename from framework/source/xml/toolboxconfiguration.cxx rename to framework/source/fwe/xml/toolboxconfiguration.cxx diff --git a/framework/source/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx similarity index 100% rename from framework/source/xml/toolboxdocumenthandler.cxx rename to framework/source/fwe/xml/toolboxdocumenthandler.cxx diff --git a/framework/source/xml/toolboxlayoutdocumenthandler.cxx b/framework/source/fwe/xml/toolboxlayoutdocumenthandler.cxx similarity index 100% rename from framework/source/xml/toolboxlayoutdocumenthandler.cxx rename to framework/source/fwe/xml/toolboxlayoutdocumenthandler.cxx diff --git a/framework/source/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx similarity index 100% rename from framework/source/xml/xmlnamespaces.cxx rename to framework/source/fwe/xml/xmlnamespaces.cxx diff --git a/framework/source/classes/converter.cxx b/framework/source/fwi/classes/converter.cxx similarity index 100% rename from framework/source/classes/converter.cxx rename to framework/source/fwi/classes/converter.cxx diff --git a/framework/source/classes/framelistanalyzer.cxx b/framework/source/fwi/classes/framelistanalyzer.cxx similarity index 100% rename from framework/source/classes/framelistanalyzer.cxx rename to framework/source/fwi/classes/framelistanalyzer.cxx diff --git a/framework/source/fwi/classes/makefile.mk b/framework/source/fwi/classes/makefile.mk new file mode 100644 index 000000000000..8a4479fd54a0 --- /dev/null +++ b/framework/source/fwi/classes/makefile.mk @@ -0,0 +1,54 @@ +#************************************************************************* +# +# 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: makefile.mk,v $ +# +# $Revision: 1.36.82.1 $ +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/..$/.. + +PRJNAME= framework +TARGET= fwk_fwiclasses +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +CDEFS+=-DFWI_DLLIMPLEMENTATION + +# --- Generate ----------------------------------------------------- + +SLOFILES= \ + $(SLO)$/converter.obj \ + $(SLO)$/framelistanalyzer.obj \ + $(SLO)$/propertysethelper.obj \ + $(SLO)$/protocolhandlercache.obj \ + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + diff --git a/framework/source/classes/propertysethelper.cxx b/framework/source/fwi/classes/propertysethelper.cxx similarity index 100% rename from framework/source/classes/propertysethelper.cxx rename to framework/source/fwi/classes/propertysethelper.cxx diff --git a/framework/source/classes/protocolhandlercache.cxx b/framework/source/fwi/classes/protocolhandlercache.cxx similarity index 99% rename from framework/source/classes/protocolhandlercache.cxx rename to framework/source/fwi/classes/protocolhandlercache.cxx index f426eb530c90..918347a22f4c 100644 --- a/framework/source/classes/protocolhandlercache.cxx +++ b/framework/source/fwi/classes/protocolhandlercache.cxx @@ -335,7 +335,7 @@ void HandlerCFGAccess::read( HandlerHash** ppHandler , (**ppPattern)[*pItem] = lNames[nSource]; } - // �nsert the handler info into the normal handler cache + // ᅵnsert the handler info into the normal handler cache (**ppHandler)[lNames[nSource]] = aHandler; ++nSource; } diff --git a/framework/source/fwi/helper/makefile.mk b/framework/source/fwi/helper/makefile.mk new file mode 100644 index 000000000000..b688c3807355 --- /dev/null +++ b/framework/source/fwi/helper/makefile.mk @@ -0,0 +1,55 @@ +#************************************************************************* +# +# 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: makefile.mk,v $ +# +# $Revision: 1.34.82.1 $ +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/..$/.. + +PRJNAME= framework +TARGET= fwk_fwihelper +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- defines ------------------------------------------------------ + +CDEFS+=-DCOMPMOD_NAMESPACE=framework -DFWI_DLLIMPLEMENTATION + +# --- Generate ----------------------------------------------------- + +SLOFILES= \ + $(SLO)$/mischelper.obj \ + $(SLO)$/networkdomain.obj \ + $(SLO)$/popupmenucontrollerbase.obj \ + $(SLO)$/shareablemutex.obj \ + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/framework/source/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx similarity index 98% rename from framework/source/helper/mischelper.cxx rename to framework/source/fwi/helper/mischelper.cxx index 8e0f79b2607c..2c6f4b0073f9 100644 --- a/framework/source/helper/mischelper.cxx +++ b/framework/source/fwi/helper/mischelper.cxx @@ -1,76 +1,76 @@ -/************************************************************************* - * - * 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: langselectionstatusbarcontroller.cxx,v $ - * $Revision: 1.6.40.1 $ - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_framework.hxx" - -#include +/************************************************************************* + * + * 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: langselectionstatusbarcontroller.cxx,v $ + * $Revision: 1.6.40.1 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +#include #include #include - -#include -#include -#include -#include - - -using namespace ::com::sun::star; + +#include +#include +#include +#include + + +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; - -namespace framework -{ - -uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGuesser() const -{ - if (!m_xLanguageGuesser.is()) - { - try - { - m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >( - m_xServiceManager->createInstance( - rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ), - uno::UNO_QUERY ); - } - catch (uno::Exception &r) - { - (void) r; - DBG_ASSERT( 0, "failed to get language guessing component" ); - } - } - return m_xLanguageGuesser; -} - + +namespace framework +{ + +uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGuesser() const +{ + if (!m_xLanguageGuesser.is()) + { + try + { + m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >( + m_xServiceManager->createInstance( + rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ), + uno::UNO_QUERY ); + } + catch (uno::Exception &r) + { + (void) r; + DBG_ASSERT( 0, "failed to get language guessing component" ); + } + } + return m_xLanguageGuesser; +} + ::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory ,::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xUICommandLabels @@ -139,7 +139,7 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues } return aLabel; -} - -} // namespace framework - +} + +} // namespace framework + diff --git a/framework/source/helper/networkdomain.cxx b/framework/source/fwi/helper/networkdomain.cxx similarity index 100% rename from framework/source/helper/networkdomain.cxx rename to framework/source/fwi/helper/networkdomain.cxx diff --git a/framework/source/helper/popupmenucontrollerbase.cxx b/framework/source/fwi/helper/popupmenucontrollerbase.cxx similarity index 100% rename from framework/source/helper/popupmenucontrollerbase.cxx rename to framework/source/fwi/helper/popupmenucontrollerbase.cxx diff --git a/framework/source/helper/shareablemutex.cxx b/framework/source/fwi/helper/shareablemutex.cxx similarity index 100% rename from framework/source/helper/shareablemutex.cxx rename to framework/source/fwi/helper/shareablemutex.cxx diff --git a/framework/source/jobs/configaccess.cxx b/framework/source/fwi/jobs/configaccess.cxx similarity index 100% rename from framework/source/jobs/configaccess.cxx rename to framework/source/fwi/jobs/configaccess.cxx diff --git a/framework/source/jobs/jobconst.cxx b/framework/source/fwi/jobs/jobconst.cxx similarity index 100% rename from framework/source/jobs/jobconst.cxx rename to framework/source/fwi/jobs/jobconst.cxx diff --git a/framework/source/fwi/jobs/makefile.mk b/framework/source/fwi/jobs/makefile.mk new file mode 100644 index 000000000000..844153d55593 --- /dev/null +++ b/framework/source/fwi/jobs/makefile.mk @@ -0,0 +1,52 @@ +#************************************************************************* +# +# 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: makefile.mk,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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/..$/.. + +PRJNAME= framework +TARGET= fwk_fwijobs +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +CDEFS += -DFWI_DLLIMPLEMENTATION + +# --- Generate ----------------------------------------------------- + +SLOFILES= \ + $(SLO)$/jobconst.obj \ + $(SLO)$/configaccess.obj + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + diff --git a/framework/source/threadhelp/lockhelper.cxx b/framework/source/fwi/threadhelp/lockhelper.cxx similarity index 100% rename from framework/source/threadhelp/lockhelper.cxx rename to framework/source/fwi/threadhelp/lockhelper.cxx diff --git a/framework/source/threadhelp/makefile.mk b/framework/source/fwi/threadhelp/makefile.mk similarity index 97% rename from framework/source/threadhelp/makefile.mk rename to framework/source/fwi/threadhelp/makefile.mk index aa89ce09cda0..e22ed613734a 100644 --- a/framework/source/threadhelp/makefile.mk +++ b/framework/source/fwi/threadhelp/makefile.mk @@ -28,17 +28,17 @@ # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=..$/.. +PRJ=..$/..$/.. PRJNAME= framework TARGET= fwk_threadhelp -USE_DEFFILE= TRUE ENABLE_EXCEPTIONS= TRUE # --- Settings ----------------------------------------------------- .INCLUDE : settings.mk +CDEFS += -DFWI_DLLIMPLEMENTATION # --- Generate ----------------------------------------------------- SLOFILES= $(SLO)$/lockhelper.obj \ diff --git a/framework/source/threadhelp/transactionmanager.cxx b/framework/source/fwi/threadhelp/transactionmanager.cxx similarity index 99% rename from framework/source/threadhelp/transactionmanager.cxx rename to framework/source/fwi/threadhelp/transactionmanager.cxx index 031e64b1d4b7..b06dcd35bbce 100644 --- a/framework/source/threadhelp/transactionmanager.cxx +++ b/framework/source/fwi/threadhelp/transactionmanager.cxx @@ -39,6 +39,7 @@ #include #include +#include //_________________________________________________________________________________________________________________ // interface includes @@ -183,7 +184,7 @@ void TransactionManager::setWorkingMode( EWorkingMode eMode ) // Make member access threadsafe! ResetableGuard aGuard( m_aMutex ); - // Check working mode again .. because anoz�ther instance could be faster. + // Check working mode again .. because anozᅵther instance could be faster. // (It's possible to set this guard at first of this method too!) if( m_aTransactionManager.getWorkingMode() == E_INIT ) { diff --git a/framework/source/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx similarity index 100% rename from framework/source/uielement/constitemcontainer.cxx rename to framework/source/fwi/uielement/constitemcontainer.cxx diff --git a/framework/source/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx similarity index 100% rename from framework/source/uielement/itemcontainer.cxx rename to framework/source/fwi/uielement/itemcontainer.cxx diff --git a/framework/source/fwi/uielement/makefile.mk b/framework/source/fwi/uielement/makefile.mk new file mode 100644 index 000000000000..2a18cf47e11d --- /dev/null +++ b/framework/source/fwi/uielement/makefile.mk @@ -0,0 +1,52 @@ +#************************************************************************* +# +# 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: makefile.mk,v $ +# +# $Revision: 1.17 $ +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/..$/.. + +PRJNAME= framework +TARGET= fwk_fwiuielement +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +CDEFS += -DFWI_DLLIMPLEMENTATION + +# --- Generate ----------------------------------------------------- + +SLOFILES= \ + $(SLO)$/constitemcontainer.obj \ + $(SLO)$/itemcontainer.obj \ + $(SLO)$/rootitemcontainer.obj \ + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/framework/source/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx similarity index 100% rename from framework/source/uielement/rootitemcontainer.cxx rename to framework/source/fwi/uielement/rootitemcontainer.cxx diff --git a/framework/source/helper/makefile.mk b/framework/source/helper/makefile.mk index 7a2fc1816869..8f96dc95e70c 100644 --- a/framework/source/helper/makefile.mk +++ b/framework/source/helper/makefile.mk @@ -45,29 +45,18 @@ CDEFS+=-DCOMPMOD_NAMESPACE=framework # --- Generate ----------------------------------------------------- -SLOFILES= $(SLO)$/ocomponentaccess.obj \ - $(SLO)$/ocomponentenumeration.obj \ - $(SLO)$/oframes.obj \ - $(SLO)$/statusindicatorfactory.obj \ - $(SLO)$/statusindicator.obj \ - $(SLO)$/imageproducer.obj \ - $(SLO)$/propertysetcontainer.obj \ - $(SLO)$/actiontriggerhelper.obj \ - $(SLO)$/persistentwindowstate.obj \ - $(SLO)$/networkdomain.obj \ - $(SLO)$/acceleratorinfo.obj \ - $(SLO)$/uielementwrapperbase.obj \ - $(SLO)$/popupmenucontrollerbase.obj \ - $(SLO)$/dockingareadefaultacceptor.obj \ - $(SLO)$/uiconfigelementwrapperbase.obj \ - $(SLO)$/shareablemutex.obj \ - $(SLO)$/vclstatusindicator.obj \ - $(SLO)$/wakeupthread.obj \ - $(SLO)$/configimporter.obj \ - $(SLO)$/tagwindowasmodified.obj \ - $(SLO)$/titlebarupdate.obj \ - $(SLO)$/titlehelper.obj \ - $(SLO)$/mischelper.obj +SLOFILES=\ + $(SLO)$/dockingareadefaultacceptor.obj \ + $(SLO)$/ocomponentaccess.obj \ + $(SLO)$/ocomponentenumeration.obj \ + $(SLO)$/oframes.obj \ + $(SLO)$/persistentwindowstate.obj \ + $(SLO)$/statusindicator.obj \ + $(SLO)$/statusindicatorfactory.obj \ + $(SLO)$/tagwindowasmodified.obj \ + $(SLO)$/titlebarupdate.obj \ + $(SLO)$/vclstatusindicator.obj \ + $(SLO)$/wakeupthread.obj \ # --- Targets ------------------------------------------------------ diff --git a/framework/source/interaction/makefile.mk b/framework/source/interaction/makefile.mk index 4ae3564c21f7..b109082906b3 100644 --- a/framework/source/interaction/makefile.mk +++ b/framework/source/interaction/makefile.mk @@ -45,8 +45,7 @@ CDEFS+=-DCOMPMOD_NAMESPACE=framework # --- Generate ----------------------------------------------------- -SLOFILES= $(SLO)$/quietinteraction.obj \ - $(SLO)$/preventduplicateinteraction.obj +SLOFILES= $(SLO)$/quietinteraction.obj # --- Targets ------------------------------------------------------ diff --git a/framework/source/jobs/makefile.mk b/framework/source/jobs/makefile.mk index 090bc3dbfc0f..cbb91da31a3b 100644 --- a/framework/source/jobs/makefile.mk +++ b/framework/source/jobs/makefile.mk @@ -46,10 +46,8 @@ SLOFILES= $(SLO)$/jobexecutor.obj \ $(SLO)$/jobdata.obj \ $(SLO)$/jobresult.obj \ $(SLO)$/joburl.obj \ - $(SLO)$/jobconst.obj \ $(SLO)$/helponstartup.obj \ $(SLO)$/shelljob.obj \ - $(SLO)$/configaccess.obj # --- Targets ------------------------------------------------------ diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 9b19503f887e..4b72a1023a91 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -31,6 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" + #include "services/autorecovery.hxx" //_______________________________________________ @@ -95,6 +96,8 @@ #include +#include + //_______________________________________________ // namespaces @@ -104,6 +107,7 @@ namespace css = ::com::sun::star; namespace fpf = ::framework::pattern::frame; + namespace framework { diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 62361d619df3..6fa9f2717d72 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -104,6 +104,8 @@ #endif #include +#include + //_________________________________________________________________________________________________________________ // namespace //_________________________________________________________________________________________________________________ diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index bb3a18548b42..c64ca1e952ca 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -60,6 +60,8 @@ #include #include +#include + // ______________________________________________ // non exported const diff --git a/framework/source/uielement/makefile.mk b/framework/source/uielement/makefile.mk index 568be10c0d0b..367b5c63e64a 100644 --- a/framework/source/uielement/makefile.mk +++ b/framework/source/uielement/makefile.mk @@ -47,7 +47,6 @@ SLOFILES= \ $(SLO)$/buttontoolbarcontroller.obj \ $(SLO)$/comboboxtoolbarcontroller.obj \ $(SLO)$/complextoolbarcontroller.obj \ - $(SLO)$/constitemcontainer.obj \ $(SLO)$/controlmenucontroller.obj \ $(SLO)$/dropdownboxtoolbarcontroller.obj \ $(SLO)$/edittoolbarcontroller.obj \ @@ -57,7 +56,6 @@ SLOFILES= \ $(SLO)$/generictoolbarcontroller.obj \ $(SLO)$/headermenucontroller.obj \ $(SLO)$/imagebuttontoolbarcontroller.obj \ - $(SLO)$/itemcontainer.obj \ $(SLO)$/langselectionmenucontroller.obj \ $(SLO)$/langselectionstatusbarcontroller.obj \ $(SLO)$/logoimagestatusbarcontroller.obj \ @@ -70,7 +68,6 @@ SLOFILES= \ $(SLO)$/objectmenucontroller.obj \ $(SLO)$/progressbarwrapper.obj \ $(SLO)$/recentfilesmenucontroller.obj \ - $(SLO)$/rootitemcontainer.obj \ $(SLO)$/simpletextstatusbarcontroller.obj \ $(SLO)$/spinfieldtoolbarcontroller.obj \ $(SLO)$/statusbar.obj \ diff --git a/framework/source/xml/makefile.mk b/framework/source/xml/makefile.mk index 2d610ca0f3d9..4f37b22f40fc 100644 --- a/framework/source/xml/makefile.mk +++ b/framework/source/xml/makefile.mk @@ -41,21 +41,8 @@ ENABLE_EXCEPTIONS= TRUE # --- Generate ----------------------------------------------------- SLOFILES= \ - $(SLO)$/eventsconfiguration.obj \ - $(SLO)$/eventsdocumenthandler.obj \ - $(SLO)$/imagesconfiguration.obj \ - $(SLO)$/imagesdocumenthandler.obj \ - $(SLO)$/menuconfiguration.obj \ - $(SLO)$/menudocumenthandler.obj \ - $(SLO)$/statusbarconfiguration.obj \ - $(SLO)$/statusbardocumenthandler.obj \ - $(SLO)$/toolboxconfiguration.obj \ - $(SLO)$/toolboxdocumenthandler.obj \ - $(SLO)$/toolboxlayoutdocumenthandler.obj \ - $(SLO)$/saxnamespacefilter.obj \ - $(SLO)$/xmlnamespaces.obj \ - $(SLO)$/acceleratorconfigurationreader.obj \ - $(SLO)$/acceleratorconfigurationwriter.obj + $(SLO)$/acceleratorconfigurationreader.obj \ + $(SLO)$/acceleratorconfigurationwriter.obj \ # --- Targets ------------------------------------------------------ diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index 0a07f3cf137d..f4ef36b5335b 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -33,7 +33,6 @@ PRJ=.. PRJNAME= framework TARGET= framework -USE_DEFFILE= TRUE ENABLE_EXCEPTIONS= TRUE NO_BSYMBOLIC= TRUE GEN_HID= TRUE @@ -43,10 +42,17 @@ GEN_HID_OTHER= TRUE .INCLUDE : settings.mk +USE_DEFFILE= +SHL1USE_EXPORTS=name +SHL2USE_EXPORTS=name +SHL3USE_EXPORTS=name +SHL4USE_EXPORTS=name +SHL5USE_EXPORTS=name + + # --- internal import ------------------------------------------------- LIB1TARGET= $(SLB)$/fwiobj.lib - LIB1OBJFILES= \ $(SLO)$/converter.obj \ $(SLO)$/lockhelper.obj \ @@ -69,13 +75,11 @@ LIB1OBJFILES= \ # --- export library for sfx2 ------------------------------------------------- LIB2TARGET= $(SLB)$/fweobj.lib - LIB2OBJFILES= \ $(SLO)$/bmkmenu.obj \ $(SLO)$/eventsconfiguration.obj \ $(SLO)$/eventsdocumenthandler.obj \ $(SLO)$/imageproducer.obj \ - $(SLO)$/lockhelper.obj \ $(SLO)$/menuconfiguration.obj \ $(SLO)$/menudocumenthandler.obj \ $(SLO)$/saxnamespacefilter.obj \ @@ -110,11 +114,8 @@ LIB2OBJFILES= \ # --- import classes library --------------------------------------------------- SHL1TARGET= fwi$(DLLPOSTFIX) - SHL1IMPLIB= ifwi - SHL1LIBS= $(LIB1TARGET) - SHL1STDLIBS= \ $(UNOTOOLSLIB) \ $(CPPUHELPERLIB) \ @@ -133,22 +134,11 @@ SHL1STDLIBS+=\ $(KERNEL32LIB) .ENDIF -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) - -DEFLIB1NAME= fwiobj -DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt - - # --- export classes library --------------------------------------------------- SHL2TARGET= fwe$(DLLPOSTFIX) - SHL2IMPLIB= ifwe - SHL2LIBS= $(LIB2TARGET) - SHL2STDLIBS= \ $(FWILIB) \ $(VCLLIB) \ @@ -162,20 +152,10 @@ SHL2STDLIBS= \ $(VOSLIB) \ $(SALLIB) -SHL2DEF= $(MISC)$/$(SHL2TARGET).def -SHL2DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) - -DEF2NAME= $(SHL2TARGET) - -DEFLIB2NAME= fweobj -DEF2DEPN= $(MISC)$/$(SHL2TARGET).flt - # --- light services library ---------------------------------------------------- SHL3TARGET= fwl$(DLLPOSTFIX) - SHL3IMPLIB= ifwl - SHL3OBJS= $(SLO)$/mediatypedetectionhelper.obj\ $(SLO)$/registertemp.obj \ $(SLO)$/mailtodispatcher.obj \ @@ -218,19 +198,10 @@ SHL3STDLIBS= \ $(VCLLIB) \ $(SALLIB) -SHL3DEF= $(MISC)$/$(SHL3TARGET).def -SHL3DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2TARGETN) - -DEF3NAME= $(SHL3TARGET) - -SHL3VERSIONMAP= exports.map - # --- services library ---------------------------------------------------- SHL4TARGET= fwk$(DLLPOSTFIX) - SHL4IMPLIB= ifwk - SHL4OBJS= \ $(SLO)$/acceleratorcache.obj \ $(SLO)$/acceleratorconfiguration.obj \ @@ -246,7 +217,6 @@ SHL4OBJS= \ $(SLO)$/closedispatcher.obj \ $(SLO)$/comboboxtoolbarcontroller.obj \ $(SLO)$/complextoolbarcontroller.obj \ - $(SLO)$/configaccess.obj \ $(SLO)$/containerquery.obj \ $(SLO)$/contenthandler.obj \ $(SLO)$/controlmenucontroller.obj \ @@ -360,19 +330,10 @@ SHL4STDLIBS= \ $(UCBHELPERLIB) \ $(I18NISOLANGLIB) -SHL4DEF= $(MISC)$/$(SHL4TARGET).def -SHL4DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN) - -DEF4NAME= $(SHL4TARGET) - -SHL4VERSIONMAP= exports.map - # --- services library ---------------------------------------------------- SHL5TARGET= fwm$(DLLPOSTFIX) - SHL5IMPLIB= ifwm - SHL5OBJS= \ $(SLO)$/helponstartup.obj \ $(SLO)$/tabwinfactory.obj \ @@ -391,40 +352,17 @@ SHL5STDLIBS= \ $(CPPULIB) \ $(SALLIB) -SHL5DEF= $(MISC)$/$(SHL5TARGET).def -SHL5DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) - -DEF5NAME= $(SHL5TARGET) - -SHL5VERSIONMAP= exports.map - RESLIB1NAME= fwe RESLIB1IMAGES= $(PRJ)$/res RESLIB1SRSFILES= $(SRS)$/fwk_classes.srs \ $(SRS)$/fwk_services.srs \ +SHL2DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) +SHL3DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2TARGETN) +SHL4DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN) +SHL5DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) + # --- Targets ----------------------------------------------------------------- .INCLUDE : target.mk -$(MISC)$/$(SHL1TARGET).flt: makefile.mk - @echo ------------------------------ - @echo Making: $@ - @echo _Impl>$@ - @echo WEP>>$@ - @echo m_pLoader>$@ - @echo _TI2>>$@ - @echo _TI3>>$@ - @echo LIBMAIN>>$@ - @echo LibMain>>$@ - @echo _STL::pair>>$@ - -$(MISC)$/$(SHL2TARGET).flt: makefile.mk - @echo ------------------------------ - @echo Making: $@ - @echo _Impl>$@ - @echo WEP>>$@ - @echo m_pLoader>$@ - @echo _TI2>>$@ - @echo LIBMAIN>>$@ - @echo LibMain>>$@ From 5e838ad7d9d9919a362497cf5f04bdb2e7c1c6f7 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Apr 2010 23:02:51 +0200 Subject: [PATCH 003/279] CWS gnumake2: move delivered header files from sfx2/inc to sfx2/inc/sfx2; removed unused code; avoid delivering sfx.srs to solver --- idl/source/prj/command.cxx | 4 + sfx2/inc/{ => sfx2}/QuerySaveDocument.hxx | 0 sfx2/inc/{ => sfx2}/basmgr.hxx | 0 sfx2/inc/{ => sfx2}/brokenpackageint.hxx | 0 sfx2/inc/{ => sfx2}/dinfedt.hxx | 0 sfx2/inc/{ => sfx2}/docinsert.hxx | 0 sfx2/inc/{ => sfx2}/imagemgr.hxx | 0 sfx2/inc/{ => sfx2}/imgmgr.hxx | 0 sfx2/inc/{ => sfx2}/mailmodelapi.hxx | 0 sfx2/inc/{ => sfx2}/mieclip.hxx | 0 sfx2/inc/{ => sfx2}/minfitem.hxx | 0 sfx2/inc/sfx2/passwd.hxx | 6 +- sfx2/inc/sfx2/sfx.hrc | 3 - sfx2/inc/{ => sfx2}/sfxresid.hxx | 6 +- sfx2/inc/{ => sfx2}/tplpitem.hxx | 0 sfx2/inc/{ => sfx2}/viewfac.hxx | 7 +- sfx2/inc/sfx2/viewsh.hxx | 4 +- sfx2/prj/d.lst | 29 +- sfx2/source/appl/app.cxx | 15 +- sfx2/source/appl/app.src | 58 +++ sfx2/source/appl/appbas.cxx | 8 +- sfx2/source/appl/appcfg.cxx | 2 +- sfx2/source/appl/appdata.cxx | 2 +- sfx2/source/appl/appinit.cxx | 2 +- sfx2/source/appl/appmain.cxx | 2 +- sfx2/source/appl/appmisc.cxx | 2 +- sfx2/source/appl/appopen.cxx | 2 +- sfx2/source/appl/appquit.cxx | 2 +- sfx2/source/appl/appserv.cxx | 4 +- sfx2/source/appl/appuno.cxx | 5 +- sfx2/source/appl/imagemgr.cxx | 4 +- sfx2/source/appl/impldde.cxx | 2 +- sfx2/source/appl/linkmgr2.cxx | 2 +- sfx2/source/appl/lnkbase2.cxx | 2 +- sfx2/source/appl/makefile.mk | 3 +- sfx2/source/appl/module.cxx | 2 +- sfx2/source/appl/newhelp.cxx | 4 +- sfx2/source/appl/sfx.src | 91 ---- sfx2/source/appl/sfxhelp.cxx | 2 +- sfx2/source/appl/shutdownicon.cxx | 6 +- sfx2/source/appl/workwin.cxx | 2 +- sfx2/source/bastyp/fltfnc.cxx | 2 +- sfx2/source/bastyp/frmhtmlw.cxx | 2 +- sfx2/source/bastyp/mieclip.cxx | 2 +- sfx2/source/bastyp/progress.cxx | 2 +- sfx2/source/bastyp/sfxresid.cxx | 2 +- sfx2/source/config/evntconf.cxx | 12 +- sfx2/source/control/macrconf.cxx | 4 +- sfx2/source/control/minfitem.cxx | 5 +- sfx2/source/control/msgpool.cxx | 2 +- sfx2/source/control/objface.cxx | 2 +- sfx2/source/dialog/about.cxx | 21 +- sfx2/source/dialog/alienwarn.cxx | 2 +- sfx2/source/dialog/basedlgs.cxx | 2 +- sfx2/source/dialog/dinfdlg.cxx | 4 +- sfx2/source/dialog/dinfedt.cxx | 4 +- sfx2/source/dialog/filedlghelper.cxx | 2 +- sfx2/source/dialog/filtergrouping.cxx | 2 +- sfx2/source/dialog/mailmodel.cxx | 11 +- sfx2/source/dialog/mailmodelapi.cxx | 8 +- sfx2/source/dialog/makefile.mk | 10 - sfx2/source/dialog/mgetempl.cxx | 2 +- sfx2/source/dialog/navigat.cxx | 2 +- sfx2/source/dialog/newstyle.cxx | 2 +- sfx2/source/dialog/passwd.cxx | 2 +- sfx2/source/dialog/printopt.cxx | 2 +- sfx2/source/dialog/recfloat.cxx | 4 +- sfx2/source/dialog/sfxdlg.cxx | 4 +- sfx2/source/dialog/sfxurl.cxx | 2 +- sfx2/source/dialog/splitwin.cxx | 2 +- sfx2/source/dialog/srchdlg.cxx | 2 +- sfx2/source/dialog/styledlg.cxx | 2 +- sfx2/source/dialog/tabdlg.cxx | 2 +- sfx2/source/dialog/templdlg.cxx | 6 +- sfx2/source/dialog/tplcitem.cxx | 5 +- sfx2/source/dialog/tplpitem.cxx | 5 +- sfx2/source/dialog/versdlg.cxx | 2 +- sfx2/source/doc/QuerySaveDocument.cxx | 7 +- sfx2/source/doc/docfac.cxx | 4 +- sfx2/source/doc/docfile.cxx | 2 +- sfx2/source/doc/docinsert.cxx | 2 +- sfx2/source/doc/doctdlg.cxx | 2 +- sfx2/source/doc/doctempl.cxx | 2 +- sfx2/source/doc/doctemplates.cxx | 2 +- sfx2/source/doc/docvor.cxx | 2 +- sfx2/source/doc/graphhelp.cxx | 2 +- sfx2/source/doc/guisaveas.cxx | 2 +- sfx2/source/doc/new.cxx | 8 +- sfx2/source/doc/objcont.cxx | 4 +- sfx2/source/doc/objmisc.cxx | 2 +- sfx2/source/doc/objserv.cxx | 2 +- sfx2/source/doc/objstor.cxx | 2 +- sfx2/source/doc/objuno.cxx | 2 +- sfx2/source/doc/objxtor.cxx | 6 +- sfx2/source/doc/querytemplate.cxx | 2 +- sfx2/source/doc/sfxbasemodel.cxx | 6 +- sfx2/source/layout/sfxtabdialog.cxx | 2 +- sfx2/source/menu/mnuitem.cxx | 6 +- sfx2/source/menu/mnumgr.cxx | 2 +- sfx2/source/menu/virtmenu.cxx | 9 +- sfx2/source/notify/eventsupplier.cxx | 2 +- sfx2/source/toolbox/imgmgr.cxx | 4 +- sfx2/source/toolbox/tbxitem.cxx | 6 +- sfx2/source/view/frmload.cxx | 2 +- sfx2/source/view/orgmgr.cxx | 2 +- sfx2/source/view/printer.cxx | 2 +- sfx2/source/view/prnmon.cxx | 2 +- sfx2/source/view/topfrm.cxx | 2 +- sfx2/source/view/view.hrc | 6 - sfx2/source/view/viewfac.cxx | 13 +- sfx2/source/view/viewfrm.cxx | 20 +- sfx2/source/view/viewprn.cxx | 2 +- sfx2/source/view/viewsh.cxx | 4 +- svx/source/src/errtxt.src | 518 ++++++++++++++++++++++ svx/source/src/makefile.mk | 5 +- svx/util/makefile.mk | 98 ++-- 116 files changed, 802 insertions(+), 396 deletions(-) rename sfx2/inc/{ => sfx2}/QuerySaveDocument.hxx (100%) rename sfx2/inc/{ => sfx2}/basmgr.hxx (100%) rename sfx2/inc/{ => sfx2}/brokenpackageint.hxx (100%) rename sfx2/inc/{ => sfx2}/dinfedt.hxx (100%) rename sfx2/inc/{ => sfx2}/docinsert.hxx (100%) rename sfx2/inc/{ => sfx2}/imagemgr.hxx (100%) rename sfx2/inc/{ => sfx2}/imgmgr.hxx (100%) rename sfx2/inc/{ => sfx2}/mailmodelapi.hxx (100%) rename sfx2/inc/{ => sfx2}/mieclip.hxx (100%) rename sfx2/inc/{ => sfx2}/minfitem.hxx (100%) rename sfx2/inc/{ => sfx2}/sfxresid.hxx (96%) rename sfx2/inc/{ => sfx2}/tplpitem.hxx (100%) rename sfx2/inc/{ => sfx2}/viewfac.hxx (88%) create mode 100644 svx/source/src/errtxt.src diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx index 29c49199dc30..5c346cf06bab 100644 --- a/idl/source/prj/command.cxx +++ b/idl/source/prj/command.cxx @@ -205,7 +205,11 @@ BOOL ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ) } } else + { + const ByteString aStr( aFileName, RTL_TEXTENCODING_UTF8 ); + fprintf( stderr, "unable to read input file: %s\n", aStr.GetBuffer() ); return FALSE; + } } return TRUE; } diff --git a/sfx2/inc/QuerySaveDocument.hxx b/sfx2/inc/sfx2/QuerySaveDocument.hxx similarity index 100% rename from sfx2/inc/QuerySaveDocument.hxx rename to sfx2/inc/sfx2/QuerySaveDocument.hxx diff --git a/sfx2/inc/basmgr.hxx b/sfx2/inc/sfx2/basmgr.hxx similarity index 100% rename from sfx2/inc/basmgr.hxx rename to sfx2/inc/sfx2/basmgr.hxx diff --git a/sfx2/inc/brokenpackageint.hxx b/sfx2/inc/sfx2/brokenpackageint.hxx similarity index 100% rename from sfx2/inc/brokenpackageint.hxx rename to sfx2/inc/sfx2/brokenpackageint.hxx diff --git a/sfx2/inc/dinfedt.hxx b/sfx2/inc/sfx2/dinfedt.hxx similarity index 100% rename from sfx2/inc/dinfedt.hxx rename to sfx2/inc/sfx2/dinfedt.hxx diff --git a/sfx2/inc/docinsert.hxx b/sfx2/inc/sfx2/docinsert.hxx similarity index 100% rename from sfx2/inc/docinsert.hxx rename to sfx2/inc/sfx2/docinsert.hxx diff --git a/sfx2/inc/imagemgr.hxx b/sfx2/inc/sfx2/imagemgr.hxx similarity index 100% rename from sfx2/inc/imagemgr.hxx rename to sfx2/inc/sfx2/imagemgr.hxx diff --git a/sfx2/inc/imgmgr.hxx b/sfx2/inc/sfx2/imgmgr.hxx similarity index 100% rename from sfx2/inc/imgmgr.hxx rename to sfx2/inc/sfx2/imgmgr.hxx diff --git a/sfx2/inc/mailmodelapi.hxx b/sfx2/inc/sfx2/mailmodelapi.hxx similarity index 100% rename from sfx2/inc/mailmodelapi.hxx rename to sfx2/inc/sfx2/mailmodelapi.hxx diff --git a/sfx2/inc/mieclip.hxx b/sfx2/inc/sfx2/mieclip.hxx similarity index 100% rename from sfx2/inc/mieclip.hxx rename to sfx2/inc/sfx2/mieclip.hxx diff --git a/sfx2/inc/minfitem.hxx b/sfx2/inc/sfx2/minfitem.hxx similarity index 100% rename from sfx2/inc/minfitem.hxx rename to sfx2/inc/sfx2/minfitem.hxx diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx index bfe8debecca1..e80dd9871744 100644 --- a/sfx2/inc/sfx2/passwd.hxx +++ b/sfx2/inc/sfx2/passwd.hxx @@ -31,14 +31,12 @@ #define _SFX_PASSWD_HXX #include "sal/config.h" -#include "sfx2/dllapi.h" - -#ifndef _SV_BUTTON_HXX +#include #include -#endif #include #include #include +#include // defines --------------------------------------------------------------- diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc index 9bba3997a71f..64036fd876d4 100644 --- a/sfx2/inc/sfx2/sfx.hrc +++ b/sfx2/inc/sfx2/sfx.hrc @@ -359,9 +359,6 @@ #define RID_ITEMLIST_LINGU (RID_OPTIONS_START + 11) #define RID_SFXPAGE_PRINTOPTIONS (RID_OPTIONS_START + 12) -#define STR_UNDO (RID_SFX_VIEW_START+11) -#define STR_REDO (RID_SFX_VIEW_START+12) -#define STR_REPEAT (RID_SFX_VIEW_START+13) #define RID_STR_NEW_TASK (RID_SFX_DOC_START+ 76) // Member-Ids ------------------------------------------------------------ diff --git a/sfx2/inc/sfxresid.hxx b/sfx2/inc/sfx2/sfxresid.hxx similarity index 96% rename from sfx2/inc/sfxresid.hxx rename to sfx2/inc/sfx2/sfxresid.hxx index 63835281153d..d3a4443bf2cc 100644 --- a/sfx2/inc/sfxresid.hxx +++ b/sfx2/inc/sfx2/sfxresid.hxx @@ -31,12 +31,10 @@ #define _SFX_SFXRESID_HXX #include - -#ifndef _RESID_HXX //autogen +#include "sfx2/dllapi.h" #include -#endif -class SfxResId: public ResId +class SFX2_DLLPUBLIC SfxResId: public ResId { public: SfxResId( USHORT nId ); diff --git a/sfx2/inc/tplpitem.hxx b/sfx2/inc/sfx2/tplpitem.hxx similarity index 100% rename from sfx2/inc/tplpitem.hxx rename to sfx2/inc/sfx2/tplpitem.hxx diff --git a/sfx2/inc/viewfac.hxx b/sfx2/inc/sfx2/viewfac.hxx similarity index 88% rename from sfx2/inc/viewfac.hxx rename to sfx2/inc/sfx2/viewfac.hxx index 24b4a860f0b0..4d21a93a4ea1 100644 --- a/sfx2/inc/viewfac.hxx +++ b/sfx2/inc/sfx2/viewfac.hxx @@ -48,22 +48,17 @@ typedef void (*SfxViewInit)(); class SFX2_DLLPUBLIC SfxViewFactory { public: - SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, - USHORT nOrdinal, const ResId& aDescrResId ); + SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, USHORT nOrdinal ); ~SfxViewFactory(); SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh); void InitFactory(); - - String GetDescription() const - { return String( aDescription ); } USHORT GetOrdinal() const { return nOrd; } private: SfxViewCtor fnCreate; SfxViewInit fnInit; USHORT nOrd; - ResId aDescription; }; #endif diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx index 83ac73dbdd80..e5bb30bfb1db 100644 --- a/sfx2/inc/sfx2/viewsh.hxx +++ b/sfx2/inc/sfx2/viewsh.hxx @@ -135,13 +135,13 @@ public: \ static SfxViewFactory&Factory() { return *pFactory; } \ static void InitFactory() -#define SFX_IMPL_VIEWFACTORY(Class, rResId) \ +#define SFX_IMPL_VIEWFACTORY(Class) \ SfxViewFactory* Class::pFactory; \ SfxViewShell* __EXPORT Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView) \ { return new Class(pFrame, pOldView); } \ void Class::RegisterFactory( USHORT nPrio ) \ { \ - pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio,rResId);\ + pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio);\ InitFactory(); \ } \ void Class::InitFactory() diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst index fe71b1715769..b36ec3fea06a 100644 --- a/sfx2/prj/d.lst +++ b/sfx2/prj/d.lst @@ -22,20 +22,33 @@ mkdir: %_DEST%\inc%_EXT%\sfx2 ..\%COMMON_OUTDIR%\srs\sfxslots_srs.hid %COMMON_DEST%\res%_EXT%\sfxslots_srs.hid ..\util\sfx.xml %_DEST%\xml%_EXT%\sfx.xml ..\%__SRC%\misc\sfx2.csv %_DEST%\inc%_EXT%\sfx2.csv -..\inc\sfx2\dllapi.h %_DEST%\inc%_EXT%\sfx2\dllapi.h ..\sdi\sfx.sdi %_DEST%\inc%_EXT%\sfx2\sfx.sdi ..\sdi\sfxitems.sdi %_DEST%\inc%_EXT%\sfx2\sfxitems.sdi + +..\inc\sfx2\brokenpackageint.hxx %_DEST%\inc%_EXT%\sfx2\brokenpackageint.hxx +..\inc\sfx2\dinfedt.hxx %_DEST%\inc%_EXT%\sfx2\dinfedt.hxx +..\inc\sfx2\imgmgr.hxx %_DEST%\inc%_EXT%\sfx2\imgmgr.hxx +..\inc\sfx2\mieclip.hxx %_DEST%\inc%_EXT%\sfx2\mieclip.hxx +..\inc\sfx2\minfitem.hxx %_DEST%\inc%_EXT%\sfx2\minfitem.hxx +..\inc\sfx2\tplpitem.hxx %_DEST%\inc%_EXT%\sfx2\tplpitem.hxx +..\inc\sfx2\basmgr.hxx %_DEST%\inc%_EXT%\sfx2\basmgr.hxx +..\inc\sfx2\imagemgr.hxx %_DEST%\inc%_EXT%\sfx2\imagemgr.hxx +..\inc\sfx2\QuerySaveDocument.hxx %_DEST%\inc%_EXT%\sfx2\QuerySaveDocument.hxx +..\inc\sfx2\mailmodelapi.hxx %_DEST%\inc%_EXT%\sfx2\mailmodelapi.hxx +..\inc\sfx2\docinsert.hxx %_DEST%\inc%_EXT%\sfx2\docinsert.hxx +..\inc\sfx2\viewfac.hxx %_DEST%\inc%_EXT%\sfx2\viewfac.hxx +..\inc\sfx2\sfxresid.hxx %_DEST%\inc%_EXT%\sfx2\sfxresid.hxx + +..\inc\sfx2\dllapi.h %_DEST%\inc%_EXT%\sfx2\dllapi.h ..\inc\sfx2\app.hxx %_DEST%\inc%_EXT%\sfx2\app.hxx ..\inc\sfx2\basedlgs.hxx %_DEST%\inc%_EXT%\sfx2\basedlgs.hxx ..\inc\sfx2\bindings.hxx %_DEST%\inc%_EXT%\sfx2\bindings.hxx -..\inc\brokenpackageint.hxx %_DEST%\inc%_EXT%\sfx2\brokenpackageint.hxx ..\inc\sfx2\chalign.hxx %_DEST%\inc%_EXT%\sfx2\chalign.hxx ..\inc\sfx2\childwin.hxx %_DEST%\inc%_EXT%\sfx2\childwin.hxx ..\inc\sfx2\ctrlitem.hxx %_DEST%\inc%_EXT%\sfx2\ctrlitem.hxx ..\inc\sfx2\dispatch.hxx %_DEST%\inc%_EXT%\sfx2\dispatch.hxx ..\inc\sfx2\dinfdlg.hxx %_DEST%\inc%_EXT%\sfx2\dinfdlg.hxx -..\inc\dinfedt.hxx %_DEST%\inc%_EXT%\sfx2\dinfedt.hxx ..\inc\sfx2\docinf.hxx %_DEST%\inc%_EXT%\sfx2\docinf.hxx ..\inc\sfx2\docfac.hxx %_DEST%\inc%_EXT%\sfx2\docfac.hxx ..\inc\sfx2\docfile.hxx %_DEST%\inc%_EXT%\sfx2\docfile.hxx @@ -53,15 +66,12 @@ mkdir: %_DEST%\inc%_EXT%\sfx2 ..\inc\sfx2\frmhtmlw.hxx %_DEST%\inc%_EXT%\sfx2\frmhtmlw.hxx ..\inc\sfx2\genlink.hxx %_DEST%\inc%_EXT%\sfx2\genlink.hxx ..\inc\sfx2\hintpost.hxx %_DEST%\inc%_EXT%\sfx2\hintpost.hxx -..\inc\imgmgr.hxx %_DEST%\inc%_EXT%\sfx2\imgmgr.hxx ..\inc\sfx2\imgdef.hxx %_DEST%\inc%_EXT%\sfx2\imgdef.hxx ..\inc\sfx2\ipclient.hxx %_DEST%\inc%_EXT%\sfx2\ipclient.hxx ..\inc\sfx2\macrconf.hxx %_DEST%\inc%_EXT%\sfx2\macrconf.hxx ..\inc\sfx2\topfrm.hxx %_DEST%\inc%_EXT%\sfx2\topfrm.hxx ..\inc\sfx2\mgetempl.hxx %_DEST%\inc%_EXT%\sfx2\mgetempl.hxx -..\inc\mieclip.hxx %_DEST%\inc%_EXT%\sfx2\mieclip.hxx ..\inc\sfx2\minarray.hxx %_DEST%\inc%_EXT%\sfx2\minarray.hxx -..\inc\minfitem.hxx %_DEST%\inc%_EXT%\sfx2\minfitem.hxx ..\inc\sfx2\minstack.hxx %_DEST%\inc%_EXT%\sfx2\minstack.hxx ..\inc\sfx2\mnuitem.hxx %_DEST%\inc%_EXT%\sfx2\mnuitem.hxx ..\inc\sfx2\module.hxx %_DEST%\inc%_EXT%\sfx2\module.hxx @@ -97,10 +107,8 @@ mkdir: %_DEST%\inc%_EXT%\sfx2 ..\inc\sfx2\tabdlg.hxx %_DEST%\inc%_EXT%\sfx2\tabdlg.hxx ..\inc\sfx2\tbxctrl.hxx %_DEST%\inc%_EXT%\sfx2\tbxctrl.hxx ..\inc\sfx2\templdlg.hxx %_DEST%\inc%_EXT%\sfx2\templdlg.hxx -..\inc\tplpitem.hxx %_DEST%\inc%_EXT%\sfx2\tplpitem.hxx ..\inc\sfx2\viewfrm.hxx %_DEST%\inc%_EXT%\sfx2\viewfrm.hxx ..\inc\sfx2\viewsh.hxx %_DEST%\inc%_EXT%\sfx2\viewsh.hxx -..\inc\viewfac.hxx %_DEST%\inc%_EXT%\sfx2\viewfac.hxx ..\inc\sfx2\appuno.hxx %_DEST%\inc%_EXT%\sfx2\appuno.hxx ..\inc\sfx2\sfxuno.hxx %_DEST%\inc%_EXT%\sfx2\sfxuno.hxx ..\inc\sfx2\sfxbasemodel.hxx %_DEST%\inc%_EXT%\sfx2\sfxbasemodel.hxx @@ -109,8 +117,6 @@ mkdir: %_DEST%\inc%_EXT%\sfx2 ..\inc\sfx2\srchitem.hxx %_DEST%\inc%_EXT%\sfx2\srchitem.hxx ..\inc\sfx2\srchdefs.hxx %_DEST%\inc%_EXT%\sfx2\srchdefs.hxx ..\inc\sfx2\cntids.hrc %_DEST%\inc%_EXT%\sfx2\cntids.hrc -..\inc\basmgr.hxx %_DEST%\inc%_EXT%\sfx2\basmgr.hxx -..\inc\imagemgr.hxx %_DEST%\inc%_EXT%\sfx2\imagemgr.hxx ..\inc\sfx2\sfxdlg.hxx %_DEST%\inc%_EXT%\sfx2\sfxdlg.hxx ..\inc\sfx2\dialogs.hrc %_DEST%\inc%_EXT%\sfx2\dialogs.hrc ..\inc\sfx2\itemwrapper.hxx %_DEST%\inc%_EXT%\sfx2\itemwrapper.hxx @@ -121,9 +127,6 @@ mkdir: %_DEST%\inc%_EXT%\sfx2 ..\inc\sfx2\linksrc.hxx %_DEST%\inc%_EXT%\sfx2\linksrc.hxx ..\inc\sfx2\querystatus.hxx %_DEST%\inc%_EXT%\sfx2\querystatus.hxx ..\inc\sfx2\sfxstatuslistener.hxx %_DEST%\inc%_EXT%\sfx2\sfxstatuslistener.hxx -..\inc\QuerySaveDocument.hxx %_DEST%\inc%_EXT%\sfx2\QuerySaveDocument.hxx -..\inc\mailmodelapi.hxx %_DEST%\inc%_EXT%\sfx2\mailmodelapi.hxx -..\inc\docinsert.hxx %_DEST%\inc%_EXT%\sfx2\docinsert.hxx ..\inc\sfx2\layout.hxx %_DEST%\inc%_EXT%\sfx2\layout.hxx ..\inc\sfx2\layout-tabdlg.hxx %_DEST%\inc%_EXT%\sfx2\layout-tabdlg.hxx ..\inc\sfx2\layout-post.hxx %_DEST%\inc%_EXT%\sfx2\layout-post.hxx diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 8d13066a8340..443f00edb27e 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -46,14 +46,10 @@ #include #include #include -#ifndef _SOUND_HXX //autogen #include -#endif #include #include -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include @@ -61,8 +57,6 @@ #include #include #include -#ifndef GCC -#endif #define _SVSTDARR_STRINGSDTOR #include @@ -81,23 +75,18 @@ #include #include #include -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include -#endif #include #include - #include #include #include - #include - #include #include "sfxhelp.hxx" #include #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "arrdecl.hxx" #include #include @@ -294,7 +283,7 @@ void SfxPropertyHandler::Property( ApplicationProperty& rProp ) #include #include #include -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include "fwkhelper.hxx" ::osl::Mutex SfxApplication::gMutex; diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src index 463788d2d6d0..ab27b83bb889 100644 --- a/sfx2/source/appl/app.src +++ b/sfx2/source/appl/app.src @@ -34,6 +34,45 @@ #include "app.hrc" #include "helpid.hrc" +String STR_NONAME +{ + Text [ en-US ] = "Untitled" ; +}; +String STR_CLOSE +{ + Text [ en-US ] = "Close" ; +}; +String STR_STYLE_FILTER_AUTO +{ + Text [ en-US ] = "Automatic" ; +}; +String STR_STANDARD_SHORTCUT +{ + Text [ en-US ] = "Standard" ; +}; +String STR_BYTES +{ + Text [ en-US ] = "Bytes" ; +}; +String STR_KB +{ + Text [ en-US ] = "KB" ; +}; +String STR_MB +{ + Text [ en-US ] = "MB" ; +}; +String STR_GB +{ + Text [ en-US ] = "GB" ; +}; +QueryBox MSG_QUERY_LASTVERSION +{ + Buttons = WB_YES_NO ; + DefButton = WB_DEF_NO ; + Message [ en-US ] = "Cancel all changes?" ; +}; + InfoBox RID_DOCALREADYLOADED_DLG { Message [ en-US ] = "Document already open." ; @@ -1061,3 +1100,22 @@ Image IMG_MISSING_4 { ImageBitmap = Bitmap { File = "sn064.bmp" ; }; }; +String STR_STANDARD +{ + Text [ en-US ] = "Standard" ; +}; +String STR_NONE +{ + Text [ en-US ] = "- None -" ; +}; +String STR_SFX_FILTERNAME_ALL +{ + Text [ en-US ] = "All files (*.*)" ; +}; +// i66948 used in project scripting +String STR_ERRUNOEVENTBINDUNG +{ + Text [ en-US ] = "An appropriate component method %1\ncould not be found.\n\nCheck spelling of method name."; +}; + + diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 4fe352c3c4bc..977ab7a4aa36 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -63,7 +63,7 @@ #include "arrdecl.hxx" #include #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include @@ -72,8 +72,8 @@ #include #include #include -#include "tplpitem.hxx" -#include "minfitem.hxx" +#include "sfx2/tplpitem.hxx" +#include "sfx2/minfitem.hxx" #include "app.hrc" #include #include @@ -82,7 +82,7 @@ #include "appdata.hxx" #include "appbas.hxx" #include "sfxhelp.hxx" -#include "basmgr.hxx" +#include "sfx2/basmgr.hxx" #include "sorgitm.hxx" #include "appbaslib.hxx" #include diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 5638800a9e4f..affe0d19c0ec 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -96,7 +96,7 @@ #include #include "helper.hxx" // SfxContentHelper::... #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "shutdownicon.hxx" using namespace ::com::sun::star::uno; diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index e53a4cacdb93..468aa3fd9a01 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -60,7 +60,7 @@ #include #include "referers.hxx" #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "objshimp.hxx" #include #include "imestatuswindow.hxx" diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 837ccc461586..1bca6323f699 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -85,7 +85,7 @@ #include #include #include "sfxhelp.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxtypes.hxx" #include #include "nochaos.hxx" diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx index 253311c54f3d..28373f81ad08 100644 --- a/sfx2/source/appl/appmain.cxx +++ b/sfx2/source/appl/appmain.cxx @@ -56,7 +56,7 @@ #include #include "arrdecl.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include "intro.hxx" diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 1bb12990cb42..55785115ec2d 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -67,7 +67,7 @@ #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "appdata.hxx" #include "arrdecl.hxx" diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index bf3cb633cf6a..0ff8c1b14c7f 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -101,7 +101,7 @@ #include #include "referers.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "app.hrc" #include diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index 63d33e54997b..36f4913ff8e3 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -56,7 +56,7 @@ #include #include #include "arrdecl.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 4580a11270e0..bbf567c0b852 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -124,12 +124,12 @@ #include #include "app.hrc" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "arrdecl.hxx" #include #include "appdata.hxx" #include -#include "minfitem.hxx" +#include "sfx2/minfitem.hxx" #include #include #include diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 7fb6ef35167f..1f6aa25d0e28 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -55,10 +55,7 @@ #include #include #include -#ifndef _BASIC_SBUNO_HXX #include -#endif - #include #include #include @@ -134,7 +131,7 @@ using namespace ::com::sun::star::io; #include "fltoptint.hxx" #include #include -#include "brokenpackageint.hxx" +#include "sfx2/brokenpackageint.hxx" #include "eventsupplier.hxx" #include "xpackcreator.hxx" // #include "applet.hxx" diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index 6f226bad8040..8efebe016640 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include #include #include @@ -44,7 +44,7 @@ #include #include -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include #include #include diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 2bf84f87e973..e6bfaaf0d797 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -48,7 +48,7 @@ #include "dde.hrc" #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index 3533fb8a428f..b51d8a31c175 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -43,7 +43,7 @@ //#include "iface.hxx" #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #define _SVSTDARR_STRINGSDTOR diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 8a852b44b6f7..c6568dc4f298 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -45,7 +45,7 @@ //#include #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk index 48d1258e2838..d72cf8718a0b 100644 --- a/sfx2/source/appl/makefile.mk +++ b/sfx2/source/appl/makefile.mk @@ -60,7 +60,8 @@ CFLAGS+=-DENABLE_QUICKSTART_APPLET .INCLUDE: pkg_config.mk CFLAGS+=$(PKGCONFIG_CFLAGS) CFLAGS+=-DENABLE_QUICKSTART_APPLET - CDEFS+=-DPLUGIN_NAME=libqstart_gtk$(DLLPOSTFIX)$(DLLPOST) +# definition moved to shutdownicon.cxx +# CDEFS+=-DPLUGIN_NAME=libqstart_gtk$(DLLPOSTFIX)$(DLLPOST) .ENDIF # "$(ENABLE_SYSTRAY_GTK)"=="TRUE" .ELSE CDEFS+=-DDLL_NAME=sfx$(DLLPOSTFIX)$(DLLPOST) diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index 566d1af69242..d1c6e14c74d4 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -41,7 +41,7 @@ #include #include #include "arrdecl.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include "stbitem.hxx" diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index c5412f35d0f6..3649f31943e5 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -33,14 +33,14 @@ #include "newhelp.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "helpinterceptor.hxx" #include "helper.hxx" #include #include #include "sfxtypes.hxx" #include "panelist.hxx" -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "srchdlg.hxx" #include "sfxhelp.hxx" diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src index ba9f4a3ffe11..9be3d778013b 100644 --- a/sfx2/source/appl/sfx.src +++ b/sfx2/source/appl/sfx.src @@ -30,107 +30,16 @@ #include -String STR_NONAME -{ - Text [ en-US ] = "Untitled" ; -}; - -String STR_NONE -{ - Text [ en-US ] = "- None -" ; -}; - -String STR_CLOSE -{ - Text [ en-US ] = "Close" ; -}; - -String STR_STYLE_FILTER_AUTO -{ - Text [ en-US ] = "Automatic" ; -}; - String STR_STYLE_FILTER_USED { Text [ en-US ] = "Applied Styles" ; }; - - - String STR_STYLE_FILTER_USERDEF { Text [ en-US ] = "Custom Styles" ; }; - String STR_STYLE_FILTER_ALL { Text [ en-US ] = "All Styles" ; }; -String STR_STANDARD -{ - Text [ en-US ] = "Standard" ; -}; -String STR_STANDARD_SHORTCUT -{ - Text [ en-US ] = "Standard" ; -}; - -String STR_SFX_FILTERNAME_ALL -{ - Text [ en-US ] = "All files (*.*)" ; -}; - -String STR_BYTES -{ - Text [ en-US ] = "Bytes" ; -}; - -String STR_KB -{ - Text [ en-US ] = "KB" ; -}; - -String STR_MB -{ - Text [ en-US ] = "MB" ; -}; - - -String STR_GB -{ - Text [ en-US ] = "GB" ; -}; - -String STR_UNDO -{ - Text [ en-US ] = "Undo: " ; -}; - -String STR_REDO -{ - Text [ en-US ] = "Re~do: " ; -}; - -String STR_REPEAT -{ - Text [ en-US ] = "~Repeat: " ; -}; - -String RID_STR_NEW_TASK -{ - Text [ en-US ] = "New task"; -}; -QueryBox MSG_QUERY_LASTVERSION -{ - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Cancel all changes?" ; -}; - -// i66948 used in project scripting -String STR_ERRUNOEVENTBINDUNG -{ - Text [ en-US ] = "An appropriate component method %1\ncould not be found.\n\nCheck spelling of method name."; -}; - diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 491de2138917..eea3097e83f9 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -83,7 +83,7 @@ #include "newhelp.hxx" #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "helper.hxx" #include "app.hrc" diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 52805082de38..1a6e31b7769c 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -71,7 +71,7 @@ #endif #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; @@ -91,6 +91,10 @@ extern "C" { static void SAL_CALL thisModule() {} } # endif #endif +#if defined(UNX) && defined(ENABLE_SYSTRAY_GTK) +#define PLUGIN_NAME "libqstart_gtkli.so" +#endif + class SfxNotificationListener_Impl : public cppu::WeakImplHelper1< XDispatchResultListener > { public: diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 7287023f1845..1ca17aa97478 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -50,7 +50,7 @@ #include #include "splitwin.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include // SFX_ITEMSET_SET #include diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 4b4c17a2c5f2..074a3052b443 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -123,7 +123,7 @@ using namespace ::vos; #include #include "openflag.hxx" #include "bastyp.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index 2d1c6db11762..96ee65bc0b0a 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -49,7 +49,7 @@ #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include "bastyp.hrc" diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx index e48c3a0cb069..24f988d18a58 100644 --- a/sfx2/source/bastyp/mieclip.cxx +++ b/sfx2/source/bastyp/mieclip.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include MSE40HTMLClipFormatObj::~MSE40HTMLClipFormatObj() diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index 8f143bb4baee..813640aa327c 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -54,7 +54,7 @@ #include "sfxtypes.hxx" #include #include "workwin.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "bastyp.hrc" #include diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx index a256438f4286..dc82a0b5f80a 100644 --- a/sfx2/source/bastyp/sfxresid.cxx +++ b/sfx2/source/bastyp/sfxresid.cxx @@ -35,7 +35,7 @@ #endif #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include // ----------------------------------------------------------------------- diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx index 763595913fcd..a20101006d67 100644 --- a/sfx2/source/config/evntconf.cxx +++ b/sfx2/source/config/evntconf.cxx @@ -31,35 +31,27 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include -#ifndef _SV_RESARY_HXX #include -#endif #include #include #include #include #include - -#include + #include #include -#ifndef _RTL_USTRING_ #include -#endif - #include #include #include - #include - #include #include #include #include #include #include "config.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "eventsupplier.hxx" #include diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx index d4149421f161..fcbe65c6826a 100644 --- a/sfx2/source/control/macrconf.cxx +++ b/sfx2/source/control/macrconf.cxx @@ -62,8 +62,8 @@ #include #include #include -#include "minfitem.hxx" -#include "imgmgr.hxx" +#include "sfx2/minfitem.hxx" +#include "sfx2/imgmgr.hxx" #include #include #include diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx index e288d5e77c7d..53aa3a3b694d 100644 --- a/sfx2/source/control/minfitem.cxx +++ b/sfx2/source/control/minfitem.cxx @@ -33,10 +33,7 @@ // INCLUDE --------------------------------------------------------------- -#ifndef GCC -#endif - -#include "minfitem.hxx" +#include "sfx2/minfitem.hxx" // STATIC DATA ----------------------------------------------------------- diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx index 2e62d76feff6..69948bfabd9e 100644 --- a/sfx2/source/control/msgpool.cxx +++ b/sfx2/source/control/msgpool.cxx @@ -44,7 +44,7 @@ #include #include "sfxtypes.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "arrdecl.hxx" #include diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index b21c859687f5..b17c6364fe3a 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx index 916af19962d6..6aed793a2daa 100644 --- a/sfx2/source/dialog/about.cxx +++ b/sfx2/source/dialog/about.cxx @@ -32,17 +32,8 @@ #include "precompiled_sfx2.hxx" // include --------------------------------------------------------------- -#include - -#ifndef _SV_APP_HXX #include -#endif -#ifndef _MSGBOX_HXX //autogen #include -#endif -#ifndef GCC -#endif - #include #include #include @@ -50,13 +41,11 @@ #include #include #include - #include #include "about.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include - #include "dialog.hrc" // defines --------------------------------------------------------------- @@ -138,7 +127,13 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS } // load image from module path - rtl::OUString aAbouts( RTL_CONSTASCII_USTRINGPARAM( ABOUT_BITMAP_STRINGLIST ) ); +// rtl::OUString aAbouts( RTL_CONSTASCII_USTRINGPARAM( ABOUT_BITMAP_STRINGLIST ) ); +#ifdef ABOUTBMPNAMES + rtl::OUString aAbouts( RTL_CONSTASCII_USTRINGPARAM( "ABOUTBMPNAMES" ) ); +#else + rtl::OUString aAbouts; +#endif + bool bLoaded = false; sal_Int32 nIndex = 0; do diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index f7f3f7b14ec9..90c5b4cdfbae 100644 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -32,7 +32,7 @@ #include "precompiled_sfx2.hxx" #include "alienwarn.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "alienwarn.hrc" diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 89075b918b42..59f51449c3f1 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -52,7 +52,7 @@ #include #include "sfxhelp.hxx" #include "workwin.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "dialog.hrc" using namespace ::com::sun::star::uno; diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index fe03231c6db7..7d76e3ea0ad8 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -62,8 +62,8 @@ #include #include -#include "sfxresid.hxx" -#include "dinfedt.hxx" +#include "sfx2/sfxresid.hxx" +#include "sfx2/dinfedt.hxx" #include #include #include diff --git a/sfx2/source/dialog/dinfedt.cxx b/sfx2/source/dialog/dinfedt.cxx index f96b3a2135ce..185f026bf868 100644 --- a/sfx2/source/dialog/dinfedt.cxx +++ b/sfx2/source/dialog/dinfedt.cxx @@ -34,8 +34,8 @@ #ifndef GCC #endif -#include "dinfedt.hxx" -#include "sfxresid.hxx" +#include "sfx2/dinfedt.hxx" +#include "sfx2/sfxresid.hxx" #include #include "dinfedt.hrc" diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 683aedcbf32f..1b5c9a6f4606 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -92,7 +92,7 @@ #include #include "openflag.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "filedlghelper.hrc" #include "filtergrouping.hxx" diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index 4809462b70ca..23d016e2edc4 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index b36a6923184e..013855c2cdfc 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -50,27 +50,22 @@ #include #include #include -#ifndef _COM_SUN_STAR_SECURITY_DOCUMENTSIGNATURESINFORMATION_HPP_ #include -#endif #include #include #include #include #include #include - -#ifndef _RTL_TEXTENC_H -#include -#endif +#include #include #include #include #include -#include +#include #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "dialog.hrc" diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx index 2e87d2c4a9ba..75781551ca93 100644 --- a/sfx2/source/dialog/mailmodelapi.cxx +++ b/sfx2/source/dialog/mailmodelapi.cxx @@ -47,9 +47,7 @@ #include #include #include -#ifndef _RTL_TEXTENC_H -#include -#endif +#include #include #include #include @@ -60,13 +58,13 @@ #include #include -#include "mailmodelapi.hxx" +#include "sfx2/mailmodelapi.hxx" #include #include #include "sfxtypes.hxx" #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include "guisaveas.hxx" diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk index 230bbe432aea..7e044f0fb528 100644 --- a/sfx2/source/dialog/makefile.mk +++ b/sfx2/source/dialog/makefile.mk @@ -103,16 +103,6 @@ CFLAGS+=-DBUILD_VER_STRING="$(subst,",\" "$(BUILD_VER_STRING)")" .INCLUDE : target.mk -$(INCCOM)$/cuilib.hxx: makefile.mk -.IF "$(GUI)"=="UNX" - $(RM) $@ - echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE - echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@ -.ENDIF - -$(SLO)$/sfxdlg.obj : $(INCCOM)$/cuilib.hxx - $(SLO)$/about.obj : $(INCCOM)$/aboutbmpnames.hxx .INCLUDE .IGNORE : $(MISC)$/about_bmp_names.mk diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 319c3b873b48..73fb36cafc5f 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -49,7 +49,7 @@ #include #include #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx index 9f7cecd97745..eb2b84e3bdb4 100644 --- a/sfx2/source/dialog/navigat.cxx +++ b/sfx2/source/dialog/navigat.cxx @@ -39,7 +39,7 @@ #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "helpid.hrc" SFX_IMPL_DOCKINGWINDOW( SfxNavigatorWrapper , SID_NAVIGATOR ); diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 05920c07973e..3e29562679ec 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -39,7 +39,7 @@ #include #include "dialog.hrc" #include "newstyle.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" // PRIVATE METHODES ------------------------------------------------------ diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 981657d476fa..db73330c867f 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -38,7 +38,7 @@ #include #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "dialog.hrc" #include "passwd.hrc" diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 29472b65208b..962befe73c87 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -41,7 +41,7 @@ #include "printopt.hrc" #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index 7782b5178d8f..1cd257874e1f 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -45,13 +45,13 @@ #include "recfloat.hxx" #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include #include #include -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" using namespace ::com::sun::star; diff --git a/sfx2/source/dialog/sfxdlg.cxx b/sfx2/source/dialog/sfxdlg.cxx index 0e5f91ccea34..4b88851f82dd 100644 --- a/sfx2/source/dialog/sfxdlg.cxx +++ b/sfx2/source/dialog/sfxdlg.cxx @@ -32,7 +32,9 @@ #include "precompiled_sfx2.hxx" #include -#include "cuilib.hxx" +//#include "cuilib.hxx" + +#define DLL_NAME "libcuili.so" #include #include diff --git a/sfx2/source/dialog/sfxurl.cxx b/sfx2/source/dialog/sfxurl.cxx index b50ad18d89ea..bd85c842c88d 100644 --- a/sfx2/source/dialog/sfxurl.cxx +++ b/sfx2/source/dialog/sfxurl.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include -#include +#include #include SfxUrlDialog::SfxUrlDialog( Window *pParent ) diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 750bf90d175c..569d3ec69c99 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -52,7 +52,7 @@ #include #include #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "virtmenu.hxx" #include diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 500d530bab3f..ead9ae9557a7 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -32,7 +32,7 @@ #include "precompiled_sfx2.hxx" #include "srchdlg.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "srchdlg.hrc" diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 7d4e60e117e9..ca84402c4b24 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -42,7 +42,7 @@ #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "dialog.hrc" diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 1008c76b8d9f..8709ad210ea6 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -45,7 +45,7 @@ #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxhelp.hxx" #include #include diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 584dd488da56..d1afc08cda10 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -63,8 +63,8 @@ #include #include #include -#include "tplpitem.hxx" -#include "sfxresid.hxx" +#include "sfx2/tplpitem.hxx" +#include "sfx2/sfxresid.hxx" #include "templdlg.hrc" #include @@ -76,7 +76,7 @@ #include "docvor.hxx" #include #include -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "helpid.hrc" #include "appdata.hxx" #include diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index 111cab903f7e..060a1046bf40 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -36,12 +36,9 @@ #include #include -#ifndef GCC -#endif - #include #include -#include "tplpitem.hxx" +#include "sfx2/tplpitem.hxx" #include "tplcitem.hxx" #include "templdgi.hxx" diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx index 06f85bea9b60..3caae405721a 100644 --- a/sfx2/source/dialog/tplpitem.cxx +++ b/sfx2/source/dialog/tplpitem.cxx @@ -33,10 +33,7 @@ // INCLUDE --------------------------------------------------------------- -#ifndef GCC -#endif - -#include "tplpitem.hxx" +#include "sfx2/tplpitem.hxx" #include diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 5d2cf91b0c8f..25a905861380 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -49,7 +49,7 @@ #include "versdlg.hrc" #include "versdlg.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx index 22a1ab5eef4c..65de7a6dafd1 100644 --- a/sfx2/source/doc/QuerySaveDocument.cxx +++ b/sfx2/source/doc/QuerySaveDocument.cxx @@ -30,15 +30,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "QuerySaveDocument.hxx" +#include "sfx2/QuerySaveDocument.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "doc.hrc" -#ifndef _MSGBOX_HXX //autogen #include -#endif + // ----------------------------------------------------------------------------- short ExecuteQuerySaveDocument(Window* _pParent,const String& _rTitle) { diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 012109cac21a..b27a98eb9a09 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -44,13 +44,13 @@ #include #include #include -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include "fltfnc.hxx" #include "arrdecl.hxx" #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "doc.hrc" diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 108c9f27858a..bdb63f622130 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -147,7 +147,7 @@ using namespace ::com::sun::star::io; #include // GetFilterContainer #include "doc.hrc" #include "openflag.hxx" // SFX_STREAM_READONLY etc. -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include //#include "xmlversion.hxx" diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 9615cc4f51a7..622e7dcf5fa2 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -32,7 +32,7 @@ #include "precompiled_sfx2.hxx" #include -#include "docinsert.hxx" +#include "sfx2/docinsert.hxx" #include #include #include diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx index a00b047230d1..d74aaf02d89a 100644 --- a/sfx2/source/doc/doctdlg.cxx +++ b/sfx2/source/doc/doctdlg.cxx @@ -40,7 +40,7 @@ #include #include "docvor.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxtypes.hxx" #include #include diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 80492708d652..8773b3745567 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -98,7 +98,7 @@ using namespace ::ucbhelper; #include #include "sfxtypes.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" #include #include diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 4439dc05f9ff..1a4b4e8d0d82 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -68,7 +68,7 @@ #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxurlrelocator.hxx" #include "doctemplateslocal.hxx" #include diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 86a86ccb61b4..0b840a20792e 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -67,7 +67,7 @@ #include "sfxtypes.hxx" #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" #include #include "docvor.hrc" diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index bd0e65830870..5dc3edfdbd76 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -81,7 +81,7 @@ #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "graphhelp.hxx" #include "doc.hrc" diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index bceca0db94ca..8966f0e8a651 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -77,7 +77,7 @@ #include #include -#include +#include #include #include #include diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 0fe45c49db95..05d2cd5e4599 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -34,9 +34,7 @@ #include #include #include -#ifndef _SVMEDIT_HXX #include -#endif #include #include #include @@ -45,9 +43,7 @@ #include #include "new.hrc" -#ifndef _SFX_DOC_HRC #include "doc.hrc" -#endif #include #include "helpid.hrc" #include "sfxtypes.hxx" @@ -57,8 +53,8 @@ #include #include "fltfnc.hxx" #include -#include "viewfac.hxx" -#include "sfxresid.hxx" +#include "sfx2/viewfac.hxx" +#include "sfx2/sfxresid.hxx" #include #include "preview.hxx" #include diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 6883f0976566..2e56b1b96a8e 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -64,7 +64,7 @@ #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "appdata.hxx" #include #include "fltfnc.hxx" @@ -77,7 +77,7 @@ #include #include #include -#include "basmgr.hxx" +#include "sfx2/basmgr.hxx" #include #include "doc.hrc" #include diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 3c78bad9220e..2143f9cbd8ad 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -129,7 +129,7 @@ using namespace ::com::sun::star::container; #include "appdata.hxx" #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index fb555c5edeec..83b0f4d19844 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -72,7 +72,7 @@ #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index ead9a7c9fd9a..b730b0510011 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -114,7 +114,7 @@ #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "fltfnc.hxx" #include diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx index eb022afc60df..27d740bf59c6 100644 --- a/sfx2/source/doc/objuno.cxx +++ b/sfx2/source/doc/objuno.cxx @@ -71,7 +71,7 @@ #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" using namespace ::com::sun::star; diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 91c0f605e453..ec1710ed8d36 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -98,7 +98,7 @@ #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "objshimp.hxx" #include "appbas.hxx" #include "sfxtypes.hxx" @@ -109,8 +109,8 @@ #include "appdata.hxx" #include #include -#include "basmgr.hxx" -#include "QuerySaveDocument.hxx" +#include "sfx2/basmgr.hxx" +#include "sfx2/QuerySaveDocument.hxx" #include "helpid.hrc" #include #include "appbaslib.hxx" diff --git a/sfx2/source/doc/querytemplate.cxx b/sfx2/source/doc/querytemplate.cxx index d430205a831e..c07457bc074a 100644 --- a/sfx2/source/doc/querytemplate.cxx +++ b/sfx2/source/doc/querytemplate.cxx @@ -32,7 +32,7 @@ #include "precompiled_sfx2.hxx" #include "querytemplate.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" #include diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 158dbdb9e13e..e0adbc9c5b2a 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -111,7 +111,7 @@ #include #include #include -#include +#include #include #include #include @@ -122,12 +122,12 @@ #include #include #include "sfx2/docstoragemodifylistener.hxx" -#include "brokenpackageint.hxx" +#include "sfx2/brokenpackageint.hxx" #include "graphhelp.hxx" #include #include -#include +#include //________________________________________________________________________________________________________ // const diff --git a/sfx2/source/layout/sfxtabdialog.cxx b/sfx2/source/layout/sfxtabdialog.cxx index 92454ae62f36..c2a1b48f0271 100644 --- a/sfx2/source/layout/sfxtabdialog.cxx +++ b/sfx2/source/layout/sfxtabdialog.cxx @@ -45,7 +45,7 @@ #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxhelp.hxx" #include #include diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 0e80cc207ce0..e194a718bbb3 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -75,9 +75,9 @@ #include #include #include -#include "imgmgr.hxx" -#include "imagemgr.hxx" -#include "sfxresid.hxx" +#include "sfx2/imgmgr.hxx" +#include "sfx2/imagemgr.hxx" +#include "sfx2/sfxresid.hxx" #include "../doc/doc.hrc" using namespace ::com::sun::star::uno; diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 076932ba9dea..01d94dc141cf 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -71,7 +71,7 @@ #include "sfxtypes.hxx" #include #include "mnucfga.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 87f35805d1e7..04eaba861b94 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -39,14 +39,9 @@ #include #include #include -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include -#endif #include -#ifndef GCC -#endif - #include "virtmenu.hxx" #include #include "statcach.hxx" @@ -63,9 +58,9 @@ #include #include "sfxpicklist.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "menu.hrc" -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include #include #include diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index ec542c4af595..b8cef9dd2074 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -54,7 +54,7 @@ #include "eventsupplier.hxx" #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "sfxlocal.hrc" diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx index eb9305fc0e49..00699c6880f9 100644 --- a/sfx2/source/toolbox/imgmgr.cxx +++ b/sfx2/source/toolbox/imgmgr.cxx @@ -34,10 +34,10 @@ #include #include -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include "statcach.hxx" #include diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 29e6b85d67d2..6921541ffeda 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -95,7 +95,7 @@ #include "sfxtypes.hxx" #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include @@ -106,11 +106,11 @@ #include #include "helpid.hrc" #include "workwin.hxx" -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "virtmenu.hxx" #include #include -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include #include diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index b439dca4ffed..088df6253f21 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -92,7 +92,7 @@ namespace css = ::com::sun::star; #include #include #include -#include "brokenpackageint.hxx" +#include "sfx2/brokenpackageint.hxx" #include "objshimp.hxx" SfxFrameLoader_Impl::SfxFrameLoader_Impl( const css::uno::Reference< css::lang::XMultiServiceFactory >& /*xFactory*/ ) diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx index 71d991759566..00568c394d23 100644 --- a/sfx2/source/view/orgmgr.cxx +++ b/sfx2/source/view/orgmgr.cxx @@ -56,7 +56,7 @@ #include "docvor.hxx" #include "orgmgr.hxx" #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "view.hrc" #include #include "fltfnc.hxx" diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index 1ea49ecd879b..5944b7c0e9fd 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -47,7 +47,7 @@ #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "view.hrc" #ifdef MSC diff --git a/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx index f875143bfab0..3377fceff67f 100644 --- a/sfx2/source/view/prnmon.cxx +++ b/sfx2/source/view/prnmon.cxx @@ -53,7 +53,7 @@ #include "sfxtypes.hxx" #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx index f3596de6b1c2..cc2aa178d6f1 100644 --- a/sfx2/source/view/topfrm.cxx +++ b/sfx2/source/view/topfrm.cxx @@ -72,7 +72,7 @@ #include #include -#include +#include // wg. pTopFrames #include "appdata.hxx" diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc index 208828d1fcad..39c94d21b8e7 100644 --- a/sfx2/source/view/view.hrc +++ b/sfx2/source/view/view.hrc @@ -44,12 +44,6 @@ #define STR_NOSTARTPRINTER (RID_SFX_VIEW_START+ 9) #define STR_PRINTING (RID_SFX_VIEW_START+10) -#ifndef STR_UNDO -#define STR_UNDO (RID_SFX_VIEW_START+11) -#define STR_REDO (RID_SFX_VIEW_START+12) -#define STR_REPEAT (RID_SFX_VIEW_START+13) -#endif - #define DLG_PRINTMONITOR (RID_SFX_VIEW_START) #define FT_DOCNAME 1 #define FT_PRINTING 2 diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx index 2eff45e0501d..1114b5864641 100644 --- a/sfx2/source/view/viewfac.cxx +++ b/sfx2/source/view/viewfac.cxx @@ -32,11 +32,8 @@ #include "precompiled_sfx2.hxx" // INCLUDE --------------------------------------------------------------- -#ifndef GCC -#endif - #include -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" // STATIC DATA ----------------------------------------------------------- @@ -56,16 +53,12 @@ void SfxViewFactory::InitFactory() // CTOR / DTOR ----------------------------------------------------------- -SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, - USHORT nOrdinal, const ResId& aDescrResId ): +SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, USHORT nOrdinal ): fnCreate(fnC), fnInit(fnI), - nOrd(nOrdinal), - aDescription(aDescrResId.GetId(), *aDescrResId.GetResMgr()) + nOrd(nOrdinal) { - aDescription.SetRT(aDescrResId.GetRT()); DBG_CTOR(SfxViewFactory, 0); -// SFX_APP()->RegisterViewFactory_Impl(*this); } SfxViewFactory::~SfxViewFactory() diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 945419189b78..ba2bcc7615c7 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -38,12 +38,8 @@ #include #include -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include -#endif -#ifndef _SPLITWIN_HXX //autogen #include -#endif #include #include #include @@ -51,9 +47,7 @@ #include #include #include -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include #include @@ -91,6 +85,8 @@ #include #include #include +#include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -117,10 +113,10 @@ namespace css = ::com::sun::star; #include #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "appbas.hxx" #include -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include #include "fltfnc.hxx" #include @@ -137,7 +133,7 @@ namespace css = ::com::sun::star; #include "workwin.hxx" #include "helper.hxx" #include "macro.hxx" -#include "minfitem.hxx" +#include "sfx2/minfitem.hxx" #include "../appl/app.hrc" //------------------------------------------------------------------------- DBG_NAME(SfxViewFrame) @@ -1050,7 +1046,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) if ( pShUndoMgr && pShUndoMgr->GetUndoActionCount() ) { - String aTmp( SfxResId( STR_UNDO ) ); + String aTmp( SvtResId( STR_UNDO ) ); aTmp += pShUndoMgr->GetUndoActionComment(0); rSet.Put( SfxStringItem( SID_UNDO, aTmp ) ); } @@ -1059,7 +1055,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) if ( pShUndoMgr && pShUndoMgr->GetRedoActionCount() ) { - String aTmp( SfxResId(STR_REDO) ); + String aTmp( SvtResId(STR_REDO) ); aTmp += pShUndoMgr->GetRedoActionComment(0); rSet.Put( SfxStringItem( SID_REDO, aTmp ) ); } @@ -1069,7 +1065,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() && pShUndoMgr->CanRepeat(*pTarget, 0) ) { - String aTmp( SfxResId(STR_REPEAT) ); + String aTmp( SvtResId(STR_REPEAT) ); aTmp += pShUndoMgr->GetRepeatActionComment(*pTarget, 0); rSet.Put( SfxStringItem( SID_REPEAT, aTmp ) ); } diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index e4a53a8a6e7a..f132bb80d96a 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -57,7 +57,7 @@ #include "viewimp.hxx" #include #include -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include "sfxtypes.hxx" diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 86c9ba0bb70e..167cd59eb71f 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -73,7 +73,7 @@ #include "view.hrc" #include #include "viewimp.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include #include #include @@ -85,7 +85,7 @@ #include "sfxlocal.hrc" #include #include -#include "mailmodelapi.hxx" +#include "sfx2/mailmodelapi.hxx" #include #include #include diff --git a/svx/source/src/errtxt.src b/svx/source/src/errtxt.src new file mode 100644 index 000000000000..bae4091dea53 --- /dev/null +++ b/svx/source/src/errtxt.src @@ -0,0 +1,518 @@ +/************************************************************************* + * + * 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: errtxt.src,v $ + * $Revision: 1.63 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#define __RSC +#include +#include + +// pragma ---------------------------------------------------------------- +Resource RID_ERRCTX +{ + String ERRCTX_ERROR + { + Text [ en-US ] = "Error" ; + }; + String ERRCTX_WARNING + { + Text [ en-US ] = "Warning" ; + }; + String ERRCTX_SFX_LOADTEMPLATE + { + Text [ en-US ] = "$(ERR) loading the template $(ARG1)" ; + }; + String ERRCTX_SFX_SAVEDOC + { + Text [ en-US ] = "$(ERR) saving the document $(ARG1)"; + }; + String ERRCTX_SFX_SAVEASDOC + { + Text [ en-US ] = "$(ERR) saving the document $(ARG1)"; + }; + String ERRCTX_SFX_DOCINFO + { + Text [ en-US ] = "$(ERR) displaying doc. information for document $(ARG1)" ; + }; + String ERRCTX_SFX_DOCTEMPLATE + { + Text [ en-US ] = "$(ERR) writing document $(ARG1) as template" ; + }; + String ERRCTX_SFX_MOVEORCOPYCONTENTS + { + Text [ en-US ] = "$(ERR) copying or moving document contents" ; + }; + String ERRCTX_SFX_DOCMANAGER + { + Text [ en-US ] = "$(ERR) starting the Document Manager" ; + }; + String ERRCTX_SFX_OPENDOC + { + Text [ en-US ] = "$(ERR) loading document $(ARG1)" ; + }; + String ERRCTX_SFX_NEWDOCDIRECT + { + Text [ en-US ] = "$(ERR) creating a new document" ; + }; + String ERRCTX_SFX_NEWDOC + { + Text [ en-US ] = "$(ERR) creating a new document" ; + }; + String ERRCTX_SFX_CREATEOBJSH + { + Text [ en-US ] = "$(ERR) expanding entry" ; + }; + String ERRCTX_SFX_LOADBASIC + { + Text [ en-US ] = "$(ERR) loading BASIC of document $(ARG1)" ; + }; + String ERRCTX_SFX_SEARCHADDRESS + { + Text [ en-US ] = "$(ERR) searching for an address"; + }; +}; +Resource RID_ERRHDL +{ + String ERRCODE_CLASS_ABORT + { + Text [ en-US ] = "Abort" ; + }; + String ERRCODE_CLASS_NOTEXISTS + { + Text [ en-US ] = "Nonexistent object" ; + }; + String ERRCODE_CLASS_ALREADYEXISTS + { + Text [ en-US ] = "Object already exists" ; + }; + String ERRCODE_CLASS_ACCESS + { + Text [ en-US ] = "Object not accessible" ; + }; + String ERRCODE_CLASS_PATH + { + Text [ en-US ] = "Inadmissible path" ; + }; + String ERRCODE_CLASS_LOCKING + { + Text [ en-US ] = "Locking problem" ; + }; + String ERRCODE_CLASS_PARAMETER + { + Text [ en-US ] = "Wrong parameter" ; + }; + String ERRCODE_CLASS_SPACE + { + Text [ en-US ] = "Resource exhausted" ; + }; + String ERRCODE_CLASS_NOTSUPPORTED + { + Text [ en-US ] = "Action not supported" ; + }; + String ERRCODE_CLASS_READ + { + Text [ en-US ] = "Read-Error" ; + }; + String ERRCODE_CLASS_WRITE + { + Text [ en-US ] = "Write Error" ; + }; + String ERRCODE_CLASS_UNKNOWN + { + Text [ en-US ] = "unknown" ; + }; + String ERRCODE_CLASS_VERSION + { + Text [ en-US ] = "Version Incompatibility" ; + }; + String ERRCODE_CLASS_GENERAL + { + Text [ en-US ] = "General Error" ; + }; + String ERRCODE_CLASS_FORMAT + { + Text [ en-US ] = "Incorrect format" ; + }; + String ERRCODE_CLASS_CREATE + { + Text [ en-US ] = "Error creating object" ; + }; + String ERRCODE_CLASS_SBX + { + Text [ en-US ] = "Inadmissible value or data type" ; + }; + String ERRCODE_CLASS_RUNTIME + { + Text [ en-US ] = "BASIC runtime error" ; + }; + String ERRCODE_CLASS_COMPILER + { + Text [ en-US ] = "BASIC syntax error" ; + }; + String 1 + { + Text [ en-US ] = "General Error" ; + }; + String ERRCODE_IO_GENERAL + { + Text [ en-US ] = "General input/output error." ; + }; + String ERRCODE_IO_MISPLACEDCHAR + { + Text [ en-US ] = "Invalid file name." ; + }; + String ERRCODE_IO_NOTEXISTS + { + Text [ en-US ] = "Nonexistent file." ; + }; + String ERRCODE_IO_ALREADYEXISTS + { + Text [ en-US ] = "File already exists." ; + }; + String ERRCODE_IO_NOTADIRECTORY + { + Text [ en-US ] = "The object is not a directory." ; + }; + String ERRCODE_IO_NOTAFILE + { + Text [ en-US ] = "The object is not a file." ; + }; + String ERRCODE_IO_INVALIDDEVICE + { + Text [ en-US ] = "The specified device is invalid." ; + }; + String ERRCODE_IO_ACCESSDENIED + { + Text [ en-US ] = "The object cannot be accessed\ndue to insufficient user rights." ; + }; + String ERRCODE_IO_LOCKVIOLATION + { + Text [ en-US ] = "Sharing violation while accessing the object." ; + }; + String ERRCODE_IO_OUTOFSPACE + { + Text [ en-US ] = "No more space on device." ; + }; + String ERRCODE_IO_ISWILDCARD + { + Text [ en-US ] = "This operation cannot be run on\nfiles containing wildcards." ; + }; + String ERRCODE_IO_NOTSUPPORTED + { + Text [ en-US ] = "This operation is not supported on this operating system." ; + }; + String ERRCODE_IO_TOOMANYOPENFILES + { + Text [ en-US ] = "There are too many files open." ; + }; + String ERRCODE_IO_CANTREAD + { + Text [ en-US ] = "Data could not be read from the file." ; + }; + String ERRCODE_IO_CANTWRITE + { + Text [ en-US ] = "The file could not be written." ; + }; + String ERRCODE_IO_OUTOFMEMORY + { + Text [ en-US ] = "The operation could not be run due to insufficient memory." ; + }; + String ERRCODE_IO_CANTSEEK + { + Text [ en-US ] = "The seek operation could not be run." ; + }; + String ERRCODE_IO_CANTTELL + { + Text [ en-US ] = "The tell operation could not be run." ; + }; + String ERRCODE_IO_WRONGVERSION + { + Text [ en-US ] = "Incorrect file version." ; + }; + String ERRCODE_IO_WRONGFORMAT + { + Text [ en-US ] = "Incorrect file format." ; + }; + String ERRCODE_IO_INVALIDCHAR + { + Text [ en-US ] = "The file name contains invalid characters." ; + }; + String ERRCODE_IO_UNKNOWN + { + Text [ en-US ] = "An unknown I/O error has occurred." ; + }; + String ERRCODE_IO_INVALIDACCESS + { + Text [ en-US ] = "An invalid attempt was made to access the file." ; + }; + String ERRCODE_IO_CANTCREATE + { + Text [ en-US ] = "The file could not be created." ; + }; + String ERRCODE_IO_INVALIDPARAMETER + { + Text [ en-US ] = "The operation was started under an invalid parameter." ; + }; + String ERRCODE_IO_ABORT + { + Text [ en-US ] = "The operation on the file was aborted." ; + }; + String ERRCODE_IO_NOTEXISTSPATH + { + Text [ en-US ] = "Path to the file does not exist." ; + }; + String ERRCODE_IO_RECURSIVE + { + Text [ en-US ] = "An object cannot be copied into itself." ; + }; + String ERRCODE_SFX_NOSTDTEMPLATE + { + Text [ en-US ] = "The default template could not be opened." ; + }; + String ERRCODE_SFX_TEMPLATENOTFOUND + { + Text [ en-US ] = "The specified template could not be found." ; + }; + String ERRCODE_SFX_NOTATEMPLATE + { + Text [ en-US ] = "The file cannot be used as template." ; + }; + String ERRCODE_SFX_CANTREADDOCINFO + { + Text [ en-US ] = "Document information could not be read from the file because\nthe document information format is unknown or because document information does not\nexist." ; + }; + String ERRCODE_SFX_ALREADYOPEN + { + Text [ en-US ] = "This document has already been opened for editing." ; + }; + String ERRCODE_SFX_WRONGPASSWORD + { + Text [ en-US ] = "The wrong password has been entered." ; + }; + String ERRCODE_SFX_DOLOADFAILED + { + Text [ en-US ] = "Error reading file." ; + }; + String ERRCODE_SFX_DOCUMENTREADONLY + { + Text [ en-US ] = "The document was opened as read-only." ; + }; + String ERRCODE_SFX_OLEGENERAL + { + Text [ en-US ] = "General OLE Error." ; + }; + String ERRCODE_INET_NAME_RESOLVE + { + Text [ en-US ] = "The host name $(ARG1) could not be resolved." ; + }; + String ERRCODE_INET_CONNECT + { + Text [ en-US ] = "Could not establish Internet connection to $(ARG1)." ; + }; + String ERRCODE_INET_READ + { + Text [ en-US ] = "Error reading data from the Internet.\nServer error message: $(ARG1)." ; + }; + String ERRCODE_INET_WRITE + { + Text [ en-US ] = "Error transferring data to the Internet.\nServer error message: $(ARG1)." ; + }; + String ERRCODE_INET_GENERAL + { + Text [ en-US ] = "General Internet error has occurred." ; + }; + String ERRCODE_INET_OFFLINE + { + Text [ en-US ] = "The requested Internet data is not available in the cache and cannot be transmitted as the Online mode has not be activated." ; + }; + String ERRCODE_SFXMSG_STYLEREPLACE + { + ExtraData = ERRCODE_MSG_ERROR | ERRCODE_BUTTON_OK_CANCEL ; + Text [ en-US ] = "Should the $(ARG1) Style be replaced?" ; + }; + String ERRCODE_SFX_NOFILTER + { + Text [ en-US ] = "A filter has not been found." ; + }; + String ERRCODE_SFX_CANTFINDORIGINAL + { + Text [ en-US ] = "The original could not be determined." ; + }; + String ERRCODE_SFX_CANTCREATECONTENT + { + Text [ en-US ] = "The contents could not be created." ; + }; + String ERRCODE_SFX_CANTCREATELINK + { + Text [ en-US ] = "The link could not be created." ; + }; + String ERRCODE_SFX_WRONGBMKFORMAT + { + Text [ en-US ] = "The link format is invalid." ; + }; + String ERRCODE_SFX_WRONGICONFILE + { + Text [ en-US ] = "The configuration of the icon display is invalid." ; + }; + String ERRCODE_SFX_CANTWRITEICONFILE + { + Text [ en-US ] = "The configuration of the icon display can not be saved." ; + }; + String ERRCODE_SFX_CANTDELICONFILE + { + Text [ en-US ] = "The configuration of the icon display could not be deleted." ; + }; + String ERRCODE_SFX_CANTRENAMECONTENT + { + Text [ en-US ] = "Contents cannot be renamed." ; + }; + String ERRCODE_SFX_INVALIDBMKPATH + { + Text [ en-US ] = "The bookmark folder is invalid." ; + }; + String ERRCODE_SFX_CANTWRITEURLCFGFILE + { + Text [ en-US ] = "The configuration of the URLs to be saved locally could not be saved." ; + }; + String ERRCODE_SFX_WRONGURLCFGFORMAT + { + Text [ en-US ] = "The configuration format of the URLs to be saved locally is invalid." ; + }; + String ERRCODE_SFX_NODOCUMENT + { + Text [ en-US ] = "This action cannot be applied to a document that does not exist." ; + }; + String ERRCODE_SFX_INVALIDLINK + { + Text [ en-US ] = "The link refers to an invalid target." ; + }; + String ERRCODE_SFX_INVALIDTRASHPATH + { + Text [ en-US ] = "The Recycle Bin path is invalid." ; + }; + String ERRCODE_SFX_NOTRESTORABLE + { + Text [ en-US ] = "The entry could not be restored." ; + }; + String ERRCODE_IO_NAMETOOLONG + { + Text [ en-US ] = "The file name is too long for the target file system." ; + }; + String ERRCODE_SFX_CONSULTUSER + { + Text [ en-US ] = "The details for running the function are incomplete." ; + }; + String ERRCODE_SFX_INVALIDSYNTAX + { + Text [ en-US ] = "The input syntax is invalid." ; + }; + String ERRCODE_SFX_CANTCREATEFOLDER + { + Text [ en-US ] = "The input syntax is invalid." ; + }; + String ERRCODE_SFX_CANTRENAMEFOLDER + { + Text [ en-US ] = "The input syntax is invalid." ; + }; + String ERRCODE_SFX_WRONG_CDF_FORMAT + { + Text [ en-US ] = "The channel document has an invalid format." ; + }; + String ERRCODE_SFX_EMPTY_SERVER + { + Text [ en-US ] = "The server must not be empty." ; + }; + String ERRCODE_SFX_NO_ABOBOX + { + Text [ en-US ] = "A subscription folder is required to install a Channel." ; + }; + String ERRCODE_IO_NOTSTORABLEINBINARYFORMAT + { + Text [ en-US ] = "This document contains attributes that cannot be saved in the selected format.\nPlease save the document in a %PRODUCTNAME %PRODUCTVERSION file format."; + }; + String ERRCODE_SFX_TARGETFILECORRUPTED + { + Text [ en-US ] = "The file $(FILENAME) cannot be saved. Please check your system settings. You can find an automatically generated backup copy of this file in folder $(PATH) named $(BACKUPNAME)."; + }; + String ERRCODE_SFX_NOMOREDOCUMENTSALLOWED + { + Text [ en-US ] = "The maximum number of documents that can be opened at the same time has been reached. You need to close one or more documents before you can open a new document."; + }; + String ERRCODE_SFX_CANTCREATEBACKUP + { + Text [ en-US ] = "Could not create backup copy." ; + }; + String ERRCODE_SFX_MACROS_SUPPORT_DISABLED + { + Text [ en-US ] = "An attempt was made to execute a macro.\nFor security reasons, macro support is disabled."; + }; + String ERRCODE_SFX_DOCUMENT_MACRO_DISABLED + { + Text [ en-US ] = "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in Tools - Options - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available." ; + }; + String ERRCODE_SFX_BROKENSIGNATURE + { + Text [ en-US ] = "The digitally signed document content and/or macros do not match the current document signature.\n\nThis could be the result of document manipulation or of structural document damage due to data transmission.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n " ; + }; + String ERRCODE_SFX_INCOMPLETE_ENCRYPTION + { + Text [ en-US ] = "The encrypted document contains unexpected non-encrypted streams.\n\nThis could be the result of document manipulation.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n " ; + }; + + String ERRCODE_IO_INVALIDLENGTH + { + Text [ en-US ] = "Invalid data length." ; + }; + String ERRCODE_IO_CURRENTDIR + { + Text [ en-US ] = "Function not possible: path contains current directory." ; + }; + String ERRCODE_IO_NOTSAMEDEVICE + { + Text [ en-US ] = "Function not possible: device (drive) not identical." ; + }; + String ERRCODE_IO_DEVICENOTREADY + { + Text [ en-US ] = "Device (drive) not ready." ; + }; + String ERRCODE_IO_BADCRC + { + Text [ en-US ] = "Wrong check amount." ; + }; + String ERRCODE_IO_WRITEPROTECTED + { + Text [ en-US ] = "Function not possible: write protected." ; + }; + String ERRCODE_SFX_SHARED_NOPASSWORDCHANGE + { + Text [ en-US ] = "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first."; + }; +}; + +// eof ------------------------------------------------------------------------ + diff --git a/svx/source/src/makefile.mk b/svx/source/src/makefile.mk index b1ce27695884..630c9c420bb8 100644 --- a/svx/source/src/makefile.mk +++ b/svx/source/src/makefile.mk @@ -43,8 +43,6 @@ TARGET=ofa RES1FILELIST=\ $(SRS)$/app.srs \ - $(SOLARCOMMONRESDIR)$/svtools.srs \ - $(SOLARCOMMONRESDIR)$/sfx.srs \ $(SOLARCOMMONRESDIR)$/basic.srs RESLIB1NAME=$(TARGET) @@ -55,7 +53,8 @@ RESLIB1SRSFILES=$(RES1FILELIST) SRS1NAME= app SRC1FILES= \ - app.src + app.src \ + errtxt.src .INCLUDE : target.mk diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk index 070aecc308b6..92eee374f9da 100644 --- a/svx/util/makefile.mk +++ b/svx/util/makefile.mk @@ -125,30 +125,31 @@ SHL1USE_EXPORTS=name SHL1LIBS= $(LIB5TARGET) $(LIB6TARGET) SHL1STDLIBS= \ - $(AVMEDIALIB) \ - $(SFX2LIB) \ - $(XMLOFFLIB) \ - $(GOODIESLIB) \ - $(BASEGFXLIB) \ - $(DRAWINGLAYERLIB) \ - $(LNGLIB) \ - $(BASICLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(I18NPAPERLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(ICUUCLIB) + $(AVMEDIALIB) \ + $(BASEGFXLIB) \ + $(BASICLIB) \ + $(COMPHELPERLIB) \ + $(CPPUHELPERLIB) \ + $(CPPULIB) \ + $(DRAWINGLAYERLIB) \ + $(FWELIB) \ + $(GOODIESLIB) \ + $(I18NISOLANGLIB) \ + $(I18NPAPERLIB) \ + $(ICUUCLIB) \ + $(LNGLIB) \ + $(SALLIB) \ + $(SFX2LIB) \ + $(SOTLIB) \ + $(SVLLIB) \ + $(SVTOOLLIB) \ + $(TKLIB) \ + $(TOOLSLIB) \ + $(UCBHELPERLIB) \ + $(UNOTOOLSLIB) \ + $(VCLLIB) \ + $(VOSLIB) \ + $(XMLOFFLIB) \ SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) @@ -162,29 +163,29 @@ SHL2DEPN=$(SHL1TARGETN) SHL2LIBS= $(LIB1TARGET) $(LIB2TARGET) $(LIB3TARGET) $(LIB4TARGET) SHL2STDLIBS= \ - $(SVXCORELIB) \ - $(SFX2LIB) \ - $(XMLOFFLIB) \ - $(GOODIESLIB) \ - $(BASEGFXLIB) \ - $(DRAWINGLAYERLIB) \ - $(BASICLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(XMLSCRIPTLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(ICUUCLIB) + $(BASEGFXLIB) \ + $(BASICLIB) \ + $(COMPHELPERLIB) \ + $(CPPUHELPERLIB) \ + $(CPPULIB) \ + $(DRAWINGLAYERLIB) \ + $(GOODIESLIB) \ + $(I18NISOLANGLIB) \ + $(ICUUCLIB) \ + $(SALLIB) \ + $(SFX2LIB) \ + $(SOTLIB) \ + $(SVLLIB) \ + $(SVTOOLLIB) \ + $(SVXCORELIB) \ + $(TKLIB) \ + $(TOOLSLIB) \ + $(UCBHELPERLIB) \ + $(UNOTOOLSLIB) \ + $(VCLLIB) \ + $(VOSLIB) \ + $(XMLOFFLIB) \ + $(XMLSCRIPTLIB) \ .IF "$(GUI)"=="WNT" SHL2STDLIBS+=$(SHELLLIB) @@ -219,8 +220,7 @@ SRSFILELIST=\ $(SRS)$/svxlink.srs \ $(SRS)$/accessibility.srs \ $(SRS)$/table.srs \ - $(SRS)$/toolbars.srs \ - $(SOLARCOMMONRESDIR)$/sfx.srs + $(SRS)$/toolbars.srs RESLIB1NAME=svx RESLIB1IMAGES=$(PRJ)$/res $(PRJ)$/source/svdraw From 112093daa854b8ad9c722bd647da0a9115b0f7e3 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Apr 2010 23:04:00 +0200 Subject: [PATCH 004/279] CWS gnumake2: move delivered header files from xmloff/inc to xmloff/inc/xmloff; removed unused code --- xmloff/inc/TransGradientStyle.hxx | 2 +- xmloff/inc/txtflde.hxx | 2 +- xmloff/inc/{ => xmloff}/DashStyle.hxx | 2 +- xmloff/inc/{ => xmloff}/GradientStyle.hxx | 2 +- xmloff/inc/{ => xmloff}/HatchStyle.hxx | 2 +- xmloff/inc/{ => xmloff}/ImageStyle.hxx | 2 +- xmloff/inc/{ => xmloff}/MarkerStyle.hxx | 2 +- xmloff/inc/{ => xmloff}/VisAreaContext.hxx | 2 +- xmloff/inc/{ => xmloff}/VisAreaExport.hxx | 2 +- .../XMLEmbeddedObjectExportFilter.hxx | 2 +- .../inc/{ => xmloff}/XMLFilterServiceNames.h | 2 +- .../{ => xmloff}/XMLTextListAutoStylePool.hxx | 2 +- .../xmloff}/XMLTextShapeImportHelper.hxx | 2 +- xmloff/inc/{ => xmloff}/functional.hxx | 0 xmloff/inc/{ => xmloff}/i18nmap.hxx | 2 +- xmloff/inc/{ => xmloff}/numehelp.hxx | 2 +- xmloff/inc/xmloff/txtimp.hxx | 2 +- xmloff/inc/{ => xmloff}/txtimppr.hxx | 2 +- xmloff/inc/{ => xmloff}/unoatrcn.hxx | 2 +- xmloff/inc/{ => xmloff}/xformsexport.hxx | 2 +- xmloff/inc/{ => xmloff}/xformsimport.hxx | 2 +- xmloff/inc/{ => xmloff}/xmlcnitm.hxx | 0 xmloff/inc/{ => xmloff}/xmlerror.hxx | 2 +- xmloff/inc/{ => xmloff}/xmlkywd.hxx | 2 +- xmloff/inc/{ => xmloff}/xmlnmspe.hxx | 2 +- xmloff/inc/{ => xmloff}/xmlreg.hxx | 2 +- xmloff/inc/{ => xmloff}/xmltabe.hxx | 2 +- xmloff/inc/xmlversion.hxx | 2 +- xmloff/prj/d.lst | 82 +------------- xmloff/source/chart/PropertyMap.hxx | 2 +- .../SchXMLCalculationSettingsContext.cxx | 2 +- xmloff/source/chart/SchXMLChartContext.cxx | 2 +- xmloff/source/chart/SchXMLExport.cxx | 2 +- xmloff/source/chart/SchXMLImport.cxx | 2 +- .../source/chart/SchXMLParagraphContext.cxx | 2 +- xmloff/source/chart/SchXMLPlotAreaContext.cxx | 2 +- xmloff/source/chart/SchXMLSeries2Context.cxx | 2 +- xmloff/source/chart/SchXMLTableContext.cxx | 2 +- xmloff/source/chart/SchXMLTools.cxx | 2 +- xmloff/source/chart/XMLChartStyleContext.cxx | 2 +- .../source/chart/XMLLabelSeparatorContext.cxx | 2 +- xmloff/source/chart/XMLSymbolImageContext.cxx | 2 +- xmloff/source/chart/contexts.cxx | 2 +- .../source/core/DocumentSettingsContext.cxx | 2 +- xmloff/source/core/DomBuilderContext.cxx | 2 +- xmloff/source/core/DomExport.cxx | 2 +- xmloff/source/core/RDFaExportHelper.cxx | 2 +- xmloff/source/core/SettingsExportHelper.cxx | 2 +- xmloff/source/core/XMLBase64Export.cxx | 2 +- .../core/XMLEmbeddedObjectExportFilter.cxx | 2 +- .../core/XMLEmbeddedObjectImportContext.cxx | 6 +- xmloff/source/core/facreg.cxx | 2 +- xmloff/source/core/i18nmap.cxx | 2 +- xmloff/source/core/nmspmap.cxx | 2 +- xmloff/source/core/unoatrcn.cxx | 2 +- xmloff/source/core/xmlcnitm.cxx | 2 +- xmloff/source/core/xmlerror.cxx | 2 +- xmloff/source/core/xmlexp.cxx | 20 ++-- xmloff/source/core/xmlimp.cxx | 6 +- xmloff/source/core/xmlkywd.cxx | 2 +- .../source/draw/XMLGraphicsDefaultStyle.cxx | 2 +- xmloff/source/draw/XMLImageMapContext.cxx | 4 +- xmloff/source/draw/XMLImageMapExport.cxx | 2 +- xmloff/source/draw/XMLNumberStyles.cxx | 2 +- .../draw/XMLReplacementImageContext.cxx | 4 +- xmloff/source/draw/XMLShapeStyleContext.cxx | 4 +- xmloff/source/draw/animationexport.cxx | 2 +- xmloff/source/draw/animationimport.cxx | 2 +- xmloff/source/draw/animexp.cxx | 2 +- xmloff/source/draw/animimp.cxx | 2 +- xmloff/source/draw/descriptionimp.cxx | 2 +- xmloff/source/draw/eventimp.cxx | 2 +- xmloff/source/draw/layerexp.cxx | 2 +- xmloff/source/draw/layerimp.cxx | 2 +- xmloff/source/draw/sdpropls.cxx | 2 +- xmloff/source/draw/sdpropls.hxx | 2 +- xmloff/source/draw/sdxmlexp.cxx | 4 +- xmloff/source/draw/sdxmlimp.cxx | 4 +- xmloff/source/draw/shapeexport.cxx | 2 +- xmloff/source/draw/shapeexport2.cxx | 2 +- xmloff/source/draw/shapeexport3.cxx | 2 +- xmloff/source/draw/shapeexport4.cxx | 2 +- xmloff/source/draw/shapeimport.cxx | 2 +- xmloff/source/draw/viewcontext.cxx | 4 +- xmloff/source/draw/ximp3dscene.cxx | 2 +- xmloff/source/draw/ximpcustomshape.cxx | 4 +- xmloff/source/draw/ximpgrp.cxx | 2 +- xmloff/source/draw/ximplink.cxx | 2 +- xmloff/source/draw/ximppage.cxx | 2 +- xmloff/source/draw/ximpshap.cxx | 4 +- xmloff/source/draw/ximpshow.cxx | 2 +- xmloff/source/draw/ximpstyl.cxx | 4 +- xmloff/source/forms/controlpropertymap.cxx | 2 +- xmloff/source/forms/elementexport.cxx | 4 +- xmloff/source/forms/elementimport.cxx | 2 +- xmloff/source/forms/formattributes.cxx | 2 +- xmloff/source/forms/formevents.cxx | 2 +- xmloff/source/forms/formlayerexport.cxx | 2 +- xmloff/source/forms/formsimp.cxx | 2 +- xmloff/source/forms/layerexport.cxx | 4 +- xmloff/source/forms/layerimport.cxx | 4 +- xmloff/source/forms/officeforms.cxx | 2 +- xmloff/source/forms/propertyexport.cxx | 2 +- xmloff/source/forms/propertyimport.cxx | 2 +- xmloff/source/meta/MetaExportComponent.cxx | 2 +- xmloff/source/meta/MetaImportComponent.cxx | 2 +- xmloff/source/meta/xmlmetae.cxx | 2 +- xmloff/source/meta/xmlmetai.cxx | 2 +- xmloff/source/script/XMLEventExport.cxx | 2 +- xmloff/source/script/XMLEventImportHelper.cxx | 4 +- .../source/script/XMLEventsImportContext.cxx | 4 +- .../source/script/XMLScriptContextFactory.cxx | 2 +- .../source/script/XMLScriptExportHandler.cxx | 2 +- .../script/XMLStarBasicContextFactory.cxx | 2 +- .../script/XMLStarBasicExportHandler.cxx | 2 +- xmloff/source/script/xmlscripti.cxx | 2 +- xmloff/source/style/DashStyle.cxx | 4 +- xmloff/source/style/FillStyleContext.cxx | 12 +- xmloff/source/style/GradientStyle.cxx | 4 +- xmloff/source/style/HatchStyle.cxx | 4 +- xmloff/source/style/ImageStyle.cxx | 4 +- xmloff/source/style/MarkerStyle.cxx | 4 +- .../source/style/PageHeaderFooterContext.cxx | 2 +- .../source/style/PageMasterImportContext.cxx | 2 +- xmloff/source/style/PageMasterStyleMap.cxx | 2 +- xmloff/source/style/TransGradientStyle.cxx | 2 +- xmloff/source/style/VisAreaContext.cxx | 4 +- xmloff/source/style/VisAreaExport.cxx | 4 +- xmloff/source/style/WordWrapPropertyHdl.cxx | 2 +- .../style/XMLBackgroundImageContext.cxx | 2 +- .../source/style/XMLBackgroundImageExport.cxx | 2 +- .../source/style/XMLClipPropertyHandler.cxx | 2 +- xmloff/source/style/XMLFontAutoStylePool.cxx | 2 +- xmloff/source/style/XMLFontStylesContext.cxx | 2 +- .../style/XMLFootnoteSeparatorExport.cxx | 2 +- .../style/XMLFootnoteSeparatorImport.cxx | 2 +- xmloff/source/style/XMLPageExport.cxx | 2 +- xmloff/source/style/impastp4.cxx | 2 +- xmloff/source/style/numehelp.cxx | 4 +- xmloff/source/style/prstylei.cxx | 4 +- xmloff/source/style/styleexp.cxx | 4 +- xmloff/source/style/xmlaustp.cxx | 4 +- xmloff/source/style/xmlexppr.cxx | 2 +- xmloff/source/style/xmlimppr.cxx | 8 +- xmloff/source/style/xmlnume.cxx | 4 +- xmloff/source/style/xmlnumfe.cxx | 2 +- xmloff/source/style/xmlnumfi.cxx | 2 +- xmloff/source/style/xmlnumi.cxx | 4 +- xmloff/source/style/xmlstyle.cxx | 2 +- xmloff/source/style/xmltabe.cxx | 4 +- xmloff/source/style/xmltabi.cxx | 4 +- xmloff/source/table/XMLTableExport.cxx | 2 +- xmloff/source/table/XMLTableImport.cxx | 2 +- xmloff/source/table/tabledesignsimporter.cxx | 106 ------------------ xmloff/source/text/XMLAutoMarkFileContext.cxx | 2 +- .../text/XMLAutoTextContainerEventImport.cxx | 2 +- xmloff/source/text/XMLAutoTextEventExport.cxx | 2 +- xmloff/source/text/XMLAutoTextEventImport.cxx | 2 +- .../text/XMLCalculationSettingsContext.cxx | 2 +- .../text/XMLChangeElementImportContext.cxx | 2 +- xmloff/source/text/XMLChangeImportContext.cxx | 2 +- xmloff/source/text/XMLChangeInfoContext.cxx | 2 +- .../text/XMLChangedRegionImportContext.cxx | 2 +- .../text/XMLFootnoteBodyImportContext.cxx | 2 +- .../XMLFootnoteConfigurationImportContext.cxx | 2 +- .../source/text/XMLFootnoteImportContext.cxx | 2 +- .../XMLIndexAlphabeticalSourceContext.cxx | 2 +- ...LIndexBibliographyConfigurationContext.cxx | 2 +- .../text/XMLIndexBibliographyEntryContext.cxx | 2 +- .../XMLIndexBibliographySourceContext.cxx | 2 +- .../text/XMLIndexChapterInfoEntryContext.cxx | 2 +- .../XMLIndexIllustrationSourceContext.cxx | 2 +- xmloff/source/text/XMLIndexMarkExport.cxx | 2 +- .../text/XMLIndexObjectSourceContext.cxx | 2 +- .../text/XMLIndexSimpleEntryContext.cxx | 2 +- .../source/text/XMLIndexSourceBaseContext.cxx | 2 +- xmloff/source/text/XMLIndexTOCContext.cxx | 6 +- .../source/text/XMLIndexTOCSourceContext.cxx | 2 +- .../source/text/XMLIndexTOCStylesContext.cxx | 2 +- .../text/XMLIndexTabStopEntryContext.cxx | 2 +- .../text/XMLIndexTableSourceContext.cxx | 2 +- .../source/text/XMLIndexTemplateContext.cxx | 2 +- .../text/XMLIndexTitleTemplateContext.cxx | 2 +- .../source/text/XMLIndexUserSourceContext.cxx | 2 +- xmloff/source/text/XMLLineNumberingExport.cxx | 2 +- .../text/XMLLineNumberingImportContext.cxx | 2 +- ...XMLLineNumberingSeparatorImportContext.cxx | 2 +- xmloff/source/text/XMLRedlineExport.cxx | 2 +- xmloff/source/text/XMLSectionExport.cxx | 4 +- .../text/XMLSectionFootnoteConfigExport.cxx | 2 +- .../text/XMLSectionFootnoteConfigImport.cxx | 2 +- .../source/text/XMLSectionImportContext.cxx | 2 +- .../text/XMLSectionSourceDDEImportContext.cxx | 2 +- .../text/XMLSectionSourceImportContext.cxx | 2 +- .../text/XMLStringBufferImportContext.cxx | 2 +- .../XMLTextCharStyleNamesElementExport.cxx | 2 +- xmloff/source/text/XMLTextColumnsContext.cxx | 2 +- xmloff/source/text/XMLTextColumnsExport.cxx | 2 +- xmloff/source/text/XMLTextFrameContext.cxx | 6 +- .../text/XMLTextFrameHyperlinkContext.cxx | 2 +- .../text/XMLTextHeaderFooterContext.cxx | 2 +- .../source/text/XMLTextListAutoStylePool.cxx | 2 +- .../source/text/XMLTextListBlockContext.cxx | 2 +- xmloff/source/text/XMLTextListItemContext.cxx | 2 +- .../source/text/XMLTextMarkImportContext.cxx | 2 +- .../source/text/XMLTextMasterPageContext.cxx | 2 +- .../source/text/XMLTextMasterPageExport.cxx | 2 +- .../text/XMLTextMasterStylesContext.cxx | 2 +- xmloff/source/text/XMLTextNumRuleInfo.cxx | 2 +- .../source/text/XMLTextShapeImportHelper.cxx | 2 +- .../source/text/XMLTextShapeStyleContext.cxx | 2 +- .../text/XMLTrackedChangesImportContext.cxx | 2 +- xmloff/source/text/txtdrope.cxx | 2 +- xmloff/source/text/txtdropi.cxx | 2 +- xmloff/source/text/txtexppr.cxx | 8 -- xmloff/source/text/txtexppr.hxx | 4 +- xmloff/source/text/txtflde.cxx | 2 +- xmloff/source/text/txtfldi.cxx | 2 +- xmloff/source/text/txtftne.cxx | 2 +- xmloff/source/text/txtimp.cxx | 6 +- xmloff/source/text/txtimppr.cxx | 2 +- xmloff/source/text/txtparae.cxx | 6 +- xmloff/source/text/txtparai.cxx | 2 +- xmloff/source/text/txtprmap.cxx | 2 +- xmloff/source/text/txtsecte.cxx | 2 +- xmloff/source/text/txtstyle.cxx | 28 +---- xmloff/source/text/txtstyli.cxx | 2 +- xmloff/source/text/txtvfldi.cxx | 4 +- .../source/transform/ChartOASISTContext.cxx | 2 +- xmloff/source/transform/ChartOOoTContext.cxx | 2 +- .../transform/ChartPlotAreaOASISTContext.cxx | 2 +- .../transform/ChartPlotAreaOOoTContext.cxx | 2 +- .../source/transform/ControlOASISTContext.cxx | 2 +- .../source/transform/ControlOOoTContext.cxx | 2 +- xmloff/source/transform/DlgOASISTContext.cxx | 2 +- xmloff/source/transform/DocumentTContext.cxx | 2 +- xmloff/source/transform/EventMap.cxx | 2 +- .../source/transform/EventOASISTContext.cxx | 2 +- xmloff/source/transform/EventOOoTContext.cxx | 2 +- .../transform/FormPropOASISTContext.cxx | 2 +- .../source/transform/FormPropOOoTContext.cxx | 2 +- .../source/transform/FrameOASISTContext.cxx | 2 +- xmloff/source/transform/FrameOOoTContext.cxx | 2 +- xmloff/source/transform/MergeElemTContext.cxx | 2 +- xmloff/source/transform/MetaTContext.cxx | 2 +- xmloff/source/transform/MetaTContext.hxx | 2 +- xmloff/source/transform/NotesTContext.cxx | 2 +- xmloff/source/transform/OOo2Oasis.cxx | 2 +- xmloff/source/transform/Oasis2OOo.cxx | 2 +- .../source/transform/PropertyActionsOASIS.cxx | 2 +- .../source/transform/PropertyActionsOOo.cxx | 2 +- .../source/transform/StyleOASISTContext.cxx | 2 +- xmloff/source/transform/StyleOOoTContext.cxx | 2 +- xmloff/source/transform/TransformerBase.cxx | 2 +- .../transform/XMLFilterRegistration.cxx | 6 +- xmloff/source/xforms/SchemaContext.cxx | 2 +- .../xforms/SchemaRestrictionContext.cxx | 2 +- .../source/xforms/SchemaSimpleTypeContext.cxx | 2 +- xmloff/source/xforms/TokenContext.cxx | 2 +- xmloff/source/xforms/XFormsBindContext.cxx | 4 +- .../source/xforms/XFormsInstanceContext.cxx | 4 +- xmloff/source/xforms/XFormsModelContext.cxx | 4 +- .../source/xforms/XFormsSubmissionContext.cxx | 4 +- xmloff/source/xforms/xformsapi.cxx | 2 +- xmloff/source/xforms/xformsexport.cxx | 4 +- xmloff/source/xforms/xformsimport.cxx | 2 +- xmloff/util/makefile.mk | 15 --- 267 files changed, 335 insertions(+), 560 deletions(-) rename xmloff/inc/{ => xmloff}/DashStyle.hxx (98%) rename xmloff/inc/{ => xmloff}/GradientStyle.hxx (98%) rename xmloff/inc/{ => xmloff}/HatchStyle.hxx (98%) rename xmloff/inc/{ => xmloff}/ImageStyle.hxx (98%) rename xmloff/inc/{ => xmloff}/MarkerStyle.hxx (98%) rename xmloff/inc/{ => xmloff}/VisAreaContext.hxx (98%) rename xmloff/inc/{ => xmloff}/VisAreaExport.hxx (97%) rename xmloff/inc/{ => xmloff}/XMLEmbeddedObjectExportFilter.hxx (98%) rename xmloff/inc/{ => xmloff}/XMLFilterServiceNames.h (97%) rename xmloff/inc/{ => xmloff}/XMLTextListAutoStylePool.hxx (98%) rename xmloff/{source/text => inc/xmloff}/XMLTextShapeImportHelper.hxx (97%) rename xmloff/inc/{ => xmloff}/functional.hxx (100%) rename xmloff/inc/{ => xmloff}/i18nmap.hxx (98%) rename xmloff/inc/{ => xmloff}/numehelp.hxx (99%) rename xmloff/inc/{ => xmloff}/txtimppr.hxx (98%) rename xmloff/inc/{ => xmloff}/unoatrcn.hxx (99%) rename xmloff/inc/{ => xmloff}/xformsexport.hxx (98%) rename xmloff/inc/{ => xmloff}/xformsimport.hxx (98%) rename xmloff/inc/{ => xmloff}/xmlcnitm.hxx (100%) rename xmloff/inc/{ => xmloff}/xmlerror.hxx (99%) rename xmloff/inc/{ => xmloff}/xmlkywd.hxx (99%) rename xmloff/inc/{ => xmloff}/xmlnmspe.hxx (99%) rename xmloff/inc/{ => xmloff}/xmlreg.hxx (97%) rename xmloff/inc/{ => xmloff}/xmltabe.hxx (98%) delete mode 100644 xmloff/source/table/tabledesignsimporter.cxx diff --git a/xmloff/inc/TransGradientStyle.hxx b/xmloff/inc/TransGradientStyle.hxx index 602a67adc9a3..6ead0c480875 100644 --- a/xmloff/inc/TransGradientStyle.hxx +++ b/xmloff/inc/TransGradientStyle.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TransGradientStyle.hxx,v $ + * $RCSfile: Transxmloff/GradientStyle.hxx,v $ * $Revision: 1.5 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index a06bbeab8326..26b7f0e20e55 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -36,7 +36,7 @@ #define _XMLOFF_TXTFLDE_HXX #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/inc/DashStyle.hxx b/xmloff/inc/xmloff/DashStyle.hxx similarity index 98% rename from xmloff/inc/DashStyle.hxx rename to xmloff/inc/xmloff/DashStyle.hxx index 12f25fc0bb75..561c9c5813b0 100644 --- a/xmloff/inc/DashStyle.hxx +++ b/xmloff/inc/xmloff/DashStyle.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DashStyle.hxx,v $ + * $RCSfile: xmloff/DashStyle.hxx,v $ * $Revision: 1.6 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/GradientStyle.hxx b/xmloff/inc/xmloff/GradientStyle.hxx similarity index 98% rename from xmloff/inc/GradientStyle.hxx rename to xmloff/inc/xmloff/GradientStyle.hxx index 081a6553dd78..a5585664fe09 100644 --- a/xmloff/inc/GradientStyle.hxx +++ b/xmloff/inc/xmloff/GradientStyle.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: GradientStyle.hxx,v $ + * $RCSfile: xmloff/GradientStyle.hxx,v $ * $Revision: 1.6 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/HatchStyle.hxx b/xmloff/inc/xmloff/HatchStyle.hxx similarity index 98% rename from xmloff/inc/HatchStyle.hxx rename to xmloff/inc/xmloff/HatchStyle.hxx index 5c1a63e58321..c1835a7bdeb0 100644 --- a/xmloff/inc/HatchStyle.hxx +++ b/xmloff/inc/xmloff/HatchStyle.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: HatchStyle.hxx,v $ + * $RCSfile: xmloff/HatchStyle.hxx,v $ * $Revision: 1.6 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/ImageStyle.hxx b/xmloff/inc/xmloff/ImageStyle.hxx similarity index 98% rename from xmloff/inc/ImageStyle.hxx rename to xmloff/inc/xmloff/ImageStyle.hxx index 4d7c6207ea2c..53a5afbbac36 100644 --- a/xmloff/inc/ImageStyle.hxx +++ b/xmloff/inc/xmloff/ImageStyle.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ImageStyle.hxx,v $ + * $RCSfile: xmloff/ImageStyle.hxx,v $ * $Revision: 1.5 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/MarkerStyle.hxx b/xmloff/inc/xmloff/MarkerStyle.hxx similarity index 98% rename from xmloff/inc/MarkerStyle.hxx rename to xmloff/inc/xmloff/MarkerStyle.hxx index 3f2e83b9abd9..02c746cc0b78 100644 --- a/xmloff/inc/MarkerStyle.hxx +++ b/xmloff/inc/xmloff/MarkerStyle.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MarkerStyle.hxx,v $ + * $RCSfile: xmloff/MarkerStyle.hxx,v $ * $Revision: 1.6 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/VisAreaContext.hxx b/xmloff/inc/xmloff/VisAreaContext.hxx similarity index 98% rename from xmloff/inc/VisAreaContext.hxx rename to xmloff/inc/xmloff/VisAreaContext.hxx index 7a99c4240395..56f9b20c9c46 100644 --- a/xmloff/inc/VisAreaContext.hxx +++ b/xmloff/inc/xmloff/VisAreaContext.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: VisAreaContext.hxx,v $ + * $RCSfile: xmloff/VisAreaContext.hxx,v $ * $Revision: 1.7 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/VisAreaExport.hxx b/xmloff/inc/xmloff/VisAreaExport.hxx similarity index 97% rename from xmloff/inc/VisAreaExport.hxx rename to xmloff/inc/xmloff/VisAreaExport.hxx index e2ce09472607..e10abe0d8f08 100644 --- a/xmloff/inc/VisAreaExport.hxx +++ b/xmloff/inc/xmloff/VisAreaExport.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: VisAreaExport.hxx,v $ + * $RCSfile: xmloff/VisAreaExport.hxx,v $ * $Revision: 1.4 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/XMLEmbeddedObjectExportFilter.hxx b/xmloff/inc/xmloff/XMLEmbeddedObjectExportFilter.hxx similarity index 98% rename from xmloff/inc/XMLEmbeddedObjectExportFilter.hxx rename to xmloff/inc/xmloff/XMLEmbeddedObjectExportFilter.hxx index 492586ff1b5d..53f1e6fa62a2 100644 --- a/xmloff/inc/XMLEmbeddedObjectExportFilter.hxx +++ b/xmloff/inc/xmloff/XMLEmbeddedObjectExportFilter.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLEmbeddedObjectExportFilter.hxx,v $ + * $RCSfile: xmloff/XMLEmbeddedObjectExportFilter.hxx,v $ * $Revision: 1.3 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/XMLFilterServiceNames.h b/xmloff/inc/xmloff/XMLFilterServiceNames.h similarity index 97% rename from xmloff/inc/XMLFilterServiceNames.h rename to xmloff/inc/xmloff/XMLFilterServiceNames.h index bc6410bdd2a1..0b72ef068da5 100644 --- a/xmloff/inc/XMLFilterServiceNames.h +++ b/xmloff/inc/xmloff/XMLFilterServiceNames.h @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLFilterServiceNames.h,v $ + * $RCSfile: xmloff/XMLFilterServiceNames.h,v $ * $Revision: 1.4 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/XMLTextListAutoStylePool.hxx b/xmloff/inc/xmloff/XMLTextListAutoStylePool.hxx similarity index 98% rename from xmloff/inc/XMLTextListAutoStylePool.hxx rename to xmloff/inc/xmloff/XMLTextListAutoStylePool.hxx index 96ea14950cfb..123a93d8419a 100644 --- a/xmloff/inc/XMLTextListAutoStylePool.hxx +++ b/xmloff/inc/xmloff/XMLTextListAutoStylePool.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLTextListAutoStylePool.hxx,v $ + * $RCSfile: xmloff/XMLTextListAutoStylePool.hxx,v $ * $Revision: 1.7 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/source/text/XMLTextShapeImportHelper.hxx b/xmloff/inc/xmloff/XMLTextShapeImportHelper.hxx similarity index 97% rename from xmloff/source/text/XMLTextShapeImportHelper.hxx rename to xmloff/inc/xmloff/XMLTextShapeImportHelper.hxx index d2720146f99f..a8d8250280a4 100644 --- a/xmloff/source/text/XMLTextShapeImportHelper.hxx +++ b/xmloff/inc/xmloff/XMLTextShapeImportHelper.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLTextShapeImportHelper.hxx,v $ + * $RCSfile: xmloff/XMLTextShapeImportHelper.hxx,v $ * $Revision: 1.6 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/functional.hxx b/xmloff/inc/xmloff/functional.hxx similarity index 100% rename from xmloff/inc/functional.hxx rename to xmloff/inc/xmloff/functional.hxx diff --git a/xmloff/inc/i18nmap.hxx b/xmloff/inc/xmloff/i18nmap.hxx similarity index 98% rename from xmloff/inc/i18nmap.hxx rename to xmloff/inc/xmloff/i18nmap.hxx index a1149ef9d31f..d8b26f95c538 100644 --- a/xmloff/inc/i18nmap.hxx +++ b/xmloff/inc/xmloff/i18nmap.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: i18nmap.hxx,v $ + * $RCSfile: xmloff/i18nmap.hxx,v $ * $Revision: 1.5 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/numehelp.hxx b/xmloff/inc/xmloff/numehelp.hxx similarity index 99% rename from xmloff/inc/numehelp.hxx rename to xmloff/inc/xmloff/numehelp.hxx index e33513a3a7c8..8fbad2b6d4d1 100644 --- a/xmloff/inc/numehelp.hxx +++ b/xmloff/inc/xmloff/numehelp.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numehelp.hxx,v $ + * $RCSfile: xmloff/numehelp.hxx,v $ * $Revision: 1.12 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx index 7e041d0bdc91..dbd0bf51a33e 100644 --- a/xmloff/inc/xmloff/txtimp.hxx +++ b/xmloff/inc/xmloff/txtimp.hxx @@ -45,7 +45,7 @@ #include #include -// functional.hxx is obsolete and should be replaced by its comphelper +// xmloff/functional.hxx is obsolete and should be replaced by its comphelper // counterpart #include #include diff --git a/xmloff/inc/txtimppr.hxx b/xmloff/inc/xmloff/txtimppr.hxx similarity index 98% rename from xmloff/inc/txtimppr.hxx rename to xmloff/inc/xmloff/txtimppr.hxx index c7db0aeaba46..ad729be0b8ac 100644 --- a/xmloff/inc/txtimppr.hxx +++ b/xmloff/inc/xmloff/txtimppr.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtimppr.hxx,v $ + * $RCSfile: xmloff/txtimppr.hxx,v $ * $Revision: 1.4 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/unoatrcn.hxx b/xmloff/inc/xmloff/unoatrcn.hxx similarity index 99% rename from xmloff/inc/unoatrcn.hxx rename to xmloff/inc/xmloff/unoatrcn.hxx index 8315d391c5c9..47cb2440b659 100644 --- a/xmloff/inc/unoatrcn.hxx +++ b/xmloff/inc/xmloff/unoatrcn.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoatrcn.hxx,v $ + * $RCSfile: xmloff/unoatrcn.hxx,v $ * $Revision: 1.5 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/xformsexport.hxx b/xmloff/inc/xmloff/xformsexport.hxx similarity index 98% rename from xmloff/inc/xformsexport.hxx rename to xmloff/inc/xmloff/xformsexport.hxx index 7a556dfa4c65..9bf24c659ea2 100644 --- a/xmloff/inc/xformsexport.hxx +++ b/xmloff/inc/xmloff/xformsexport.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xformsexport.hxx,v $ + * $RCSfile: xmloff/xformsexport.hxx,v $ * $Revision: 1.7 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/xformsimport.hxx b/xmloff/inc/xmloff/xformsimport.hxx similarity index 98% rename from xmloff/inc/xformsimport.hxx rename to xmloff/inc/xmloff/xformsimport.hxx index 7429ff4c41b6..1a31debc3306 100644 --- a/xmloff/inc/xformsimport.hxx +++ b/xmloff/inc/xmloff/xformsimport.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xformsimport.hxx,v $ + * $RCSfile: xmloff/xformsimport.hxx,v $ * $Revision: 1.7 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/xmlcnitm.hxx b/xmloff/inc/xmloff/xmlcnitm.hxx similarity index 100% rename from xmloff/inc/xmlcnitm.hxx rename to xmloff/inc/xmloff/xmlcnitm.hxx diff --git a/xmloff/inc/xmlerror.hxx b/xmloff/inc/xmloff/xmlerror.hxx similarity index 99% rename from xmloff/inc/xmlerror.hxx rename to xmloff/inc/xmloff/xmlerror.hxx index be75dd84e696..ad0a950c7f6d 100644 --- a/xmloff/inc/xmlerror.hxx +++ b/xmloff/inc/xmloff/xmlerror.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlerror.hxx,v $ + * $RCSfile: xmloff/xmlerror.hxx,v $ * $Revision: 1.13 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/xmlkywd.hxx b/xmloff/inc/xmloff/xmlkywd.hxx similarity index 99% rename from xmloff/inc/xmlkywd.hxx rename to xmloff/inc/xmloff/xmlkywd.hxx index e0bd8868f181..9d3cedb051b4 100644 --- a/xmloff/inc/xmlkywd.hxx +++ b/xmloff/inc/xmloff/xmlkywd.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlkywd.hxx,v $ + * $RCSfile: xmloff/xmlkywd.hxx,v $ * $Revision: 1.176 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmloff/xmlnmspe.hxx similarity index 99% rename from xmloff/inc/xmlnmspe.hxx rename to xmloff/inc/xmloff/xmlnmspe.hxx index f90ff05c084d..93cc2d727c3d 100644 --- a/xmloff/inc/xmlnmspe.hxx +++ b/xmloff/inc/xmloff/xmlnmspe.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlnmspe.hxx,v $ + * $RCSfile: xmloff/xmlnmspe.hxx,v $ * $Revision: 1.22 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/xmlreg.hxx b/xmloff/inc/xmloff/xmlreg.hxx similarity index 97% rename from xmloff/inc/xmlreg.hxx rename to xmloff/inc/xmloff/xmlreg.hxx index f03a7dab9197..aab5e050228e 100644 --- a/xmloff/inc/xmlreg.hxx +++ b/xmloff/inc/xmloff/xmlreg.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlreg.hxx,v $ + * $RCSfile: xmloff/xmlreg.hxx,v $ * $Revision: 1.3 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/xmltabe.hxx b/xmloff/inc/xmloff/xmltabe.hxx similarity index 98% rename from xmloff/inc/xmltabe.hxx rename to xmloff/inc/xmloff/xmltabe.hxx index ef5623767509..e862e9716a8c 100644 --- a/xmloff/inc/xmltabe.hxx +++ b/xmloff/inc/xmloff/xmltabe.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmltabe.hxx,v $ + * $RCSfile: xmloff/xmltabe.hxx,v $ * $Revision: 1.6 $ * * This file is part of OpenOffice.org. diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx index c459bb2fa0f6..21530ad8fb62 100644 --- a/xmloff/inc/xmlversion.hxx +++ b/xmloff/inc/xmlversion.hxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include // ------------------------------------------------------------------------ diff --git a/xmloff/prj/d.lst b/xmloff/prj/d.lst index 686b4b70a0ae..e39549d4aa04 100644 --- a/xmloff/prj/d.lst +++ b/xmloff/prj/d.lst @@ -10,75 +10,16 @@ mkdir: %_DEST%\inc%_EXT%\xmloff ..\dtd\* %_DEST%\bin%_EXT% -..\inc\xmloff\dllapi.h %_DEST%\inc%_EXT%\xmloff\dllapi.h -..\inc\xmloff\attrlist.hxx %_DEST%\inc%_EXT%\xmloff\attrlist.hxx ..\inc\i18nmap.hxx %_DEST%\inc%_EXT%\xmloff\i18nmap.hxx -..\inc\xmloff\nmspmap.hxx %_DEST%\inc%_EXT%\xmloff\nmspmap.hxx ..\inc\unoatrcn.hxx %_DEST%\inc%_EXT%\xmloff\unoatrcn.hxx -..\inc\xmloff\xmlcnimp.hxx %_DEST%\inc%_EXT%\xmloff\xmlcnimp.hxx -..\inc\xmlcnitm.hxx %_DEST%\inc%_EXT%\xmloff\xmlcnitm.hxx -..\inc\xmloff\xmlement.hxx %_DEST%\inc%_EXT%\xmloff\xmlement.hxx -..\inc\xmloff\xmlictxt.hxx %_DEST%\inc%_EXT%\xmloff\xmlictxt.hxx -..\inc\xmloff\xmlimp.hxx %_DEST%\inc%_EXT%\xmloff\xmlimp.hxx ..\inc\xmlkywd.hxx %_DEST%\inc%_EXT%\xmloff\xmlkywd.hxx -..\inc\xmloff\xmlmetae.hxx %_DEST%\inc%_EXT%\xmloff\xmlmetae.hxx -..\inc\xmloff\xmlmetai.hxx %_DEST%\inc%_EXT%\xmloff\xmlmetai.hxx -..\inc\xmloff\xmlscripti.hxx %_DEST%\inc%_EXT%\xmloff\xmlscripti.hxx -..\inc\xmloff\xmlstyle.hxx %_DEST%\inc%_EXT%\xmloff\xmlstyle.hxx -..\inc\xmloff\xmltkmap.hxx %_DEST%\inc%_EXT%\xmloff\xmltkmap.hxx -..\inc\xmloff\xmluconv.hxx %_DEST%\inc%_EXT%\xmloff\xmluconv.hxx +..\inc\xmlcnitm.hxx %_DEST%\inc%_EXT%\xmloff\xmlcnitm.hxx ..\inc\xmlnmspe.hxx %_DEST%\inc%_EXT%\xmloff\xmlnmspe.hxx -..\inc\xmloff\xmlnumfi.hxx %_DEST%\inc%_EXT%\xmloff\xmlnumfi.hxx -..\inc\xmloff\xmlnumfe.hxx %_DEST%\inc%_EXT%\xmloff\xmlnumfe.hxx -..\inc\xmloff\xmlexp.hxx %_DEST%\inc%_EXT%\xmloff\xmlexp.hxx ..\inc\xmlreg.hxx %_DEST%\inc%_EXT%\xmloff\xmlreg.hxx -..\inc\xmloff\xmlnumi.hxx %_DEST%\inc%_EXT%\xmloff\xmlnumi.hxx -..\inc\xmloff\xmlnume.hxx %_DEST%\inc%_EXT%\xmloff\xmlnume.hxx ..\inc\xmltabe.hxx %_DEST%\inc%_EXT%\xmloff\xmltabe.hxx -..\inc\xmloff\maptype.hxx %_DEST%\inc%_EXT%\xmloff\maptype.hxx -..\inc\xmloff\uniref.hxx %_DEST%\inc%_EXT%\xmloff\uniref.hxx -..\inc\xmloff\xmlaustp.hxx %_DEST%\inc%_EXT%\xmloff\xmlaustp.hxx -..\inc\xmloff\xmlexppr.hxx %_DEST%\inc%_EXT%\xmloff\xmlexppr.hxx -..\inc\xmloff\xmlimppr.hxx %_DEST%\inc%_EXT%\xmloff\xmlimppr.hxx -..\inc\xmloff\xmlprcon.hxx %_DEST%\inc%_EXT%\xmloff\xmlprcon.hxx -..\inc\xmloff\xmlprhdl.hxx %_DEST%\inc%_EXT%\xmloff\xmlprhdl.hxx -..\inc\xmloff\xmlprmap.hxx %_DEST%\inc%_EXT%\xmloff\xmlprmap.hxx -..\inc\xmloff\xmltypes.hxx %_DEST%\inc%_EXT%\xmloff\xmltypes.hxx -..\inc\xmloff\families.hxx %_DEST%\inc%_EXT%\xmloff\families.hxx -..\inc\xmloff\styleexp.hxx %_DEST%\inc%_EXT%\xmloff\styleexp.hxx -..\inc\xmloff\txtstyle.hxx %_DEST%\inc%_EXT%\xmloff\txtstyle.hxx -..\inc\xmloff\prstylei.hxx %_DEST%\inc%_EXT%\xmloff\prstylei.hxx -..\inc\xmloff\txtstyli.hxx %_DEST%\inc%_EXT%\xmloff\txtstyli.hxx -..\inc\xmloff\txtprmap.hxx %_DEST%\inc%_EXT%\xmloff\txtprmap.hxx -..\inc\xmloff\txtparae.hxx %_DEST%\inc%_EXT%\xmloff\txtparae.hxx -..\inc\xmloff\txtimp.hxx %_DEST%\inc%_EXT%\xmloff\txtimp.hxx -..\inc\xmloff\prhdlfac.hxx %_DEST%\inc%_EXT%\xmloff\prhdlfac.hxx -..\inc\xmloff\EnumPropertyHdl.hxx %_DEST%\inc%_EXT%\xmloff\EnumPropertyHdl.hxx -..\inc\xmloff\NamedBoolPropertyHdl.hxx %_DEST%\inc%_EXT%\xmloff\NamedBoolPropertyHdl.hxx ..\inc\numehelp.hxx %_DEST%\inc%_EXT%\xmloff\numehelp.hxx ..\inc\XMLTextListAutoStylePool.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextListAutoStylePool.hxx -..\inc\xmloff\shapeexport.hxx %_DEST%\inc%_EXT%\xmloff\shapeexport.hxx -..\inc\xmloff\shapeimport.hxx %_DEST%\inc%_EXT%\xmloff\shapeimport.hxx -..\inc\xmloff\SchXMLExportHelper.hxx %_DEST%\inc%_EXT%\xmloff\SchXMLExportHelper.hxx -..\inc\xmloff\SchXMLImportHelper.hxx %_DEST%\inc%_EXT%\xmloff\SchXMLImportHelper.hxx ..\inc\functional.hxx %_DEST%\inc%_EXT%\xmloff\functional.hxx -..\inc\xmloff\XMLPageExport.hxx %_DEST%\inc%_EXT%\xmloff\XMLPageExport.hxx -..\inc\xmloff\PageMasterStyleMap.hxx %_DEST%\inc%_EXT%\xmloff\PageMasterStyleMap.hxx -..\inc\xmloff\XMLTextMasterPageExport.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextMasterPageExport.hxx -..\inc\xmloff\XMLTextMasterStylesContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextMasterStylesContext.hxx -..\inc\xmloff\XMLTextMasterPageContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextMasterPageContext.hxx -..\inc\xmloff\XMLTextTableContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextTableContext.hxx -..\source\text\XMLTextShapeImportHelper.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextShapeImportHelper.hxx -..\inc\xmloff\XMLShapeStyleContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLShapeStyleContext.hxx -..\inc\xmloff\XMLTextShapeStyleContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextShapeStyleContext.hxx -..\inc\xmloff\XMLFontAutoStylePool.hxx %_DEST%\inc%_EXT%\xmloff\XMLFontAutoStylePool.hxx -..\inc\xmloff\XMLFontStylesContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLFontStylesContext.hxx -..\inc\xmloff\ProgressBarHelper.hxx %_DEST%\inc%_EXT%\xmloff\ProgressBarHelper.hxx -..\inc\xmloff\formlayerexport.hxx %_DEST%\inc%_EXT%\xmloff\formlayerexport.hxx -..\inc\xmloff\formlayerimport.hxx %_DEST%\inc%_EXT%\xmloff\formlayerimport.hxx -..\inc\xmloff\animexp.hxx %_DEST%\inc%_EXT%\xmloff\animexp.hxx -..\inc\xmloff\contextid.hxx %_DEST%\inc%_EXT%\xmloff\contextid.hxx -..\inc\xmloff\formsimp.hxx %_DEST%\inc%_EXT%\xmloff\formsimp.hxx ..\inc\VisAreaExport.hxx %_DEST%\inc%_EXT%\xmloff\VisAreaExport.hxx ..\inc\VisAreaContext.hxx %_DEST%\inc%_EXT%\xmloff\VisAreaContext.hxx ..\inc\DashStyle.hxx %_DEST%\inc%_EXT%\xmloff\DashStyle.hxx @@ -86,28 +27,17 @@ mkdir: %_DEST%\inc%_EXT%\xmloff ..\inc\MarkerStyle.hxx %_DEST%\inc%_EXT%\xmloff\MarkerStyle.hxx ..\inc\HatchStyle.hxx %_DEST%\inc%_EXT%\xmloff\HatchStyle.hxx ..\inc\ImageStyle.hxx %_DEST%\inc%_EXT%\xmloff\ImageStyle.hxx -..\inc\xmloff\SettingsExportHelper.hxx %_DEST%\inc%_EXT%\xmloff\SettingsExportHelper.hxx -..\inc\xmloff\DocumentSettingsContext.hxx %_DEST%\inc%_EXT%\xmloff\DocumentSettingsContext.hxx -..\inc\xmloff\XMLGraphicsDefaultStyle.hxx %_DEST%\inc%_EXT%\xmloff\XMLGraphicsDefaultStyle.hxx +..\source\text\XMLTextShapeImportHelper.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextShapeImportHelper.hxx ..\inc\XMLEmbeddedObjectExportFilter.hxx %_DEST%\inc%_EXT%\xmloff\XMLEmbeddedObjectExportFilter.hxx ..\inc\XMLFilterServiceNames.h %_DEST%\inc%_EXT%\xmloff\XMLFilterServiceNames.h -..\inc\xmloff\XMLBase64ImportContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLBase64ImportContext.hxx -..\inc\xmloff\xmltoken.hxx %_DEST%\inc%_EXT%\xmloff\xmltoken.hxx -..\inc\xmloff\XMLEventExport.hxx %_DEST%\inc%_EXT%\xmloff\XMLEventExport.hxx -..\inc\xmloff\xmlevent.hxx %_DEST%\inc%_EXT%\xmloff\xmlevent.hxx -..\inc\xmloff\XMLEventsImportContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLEventsImportContext.hxx ..\inc\xmlerror.hxx %_DEST%\inc%_EXT%\xmloff\xmlerror.hxx -..\inc\xmloff\SinglePropertySetInfoCache.hxx %_DEST%\inc%_EXT%\xmloff\SinglePropertySetInfoCache.hxx -..\inc\xmloff\PropertySetInfoHash.hxx %_DEST%\inc%_EXT%\xmloff\PropertySetInfoHash.hxx -..\inc\xmloff\PropertySetInfoKey.hxx %_DEST%\inc%_EXT%\xmloff\PropertySetInfoKey.hxx ..\inc\xformsimport.hxx %_DEST%\inc%_EXT%\xmloff\xformsimport.hxx ..\inc\xformsexport.hxx %_DEST%\inc%_EXT%\xmloff\xformsexport.hxx -..\inc\xmloff\controlpropertyhdl.hxx %_DEST%\inc%_EXT%\xmloff\controlpropertyhdl.hxx -..\inc\xmloff\ControlBorderHandler.hxx %_DEST%\inc%_EXT%\xmloff\ControlBorderHandler.hxx -..\inc\xmloff\XMLConstantsPropertyHandler.hxx %_DEST%\inc%_EXT%\xmloff\XMLConstantsPropertyHandler.hxx -..\inc\xmloff\XMLStringVector.hxx %_DEST%\inc%_EXT%\xmloff\XMLStringVector.hxx ..\inc\txtimppr.hxx %_DEST%\inc%_EXT%\xmloff\txtimppr.hxx -..\inc\xmloff\XMLCharContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLCharContext.hxx + +..\inc\xmloff\*.hxx %_DEST%\inc%_EXT%\xmloff\*.hxx +..\inc\xmloff\*.h %_DEST%\inc%_EXT%\xmloff\*.h + ..\xml\components.xml %_DEST%\xml%_EXT%\components.xml mkdir: %_DEST%\inc%_EXT%\xmloff\table diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 1fdc18fe1035..1176faf06689 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -31,7 +31,7 @@ #define _PROPERTYMAP_HXX_ #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx index 4c5cad798b78..96c253d75bc4 100755 --- a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx +++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 1f854469b4be..46d99552a309 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -43,7 +43,7 @@ #include // header for class ByteString #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f7cf82abe974..ae889b2e0387 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -47,7 +47,7 @@ #ifndef _SVTOOLS_NMSPMAP_HXX #include #endif -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index dd955e6d69d5..db7e11bff88f 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -42,7 +42,7 @@ // header for class ByteString #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx index 1d8a4e16bb8c..0b87604da391 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.cxx +++ b/xmloff/source/chart/SchXMLParagraphContext.cxx @@ -34,7 +34,7 @@ #include "SchXMLImport.hxx" #include "SchXMLParagraphContext.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 8bb4712b4159..11d38e37addf 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -41,7 +41,7 @@ #endif #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 4633a149e4df..b95f4f515517 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -56,7 +56,7 @@ // header for define DBG_ERROR1 #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #ifndef _XMLOFF_NMSPMAP_HX #include diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index a1c021171a92..295ed9d8a005 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -38,7 +38,7 @@ #include "transporttypes.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index ebc48c0d24c0..97ea44823eee 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -52,7 +52,7 @@ // header for class XMLPropertySetMapper #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx index bc6b4110a31e..e259eb686fa1 100644 --- a/xmloff/source/chart/XMLChartStyleContext.cxx +++ b/xmloff/source/chart/XMLChartStyleContext.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include "XMLChartStyleContext.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.cxx b/xmloff/source/chart/XMLLabelSeparatorContext.cxx index 35df7c9dc312..9d163d08ccc7 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.cxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.cxx @@ -35,7 +35,7 @@ #include "SchXMLParagraphContext.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/chart/XMLSymbolImageContext.cxx b/xmloff/source/chart/XMLSymbolImageContext.cxx index 1ee0055019b8..d14a8bac4620 100644 --- a/xmloff/source/chart/XMLSymbolImageContext.cxx +++ b/xmloff/source/chart/XMLSymbolImageContext.cxx @@ -33,7 +33,7 @@ #include "XMLSymbolImageContext.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx index e3e3389e18d2..ba3cb02652cf 100644 --- a/xmloff/source/chart/contexts.cxx +++ b/xmloff/source/chart/contexts.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "SchXMLImport.hxx" diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 5845a80bc1a0..77eefe017870 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index 57d22811a897..be8d719e2573 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.cxx @@ -35,7 +35,7 @@ #include #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx index e53cabb3952a..536f6d2d03a0 100644 --- a/xmloff/source/core/DomExport.cxx +++ b/xmloff/source/core/DomExport.cxx @@ -35,7 +35,7 @@ #include #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx index abd33ec80625..9728652cb901 100644 --- a/xmloff/source/core/RDFaExportHelper.cxx +++ b/xmloff/source/core/RDFaExportHelper.cxx @@ -32,7 +32,7 @@ #include "RDFaExportHelper.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index e8bb000942d1..6d6acbdbdbeb 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/core/XMLBase64Export.cxx b/xmloff/source/core/XMLBase64Export.cxx index 9c2e81410e20..b0e9d6cd1f44 100644 --- a/xmloff/source/core/XMLBase64Export.cxx +++ b/xmloff/source/core/XMLBase64Export.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "XMLBase64Export.hxx" using namespace ::com::sun::star::uno; diff --git a/xmloff/source/core/XMLEmbeddedObjectExportFilter.cxx b/xmloff/source/core/XMLEmbeddedObjectExportFilter.cxx index 2e987d70de7d..ff808956fa68 100644 --- a/xmloff/source/core/XMLEmbeddedObjectExportFilter.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectExportFilter.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "XMLEmbeddedObjectExportFilter.hxx" +#include "xmloff/XMLEmbeddedObjectExportFilter.hxx" using ::rtl::OUString; diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 7d68cf9a44d1..157eba1a8939 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -45,11 +45,11 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include -#include "XMLFilterServiceNames.h" +#include "xmloff/XMLFilterServiceNames.h" #include "XMLEmbeddedObjectImportContext.hxx" using ::rtl::OUString; diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index 260ed61e7d33..d2bbb148c89c 100644 --- a/xmloff/source/core/facreg.cxx +++ b/xmloff/source/core/facreg.cxx @@ -43,7 +43,7 @@ #include #include -#include "xmlreg.hxx" +#include "xmloff/xmlreg.hxx" using namespace rtl; using namespace com::sun::star; diff --git a/xmloff/source/core/i18nmap.cxx b/xmloff/source/core/i18nmap.cxx index 0f8f49d83ece..2eb6c89135ec 100644 --- a/xmloff/source/core/i18nmap.cxx +++ b/xmloff/source/core/i18nmap.cxx @@ -33,7 +33,7 @@ #include #include #include -#include "i18nmap.hxx" +#include "xmloff/i18nmap.hxx" using namespace rtl; diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index 7f09a1d02950..6d2ef93af5d7 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -39,7 +39,7 @@ #endif #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" using ::rtl::OUString; diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx index cea312dd86d6..140e4a1862a8 100644 --- a/xmloff/source/core/unoatrcn.cxx +++ b/xmloff/source/core/unoatrcn.cxx @@ -38,7 +38,7 @@ #include -#include "unoatrcn.hxx" +#include "xmloff/unoatrcn.hxx" using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/core/xmlcnitm.cxx b/xmloff/source/core/xmlcnitm.cxx index adcbdc2ecb49..c997f6de4bdb 100644 --- a/xmloff/source/core/xmlcnitm.cxx +++ b/xmloff/source/core/xmlcnitm.cxx @@ -35,7 +35,7 @@ #include #include -#include "unoatrcn.hxx" +#include "xmloff/unoatrcn.hxx" using namespace rtl; using namespace ::com::sun::star::uno; diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx index 9331ff228ed1..a8bc6c0f2f6f 100644 --- a/xmloff/source/core/xmlerror.cxx +++ b/xmloff/source/core/xmlerror.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include #include diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 2028ad26db25..f05d159a5909 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -51,7 +51,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include @@ -65,20 +65,20 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include #include #include "XMLImageMapExport.hxx" #include "XMLBase64Export.hxx" -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include -#include "XMLFilterServiceNames.h" -#include "XMLEmbeddedObjectExportFilter.hxx" +#include "xmloff/XMLFilterServiceNames.h" +#include "xmloff/XMLEmbeddedObjectExportFilter.hxx" #include "XMLBasicExportFilter.hxx" #include #include @@ -87,7 +87,7 @@ #include "PropertySetMerger.hxx" #include "svl/urihelper.hxx" -#include "xformsexport.hxx" +#include "xmloff/xformsexport.hxx" #include #include diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 66ae95da5393..21f6e2da7951 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -40,8 +40,8 @@ #include "unointerfacetouniqueidentifiermapper.hxx" #include #include -#include "xmlnmspe.hxx" -#include "xmlkywd.hxx" +#include "xmloff/xmlnmspe.hxx" +#include "xmloff/xmlkywd.hxx" #include #include #include @@ -53,7 +53,7 @@ #include "StyleMap.hxx" #include #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include #include diff --git a/xmloff/source/core/xmlkywd.cxx b/xmloff/source/core/xmlkywd.cxx index 5d32b3328538..f9c3b3918fd4 100644 --- a/xmloff/source/core/xmlkywd.cxx +++ b/xmloff/source/core/xmlkywd.cxx @@ -33,7 +33,7 @@ #ifndef _XMLOFF_XMLKYWD_HXX #define XML_DEFINE_KEYWORDS -#include "xmlkywd.hxx" +#include "xmloff/xmlkywd.hxx" #undef XML_DEFINE_KEYWORDS #endif diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index 3aa08fc1a70b..1a6c246cef38 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #ifndef _XMLOFF_FAMILIES_HXX diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx index e9c6e194c621..658548d48b84 100644 --- a/xmloff/source/draw/XMLImageMapContext.cxx +++ b/xmloff/source/draw/XMLImageMapContext.cxx @@ -49,11 +49,11 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "xexptran.hxx" -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include "XMLStringBufferImportContext.hxx" #include diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx index 00d678670bf6..7181f96f7ed7 100644 --- a/xmloff/source/draw/XMLImageMapExport.cxx +++ b/xmloff/source/draw/XMLImageMapExport.cxx @@ -48,7 +48,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index ce69e1a9723c..a4a9ad34ea32 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -33,7 +33,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index 88eae0fe85ea..b24cddba77bb 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.cxx @@ -35,8 +35,8 @@ #include #include #include -#include "xmlnmspe.hxx" -#include "xmlkywd.hxx" +#include "xmloff/xmlnmspe.hxx" +#include "xmloff/xmlkywd.hxx" #include #include #include "XMLReplacementImageContext.hxx" diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index 4c069ac37cd8..f9f09abd9c2d 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.cxx @@ -40,9 +40,9 @@ #include #include #include -#include +#include #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include "sdpropls.hxx" diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 4d7a8af1a1e9..5ad4373a06de 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -87,7 +87,7 @@ #include "sdxmlexp_impl.hxx" #include "sdpropls.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 6569c9d5408d..877e5e5eee03 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -74,7 +74,7 @@ #include "sdpropls.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index 8b816030c642..d94a7859ba21 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -40,7 +40,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 7c07af7ed21b..f9c7b03b60a7 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -44,7 +44,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include /* #include diff --git a/xmloff/source/draw/descriptionimp.cxx b/xmloff/source/draw/descriptionimp.cxx index 857d44e408e9..7d0edea460dd 100644 --- a/xmloff/source/draw/descriptionimp.cxx +++ b/xmloff/source/draw/descriptionimp.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "descriptionimp.hxx" diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index c5fdc7116e41..3b028995f258 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "eventimp.hxx" diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx index 8f189ccb45c3..9498c8e51819 100644 --- a/xmloff/source/draw/layerexp.cxx +++ b/xmloff/source/draw/layerexp.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index 4cb3f91bb081..0343632660d7 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.cxx @@ -39,7 +39,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "layerimp.hxx" diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index dcdfdbaa05d2..20b4ba882b8f 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -65,7 +65,7 @@ #include "sdpropls.hxx" #include "propimp0.hxx" #include -#include +#include #include #include #include diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx index eed5eee69b51..103bf56cd489 100644 --- a/xmloff/source/draw/sdpropls.hxx +++ b/xmloff/source/draw/sdpropls.hxx @@ -38,7 +38,7 @@ #include #include #include -#include "XMLTextListAutoStylePool.hxx" +#include "xmloff/XMLTextListAutoStylePool.hxx" #include ////////////////////////////////////////////////////////////////////////////// diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 1d7414d4ca23..f43db3731a7b 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include "unointerfacetouniqueidentifiermapper.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include @@ -80,7 +80,7 @@ #include "layerexp.hxx" -#include "VisAreaExport.hxx" +#include "xmloff/VisAreaExport.hxx" #include "XMLNumberStylesExport.hxx" #include #include diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 47e1e0f5810b..599b5b4d8606 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -43,7 +43,7 @@ #include #endif #include "ximpstyl.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include @@ -54,7 +54,7 @@ #include #include "sdpropls.hxx" #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 3a0e01631f28..475f0fb847a7 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -64,7 +64,7 @@ #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index e09ad66dfeb9..9a0df5821b91 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -59,7 +59,7 @@ #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/draw/shapeexport3.cxx b/xmloff/source/draw/shapeexport3.cxx index 543910303d1c..616f16bf9daf 100644 --- a/xmloff/source/draw/shapeexport3.cxx +++ b/xmloff/source/draw/shapeexport3.cxx @@ -52,7 +52,7 @@ #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index e2e804eefb43..901a0c6ffe80 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -75,7 +75,7 @@ #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "XMLBase64Export.hxx" using ::rtl::OUString; diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 9da35549b7da..596444491cbb 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -44,7 +44,7 @@ #include #endif #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "ximpstyl.hxx" #include "ximpshap.hxx" diff --git a/xmloff/source/draw/viewcontext.cxx b/xmloff/source/draw/viewcontext.cxx index 63d52b896839..bf8d51c5aa04 100644 --- a/xmloff/source/draw/viewcontext.cxx +++ b/xmloff/source/draw/viewcontext.cxx @@ -33,9 +33,9 @@ #include "viewcontext.hxx" #include "sdxmlimp_impl.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include -#include "VisAreaContext.hxx" +#include "xmloff/VisAreaContext.hxx" using namespace com::sun::star; using namespace rtl; diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx index 2273c02e982a..5d574245049b 100644 --- a/xmloff/source/draw/ximp3dscene.cxx +++ b/xmloff/source/draw/ximp3dscene.cxx @@ -34,7 +34,7 @@ #include #include "xexptran.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "eventimp.hxx" diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index c19e02dc0fda..d8fc32f93cdd 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -44,11 +44,11 @@ #include "EnhancedCustomShapeToken.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "xexptran.hxx" -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include #include diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx index cab0f0089734..59433e1da331 100644 --- a/xmloff/source/draw/ximpgrp.cxx +++ b/xmloff/source/draw/ximpgrp.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include"xmlnmspe.hxx" +#include"xmloff/xmlnmspe.hxx" #include "ximpgrp.hxx" #include #include "ximpshap.hxx" diff --git a/xmloff/source/draw/ximplink.cxx b/xmloff/source/draw/ximplink.cxx index 4d09116f7a2f..19f3ff80d8c4 100644 --- a/xmloff/source/draw/ximplink.cxx +++ b/xmloff/source/draw/ximplink.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include"xmlnmspe.hxx" +#include"xmloff/xmlnmspe.hxx" #include "ximplink.hxx" #include diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 9d64d49f9421..ac6417e1ae61 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -40,7 +40,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "ximppage.hxx" #include "ximpshap.hxx" #include "animimp.hxx" diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 65aad96bad86..44d7cb73340f 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -74,7 +74,7 @@ #include "PropertySetMerger.hxx" #include #include "ximpstyl.hxx" -#include"xmlnmspe.hxx" +#include"xmloff/xmlnmspe.hxx" #include #include "EnhancedCustomShapeToken.hxx" #include "XMLReplacementImageContext.hxx" @@ -85,7 +85,7 @@ #include "descriptionimp.hxx" #include "ximpcustomshape.hxx" #include "XMLEmbeddedObjectImportContext.hxx" -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include #include diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx index 8507b34ae797..79e7da0c7858 100644 --- a/xmloff/source/draw/ximpshow.cxx +++ b/xmloff/source/draw/ximpshow.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "ximpshow.hxx" diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 67ee2d044851..8c2d26170b38 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -34,7 +34,7 @@ #include "ximpstyl.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "ximpnote.hxx" @@ -58,7 +58,7 @@ #include "layerimp.hxx" #include #include "XMLNumberStylesImport.hxx" -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx index 79ad5588cf0c..6fe0881a1ead 100644 --- a/xmloff/source/forms/controlpropertymap.cxx +++ b/xmloff/source/forms/controlpropertymap.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index a17138654730..9639b27ee75c 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -33,12 +33,12 @@ #include "elementexport.hxx" #include "strings.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "eventexport.hxx" #include "formenums.hxx" #include "formcellbinding.hxx" #include "formcellbinding.hxx" -#include "xformsexport.hxx" +#include "xmloff/xformsexport.hxx" /** === begin UNO includes === **/ #include diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 7bdb61ff86fd..81efb000ca33 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -39,7 +39,7 @@ #include "strings.hxx" #include "callbacks.hxx" #include "attriblistmerge.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "eventimport.hxx" #include #include "formenums.hxx" diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index 0c2431590b63..fbd1ae5399f7 100644 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "formattributes.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/forms/formevents.cxx b/xmloff/source/forms/formevents.cxx index de18ef25e5da..6f462ec12c41 100644 --- a/xmloff/source/forms/formevents.cxx +++ b/xmloff/source/forms/formevents.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "formevents.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include //......................................................................... diff --git a/xmloff/source/forms/formlayerexport.cxx b/xmloff/source/forms/formlayerexport.cxx index 65a383d78f61..f2968b76b350 100644 --- a/xmloff/source/forms/formlayerexport.cxx +++ b/xmloff/source/forms/formlayerexport.cxx @@ -35,7 +35,7 @@ #include #include "strings.hxx" #include "elementexport.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "layerexport.hxx" #include "propertyexport.hxx" diff --git a/xmloff/source/forms/formsimp.cxx b/xmloff/source/forms/formsimp.cxx index 0c8a3057691b..9021caabeec8 100644 --- a/xmloff/source/forms/formsimp.cxx +++ b/xmloff/source/forms/formsimp.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #ifndef _XMLOFF_ANIMIMP_HXX diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index 412715cda8ac..a9714d9956ec 100644 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.cxx @@ -36,7 +36,7 @@ #include "strings.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include @@ -57,7 +57,7 @@ #include #include "formevents.hxx" #include -#include "xformsexport.hxx" +#include "xmloff/xformsexport.hxx" /** === begin UNO includes === **/ #include diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index 9172686511bf..0d844c1c9d3b 100644 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -61,9 +61,9 @@ #include "controlpropertymap.hxx" #include "formevents.hxx" #include "formcellbinding.hxx" -#include "xformsimport.hxx" +#include "xmloff/xformsimport.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index 3b9416233bd8..c0fa44afba12 100644 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -33,7 +33,7 @@ #include "officeforms.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 8de379cda368..aba0f1518958 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -35,7 +35,7 @@ #include "propertyexport.hxx" #include #include "strings.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 324d340ba701..4691d34cfad4 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -37,7 +37,7 @@ #include #include #include "callbacks.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index 996e75d0f740..df487b751d4a 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -48,7 +48,7 @@ //#endif #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx index 9d11645ce830..75443edaea27 100644 --- a/xmloff/source/meta/MetaImportComponent.cxx +++ b/xmloff/source/meta/MetaImportComponent.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include "MetaImportComponent.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index a124a7c016d1..054485cad600 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index c903cf2dc1ba..a7257b871139 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" using ::rtl::OUString; diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index c39dda6d4e18..b36086a0c42c 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.cxx @@ -46,7 +46,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx index 8fb03483e405..6e1b27055c26 100644 --- a/xmloff/source/script/XMLEventImportHelper.cxx +++ b/xmloff/source/script/XMLEventImportHelper.cxx @@ -37,8 +37,8 @@ #include #include #include -#include "xmlnmspe.hxx" -#include "xmlerror.hxx" +#include "xmloff/xmlnmspe.hxx" +#include "xmloff/xmlerror.hxx" using ::rtl::OUString; using ::com::sun::star::xml::sax::XAttributeList; diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx index a8b5d7a2455e..1625330b77e1 100644 --- a/xmloff/source/script/XMLEventsImportContext.cxx +++ b/xmloff/source/script/XMLEventsImportContext.cxx @@ -42,9 +42,9 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" using namespace ::com::sun::star::uno; using namespace ::xmloff::token; diff --git a/xmloff/source/script/XMLScriptContextFactory.cxx b/xmloff/source/script/XMLScriptContextFactory.cxx index 0b592df9c419..81a6a2c5984b 100644 --- a/xmloff/source/script/XMLScriptContextFactory.cxx +++ b/xmloff/source/script/XMLScriptContextFactory.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx index 3e54038af622..277c665e03e2 100644 --- a/xmloff/source/script/XMLScriptExportHandler.cxx +++ b/xmloff/source/script/XMLScriptExportHandler.cxx @@ -39,7 +39,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" using namespace ::com::sun::star::uno; diff --git a/xmloff/source/script/XMLStarBasicContextFactory.cxx b/xmloff/source/script/XMLStarBasicContextFactory.cxx index a4bfb8bdff2d..00f34a4aef8f 100644 --- a/xmloff/source/script/XMLStarBasicContextFactory.cxx +++ b/xmloff/source/script/XMLStarBasicContextFactory.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx index fa2491def98a..18e6d7ca1037 100644 --- a/xmloff/source/script/XMLStarBasicExportHandler.cxx +++ b/xmloff/source/script/XMLStarBasicExportHandler.cxx @@ -39,7 +39,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" using namespace ::com::sun::star::uno; diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx index 85fe076f0446..0e9850e4e3a7 100644 --- a/xmloff/source/script/xmlscripti.cxx +++ b/xmloff/source/script/xmlscripti.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx index f3a40e1b04e4..9532c2b05fc6 100644 --- a/xmloff/source/style/DashStyle.cxx +++ b/xmloff/source/style/DashStyle.cxx @@ -32,11 +32,11 @@ #include "precompiled_xmloff.hxx" #include #include -#include "DashStyle.hxx" +#include "xmloff/DashStyle.hxx" #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx index 970ed5f5a92b..6d26bced807f 100644 --- a/xmloff/source/style/FillStyleContext.cxx +++ b/xmloff/source/style/FillStyleContext.cxx @@ -33,15 +33,15 @@ #include #include "FillStyleContext.hxx" #include -#include "GradientStyle.hxx" -#include "HatchStyle.hxx" -#include "ImageStyle.hxx" +#include "xmloff/GradientStyle.hxx" +#include "xmloff/HatchStyle.hxx" +#include "xmloff/ImageStyle.hxx" #include "TransGradientStyle.hxx" -#include "MarkerStyle.hxx" -#include "DashStyle.hxx" +#include "xmloff/MarkerStyle.hxx" +#include "xmloff/DashStyle.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include using namespace ::com::sun::star; diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx index fc3f199f9c50..b737b051083a 100644 --- a/xmloff/source/style/GradientStyle.cxx +++ b/xmloff/source/style/GradientStyle.cxx @@ -30,12 +30,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "GradientStyle.hxx" +#include "xmloff/GradientStyle.hxx" #include #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx index ac40a6ee4c10..8ec80d79a5e2 100644 --- a/xmloff/source/style/HatchStyle.cxx +++ b/xmloff/source/style/HatchStyle.cxx @@ -30,11 +30,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "HatchStyle.hxx" +#include "xmloff/HatchStyle.hxx" #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx index dfae79a1a07d..6ed0aee1c43a 100644 --- a/xmloff/source/style/ImageStyle.cxx +++ b/xmloff/source/style/ImageStyle.cxx @@ -30,12 +30,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "ImageStyle.hxx" +#include "xmloff/ImageStyle.hxx" #include #include #include #include -#include"xmlnmspe.hxx" +#include"xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx index ad7dcb6e1792..b5afcfe2899a 100644 --- a/xmloff/source/style/MarkerStyle.cxx +++ b/xmloff/source/style/MarkerStyle.cxx @@ -30,12 +30,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "MarkerStyle.hxx" +#include "xmloff/MarkerStyle.hxx" #include "xexptran.hxx" #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/PageHeaderFooterContext.cxx b/xmloff/source/style/PageHeaderFooterContext.cxx index ce715d03850a..c91fc58086f5 100644 --- a/xmloff/source/style/PageHeaderFooterContext.cxx +++ b/xmloff/source/style/PageHeaderFooterContext.cxx @@ -39,7 +39,7 @@ #ifndef _XMLOFF_PAGEPHEADERFOOTERCONTEXT_HXX #include "PageHeaderFooterContext.hxx" #endif -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "PagePropertySetContext.hxx" diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx index cc9d42bb0cfd..95b34aa4554d 100644 --- a/xmloff/source/style/PageMasterImportContext.cxx +++ b/xmloff/source/style/PageMasterImportContext.cxx @@ -33,7 +33,7 @@ #include "PageMasterImportContext.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "PageMasterPropHdl.hxx" #include "PagePropertySetContext.hxx" diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx index 4b3bccf69680..8ef64063cddf 100644 --- a/xmloff/source/style/PageMasterStyleMap.cxx +++ b/xmloff/source/style/PageMasterStyleMap.cxx @@ -34,7 +34,7 @@ #ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include #endif -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include using namespace ::xmloff::token; diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx index 297440bcc5eb..e8440e3fa08e 100644 --- a/xmloff/source/style/TransGradientStyle.cxx +++ b/xmloff/source/style/TransGradientStyle.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/VisAreaContext.cxx b/xmloff/source/style/VisAreaContext.cxx index c6f589406738..230faf0b9a55 100644 --- a/xmloff/source/style/VisAreaContext.cxx +++ b/xmloff/source/style/VisAreaContext.cxx @@ -35,9 +35,9 @@ // INCLUDE --------------------------------------------------------------- -#include "VisAreaContext.hxx" +#include "xmloff/VisAreaContext.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/VisAreaExport.cxx b/xmloff/source/style/VisAreaExport.cxx index 979a5364b93c..38a709299cdf 100644 --- a/xmloff/source/style/VisAreaExport.cxx +++ b/xmloff/source/style/VisAreaExport.cxx @@ -31,9 +31,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include -#include "VisAreaExport.hxx" +#include "xmloff/VisAreaExport.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/WordWrapPropertyHdl.cxx b/xmloff/source/style/WordWrapPropertyHdl.cxx index 128efe4a2a8b..a14d83166f77 100644 --- a/xmloff/source/style/WordWrapPropertyHdl.cxx +++ b/xmloff/source/style/WordWrapPropertyHdl.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include #include -#include "xmlkywd.hxx" +#include "xmloff/xmlkywd.hxx" #include #include #include diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx index e240aa7fcb95..e6aa1a567785 100644 --- a/xmloff/source/style/XMLBackgroundImageContext.cxx +++ b/xmloff/source/style/XMLBackgroundImageContext.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/XMLBackgroundImageExport.cxx b/xmloff/source/style/XMLBackgroundImageExport.cxx index 3c3908ef3243..70eaf32c4aff 100644 --- a/xmloff/source/style/XMLBackgroundImageExport.cxx +++ b/xmloff/source/style/XMLBackgroundImageExport.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include -#include +#include #include #include #include diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx index b5e61e886f0a..e01f763113c8 100644 --- a/xmloff/source/style/XMLClipPropertyHandler.cxx +++ b/xmloff/source/style/XMLClipPropertyHandler.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include using ::rtl::OUString; diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index a5c662ef33a7..54a2f0f3d895 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -33,7 +33,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index 4de58bbf232e..5793b504182b 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -38,7 +38,7 @@ #include #endif #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" diff --git a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx index a59708ab8055..4ba98dee3505 100644 --- a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx +++ b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx @@ -33,7 +33,7 @@ #include "XMLFootnoteSeparatorExport.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx index 4e4c61caeed2..1a074fe9da0f 100644 --- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx +++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 8b41be1ef99b..57fd9a2b18c1 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx index 946b613473db..20d8a147fba0 100644 --- a/xmloff/source/style/impastp4.cxx +++ b/xmloff/source/style/impastp4.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "impastpl.hxx" #include diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index c75207d9e094..64234eea3fbf 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -31,10 +31,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "numehelp.hxx" +#include "xmloff/numehelp.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index 20aa552886f9..8ed1ba1ce4a0 100644 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -36,7 +36,7 @@ #ifndef __SGI_STL_SET #include #endif -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include @@ -52,7 +52,7 @@ #include #endif #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index f03c0ac9a78b..c83f99cc10b0 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -36,13 +36,13 @@ #include #endif #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #ifndef _XMLOFF_XMLITMAP_HXX //#include "xmlitmap.hxx" #endif #include -#include "xmlkywd.hxx" +#include "xmloff/xmlkywd.hxx" #include #include #include diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index 32c53ceb724a..51da6b94850f 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -37,10 +37,10 @@ #include "impastpl.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include -#include "XMLTextListAutoStylePool.hxx" +#include "xmloff/XMLTextListAutoStylePool.hxx" #ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index 05d85e74d1a7..8fccb1aa650e 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -46,7 +46,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 71ac9c5aac4c..5b923ab7cf7d 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -43,11 +43,11 @@ #include #include -#include "xmlkywd.hxx" -#include "unoatrcn.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlkywd.hxx" +#include "xmloff/unoatrcn.hxx" +#include "xmloff/xmlnmspe.hxx" #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include "xmloff/contextid.hxx" diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 7233c0f7da8f..967140965523 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -33,7 +33,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX @@ -55,7 +55,7 @@ // <-- #include #include -#include "XMLTextListAutoStylePool.hxx" +#include "xmloff/XMLTextListAutoStylePool.hxx" #include #include #include diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index aa5aa2315c3e..3f76bd5468fe 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -52,7 +52,7 @@ #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 89b300bd0bc0..bd11efa9d8f6 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -48,7 +48,7 @@ #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 66f10e7274c6..16c8fd79afce 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -37,7 +37,7 @@ #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include @@ -56,7 +56,7 @@ #include #include -#include "i18nmap.hxx" +#include "xmloff/i18nmap.hxx" #include #ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 17a7c0206988..adc25c22a72b 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -49,7 +49,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #ifndef _XMLOFF_FAMILIES_HXX diff --git a/xmloff/source/style/xmltabe.cxx b/xmloff/source/style/xmltabe.cxx index 3cf20f3420f5..05495c23af7e 100644 --- a/xmloff/source/style/xmltabe.cxx +++ b/xmloff/source/style/xmltabe.cxx @@ -36,11 +36,11 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include -#include "xmltabe.hxx" +#include "xmloff/xmltabe.hxx" using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx index 4f7672289523..6cd55e56362b 100644 --- a/xmloff/source/style/xmltabi.cxx +++ b/xmloff/source/style/xmltabi.cxx @@ -34,11 +34,11 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include -#include "i18nmap.hxx" +#include "xmloff/i18nmap.hxx" #include #include "xmltabi.hxx" diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index de930d6dd288..6f2f867a0c77 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -50,7 +50,7 @@ #include #include "xmloff/table/XMLTableExport.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index 1120b26b9407..5941e4c6aea5 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -51,7 +51,7 @@ #include "xmloff/prstylei.hxx" #include "xmloff/xmlimp.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "table.hxx" #include diff --git a/xmloff/source/table/tabledesignsimporter.cxx b/xmloff/source/table/tabledesignsimporter.cxx deleted file mode 100644 index 17f224dc0f3e..000000000000 --- a/xmloff/source/table/tabledesignsimporter.cxx +++ /dev/null @@ -1,106 +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: tabledesignsimporter.cxx,v $ - * $Revision: 1.3 $ - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmloff.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "xmloff/table/XMLTableImport.hxx" -#include "xmloff/xmltkmap.hxx" -#include "xmloff/maptype.hxx" -#include "xmloff/xmlprmap.hxx" -#include "xmloff/txtimp.hxx" -#include "xmloff/xmlimp.hxx" -#include "xmloff/nmspmap.hxx" -#include "xmloff/xmlstyle.hxx" -#include "xmloff/prstylei.hxx" -#include "xmloff/xmlimp.hxx" - -#include "xmlnmspe.hxx" -#include "table.hxx" - -#include - -// -------------------------------------------------------------------- - -using ::rtl::OUString; -using namespace ::xmloff::token; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::table; -using namespace ::com::sun::star::xml::sax; -using namespace ::com::sun::star::text; -using namespace ::com::sun::star::style; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::container; - -// -------------------------------------------------------------------- - -class TabelDesignsImporter : public SvXMLImport -{ - TabelDesignsImporter( const Reference< XMultiServiceFactory > & rSMgr ); - ~TabelDesignsImporter() throw (); - - SvXMLImportContext* CreateContext(USHORT nPrefix, const OUString& rLocalName, const Reference& xAttrList); -} - -// -------------------------------------------------------------------- - -TabelDesignsImporter::TabelDesignsImporter( const Reference< XMultiServiceFactory > & rSMgr ) -: SvXMLImport( rSMgr, true ) -{ - // add namespaces - GetNamespaceMap().Add( - GetXMLToken(XML_NP_PRESENTATION), - GetXMLToken(XML_N_PRESENTATION), - XML_NAMESPACE_PRESENTATION); -} - -// -------------------------------------------------------------------- - -TabelDesignsImporter::~TabelDesignsImporter() -{ -} - -// -------------------------------------------------------------------- - -SvXMLImportContext* TabelDesignsImporter::CreateContext(USHORT nPrefix, const OUString& rLocalName, const Reference& xAttrList) -{ -} - -// -------------------------------------------------------------------- diff --git a/xmloff/source/text/XMLAutoMarkFileContext.cxx b/xmloff/source/text/XMLAutoMarkFileContext.cxx index 10cf12f19839..a08198e89d31 100644 --- a/xmloff/source/text/XMLAutoMarkFileContext.cxx +++ b/xmloff/source/text/XMLAutoMarkFileContext.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx b/xmloff/source/text/XMLAutoTextContainerEventImport.cxx index 4d5230657c60..128f8fdbb6f5 100644 --- a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx +++ b/xmloff/source/text/XMLAutoTextContainerEventImport.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx index 8e7e5c4a9902..70a902ef0005 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.cxx +++ b/xmloff/source/text/XMLAutoTextEventExport.cxx @@ -49,7 +49,7 @@ //#include //#endif #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx index 11c391e2014d..44f336c83823 100644 --- a/xmloff/source/text/XMLAutoTextEventImport.cxx +++ b/xmloff/source/text/XMLAutoTextEventImport.cxx @@ -37,7 +37,7 @@ #include #include #include "XMLAutoTextContainerEventImport.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLCalculationSettingsContext.cxx b/xmloff/source/text/XMLCalculationSettingsContext.cxx index f031ea7ae34d..81acfd85d9b3 100644 --- a/xmloff/source/text/XMLCalculationSettingsContext.cxx +++ b/xmloff/source/text/XMLCalculationSettingsContext.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLChangeElementImportContext.cxx b/xmloff/source/text/XMLChangeElementImportContext.cxx index 98db2159a798..2e18ca8b9423 100644 --- a/xmloff/source/text/XMLChangeElementImportContext.cxx +++ b/xmloff/source/text/XMLChangeElementImportContext.cxx @@ -35,7 +35,7 @@ #include "XMLChangeInfoContext.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include diff --git a/xmloff/source/text/XMLChangeImportContext.cxx b/xmloff/source/text/XMLChangeImportContext.cxx index 594e28a26a29..0fb62c609e47 100644 --- a/xmloff/source/text/XMLChangeImportContext.cxx +++ b/xmloff/source/text/XMLChangeImportContext.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLChangeInfoContext.cxx b/xmloff/source/text/XMLChangeInfoContext.cxx index 7f19e4f9a7ce..4aae37a1ebde 100644 --- a/xmloff/source/text/XMLChangeInfoContext.cxx +++ b/xmloff/source/text/XMLChangeInfoContext.cxx @@ -34,7 +34,7 @@ #include "XMLChangedRegionImportContext.hxx" #include "XMLStringBufferImportContext.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx index 220f235d9ddd..75f8ffc07266 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.cxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx b/xmloff/source/text/XMLFootnoteBodyImportContext.cxx index 6a8028cf080e..27b79c7e3eae 100644 --- a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteBodyImportContext.cxx @@ -39,7 +39,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include using ::rtl::OUString; diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 96b468a5faed..0d5400d8f417 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #ifndef _XMLOFF_FAMILIES_HXX diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx index d434ac8272f0..44f24d667a9a 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteImportContext.cxx @@ -39,7 +39,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "XMLFootnoteBodyImportContext.hxx" diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx index 6d9eb1935a9a..a2e6c0dcd863 100644 --- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx +++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx @@ -41,7 +41,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx index bc9ef8caf014..cc5cdfae9c9b 100644 --- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx index c2f5793da0ae..53e38c962229 100644 --- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx b/xmloff/source/text/XMLIndexBibliographySourceContext.cxx index 21f535266e64..d70ff3859b02 100644 --- a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographySourceContext.cxx @@ -41,7 +41,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx index d5d0282934a6..2d8dce9d429e 100644 --- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx +++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx index 2d8b590128e3..aa992ff4ef79 100644 --- a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx +++ b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx index 7748b115267e..b5783ab3d5d4 100644 --- a/xmloff/source/text/XMLIndexMarkExport.cxx +++ b/xmloff/source/text/XMLIndexMarkExport.cxx @@ -37,7 +37,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.cxx b/xmloff/source/text/XMLIndexObjectSourceContext.cxx index f4d086934c8f..f5695670ab17 100644 --- a/xmloff/source/text/XMLIndexObjectSourceContext.cxx +++ b/xmloff/source/text/XMLIndexObjectSourceContext.cxx @@ -41,7 +41,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx index ccc2ff2a2404..cfb134aea21f 100644 --- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx +++ b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx index a36fcd6d51e2..c5a04887cb50 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx @@ -41,7 +41,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 9c206ad95430..5ba902f26ec1 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -52,11 +52,11 @@ #include #include #include -#include "xmlnmspe.hxx" -#include "xmlkywd.hxx" +#include "xmloff/xmlnmspe.hxx" +#include "xmloff/xmlkywd.hxx" #include #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx index 223909171f8f..4d5d3952a113 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx @@ -41,7 +41,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx index 0a9ec589b749..5d539752fcc1 100644 --- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx +++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx index c2b98a04fed0..8bbb372f3f40 100644 --- a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx +++ b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx index 4bc66046cd3d..3de71c7e1529 100644 --- a/xmloff/source/text/XMLIndexTableSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx @@ -45,7 +45,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx index cf7c2fcb51bc..32fbf8f882bc 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTemplateContext.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx index 3ad3fa055e1b..2d88d35feb75 100644 --- a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx index 84feac2539b5..afe6b614bc35 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.cxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx @@ -41,7 +41,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLLineNumberingExport.cxx b/xmloff/source/text/XMLLineNumberingExport.cxx index d337a3820d7e..39da2e0d304c 100644 --- a/xmloff/source/text/XMLLineNumberingExport.cxx +++ b/xmloff/source/text/XMLLineNumberingExport.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx index 887fc8f7ad66..245a050633dc 100644 --- a/xmloff/source/text/XMLLineNumberingImportContext.cxx +++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx b/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx index 3593427c88a1..9c267a112d5c 100644 --- a/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx +++ b/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx @@ -34,7 +34,7 @@ #include "XMLLineNumberingImportContext.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index 2cb0f24eab2a..cfd94d6fea81 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -45,7 +45,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index e80109ff53f0..763e72c19913 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -56,9 +56,9 @@ #include #include #include //i90246 -#include "xmlkywd.hxx" +#include "xmloff/xmlkywd.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx index b34e9bf288bb..489b59dc135f 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx @@ -40,7 +40,7 @@ #include #endif #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx index 83d04cef8ea9..15437ea1aa04 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index 443aa15dc77c..a73449fea096 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -37,7 +37,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx index 374915dd5bed..2e470733f8e5 100644 --- a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx +++ b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx @@ -37,7 +37,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLSectionSourceImportContext.cxx b/xmloff/source/text/XMLSectionSourceImportContext.cxx index 7722fa9d2918..84ac62d3ad18 100644 --- a/xmloff/source/text/XMLSectionSourceImportContext.cxx +++ b/xmloff/source/text/XMLSectionSourceImportContext.cxx @@ -37,7 +37,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLStringBufferImportContext.cxx b/xmloff/source/text/XMLStringBufferImportContext.cxx index e9b3c3ca0658..e3d10c8272dd 100644 --- a/xmloff/source/text/XMLStringBufferImportContext.cxx +++ b/xmloff/source/text/XMLStringBufferImportContext.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include "XMLStringBufferImportContext.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" using ::rtl::OUString; diff --git a/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx b/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx index c674d67553fb..ee81ef9d8f84 100644 --- a/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx +++ b/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "XMLTextCharStyleNamesElementExport.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index eeea34ce1cae..5ac8584e6d48 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "XMLTextColumnsContext.hxx" diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx index dc6ae4a63d5c..0dd43ec02b39 100644 --- a/xmloff/source/text/XMLTextColumnsExport.cxx +++ b/xmloff/source/text/XMLTextColumnsExport.cxx @@ -41,7 +41,7 @@ #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "XMLTextColumnsExport.hxx" diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index c3ff9abebd90..49d7a292d0c6 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -45,8 +45,8 @@ #include #include #include -#include "xmlnmspe.hxx" -#include "xmlkywd.hxx" +#include "xmloff/xmlnmspe.hxx" +#include "xmloff/xmlkywd.hxx" #include #include #include "XMLAnchorTypePropHdl.hxx" @@ -54,7 +54,7 @@ #include #include "XMLReplacementImageContext.hxx" #include -#include "i18nmap.hxx" +#include "xmloff/i18nmap.hxx" #include "xexptran.hxx" #include #include diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx index c0d82731a259..e3b81999ae5c 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "XMLTextFrameContext.hxx" diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index b1276099ca9d..de0f4294eb9c 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx @@ -33,7 +33,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "XMLTextHeaderFooterContext.hxx" #ifndef _XMLOFF_TEXTTABLECONTEXT_HXX_ #include diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx index 509459b96880..d55037600a19 100644 --- a/xmloff/source/text/XMLTextListAutoStylePool.cxx +++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx @@ -37,7 +37,7 @@ #include #include #include -#include "XMLTextListAutoStylePool.hxx" +#include "xmloff/XMLTextListAutoStylePool.hxx" #include using ::rtl::OUString; diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx index 266a32a702ec..1dd2a89f9668 100644 --- a/xmloff/source/text/XMLTextListBlockContext.cxx +++ b/xmloff/source/text/XMLTextListBlockContext.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "XMLTextListItemContext.hxx" #include "XMLTextListBlockContext.hxx" diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx index 2acb8da65003..f960d8de618b 100644 --- a/xmloff/source/text/XMLTextListItemContext.cxx +++ b/xmloff/source/text/XMLTextListItemContext.cxx @@ -33,7 +33,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "txtparai.hxx" #include "txtlists.hxx" diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index 5e6f47ed5b6a..874989114b58 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -41,7 +41,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx index d27672bc1240..11dd196593c3 100644 --- a/xmloff/source/text/XMLTextMasterPageContext.cxx +++ b/xmloff/source/text/XMLTextMasterPageContext.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "XMLTextHeaderFooterContext.hxx" diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx index d309080ef073..4d883993a28b 100644 --- a/xmloff/source/text/XMLTextMasterPageExport.cxx +++ b/xmloff/source/text/XMLTextMasterPageExport.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/XMLTextMasterStylesContext.cxx b/xmloff/source/text/XMLTextMasterStylesContext.cxx index 07592452fee1..3451c71260fd 100644 --- a/xmloff/source/text/XMLTextMasterStylesContext.cxx +++ b/xmloff/source/text/XMLTextMasterStylesContext.cxx @@ -34,7 +34,7 @@ #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx index 30895a5edce6..e823c6f3390e 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.cxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx @@ -39,7 +39,7 @@ #include #include "XMLTextNumRuleInfo.hxx" // --> OD 2008-04-25 #refactorlists# -#include "XMLTextListAutoStylePool.hxx" +#include "xmloff/XMLTextListAutoStylePool.hxx" // <-- using ::rtl::OUString; diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx index 66121c1eb233..5b525e114488 100644 --- a/xmloff/source/text/XMLTextShapeImportHelper.cxx +++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx @@ -44,7 +44,7 @@ #include "XMLAnchorTypePropHdl.hxx" #include #include -#include "XMLTextShapeImportHelper.hxx" +#include "xmloff/XMLTextShapeImportHelper.hxx" using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx index d4c95188ad8c..dd190a69db1b 100644 --- a/xmloff/source/text/XMLTextShapeStyleContext.cxx +++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx @@ -34,7 +34,7 @@ #ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP #include #endif -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "XMLTextPropertySetContext.hxx" #include diff --git a/xmloff/source/text/XMLTrackedChangesImportContext.cxx b/xmloff/source/text/XMLTrackedChangesImportContext.cxx index 946803c3b8c2..2850bd164b27 100644 --- a/xmloff/source/text/XMLTrackedChangesImportContext.cxx +++ b/xmloff/source/text/XMLTrackedChangesImportContext.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/txtdrope.cxx b/xmloff/source/text/txtdrope.cxx index 33446ec1717a..f849850759a5 100644 --- a/xmloff/source/text/txtdrope.cxx +++ b/xmloff/source/text/txtdrope.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "txtdrope.hxx" using namespace ::com::sun::star; diff --git a/xmloff/source/text/txtdropi.cxx b/xmloff/source/text/txtdropi.cxx index cb88f5f8bb9d..085cac855c68 100644 --- a/xmloff/source/text/txtdropi.cxx +++ b/xmloff/source/text/txtdropi.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index 2d8268fc09ab..189ee32e32d7 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.cxx @@ -35,18 +35,10 @@ #include #include #include -#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP #include -#endif -#ifndef _COM_SUN_STAR_AWT_FONTFAMILY_HPP #include -#endif -#ifndef _COM_SUN_STAR_AWT_FONTPITCH_HPP #include -#endif -#ifndef _COM_SUN_STAR_AWT_FONTUNDERLINE_HPP #include -#endif #include #include "txtexppr.hxx" #include diff --git a/xmloff/source/text/txtexppr.hxx b/xmloff/source/text/txtexppr.hxx index 49eea04c0997..0d06a12454c9 100644 --- a/xmloff/source/text/txtexppr.hxx +++ b/xmloff/source/text/txtexppr.hxx @@ -6,7 +6,7 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtexppr.hxx,v $ + * $RCSfile: xmloff/txtexppr.hxx,v $ * $Revision: 1.8 $ * * This file is part of OpenOffice.org. @@ -33,7 +33,7 @@ #include #include "txtdrope.hxx" -#include "xmltabe.hxx" +#include "xmloff/xmltabe.hxx" #include "XMLTextColumnsExport.hxx" #ifndef _XMLOFF_XMLBACKGROUNDIMAGEEXPORT_HXX #include "XMLBackgroundImageExport.hxx" diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 05d3694462be..a45c6237890d 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "numehelp.hxx" +#include "xmloff/numehelp.hxx" #include #include diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index f6f768312a94..2cccc5f6f37e 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -41,7 +41,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx index efb3b87585ee..c3a3c12efbc7 100644 --- a/xmloff/source/text/txtftne.cxx +++ b/xmloff/source/text/txtftne.cxx @@ -54,7 +54,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index af20bfbb23dc..271f99c1b7c6 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -54,7 +54,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include @@ -63,10 +63,10 @@ #include "txtparai.hxx" #include #include -#include "txtimppr.hxx" +#include "xmloff/txtimppr.hxx" #include #include "txtvfldi.hxx" -#include "i18nmap.hxx" +#include "xmloff/i18nmap.hxx" #include "XMLTextListItemContext.hxx" #include "XMLTextListBlockContext.hxx" #include "XMLTextFrameContext.hxx" diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 4dca73940dba..40805b268aa1 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.cxx @@ -40,7 +40,7 @@ #include #include #include -#include "txtimppr.hxx" +#include "xmloff/txtimppr.hxx" #define XML_LINE_LEFT 0 #define XML_LINE_RIGHT 1 diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index f07d8a89c5ef..e9c27f1120b3 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -93,8 +93,8 @@ #include #include #include -#include "xmlkywd.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlkywd.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include "txtexppr.hxx" @@ -110,7 +110,7 @@ #include #include "XMLImageMapExport.hxx" #include "XMLTextNumRuleInfo.hxx" -#include "XMLTextListAutoStylePool.hxx" +#include "xmloff/XMLTextListAutoStylePool.hxx" #include #include "XMLSectionExport.hxx" #include "XMLIndexMarkExport.hxx" diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index aaac42d14597..fba4eaa603c8 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -52,7 +52,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "txtparai.hxx" #include "txtfldi.hxx" diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index c82e4d09e271..028cc8ecf121 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #ifndef _XMLOFF_TXTPRHDL_HXX #include "txtprhdl.hxx" diff --git a/xmloff/source/text/txtsecte.cxx b/xmloff/source/text/txtsecte.cxx index bd05aa4ba2ac..dc473be281a8 100644 --- a/xmloff/source/text/txtsecte.cxx +++ b/xmloff/source/text/txtsecte.cxx @@ -53,7 +53,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include #include diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx index 2321305deeda..e4e44d29e121 100644 --- a/xmloff/source/text/txtstyle.cxx +++ b/xmloff/source/text/txtstyle.cxx @@ -31,47 +31,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _TOOLS_DEBUG_HXX -//#include -#endif #include #include #include #include #include - - #include - -#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX -//#include -#endif -#ifndef _XMLOFF_XMLSMSPE_HXX -#include "xmlnmspe.hxx" -#endif -#ifndef _XMLOFF_FAMILIES_HXX +#include "xmloff/xmlnmspe.hxx" #include -#endif -#ifndef _XMLOFF_TXTPRMAP_HXX -//#include -#endif -#ifndef _XMLOFF_TXTPARAE_HXX #include -#endif #include #include -#ifndef _XMLOFF_XMLSECTIONEXPORT_HXX #include "XMLSectionExport.hxx" -#endif #include "XMLLineNumberingExport.hxx" #include "txtexppr.hxx" -#ifndef _XMLOFF_TXTPRMAP_HXX #include -#endif - -#ifndef _XMLOFF_STYLEEXP_HXX -//#include -#endif using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 2d3d1620afe1..b1265c8c919a 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include "XMLTextPropertySetContext.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "xmloff/XMLEventsImportContext.hxx" #include "xmloff/attrlist.hxx" #include "xmloff/families.hxx" diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index cf9d61c85127..1005294d1d86 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -39,9 +39,9 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include -#include "i18nmap.hxx" +#include "xmloff/i18nmap.hxx" #include #include #include diff --git a/xmloff/source/transform/ChartOASISTContext.cxx b/xmloff/source/transform/ChartOASISTContext.cxx index a471e0388bd1..3f945655098d 100644 --- a/xmloff/source/transform/ChartOASISTContext.cxx +++ b/xmloff/source/transform/ChartOASISTContext.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include "ChartOASISTContext.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" diff --git a/xmloff/source/transform/ChartOOoTContext.cxx b/xmloff/source/transform/ChartOOoTContext.cxx index 7bdc786d0daf..473bf7befb0d 100644 --- a/xmloff/source/transform/ChartOOoTContext.cxx +++ b/xmloff/source/transform/ChartOOoTContext.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include "ChartOOoTContext.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #ifndef _XMLOFF_ACTIONMAPTYPESOOo_HXX #include "ActionMapTypesOOo.hxx" #endif diff --git a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx index 7478c0e32dab..c29c7c64b439 100644 --- a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx +++ b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx @@ -33,7 +33,7 @@ #include "ChartPlotAreaOASISTContext.hxx" #include "TransformerBase.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "DeepTContext.hxx" #include "ActionMapTypesOASIS.hxx" diff --git a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx index f863d9baf672..9e20cbf82362 100644 --- a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx +++ b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx @@ -33,7 +33,7 @@ #include "ChartPlotAreaOOoTContext.hxx" #include "TransformerBase.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "DeepTContext.hxx" #include "ActionMapTypesOOo.hxx" diff --git a/xmloff/source/transform/ControlOASISTContext.cxx b/xmloff/source/transform/ControlOASISTContext.cxx index 1d46a3b7356f..a355ae7ccab6 100644 --- a/xmloff/source/transform/ControlOASISTContext.cxx +++ b/xmloff/source/transform/ControlOASISTContext.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" diff --git a/xmloff/source/transform/ControlOOoTContext.cxx b/xmloff/source/transform/ControlOOoTContext.cxx index 508913167e32..f82a46c6850d 100644 --- a/xmloff/source/transform/ControlOOoTContext.cxx +++ b/xmloff/source/transform/ControlOOoTContext.cxx @@ -33,7 +33,7 @@ #include "ControlOOoTContext.hxx" #include "IgnoreTContext.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "ActionMapTypesOOo.hxx" #include "ElemTransformerAction.hxx" #include "TransformerActions.hxx" diff --git a/xmloff/source/transform/DlgOASISTContext.cxx b/xmloff/source/transform/DlgOASISTContext.cxx index ff2cad0ee064..397a2871bf6a 100644 --- a/xmloff/source/transform/DlgOASISTContext.cxx +++ b/xmloff/source/transform/DlgOASISTContext.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include "DlgOASISTContext.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" diff --git a/xmloff/source/transform/DocumentTContext.cxx b/xmloff/source/transform/DocumentTContext.cxx index efd7d109bd45..a38d1248d7dd 100644 --- a/xmloff/source/transform/DocumentTContext.cxx +++ b/xmloff/source/transform/DocumentTContext.cxx @@ -37,7 +37,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #ifndef _XMLOFF_TRANSFOERMERBASE_HXX #include "TransformerBase.hxx" diff --git a/xmloff/source/transform/EventMap.cxx b/xmloff/source/transform/EventMap.cxx index 3316b8f3d0d6..bfc90ac23d2a 100644 --- a/xmloff/source/transform/EventMap.cxx +++ b/xmloff/source/transform/EventMap.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "EventMap.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" XMLTransformerEventMapEntry aTransformerEventMap[] = diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx index 6f65977a6d7c..6c5edcfcb5b2 100644 --- a/xmloff/source/transform/EventOASISTContext.cxx +++ b/xmloff/source/transform/EventOASISTContext.cxx @@ -33,7 +33,7 @@ #include "EventOASISTContext.hxx" #include "EventMap.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx index d9735eb24598..1a7e482d001c 100644 --- a/xmloff/source/transform/EventOOoTContext.cxx +++ b/xmloff/source/transform/EventOOoTContext.cxx @@ -33,7 +33,7 @@ #include "EventOOoTContext.hxx" #include "EventMap.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #ifndef _XMLOFF_ACTIONMAPTYPESOOo_HXX #include "ActionMapTypesOOo.hxx" #endif diff --git a/xmloff/source/transform/FormPropOASISTContext.cxx b/xmloff/source/transform/FormPropOASISTContext.cxx index 50b59a39a04b..aed354d68004 100644 --- a/xmloff/source/transform/FormPropOASISTContext.cxx +++ b/xmloff/source/transform/FormPropOASISTContext.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" diff --git a/xmloff/source/transform/FormPropOOoTContext.cxx b/xmloff/source/transform/FormPropOOoTContext.cxx index 5a1ebbc659f5..01182041635e 100644 --- a/xmloff/source/transform/FormPropOOoTContext.cxx +++ b/xmloff/source/transform/FormPropOOoTContext.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "IgnoreTContext.hxx" #ifndef _XMLOFF_ACTIONMAPTYPESOOo_HXX diff --git a/xmloff/source/transform/FrameOASISTContext.cxx b/xmloff/source/transform/FrameOASISTContext.cxx index 00fadcb5ffe7..3d870ec9f776 100644 --- a/xmloff/source/transform/FrameOASISTContext.cxx +++ b/xmloff/source/transform/FrameOASISTContext.cxx @@ -33,7 +33,7 @@ #include "FrameOASISTContext.hxx" #include "IgnoreTContext.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "ActionMapTypesOASIS.hxx" #include "ElemTransformerAction.hxx" #include "TransformerActions.hxx" diff --git a/xmloff/source/transform/FrameOOoTContext.cxx b/xmloff/source/transform/FrameOOoTContext.cxx index fcdf3593e316..d8bb53014620 100644 --- a/xmloff/source/transform/FrameOOoTContext.cxx +++ b/xmloff/source/transform/FrameOOoTContext.cxx @@ -33,7 +33,7 @@ #include "FrameOOoTContext.hxx" #include "IgnoreTContext.hxx" #include "MutableAttrList.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "ActionMapTypesOOo.hxx" #include "AttrTransformerAction.hxx" diff --git a/xmloff/source/transform/MergeElemTContext.cxx b/xmloff/source/transform/MergeElemTContext.cxx index eca877d5a784..1847ea2dadf1 100644 --- a/xmloff/source/transform/MergeElemTContext.cxx +++ b/xmloff/source/transform/MergeElemTContext.cxx @@ -39,7 +39,7 @@ #include "AttrTransformerAction.hxx" #include "ElemTransformerAction.hxx" #include "IgnoreTContext.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" using ::rtl::OUString; using namespace ::com::sun::star::uno; diff --git a/xmloff/source/transform/MetaTContext.cxx b/xmloff/source/transform/MetaTContext.cxx index 97af84460969..a5347707e6ad 100644 --- a/xmloff/source/transform/MetaTContext.cxx +++ b/xmloff/source/transform/MetaTContext.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #ifndef _XMLOFF_TRANSFOERMERBASE_HXX #include "TransformerBase.hxx" diff --git a/xmloff/source/transform/MetaTContext.hxx b/xmloff/source/transform/MetaTContext.hxx index e6ba9234d08b..92afca8bc2cf 100644 --- a/xmloff/source/transform/MetaTContext.hxx +++ b/xmloff/source/transform/MetaTContext.hxx @@ -32,7 +32,7 @@ #define _XMLOFF_METATCONTEXT_HXX #include -#include "functional.hxx" +#include "xmloff/functional.hxx" #include diff --git a/xmloff/source/transform/NotesTContext.cxx b/xmloff/source/transform/NotesTContext.cxx index 36f08f9da483..81b2303cc210 100644 --- a/xmloff/source/transform/NotesTContext.cxx +++ b/xmloff/source/transform/NotesTContext.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #ifndef _XMLOFF_TRANSFOERMERBASE_HXX #include "TransformerBase.hxx" diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 026c7eab0b1a..9bfa9b57870f 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "MutableAttrList.hxx" #include "DeepTContext.hxx" diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 5b3bd8e1e0c0..49f5d44f7c60 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "DeepTContext.hxx" #include "MetaTContext.hxx" diff --git a/xmloff/source/transform/PropertyActionsOASIS.cxx b/xmloff/source/transform/PropertyActionsOASIS.cxx index bd38e5c8a175..32e61ea3fcaf 100644 --- a/xmloff/source/transform/PropertyActionsOASIS.cxx +++ b/xmloff/source/transform/PropertyActionsOASIS.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "PropType.hxx" #include "FamilyType.hxx" #include "PropertyActionsOASIS.hxx" diff --git a/xmloff/source/transform/PropertyActionsOOo.cxx b/xmloff/source/transform/PropertyActionsOOo.cxx index d9da404b2d5f..4bf730923bc3 100644 --- a/xmloff/source/transform/PropertyActionsOOo.cxx +++ b/xmloff/source/transform/PropertyActionsOOo.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "PropType.hxx" #include "PropertyActionsOOo.hxx" diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index f7beac7cc12a..9a50501d1152 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -37,7 +37,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "PropType.hxx" #include "DeepTContext.hxx" #include "ProcAttrTContext.hxx" diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index d1941c18585b..0fd76051bb4b 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "PropType.hxx" #include "DeepTContext.hxx" #include "RenameElemTContext.hxx" diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 973b49274031..9e2d099c0169 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "IgnoreTContext.hxx" #include "RenameElemTContext.hxx" #include "ProcAttrTContext.hxx" diff --git a/xmloff/source/transform/XMLFilterRegistration.cxx b/xmloff/source/transform/XMLFilterRegistration.cxx index 4345a192970f..e734c3b4fe33 100644 --- a/xmloff/source/transform/XMLFilterRegistration.cxx +++ b/xmloff/source/transform/XMLFilterRegistration.cxx @@ -144,12 +144,12 @@ extern "C" { #endif -void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) +SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) { if( pRegistryKey ) { @@ -182,7 +182,7 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis return sal_True; } -void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = NULL; if( pServiceManager ) diff --git a/xmloff/source/xforms/SchemaContext.cxx b/xmloff/source/xforms/SchemaContext.cxx index 3ec2656b6e02..6e4538bb342a 100644 --- a/xmloff/source/xforms/SchemaContext.cxx +++ b/xmloff/source/xforms/SchemaContext.cxx @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx index bf3153451ff1..480858f10a77 100644 --- a/xmloff/source/xforms/SchemaRestrictionContext.cxx +++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx index cab6a4e01e91..6d7e4fe78afe 100644 --- a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx +++ b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx @@ -36,7 +36,7 @@ #include "SchemaRestrictionContext.hxx" #include #include -#include +#include #include #include diff --git a/xmloff/source/xforms/TokenContext.cxx b/xmloff/source/xforms/TokenContext.cxx index f8647a4243ac..58bff79970f8 100644 --- a/xmloff/source/xforms/TokenContext.cxx +++ b/xmloff/source/xforms/TokenContext.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx index e56f1424a769..b7c7f1b2b0aa 100644 --- a/xmloff/source/xforms/XFormsBindContext.cxx +++ b/xmloff/source/xforms/XFormsBindContext.cxx @@ -36,10 +36,10 @@ #include "xformsapi.hxx" #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx index 2f07fdef9ab3..4fdc05106b83 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.cxx +++ b/xmloff/source/xforms/XFormsInstanceContext.cxx @@ -44,10 +44,10 @@ #include #include -#include +#include #include #include -#include +#include #include diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx index aaa787c5cdb5..22e9e05df84e 100644 --- a/xmloff/source/xforms/XFormsModelContext.cxx +++ b/xmloff/source/xforms/XFormsModelContext.cxx @@ -40,10 +40,10 @@ #include "xformsapi.hxx" #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx index f2f15e3f4753..a9215531ca5c 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.cxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx @@ -36,10 +36,10 @@ #include "xformsapi.hxx" #include -#include "xmlerror.hxx" +#include "xmloff/xmlerror.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 8e6b6001dedf..44116633d010 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.cxx @@ -48,7 +48,7 @@ #include #include -#include +#include #include using rtl::OUString; diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 65334f45ae28..5eacea06c6cb 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -31,14 +31,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "xformsexport.hxx" +#include "xmloff/xformsexport.hxx" #include "XFormsModelExport.hxx" #include "xformsapi.hxx" #include #include -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include "DomExport.hxx" #include diff --git a/xmloff/source/xforms/xformsimport.cxx b/xmloff/source/xforms/xformsimport.cxx index efea53ded94a..6908c273d427 100644 --- a/xmloff/source/xforms/xformsimport.cxx +++ b/xmloff/source/xforms/xformsimport.cxx @@ -34,7 +34,7 @@ #include "XFormsModelContext.hxx" #include #include -#include "xformsimport.hxx" +#include "xmloff/xformsimport.hxx" #include #include #include diff --git a/xmloff/util/makefile.mk b/xmloff/util/makefile.mk index bc93c1d4297c..58cdc44dbb1d 100644 --- a/xmloff/util/makefile.mk +++ b/xmloff/util/makefile.mk @@ -90,21 +90,6 @@ SHL1STDLIBS+=-licg617mxp SHL1DEF= $(MISC)$/$(SHL1TARGET).def SHL1LIBS= $(LIB1TARGET) - -SHL5STDLIBS= \ - $(TOOLSLIB) \ - $(SALLIB) \ - $(SALHELPERLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) - -.IF "$(GUI)"=="UNX" || "$(COM)"=="GCC" - SHL5STDLIBS += -lxo$(DLLPOSTFIX) -.ELSE - SHL5STDLIBS += ixo.lib -.ENDIF - # --- Def-File --------------------------------------------------------- DEF1NAME =$(SHL1TARGET) From 90f7fda0c37dfafdc75915f120adbb1de43c78b8 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Apr 2010 23:05:45 +0200 Subject: [PATCH 005/279] CWS gnumake2: move header generation for oovbaapi to offuh --- vbahelper/prj/build.lst | 2 +- vbahelper/source/msforms/makefile.mk | 9 --------- vbahelper/source/vbahelper/makefile.mk | 8 -------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/vbahelper/prj/build.lst b/vbahelper/prj/build.lst index 07cc9ac50173..0a9b6b6be5cf 100644 --- a/vbahelper/prj/build.lst +++ b/vbahelper/prj/build.lst @@ -1,4 +1,4 @@ -vba vbahelper : filter oovbaapi basic sfx2 svx cppuhelper vcl comphelper svtools tools sal NULL +vba vbahelper : filter offuh basic sfx2 svx cppuhelper vcl comphelper svtools tools sal NULL vba vbahelper usr1 - all vba_mkout NULL #vba vbahelper\inc nmake - all vba_inc NULL vba vbahelper\source\vbahelper nmake - all vba_vbahelper NULL diff --git a/vbahelper/source/msforms/makefile.mk b/vbahelper/source/msforms/makefile.mk index 1d550c8409c2..3a6d7f6a20de 100644 --- a/vbahelper/source/msforms/makefile.mk +++ b/vbahelper/source/msforms/makefile.mk @@ -68,12 +68,3 @@ SLOFILES=\ .INCLUDE : target.mk -ALLTAR : \ - $(MISC)$/$(TARGET).don \ - -$(SLOFILES) : $(MISC)$/$(TARGET).don - -$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb - +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@ - echo $@ - diff --git a/vbahelper/source/vbahelper/makefile.mk b/vbahelper/source/vbahelper/makefile.mk index a8a4167948f4..eb47f74e8172 100644 --- a/vbahelper/source/vbahelper/makefile.mk +++ b/vbahelper/source/vbahelper/makefile.mk @@ -69,12 +69,4 @@ SLOFILES=\ .INCLUDE : target.mk -ALLTAR : \ - $(MISC)$/$(TARGET).don \ - -$(SLOFILES) : $(MISC)$/$(TARGET).don - -$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb - +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@ - echo $@ From 692dac6c6e964a64909f9adfba44f936810c2646 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 17 Apr 2010 12:41:17 +0200 Subject: [PATCH 006/279] CWS gnumake2: new gbuild system --- framework/Makefile | 30 ++ framework/prj/gbuild.lst | 3 + framework/prj/makefile.mk | 2 + framework/prj/target_lib_fwe.mk | 117 +++++++ framework/prj/target_lib_fwi.mk | 96 ++++++ framework/prj/target_lib_fwk.mk | 189 +++++++++++ framework/prj/target_lib_fwl.mk | 100 ++++++ framework/prj/target_lib_fwm.mk | 81 +++++ framework/prj/target_module_framework.mk | 55 ++++ framework/prj/target_package_dtd.mk | 35 ++ framework/prj/target_package_inc.mk | 47 +++ framework/prj/target_package_uiconfig.mk | 32 ++ framework/prj/target_package_unotypes.mk | 30 ++ framework/prj/target_res_fwe.mk | 61 ++++ sfx2/Makefile | 30 ++ sfx2/prj/gbuild.lst | 4 + sfx2/prj/makefile.mk | 2 + sfx2/prj/target_lib_qstart.mk | 80 +++++ sfx2/prj/target_lib_sfx2.mk | 285 ++++++++++++++++ sfx2/prj/target_module_sfx2.mk | 47 +++ sfx2/prj/target_package_inc.mk | 159 +++++++++ sfx2/prj/target_res_sfx2.mk | 76 +++++ xmloff/Makefile | 30 ++ xmloff/prj/gbuild.lst | 4 + xmloff/prj/makefile.mk | 2 + xmloff/prj/target_lib_xo.mk | 392 +++++++++++++++++++++++ xmloff/prj/target_lib_xof.mk | 110 +++++++ xmloff/prj/target_module_xmloff.mk | 42 +++ xmloff/prj/target_package_inc.mk | 129 ++++++++ 29 files changed, 2270 insertions(+) create mode 100644 framework/Makefile create mode 100644 framework/prj/gbuild.lst create mode 100644 framework/prj/makefile.mk create mode 100644 framework/prj/target_lib_fwe.mk create mode 100644 framework/prj/target_lib_fwi.mk create mode 100644 framework/prj/target_lib_fwk.mk create mode 100644 framework/prj/target_lib_fwl.mk create mode 100644 framework/prj/target_lib_fwm.mk create mode 100644 framework/prj/target_module_framework.mk create mode 100644 framework/prj/target_package_dtd.mk create mode 100644 framework/prj/target_package_inc.mk create mode 100644 framework/prj/target_package_uiconfig.mk create mode 100644 framework/prj/target_package_unotypes.mk create mode 100644 framework/prj/target_res_fwe.mk create mode 100644 sfx2/Makefile create mode 100644 sfx2/prj/gbuild.lst create mode 100644 sfx2/prj/makefile.mk create mode 100644 sfx2/prj/target_lib_qstart.mk create mode 100644 sfx2/prj/target_lib_sfx2.mk create mode 100644 sfx2/prj/target_module_sfx2.mk create mode 100644 sfx2/prj/target_package_inc.mk create mode 100644 sfx2/prj/target_res_sfx2.mk create mode 100644 xmloff/Makefile create mode 100644 xmloff/prj/gbuild.lst create mode 100644 xmloff/prj/makefile.mk create mode 100644 xmloff/prj/target_lib_xo.mk create mode 100644 xmloff/prj/target_lib_xof.mk create mode 100644 xmloff/prj/target_module_xmloff.mk create mode 100644 xmloff/prj/target_package_inc.mk diff --git a/framework/Makefile b/framework/Makefile new file mode 100644 index 000000000000..d020b04dba7c --- /dev/null +++ b/framework/Makefile @@ -0,0 +1,30 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +include ../solenv/inc/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(notdir $(shell pwd)))) diff --git a/framework/prj/gbuild.lst b/framework/prj/gbuild.lst new file mode 100644 index 000000000000..3591f5b29a63 --- /dev/null +++ b/framework/prj/gbuild.lst @@ -0,0 +1,3 @@ +fr framework : l10n svtools NULL +fr framework usr1 - all fr_mkout NULL +fr framework\prj nmake - all fr_all NULL diff --git a/framework/prj/makefile.mk b/framework/prj/makefile.mk new file mode 100644 index 000000000000..a5f9aa9d8248 --- /dev/null +++ b/framework/prj/makefile.mk @@ -0,0 +1,2 @@ +all: + cd .. && make -sj9 diff --git a/framework/prj/target_lib_fwe.mk b/framework/prj/target_lib_fwe.mk new file mode 100644 index 000000000000..9387cad85a67 --- /dev/null +++ b/framework/prj/target_lib_fwe.mk @@ -0,0 +1,117 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,fwe)) + +$(call gb_Library_get_headers_target,fwe) : $(call gb_Package_get_target,framework_inc) + +$(eval $(call gb_Library_set_include,fwe,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/framework/ \ + -I$(SRCDIR)/framework/inc \ + -I$(SRCDIR)/framework/inc/pch \ + -I$(SRCDIR)/framework/source/inc \ + -I$(OUTDIR)/inc/framework \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,fwe,\ + $$(DEFS) \ + -DFWE_DLLIMPLEMENTATION\ +)) + +$(eval $(call gb_Library_add_linked_libs,fwe,\ + comphelper \ + cppu \ + cppuhelper \ + fwi \ + sal \ + stl \ + svl \ + svt \ + tl \ + utl \ + vcl \ + vos3 \ +)) + +$(eval $(call gb_Library_add_exception_objects,fwe,\ + framework/source/fwe/classes/actiontriggercontainer \ + framework/source/fwe/classes/actiontriggerpropertyset \ + framework/source/fwe/classes/actiontriggerseparatorpropertyset \ + framework/source/fwe/classes/addonmenu \ + framework/source/fwe/classes/addonsoptions \ + framework/source/fwe/classes/bmkmenu \ + framework/source/fwe/classes/fwkresid \ + framework/source/fwe/classes/imagewrapper \ + framework/source/fwe/classes/menuextensionsupplier \ + framework/source/fwe/classes/rootactiontriggercontainer \ + framework/source/fwe/classes/sfxhelperfunctions \ + framework/source/fwe/dispatch/interaction \ + framework/source/fwe/helper/acceleratorinfo \ + framework/source/fwe/helper/actiontriggerhelper \ + framework/source/fwe/helper/configimporter \ + framework/source/fwe/helper/imageproducer \ + framework/source/fwe/helper/propertysetcontainer \ + framework/source/fwe/helper/titlehelper \ + framework/source/fwe/helper/uiconfigelementwrapperbase \ + framework/source/fwe/helper/uielementwrapperbase \ + framework/source/fwe/interaction/preventduplicateinteraction \ + framework/source/fwe/xml/eventsconfiguration \ + framework/source/fwe/xml/eventsdocumenthandler \ + framework/source/fwe/xml/imagesconfiguration \ + framework/source/fwe/xml/imagesdocumenthandler \ + framework/source/fwe/xml/menuconfiguration \ + framework/source/fwe/xml/menudocumenthandler \ + framework/source/fwe/xml/saxnamespacefilter \ + framework/source/fwe/xml/statusbarconfiguration \ + framework/source/fwe/xml/statusbardocumenthandler \ + framework/source/fwe/xml/toolboxconfiguration \ + framework/source/fwe/xml/toolboxdocumenthandler \ + framework/source/fwe/xml/toolboxlayoutdocumenthandler \ + framework/source/fwe/xml/xmlnamespaces \ +)) + +ifeq ($(OS),LINUX) + +$(eval $(call gb_Library_set_cxxflags,fwe,$$(filter-out -fvisibility=hidden,$$(CXXFLAGS)))) + +$(eval $(call gb_Library_add_linked_libs,fwe,\ + dl \ + m \ + pthread \ +)) +endif +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,fwe,\ + kernel32 \ + msvcrt \ + uwinapi \ +)) +endif +# TODO: visibility +# vim: set noet sw=4 ts=4: diff --git a/framework/prj/target_lib_fwi.mk b/framework/prj/target_lib_fwi.mk new file mode 100644 index 000000000000..0c1d9a63fedf --- /dev/null +++ b/framework/prj/target_lib_fwi.mk @@ -0,0 +1,96 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,fwi)) + +$(call gb_Library_get_headers_target,fwi) : $(call gb_Package_get_target,framework_inc) + +$(eval $(call gb_Library_set_defs,fwi,\ + $$(DEFS) \ + -DFWI_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_set_include,fwi,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/framework/ \ + -I$(SRCDIR)/framework/inc \ + -I$(SRCDIR)/framework/inc/pch \ + -I$(SRCDIR)/framework/source/inc \ + -I$(OUTDIR)/inc/framework \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_linked_libs,fwi,\ + comphelper \ + stl \ + tk \ + tl \ + cppu \ + cppuhelper \ + sal \ + utl \ + vcl \ + vos3 \ +)) + +$(eval $(call gb_Library_add_exception_objects,fwi,\ + framework/source/fwi/classes/converter \ + framework/source/fwi/classes/framelistanalyzer \ + framework/source/fwi/classes/propertysethelper \ + framework/source/fwi/classes/protocolhandlercache \ + framework/source/fwi/helper/mischelper \ + framework/source/fwi/helper/networkdomain \ + framework/source/fwi/helper/popupmenucontrollerbase \ + framework/source/fwi/helper/shareablemutex \ + framework/source/fwi/jobs/configaccess \ + framework/source/fwi/jobs/jobconst \ + framework/source/fwi/threadhelp/lockhelper \ + framework/source/fwi/threadhelp/transactionmanager \ + framework/source/fwi/uielement/constitemcontainer \ + framework/source/fwi/uielement/itemcontainer \ + framework/source/fwi/uielement/rootitemcontainer \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,fwi,\ + dl \ + m \ + pthread \ +)) +endif +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,fwi,\ + advapi32 \ + kernel32 \ + msvcrt \ + stl \ + unicows \ + uwinapi \ +)) +endif +# TODO: visibility +# vim: set noet sw=4 ts=4: diff --git a/framework/prj/target_lib_fwk.mk b/framework/prj/target_lib_fwk.mk new file mode 100644 index 000000000000..2cdbc14a2938 --- /dev/null +++ b/framework/prj/target_lib_fwk.mk @@ -0,0 +1,189 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,fwk)) + +$(call gb_Library_get_headers_target,fwk) : $(call gb_Package_get_target,framework_inc) + +$(eval $(call gb_Library_set_include,fwk,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/framework/ \ + -I$(SRCDIR)/framework/inc \ + -I$(SRCDIR)/framework/inc/pch \ + -I$(SRCDIR)/framework/source/inc \ + -I$(OUTDIR)/inc/framework \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_linked_libs,fwk,\ + comphelper \ + fwe \ + fwi \ + i18nisolang1 \ + sot \ + stl \ + svl \ + svt \ + tk \ + tl \ + ucbhelper \ + cppu \ + cppuhelper \ + sal \ + utl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,fwk,\ + framework/source/accelerators/acceleratorcache \ + framework/source/accelerators/acceleratorconfiguration \ + framework/source/accelerators/documentacceleratorconfiguration \ + framework/source/accelerators/globalacceleratorconfiguration \ + framework/source/accelerators/keymapping \ + framework/source/accelerators/moduleacceleratorconfiguration \ + framework/source/accelerators/presethandler \ + framework/source/accelerators/storageholder \ + framework/source/classes/droptargetlistener \ + framework/source/classes/framecontainer \ + framework/source/classes/menumanager \ + framework/source/classes/taskcreator \ + framework/source/constant/containerquery \ + framework/source/constant/contenthandler \ + framework/source/constant/filter \ + framework/source/constant/frameloader \ + framework/source/dispatch/closedispatcher \ + framework/source/dispatch/dispatchinformationprovider \ + framework/source/dispatch/dispatchprovider \ + framework/source/dispatch/helpagentdispatcher \ + framework/source/dispatch/interceptionhelper \ + framework/source/dispatch/loaddispatcher \ + framework/source/dispatch/menudispatcher \ + framework/source/dispatch/startmoduledispatcher \ + framework/source/dispatch/windowcommanddispatch \ + framework/source/helper/dockingareadefaultacceptor \ + framework/source/helper/ocomponentaccess \ + framework/source/helper/ocomponentenumeration \ + framework/source/helper/oframes \ + framework/source/helper/persistentwindowstate \ + framework/source/helper/statusindicator \ + framework/source/helper/statusindicatorfactory \ + framework/source/helper/tagwindowasmodified \ + framework/source/helper/titlebarupdate \ + framework/source/helper/vclstatusindicator \ + framework/source/helper/wakeupthread \ + framework/source/interaction/quietinteraction \ + framework/source/jobs/job \ + framework/source/jobs/jobdata \ + framework/source/jobs/jobdispatch \ + framework/source/jobs/jobexecutor \ + framework/source/jobs/jobresult \ + framework/source/jobs/joburl \ + framework/source/layoutmanager/layoutmanager \ + framework/source/loadenv/loaddispatchlistener \ + framework/source/loadenv/loadenv \ + framework/source/loadenv/targethelper \ + framework/source/register/registerservices \ + framework/source/services/autorecovery \ + framework/source/services/backingcomp \ + framework/source/services/backingwindow \ + framework/source/services/desktop \ + framework/source/services/frame \ + framework/source/services/modulemanager \ + framework/source/services/pathsettings \ + framework/source/services/sessionlistener \ + framework/source/services/substitutepathvars \ + framework/source/services/taskcreatorsrv \ + framework/source/services/uriabbreviation \ + framework/source/services/urltransformer \ + framework/source/uiconfiguration/globalsettings \ + framework/source/uiconfiguration/graphicnameaccess \ + framework/source/uiconfiguration/imagemanager \ + framework/source/uiconfiguration/imagemanagerimpl \ + framework/source/uiconfiguration/moduleimagemanager \ + framework/source/uiconfiguration/moduleuicfgsupplier \ + framework/source/uiconfiguration/moduleuiconfigurationmanager \ + framework/source/uiconfiguration/uicategorydescription \ + framework/source/uiconfiguration/uiconfigurationmanager \ + framework/source/uiconfiguration/uiconfigurationmanagerimpl \ + framework/source/uiconfiguration/windowstateconfiguration \ + framework/source/uielement/addonstoolbarmanager \ + framework/source/uielement/addonstoolbarwrapper \ + framework/source/uielement/buttontoolbarcontroller \ + framework/source/uielement/comboboxtoolbarcontroller \ + framework/source/uielement/complextoolbarcontroller \ + framework/source/uielement/controlmenucontroller \ + framework/source/uielement/dropdownboxtoolbarcontroller \ + framework/source/uielement/edittoolbarcontroller \ + framework/source/uielement/generictoolbarcontroller \ + framework/source/uielement/imagebuttontoolbarcontroller \ + framework/source/uielement/langselectionstatusbarcontroller \ + framework/source/uielement/menubarmanager \ + framework/source/uielement/menubarmerger \ + framework/source/uielement/menubarwrapper \ + framework/source/uielement/objectmenucontroller \ + framework/source/uielement/progressbarwrapper \ + framework/source/uielement/recentfilesmenucontroller \ + framework/source/uielement/spinfieldtoolbarcontroller \ + framework/source/uielement/statusbar \ + framework/source/uielement/statusbarmanager \ + framework/source/uielement/statusbarwrapper \ + framework/source/uielement/statusindicatorinterfacewrapper \ + framework/source/uielement/togglebuttontoolbarcontroller \ + framework/source/uielement/toolbar \ + framework/source/uielement/toolbarmanager \ + framework/source/uielement/toolbarmerger \ + framework/source/uielement/toolbarwrapper \ + framework/source/uielement/uicommanddescription \ + framework/source/uifactory/addonstoolboxfactory \ + framework/source/uifactory/factoryconfiguration \ + framework/source/uifactory/menubarfactory \ + framework/source/uifactory/popupmenucontrollerfactory \ + framework/source/uifactory/statusbarcontrollerfactory \ + framework/source/uifactory/statusbarfactory \ + framework/source/uifactory/toolbarcontrollerfactory \ + framework/source/uifactory/toolboxfactory \ + framework/source/uifactory/uielementfactorymanager \ + framework/source/uifactory/windowcontentfactorymanager \ + framework/source/xml/acceleratorconfigurationreader \ + framework/source/xml/acceleratorconfigurationwriter \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,fwk,\ + dl \ + m \ + pthread \ +)) +endif +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,fwk,\ + kernel32 \ + msvcrt \ + uwinapi \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/framework/prj/target_lib_fwl.mk b/framework/prj/target_lib_fwl.mk new file mode 100644 index 000000000000..8e549041cae3 --- /dev/null +++ b/framework/prj/target_lib_fwl.mk @@ -0,0 +1,100 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,fwl)) + +$(call gb_Library_get_headers_target,fwl) : $(call gb_Package_get_target,framework_inc) + +$(eval $(call gb_Library_set_include,fwl,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/framework/ \ + -I$(SRCDIR)/framework/inc \ + -I$(SRCDIR)/framework/inc/pch \ + -I$(SRCDIR)/framework/source/inc \ + -I$(OUTDIR)/inc/framework \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_linked_libs,fwl,\ + comphelper \ + fwe \ + fwi \ + i18nisolang1 \ + stl \ + svl \ + svt \ + tk \ + tl \ + cppu \ + cppuhelper \ + sal \ + utl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,fwl,\ + framework/source/register/registertemp \ + framework/source/services/mediatypedetectionhelper \ + framework/source/dispatch/mailtodispatcher \ + framework/source/dispatch/oxt_handler \ + framework/source/uielement/toolbarsmenucontroller \ + framework/source/uielement/newmenucontroller \ + framework/source/uielement/macrosmenucontroller \ + framework/source/uielement/langselectionmenucontroller \ + framework/source/uielement/headermenucontroller \ + framework/source/uielement/footermenucontroller \ + framework/source/uielement/fontsizemenucontroller \ + framework/source/uielement/fontmenucontroller \ + framework/source/services/tabwindowservice \ + framework/source/classes/fwktabwindow \ + framework/source/uielement/logotextstatusbarcontroller \ + framework/source/classes/fwlresid \ + framework/source/uielement/logoimagestatusbarcontroller \ + framework/source/uielement/simpletextstatusbarcontroller \ + framework/source/services/uriabbreviation \ + framework/source/dispatch/servicehandler \ + framework/source/services/license \ + framework/source/recording/dispatchrecorder \ + framework/source/recording/dispatchrecordersupplier \ + framework/source/services/dispatchhelper \ + framework/source/dispatch/popupmenudispatcher \ +)) +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,fwl,\ + dl \ + m \ + pthread \ +)) +endif +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,fwl,\ + kernel32 \ + msvcrt \ + uwinapi \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/framework/prj/target_lib_fwm.mk b/framework/prj/target_lib_fwm.mk new file mode 100644 index 000000000000..e0b4df3ef2c8 --- /dev/null +++ b/framework/prj/target_lib_fwm.mk @@ -0,0 +1,81 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,fwm)) + +$(call gb_Library_get_headers_target,fwm) : $(call gb_Package_get_target,framework_inc) + +$(eval $(call gb_Library_set_include,fwm,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/framework/ \ + -I$(SRCDIR)/framework/inc \ + -I$(SRCDIR)/framework/inc/pch \ + -I$(SRCDIR)/framework/source/inc \ + -I$(OUTDIR)/inc/framework \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_linked_libs,fwm,\ + comphelper \ + fwi \ + stl \ + svl \ + svt \ + tk \ + tl \ + cppu \ + cppuhelper \ + sal \ + utl \ + vcl \ + vos3 \ +)) + +$(eval $(call gb_Library_add_exception_objects,fwm,\ + framework/source/dispatch/systemexec \ + framework/source/jobs/helponstartup \ + framework/source/jobs/shelljob \ + framework/source/register/register3rdcomponents \ + framework/source/tabwin/tabwindow \ + framework/source/tabwin/tabwinfactory \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,fwm,\ + dl \ + m \ + pthread \ +)) +endif +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,fwm,\ + kernel32 \ + msvcrt \ + uwinapi \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/framework/prj/target_module_framework.mk b/framework/prj/target_module_framework.mk new file mode 100644 index 000000000000..86a30a0b3e45 --- /dev/null +++ b/framework/prj/target_module_framework.mk @@ -0,0 +1,55 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +include $(foreach targetdef,\ + lib_fwe \ + lib_fwi \ + lib_fwk \ + lib_fwl \ + lib_fwm \ + package_dtd \ + package_inc \ + package_uiconfig \ + package_unotypes \ + res_fwe \ +,$(SRCDIR)/framework/prj/target_$(targetdef).mk) + + +$(eval $(call gb_Module_Module,framework,\ + $(call gb_AllLangResTarget_get_target,fwe) \ + $(call gb_Library_get_target,fwe) \ + $(call gb_Library_get_target,fwi) \ + $(call gb_Library_get_target,fwk) \ + $(call gb_Library_get_target,fwl) \ + $(call gb_Library_get_target,fwm) \ + $(call gb_Library_get_target,fwe) \ + $(call gb_Package_get_target,framework_dtd) \ + $(call gb_Package_get_target,framework_inc) \ + $(call gb_Package_get_target,framework_uiconfig) \ + $(call gb_Package_get_target,framework_unotypes) \ +)) +# vim: set noet ts=4 sw=4: diff --git a/framework/prj/target_package_dtd.mk b/framework/prj/target_package_dtd.mk new file mode 100644 index 000000000000..db23783c4ef9 --- /dev/null +++ b/framework/prj/target_package_dtd.mk @@ -0,0 +1,35 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,framework_dtd,$(SRCDIR)/framework/dtd)) +$(eval $(call gb_Package_add_file,framework_dtd,bin/accelerator.dtd,accelerator.dtd)) +$(eval $(call gb_Package_add_file,framework_dtd,bin/event.dtd,event.dtd)) +$(eval $(call gb_Package_add_file,framework_dtd,bin/groupuinames.dtd,groupuinames.dtd)) +$(eval $(call gb_Package_add_file,framework_dtd,bin/image.dtd,image.dtd)) +$(eval $(call gb_Package_add_file,framework_dtd,bin/menubar.dtd,menubar.dtd)) +$(eval $(call gb_Package_add_file,framework_dtd,bin/statusbar.dtd,statusbar.dtd)) +$(eval $(call gb_Package_add_file,framework_dtd,bin/toolbar.dtd,toolbar.dtd)) diff --git a/framework/prj/target_package_inc.mk b/framework/prj/target_package_inc.mk new file mode 100644 index 000000000000..32ae89b7b1be --- /dev/null +++ b/framework/prj/target_package_inc.mk @@ -0,0 +1,47 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,framework_inc,$(SRCDIR)/framework/inc)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/acceleratorinfo.hxx,helper/acceleratorinfo.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/actiontriggerhelper.hxx,helper/actiontriggerhelper.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/addonmenu.hxx,classes/addonmenu.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/addonsoptions.hxx,classes/addonsoptions.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/bmkmenu.hxx,classes/bmkmenu.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/configimporter.hxx,helper/configimporter.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/eventsconfiguration.hxx,xml/eventsconfiguration.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/imageproducer.hxx,helper/imageproducer.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/imagesconfiguration.hxx,xml/imagesconfiguration.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/interaction.hxx,dispatch/interaction.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/menuconfiguration.hxx,xml/menuconfiguration.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/menuextensionsupplier.hxx,classes/menuextensionsupplier.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/preventduplicateinteraction.hxx,interaction/preventduplicateinteraction.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/sfxhelperfunctions.hxx,classes/sfxhelperfunctions.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/titlehelper.hxx,helper/titlehelper.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/toolboxconfiguration.hxx,xml/toolboxconfiguration.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/fwedllapi.h,fwedllapi.h)) +$(eval $(call gb_Package_add_file,framework_inc,inc/fwkdllapi.h,fwkdllapi.h)) +$(eval $(call gb_Package_add_file,framework_inc,inc/fwidllapi.h,fwidllapi.h)) diff --git a/framework/prj/target_package_uiconfig.mk b/framework/prj/target_package_uiconfig.mk new file mode 100644 index 000000000000..c92344a153f5 --- /dev/null +++ b/framework/prj/target_package_uiconfig.mk @@ -0,0 +1,32 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,framework_uiconfig,$(SRCDIR)/framework/uiconfig)) +$(eval $(call gb_Package_add_file,framework_uiconfig,xml/uiconfig/modules/StartModule/accelerator/en-US/default.xml,startmodule/accelerator/en-US/default.xml)) +$(eval $(call gb_Package_add_file,framework_uiconfig,xml/uiconfig/modules/StartModule/menubar/menubar.xml,startmodule/menubar/menubar.xml)) +$(eval $(call gb_Package_add_file,framework_uiconfig,xml/uiconfig/modules/StartModule/statusbar/statusbar.xml,startmodule/statusbar/statusbar.xml)) +$(eval $(call gb_Package_add_file,framework_uiconfig,xml/uiconfig/modules/StartModule/toolbar/standardbar.xml,startmodule/toolbar/standardbar.xml)) diff --git a/framework/prj/target_package_unotypes.mk b/framework/prj/target_package_unotypes.mk new file mode 100644 index 000000000000..01069ae93dc4 --- /dev/null +++ b/framework/prj/target_package_unotypes.mk @@ -0,0 +1,30 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,framework_unotypes,$(SRCDIR)/framework/source/unotypes)) +$(eval $(call gb_Package_add_file,framework_unotypes,xml/fwk.xml,fwk.xml)) +$(eval $(call gb_Package_add_file,framework_unotypes,xml/fwl.xml,fwl.xml)) diff --git a/framework/prj/target_res_fwe.mk b/framework/prj/target_res_fwe.mk new file mode 100644 index 000000000000..aa7e93c4095b --- /dev/null +++ b/framework/prj/target_res_fwe.mk @@ -0,0 +1,61 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,fwe)) + +$(eval $(call gb_AllLangResTarget_add_srs,fwe,\ + fwe/fwk_classes \ + fwe/fwk_services \ +)) + + +$(eval $(call gb_SrsTarget_SrsTarget,fwe/fwk_classes)) + +$(eval $(call gb_SrsTarget_set_include,fwe/fwk_classes,\ + $$(INCLUDE) \ + -I$(SRCDIR)/framework/inc \ + -I$(SRCDIR)/framework/inc/classes \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_SrsTarget_add_files,fwe/fwk_classes,\ + framework/source/classes/resource.src \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,fwe/fwk_services)) + +$(eval $(call gb_SrsTarget_set_include,fwe/fwk_services,\ + $$(INCLUDE) \ + -I$(SRCDIR)/framework/inc \ + -I$(SRCDIR)/framework/inc/services \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_SrsTarget_add_files,fwe/fwk_services,\ + framework/source/services/fwk_services.src \ +)) +# vim: set noet sw=4 ts=4: diff --git a/sfx2/Makefile b/sfx2/Makefile new file mode 100644 index 000000000000..d020b04dba7c --- /dev/null +++ b/sfx2/Makefile @@ -0,0 +1,30 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +include ../solenv/inc/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(notdir $(shell pwd)))) diff --git a/sfx2/prj/gbuild.lst b/sfx2/prj/gbuild.lst new file mode 100644 index 000000000000..7dc2a95cb994 --- /dev/null +++ b/sfx2/prj/gbuild.lst @@ -0,0 +1,4 @@ +sf sfx2 : l10n idl basic xmlscript framework shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL +sf sfx2 usr1 - all sf_mkout NULL +sf sfx2\prj nmake - all sf_prj NULL + diff --git a/sfx2/prj/makefile.mk b/sfx2/prj/makefile.mk new file mode 100644 index 000000000000..a5f9aa9d8248 --- /dev/null +++ b/sfx2/prj/makefile.mk @@ -0,0 +1,2 @@ +all: + cd .. && make -sj9 diff --git a/sfx2/prj/target_lib_qstart.mk b/sfx2/prj/target_lib_qstart.mk new file mode 100644 index 000000000000..2da2ada42db3 --- /dev/null +++ b/sfx2/prj/target_lib_qstart.mk @@ -0,0 +1,80 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +#ifeq ($(OS),UNX) +$(eval $(call gb_Library_Library,qstart)) + +$(eval $(call gb_Library_set_include,qstart,\ + $$(INCLUDE) \ + -I$(SRCDIR)/sfx2/inc \ + -I$(SRCDIR)/sfx2/inc/sfx2 \ + -I$(SRCDIR)/sfx2/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +#WTF: this nice code is currently found in the makefile.mk (unix part only) +# PKGCONFIG_MODULES=gtk+-2.0 +# .IF "$(PKGCONFIG_ROOT)"!="" +# PKG_CONFIG=$(PKGCONFIG_ROOT)/bin/pkg-config +# PKG_CONFIG_PATH:=$(PKGCONFIG_ROOT)/lib/pkgconfig +# .EXPORT : PKG_CONFIG_PATH +# PKGCONFIG_PREFIX=--define-variable=prefix=$(PKGCONFIG_ROOT) +# .ELSE +# PKG_CONFIG*=pkg-config +# .ENDIF +# PKGCONFIG_CFLAGS:=$(shell @$(PKG_CONFIG) $(PKGCONFIG_PREFIX) --cflags $(PKGCONFIG_MODULES)) +# PKGCONFIG_LIBS:=$(shell @$(PKG_CONFIG) $(PKGCONFIG_PREFIX) --libs $(PKGCONFIG_MODULES)) +# CFLAGS+=$(PKGCONFIG_CFLAGS + +ifeq ($(ENABLE_SYSTRAY_GTK),TRUE) +$(eval $(call gb_Library_set_defs,qstart,\ + $$(DEFS) \ + -DDLL_NAME=libsfx$(DLLPOSTFIX)$(DLLPOST) \ + -DENABLE_QUICKSTART_APPLET \ +)) +endif + +#todo: add libs +$(eval $(call gb_Library_add_linked_libs,qstart,\ + sfx \ +)) + +$(eval $(call gb_Library_add_linked_system_libs,qstart,\ + icuuc \ + dl \ + m \ + pthread \ +)) + +ifeq ($(ENABLE_SYSTRAY_GTK),TRUE) +$(eval $(call gb_Library_add_exception_objects,qstart,\ + sfx2/source/appl/shutdowniconunx.ob \ +)) +endif + +endif diff --git a/sfx2/prj/target_lib_sfx2.mk b/sfx2/prj/target_lib_sfx2.mk new file mode 100644 index 000000000000..7770abef5a28 --- /dev/null +++ b/sfx2/prj/target_lib_sfx2.mk @@ -0,0 +1,285 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,sfx)) + +$(call gb_Library_get_headers_target,sfx) : $(call gb_SdiTarget_get_target,sfx2/sdi/sfxslots) +$(call gb_Library_get_clean_target,sfx) : $(call gb_SdiTarget_get_clean_target,sfx2/sdi/sfxslots) + +$(eval $(call gb_Library_set_include,sfx,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/sfx2/sdi \ + -I$(WORKDIR)/inc/sfx2 \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/sfx2/inc \ + -I$(SRCDIR)/sfx2/inc/sfx2 \ + -I$(SRCDIR)/sfx2/source/inc \ + -I$(SRCDIR)/sfx2/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ + $(LIBXML_CFLAGS) \ +)) + +$(eval $(call gb_Library_set_defs,sfx,\ + $$(DEFS) \ + -DSFX2_DLLIMPLEMENTATION \ + -DABOUTBMPNAMES="$(ABOUTBITMAPS)" \ +)) + +ifneq ($(OS),UNX) +$(eval $(call gb_Library_set_defs,sfx,\ + $$(DEFS) \ + -DENABLE_QUICKSTART_APPLET \ +)) +endif + +$(eval $(call gb_Library_add_linked_libs,sfx,\ + comphelper \ + i18nisolang1 \ + sb \ + sot \ + svl \ + svt \ + tk \ + tl \ + ucbhelper \ + cppu \ + cppuhelper \ + sal \ + utl \ + vcl \ + vos3 \ + fwe \ + sax \ + xml2 \ + stl \ +)) + +$(eval $(call gb_Library_add_linked_system_libs,sfx,\ + icuuc \ + dl \ + m \ + pthread \ +)) + +$(eval $(call gb_Library_add_exception_objects,sfx,\ + sfx2/source/appl/appcfg \ + sfx2/source/appl/imagemgr \ + sfx2/source/appl/appopen \ + sfx2/source/appl/appmain \ + sfx2/source/appl/appmisc \ + sfx2/source/appl/appinit \ + sfx2/source/appl/helpinterceptor \ + sfx2/source/appl/newhelp \ + sfx2/source/appl/sfxhelp \ + sfx2/source/appl/shutdownicon \ + sfx2/source/appl/shutdowniconw32 \ + sfx2/source/appl/sfxpicklist \ + sfx2/source/appl/helpdispatch \ + sfx2/source/appl/xpackcreator \ + sfx2/source/appl/app \ + sfx2/source/appl/appbas \ + sfx2/source/appl/appchild \ + sfx2/source/appl/appdata \ + sfx2/source/appl/appdde \ + sfx2/source/appl/appquit \ + sfx2/source/appl/appreg \ + sfx2/source/appl/appserv \ + sfx2/source/appl/appuno \ + sfx2/source/appl/appbaslib \ + sfx2/source/appl/childwin \ + sfx2/source/appl/imestatuswindow \ + sfx2/source/appl/impldde \ + sfx2/source/appl/linkmgr2 \ + sfx2/source/appl/linksrc \ + sfx2/source/appl/lnkbase2 \ + sfx2/source/appl/module \ + sfx2/source/appl/sfxdll \ + sfx2/source/appl/workwin \ + sfx2/source/appl/fwkhelper \ + sfx2/source/bastyp/sfxhtml \ + sfx2/source/bastyp/frmhtml \ + sfx2/source/bastyp/frmhtmlw \ + sfx2/source/bastyp/misc \ + sfx2/source/bastyp/progress \ + sfx2/source/bastyp/sfxresid \ + sfx2/source/bastyp/bitset \ + sfx2/source/bastyp/minarray \ + sfx2/source/bastyp/fltfnc \ + sfx2/source/bastyp/mieclip \ + sfx2/source/bastyp/fltlst \ + sfx2/source/bastyp/helper \ + sfx2/source/config/evntconf \ + sfx2/source/control/bindings \ + sfx2/source/control/ctrlitem \ + sfx2/source/control/dispatch \ + sfx2/source/control/macrconf \ + sfx2/source/control/macro \ + sfx2/source/control/minfitem \ + sfx2/source/control/msg \ + sfx2/source/control/msgpool \ + sfx2/source/control/objface \ + sfx2/source/control/querystatus \ + sfx2/source/control/request \ + sfx2/source/control/sfxstatuslistener \ + sfx2/source/control/shell \ + sfx2/source/control/sorgitm \ + sfx2/source/control/srchitem \ + sfx2/source/control/statcach \ + sfx2/source/control/unoctitm \ + sfx2/source/dialog/filedlghelper \ + sfx2/source/dialog/filtergrouping \ + sfx2/source/dialog/itemconnect \ + sfx2/source/dialog/mailmodel \ + sfx2/source/dialog/partwnd \ + sfx2/source/dialog/recfloat \ + sfx2/source/dialog/templdlg \ + sfx2/source/dialog/dinfdlg \ + sfx2/source/dialog/dockwin \ + sfx2/source/doc/printhelper \ + sfx2/source/doc/docinf \ + sfx2/source/doc/oleprops \ + sfx2/source/doc/iframe \ + sfx2/source/doc/plugin \ + sfx2/source/doc/docfile \ + sfx2/source/doc/objuno \ + sfx2/source/doc/frmdescr \ + sfx2/source/doc/objxtor \ + sfx2/source/doc/objmisc \ + sfx2/source/doc/objstor \ + sfx2/source/doc/objcont \ + sfx2/source/doc/objserv \ + sfx2/source/doc/objitem \ + sfx2/source/doc/ownsubfilterservice \ + sfx2/source/doc/docfac \ + sfx2/source/doc/docfilt \ + sfx2/source/doc/doctempl \ + sfx2/source/doc/doctemplates \ + sfx2/source/doc/doctemplateslocal \ + sfx2/source/doc/docvor \ + sfx2/source/doc/new \ + sfx2/source/doc/doctdlg \ + sfx2/source/doc/sfxbasemodel \ + sfx2/source/doc/guisaveas \ + sfx2/source/doc/objembed \ + sfx2/source/doc/graphhelp \ + sfx2/source/doc/QuerySaveDocument \ + sfx2/source/doc/opostponedtruncationstream \ + sfx2/source/doc/docinsert \ + sfx2/source/doc/docmacromode \ + sfx2/source/doc/SfxDocumentMetaData \ + sfx2/source/doc/Metadatable \ + sfx2/source/doc/DocumentMetadataAccess \ + sfx2/source/doc/sfxmodelfactory \ + sfx2/source/doc/sfxacldetect \ + sfx2/source/doc/docstoragemodifylistener \ + sfx2/source/doc/querytemplate \ + sfx2/source/explorer/nochaos \ + sfx2/source/inet/inettbc \ + sfx2/source/menu/mnumgr \ + sfx2/source/menu/virtmenu \ + sfx2/source/menu/objmnctl \ + sfx2/source/menu/mnuitem \ + sfx2/source/notify/eventsupplier \ + sfx2/source/statbar/stbitem \ + sfx2/source/toolbox/tbxitem \ + sfx2/source/toolbox/imgmgr \ + sfx2/source/view/ipclient \ + sfx2/source/view/viewsh \ + sfx2/source/view/frmload \ + sfx2/source/view/frame \ + sfx2/source/view/printer \ + sfx2/source/view/prnmon \ + sfx2/source/view/viewprn \ + sfx2/source/view/viewfac \ + sfx2/source/view/orgmgr \ + sfx2/source/view/viewfrm \ + sfx2/source/view/impframe \ + sfx2/source/view/topfrm \ + sfx2/source/view/sfxbasecontroller \ + sfx2/source/view/userinputinterception \ +)) + +$(eval $(call gb_Library_add_noexception_objects,sfx,\ + sfx2/source/dialog/about \ + sfx2/source/dialog/alienwarn \ + sfx2/source/dialog/basedlgs \ + sfx2/source/dialog/dinfedt \ + sfx2/source/dialog/intro \ + sfx2/source/dialog/mgetempl \ + sfx2/source/dialog/navigat \ + sfx2/source/dialog/newstyle \ + sfx2/source/dialog/passwd \ + sfx2/source/dialog/printopt \ + sfx2/source/dialog/sfxdlg \ + sfx2/source/dialog/sfxurl \ + sfx2/source/dialog/splitwin \ + sfx2/source/dialog/srchdlg \ + sfx2/source/dialog/styfitem \ + sfx2/source/dialog/styledlg \ + sfx2/source/dialog/tabdlg \ + sfx2/source/dialog/tplcitem \ + sfx2/source/dialog/tplpitem \ + sfx2/source/dialog/versdlg \ + sfx2/source/notify/hintpost \ +)) + +$(eval $(call gb_SdiTarget_SdiTarget,sfx2/sdi/sfxslots,sfx2/sdi/sfx)) + +$(eval $(call gb_SdiTarget_set_include,sfx2/sdi/sfxslots,\ + $$(INCLUDE) \ + -I$(SRCDIR)/sfx2/inc/sfx2 \ + -I$(SRCDIR)/sfx2/inc \ + -I$(SRCDIR)/sfx2/sdi \ +)) + +ifeq ($(OS),OS2) +$(eval $(call gb_Library_add_exception_objects,sfx,\ + sfx2/source/appl/shutdowniconOs2.ob \ +)) +endif +ifeq ($(OS),OSX) +$(eval $(call gb_Library_add_exception_objects,sfx,\ + sfx2/source/appl/shutdowniconaqua.ob \ +)) +endif +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,sfx,\ + advapi32 \ + gdi32 \ + kernel32 \ + msvcrt \ + oldnames \ + ole32 \ + shell32 \ + user32 \ + uuid \ + uwinapi \ +)) +endif +# vim: set noet sw=4 ts=4: + diff --git a/sfx2/prj/target_module_sfx2.mk b/sfx2/prj/target_module_sfx2.mk new file mode 100644 index 000000000000..d3a1996bab05 --- /dev/null +++ b/sfx2/prj/target_module_sfx2.mk @@ -0,0 +1,47 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Module_Module,sfx2,\ + $(call gb_AllLangResTarget_get_target,sfx) \ + $(call gb_Library_get_target,sfx) \ +)) + +$(eval $(call gb_Module_read_includes,sfx2,\ + lib_sfx2 \ + package_inc \ + res_sfx2 \ +)) + +#todo: map file? +#todo: source/appl ohne Optimierung? +#todo: source/control ohne Optimierung? +#todo: source/dialog BUILD_VER_STRING +#todo: source/doc SYSTEM_LIBXML2 +#todo: noopt for acldetect.cxx? +#todo: ENABLE_LAYOUT +#todo: quickstarter +#todo: link against cocoa on Mac diff --git a/sfx2/prj/target_package_inc.mk b/sfx2/prj/target_package_inc.mk new file mode 100644 index 000000000000..9661439ce35c --- /dev/null +++ b/sfx2/prj/target_package_inc.mk @@ -0,0 +1,159 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,sfx2_inc,$(SRCDIR)/sfx2/inc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) + +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dllapi.h,sfx2/dllapi.h)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basedlgs.hxx,sfx2/basedlgs.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/bindings.hxx,sfx2/bindings.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/brokenpackageint.hxx,sfx2/brokenpackageint.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/chalign.hxx,sfx2/chalign.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/childwin.hxx,sfx2/childwin.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ctrlitem.hxx,sfx2/ctrlitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dispatch.hxx,sfx2/dispatch.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfdlg.hxx,sfx2/dinfdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfedt.hxx,sfx2/dinfedt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinf.hxx,sfx2/docinf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfac.hxx,sfx2/docfac.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfile.hxx,sfx2/docfile.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfilt.hxx,sfx2/docfilt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dockwin.hxx,sfx2/dockwin.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctempl.hxx,sfx2/doctempl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctdlg.hxx,sfx2/doctdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/event.hxx,sfx2/event.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/evntconf.hxx,sfx2/evntconf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/filedlghelper.hxx,sfx2/filedlghelper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/fcontnr.hxx,sfx2/fcontnr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frame.hxx,sfx2/frame.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmdescr.hxx,sfx2/frmdescr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtml.hxx,sfx2/frmhtml.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtmlw.hxx,sfx2/frmhtmlw.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/genlink.hxx,sfx2/genlink.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/hintpost.hxx,sfx2/hintpost.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgmgr.hxx,sfx2/imgmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgdef.hxx,sfx2/imgdef.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ipclient.hxx,sfx2/ipclient.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/macrconf.hxx,sfx2/macrconf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/topfrm.hxx,sfx2/topfrm.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mgetempl.hxx,sfx2/mgetempl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mieclip.hxx,sfx2/mieclip.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minarray.hxx,sfx2/minarray.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minfitem.hxx,sfx2/minfitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minstack.hxx,sfx2/minstack.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnuitem.hxx,sfx2/mnuitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/module.hxx,sfx2/module.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msg.hxx,sfx2/msg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnumgr.hxx,sfx2/mnumgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/newstyle.hxx,sfx2/newstyle.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/new.hxx,sfx2/new.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/navigat.hxx,sfx2/navigat.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msgpool.hxx,sfx2/msgpool.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/passwd.hxx,sfx2/passwd.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/prnmon.hxx,sfx2/prnmon.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objface.hxx,sfx2/objface.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objitem.hxx,sfx2/objitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/signaturestate.hxx,sfx2/signaturestate.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docmacromode.hxx,sfx2/docmacromode.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sfx2/userinputinterception.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docstoragemodifylistener.hxx,sfx2/docstoragemodifylistener.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxmodelfactory.hxx,sfx2/sfxmodelfactory.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objsh.hxx,sfx2/objsh.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printer.hxx,sfx2/printer.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printopt.hxx,sfx2/printopt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/progress.hxx,sfx2/progress.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/request.hxx,sfx2/request.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfx.hrc,sfx2/sfx.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdefs.hxx,sfx2/sfxdefs.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfxhelp.hxx,sfx2/sfxhelp.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhtml.hxx,sfx2/sfxhtml.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxsids.hrc,sfx2/sfxsids.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/shell.hxx,sfx2/shell.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/stbitem.hxx,sfx2/stbitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styfitem.hxx,sfx2/styfitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styledlg.hxx,sfx2/styledlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tabdlg.hxx,sfx2/tabdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tbxctrl.hxx,sfx2/tbxctrl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templdlg.hxx,sfx2/templdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tplpitem.hxx,sfx2/tplpitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfrm.hxx,sfx2/viewfrm.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewsh.hxx,sfx2/viewsh.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfac.hxx,sfx2/viewfac.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/appuno.hxx,sfx2/appuno.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxuno.hxx,sfx2/sfxuno.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasemodel.hxx,sfx2/sfxbasemodel.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasecontroller.hxx,sfx2/sfxbasecontroller.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/unoctitm.hxx,sfx2/unoctitm.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/srchitem.hxx,sfx2/srchitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/srchdefs.hxx,sfx2/srchdefs.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/cntids.hrc,sfx2/cntids.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basmgr.hxx,sfx2/basmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imagemgr.hxx,sfx2/imagemgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdlg.hxx,sfx2/sfxdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dialogs.hrc,sfx2/dialogs.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemwrapper.hxx,sfx2/itemwrapper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/controlwrapper.hxx,sfx2/controlwrapper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemconnect.hxx,sfx2/itemconnect.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/lnkbase.hxx,sfx2/lnkbase.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linkmgr.hxx,sfx2/linkmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linksrc.hxx,sfx2/linksrc.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/querystatus.hxx,sfx2/querystatus.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxstatuslistener.hxx,sfx2/sfxstatuslistener.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mailmodelapi.hxx,sfx2/mailmodelapi.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinsert.hxx,sfx2/docinsert.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-tabdlg.hxx,sfx2/layout-tabdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-post.hxx,sfx2/layout-post.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-pre.hxx,sfx2/layout-pre.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx)) + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sfx2/prj/target_res_sfx2.mk b/sfx2/prj/target_res_sfx2.mk new file mode 100644 index 000000000000..3feb0e2b9f6d --- /dev/null +++ b/sfx2/prj/target_res_sfx2.mk @@ -0,0 +1,76 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,sfx)) + +$(eval $(call gb_AllLangResTarget_add_srs,sfx,\ + sfx/res \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,sfx/res)) + +$(eval $(call gb_SrsTarget_set_include,sfx/res,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc \ + -I$(WORKDIR)/inc \ + -I$(SRCDIR)/sfx2/source/dialog \ + -I$(SRCDIR)/sfx2/source/inc \ + -I$(SRCDIR)/sfx2/inc/ \ + -I$(SRCDIR)/sfx2/inc/sfx \ +)) + +$(eval $(call gb_SrsTarget_add_files,sfx/res,\ + sfx2/source/appl/app.src \ + sfx2/source/appl/newhelp.src \ + sfx2/source/appl/dde.src \ + sfx2/source/appl/sfx.src \ + sfx2/source/doc/doc.src \ + sfx2/source/doc/new.src \ + sfx2/source/doc/doctdlg.src \ + sfx2/source/doc/doctempl.src \ + sfx2/source/doc/graphhelp.src \ + sfx2/source/menu/menu.src \ + sfx2/source/view/view.src \ + sfx2/source/dialog/alienwarn.src \ + sfx2/source/dialog/dialog.src \ + sfx2/source/dialog/dinfdlg.src \ + sfx2/source/dialog/dinfedt.src \ + sfx2/source/dialog/filedlghelper.src \ + sfx2/source/dialog/mailwindow.src \ + sfx2/source/dialog/mgetempl.src \ + sfx2/source/dialog/newstyle.src \ + sfx2/source/dialog/passwd.src \ + sfx2/source/dialog/printopt.src \ + sfx2/source/dialog/recfloat.src \ + sfx2/source/dialog/srchdlg.src \ + sfx2/source/dialog/templdlg.src \ + sfx2/source/dialog/versdlg.src \ + sfx2/source/bastyp/bastyp.src \ + sfx2/source/bastyp/fltfnc.src \ +)) + + diff --git a/xmloff/Makefile b/xmloff/Makefile new file mode 100644 index 000000000000..d020b04dba7c --- /dev/null +++ b/xmloff/Makefile @@ -0,0 +1,30 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +include ../solenv/inc/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(notdir $(shell pwd)))) diff --git a/xmloff/prj/gbuild.lst b/xmloff/prj/gbuild.lst new file mode 100644 index 000000000000..4dcebafb0386 --- /dev/null +++ b/xmloff/prj/gbuild.lst @@ -0,0 +1,4 @@ +xo xmloff : offapi svl vos NULL +xo xmloff usr1 - all xo_mkout NULL +xo xmloff\prj nmake - all xo_prj NULL + diff --git a/xmloff/prj/makefile.mk b/xmloff/prj/makefile.mk new file mode 100644 index 000000000000..a5f9aa9d8248 --- /dev/null +++ b/xmloff/prj/makefile.mk @@ -0,0 +1,2 @@ +all: + cd .. && make -sj9 diff --git a/xmloff/prj/target_lib_xo.mk b/xmloff/prj/target_lib_xo.mk new file mode 100644 index 000000000000..fa66d59aa08f --- /dev/null +++ b/xmloff/prj/target_lib_xo.mk @@ -0,0 +1,392 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,xo)) + +$(call gb_Library_get_headers_target,xo) : $(call gb_Package_get_target,xo_inc) + +$(eval $(call gb_Library_set_include,xo,\ + $$(SOLARINC) \ + -I. \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/xmloff/inc \ + -I$(SRCDIR)/xmloff/source/inc \ + -I$(SRCDIR)/xmloff/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_defs,xo,\ + $$(DEFS) \ + -DXMLOFF_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,xo,\ + basegfx \ + comphelper \ + cppu \ + cppuhelper \ + i18nisolang1 \ + sal \ + stl \ + svl \ + tl \ + utl \ + vos3 \ +)) + +$(eval $(call gb_Library_add_exception_objects,xo,\ + xmloff/source/draw/ximpshap \ + xmloff/source/draw/ximppage \ + xmloff/source/draw/ximpstyl \ + xmloff/source/draw/XMLShapeStyleContext \ + xmloff/source/draw/sdxmlimp \ + xmloff/source/draw/shapeimport \ + xmloff/source/draw/ximplink \ + xmloff/source/draw/propimp0 \ + xmloff/source/draw/ximpbody \ + xmloff/source/draw/eventimp \ + xmloff/source/draw/layerimp \ + xmloff/source/draw/shapeexport2 \ + xmloff/source/draw/animimp \ + xmloff/source/draw/ximp3dscene \ + xmloff/source/draw/ximpgrp \ + xmloff/source/draw/XMLImageMapExport \ + xmloff/source/draw/numithdl \ + xmloff/source/draw/XMLReplacementImageContext \ + xmloff/source/draw/ximpshow \ + xmloff/source/draw/descriptionimp \ + xmloff/source/draw/xexptran \ + xmloff/source/draw/animationexport \ + xmloff/source/draw/viewcontext \ + xmloff/source/draw/sdpropls \ + xmloff/source/draw/shapeexport3 \ + xmloff/source/draw/ximp3dobject \ + xmloff/source/draw/EnhancedCustomShapeToken \ + xmloff/source/draw/ximpcustomshape \ + xmloff/source/draw/shapeexport4 \ + xmloff/source/draw/animationimport \ + xmloff/source/draw/XMLGraphicsDefaultStyle \ + xmloff/source/draw/ximpnote \ + xmloff/source/draw/shapeexport \ + xmloff/source/draw/XMLImageMapContext \ + xmloff/source/draw/sdxmlexp \ + xmloff/source/draw/animexp \ + xmloff/source/draw/layerexp \ + xmloff/source/draw/XMLNumberStyles \ + xmloff/source/draw/XMLShapePropertySetContext \ + xmloff/source/chart/SchXMLImport \ + xmloff/source/chart/XMLErrorIndicatorPropertyHdl \ + xmloff/source/chart/PropertyMaps \ + xmloff/source/chart/ColorPropertySet \ + xmloff/source/chart/transporttypes \ + xmloff/source/chart/XMLSymbolImageContext \ + xmloff/source/chart/SchXMLTools \ + xmloff/source/chart/XMLLabelSeparatorContext \ + xmloff/source/chart/XMLChartPropertyContext \ + xmloff/source/chart/SchXMLSeriesHelper \ + xmloff/source/chart/SchXMLSeries2Context \ + xmloff/source/chart/SchXMLPlotAreaContext \ + xmloff/source/chart/contexts \ + xmloff/source/chart/XMLErrorBarStylePropertyHdl \ + xmloff/source/chart/XMLAxisPositionPropertyHdl \ + xmloff/source/chart/SchXMLParagraphContext \ + xmloff/source/chart/XMLTextOrientationHdl \ + xmloff/source/chart/XMLSymbolTypePropertyHdl \ + xmloff/source/chart/SchXMLChartContext \ + xmloff/source/chart/XMLChartStyleContext \ + xmloff/source/chart/SchXMLAutoStylePoolP \ + xmloff/source/chart/SchXMLTableContext \ + xmloff/source/chart/SchXMLCalculationSettingsContext \ + xmloff/source/chart/SchXMLExport \ + xmloff/source/text/XMLChangedRegionImportContext \ + xmloff/source/text/XMLIndexUserSourceContext \ + xmloff/source/text/txtfldi \ + xmloff/source/text/XMLTextShapeImportHelper \ + xmloff/source/text/XMLIndexTOCStylesContext \ + xmloff/source/text/XMLIndexSimpleEntryContext \ + xmloff/source/text/txtftne \ + xmloff/source/text/XMLTextColumnsExport \ + xmloff/source/text/XMLChangeImportContext \ + xmloff/source/text/XMLSectionSourceImportContext \ + xmloff/source/text/XMLIndexAlphabeticalSourceContext \ + xmloff/source/text/txtparae \ + xmloff/source/text/XMLIndexTabStopEntryContext \ + xmloff/source/text/XMLTextMasterPageContext \ + xmloff/source/text/XMLTextHeaderFooterContext \ + xmloff/source/text/XMLIndexBibliographyEntryContext \ + xmloff/source/text/XMLIndexTOCContext \ + xmloff/source/text/XMLSectionImportContext \ + xmloff/source/text/XMLStringBufferImportContext \ + xmloff/source/text/XMLTextShapeStyleContext \ + xmloff/source/text/XMLSectionFootnoteConfigImport \ + xmloff/source/text/txtparai \ + xmloff/source/text/XMLIndexIllustrationSourceContext \ + xmloff/source/text/txtprmap \ + xmloff/source/text/XMLRedlineExport \ + xmloff/source/text/XMLTextMasterPageExport \ + xmloff/source/text/XMLIndexTableSourceContext \ + xmloff/source/text/XMLLineNumberingExport \ + xmloff/source/text/XMLSectionExport \ + xmloff/source/text/XMLTextMasterStylesContext \ + xmloff/source/text/XMLTextFrameContext \ + xmloff/source/text/XMLFootnoteImportContext \ + xmloff/source/text/txtvfldi \ + xmloff/source/text/txtdropi \ + xmloff/source/text/XMLTextListAutoStylePool \ + xmloff/source/text/XMLIndexTitleTemplateContext \ + xmloff/source/text/XMLChangeElementImportContext \ + xmloff/source/text/XMLIndexSourceBaseContext \ + xmloff/source/text/XMLTextNumRuleInfo \ + xmloff/source/text/XMLSectionFootnoteConfigExport \ + xmloff/source/text/XMLFootnoteConfigurationImportContext \ + xmloff/source/text/XMLIndexTOCSourceContext \ + xmloff/source/text/txtlists \ + xmloff/source/text/XMLLineNumberingSeparatorImportContext \ + xmloff/source/text/XMLLineNumberingImportContext \ + xmloff/source/text/XMLIndexMarkExport \ + xmloff/source/text/XMLSectionSourceDDEImportContext \ + xmloff/source/text/XMLFootnoteBodyImportContext \ + xmloff/source/text/XMLTextColumnsContext \ + xmloff/source/text/XMLAutoTextContainerEventImport \ + xmloff/source/text/XMLAutoMarkFileContext \ + xmloff/source/text/txtflde \ + xmloff/source/text/txtstyli \ + xmloff/source/text/txtsecte \ + xmloff/source/text/XMLPropertyBackpatcher \ + xmloff/source/text/XMLChangeInfoContext \ + xmloff/source/text/XMLCalculationSettingsContext \ + xmloff/source/text/XMLIndexBodyContext \ + xmloff/source/text/XMLTextFrameHyperlinkContext \ + xmloff/source/text/txtexppr \ + xmloff/source/text/XMLTextCharStyleNamesElementExport \ + xmloff/source/text/XMLAutoTextEventExport \ + xmloff/source/text/txtdrope \ + xmloff/source/text/XMLIndexSpanEntryContext \ + xmloff/source/text/XMLIndexChapterInfoEntryContext \ + xmloff/source/text/XMLTextListItemContext \ + xmloff/source/text/XMLIndexTemplateContext \ + xmloff/source/text/XMLAutoTextEventImport \ + xmloff/source/text/txtstyle \ + xmloff/source/text/XMLTrackedChangesImportContext \ + xmloff/source/text/XMLTextTableContext \ + xmloff/source/text/XMLIndexBibliographyConfigurationContext \ + xmloff/source/text/txtprhdl \ + xmloff/source/text/txtimppr \ + xmloff/source/text/XMLTextMarkImportContext \ + xmloff/source/text/XMLIndexBibliographySourceContext \ + xmloff/source/text/txtimp \ + xmloff/source/text/XMLIndexObjectSourceContext \ + xmloff/source/text/XMLTextPropertySetContext \ + xmloff/source/text/XMLTextListBlockContext \ + xmloff/source/script/XMLEventImportHelper \ + xmloff/source/script/xmlscripti \ + xmloff/source/script/XMLStarBasicExportHandler \ + xmloff/source/script/XMLScriptExportHandler \ + xmloff/source/script/XMLEventsImportContext \ + xmloff/source/script/xmlbasici \ + xmloff/source/script/XMLEventExport \ + xmloff/source/script/XMLScriptContextFactory \ + xmloff/source/script/XMLStarBasicContextFactory \ + xmloff/source/table/XMLTableImport \ + xmloff/source/table/XMLTableExport \ + xmloff/source/xforms/XFormsSubmissionContext \ + xmloff/source/xforms/SchemaRestrictionContext \ + xmloff/source/xforms/XFormsInstanceContext \ + xmloff/source/xforms/SchemaContext \ + xmloff/source/xforms/XFormsBindContext \ + xmloff/source/xforms/xformsexport \ + xmloff/source/xforms/xformsimport \ + xmloff/source/xforms/SchemaSimpleTypeContext \ + xmloff/source/xforms/TokenContext \ + xmloff/source/xforms/XFormsModelContext \ + xmloff/source/xforms/xformsapi \ + xmloff/source/forms/controlelement \ + xmloff/source/forms/formcellbinding \ + xmloff/source/forms/elementexport \ + xmloff/source/forms/eventimport \ + xmloff/source/forms/layerimport \ + xmloff/source/forms/elementimport \ + xmloff/source/forms/formattributes \ + xmloff/source/forms/formlayerimport \ + xmloff/source/forms/officeforms \ + xmloff/source/forms/layerexport \ + xmloff/source/forms/formlayerexport \ + xmloff/source/forms/eventexport \ + xmloff/source/forms/formenums \ + xmloff/source/forms/valueproperties \ + xmloff/source/forms/formstyles \ + xmloff/source/forms/controlpropertyhdl \ + xmloff/source/forms/propertyexport \ + xmloff/source/forms/gridcolumnproptranslator \ + xmloff/source/forms/propertyimport \ + xmloff/source/forms/controlpropertymap \ + xmloff/source/forms/formevents \ + xmloff/source/forms/strings \ + xmloff/source/forms/attriblistmerge \ + xmloff/source/forms/logging \ + xmloff/source/forms/formsimp \ + xmloff/source/style/opaquhdl \ + xmloff/source/style/impastp4 \ + xmloff/source/style/PageMasterImportContext \ + xmloff/source/style/DashStyle \ + xmloff/source/style/MultiPropertySetHelper \ + xmloff/source/style/PageMasterStyleMap \ + xmloff/source/style/WordWrapPropertyHdl \ + xmloff/source/style/XMLConstantsPropertyHandler \ + xmloff/source/style/xmltabi \ + xmloff/source/style/MarkerStyle \ + xmloff/source/style/XMLElementPropertyContext \ + xmloff/source/style/VisAreaExport \ + xmloff/source/style/undlihdl \ + xmloff/source/style/XMLIsPercentagePropertyHandler \ + xmloff/source/style/EnumPropertyHdl \ + xmloff/source/style/durationhdl \ + xmloff/source/style/XMLFontAutoStylePool \ + xmloff/source/style/shadwhdl \ + xmloff/source/style/xmlaustp \ + xmloff/source/style/numehelp \ + xmloff/source/style/adjushdl \ + xmloff/source/style/PageMasterExportPropMapper \ + xmloff/source/style/postuhdl \ + xmloff/source/style/TransGradientStyle \ + xmloff/source/style/XMLRectangleMembersHandler \ + xmloff/source/style/xmlbahdl \ + xmloff/source/style/xmlprcon \ + xmloff/source/style/ImageStyle \ + xmloff/source/style/xmlnumi \ + xmloff/source/style/kernihdl \ + xmloff/source/style/XMLBitmapLogicalSizePropertyHandler \ + xmloff/source/style/impastp1 \ + xmloff/source/style/xmlnumfi \ + xmloff/source/style/VisAreaContext \ + xmloff/source/style/bordrhdl \ + xmloff/source/style/prhdlfac \ + xmloff/source/style/xmlnumfe \ + xmloff/source/style/xmlimppr \ + xmloff/source/style/cdouthdl \ + xmloff/source/style/styleexp \ + xmloff/source/style/AttributeContainerHandler \ + xmloff/source/style/PageMasterPropHdl \ + xmloff/source/style/XMLBackgroundImageExport \ + xmloff/source/style/PageMasterPropMapper \ + xmloff/source/style/PagePropertySetContext \ + xmloff/source/style/XMLPercentOrMeasurePropertyHandler \ + xmloff/source/style/XMLBackgroundImageContext \ + xmloff/source/style/prstylei \ + xmloff/source/style/csmaphdl \ + xmloff/source/style/PageHeaderFooterContext \ + xmloff/source/style/XMLFontStylesContext \ + xmloff/source/style/PageMasterImportPropMapper \ + xmloff/source/style/lspachdl \ + xmloff/source/style/StyleMap \ + xmloff/source/style/XMLClipPropertyHandler \ + xmloff/source/style/XMLPageExport \ + xmloff/source/style/PageMasterPropHdlFactory \ + xmloff/source/style/xmlnume \ + xmloff/source/style/NamedBoolPropertyHdl \ + xmloff/source/style/xmlexppr \ + xmloff/source/style/xmltabe \ + xmloff/source/style/chrhghdl \ + xmloff/source/style/FillStyleContext \ + xmloff/source/style/breakhdl \ + xmloff/source/style/fonthdl \ + xmloff/source/style/escphdl \ + xmloff/source/style/xmlstyle \ + xmloff/source/style/HatchStyle \ + xmloff/source/style/chrlohdl \ + xmloff/source/style/xmlprhdl \ + xmloff/source/style/GradientStyle \ + xmloff/source/style/uniref \ + xmloff/source/style/impastp2 \ + xmloff/source/style/impastp3 \ + xmloff/source/style/XMLFootnoteSeparatorExport \ + xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler \ + xmloff/source/style/DrawAspectHdl \ + xmloff/source/style/tabsthdl \ + xmloff/source/style/xmlprmap \ + xmloff/source/style/XMLFillBitmapSizePropertyHandler \ + xmloff/source/style/XMLFootnoteSeparatorImport \ + xmloff/source/style/backhdl \ + xmloff/source/style/weighhdl \ + xmloff/source/style/SinglePropertySetInfoCache \ + xmloff/source/style/shdwdhdl \ + xmloff/source/core/i18nmap \ + xmloff/source/core/xmlimp \ + xmloff/source/core/unointerfacetouniqueidentifiermapper \ + xmloff/source/core/xmlexp \ + xmloff/source/core/XMLEmbeddedObjectExportFilter \ + xmloff/source/core/PropertySetMerger \ + xmloff/source/core/xmltoken \ + xmloff/source/core/xmlerror \ + xmloff/source/core/nmspmap \ + xmloff/source/core/xmlkywd \ + xmloff/source/core/xmluconv \ + xmloff/source/core/XMLBase64Export \ + xmloff/source/core/DomExport \ + xmloff/source/core/RDFaExportHelper \ + xmloff/source/core/xmltkmap \ + xmloff/source/core/DocumentSettingsContext \ + xmloff/source/core/xmlictxt \ + xmloff/source/core/XMLBase64ImportContext \ + xmloff/source/core/xmlehelp \ + xmloff/source/core/XMLEmbeddedObjectImportContext \ + xmloff/source/core/xmlcnitm \ + xmloff/source/core/ProgressBarHelper \ + xmloff/source/core/XMLBasicExportFilter \ + xmloff/source/core/facreg \ + xmloff/source/core/unoatrcn \ + xmloff/source/core/SettingsExportHelper \ + xmloff/source/core/DomBuilderContext \ + xmloff/source/core/attrlist \ + xmloff/source/core/RDFaImportHelper \ + xmloff/source/meta/xmlmetae \ + xmloff/source/meta/xmlversion \ + xmloff/source/meta/MetaImportComponent \ + xmloff/source/meta/xmlmetai \ + xmloff/source/meta/MetaExportComponent \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,xo,\ + icuuc \ + dl \ + m \ + pthread \ +)) +endif + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,xo,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +# vim: set noet ts=4 sw=4: diff --git a/xmloff/prj/target_lib_xof.mk b/xmloff/prj/target_lib_xof.mk new file mode 100644 index 000000000000..a414106da31e --- /dev/null +++ b/xmloff/prj/target_lib_xof.mk @@ -0,0 +1,110 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,xof)) + +$(eval $(call gb_Library_set_include,xof,\ + $$(SOLARINC) \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/xmloff/inc \ + -I$(SRCDIR)/xmloff/source/inc \ + -I$(SRCDIR)/xmloff/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_add_linked_libs,xof,\ + comphelper \ + cppu \ + cppuhelper \ + sal \ + salhelper \ + stl \ + xo \ +)) + +$(eval $(call gb_Library_add_exception_objects,xof,\ + xmloff/source/transform/OOo2Oasis \ + xmloff/source/transform/StyleOOoTContext \ + xmloff/source/transform/EventOOoTContext \ + xmloff/source/transform/DocumentTContext \ + xmloff/source/transform/NotesTContext \ + xmloff/source/transform/Oasis2OOo \ + xmloff/source/transform/TransformerContext \ + xmloff/source/transform/ChartOASISTContext \ + xmloff/source/transform/PropertyActionsOASIS \ + xmloff/source/transform/DeepTContext \ + xmloff/source/transform/DlgOASISTContext \ + xmloff/source/transform/FormPropOOoTContext \ + xmloff/source/transform/TransformerBase \ + xmloff/source/transform/FormPropOASISTContext \ + xmloff/source/transform/RenameElemTContext \ + xmloff/source/transform/ControlOOoTContext \ + xmloff/source/transform/FrameOASISTContext \ + xmloff/source/transform/EventOASISTContext \ + xmloff/source/transform/TransformerTokenMap \ + xmloff/source/transform/PersMixedContentTContext \ + xmloff/source/transform/ProcAttrTContext \ + xmloff/source/transform/MetaTContext \ + xmloff/source/transform/TransformerActions \ + xmloff/source/transform/ControlOASISTContext \ + xmloff/source/transform/ChartPlotAreaOOoTContext \ + xmloff/source/transform/MutableAttrList \ + xmloff/source/transform/PropertyActionsOOo \ + xmloff/source/transform/ChartOOoTContext \ + xmloff/source/transform/EventMap \ + xmloff/source/transform/FlatTContext \ + xmloff/source/transform/CreateElemTContext \ + xmloff/source/transform/ProcAddAttrTContext \ + xmloff/source/transform/XMLFilterRegistration \ + xmloff/source/transform/MergeElemTContext \ + xmloff/source/transform/PersAttrListTContext \ + xmloff/source/transform/FrameOOoTContext \ + xmloff/source/transform/ChartPlotAreaOASISTContext \ + xmloff/source/transform/StyleOASISTContext \ + xmloff/source/transform/IgnoreTContext \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,xof,\ + icuuc \ + dl \ + m \ + pthread \ +)) +endif + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,xof,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +# vim: set noet ts=4 sw=4: diff --git a/xmloff/prj/target_module_xmloff.mk b/xmloff/prj/target_module_xmloff.mk new file mode 100644 index 000000000000..4d4d82412fab --- /dev/null +++ b/xmloff/prj/target_module_xmloff.mk @@ -0,0 +1,42 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Module_Module,xmloff,\ + $(call gb_Library_get_target,xo) \ + $(call gb_Library_get_target,xof) \ + $(call gb_Package_get_target,xmloff_inc) \ +)) + +$(eval $(call gb_Module_read_includes,xmloff,\ + lib_xo \ + lib_xof \ + package_inc \ +)) + +#todo: map file +#todo: xmlkywd.lib - built, but never used?! + diff --git a/xmloff/prj/target_package_inc.mk b/xmloff/prj/target_package_inc.mk new file mode 100644 index 000000000000..76e9b485cb22 --- /dev/null +++ b/xmloff/prj/target_package_inc.mk @@ -0,0 +1,129 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,xmloff_inc,$(SRCDIR)/xmloff/inc)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/dllapi.h,xmloff/dllapi.h)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLFilterServiceNames.h,xmloff/XMLFilterServiceNames.h)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLEmbeddedObjectExportFilter.hxx,xmloff/XMLEmbeddedObjectExportFilter.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/DocumentSettingsContext.hxx,xmloff/DocumentSettingsContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/contextid.hxx,xmloff/contextid.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlmetai.hxx,xmloff/xmlmetai.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlprmap.hxx,xmloff/xmlprmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnumi.hxx,xmloff/xmlnumi.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlement.hxx,xmloff/xmlement.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/nmspmap.hxx,xmloff/nmspmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/functional.hxx,xmloff/functional.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtstyle.hxx,xmloff/txtstyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtstyli.hxx,xmloff/txtstyli.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SinglePropertySetInfoCache.hxx,xmloff/SinglePropertySetInfoCache.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/VisAreaContext.hxx,xmloff/VisAreaContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLFontStylesContext.hxx,xmloff/XMLFontStylesContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PropertySetInfoHash.hxx,xmloff/PropertySetInfoHash.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltkmap.hxx,xmloff/xmltkmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/NamedBoolPropertyHdl.hxx,xmloff/NamedBoolPropertyHdl.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLConstantsPropertyHandler.hxx,xmloff/XMLConstantsPropertyHandler.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnmspe.hxx,xmloff/xmlnmspe.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlprhdl.hxx,xmloff/xmlprhdl.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeimport.hxx,xmloff/shapeimport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/EnumPropertyHdl.hxx,xmloff/EnumPropertyHdl.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLCharContext.hxx,xmloff/XMLCharContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/VisAreaExport.hxx,xmloff/VisAreaExport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/unoatrcn.hxx,xmloff/unoatrcn.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/controlpropertyhdl.hxx,xmloff/controlpropertyhdl.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlimppr.hxx,xmloff/xmlimppr.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltabe.hxx,xmloff/xmltabe.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLEventsImportContext.hxx,xmloff/XMLEventsImportContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PageMasterStyleMap.hxx,xmloff/PageMasterStyleMap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/families.hxx,xmloff/families.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/attrlist.hxx,xmloff/attrlist.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlreg.hxx,xmloff/xmlreg.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prstylei.hxx,xmloff/prstylei.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlerror.hxx,xmloff/xmlerror.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltoken.hxx,xmloff/xmltoken.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlmetae.hxx,xmloff/xmlmetae.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextMasterPageExport.hxx,xmloff/XMLTextMasterPageExport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeexport.hxx,xmloff/shapeexport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtimppr.hxx,xmloff/txtimppr.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SchXMLImportHelper.hxx,xmloff/SchXMLImportHelper.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/formsimp.hxx,xmloff/formsimp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/ImageStyle.hxx,xmloff/ImageStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnumfi.hxx,xmloff/xmlnumfi.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/WordWrapPropertyHdl.hxx,xmloff/WordWrapPropertyHdl.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLStringVector.hxx,xmloff/XMLStringVector.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/styleexp.hxx,xmloff/styleexp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextMasterStylesContext.hxx,xmloff/XMLTextMasterStylesContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlkywd.hxx,xmloff/xmlkywd.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnume.hxx,xmloff/xmlnume.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLEventExport.hxx,xmloff/XMLEventExport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/formlayerexport.hxx,xmloff/formlayerexport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtparae.hxx,xmloff/txtparae.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/ProgressBarHelper.hxx,xmloff/ProgressBarHelper.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlcnitm.hxx,xmloff/xmlcnitm.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextShapeImportHelper.hxx,xmloff/XMLTextShapeImportHelper.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmluconv.hxx,xmloff/xmluconv.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlscripti.hxx,xmloff/xmlscripti.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlaustp.hxx,xmloff/xmlaustp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnumfe.hxx,xmloff/xmlnumfe.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlevent.hxx,xmloff/xmlevent.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlimp.hxx,xmloff/xmlimp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PropertySetInfoKey.hxx,xmloff/PropertySetInfoKey.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/formlayerimport.hxx,xmloff/formlayerimport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/i18nmap.hxx,xmloff/i18nmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/DashStyle.hxx,xmloff/DashStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLShapeStyleContext.hxx,xmloff/XMLShapeStyleContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prhdlfac.hxx,xmloff/prhdlfac.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLPageExport.hxx,xmloff/XMLPageExport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/MarkerStyle.hxx,xmloff/MarkerStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLBase64ImportContext.hxx,xmloff/XMLBase64ImportContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xformsexport.hxx,xmloff/xformsexport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/uniref.hxx,xmloff/uniref.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtimp.hxx,xmloff/txtimp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlprcon.hxx,xmloff/xmlprcon.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtprmap.hxx,xmloff/txtprmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLFontAutoStylePool.hxx,xmloff/XMLFontAutoStylePool.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlexp.hxx,xmloff/xmlexp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/GradientStyle.hxx,xmloff/GradientStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/HatchStyle.hxx,xmloff/HatchStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/animexp.hxx,xmloff/animexp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlcnimp.hxx,xmloff/xmlcnimp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextMasterPageContext.hxx,xmloff/XMLTextMasterPageContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextListAutoStylePool.hxx,xmloff/XMLTextListAutoStylePool.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextTableContext.hxx,xmloff/XMLTextTableContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/maptype.hxx,xmloff/maptype.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/numehelp.hxx,xmloff/numehelp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlexppr.hxx,xmloff/xmlexppr.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlstyle.hxx,xmloff/xmlstyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextShapeStyleContext.hxx,xmloff/XMLTextShapeStyleContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltypes.hxx,xmloff/xmltypes.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SchXMLExportHelper.hxx,xmloff/SchXMLExportHelper.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xformsimport.hxx,xmloff/xformsimport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLGraphicsDefaultStyle.hxx,xmloff/XMLGraphicsDefaultStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SettingsExportHelper.hxx,xmloff/SettingsExportHelper.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlictxt.hxx,xmloff/xmlictxt.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/table/XMLTableExport.hxx,xmloff/table/XMLTableExport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/table/XMLTableImport.hxx,xmloff/table/XMLTableImport.hxx)) + From 3c7e8d23ffa624bd54f2817d0e6dcc317106edd8 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Mon, 19 Apr 2010 15:02:20 +0200 Subject: [PATCH 007/279] CWS gnumake2: made resource location in default_images customizable for nonconforming modules (toolkit,framework,sfx2) --- framework/prj/target_res_fwe.mk | 2 ++ sfx2/prj/target_res_sfx2.mk | 2 ++ 2 files changed, 4 insertions(+) diff --git a/framework/prj/target_res_fwe.mk b/framework/prj/target_res_fwe.mk index aa7e93c4095b..031cb24117d7 100644 --- a/framework/prj/target_res_fwe.mk +++ b/framework/prj/target_res_fwe.mk @@ -27,6 +27,8 @@ $(eval $(call gb_AllLangResTarget_AllLangResTarget,fwe)) +$(eval $(call gb_AllLangResTarget_set_reslocation,fwe,framework)) + $(eval $(call gb_AllLangResTarget_add_srs,fwe,\ fwe/fwk_classes \ fwe/fwk_services \ diff --git a/sfx2/prj/target_res_sfx2.mk b/sfx2/prj/target_res_sfx2.mk index 3feb0e2b9f6d..b51079559e82 100644 --- a/sfx2/prj/target_res_sfx2.mk +++ b/sfx2/prj/target_res_sfx2.mk @@ -27,6 +27,8 @@ $(eval $(call gb_AllLangResTarget_AllLangResTarget,sfx)) +$(eval $(call gb_AllLangResTarget_set_reslocation,sfx,sfx2)) + $(eval $(call gb_AllLangResTarget_add_srs,sfx,\ sfx/res \ )) From d10ed4290570c12220c8fbdf1603a0ee4e1d1471 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 19 Apr 2010 17:54:47 +0200 Subject: [PATCH 008/279] CWS gnumake2: removed files in svl; typo in svtools makefile; missing include in sfx2 makefile --- editeng/inc/pch/precompiled_editeng.hxx | 1 - sfx2/prj/target_module_sfx2.mk | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx index d82ecc6cb6b5..d2a8837911ad 100644 --- a/editeng/inc/pch/precompiled_editeng.hxx +++ b/editeng/inc/pch/precompiled_editeng.hxx @@ -694,7 +694,6 @@ #include "svtools/apearcfg.hxx" #include "svl/brdcst.hxx" #include "unotools/cacheoptions.hxx" -#include "svl/cancel.hxx" #include "svl/cjkoptions.hxx" #include "unotools/cmdoptions.hxx" #include "svl/cntwall.hxx" diff --git a/sfx2/prj/target_module_sfx2.mk b/sfx2/prj/target_module_sfx2.mk index d3a1996bab05..37281b059595 100644 --- a/sfx2/prj/target_module_sfx2.mk +++ b/sfx2/prj/target_module_sfx2.mk @@ -28,6 +28,7 @@ $(eval $(call gb_Module_Module,sfx2,\ $(call gb_AllLangResTarget_get_target,sfx) \ $(call gb_Library_get_target,sfx) \ + $(call gb_Package_get_target,sfx2_inc) \ )) $(eval $(call gb_Module_read_includes,sfx2,\ From d96ab416478f93efd3a9398fa30e6bac9e405940 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 19 Apr 2010 18:27:03 +0200 Subject: [PATCH 009/279] CWS gnumake2: remove duplicate header in solver: vcl/imagebtn.hxx is just a copy of vcl/button.hxx --- svx/inc/svx/float3d.hxx | 2 +- svx/inc/svx/splitcelldlg.hxx | 2 +- svx/inc/svx/tabarea.hxx | 2 +- svx/inc/svx/tabline.hxx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/svx/inc/svx/float3d.hxx b/svx/inc/svx/float3d.hxx index 432d78b211ad..4b6fd22b2587 100644 --- a/svx/inc/svx/float3d.hxx +++ b/svx/inc/svx/float3d.hxx @@ -37,7 +37,7 @@ #endif #include #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif #include #include diff --git a/svx/inc/svx/splitcelldlg.hxx b/svx/inc/svx/splitcelldlg.hxx index bd1d3e8f60d0..85ba02eb0e41 100644 --- a/svx/inc/svx/splitcelldlg.hxx +++ b/svx/inc/svx/splitcelldlg.hxx @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/svx/inc/svx/tabarea.hxx b/svx/inc/svx/tabarea.hxx index 873dbc576f7c..a197e110f8ab 100644 --- a/svx/inc/svx/tabarea.hxx +++ b/svx/inc/svx/tabarea.hxx @@ -31,7 +31,7 @@ #include #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif #ifndef _FIXED_HXX //autogen #include diff --git a/svx/inc/svx/tabline.hxx b/svx/inc/svx/tabline.hxx index 7ccc189b0083..dd4d6033960c 100644 --- a/svx/inc/svx/tabline.hxx +++ b/svx/inc/svx/tabline.hxx @@ -30,7 +30,7 @@ // include --------------------------------------------------------------- #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif #ifndef _GROUP_HXX //autogen #include From f45bb35ad56cae8951b4ec0a79db4274526c741d Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 19 Apr 2010 18:40:22 +0200 Subject: [PATCH 010/279] CWS gnumake2: move all delivered headers in basic to folder inc/basic --- basic/inc/{ => basic}/modsizeexceeded.hxx | 0 basic/inc/{ => basic}/svtmsg.hrc | 0 basic/inc/{ => basic}/testtool.hrc | 0 basic/inc/{ => basic}/ttmsg.hrc | 0 basic/prj/d.lst | 39 ++--------------------- basic/source/app/svtmsg.src | 2 +- basic/source/app/testtool.src | 2 +- basic/source/app/ttmsg.src | 2 +- basic/source/uno/modsizeexceeded.cxx | 2 +- basic/source/uno/scriptcont.cxx | 2 +- 10 files changed, 8 insertions(+), 41 deletions(-) rename basic/inc/{ => basic}/modsizeexceeded.hxx (100%) rename basic/inc/{ => basic}/svtmsg.hrc (100%) rename basic/inc/{ => basic}/testtool.hrc (100%) rename basic/inc/{ => basic}/ttmsg.hrc (100%) diff --git a/basic/inc/modsizeexceeded.hxx b/basic/inc/basic/modsizeexceeded.hxx similarity index 100% rename from basic/inc/modsizeexceeded.hxx rename to basic/inc/basic/modsizeexceeded.hxx diff --git a/basic/inc/svtmsg.hrc b/basic/inc/basic/svtmsg.hrc similarity index 100% rename from basic/inc/svtmsg.hrc rename to basic/inc/basic/svtmsg.hrc diff --git a/basic/inc/testtool.hrc b/basic/inc/basic/testtool.hrc similarity index 100% rename from basic/inc/testtool.hrc rename to basic/inc/basic/testtool.hrc diff --git a/basic/inc/ttmsg.hrc b/basic/inc/basic/ttmsg.hrc similarity index 100% rename from basic/inc/ttmsg.hrc rename to basic/inc/basic/ttmsg.hrc diff --git a/basic/prj/d.lst b/basic/prj/d.lst index d2a083ebcb1e..ee5aae9acbf2 100644 --- a/basic/prj/d.lst +++ b/basic/prj/d.lst @@ -20,40 +20,7 @@ mkdir: %COMMON_DEST%\res%_EXT% ..\%__SRC%\lib\libsample.a %_DEST%\lib%_EXT%\libsample.a mkdir: %_DEST%\inc%_EXT%\basic -..\inc\testtool.hrc %_DEST%\inc%_EXT%\basic\testtool.hrc -..\inc\ttmsg.hrc %_DEST%\inc%_EXT%\basic\ttmsg.hrc -..\inc\basic\ttglobal.hrc %_DEST%\inc%_EXT%\basic\ttglobal.hrc -..\inc\svtmsg.hrc %_DEST%\inc%_EXT%\basic\svtmsg.hrc +..\inc\basic\*.hxx %_DEST%\inc%_EXT%\basic\*.hxx +..\inc\basic\*.hrc %_DEST%\inc%_EXT%\basic\*.hrc +..\inc\basic\*.h %_DEST%\inc%_EXT%\basic\*.h -..\inc\basic\sbdef.hxx %_DEST%\inc%_EXT%\basic\sbdef.hxx -..\inc\basic\sbmod.hxx %_DEST%\inc%_EXT%\basic\sbmod.hxx -..\inc\basic\sbjsmod.hxx %_DEST%\inc%_EXT%\basic\sbjsmod.hxx -..\inc\basic\sbmeth.hxx %_DEST%\inc%_EXT%\basic\sbmeth.hxx -..\inc\basic\sbprop.hxx %_DEST%\inc%_EXT%\basic\sbprop.hxx -..\inc\basic\sbstar.hxx %_DEST%\inc%_EXT%\basic\sbstar.hxx -..\inc\basic\sbuno.hxx %_DEST%\inc%_EXT%\basic\sbuno.hxx -..\inc\basic\basmgr.hxx %_DEST%\inc%_EXT%\basic\basmgr.hxx -..\inc\basic\sberrors.hxx %_DEST%\inc%_EXT%\basic\sberrors.hxx -..\inc\basic\basrdll.hxx %_DEST%\inc%_EXT%\basic\basrdll.hxx -..\inc\basic\sbstdobj.hxx %_DEST%\inc%_EXT%\basic\sbstdobj.hxx -..\inc\basic\process.hxx %_DEST%\inc%_EXT%\basic\process.hxx -..\inc\basic\mybasic.hxx %_DEST%\inc%_EXT%\basic\mybasic.hxx -..\inc\basic\testtool.hxx %_DEST%\inc%_EXT%\basic\testtool.hxx -..\inc\basic\basicrt.hxx %_DEST%\inc%_EXT%\basic\basicrt.hxx -..\inc\basic\dispdefs.hxx %_DEST%\inc%_EXT%\basic\dispdefs.hxx -..\inc\basic\ttstrhlp.hxx %_DEST%\inc%_EXT%\basic\ttstrhlp.hxx - -..\inc\basic\sbx.hxx %_DEST%\inc%_EXT%\basic\sbx.hxx -..\inc\basic\sbxcore.hxx %_DEST%\inc%_EXT%\basic\sbxcore.hxx -..\inc\basic\sbxdef.hxx %_DEST%\inc%_EXT%\basic\sbxdef.hxx -..\inc\basic\sbxform.hxx %_DEST%\inc%_EXT%\basic\sbxform.hxx -..\inc\basic\sbxmeth.hxx %_DEST%\inc%_EXT%\basic\sbxmeth.hxx -..\inc\basic\sbxobj.hxx %_DEST%\inc%_EXT%\basic\sbxobj.hxx -..\inc\basic\sbxprop.hxx %_DEST%\inc%_EXT%\basic\sbxprop.hxx -..\inc\basic\sbxvar.hxx %_DEST%\inc%_EXT%\basic\sbxvar.hxx -..\inc\basic\sbxbase.hxx %_DEST%\inc%_EXT%\basic\sbxbase.hxx -..\inc\basic\sbxfac.hxx %_DEST%\inc%_EXT%\basic\sbxfac.hxx -..\inc\basic\sbxmstrm.hxx %_DEST%\inc%_EXT%\basic\sbxmstrm.hxx - -..\inc\basic\basicmanagerrepository.hxx %_DEST%\inc%_EXT%\basic\basicmanagerrepository.hxx -..\inc\modsizeexceeded.hxx %_DEST%\inc%_EXT%\basic\modsizeexceeded.hxx diff --git a/basic/source/app/svtmsg.src b/basic/source/app/svtmsg.src index 89686ebfc0ee..748256bb5564 100644 --- a/basic/source/app/svtmsg.src +++ b/basic/source/app/svtmsg.src @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include "svtmsg.hrc" +#include "basic/svtmsg.hrc" // Hier sind die Messages aus dem Verzeichnis /basic/source/app enhalten diff --git a/basic/source/app/testtool.src b/basic/source/app/testtool.src index 245cff6c7917..090cb735c139 100644 --- a/basic/source/app/testtool.src +++ b/basic/source/app/testtool.src @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include "testtool.hrc" +#include "basic/testtool.hrc" /////////////////////////////// diff --git a/basic/source/app/ttmsg.src b/basic/source/app/ttmsg.src index 63a6643f3cf1..076ee83fd879 100644 --- a/basic/source/app/ttmsg.src +++ b/basic/source/app/ttmsg.src @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include "ttmsg.hrc" +#include "basic/ttmsg.hrc" // Hier sind die Messages aus dem Verzeichnis /basic/source/testtool enhalten diff --git a/basic/source/uno/modsizeexceeded.cxx b/basic/source/uno/modsizeexceeded.cxx index 408b0f3f8dd4..95c5b0ac2a83 100644 --- a/basic/source/uno/modsizeexceeded.cxx +++ b/basic/source/uno/modsizeexceeded.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_basic.hxx" -#include "modsizeexceeded.hxx" +#include "basic/modsizeexceeded.hxx" #include #include diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 096d497a4c50..88caeac1facf 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -60,7 +60,7 @@ #include #include #include -#include "modsizeexceeded.hxx" +#include "basic/modsizeexceeded.hxx" #include #include #include From 36ea4fb1e54249406893f794fbdad69181ab94df Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 19 Apr 2010 19:05:02 +0200 Subject: [PATCH 011/279] CWS gnumake2: move all delivered framework headers to inc/framework --- .../inc/classes/actiontriggercontainer.hxx | 2 +- .../inc/classes/actiontriggerpropertyset.hxx | 2 +- .../actiontriggerseparatorpropertyset.hxx | 2 +- framework/inc/classes/fwkresid.hxx | 2 +- framework/inc/classes/imagewrapper.hxx | 2 +- .../classes/rootactiontriggercontainer.hxx | 2 +- .../{helper => framework}/acceleratorinfo.hxx | 2 +- .../actiontriggerhelper.hxx | 2 +- .../inc/{classes => framework}/addonmenu.hxx | 2 +- .../{classes => framework}/addonsoptions.hxx | 2 +- .../inc/{classes => framework}/bmkmenu.hxx | 4 +-- .../{helper => framework}/configimporter.hxx | 2 +- .../eventsconfiguration.hxx | 2 +- framework/inc/{ => framework}/fwedllapi.h | 0 .../{helper => framework}/imageproducer.hxx | 2 +- .../imagesconfiguration.hxx | 2 +- .../{dispatch => framework}/interaction.hxx | 2 +- .../{xml => framework}/menuconfiguration.hxx | 2 +- .../menuextensionsupplier.hxx | 0 .../preventduplicateinteraction.hxx | 2 +- .../sfxhelperfunctions.hxx | 2 +- .../statusbarconfiguration.hxx | 2 +- .../inc/{helper => framework}/titlehelper.hxx | 2 +- .../toolboxconfiguration.hxx | 2 +- framework/inc/helper/propertysetcontainer.hxx | 2 +- .../inc/helper/uiconfigelementwrapperbase.hxx | 2 +- framework/inc/helper/uielementwrapperbase.hxx | 2 +- framework/inc/services/layoutmanager.hxx | 2 +- framework/inc/uielement/menubarmanager.hxx | 2 +- framework/inc/xml/eventsdocumenthandler.hxx | 4 +-- framework/inc/xml/imagesdocumenthandler.hxx | 4 +-- framework/inc/xml/menudocumenthandler.hxx | 2 +- framework/inc/xml/saxnamespacefilter.hxx | 2 +- .../inc/xml/statusbardocumenthandler.hxx | 4 +-- framework/inc/xml/toolboxdocumenthandler.hxx | 4 +-- .../inc/xml/toolboxlayoutdocumenthandler.hxx | 2 +- framework/inc/xml/xmlnamespaces.hxx | 2 +- framework/prj/d.lst | 22 ++---------- framework/prj/target_package_inc.mk | 34 +++++++++---------- framework/source/classes/menumanager.cxx | 10 +++--- framework/source/dispatch/menudispatcher.cxx | 4 +-- .../source/dispatch/popupmenudispatcher.cxx | 4 +-- framework/source/fwe/classes/addonmenu.cxx | 8 ++--- .../source/fwe/classes/addonsoptions.cxx | 2 +- framework/source/fwe/classes/bmkmenu.cxx | 6 ++-- .../fwe/classes/menuextensionsupplier.cxx | 2 +- .../classes/rootactiontriggercontainer.cxx | 2 +- .../source/fwe/classes/sfxhelperfunctions.cxx | 2 +- framework/source/fwe/dispatch/interaction.cxx | 2 +- .../source/fwe/helper/acceleratorinfo.cxx | 2 +- .../source/fwe/helper/actiontriggerhelper.cxx | 4 +-- .../source/fwe/helper/configimporter.cxx | 4 +-- framework/source/fwe/helper/imageproducer.cxx | 2 +- framework/source/fwe/helper/titlehelper.cxx | 2 +- .../preventduplicateinteraction.cxx | 2 +- .../source/fwe/xml/eventsconfiguration.cxx | 2 +- .../source/fwe/xml/eventsdocumenthandler.cxx | 2 +- .../source/fwe/xml/imagesconfiguration.cxx | 2 +- .../source/fwe/xml/menuconfiguration.cxx | 6 ++-- .../source/fwe/xml/menudocumenthandler.cxx | 4 +-- .../source/fwe/xml/statusbarconfiguration.cxx | 2 +- .../source/fwe/xml/toolboxconfiguration.cxx | 2 +- .../source/layoutmanager/layoutmanager.cxx | 4 +-- framework/source/loadenv/loadenv.cxx | 4 +-- framework/source/services/backingcomp.cxx | 2 +- framework/source/services/frame.cxx | 2 +- .../source/services/menudocumenthandler.cxx | 2 +- .../source/uiconfiguration/imagemanager.cxx | 2 +- .../uiconfiguration/imagemanagerimpl.cxx | 2 +- .../uiconfiguration/moduleimagemanager.cxx | 2 +- .../moduleuiconfigurationmanager.cxx | 6 ++-- .../uiconfigurationmanager.cxx | 6 ++-- .../uiconfigurationmanagerimpl.cxx | 6 ++-- .../source/uielement/addonstoolbarmanager.cxx | 6 ++-- .../source/uielement/addonstoolbarwrapper.cxx | 2 +- .../uielement/generictoolbarcontroller.cxx | 2 +- .../imagebuttontoolbarcontroller.cxx | 2 +- .../source/uielement/macrosmenucontroller.cxx | 2 +- framework/source/uielement/menubarmanager.cxx | 16 ++++----- framework/source/uielement/menubarmerger.cxx | 2 +- framework/source/uielement/menubarwrapper.cxx | 2 +- .../source/uielement/newmenucontroller.cxx | 6 ++-- .../source/uielement/statusbarmanager.cxx | 2 +- .../source/uielement/statusbarwrapper.cxx | 2 +- .../togglebuttontoolbarcontroller.cxx | 2 +- framework/source/uielement/toolbarmanager.cxx | 6 ++-- framework/source/uielement/toolbarmerger.cxx | 2 +- .../uielement/toolbarsmenucontroller.cxx | 4 +-- framework/source/uielement/toolbarwrapper.cxx | 2 +- 89 files changed, 147 insertions(+), 165 deletions(-) rename framework/inc/{helper => framework}/acceleratorinfo.hxx (98%) rename framework/inc/{helper => framework}/actiontriggerhelper.hxx (99%) rename framework/inc/{classes => framework}/addonmenu.hxx (99%) rename framework/inc/{classes => framework}/addonsoptions.hxx (99%) rename framework/inc/{classes => framework}/bmkmenu.hxx (97%) rename framework/inc/{helper => framework}/configimporter.hxx (98%) rename framework/inc/{xml => framework}/eventsconfiguration.hxx (98%) rename framework/inc/{ => framework}/fwedllapi.h (100%) rename framework/inc/{helper => framework}/imageproducer.hxx (98%) rename framework/inc/{xml => framework}/imagesconfiguration.hxx (99%) rename framework/inc/{dispatch => framework}/interaction.hxx (99%) rename framework/inc/{xml => framework}/menuconfiguration.hxx (99%) rename framework/inc/{classes => framework}/menuextensionsupplier.hxx (100%) rename framework/inc/{interaction => framework}/preventduplicateinteraction.hxx (99%) rename framework/inc/{classes => framework}/sfxhelperfunctions.hxx (99%) rename framework/inc/{xml => framework}/statusbarconfiguration.hxx (99%) rename framework/inc/{helper => framework}/titlehelper.hxx (99%) rename framework/inc/{xml => framework}/toolboxconfiguration.hxx (98%) diff --git a/framework/inc/classes/actiontriggercontainer.hxx b/framework/inc/classes/actiontriggercontainer.hxx index 56ab8e8e7583..936f6cf0cdbb 100644 --- a/framework/inc/classes/actiontriggercontainer.hxx +++ b/framework/inc/classes/actiontriggercontainer.hxx @@ -32,7 +32,7 @@ #include #include #include -#include +#include #define SERVICENAME_ACTIONTRIGGERCONTAINER "com.sun.star.ui.ActionTriggerContainer" #define IMPLEMENTATIONNAME_ACTIONTRIGGERCONTAINER "com.sun.star.comp.ui.ActionTriggerContainer" diff --git a/framework/inc/classes/actiontriggerpropertyset.hxx b/framework/inc/classes/actiontriggerpropertyset.hxx index 37f71438f4b6..a02794891634 100644 --- a/framework/inc/classes/actiontriggerpropertyset.hxx +++ b/framework/inc/classes/actiontriggerpropertyset.hxx @@ -41,7 +41,7 @@ #include #include #include -#include +#include #define SERVICENAME_ACTIONTRIGGER "com.sun.star.ui.ActionTrigger" #define IMPLEMENTATIONNAME_ACTIONTRIGGER "com.sun.star.comp.ui.ActionTrigger" diff --git a/framework/inc/classes/actiontriggerseparatorpropertyset.hxx b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx index be62ea962f05..f3579e98fcc1 100644 --- a/framework/inc/classes/actiontriggerseparatorpropertyset.hxx +++ b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #define SERVICENAME_ACTIONTRIGGERSEPARATOR "com.sun.star.ui.ActionTriggerSeparator" #define IMPLEMENTATIONNAME_ACTIONTRIGGERSEPARATOR "com.sun.star.comp.ui.ActionTriggerSeparator" diff --git a/framework/inc/classes/fwkresid.hxx b/framework/inc/classes/fwkresid.hxx index 2efd1dee3ad9..6cfe3fc7a0dd 100644 --- a/framework/inc/classes/fwkresid.hxx +++ b/framework/inc/classes/fwkresid.hxx @@ -29,7 +29,7 @@ #define __FRAMEWORK_CLASSES_FWKRESID_HXX_ #include -#include +#include namespace framework { diff --git a/framework/inc/classes/imagewrapper.hxx b/framework/inc/classes/imagewrapper.hxx index 9b54a149bb53..2001314e9edb 100644 --- a/framework/inc/classes/imagewrapper.hxx +++ b/framework/inc/classes/imagewrapper.hxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include namespace framework { diff --git a/framework/inc/classes/rootactiontriggercontainer.hxx b/framework/inc/classes/rootactiontriggercontainer.hxx index 2c5fa9afa071..e3c26d190ce9 100644 --- a/framework/inc/classes/rootactiontriggercontainer.hxx +++ b/framework/inc/classes/rootactiontriggercontainer.hxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #define IMPLEMENTATIONNAME_ROOTACTIONTRIGGERCONTAINER "com.sun.star.comp.ui.RootActionTriggerContainer" diff --git a/framework/inc/helper/acceleratorinfo.hxx b/framework/inc/framework/acceleratorinfo.hxx similarity index 98% rename from framework/inc/helper/acceleratorinfo.hxx rename to framework/inc/framework/acceleratorinfo.hxx index e133149cbe7a..6b0519ceed98 100644 --- a/framework/inc/helper/acceleratorinfo.hxx +++ b/framework/inc/framework/acceleratorinfo.hxx @@ -31,7 +31,7 @@ #include #include #include -#include +#include namespace framework { diff --git a/framework/inc/helper/actiontriggerhelper.hxx b/framework/inc/framework/actiontriggerhelper.hxx similarity index 99% rename from framework/inc/helper/actiontriggerhelper.hxx rename to framework/inc/framework/actiontriggerhelper.hxx index 883f2cd7b281..67c4115a3621 100644 --- a/framework/inc/helper/actiontriggerhelper.hxx +++ b/framework/inc/framework/actiontriggerhelper.hxx @@ -33,7 +33,7 @@ // #110897# #include #include -#include +#include namespace framework diff --git a/framework/inc/classes/addonmenu.hxx b/framework/inc/framework/addonmenu.hxx similarity index 99% rename from framework/inc/classes/addonmenu.hxx rename to framework/inc/framework/addonmenu.hxx index b85c8c5a8d52..183c6937b39e 100644 --- a/framework/inc/classes/addonmenu.hxx +++ b/framework/inc/framework/addonmenu.hxx @@ -40,7 +40,7 @@ //_________________________________________________________________________________________________________________ #include -#include +#include #define ADDONMENU_ITEMID_START 2000 #define ADDONMENU_ITEMID_END 3000 diff --git a/framework/inc/classes/addonsoptions.hxx b/framework/inc/framework/addonsoptions.hxx similarity index 99% rename from framework/inc/classes/addonsoptions.hxx rename to framework/inc/framework/addonsoptions.hxx index 42428a97b398..6e41fcbafdd1 100644 --- a/framework/inc/classes/addonsoptions.hxx +++ b/framework/inc/framework/addonsoptions.hxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include //_________________________________________________________________________________________________________________ // types, enums, ... //_________________________________________________________________________________________________________________ diff --git a/framework/inc/classes/bmkmenu.hxx b/framework/inc/framework/bmkmenu.hxx similarity index 97% rename from framework/inc/classes/bmkmenu.hxx rename to framework/inc/framework/bmkmenu.hxx index 846a9d8b9ba4..db6e2977f8b5 100644 --- a/framework/inc/classes/bmkmenu.hxx +++ b/framework/inc/framework/bmkmenu.hxx @@ -27,13 +27,13 @@ #ifndef __FRAMEWORK_CLASSES_BMKMENU_HXX #define __FRAMEWORK_CLASSES_BMKMENU_HXX -#include "classes/addonmenu.hxx" +#include "framework/addonmenu.hxx" //_________________________________________________________________________________________________________________ // interface includes //_________________________________________________________________________________________________________________ #include -#include +#include //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ diff --git a/framework/inc/helper/configimporter.hxx b/framework/inc/framework/configimporter.hxx similarity index 98% rename from framework/inc/helper/configimporter.hxx rename to framework/inc/framework/configimporter.hxx index 8a8660cd0bb9..6038f7bdd325 100644 --- a/framework/inc/helper/configimporter.hxx +++ b/framework/inc/framework/configimporter.hxx @@ -34,7 +34,7 @@ #include #include -#include +#include namespace framework { diff --git a/framework/inc/xml/eventsconfiguration.hxx b/framework/inc/framework/eventsconfiguration.hxx similarity index 98% rename from framework/inc/xml/eventsconfiguration.hxx rename to framework/inc/framework/eventsconfiguration.hxx index 5b5b7080e450..4c07be58d1c7 100644 --- a/framework/inc/xml/eventsconfiguration.hxx +++ b/framework/inc/framework/eventsconfiguration.hxx @@ -28,7 +28,7 @@ #ifndef __FRAMEWORK_XML_EVENTSCONFIGURATION_HXX_ #define __FRAMEWORK_XML_EVENTSCONFIGURATION_HXX_ -#include +#include #include #include #include diff --git a/framework/inc/fwedllapi.h b/framework/inc/framework/fwedllapi.h similarity index 100% rename from framework/inc/fwedllapi.h rename to framework/inc/framework/fwedllapi.h diff --git a/framework/inc/helper/imageproducer.hxx b/framework/inc/framework/imageproducer.hxx similarity index 98% rename from framework/inc/helper/imageproducer.hxx rename to framework/inc/framework/imageproducer.hxx index 72e5636f5359..7fe78f0a78b6 100644 --- a/framework/inc/helper/imageproducer.hxx +++ b/framework/inc/framework/imageproducer.hxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include namespace framework { diff --git a/framework/inc/xml/imagesconfiguration.hxx b/framework/inc/framework/imagesconfiguration.hxx similarity index 99% rename from framework/inc/xml/imagesconfiguration.hxx rename to framework/inc/framework/imagesconfiguration.hxx index 4598f2e8ae58..91efb1034762 100644 --- a/framework/inc/xml/imagesconfiguration.hxx +++ b/framework/inc/framework/imagesconfiguration.hxx @@ -28,7 +28,7 @@ #ifndef __FRAMEWORK_XML_IMAGESCONFIGURATION_HXX_ #define __FRAMEWORK_XML_IMAGESCONFIGURATION_HXX_ -#include +#include #include #include #include diff --git a/framework/inc/dispatch/interaction.hxx b/framework/inc/framework/interaction.hxx similarity index 99% rename from framework/inc/dispatch/interaction.hxx rename to framework/inc/framework/interaction.hxx index f55f8ed39402..05c4303f4b8e 100644 --- a/framework/inc/dispatch/interaction.hxx +++ b/framework/inc/framework/interaction.hxx @@ -54,7 +54,7 @@ #include #include #include -#include +#include //_________________________________________________________________________________________________________________ // namespace diff --git a/framework/inc/xml/menuconfiguration.hxx b/framework/inc/framework/menuconfiguration.hxx similarity index 99% rename from framework/inc/xml/menuconfiguration.hxx rename to framework/inc/framework/menuconfiguration.hxx index e48f6b144c8f..dee6c23a8f8e 100644 --- a/framework/inc/xml/menuconfiguration.hxx +++ b/framework/inc/framework/menuconfiguration.hxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include //_________________________________________________________________________________________________________________ // includes of other projects diff --git a/framework/inc/classes/menuextensionsupplier.hxx b/framework/inc/framework/menuextensionsupplier.hxx similarity index 100% rename from framework/inc/classes/menuextensionsupplier.hxx rename to framework/inc/framework/menuextensionsupplier.hxx diff --git a/framework/inc/interaction/preventduplicateinteraction.hxx b/framework/inc/framework/preventduplicateinteraction.hxx similarity index 99% rename from framework/inc/interaction/preventduplicateinteraction.hxx rename to framework/inc/framework/preventduplicateinteraction.hxx index be5fea63da48..e7f26b354f28 100644 --- a/framework/inc/interaction/preventduplicateinteraction.hxx +++ b/framework/inc/framework/preventduplicateinteraction.hxx @@ -28,7 +28,7 @@ #ifndef __FRAMEWORK_INTERACTION_PREVENTDUPLICATEINTERACTION_HXX_ #define __FRAMEWORK_INTERACTION_PREVENTDUPLICATEINTERACTION_HXX_ -#include +#include //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ diff --git a/framework/inc/classes/sfxhelperfunctions.hxx b/framework/inc/framework/sfxhelperfunctions.hxx similarity index 99% rename from framework/inc/classes/sfxhelperfunctions.hxx rename to framework/inc/framework/sfxhelperfunctions.hxx index ecc05621a41a..7e58c375aa2c 100644 --- a/framework/inc/classes/sfxhelperfunctions.hxx +++ b/framework/inc/framework/sfxhelperfunctions.hxx @@ -28,7 +28,7 @@ #ifndef __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_HXX_ #define __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_HXX_ -#include +#include #include #include #include diff --git a/framework/inc/xml/statusbarconfiguration.hxx b/framework/inc/framework/statusbarconfiguration.hxx similarity index 99% rename from framework/inc/xml/statusbarconfiguration.hxx rename to framework/inc/framework/statusbarconfiguration.hxx index e1e20d5093d4..bd93831cba7a 100644 --- a/framework/inc/xml/statusbarconfiguration.hxx +++ b/framework/inc/framework/statusbarconfiguration.hxx @@ -27,7 +27,7 @@ #ifndef __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_ #define __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_ -#include +#include #include #include #include diff --git a/framework/inc/helper/titlehelper.hxx b/framework/inc/framework/titlehelper.hxx similarity index 99% rename from framework/inc/helper/titlehelper.hxx rename to framework/inc/framework/titlehelper.hxx index 8d7b361fcb76..592a419e0b75 100644 --- a/framework/inc/helper/titlehelper.hxx +++ b/framework/inc/framework/titlehelper.hxx @@ -51,7 +51,7 @@ #include #include -#include +#include //_______________________________________________ // namespace diff --git a/framework/inc/xml/toolboxconfiguration.hxx b/framework/inc/framework/toolboxconfiguration.hxx similarity index 98% rename from framework/inc/xml/toolboxconfiguration.hxx rename to framework/inc/framework/toolboxconfiguration.hxx index 2bf94c55b36a..453d94810fbc 100644 --- a/framework/inc/xml/toolboxconfiguration.hxx +++ b/framework/inc/framework/toolboxconfiguration.hxx @@ -27,7 +27,7 @@ #ifndef __FRAMEWORK_XML_TOOLBOXCONFIGURATION_HXX_ #define __FRAMEWORK_XML_TOOLBOXCONFIGURATION_HXX_ -#include +#include #include #include #include diff --git a/framework/inc/helper/propertysetcontainer.hxx b/framework/inc/helper/propertysetcontainer.hxx index 2ca9db63aaa9..d1c50d3d9a14 100644 --- a/framework/inc/helper/propertysetcontainer.hxx +++ b/framework/inc/helper/propertysetcontainer.hxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include namespace framework { diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx index b79d3d89b94f..d85f5ac295d0 100644 --- a/framework/inc/helper/uiconfigelementwrapperbase.hxx +++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx @@ -58,7 +58,7 @@ #include #include #include -#include +#include namespace framework { diff --git a/framework/inc/helper/uielementwrapperbase.hxx b/framework/inc/helper/uielementwrapperbase.hxx index bb2ebbd99aea..242a2553f47a 100644 --- a/framework/inc/helper/uielementwrapperbase.hxx +++ b/framework/inc/helper/uielementwrapperbase.hxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include namespace framework { diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 2ccba9e7ffde..0e62cd9f6aaf 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -49,7 +49,7 @@ #include #include #include -#include +#include //_________________________________________________________________________________________________________________ // interface includes diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index 773efafa52fe..f201c70d7bb0 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -72,7 +72,7 @@ #include #include #include -#include +#include namespace framework { diff --git a/framework/inc/xml/eventsdocumenthandler.hxx b/framework/inc/xml/eventsdocumenthandler.hxx index cac5c46b56ca..ffce5c1a348b 100644 --- a/framework/inc/xml/eventsdocumenthandler.hxx +++ b/framework/inc/xml/eventsdocumenthandler.hxx @@ -29,7 +29,7 @@ #define __FRAMEWORK_XML_EVENTSDOCUMENTHANDLER_HXX_ #ifndef __FRAMEWORK_XML_TOOLBOXCONFIGURATION_HXX_ -#include +#include #endif //_________________________________________________________________________________________________________________ @@ -50,7 +50,7 @@ #include #include -#include +#include //_________________________________________________________________________________________________________________ // namespace //_________________________________________________________________________________________________________________ diff --git a/framework/inc/xml/imagesdocumenthandler.hxx b/framework/inc/xml/imagesdocumenthandler.hxx index dbd5106e3441..59d1e4abdb3a 100644 --- a/framework/inc/xml/imagesdocumenthandler.hxx +++ b/framework/inc/xml/imagesdocumenthandler.hxx @@ -28,7 +28,7 @@ #ifndef __FRAMEWORK_XML_IMAGEDOCUMENTHANDLER_HXX_ #define __FRAMEWORK_XML_IMAGEDOCUMENTHANDLER_HXX_ -#include +#include //_________________________________________________________________________________________________________________ // interface includes @@ -41,7 +41,7 @@ //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ -#include +#include #include #include #include diff --git a/framework/inc/xml/menudocumenthandler.hxx b/framework/inc/xml/menudocumenthandler.hxx index 6a085aca3ec6..5c6064cdd4f1 100644 --- a/framework/inc/xml/menudocumenthandler.hxx +++ b/framework/inc/xml/menudocumenthandler.hxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include //_________________________________________________________________________________________________________________ // namespace diff --git a/framework/inc/xml/saxnamespacefilter.hxx b/framework/inc/xml/saxnamespacefilter.hxx index 33e08f0e3f6a..f4bdfcf677e9 100644 --- a/framework/inc/xml/saxnamespacefilter.hxx +++ b/framework/inc/xml/saxnamespacefilter.hxx @@ -36,7 +36,7 @@ #include #include -#include +#include //_________________________________________________________________________________________________________________ // namespace diff --git a/framework/inc/xml/statusbardocumenthandler.hxx b/framework/inc/xml/statusbardocumenthandler.hxx index d91e4d5f0e6d..82c2d0c55111 100644 --- a/framework/inc/xml/statusbardocumenthandler.hxx +++ b/framework/inc/xml/statusbardocumenthandler.hxx @@ -29,7 +29,7 @@ #define __FRAMEWORK_XML_STATUSBARDOCUMENTHANDLER_HXX_ #ifndef __FRAMEWORK_XML_STATUSBARCONFIGURATION_HXX_ -#include +#include #endif //_________________________________________________________________________________________________________________ @@ -49,7 +49,7 @@ #include #include -#include +#include //_________________________________________________________________________________________________________________ // namespace diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx index 297e6e24ccec..d90d91cee036 100644 --- a/framework/inc/xml/toolboxdocumenthandler.hxx +++ b/framework/inc/xml/toolboxdocumenthandler.hxx @@ -28,7 +28,7 @@ #ifndef __FRAMEWORK_XML_TOOLBOXDOCUMENTHANDLER_HXX_ #define __FRAMEWORK_XML_TOOLBOXDOCUMENTHANDLER_HXX_ -#include +#include //_________________________________________________________________________________________________________________ // interface includes @@ -43,7 +43,7 @@ #include #include #include -#include +#include //_________________________________________________________________________________________________________________ // namespace diff --git a/framework/inc/xml/toolboxlayoutdocumenthandler.hxx b/framework/inc/xml/toolboxlayoutdocumenthandler.hxx index 71a7843a0a9e..1aba4d192b85 100644 --- a/framework/inc/xml/toolboxlayoutdocumenthandler.hxx +++ b/framework/inc/xml/toolboxlayoutdocumenthandler.hxx @@ -28,7 +28,7 @@ #ifndef __FRAMEWORK_XML_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_ #define __FRAMEWORK_XML_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_ -#include +#include //_________________________________________________________________________________________________________________ // interface includes diff --git a/framework/inc/xml/xmlnamespaces.hxx b/framework/inc/xml/xmlnamespaces.hxx index a086af82e51f..bcb9ec4cb5e3 100644 --- a/framework/inc/xml/xmlnamespaces.hxx +++ b/framework/inc/xml/xmlnamespaces.hxx @@ -31,7 +31,7 @@ #include #include -#include +#include namespace framework { diff --git a/framework/prj/d.lst b/framework/prj/d.lst index bf17da0a7164..1afa9dd09637 100644 --- a/framework/prj/d.lst +++ b/framework/prj/d.lst @@ -27,26 +27,8 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar ..\%__SRC%\lib\ifwe.lib %_DEST%\lib%_EXT%\ifwe.lib ..\%__SRC%\lib\ifwi.lib %_DEST%\lib%_EXT%\ifwi.lib -..\inc\fwedllapi.h %_DEST%\inc%_EXT%\fwedllapi.h -..\inc\fwidllapi.h %_DEST%\inc%_EXT%\fwidllapi.h -..\inc\fwkdllapi.h %_DEST%\inc%_EXT%\fwkdllapi.h -..\inc\helper\imageproducer.hxx %_DEST%\inc%_EXT%\framework\imageproducer.hxx -..\inc\helper\acceleratorinfo.hxx %_DEST%\inc%_EXT%\framework\acceleratorinfo.hxx -..\inc\helper\actiontriggerhelper.hxx %_DEST%\inc%_EXT%\framework\actiontriggerhelper.hxx -..\inc\xml\menuconfiguration.hxx %_DEST%\inc%_EXT%\framework\menuconfiguration.hxx -..\inc\classes\bmkmenu.hxx %_DEST%\inc%_EXT%\framework\bmkmenu.hxx -..\inc\xml\toolboxconfiguration.hxx %_DEST%\inc%_EXT%\framework\toolboxconfiguration.hxx -..\inc\xml\statusbarconfiguration.hxx %_DEST%\inc%_EXT%\framework\statusbarconfiguration.hxx -..\inc\xml\eventsconfiguration.hxx %_DEST%\inc%_EXT%\framework\eventsconfiguration.hxx -..\inc\xml\imagesconfiguration.hxx %_DEST%\inc%_EXT%\framework\imagesconfiguration.hxx -..\inc\classes\addonsoptions.hxx %_DEST%\inc%_EXT%\framework\addonsoptions.hxx -..\inc\dispatch\interaction.hxx %_DEST%\inc%_EXT%\framework\interaction.hxx -..\inc\classes\addonmenu.hxx %_DEST%\inc%_EXT%\framework\addonmenu.hxx -..\inc\classes\sfxhelperfunctions.hxx %_DEST%\inc%_EXT%\framework\sfxhelperfunctions.hxx -..\inc\helper\configimporter.hxx %_DEST%\inc%_EXT%\framework\configimporter.hxx -..\inc\classes\menuextensionsupplier.hxx %_DEST%\inc%_EXT%\framework\menuextensionsupplier.hxx -..\inc\interaction\preventduplicateinteraction.hxx %_DEST%\inc%_EXT%\framework\preventduplicateinteraction.hxx -..\inc\helper\titlehelper.hxx %_DEST%\inc%_EXT%\framework\titlehelper.hxx +..\inc\framework/*.h %_DEST%\inc%_EXT%\*.h +..\inc\framework/*.hxx %_DEST%\inc%_EXT%\*.hxx ..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml ..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml diff --git a/framework/prj/target_package_inc.mk b/framework/prj/target_package_inc.mk index 32ae89b7b1be..e087c6038001 100644 --- a/framework/prj/target_package_inc.mk +++ b/framework/prj/target_package_inc.mk @@ -26,22 +26,22 @@ #************************************************************************* $(eval $(call gb_Package_Package,framework_inc,$(SRCDIR)/framework/inc)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/acceleratorinfo.hxx,helper/acceleratorinfo.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/actiontriggerhelper.hxx,helper/actiontriggerhelper.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/addonmenu.hxx,classes/addonmenu.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/addonsoptions.hxx,classes/addonsoptions.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/bmkmenu.hxx,classes/bmkmenu.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/configimporter.hxx,helper/configimporter.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/eventsconfiguration.hxx,xml/eventsconfiguration.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/imageproducer.hxx,helper/imageproducer.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/imagesconfiguration.hxx,xml/imagesconfiguration.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/interaction.hxx,dispatch/interaction.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/menuconfiguration.hxx,xml/menuconfiguration.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/menuextensionsupplier.hxx,classes/menuextensionsupplier.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/preventduplicateinteraction.hxx,interaction/preventduplicateinteraction.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/sfxhelperfunctions.hxx,classes/sfxhelperfunctions.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/titlehelper.hxx,helper/titlehelper.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/toolboxconfiguration.hxx,xml/toolboxconfiguration.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/fwedllapi.h,fwedllapi.h)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/acceleratorinfo.hxx,framework/acceleratorinfo.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/actiontriggerhelper.hxx,framework/actiontriggerhelper.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/addonmenu.hxx,framework/addonmenu.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/addonsoptions.hxx,framework/addonsoptions.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/bmkmenu.hxx,framework/bmkmenu.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/configimporter.hxx,framework/configimporter.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/eventsconfiguration.hxx,framework/eventsconfiguration.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/imageproducer.hxx,framework/imageproducer.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/imagesconfiguration.hxx,framework/imagesconfiguration.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/interaction.hxx,framework/interaction.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/menuconfiguration.hxx,framework/menuconfiguration.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/menuextensionsupplier.hxx,framework/menuextensionsupplier.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/preventduplicateinteraction.hxx,framework/preventduplicateinteraction.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/sfxhelperfunctions.hxx,framework/sfxhelperfunctions.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/titlehelper.hxx,framework/titlehelper.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/toolboxconfiguration.hxx,framework/toolboxconfiguration.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/fwedllapi.h,fwedllapi.h)) $(eval $(call gb_Package_add_file,framework_inc,inc/fwkdllapi.h,fwkdllapi.h)) $(eval $(call gb_Package_add_file,framework_inc,inc/fwidllapi.h,fwidllapi.h)) diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index 0b2f30093ca8..3979d72b1e62 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -33,12 +33,12 @@ // my own includes //_________________________________________________________________________________________________________________ #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include "classes/addonsoptions.hxx" +#include "framework/addonsoptions.hxx" #include #include #include "classes/resource.hrc" diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx index 718830545db2..d55556b23f65 100644 --- a/framework/source/dispatch/menudispatcher.cxx +++ b/framework/source/dispatch/menudispatcher.cxx @@ -33,8 +33,8 @@ //_________________________________________________________________________________________________________________ #include #include -#include -#include +#include +#include #include //_________________________________________________________________________________________________________________ diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx index 834d11017ec8..8437b82961ea 100644 --- a/framework/source/dispatch/popupmenudispatcher.cxx +++ b/framework/source/dispatch/popupmenudispatcher.cxx @@ -34,8 +34,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx index 4961a8f7c1f2..c3c328c3626e 100644 --- a/framework/source/fwe/classes/addonmenu.cxx +++ b/framework/source/fwe/classes/addonmenu.cxx @@ -31,12 +31,12 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ -#include "classes/addonmenu.hxx" -#include "classes/addonsoptions.hxx" +#include "framework/addonmenu.hxx" +#include "framework/addonsoptions.hxx" #include #include -#include -#include +#include +#include //_________________________________________________________________________________________________________________ // interface includes diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 9bdaeb7dfda3..1d947c651a67 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -31,7 +31,7 @@ //_________________________________________________________________________________________________________________ // includes //_________________________________________________________________________________________________________________ -#include +#include #include #include #include diff --git a/framework/source/fwe/classes/bmkmenu.cxx b/framework/source/fwe/classes/bmkmenu.cxx index aa2aef3b9d2b..78ddb606585b 100644 --- a/framework/source/fwe/classes/bmkmenu.cxx +++ b/framework/source/fwe/classes/bmkmenu.cxx @@ -34,11 +34,11 @@ #include -#include "classes/bmkmenu.hxx" +#include "framework/bmkmenu.hxx" #include #include -#include -#include +#include +#include //_________________________________________________________________________________________________________________ // interface includes diff --git a/framework/source/fwe/classes/menuextensionsupplier.cxx b/framework/source/fwe/classes/menuextensionsupplier.cxx index 07991c61f90f..3849a34d5425 100644 --- a/framework/source/fwe/classes/menuextensionsupplier.cxx +++ b/framework/source/fwe/classes/menuextensionsupplier.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include #include static pfunc_setMenuExtensionSupplier pMenuExtensionSupplierFunc = NULL; diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index c78d398b39a7..cdcc9aea5e1f 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/framework/source/fwe/classes/sfxhelperfunctions.cxx b/framework/source/fwe/classes/sfxhelperfunctions.cxx index 9ea0ced2c955..a6171f4219b6 100644 --- a/framework/source/fwe/classes/sfxhelperfunctions.cxx +++ b/framework/source/fwe/classes/sfxhelperfunctions.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include static pfunc_setToolBoxControllerCreator pToolBoxControllerCreator = NULL; static pfunc_setStatusBarControllerCreator pStatusBarControllerCreator = NULL; diff --git a/framework/source/fwe/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx index bb17b23eb2a1..528bf855ab58 100644 --- a/framework/source/fwe/dispatch/interaction.cxx +++ b/framework/source/fwe/dispatch/interaction.cxx @@ -31,7 +31,7 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ -#include +#include #include //_________________________________________________________________________________________________________________ diff --git a/framework/source/fwe/helper/acceleratorinfo.cxx b/framework/source/fwe/helper/acceleratorinfo.cxx index 3db17cf1db89..5774bc35a253 100644 --- a/framework/source/fwe/helper/acceleratorinfo.cxx +++ b/framework/source/fwe/helper/acceleratorinfo.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include namespace framework { diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx index b1c4e50dfe00..7de57599dd4b 100644 --- a/framework/source/fwe/helper/actiontriggerhelper.cxx +++ b/framework/source/fwe/helper/actiontriggerhelper.cxx @@ -27,11 +27,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/framework/source/fwe/helper/configimporter.cxx b/framework/source/fwe/helper/configimporter.cxx index 6f2c402da1e8..0b7571416c9d 100644 --- a/framework/source/fwe/helper/configimporter.cxx +++ b/framework/source/fwe/helper/configimporter.cxx @@ -28,8 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include -#include +#include +#include #include #include diff --git a/framework/source/fwe/helper/imageproducer.cxx b/framework/source/fwe/helper/imageproducer.cxx index 7870697f42a1..97ad3063fb3c 100644 --- a/framework/source/fwe/helper/imageproducer.cxx +++ b/framework/source/fwe/helper/imageproducer.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include namespace framework { diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index 1ca884c27ca7..d9191da2be2e 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -31,7 +31,7 @@ //_______________________________________________ // includes -#include +#include #include #include diff --git a/framework/source/fwe/interaction/preventduplicateinteraction.cxx b/framework/source/fwe/interaction/preventduplicateinteraction.cxx index 6d0185a48080..7bc2201a3a27 100644 --- a/framework/source/fwe/interaction/preventduplicateinteraction.cxx +++ b/framework/source/fwe/interaction/preventduplicateinteraction.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include "interaction/preventduplicateinteraction.hxx" +#include "framework/preventduplicateinteraction.hxx" //_________________________________________________________________________________________________________________ // my own includes diff --git a/framework/source/fwe/xml/eventsconfiguration.cxx b/framework/source/fwe/xml/eventsconfiguration.cxx index 75a024eb8405..873682f60345 100644 --- a/framework/source/fwe/xml/eventsconfiguration.cxx +++ b/framework/source/fwe/xml/eventsconfiguration.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include #include #include diff --git a/framework/source/fwe/xml/eventsdocumenthandler.cxx b/framework/source/fwe/xml/eventsdocumenthandler.cxx index 30d584ca71ad..ad21937fcc5d 100644 --- a/framework/source/fwe/xml/eventsdocumenthandler.cxx +++ b/framework/source/fwe/xml/eventsdocumenthandler.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include #include //_________________________________________________________________________________________________________________ diff --git a/framework/source/fwe/xml/imagesconfiguration.cxx b/framework/source/fwe/xml/imagesconfiguration.cxx index 75517d2766dd..d561a76d5995 100644 --- a/framework/source/fwe/xml/imagesconfiguration.cxx +++ b/framework/source/fwe/xml/imagesconfiguration.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include #include #ifndef __FRAMEWORK_CLASSES_IMAGESDOCUMENTHANDLER_HXX_ diff --git a/framework/source/fwe/xml/menuconfiguration.cxx b/framework/source/fwe/xml/menuconfiguration.cxx index 010c96349d8c..4493d5f80ec9 100644 --- a/framework/source/fwe/xml/menuconfiguration.cxx +++ b/framework/source/fwe/xml/menuconfiguration.cxx @@ -31,12 +31,12 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ -#include +#include #ifndef __FRAMEWORK_CLASSES_BMKMENU_HXX_ -#include +#include #endif -#include +#include #include #include #include diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index 90f5fb25dec3..b3decdde9859 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -34,8 +34,8 @@ // my own includes //_________________________________________________________________________________________________________________ #include -#include -#include +#include +#include //_________________________________________________________________________________________________________________ // interface includes diff --git a/framework/source/fwe/xml/statusbarconfiguration.cxx b/framework/source/fwe/xml/statusbarconfiguration.cxx index 2b9d3e5baa58..0d79ef8fd461 100644 --- a/framework/source/fwe/xml/statusbarconfiguration.cxx +++ b/framework/source/fwe/xml/statusbarconfiguration.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include #include #include #include diff --git a/framework/source/fwe/xml/toolboxconfiguration.cxx b/framework/source/fwe/xml/toolboxconfiguration.cxx index 9cd1f25c3df5..00ef4111ad55 100644 --- a/framework/source/fwe/xml/toolboxconfiguration.cxx +++ b/framework/source/fwe/xml/toolboxconfiguration.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include +#include #include #include #include diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 458368bd6581..d4db2d70e771 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -40,9 +40,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index b9f1d2c8a09a..365ac2efacbc 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -39,7 +39,7 @@ #ifndef __FRAMEWORK_CONSTANT_FILTER_HXX_ #include #endif -#include +#include #ifndef __FRAMEWORK_CONSTANT_FRAMELOADER_HXX_ #include @@ -59,7 +59,7 @@ #include #include #include -#include +#include //_______________________________________________ // includes of uno interface diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index 13c5647341e6..627f26e0549c 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 18d5a1c31bef..dbdc3875df9b 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/framework/source/services/menudocumenthandler.cxx b/framework/source/services/menudocumenthandler.cxx index 8741fff39320..addf79a965a5 100644 --- a/framework/source/services/menudocumenthandler.cxx +++ b/framework/source/services/menudocumenthandler.cxx @@ -31,7 +31,7 @@ #include #include #include -#include +#include #ifndef __FRAMEWORK_SERVICES_ATTRIBUTELIST_HXX_ #include diff --git a/framework/source/uiconfiguration/imagemanager.cxx b/framework/source/uiconfiguration/imagemanager.cxx index fc18c2ac95ce..2a57e72e1ce4 100644 --- a/framework/source/uiconfiguration/imagemanager.cxx +++ b/framework/source/uiconfiguration/imagemanager.cxx @@ -29,7 +29,7 @@ #include "precompiled_framework.hxx" #include #include -#include +#include #include #include #include "imagemanagerimpl.hxx" diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index 24e19977c680..a5304a9d64df 100755 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -29,7 +29,7 @@ #include "precompiled_framework.hxx" #include #include -#include +#include #include #include diff --git a/framework/source/uiconfiguration/moduleimagemanager.cxx b/framework/source/uiconfiguration/moduleimagemanager.cxx index d76fdcf4c67f..fc90dd102912 100644 --- a/framework/source/uiconfiguration/moduleimagemanager.cxx +++ b/framework/source/uiconfiguration/moduleimagemanager.cxx @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include "imagemanagerimpl.hxx" diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 8840aee6a634..d262c344d711 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -33,11 +33,11 @@ #include #include #include -#include -#include +#include +#include #ifndef __FRAMEWORK_XML_STATUSBARCONFIGURATION_HXX_ -#include +#include #endif //_________________________________________________________________________________________________________________ diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 4adebdd36c47..df2495dd6bb1 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -33,11 +33,11 @@ #include #include #include -#include -#include +#include +#include #ifndef __FRAMEWORK_XML_STATUSBARCONFIGURATION_HXX_ -#include +#include #endif //_________________________________________________________________________________________________________________ diff --git a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx index 5b875d82f25a..eee01dad72c7 100755 --- a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx @@ -33,12 +33,12 @@ #include #include #include -#include -#include +#include +#include #include #ifndef __FRAMEWORK_XML_STATUSBARCONFIGURATION_HXX_ -#include +#include #endif //_________________________________________________________________________________________________________________ diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index 0c4c610bd4b0..c4ba41372cd5 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -43,13 +43,13 @@ #endif #include #include "services.h" -#include -#include +#include +#include #include #ifndef __FRAMEWORK_CLASES_RESOURCE_HRC_ #include #endif -#include +#include #ifndef __FRAMEWORK_UIELEMENT_COMBOBOXTOOLBARCONTROLLER_HXX #include #endif diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index 315d1b6e0bf8..52478f278544 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 3f37050e6780..6b3b06071e90 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -65,7 +65,7 @@ #include #include -#include +#include #include using namespace ::com::sun::star::awt; diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index d9af2fb4f9f9..887002335ff8 100644 --- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx @@ -35,7 +35,7 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ -#include +#include #ifndef __FRAMEWORK_TOOLBAR_HXX_ #include "uielement/toolbar.hxx" #endif diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index f0f5d52a47d6..7424b871a05f 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -34,7 +34,7 @@ #include "services.h" #include #include -#include +#include #include #include #include diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 9fbdf87336cc..40473d0775a1 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -33,17 +33,17 @@ // my own includes //_________________________________________________________________________________________________________________ #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include "classes/addonsoptions.hxx" +#include "framework/addonsoptions.hxx" #include #include -#include +#include #include -#include +#include #include #include @@ -97,7 +97,7 @@ #include #include #include "svtools/miscopt.hxx" -#include +#include #include #include diff --git a/framework/source/uielement/menubarmerger.cxx b/framework/source/uielement/menubarmerger.cxx index f82253345778..d1d3b9b427e0 100644 --- a/framework/source/uielement/menubarmerger.cxx +++ b/framework/source/uielement/menubarmerger.cxx @@ -29,7 +29,7 @@ #include "precompiled_framework.hxx" #include -#include +#include using namespace ::com::sun::star; diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index da3092c2c725..887a1c388752 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -33,7 +33,7 @@ //_________________________________________________________________________________________________________________ #include #include -#include +#include #include //_________________________________________________________________________________________________________________ diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 3ac78726d799..3007816ad888 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -38,9 +38,9 @@ #include #endif #include -#include -#include -#include +#include +#include +#include //_________________________________________________________________________________________________________________ // interface includes diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index cb9cbb2896f7..b6c4251ffaf9 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -35,7 +35,7 @@ //_________________________________________________________________________________________________________________ #include #include -#include +#include #include #include #include diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index 030a790b35e3..3002a340dfef 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -34,7 +34,7 @@ // my own includes //_________________________________________________________________________________________________________________ #include -#include +#include #include #include #include diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index a5e4263385fa..5230cf9bbd6e 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -35,7 +35,7 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ -#include +#include #ifndef __FRAMEWORK_TOOLBAR_HXX_ #include "uielement/toolbar.hxx" #endif diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index d89b81c0f9b6..b6ce3a526156 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -44,13 +44,13 @@ #include "services.h" #include "general.h" #include "properties.h" -#include -#include +#include +#include #include #ifndef __FRAMEWORK_CLASES_RESOURCE_HRC_ #include #endif -#include +#include #include //_________________________________________________________________________________________________________________ diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx index 83f280cb46a7..d1cfdac9090a 100644 --- a/framework/source/uielement/toolbarmerger.cxx +++ b/framework/source/uielement/toolbarmerger.cxx @@ -30,7 +30,7 @@ #include #include -#include +#include #include diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 02402205bd1c..90c372a9ff62 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -41,8 +41,8 @@ #endif #include #include -#include -#include +#include +#include //_________________________________________________________________________________________________________________ // interface includes diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 0e73b5616aa7..9f5593183e09 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include From 0944bd42777b0657fb64ecc09265e802f0747ff9 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 20 Apr 2010 08:28:42 +0200 Subject: [PATCH 012/279] CWS gnumake2: move all delivered linguistic headers to inc/linguistic --- linguistic/inc/{ => linguistic}/hyphdta.hxx | 0 linguistic/inc/{ => linguistic}/lngprophelp.hxx | 0 linguistic/inc/{ => linguistic}/lngprops.hxx | 0 linguistic/inc/{ => linguistic}/misc.hxx | 0 linguistic/inc/{ => linguistic}/spelldta.hxx | 0 linguistic/prj/d.lst | 2 +- linguistic/source/convdic.cxx | 2 +- linguistic/source/convdic.hxx | 2 +- linguistic/source/convdiclist.cxx | 2 +- linguistic/source/convdiclist.hxx | 2 +- linguistic/source/convdicxml.cxx | 2 +- linguistic/source/convdicxml.hxx | 2 +- linguistic/source/dicimp.hxx | 2 +- linguistic/source/dlistimp.hxx | 2 +- linguistic/source/gciterator.cxx | 2 +- linguistic/source/grammarchecker.cxx | 2 +- linguistic/source/hhconvdic.cxx | 2 +- linguistic/source/hhconvdic.hxx | 2 +- linguistic/source/hyphdsp.cxx | 4 ++-- linguistic/source/hyphdsp.hxx | 2 +- linguistic/source/hyphdta.cxx | 6 +++--- linguistic/source/iprcache.cxx | 4 ++-- linguistic/source/lngopt.cxx | 4 ++-- linguistic/source/lngopt.hxx | 2 +- linguistic/source/lngprophelp.cxx | 6 +++--- linguistic/source/lngsvcmgr.cxx | 2 +- linguistic/source/lngsvcmgr.hxx | 2 +- linguistic/source/misc.cxx | 6 +++--- linguistic/source/misc2.cxx | 2 +- linguistic/source/spelldsp.cxx | 4 ++-- linguistic/source/spelldsp.hxx | 2 +- linguistic/source/spelldta.cxx | 2 +- linguistic/source/thesdsp.cxx | 2 +- linguistic/source/thesdta.cxx | 2 +- linguistic/workben/sprophelp.cxx | 4 ++-- linguistic/workben/sspellimp.cxx | 4 ++-- linguistic/workben/sspellimp.hxx | 2 +- 37 files changed, 44 insertions(+), 44 deletions(-) rename linguistic/inc/{ => linguistic}/hyphdta.hxx (100%) rename linguistic/inc/{ => linguistic}/lngprophelp.hxx (100%) rename linguistic/inc/{ => linguistic}/lngprops.hxx (100%) rename linguistic/inc/{ => linguistic}/misc.hxx (100%) rename linguistic/inc/{ => linguistic}/spelldta.hxx (100%) diff --git a/linguistic/inc/hyphdta.hxx b/linguistic/inc/linguistic/hyphdta.hxx similarity index 100% rename from linguistic/inc/hyphdta.hxx rename to linguistic/inc/linguistic/hyphdta.hxx diff --git a/linguistic/inc/lngprophelp.hxx b/linguistic/inc/linguistic/lngprophelp.hxx similarity index 100% rename from linguistic/inc/lngprophelp.hxx rename to linguistic/inc/linguistic/lngprophelp.hxx diff --git a/linguistic/inc/lngprops.hxx b/linguistic/inc/linguistic/lngprops.hxx similarity index 100% rename from linguistic/inc/lngprops.hxx rename to linguistic/inc/linguistic/lngprops.hxx diff --git a/linguistic/inc/misc.hxx b/linguistic/inc/linguistic/misc.hxx similarity index 100% rename from linguistic/inc/misc.hxx rename to linguistic/inc/linguistic/misc.hxx diff --git a/linguistic/inc/spelldta.hxx b/linguistic/inc/linguistic/spelldta.hxx similarity index 100% rename from linguistic/inc/spelldta.hxx rename to linguistic/inc/linguistic/spelldta.hxx diff --git a/linguistic/prj/d.lst b/linguistic/prj/d.lst index 01a755e53cc6..c0641294a333 100644 --- a/linguistic/prj/d.lst +++ b/linguistic/prj/d.lst @@ -7,4 +7,4 @@ ..\xml\*.xml %_DEST%\xml%_EXT%\*.xml mkdir: %_DEST%\inc%_EXT%\linguistic -..\inc\*.hxx %_DEST%\inc%_EXT%\linguistic\*.hxx +..\inc\linguistic\*.hxx %_DEST%\inc%_EXT%\linguistic\*.hxx diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index 0b7245eb3019..e7c52b500817 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -66,7 +66,7 @@ #include "convdic.hxx" #include "convdicxml.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" using namespace std; diff --git a/linguistic/source/convdic.hxx b/linguistic/source/convdic.hxx index c0a22da8a1f1..983b06704653 100644 --- a/linguistic/source/convdic.hxx +++ b/linguistic/source/convdic.hxx @@ -38,7 +38,7 @@ #include #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" // text conversion dictionary extension diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index c1280fc799b0..86c8e25b787c 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -52,7 +52,7 @@ #include "convdiclist.hxx" #include "convdic.hxx" #include "hhconvdic.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" //using namespace utl; diff --git a/linguistic/source/convdiclist.hxx b/linguistic/source/convdiclist.hxx index d1c0740d991f..dec9103d1d51 100644 --- a/linguistic/source/convdiclist.hxx +++ b/linguistic/source/convdiclist.hxx @@ -36,7 +36,7 @@ #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "lngopt.hxx" diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx index f3d56f7024a9..30ced3ca02cb 100644 --- a/linguistic/source/convdicxml.cxx +++ b/linguistic/source/convdicxml.cxx @@ -58,7 +58,7 @@ #include "convdic.hxx" #include "convdicxml.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" using namespace std; diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx index eca7e9e48ce6..d005d51a4b28 100644 --- a/linguistic/source/convdicxml.hxx +++ b/linguistic/source/convdicxml.hxx @@ -38,7 +38,7 @@ #include #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx index eca18c2166d3..5952c6ca0247 100644 --- a/linguistic/source/dicimp.hxx +++ b/linguistic/source/dicimp.hxx @@ -40,7 +40,7 @@ #include #include "defs.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" /////////////////////////////////////////////////////////////////////////// diff --git a/linguistic/source/dlistimp.hxx b/linguistic/source/dlistimp.hxx index c93cd6b907c6..0674210d8494 100644 --- a/linguistic/source/dlistimp.hxx +++ b/linguistic/source/dlistimp.hxx @@ -41,7 +41,7 @@ #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "lngopt.hxx" class DicEvtListenerHelper; diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index 6485e6e841b7..7fbeecad0622 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -67,7 +67,7 @@ #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" #include "lngopt.hxx" diff --git a/linguistic/source/grammarchecker.cxx b/linguistic/source/grammarchecker.cxx index 21e1b7a58a3c..5dc23d6f2a0f 100644 --- a/linguistic/source/grammarchecker.cxx +++ b/linguistic/source/grammarchecker.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" #include #include diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx index 207284230b4c..8f0e1f8736b8 100644 --- a/linguistic/source/hhconvdic.cxx +++ b/linguistic/source/hhconvdic.cxx @@ -48,7 +48,7 @@ #include #include "hhconvdic.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" using namespace utl; diff --git a/linguistic/source/hhconvdic.hxx b/linguistic/source/hhconvdic.hxx index 9bdecf0903fc..8d30ea2fd812 100644 --- a/linguistic/source/hhconvdic.hxx +++ b/linguistic/source/hhconvdic.hxx @@ -35,7 +35,7 @@ #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" #include "convdic.hxx" diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index 441d3ff449e9..2d234fdc15fa 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -42,8 +42,8 @@ #include #include "hyphdsp.hxx" -#include "hyphdta.hxx" -#include "lngprops.hxx" +#include "linguistic/hyphdta.hxx" +#include "linguistic/lngprops.hxx" #include "lngsvcmgr.hxx" diff --git a/linguistic/source/hyphdsp.hxx b/linguistic/source/hyphdsp.hxx index a722e9046c3c..416715943c9e 100644 --- a/linguistic/source/hyphdsp.hxx +++ b/linguistic/source/hyphdsp.hxx @@ -45,7 +45,7 @@ #include #include "lngopt.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" class LngSvcMgr; diff --git a/linguistic/source/hyphdta.cxx b/linguistic/source/hyphdta.cxx index 66c3ca3f7775..503d646de117 100644 --- a/linguistic/source/hyphdta.cxx +++ b/linguistic/source/hyphdta.cxx @@ -28,9 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_linguistic.hxx" -#include "hyphdta.hxx" -#include "lngprops.hxx" -#include "misc.hxx" +#include "linguistic/hyphdta.hxx" +#include "linguistic/lngprops.hxx" +#include "linguistic/misc.hxx" #include diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx index e4c50686afcf..6556fc71d052 100644 --- a/linguistic/source/iprcache.cxx +++ b/linguistic/source/iprcache.cxx @@ -31,7 +31,7 @@ #include #include "iprcache.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" #include #include @@ -57,7 +57,7 @@ #endif #include -#include +#include using namespace utl; using namespace osl; diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx index 77a1fcbd57b0..cc4f60e3b16f 100644 --- a/linguistic/source/lngopt.cxx +++ b/linguistic/source/lngopt.cxx @@ -29,8 +29,8 @@ #include "precompiled_linguistic.hxx" #include "lngopt.hxx" -#include "lngprops.hxx" -#include "misc.hxx" +#include "linguistic/lngprops.hxx" +#include "linguistic/misc.hxx" #include #include diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx index 7e86f31fc437..7f14142a4519 100644 --- a/linguistic/source/lngopt.hxx +++ b/linguistic/source/lngopt.hxx @@ -45,7 +45,7 @@ #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" #include diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx index 91b1a7ff8ebc..0efcf94a0b13 100644 --- a/linguistic/source/lngprophelp.cxx +++ b/linguistic/source/lngprophelp.cxx @@ -36,10 +36,10 @@ #include #include -#include -#include +#include +#include -#include +#include //using namespace utl; diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 90e433f50f07..db423e5725ec 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -47,7 +47,7 @@ #include "lngsvcmgr.hxx" #include "lngopt.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "spelldsp.hxx" #include "hyphdsp.hxx" #include "thesdsp.hxx" diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx index 953e531960bf..b8e0427ae328 100644 --- a/linguistic/source/lngsvcmgr.hxx +++ b/linguistic/source/lngsvcmgr.hxx @@ -42,7 +42,7 @@ //#include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" class SpellCheckerDispatcher; diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index 7fb35b26a908..25c2a7f6b374 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -53,10 +53,10 @@ #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "defs.hxx" -#include "lngprops.hxx" -#include "hyphdta.hxx" +#include "linguistic/lngprops.hxx" +#include "linguistic/hyphdta.hxx" #include using namespace utl; diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx index df7bc2f9f636..16874c4ff830 100644 --- a/linguistic/source/misc2.cxx +++ b/linguistic/source/misc2.cxx @@ -44,7 +44,7 @@ #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" using namespace com::sun::star; diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index 2c9c99296ad7..9f1f969f7237 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -43,9 +43,9 @@ #include #include "spelldsp.hxx" -#include "spelldta.hxx" +#include "linguistic/spelldta.hxx" #include "lngsvcmgr.hxx" -#include "lngprops.hxx" +#include "linguistic/lngprops.hxx" using namespace utl; diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx index 28807ac7a800..7ae83d3dbc6f 100644 --- a/linguistic/source/spelldsp.hxx +++ b/linguistic/source/spelldsp.hxx @@ -29,7 +29,7 @@ #define _LINGUISTIC_SPELLDSP_HXX_ #include "lngopt.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "iprcache.hxx" #include // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx index cb7578f54852..fb4c11c892c6 100644 --- a/linguistic/source/spelldta.cxx +++ b/linguistic/source/spelldta.cxx @@ -37,7 +37,7 @@ #include -#include "spelldta.hxx" +#include "linguistic/spelldta.hxx" #include "lngsvcmgr.hxx" diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx index 6bd61ef408dd..91aab5c0997e 100644 --- a/linguistic/source/thesdsp.cxx +++ b/linguistic/source/thesdsp.cxx @@ -38,7 +38,7 @@ #include #include "thesdsp.hxx" -#include "lngprops.hxx" +#include "linguistic/lngprops.hxx" using namespace utl; using namespace osl; diff --git a/linguistic/source/thesdta.cxx b/linguistic/source/thesdta.cxx index 85a57e000f3e..e7aa3bf310f8 100644 --- a/linguistic/source/thesdta.cxx +++ b/linguistic/source/thesdta.cxx @@ -30,7 +30,7 @@ #include #include -#include +#include #include "thesdta.hxx" diff --git a/linguistic/workben/sprophelp.cxx b/linguistic/workben/sprophelp.cxx index 0a02bc22bb58..dcfa1d240cde 100644 --- a/linguistic/workben/sprophelp.cxx +++ b/linguistic/workben/sprophelp.cxx @@ -28,10 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_linguistic.hxx" -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "sprophelp.hxx" -#include "lngprops.hxx" +#include "linguistic/lngprops.hxx" #include #include diff --git a/linguistic/workben/sspellimp.cxx b/linguistic/workben/sspellimp.cxx index 81981093e2f8..38123a144655 100644 --- a/linguistic/workben/sspellimp.cxx +++ b/linguistic/workben/sspellimp.cxx @@ -41,8 +41,8 @@ #include #endif -#include "lngprops.hxx" -#include "spelldta.hxx" +#include "linguistic/lngprops.hxx" +#include "linguistic/spelldta.hxx" using namespace utl; using namespace osl; diff --git a/linguistic/workben/sspellimp.hxx b/linguistic/workben/sspellimp.hxx index df37c403572f..e6796afc6356 100644 --- a/linguistic/workben/sspellimp.hxx +++ b/linguistic/workben/sspellimp.hxx @@ -42,7 +42,7 @@ #include #include -#include "misc.hxx" +#include "linguistic/misc.hxx" #include "sprophelp.hxx" using namespace ::rtl; From 0ef50bb978300c751b4c0d1efa5f7f656e4cd9d0 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 20 Apr 2010 15:55:51 +0200 Subject: [PATCH 013/279] CWS gnumake2: move all delivered headers in svx to inc/svx; remove unused or useless headers --- svx/inc/galbrws2.hxx | 2 +- svx/inc/globlac.hrc | 223 ------- svx/inc/srchitem.hxx | 34 -- .../{ => svx}/ActionDescriptionProvider.hxx | 0 svx/inc/{ => svx}/DescriptionGenerator.hxx | 0 .../svx}/EnhancedCustomShape2d.hxx | 0 .../svx}/EnhancedCustomShapeGeometry.hxx | 0 .../svx}/EnhancedCustomShapeTypeNames.hxx | 0 svx/inc/{ => svx}/ParseContext.hxx | 0 svx/inc/{ => svx}/UnoNamespaceMap.hxx | 0 svx/inc/{ => svx}/XPropertyTable.hxx | 0 svx/inc/{ => svx}/anchorid.hxx | 0 svx/inc/{ => svx}/chrtitem.hxx | 0 svx/inc/{ => svx}/clipboardctl.hxx | 0 svx/inc/{ => svx}/clipfmtitem.hxx | 0 svx/inc/{ => svx}/connctrl.hxx | 0 svx/inc/{ => svx}/databaseregistrationui.hxx | 0 svx/inc/{ => svx}/dbexch.hrc | 0 svx/inc/{ => svx}/dialcontrol.hxx | 0 svx/inc/{ => svx}/dlgutil.hxx | 0 svx/inc/{ => svx}/drawitem.hxx | 0 svx/inc/{ => svx}/extrusioncontrols.hxx | 0 svx/inc/{ => svx}/flagsdef.hxx | 0 svx/inc/{ => svx}/fmgridif.hxx | 0 svx/inc/{ => svx}/fmobjfac.hxx | 0 svx/{source/inc => inc/svx}/fmresids.hrc | 0 svx/{source/inc => inc/svx}/fmsrccfg.hxx | 0 svx/{source/inc => inc/svx}/fmsrcimp.hxx | 0 svx/inc/{ => svx}/fontlb.hxx | 0 svx/inc/{ => svx}/fontworkgallery.hxx | 0 svx/inc/{ => svx}/formatpaintbrushctrl.hxx | 0 svx/inc/{ => svx}/galbrws.hxx | 0 svx/inc/{ => svx}/galctrl.hxx | 0 svx/inc/{ => svx}/gallery.hxx | 0 svx/inc/{ => svx}/galtheme.hxx | 0 svx/inc/{ => svx}/globl3d.hxx | 0 svx/inc/{ => svx}/grafctrl.hxx | 0 svx/inc/{ => svx}/hlnkitem.hxx | 0 svx/inc/{ => svx}/htmlmode.hxx | 0 svx/inc/{ => svx}/hyperdlg.hxx | 0 svx/{source/dialog => inc/svx}/hyprlink.hxx | 0 svx/inc/{ => svx}/imapdlg.hxx | 0 svx/inc/{ => svx}/insctrl.hxx | 0 svx/inc/{ => svx}/layctrl.hxx | 0 svx/inc/{ => svx}/lboxctrl.hxx | 0 svx/inc/{ => svx}/linectrl.hxx | 0 svx/inc/{ => svx}/measctrl.hxx | 0 svx/inc/{ => svx}/modctrl.hxx | 0 svx/inc/{ => svx}/numvset.hxx | 0 svx/inc/{ => svx}/objfac3d.hxx | 0 svx/inc/{ => svx}/ofaitem.hxx | 0 svx/inc/{ => svx}/optgenrl.hxx | 0 svx/inc/{ => svx}/optgrid.hxx | 0 svx/inc/{ => svx}/orienthelper.hxx | 0 svx/inc/{ => svx}/passwd.hxx | 0 svx/inc/{ => svx}/pfiledlg.hxx | 0 svx/inc/{ => svx}/postattr.hxx | 0 svx/inc/{ => svx}/prtqry.hxx | 0 svx/inc/{ => svx}/pszctrl.hxx | 0 svx/inc/{ => svx}/relfld.hxx | 0 svx/inc/{ => svx}/rotmodit.hxx | 0 svx/inc/{ => svx}/rubydialog.hxx | 0 svx/inc/{ => svx}/rulritem.hxx | 0 svx/inc/{ => svx}/sdrpaintwindow.hxx | 0 svx/inc/{ => svx}/selctrl.hxx | 0 svx/inc/{ => svx}/srchdlg.hxx | 2 +- svx/inc/{ => svx}/svdglob.hxx | 0 svx/inc/{ => svx}/svditer.hxx | 0 svx/{source/svdraw => inc/svx}/svditext.hxx | 0 svx/inc/{ => svx}/svdstr.hrc | 0 svx/inc/{ => svx}/svdviter.hxx | 0 svx/inc/{ => svx}/svimbase.hxx | 0 svx/inc/{ => svx}/svxerr.hxx | 0 svx/inc/{ => svx}/svxgrahicitem.hxx | 0 svx/inc/{ => svx}/swframeexample.hxx | 0 svx/inc/{ => svx}/swframeposstrings.hxx | 0 svx/inc/{ => svx}/swframevalidation.hxx | 0 svx/inc/{ => svx}/tbxalign.hxx | 0 svx/inc/{ => svx}/tbxcolor.hxx | 0 svx/inc/{ => svx}/tbxctl.hxx | 0 svx/inc/{ => svx}/tbxcustomshapes.hxx | 0 svx/inc/{ => svx}/tbxdraw.hxx | 0 svx/inc/{ => svx}/txencbox.hxx | 0 svx/inc/{ => svx}/txenctab.hxx | 0 svx/inc/{ => svx}/unoapi.hxx | 0 svx/inc/{ => svx}/unofill.hxx | 0 svx/inc/{ => svx}/unomaster.hxx | 0 svx/inc/{ => svx}/unopool.hxx | 0 svx/inc/{ => svx}/unoshcol.hxx | 0 svx/inc/{ => svx}/verttexttbxctrl.hxx | 0 svx/inc/{ => svx}/wrapfield.hxx | 0 svx/inc/{ => svx}/xattr.hxx | 0 svx/inc/{ => svx}/xexch.hxx | 0 svx/inc/{ => svx}/xmleohlp.hxx | 0 svx/inc/{ => svx}/xmlexchg.hxx | 0 svx/inc/{ => svx}/xmlgrhlp.hxx | 0 svx/inc/{ => svx}/xmlsecctrl.hxx | 0 svx/inc/{ => svx}/xoutbmp.hxx | 0 svx/inc/{ => svx}/zoom_def.hxx | 0 svx/inc/{ => svx}/zoomctrl.hxx | 0 svx/prj/d.lst | 570 +----------------- .../accessibility/AccessibleControlShape.cxx | 6 +- svx/source/accessibility/AccessibleShape.cxx | 6 +- .../accessibility/DescriptionGenerator.cxx | 6 +- .../GraphCtlAccessibleContext.cxx | 2 +- svx/source/accessibility/ShapeTypeHandler.cxx | 2 +- .../customshapes/EnhancedCustomShape2d.cxx | 6 +- .../customshapes/EnhancedCustomShape3d.cxx | 2 +- .../EnhancedCustomShapeEngine.cxx | 8 +- .../EnhancedCustomShapeFontWork.cxx | 4 +- .../EnhancedCustomShapeFunctionParser.cxx | 2 +- .../EnhancedCustomShapeGeometry.cxx | 2 +- .../EnhancedCustomShapeHandle.cxx | 4 +- .../EnhancedCustomShapeTypeNames.cxx | 2 +- svx/source/customshapes/tbxcustomshapes.cxx | 2 +- svx/source/dialog/_contdlg.cxx | 4 +- svx/source/dialog/connctrl.cxx | 4 +- svx/source/dialog/contwnd.cxx | 4 +- svx/source/dialog/databaseregistrationui.cxx | 2 +- svx/source/dialog/dialcontrol.cxx | 2 +- svx/source/dialog/dlgutil.cxx | 2 +- svx/source/dialog/fontlb.cxx | 2 +- svx/source/dialog/fontwork.cxx | 2 +- svx/source/dialog/graphctl.cxx | 4 +- svx/source/dialog/hdft.cxx | 4 +- svx/source/dialog/hyperdlg.cxx | 2 +- svx/source/dialog/hyprlink.cxx | 4 +- svx/source/dialog/imapdlg.cxx | 4 +- svx/source/dialog/imapwnd.cxx | 2 +- svx/source/dialog/measctrl.cxx | 4 +- svx/source/dialog/optgrid.cxx | 4 +- svx/source/dialog/orienthelper.cxx | 4 +- svx/source/dialog/passwd.cxx | 2 +- svx/source/dialog/pfiledlg.cxx | 2 +- svx/source/dialog/prtqry.cxx | 2 +- svx/source/dialog/relfld.cxx | 2 +- svx/source/dialog/rlrcitem.cxx | 2 +- svx/source/dialog/rubydialog.cxx | 2 +- svx/source/dialog/rulritem.cxx | 2 +- svx/source/dialog/srchctrl.cxx | 2 +- svx/source/dialog/srchdlg.cxx | 4 +- svx/source/dialog/svxbmpnumvalueset.cxx | 10 +- svx/source/dialog/svxgrahicitem.cxx | 2 +- svx/source/dialog/svxruler.cxx | 2 +- svx/source/dialog/swframeexample.cxx | 2 +- svx/source/dialog/swframeposstrings.cxx | 2 +- svx/source/dialog/swframeposstrings.src | 2 +- svx/source/dialog/txencbox.cxx | 4 +- svx/source/dialog/txenctab.cxx | 2 +- svx/source/dialog/wrapfield.cxx | 2 +- svx/source/engine3d/cube3d.cxx | 6 +- svx/source/engine3d/extrud3d.cxx | 6 +- svx/source/engine3d/float3d.cxx | 8 +- svx/source/engine3d/helperhittest3d.cxx | 2 +- svx/source/engine3d/lathe3d.cxx | 6 +- svx/source/engine3d/obj3d.cxx | 8 +- svx/source/engine3d/objfac3d.cxx | 4 +- svx/source/engine3d/polygn3d.cxx | 2 +- svx/source/engine3d/polysc3d.cxx | 4 +- svx/source/engine3d/scene3d.cxx | 8 +- svx/source/engine3d/sphere3d.cxx | 6 +- svx/source/engine3d/view3d.cxx | 6 +- svx/source/engine3d/view3d1.cxx | 4 +- svx/source/fmcomp/fmgridcl.cxx | 6 +- svx/source/fmcomp/fmgridif.cxx | 2 +- svx/source/fmcomp/gridcell.cxx | 2 +- svx/source/fmcomp/gridctrl.cxx | 2 +- svx/source/fmcomp/gridctrl.src | 2 +- svx/source/fmcomp/xmlexchg.cxx | 2 +- svx/source/form/ParseContext.cxx | 4 +- svx/source/form/databaselocationinput.cxx | 2 +- svx/source/form/datanavi.cxx | 4 +- svx/source/form/datanavi.src | 2 +- svx/source/form/filtnav.cxx | 2 +- svx/source/form/filtnav.src | 2 +- svx/source/form/fmPropBrw.cxx | 2 +- svx/source/form/fmexch.cxx | 2 +- svx/source/form/fmexpl.cxx | 4 +- svx/source/form/fmexpl.src | 2 +- svx/source/form/fmobj.cxx | 2 +- svx/source/form/fmobjfac.cxx | 4 +- svx/source/form/fmpage.cxx | 4 +- svx/source/form/fmpgeimp.cxx | 6 +- svx/source/form/fmshell.cxx | 4 +- svx/source/form/fmshimp.cxx | 4 +- svx/source/form/fmsrccfg.cxx | 2 +- svx/source/form/fmsrcimp.cxx | 6 +- svx/source/form/fmstring.src | 2 +- svx/source/form/fmtextcontroldialogs.cxx | 2 +- svx/source/form/fmtextcontrolshell.cxx | 2 +- svx/source/form/fmundo.cxx | 4 +- svx/source/form/fmview.cxx | 4 +- svx/source/form/fmvwimp.cxx | 8 +- svx/source/form/formcontrolfactory.cxx | 2 +- svx/source/form/formcontroller.cxx | 2 +- svx/source/form/formshell.src | 2 +- svx/source/form/navigatortree.cxx | 6 +- svx/source/form/navigatortreemodel.cxx | 4 +- svx/source/form/sqlparserclient.cxx | 2 +- svx/source/form/tabwin.cxx | 2 +- svx/source/form/tbxform.cxx | 6 +- svx/source/form/typemap.cxx | 2 +- svx/source/gallery2/galbrws.cxx | 2 +- svx/source/gallery2/galbrws1.cxx | 2 +- svx/source/gallery2/galbrws1.hxx | 2 +- svx/source/gallery2/galbrws2.cxx | 6 +- svx/source/gallery2/galctrl.cxx | 4 +- svx/source/gallery2/galexpl.cxx | 6 +- svx/source/gallery2/gallery1.cxx | 4 +- svx/source/gallery2/galmisc.cxx | 2 +- svx/source/gallery2/galtheme.cxx | 2 +- svx/source/gengal/gengal.cxx | 2 +- svx/source/inc/fmshimp.hxx | 2 +- svx/source/inc/sqlparserclient.hxx | 2 +- svx/source/items/chrtitem.cxx | 2 +- svx/source/items/clipfmtitem.cxx | 2 +- svx/source/items/drawitem.cxx | 2 +- svx/source/items/hlnkitem.cxx | 2 +- svx/source/items/ofaitem.cxx | 2 +- svx/source/items/postattr.cxx | 2 +- svx/source/items/rotmodit.cxx | 2 +- svx/source/items/svxerr.cxx | 2 +- svx/source/items/svxerr.src | 2 +- svx/source/mnuctrls/clipboardctl.cxx | 4 +- svx/source/mnuctrls/fntszctl.cxx | 2 +- svx/source/mnuctrls/makefile.mk | 2 +- .../contact/objectcontactofobjlistpainter.cxx | 2 +- .../sdr/contact/objectcontactofpageview.cxx | 4 +- .../sdr/contact/viewcontactofgraphic.cxx | 4 +- .../sdr/contact/viewcontactofsdrobj.cxx | 2 +- .../viewcontactofsdrobjcustomshape.cxx | 2 +- .../sdr/contact/viewcontactofunocontrol.cxx | 2 +- .../contact/viewobjectcontactofpageobj.cxx | 2 +- .../viewobjectcontactofsdrmediaobj.cxx | 2 +- .../contact/viewobjectcontactofunocontrol.cxx | 2 +- .../sdr/primitive2d/primitivefactory2d.cxx | 2 +- .../sdr/primitive2d/sdrtextprimitive2d.cxx | 2 +- .../sdr/properties/e3dsceneproperties.cxx | 2 +- svx/source/sdr/properties/itemsettools.cxx | 2 +- svx/source/sdr/properties/properties.cxx | 2 +- svx/source/stbctrls/insctrl.cxx | 2 +- svx/source/stbctrls/makefile.mk | 12 +- svx/source/stbctrls/modctrl.cxx | 2 +- svx/source/stbctrls/pszctrl.cxx | 4 +- svx/source/stbctrls/selctrl.cxx | 2 +- svx/source/stbctrls/xmlsecctrl.cxx | 4 +- svx/source/stbctrls/zoomctrl.cxx | 2 +- .../svdraw/ActionDescriptionProvider.cxx | 6 +- svx/source/svdraw/sdrpagewindow.cxx | 2 +- svx/source/svdraw/sdrpaintwindow.cxx | 2 +- svx/source/svdraw/svdattr.cxx | 6 +- svx/source/svdraw/svdcrtv.cxx | 4 +- svx/source/svdraw/svddrgmt.cxx | 10 +- svx/source/svdraw/svddrgv.cxx | 8 +- svx/source/svdraw/svdedtv.cxx | 4 +- svx/source/svdraw/svdedtv1.cxx | 8 +- svx/source/svdraw/svdedtv2.cxx | 6 +- svx/source/svdraw/svdedxv.cxx | 12 +- svx/source/svdraw/svdetc.cxx | 8 +- svx/source/svdraw/svdfmtf.cxx | 2 +- svx/source/svdraw/svdglev.cxx | 4 +- svx/source/svdraw/svdhdl.cxx | 6 +- svx/source/svdraw/svdibrow.cxx | 4 +- svx/source/svdraw/svditer.cxx | 2 +- svx/source/svdraw/svdlayer.cxx | 4 +- svx/source/svdraw/svdmark.cxx | 6 +- svx/source/svdraw/svdmodel.cxx | 8 +- svx/source/svdraw/svdmrkv.cxx | 8 +- svx/source/svdraw/svdmrkv1.cxx | 2 +- svx/source/svdraw/svdoashp.cxx | 14 +- svx/source/svdraw/svdoattr.cxx | 2 +- svx/source/svdraw/svdobj.cxx | 6 +- svx/source/svdraw/svdocapt.cxx | 4 +- svx/source/svdraw/svdocirc.cxx | 4 +- svx/source/svdraw/svdoedge.cxx | 4 +- svx/source/svdraw/svdograf.cxx | 6 +- svx/source/svdraw/svdogrp.cxx | 6 +- svx/source/svdraw/svdomeas.cxx | 6 +- svx/source/svdraw/svdomedia.cxx | 4 +- svx/source/svdraw/svdoole2.cxx | 4 +- svx/source/svdraw/svdopage.cxx | 4 +- svx/source/svdraw/svdopath.cxx | 4 +- svx/source/svdraw/svdorect.cxx | 4 +- svx/source/svdraw/svdotext.cxx | 6 +- svx/source/svdraw/svdotextdecomposition.cxx | 2 +- .../svdraw/svdotextpathdecomposition.cxx | 2 +- svx/source/svdraw/svdotxat.cxx | 2 +- svx/source/svdraw/svdotxdr.cxx | 4 +- svx/source/svdraw/svdotxed.cxx | 2 +- svx/source/svdraw/svdotxln.cxx | 2 +- svx/source/svdraw/svdotxtr.cxx | 4 +- svx/source/svdraw/svdouno.cxx | 8 +- svx/source/svdraw/svdpage.cxx | 2 +- svx/source/svdraw/svdpagv.cxx | 4 +- svx/source/svdraw/svdpntv.cxx | 4 +- svx/source/svdraw/svdpoev.cxx | 4 +- svx/source/svdraw/svdsnpv.cxx | 4 +- svx/source/svdraw/svdstr.src | 2 +- svx/source/svdraw/svdundo.cxx | 8 +- svx/source/svdraw/svdview.cxx | 6 +- svx/source/svdraw/svdviter.cxx | 4 +- svx/source/svdraw/svdxcgv.cxx | 10 +- svx/source/table/accessiblecell.cxx | 2 +- svx/source/table/cellcursor.cxx | 4 +- svx/source/table/celleditsource.cxx | 2 +- svx/source/table/svdotable.cxx | 4 +- svx/source/table/tablecontroller.cxx | 6 +- svx/source/table/tablehandles.cxx | 2 +- svx/source/table/tablelayouter.cxx | 4 +- svx/source/table/tablemodel.cxx | 4 +- svx/source/tbxctrls/colrctrl.cxx | 6 +- svx/source/tbxctrls/extrusioncontrols.cxx | 4 +- svx/source/tbxctrls/fillctrl.cxx | 4 +- svx/source/tbxctrls/fontworkgallery.cxx | 6 +- svx/source/tbxctrls/formatpaintbrushctrl.cxx | 2 +- svx/source/tbxctrls/grafctrl.cxx | 4 +- svx/source/tbxctrls/itemwin.cxx | 6 +- svx/source/tbxctrls/layctrl.cxx | 2 +- svx/source/tbxctrls/lboxctrl.cxx | 2 +- svx/source/tbxctrls/linectrl.cxx | 6 +- svx/source/tbxctrls/tbcontrl.cxx | 6 +- svx/source/tbxctrls/tbxalign.cxx | 4 +- svx/source/tbxctrls/tbxcolor.cxx | 2 +- svx/source/tbxctrls/tbxdrctl.cxx | 6 +- svx/source/tbxctrls/verttexttbxctrl.cxx | 2 +- svx/source/toolbars/extrusionbar.cxx | 4 +- svx/source/toolbars/fontworkbar.cxx | 8 +- svx/source/unodraw/UnoGraphicExporter.cxx | 4 +- svx/source/unodraw/UnoNameItemTable.cxx | 2 +- svx/source/unodraw/UnoNamespaceMap.cxx | 4 +- svx/source/unodraw/XPropertyTable.cxx | 4 +- svx/source/unodraw/unobtabl.cxx | 4 +- svx/source/unodraw/unoctabl.cxx | 4 +- svx/source/unodraw/unodtabl.cxx | 2 +- svx/source/unodraw/unogtabl.cxx | 2 +- svx/source/unodraw/unohtabl.cxx | 2 +- svx/source/unodraw/unomod.cxx | 6 +- svx/source/unodraw/unomtabl.cxx | 4 +- svx/source/unodraw/unopage.cxx | 4 +- svx/source/unodraw/unopool.cxx | 4 +- svx/source/unodraw/unoprov.cxx | 4 +- svx/source/unodraw/unoshap2.cxx | 2 +- svx/source/unodraw/unoshap3.cxx | 4 +- svx/source/unodraw/unoshap4.cxx | 6 +- svx/source/unodraw/unoshape.cxx | 10 +- svx/source/unodraw/unoshcol.cxx | 2 +- svx/source/unodraw/unoshtxt.cxx | 2 +- svx/source/unodraw/unottabl.cxx | 2 +- svx/source/unogallery/unogalitem.cxx | 2 +- svx/source/unogallery/unogaltheme.cxx | 2 +- svx/source/xml/xmleohlp.cxx | 2 +- svx/source/xml/xmlexport.cxx | 4 +- svx/source/xml/xmlgrhlp.cxx | 2 +- svx/source/xml/xmlxtexp.cxx | 2 +- svx/source/xml/xmlxtimp.cxx | 2 +- svx/source/xoutdev/_xoutbmp.cxx | 2 +- svx/source/xoutdev/xattr.cxx | 6 +- svx/source/xoutdev/xattr2.cxx | 2 +- svx/source/xoutdev/xattrbmp.cxx | 4 +- svx/source/xoutdev/xexch.cxx | 2 +- svx/source/xoutdev/xpool.cxx | 2 +- svx/source/xoutdev/xtabbtmp.cxx | 2 +- svx/source/xoutdev/xtabcolr.cxx | 2 +- svx/source/xoutdev/xtabdash.cxx | 2 +- svx/source/xoutdev/xtabgrdt.cxx | 2 +- svx/source/xoutdev/xtabhtch.cxx | 4 +- svx/source/xoutdev/xtablend.cxx | 2 +- 367 files changed, 492 insertions(+), 1313 deletions(-) delete mode 100644 svx/inc/globlac.hrc delete mode 100644 svx/inc/srchitem.hxx rename svx/inc/{ => svx}/ActionDescriptionProvider.hxx (100%) rename svx/inc/{ => svx}/DescriptionGenerator.hxx (100%) rename svx/{source/customshapes => inc/svx}/EnhancedCustomShape2d.hxx (100%) rename svx/{source/customshapes => inc/svx}/EnhancedCustomShapeGeometry.hxx (100%) rename svx/{source/customshapes => inc/svx}/EnhancedCustomShapeTypeNames.hxx (100%) rename svx/inc/{ => svx}/ParseContext.hxx (100%) rename svx/inc/{ => svx}/UnoNamespaceMap.hxx (100%) rename svx/inc/{ => svx}/XPropertyTable.hxx (100%) rename svx/inc/{ => svx}/anchorid.hxx (100%) rename svx/inc/{ => svx}/chrtitem.hxx (100%) rename svx/inc/{ => svx}/clipboardctl.hxx (100%) rename svx/inc/{ => svx}/clipfmtitem.hxx (100%) rename svx/inc/{ => svx}/connctrl.hxx (100%) rename svx/inc/{ => svx}/databaseregistrationui.hxx (100%) rename svx/inc/{ => svx}/dbexch.hrc (100%) rename svx/inc/{ => svx}/dialcontrol.hxx (100%) rename svx/inc/{ => svx}/dlgutil.hxx (100%) rename svx/inc/{ => svx}/drawitem.hxx (100%) rename svx/inc/{ => svx}/extrusioncontrols.hxx (100%) rename svx/inc/{ => svx}/flagsdef.hxx (100%) rename svx/inc/{ => svx}/fmgridif.hxx (100%) rename svx/inc/{ => svx}/fmobjfac.hxx (100%) rename svx/{source/inc => inc/svx}/fmresids.hrc (100%) rename svx/{source/inc => inc/svx}/fmsrccfg.hxx (100%) rename svx/{source/inc => inc/svx}/fmsrcimp.hxx (100%) rename svx/inc/{ => svx}/fontlb.hxx (100%) rename svx/inc/{ => svx}/fontworkgallery.hxx (100%) rename svx/inc/{ => svx}/formatpaintbrushctrl.hxx (100%) rename svx/inc/{ => svx}/galbrws.hxx (100%) rename svx/inc/{ => svx}/galctrl.hxx (100%) rename svx/inc/{ => svx}/gallery.hxx (100%) rename svx/inc/{ => svx}/galtheme.hxx (100%) rename svx/inc/{ => svx}/globl3d.hxx (100%) rename svx/inc/{ => svx}/grafctrl.hxx (100%) rename svx/inc/{ => svx}/hlnkitem.hxx (100%) rename svx/inc/{ => svx}/htmlmode.hxx (100%) rename svx/inc/{ => svx}/hyperdlg.hxx (100%) rename svx/{source/dialog => inc/svx}/hyprlink.hxx (100%) rename svx/inc/{ => svx}/imapdlg.hxx (100%) rename svx/inc/{ => svx}/insctrl.hxx (100%) rename svx/inc/{ => svx}/layctrl.hxx (100%) rename svx/inc/{ => svx}/lboxctrl.hxx (100%) rename svx/inc/{ => svx}/linectrl.hxx (100%) rename svx/inc/{ => svx}/measctrl.hxx (100%) rename svx/inc/{ => svx}/modctrl.hxx (100%) rename svx/inc/{ => svx}/numvset.hxx (100%) rename svx/inc/{ => svx}/objfac3d.hxx (100%) rename svx/inc/{ => svx}/ofaitem.hxx (100%) rename svx/inc/{ => svx}/optgenrl.hxx (100%) rename svx/inc/{ => svx}/optgrid.hxx (100%) rename svx/inc/{ => svx}/orienthelper.hxx (100%) rename svx/inc/{ => svx}/passwd.hxx (100%) rename svx/inc/{ => svx}/pfiledlg.hxx (100%) rename svx/inc/{ => svx}/postattr.hxx (100%) rename svx/inc/{ => svx}/prtqry.hxx (100%) rename svx/inc/{ => svx}/pszctrl.hxx (100%) rename svx/inc/{ => svx}/relfld.hxx (100%) rename svx/inc/{ => svx}/rotmodit.hxx (100%) rename svx/inc/{ => svx}/rubydialog.hxx (100%) rename svx/inc/{ => svx}/rulritem.hxx (100%) rename svx/inc/{ => svx}/sdrpaintwindow.hxx (100%) rename svx/inc/{ => svx}/selctrl.hxx (100%) rename svx/inc/{ => svx}/srchdlg.hxx (99%) rename svx/inc/{ => svx}/svdglob.hxx (100%) rename svx/inc/{ => svx}/svditer.hxx (100%) rename svx/{source/svdraw => inc/svx}/svditext.hxx (100%) rename svx/inc/{ => svx}/svdstr.hrc (100%) rename svx/inc/{ => svx}/svdviter.hxx (100%) rename svx/inc/{ => svx}/svimbase.hxx (100%) rename svx/inc/{ => svx}/svxerr.hxx (100%) rename svx/inc/{ => svx}/svxgrahicitem.hxx (100%) rename svx/inc/{ => svx}/swframeexample.hxx (100%) rename svx/inc/{ => svx}/swframeposstrings.hxx (100%) rename svx/inc/{ => svx}/swframevalidation.hxx (100%) rename svx/inc/{ => svx}/tbxalign.hxx (100%) rename svx/inc/{ => svx}/tbxcolor.hxx (100%) rename svx/inc/{ => svx}/tbxctl.hxx (100%) rename svx/inc/{ => svx}/tbxcustomshapes.hxx (100%) rename svx/inc/{ => svx}/tbxdraw.hxx (100%) rename svx/inc/{ => svx}/txencbox.hxx (100%) rename svx/inc/{ => svx}/txenctab.hxx (100%) rename svx/inc/{ => svx}/unoapi.hxx (100%) rename svx/inc/{ => svx}/unofill.hxx (100%) rename svx/inc/{ => svx}/unomaster.hxx (100%) rename svx/inc/{ => svx}/unopool.hxx (100%) rename svx/inc/{ => svx}/unoshcol.hxx (100%) rename svx/inc/{ => svx}/verttexttbxctrl.hxx (100%) rename svx/inc/{ => svx}/wrapfield.hxx (100%) rename svx/inc/{ => svx}/xattr.hxx (100%) rename svx/inc/{ => svx}/xexch.hxx (100%) rename svx/inc/{ => svx}/xmleohlp.hxx (100%) rename svx/inc/{ => svx}/xmlexchg.hxx (100%) rename svx/inc/{ => svx}/xmlgrhlp.hxx (100%) rename svx/inc/{ => svx}/xmlsecctrl.hxx (100%) rename svx/inc/{ => svx}/xoutbmp.hxx (100%) rename svx/inc/{ => svx}/zoom_def.hxx (100%) rename svx/inc/{ => svx}/zoomctrl.hxx (100%) diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx index 38f6daffee19..d1038641c841 100644 --- a/svx/inc/galbrws2.hxx +++ b/svx/inc/galbrws2.hxx @@ -36,7 +36,7 @@ #include #include #include -#include "galbrws.hxx" +#include "svx/galbrws.hxx" // ---------------------- // - GalleryBrowserMode - diff --git a/svx/inc/globlac.hrc b/svx/inc/globlac.hrc deleted file mode 100644 index f72d4c1d31a8..000000000000 --- a/svx/inc/globlac.hrc +++ /dev/null @@ -1,223 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _GLOBALACC_SRC -#define _GLOBALACC_SRC - -#define ACC_CODE( Id, c, bSh, bM1, bM2 ) \ - AcceleratorItem { Identifier = Id; \ - Key = KeyCode { Code = c ; \ - Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; }; }; - -#define ACC_FUNC( Id, f ) \ - AcceleratorItem { Identifier = Id; \ - Key = KeyCode { Function = f ; }; }; - -#define ACC_KEY( language, c, bSh, bM1, bM2 ) \ - Key[ language ] = KeyCode { Code = c ; \ - Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; }; - -#define ACC_DEF_KEY( c, bSh, bM1, bM2 ) \ - Key = KeyCode { Code = c ; \ - Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; }; - - -#define AI_HELPINDEX ACC_CODE( SID_HELPINDEX, KEY_F1, FALSE, TRUE, FALSE ) - -#define AI_ATTR_CHAR ACC_CODE( SID_ATTR_CHAR, KEY_F2, FALSE, FALSE, FALSE ) -// new shortcut F9 for starting slide-show (see #73417#) -#define AI_PRESENTATION ACC_CODE( SID_PRESENTATION, KEY_F9, FALSE, FALSE, FALSE ) -// formerly used shortcut Ctrl-F2. Still used (in sd) for compatibility -#define AI_PRESENTATION_COMPAT ACC_CODE( SID_PRESENTATION, KEY_F2, FALSE, TRUE, FALSE ) -#define AI_ENTER_GROUP ACC_CODE( SID_ENTER_GROUP, KEY_F3, FALSE, FALSE, FALSE ) -#define AI_COPYOBJECTS ACC_CODE( SID_COPYOBJECTS, KEY_F3, TRUE, FALSE, FALSE ) -#define AI_LEAVE_GROUP ACC_CODE( SID_LEAVE_GROUP, KEY_F3, FALSE, TRUE, FALSE ) -#define AI_ATTR_TRANSFORM ACC_CODE( SID_ATTR_TRANSFORM, KEY_F4, FALSE, FALSE, FALSE ) -#define AI_NAVIGATOR ACC_CODE( SID_NAVIGATOR, KEY_F5, FALSE, FALSE, FALSE ) -#define AI_SPELLING ACC_CODE( SID_SPELL_DIALOG, KEY_F7, FALSE, FALSE, FALSE ) -#define AI_THESAURUS ACC_CODE( SID_THESAURUS, KEY_F7, FALSE, TRUE, FALSE ) -#define AI_BEZIER_EDIT ACC_CODE( SID_BEZIER_EDIT, KEY_F8, FALSE, FALSE, FALSE ) -#define AI_ATTR_TEXT_FITTOSIZE ACC_CODE( SID_ATTR_TEXT_FITTOSIZE, KEY_F8, TRUE, TRUE, FALSE ) -#define AI_STYLE_DESIGNER ACC_CODE( SID_STYLE_DESIGNER, KEY_F11, FALSE, FALSE, FALSE ) -#define AI_OUTLINEMODE ACC_CODE( SID_OUTLINEMODE, KEY_F12, FALSE, FALSE, FALSE ) -#define AI_DRAWINGMODE ACC_CODE( SID_DRAWINGMODE, KEY_F12, FALSE, TRUE, FALSE ) - -#define AI_ATTR_PARA_LINESPACE_10 ACC_CODE( SID_ATTR_PARA_LINESPACE_10, KEY_1, FALSE, TRUE, FALSE ) -#define AI_ATTR_PARA_LINESPACE_20 ACC_CODE( SID_ATTR_PARA_LINESPACE_20, KEY_2, FALSE, TRUE, FALSE ) -#define AI_ATTR_PARA_LINESPACE_15 ACC_CODE( SID_ATTR_PARA_LINESPACE_15, KEY_5, FALSE, TRUE, FALSE ) -#define AI_SHOW_ITEMBROWSER ACC_CODE( SID_SHOW_ITEMBROWSER, KEY_9, TRUE, TRUE, TRUE ) - -#define AI_ATTR_PARA_ADJUST_BLOCK AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_BLOCK;\ - ACC_DEF_KEY( KEY_J, FALSE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_B, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_J, FALSE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_F, FALSE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_J, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_J, FALSE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_J, FALSE, TRUE, FALSE ) \ - ACC_KEY( pl , KEY_J, FALSE, TRUE, FALSE ) \ - ACC_KEY( ru , KEY_J, FALSE, TRUE, FALSE ) }; - -#define AI_ATTR_PARA_ADJUST_CENTER AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_CENTER;\ - ACC_DEF_KEY( KEY_E, FALSE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_E, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_E, FALSE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_E, FALSE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_E, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_C, TRUE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_J, FALSE, TRUE, FALSE ) }; - -#define AI_ATTR_CHAR_WEIGHT AcceleratorItem { Identifier = SID_ATTR_CHAR_WEIGHT;\ - ACC_DEF_KEY( KEY_B, FALSE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_F, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_B, FALSE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_G, FALSE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_N, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_G, FALSE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_B, FALSE, TRUE, FALSE ) \ - ACC_KEY( da , KEY_F, FALSE, TRUE, FALSE ) \ - ACC_KEY( pl , KEY_B, FALSE, TRUE, FALSE ) \ - ACC_KEY( ru, KEY_B, FALSE, TRUE, FALSE ) }; - -#define AI_SEARCH_DLG AcceleratorItem { Identifier = SID_SEARCH_DLG;\ - ACC_DEF_KEY( KEY_F, FALSE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_G, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_F, FALSE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_B, FALSE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_G, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_F, FALSE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_F, FALSE, TRUE, FALSE ) }; - -#define AI_GROUP ACC_CODE( SID_GROUP, KEY_G, TRUE, TRUE, FALSE ) -#define AI_UNGROUP ACC_CODE( SID_UNGROUP, KEY_G, TRUE, TRUE, TRUE ) - -// Weitersuchen ... -#define AI_SET_SUPER_SCRIPT AcceleratorItem { Identifier = SID_SET_SUPER_SCRIPT;\ - ACC_DEF_KEY( KEY_P, TRUE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_H, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_P, TRUE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_H, FALSE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_H, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_H, FALSE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_H, FALSE, TRUE, FALSE ) }; - -#define AI_ATTR_CHAR_POSTURE AcceleratorItem { Identifier = SID_ATTR_CHAR_POSTURE;\ - ACC_DEF_KEY( KEY_I, FALSE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_K, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_I, FALSE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_I, FALSE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_K, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_I, FALSE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_I, FALSE, TRUE, FALSE ) \ - ACC_KEY( da , KEY_K, FALSE, TRUE, FALSE ) \ - ACC_KEY( pl , KEY_I, FALSE, TRUE, FALSE ) \ - ACC_KEY( ru , KEY_I, FALSE, TRUE, FALSE ) }; - -#define AI_COMBINE ACC_CODE( SID_COMBINE, KEY_K, TRUE, TRUE, FALSE ) -#define AI_DISMANTLE ACC_CODE( SID_DISMANTLE, KEY_K, TRUE, TRUE, TRUE ) -#define AI_ATTR_PARA_ADJUST_LEFT AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_LEFT;\ - ACC_DEF_KEY( KEY_L, FALSE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_L, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_L, FALSE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_T, FALSE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_I, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_G, TRUE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_L, FALSE, TRUE, FALSE ) }; - -#define AI_ATTR_PARA_ADJUST_RIGHT AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_RIGHT;\ - ACC_DEF_KEY( KEY_R, FALSE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_R, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_R, FALSE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_R, FALSE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_D, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_D, TRUE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_R, FALSE, TRUE, FALSE ) }; - -#define AI_SET_SUB_SCRIPT AcceleratorItem { Identifier = SID_SET_SUB_SCRIPT;\ - ACC_DEF_KEY( KEY_B, TRUE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_T, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_B, TRUE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_B, TRUE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_T, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_T, FALSE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_P, TRUE, TRUE, FALSE ) }; - -#define AI_ATTR_CHAR_UNDERLINE AcceleratorItem { Identifier = SID_ATTR_CHAR_UNDERLINE;\ - ACC_DEF_KEY( KEY_U, FALSE, TRUE, FALSE ) \ - ACC_KEY( de , KEY_U, FALSE, TRUE, FALSE ) \ - ACC_KEY( en-US , KEY_U, FALSE, TRUE, FALSE ) \ - ACC_KEY( it , KEY_U, FALSE, TRUE, FALSE ) \ - ACC_KEY( es , KEY_U, FALSE, TRUE, FALSE ) \ - ACC_KEY( fr , KEY_U, FALSE, TRUE, FALSE ) \ - ACC_KEY( nl , KEY_U, FALSE, TRUE, FALSE ) \ - ACC_KEY( da, KEY_U, FALSE, TRUE, FALSE ) \ - ACC_KEY( pl, KEY_U, FALSE, TRUE, FALSE ) \ - ACC_KEY( ru , KEY_U, FALSE, TRUE, FALSE ) }; - -#define AI_STYLE_CATALOG ACC_CODE( SID_STYLE_CATALOG, KEY_F11, FALSE, TRUE, FALSE ) -#define AI_WIN_FULLSCREEN ACC_CODE( SID_WIN_FULLSCREEN, KEY_J, TRUE, TRUE, FALSE ) - -#define AI_FOCUSURLBOX ACC_CODE( SID_FOCUSURLBOX, KEY_O, TRUE, TRUE, FALSE ) -#define AI_SELECTALL ACC_CODE( SID_SELECTALL, KEY_A, FALSE, TRUE, FALSE ) - -// Anordnung -#define AI_FRAME_TO_TOP ACC_CODE( SID_FRAME_TO_TOP, KEY_ADD, TRUE, TRUE, FALSE ) -#define AI_MOREFRONT ACC_CODE( SID_MOREFRONT, KEY_ADD, FALSE, TRUE, FALSE ) -#define AI_FRAME_TO_BOTTOM ACC_CODE( SID_FRAME_TO_BOTTOM, KEY_SUBTRACT, TRUE, TRUE, FALSE ) -#define AI_MOREBACK ACC_CODE( SID_MOREBACK, KEY_SUBTRACT, FALSE, TRUE, FALSE ) - -// sonstige Acceleratoren -#define AI_NEWDOC ACC_CODE( SID_NEWDOC, KEY_N, TRUE, TRUE, FALSE ) -#define AI_NEWDOCDIRECT ACC_CODE( SID_NEWDOCDIRECT, KEY_N, FALSE, TRUE, FALSE ) -#define AI_OPENDOC ACC_CODE( SID_OPENDOC, KEY_O, FALSE, TRUE, FALSE ) \ - ACC_CODE( SID_OPENDOC, KEY_OPEN, FALSE, FALSE, FALSE ) -#define AI_CLOSEWIN ACC_CODE( SID_CLOSEWIN, KEY_W, FALSE, TRUE, FALSE ) \ - ACC_CODE( SID_CLOSEWIN, KEY_F4, FALSE, TRUE, FALSE ) -#define AI_SAVEDOC ACC_CODE( SID_SAVEDOC, KEY_S, FALSE, TRUE, FALSE ) -#define AI_PRINTDOC ACC_CODE( SID_PRINTDOC, KEY_P, FALSE, TRUE, FALSE ) -#define AI_QUITAPP ACC_CODE( SID_QUITAPP, KEY_Q, FALSE, TRUE, FALSE ) -#define AI_CUT ACC_CODE( SID_CUT, KEY_X, FALSE, TRUE, FALSE ) \ - ACC_CODE( SID_CUT, KEY_DELETE, TRUE, FALSE, FALSE ) \ - ACC_CODE( SID_CUT, KEY_CUT, FALSE, FALSE, FALSE ) -#define AI_COPY ACC_CODE( SID_COPY, KEY_C, FALSE, TRUE, FALSE ) \ - ACC_CODE( SID_COPY, KEY_INSERT, FALSE, TRUE, FALSE ) \ - ACC_CODE( SID_COPY, KEY_COPY, FALSE, FALSE, FALSE ) -#define AI_PASTE ACC_CODE( SID_PASTE, KEY_V, FALSE, TRUE, FALSE ) \ - ACC_CODE( SID_PASTE, KEY_INSERT, TRUE, FALSE, FALSE ) \ - ACC_CODE( SID_PASTE, KEY_PASTE, FALSE, FALSE, FALSE ) -#define AI_UNDO ACC_CODE( SID_UNDO, KEY_Z, FALSE, TRUE, FALSE ) \ - ACC_CODE( SID_UNDO, KEY_BACKSPACE, FALSE, FALSE, TRUE ) \ - ACC_CODE( SID_UNDO, KEY_UNDO, FALSE, FALSE, FALSE ) -#define AI_REDO ACC_CODE( SID_REDO, KEY_Y, FALSE, TRUE, FALSE ) -#define AI_REPEAT ACC_CODE( SID_REPEAT, KEY_REPEAT, FALSE, FALSE, FALSE ) -#define AI_DELETE ACC_CODE( SID_DELETE, KEY_DELETE, FALSE, FALSE, FALSE ) - -#endif // _GLOBLACC_SRC - - - - diff --git a/svx/inc/srchitem.hxx b/svx/inc/srchitem.hxx deleted file mode 100644 index fceb5f009953..000000000000 --- a/svx/inc/srchitem.hxx +++ /dev/null @@ -1,34 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SVX_SRCHITEM_HXX -#define _SVX_SRCHITEM_HXX - -#include - -#endif - - diff --git a/svx/inc/ActionDescriptionProvider.hxx b/svx/inc/svx/ActionDescriptionProvider.hxx similarity index 100% rename from svx/inc/ActionDescriptionProvider.hxx rename to svx/inc/svx/ActionDescriptionProvider.hxx diff --git a/svx/inc/DescriptionGenerator.hxx b/svx/inc/svx/DescriptionGenerator.hxx similarity index 100% rename from svx/inc/DescriptionGenerator.hxx rename to svx/inc/svx/DescriptionGenerator.hxx diff --git a/svx/source/customshapes/EnhancedCustomShape2d.hxx b/svx/inc/svx/EnhancedCustomShape2d.hxx similarity index 100% rename from svx/source/customshapes/EnhancedCustomShape2d.hxx rename to svx/inc/svx/EnhancedCustomShape2d.hxx diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.hxx b/svx/inc/svx/EnhancedCustomShapeGeometry.hxx similarity index 100% rename from svx/source/customshapes/EnhancedCustomShapeGeometry.hxx rename to svx/inc/svx/EnhancedCustomShapeGeometry.hxx diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx b/svx/inc/svx/EnhancedCustomShapeTypeNames.hxx similarity index 100% rename from svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx rename to svx/inc/svx/EnhancedCustomShapeTypeNames.hxx diff --git a/svx/inc/ParseContext.hxx b/svx/inc/svx/ParseContext.hxx similarity index 100% rename from svx/inc/ParseContext.hxx rename to svx/inc/svx/ParseContext.hxx diff --git a/svx/inc/UnoNamespaceMap.hxx b/svx/inc/svx/UnoNamespaceMap.hxx similarity index 100% rename from svx/inc/UnoNamespaceMap.hxx rename to svx/inc/svx/UnoNamespaceMap.hxx diff --git a/svx/inc/XPropertyTable.hxx b/svx/inc/svx/XPropertyTable.hxx similarity index 100% rename from svx/inc/XPropertyTable.hxx rename to svx/inc/svx/XPropertyTable.hxx diff --git a/svx/inc/anchorid.hxx b/svx/inc/svx/anchorid.hxx similarity index 100% rename from svx/inc/anchorid.hxx rename to svx/inc/svx/anchorid.hxx diff --git a/svx/inc/chrtitem.hxx b/svx/inc/svx/chrtitem.hxx similarity index 100% rename from svx/inc/chrtitem.hxx rename to svx/inc/svx/chrtitem.hxx diff --git a/svx/inc/clipboardctl.hxx b/svx/inc/svx/clipboardctl.hxx similarity index 100% rename from svx/inc/clipboardctl.hxx rename to svx/inc/svx/clipboardctl.hxx diff --git a/svx/inc/clipfmtitem.hxx b/svx/inc/svx/clipfmtitem.hxx similarity index 100% rename from svx/inc/clipfmtitem.hxx rename to svx/inc/svx/clipfmtitem.hxx diff --git a/svx/inc/connctrl.hxx b/svx/inc/svx/connctrl.hxx similarity index 100% rename from svx/inc/connctrl.hxx rename to svx/inc/svx/connctrl.hxx diff --git a/svx/inc/databaseregistrationui.hxx b/svx/inc/svx/databaseregistrationui.hxx similarity index 100% rename from svx/inc/databaseregistrationui.hxx rename to svx/inc/svx/databaseregistrationui.hxx diff --git a/svx/inc/dbexch.hrc b/svx/inc/svx/dbexch.hrc similarity index 100% rename from svx/inc/dbexch.hrc rename to svx/inc/svx/dbexch.hrc diff --git a/svx/inc/dialcontrol.hxx b/svx/inc/svx/dialcontrol.hxx similarity index 100% rename from svx/inc/dialcontrol.hxx rename to svx/inc/svx/dialcontrol.hxx diff --git a/svx/inc/dlgutil.hxx b/svx/inc/svx/dlgutil.hxx similarity index 100% rename from svx/inc/dlgutil.hxx rename to svx/inc/svx/dlgutil.hxx diff --git a/svx/inc/drawitem.hxx b/svx/inc/svx/drawitem.hxx similarity index 100% rename from svx/inc/drawitem.hxx rename to svx/inc/svx/drawitem.hxx diff --git a/svx/inc/extrusioncontrols.hxx b/svx/inc/svx/extrusioncontrols.hxx similarity index 100% rename from svx/inc/extrusioncontrols.hxx rename to svx/inc/svx/extrusioncontrols.hxx diff --git a/svx/inc/flagsdef.hxx b/svx/inc/svx/flagsdef.hxx similarity index 100% rename from svx/inc/flagsdef.hxx rename to svx/inc/svx/flagsdef.hxx diff --git a/svx/inc/fmgridif.hxx b/svx/inc/svx/fmgridif.hxx similarity index 100% rename from svx/inc/fmgridif.hxx rename to svx/inc/svx/fmgridif.hxx diff --git a/svx/inc/fmobjfac.hxx b/svx/inc/svx/fmobjfac.hxx similarity index 100% rename from svx/inc/fmobjfac.hxx rename to svx/inc/svx/fmobjfac.hxx diff --git a/svx/source/inc/fmresids.hrc b/svx/inc/svx/fmresids.hrc similarity index 100% rename from svx/source/inc/fmresids.hrc rename to svx/inc/svx/fmresids.hrc diff --git a/svx/source/inc/fmsrccfg.hxx b/svx/inc/svx/fmsrccfg.hxx similarity index 100% rename from svx/source/inc/fmsrccfg.hxx rename to svx/inc/svx/fmsrccfg.hxx diff --git a/svx/source/inc/fmsrcimp.hxx b/svx/inc/svx/fmsrcimp.hxx similarity index 100% rename from svx/source/inc/fmsrcimp.hxx rename to svx/inc/svx/fmsrcimp.hxx diff --git a/svx/inc/fontlb.hxx b/svx/inc/svx/fontlb.hxx similarity index 100% rename from svx/inc/fontlb.hxx rename to svx/inc/svx/fontlb.hxx diff --git a/svx/inc/fontworkgallery.hxx b/svx/inc/svx/fontworkgallery.hxx similarity index 100% rename from svx/inc/fontworkgallery.hxx rename to svx/inc/svx/fontworkgallery.hxx diff --git a/svx/inc/formatpaintbrushctrl.hxx b/svx/inc/svx/formatpaintbrushctrl.hxx similarity index 100% rename from svx/inc/formatpaintbrushctrl.hxx rename to svx/inc/svx/formatpaintbrushctrl.hxx diff --git a/svx/inc/galbrws.hxx b/svx/inc/svx/galbrws.hxx similarity index 100% rename from svx/inc/galbrws.hxx rename to svx/inc/svx/galbrws.hxx diff --git a/svx/inc/galctrl.hxx b/svx/inc/svx/galctrl.hxx similarity index 100% rename from svx/inc/galctrl.hxx rename to svx/inc/svx/galctrl.hxx diff --git a/svx/inc/gallery.hxx b/svx/inc/svx/gallery.hxx similarity index 100% rename from svx/inc/gallery.hxx rename to svx/inc/svx/gallery.hxx diff --git a/svx/inc/galtheme.hxx b/svx/inc/svx/galtheme.hxx similarity index 100% rename from svx/inc/galtheme.hxx rename to svx/inc/svx/galtheme.hxx diff --git a/svx/inc/globl3d.hxx b/svx/inc/svx/globl3d.hxx similarity index 100% rename from svx/inc/globl3d.hxx rename to svx/inc/svx/globl3d.hxx diff --git a/svx/inc/grafctrl.hxx b/svx/inc/svx/grafctrl.hxx similarity index 100% rename from svx/inc/grafctrl.hxx rename to svx/inc/svx/grafctrl.hxx diff --git a/svx/inc/hlnkitem.hxx b/svx/inc/svx/hlnkitem.hxx similarity index 100% rename from svx/inc/hlnkitem.hxx rename to svx/inc/svx/hlnkitem.hxx diff --git a/svx/inc/htmlmode.hxx b/svx/inc/svx/htmlmode.hxx similarity index 100% rename from svx/inc/htmlmode.hxx rename to svx/inc/svx/htmlmode.hxx diff --git a/svx/inc/hyperdlg.hxx b/svx/inc/svx/hyperdlg.hxx similarity index 100% rename from svx/inc/hyperdlg.hxx rename to svx/inc/svx/hyperdlg.hxx diff --git a/svx/source/dialog/hyprlink.hxx b/svx/inc/svx/hyprlink.hxx similarity index 100% rename from svx/source/dialog/hyprlink.hxx rename to svx/inc/svx/hyprlink.hxx diff --git a/svx/inc/imapdlg.hxx b/svx/inc/svx/imapdlg.hxx similarity index 100% rename from svx/inc/imapdlg.hxx rename to svx/inc/svx/imapdlg.hxx diff --git a/svx/inc/insctrl.hxx b/svx/inc/svx/insctrl.hxx similarity index 100% rename from svx/inc/insctrl.hxx rename to svx/inc/svx/insctrl.hxx diff --git a/svx/inc/layctrl.hxx b/svx/inc/svx/layctrl.hxx similarity index 100% rename from svx/inc/layctrl.hxx rename to svx/inc/svx/layctrl.hxx diff --git a/svx/inc/lboxctrl.hxx b/svx/inc/svx/lboxctrl.hxx similarity index 100% rename from svx/inc/lboxctrl.hxx rename to svx/inc/svx/lboxctrl.hxx diff --git a/svx/inc/linectrl.hxx b/svx/inc/svx/linectrl.hxx similarity index 100% rename from svx/inc/linectrl.hxx rename to svx/inc/svx/linectrl.hxx diff --git a/svx/inc/measctrl.hxx b/svx/inc/svx/measctrl.hxx similarity index 100% rename from svx/inc/measctrl.hxx rename to svx/inc/svx/measctrl.hxx diff --git a/svx/inc/modctrl.hxx b/svx/inc/svx/modctrl.hxx similarity index 100% rename from svx/inc/modctrl.hxx rename to svx/inc/svx/modctrl.hxx diff --git a/svx/inc/numvset.hxx b/svx/inc/svx/numvset.hxx similarity index 100% rename from svx/inc/numvset.hxx rename to svx/inc/svx/numvset.hxx diff --git a/svx/inc/objfac3d.hxx b/svx/inc/svx/objfac3d.hxx similarity index 100% rename from svx/inc/objfac3d.hxx rename to svx/inc/svx/objfac3d.hxx diff --git a/svx/inc/ofaitem.hxx b/svx/inc/svx/ofaitem.hxx similarity index 100% rename from svx/inc/ofaitem.hxx rename to svx/inc/svx/ofaitem.hxx diff --git a/svx/inc/optgenrl.hxx b/svx/inc/svx/optgenrl.hxx similarity index 100% rename from svx/inc/optgenrl.hxx rename to svx/inc/svx/optgenrl.hxx diff --git a/svx/inc/optgrid.hxx b/svx/inc/svx/optgrid.hxx similarity index 100% rename from svx/inc/optgrid.hxx rename to svx/inc/svx/optgrid.hxx diff --git a/svx/inc/orienthelper.hxx b/svx/inc/svx/orienthelper.hxx similarity index 100% rename from svx/inc/orienthelper.hxx rename to svx/inc/svx/orienthelper.hxx diff --git a/svx/inc/passwd.hxx b/svx/inc/svx/passwd.hxx similarity index 100% rename from svx/inc/passwd.hxx rename to svx/inc/svx/passwd.hxx diff --git a/svx/inc/pfiledlg.hxx b/svx/inc/svx/pfiledlg.hxx similarity index 100% rename from svx/inc/pfiledlg.hxx rename to svx/inc/svx/pfiledlg.hxx diff --git a/svx/inc/postattr.hxx b/svx/inc/svx/postattr.hxx similarity index 100% rename from svx/inc/postattr.hxx rename to svx/inc/svx/postattr.hxx diff --git a/svx/inc/prtqry.hxx b/svx/inc/svx/prtqry.hxx similarity index 100% rename from svx/inc/prtqry.hxx rename to svx/inc/svx/prtqry.hxx diff --git a/svx/inc/pszctrl.hxx b/svx/inc/svx/pszctrl.hxx similarity index 100% rename from svx/inc/pszctrl.hxx rename to svx/inc/svx/pszctrl.hxx diff --git a/svx/inc/relfld.hxx b/svx/inc/svx/relfld.hxx similarity index 100% rename from svx/inc/relfld.hxx rename to svx/inc/svx/relfld.hxx diff --git a/svx/inc/rotmodit.hxx b/svx/inc/svx/rotmodit.hxx similarity index 100% rename from svx/inc/rotmodit.hxx rename to svx/inc/svx/rotmodit.hxx diff --git a/svx/inc/rubydialog.hxx b/svx/inc/svx/rubydialog.hxx similarity index 100% rename from svx/inc/rubydialog.hxx rename to svx/inc/svx/rubydialog.hxx diff --git a/svx/inc/rulritem.hxx b/svx/inc/svx/rulritem.hxx similarity index 100% rename from svx/inc/rulritem.hxx rename to svx/inc/svx/rulritem.hxx diff --git a/svx/inc/sdrpaintwindow.hxx b/svx/inc/svx/sdrpaintwindow.hxx similarity index 100% rename from svx/inc/sdrpaintwindow.hxx rename to svx/inc/svx/sdrpaintwindow.hxx diff --git a/svx/inc/selctrl.hxx b/svx/inc/svx/selctrl.hxx similarity index 100% rename from svx/inc/selctrl.hxx rename to svx/inc/svx/selctrl.hxx diff --git a/svx/inc/srchdlg.hxx b/svx/inc/svx/srchdlg.hxx similarity index 99% rename from svx/inc/srchdlg.hxx rename to svx/inc/svx/srchdlg.hxx index 29aec84fae24..0253f61a7785 100644 --- a/svx/inc/srchdlg.hxx +++ b/svx/inc/svx/srchdlg.hxx @@ -118,7 +118,7 @@ public: // class SvxSearchDialog ------------------------------------------------- /* - {k:\svx\prototyp\dialog\srchdlg.hxx} + {k:\svx\prototyp\dialog\svx/srchdlg.hxx} [Beschreibung] In diesem Modeless-Dialog werden die Attribute einer Suche eingestellt diff --git a/svx/inc/svdglob.hxx b/svx/inc/svx/svdglob.hxx similarity index 100% rename from svx/inc/svdglob.hxx rename to svx/inc/svx/svdglob.hxx diff --git a/svx/inc/svditer.hxx b/svx/inc/svx/svditer.hxx similarity index 100% rename from svx/inc/svditer.hxx rename to svx/inc/svx/svditer.hxx diff --git a/svx/source/svdraw/svditext.hxx b/svx/inc/svx/svditext.hxx similarity index 100% rename from svx/source/svdraw/svditext.hxx rename to svx/inc/svx/svditext.hxx diff --git a/svx/inc/svdstr.hrc b/svx/inc/svx/svdstr.hrc similarity index 100% rename from svx/inc/svdstr.hrc rename to svx/inc/svx/svdstr.hrc diff --git a/svx/inc/svdviter.hxx b/svx/inc/svx/svdviter.hxx similarity index 100% rename from svx/inc/svdviter.hxx rename to svx/inc/svx/svdviter.hxx diff --git a/svx/inc/svimbase.hxx b/svx/inc/svx/svimbase.hxx similarity index 100% rename from svx/inc/svimbase.hxx rename to svx/inc/svx/svimbase.hxx diff --git a/svx/inc/svxerr.hxx b/svx/inc/svx/svxerr.hxx similarity index 100% rename from svx/inc/svxerr.hxx rename to svx/inc/svx/svxerr.hxx diff --git a/svx/inc/svxgrahicitem.hxx b/svx/inc/svx/svxgrahicitem.hxx similarity index 100% rename from svx/inc/svxgrahicitem.hxx rename to svx/inc/svx/svxgrahicitem.hxx diff --git a/svx/inc/swframeexample.hxx b/svx/inc/svx/swframeexample.hxx similarity index 100% rename from svx/inc/swframeexample.hxx rename to svx/inc/svx/swframeexample.hxx diff --git a/svx/inc/swframeposstrings.hxx b/svx/inc/svx/swframeposstrings.hxx similarity index 100% rename from svx/inc/swframeposstrings.hxx rename to svx/inc/svx/swframeposstrings.hxx diff --git a/svx/inc/swframevalidation.hxx b/svx/inc/svx/swframevalidation.hxx similarity index 100% rename from svx/inc/swframevalidation.hxx rename to svx/inc/svx/swframevalidation.hxx diff --git a/svx/inc/tbxalign.hxx b/svx/inc/svx/tbxalign.hxx similarity index 100% rename from svx/inc/tbxalign.hxx rename to svx/inc/svx/tbxalign.hxx diff --git a/svx/inc/tbxcolor.hxx b/svx/inc/svx/tbxcolor.hxx similarity index 100% rename from svx/inc/tbxcolor.hxx rename to svx/inc/svx/tbxcolor.hxx diff --git a/svx/inc/tbxctl.hxx b/svx/inc/svx/tbxctl.hxx similarity index 100% rename from svx/inc/tbxctl.hxx rename to svx/inc/svx/tbxctl.hxx diff --git a/svx/inc/tbxcustomshapes.hxx b/svx/inc/svx/tbxcustomshapes.hxx similarity index 100% rename from svx/inc/tbxcustomshapes.hxx rename to svx/inc/svx/tbxcustomshapes.hxx diff --git a/svx/inc/tbxdraw.hxx b/svx/inc/svx/tbxdraw.hxx similarity index 100% rename from svx/inc/tbxdraw.hxx rename to svx/inc/svx/tbxdraw.hxx diff --git a/svx/inc/txencbox.hxx b/svx/inc/svx/txencbox.hxx similarity index 100% rename from svx/inc/txencbox.hxx rename to svx/inc/svx/txencbox.hxx diff --git a/svx/inc/txenctab.hxx b/svx/inc/svx/txenctab.hxx similarity index 100% rename from svx/inc/txenctab.hxx rename to svx/inc/svx/txenctab.hxx diff --git a/svx/inc/unoapi.hxx b/svx/inc/svx/unoapi.hxx similarity index 100% rename from svx/inc/unoapi.hxx rename to svx/inc/svx/unoapi.hxx diff --git a/svx/inc/unofill.hxx b/svx/inc/svx/unofill.hxx similarity index 100% rename from svx/inc/unofill.hxx rename to svx/inc/svx/unofill.hxx diff --git a/svx/inc/unomaster.hxx b/svx/inc/svx/unomaster.hxx similarity index 100% rename from svx/inc/unomaster.hxx rename to svx/inc/svx/unomaster.hxx diff --git a/svx/inc/unopool.hxx b/svx/inc/svx/unopool.hxx similarity index 100% rename from svx/inc/unopool.hxx rename to svx/inc/svx/unopool.hxx diff --git a/svx/inc/unoshcol.hxx b/svx/inc/svx/unoshcol.hxx similarity index 100% rename from svx/inc/unoshcol.hxx rename to svx/inc/svx/unoshcol.hxx diff --git a/svx/inc/verttexttbxctrl.hxx b/svx/inc/svx/verttexttbxctrl.hxx similarity index 100% rename from svx/inc/verttexttbxctrl.hxx rename to svx/inc/svx/verttexttbxctrl.hxx diff --git a/svx/inc/wrapfield.hxx b/svx/inc/svx/wrapfield.hxx similarity index 100% rename from svx/inc/wrapfield.hxx rename to svx/inc/svx/wrapfield.hxx diff --git a/svx/inc/xattr.hxx b/svx/inc/svx/xattr.hxx similarity index 100% rename from svx/inc/xattr.hxx rename to svx/inc/svx/xattr.hxx diff --git a/svx/inc/xexch.hxx b/svx/inc/svx/xexch.hxx similarity index 100% rename from svx/inc/xexch.hxx rename to svx/inc/svx/xexch.hxx diff --git a/svx/inc/xmleohlp.hxx b/svx/inc/svx/xmleohlp.hxx similarity index 100% rename from svx/inc/xmleohlp.hxx rename to svx/inc/svx/xmleohlp.hxx diff --git a/svx/inc/xmlexchg.hxx b/svx/inc/svx/xmlexchg.hxx similarity index 100% rename from svx/inc/xmlexchg.hxx rename to svx/inc/svx/xmlexchg.hxx diff --git a/svx/inc/xmlgrhlp.hxx b/svx/inc/svx/xmlgrhlp.hxx similarity index 100% rename from svx/inc/xmlgrhlp.hxx rename to svx/inc/svx/xmlgrhlp.hxx diff --git a/svx/inc/xmlsecctrl.hxx b/svx/inc/svx/xmlsecctrl.hxx similarity index 100% rename from svx/inc/xmlsecctrl.hxx rename to svx/inc/svx/xmlsecctrl.hxx diff --git a/svx/inc/xoutbmp.hxx b/svx/inc/svx/xoutbmp.hxx similarity index 100% rename from svx/inc/xoutbmp.hxx rename to svx/inc/svx/xoutbmp.hxx diff --git a/svx/inc/zoom_def.hxx b/svx/inc/svx/zoom_def.hxx similarity index 100% rename from svx/inc/zoom_def.hxx rename to svx/inc/svx/zoom_def.hxx diff --git a/svx/inc/zoomctrl.hxx b/svx/inc/svx/zoomctrl.hxx similarity index 100% rename from svx/inc/zoomctrl.hxx rename to svx/inc/svx/zoomctrl.hxx diff --git a/svx/prj/d.lst b/svx/prj/d.lst index 7d2f508d9d21..be04e229f593 100644 --- a/svx/prj/d.lst +++ b/svx/prj/d.lst @@ -22,568 +22,12 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\sdi\svxitems.sdi %_DEST%\inc%_EXT%\svx\svxitems.sdi ..\sdi\xoitems.sdi %_DEST%\inc%_EXT%\svx\xoitems.sdi -..\source\inc\fmsrccfg.hxx %_DEST%\inc%_EXT%\svx\fmsrccfg.hxx -..\source\inc\fmsrcimp.hxx %_DEST%\inc%_EXT%\svx\fmsrcimp.hxx -..\inc\galtheme.hxx %_DEST%\inc%_EXT%\svx\galtheme.hxx -..\inc\galctrl.hxx %_DEST%\inc%_EXT%\svx\galctrl.hxx -..\inc\svx\galmisc.hxx %_DEST%\inc%_EXT%\svx\galmisc.hxx -..\inc\svx\gallery1.hxx %_DEST%\inc%_EXT%\svx\gallery1.hxx -..\inc\svx\fmtools.hxx %_DEST%\inc%_EXT%\svx\fmtools.hxx -..\inc\svx\exthelpid.hrc %_DEST%\inc%_EXT%\svx\exthelpid.hrc +..\inc\svx\*.hxx %_DEST%\inc%_EXT%\svx\*.hxx +..\inc\svx\*.h %_DEST%\inc%_EXT%\svx\*.h +..\inc\svx\*.hrc %_DEST%\inc%_EXT%\svx\*.hrc -..\inc\flagsdef.hxx %_DEST%\inc%_EXT%\svx\flagsdef.hxx ..\%__SRC%\inc\svxslots.hxx %_DEST%\inc%_EXT%\svx\svxslots.hxx ..\%__SRC%\inc\globlmn.hrc %_DEST%\inc%_EXT%\svx\globlmn.hrc -..\source\inc\fmresids.hrc %_DEST%\inc%_EXT%\svx\fmresids.hrc -..\source\items\boxobj.hxx %_DEST%\inc%_EXT%\svx\boxobj.hxx -..\source\dialog\hyprlink.hxx %_DEST%\inc%_EXT%\svx\hyprlink.hxx - -../source/customshapes/EnhancedCustomShapeTypeNames.hxx %_DEST%\inc%_EXT%\svx\EnhancedCustomShapeTypeNames.hxx -../source/customshapes/EnhancedCustomShapeGeometry.hxx %_DEST%\inc%_EXT%\svx\EnhancedCustomShapeGeometry.hxx -../inc/svx/EnhancedCustomShapeFunctionParser.hxx %_DEST%\inc%_EXT%\svx\EnhancedCustomShapeFunctionParser.hxx -../source/customshapes/EnhancedCustomShape2d.hxx %_DEST%\inc%_EXT%\svx\EnhancedCustomShape2d.hxx -../inc/xattr.hxx %_DEST%\inc%_EXT%\svx\xattr.hxx -../inc/svdglob.hxx %_DEST%\inc%_EXT%\svx\svdglob.hxx -../source/svdraw/svditext.hxx %_DEST%\inc%_EXT%\svx\svditext.hxx - -..\inc\AccessibleSelectionBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleSelectionBase.hxx -..\inc\AccessibleStaticTextBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleStaticTextBase.hxx -..\inc\acorrcfg.hxx %_DEST%\inc%_EXT%\svx\acorrcfg.hxx -..\inc\ActionDescriptionProvider.hxx %_DEST%\inc%_EXT%\svx\ActionDescriptionProvider.hxx -..\inc\anchorid.hxx %_DEST%\inc%_EXT%\svx\anchorid.hxx -..\inc\asiancfg.hxx %_DEST%\inc%_EXT%\svx\asiancfg.hxx -..\inc\bolnitem.hxx %_DEST%\inc%_EXT%\svx\bolnitem.hxx -..\inc\bulitem.hxx %_DEST%\inc%_EXT%\svx\bulitem.hxx -..\inc\charhiddenitem.hxx %_DEST%\inc%_EXT%\svx\charhiddenitem.hxx -..\inc\chrtitem.hxx %_DEST%\inc%_EXT%\svx\chrtitem.hxx -..\inc\clipboardctl.hxx %_DEST%\inc%_EXT%\svx\clipboardctl.hxx -..\inc\clipfmtitem.hxx %_DEST%\inc%_EXT%\svx\clipfmtitem.hxx -..\inc\connctrl.hxx %_DEST%\inc%_EXT%\svx\connctrl.hxx -..\inc\countryid.hxx %_DEST%\inc%_EXT%\svx\countryid.hxx -..\inc\databaseregistrationui.hxx %_DEST%\inc%_EXT%\svx\databaseregistrationui.hxx -..\inc\dbexch.hrc %_DEST%\inc%_EXT%\svx\dbexch.hrc -..\inc\DescriptionGenerator.hxx %_DEST%\inc%_EXT%\svx\DescriptionGenerator.hxx -..\inc\dialcontrol.hxx %_DEST%\inc%_EXT%\svx\dialcontrol.hxx -..\inc\dlgutil.hxx %_DEST%\inc%_EXT%\svx\dlgutil.hxx -..\inc\drawitem.hxx %_DEST%\inc%_EXT%\svx\drawitem.hxx -..\inc\editstat.hxx %_DEST%\inc%_EXT%\svx\editstat.hxx -..\inc\editund2.hxx %_DEST%\inc%_EXT%\svx\editund2.hxx -..\inc\eerdll.hxx %_DEST%\inc%_EXT%\svx\editdll.hxx -..\inc\extrusioncontrols.hxx %_DEST%\inc%_EXT%\svx\extrusioncontrols.hxx -..\inc\flstitem.hxx %_DEST%\inc%_EXT%\svx\flstitem.hxx -..\inc\fmgridif.hxx %_DEST%\inc%_EXT%\svx\fmgridif.hxx -..\inc\fmobjfac.hxx %_DEST%\inc%_EXT%\svx\fmobjfac.hxx -..\inc\fontitem.hxx %_DEST%\inc%_EXT%\svx\fontitem.hxx -..\inc\fontlb.hxx %_DEST%\inc%_EXT%\svx\fontlb.hxx -..\inc\fontworkgallery.hxx %_DEST%\inc%_EXT%\svx\fontworkgallery.hxx -..\inc\forbiddencharacterstable.hxx %_DEST%\inc%_EXT%\svx\forbiddencharacterstable.hxx -..\inc\formatpaintbrushctrl.hxx %_DEST%\inc%_EXT%\svx\formatpaintbrushctrl.hxx -..\inc\fwdtitem.hxx %_DEST%\inc%_EXT%\svx\fwdtitem.hxx -..\inc\gallery.hxx %_DEST%\inc%_EXT%\svx\gallery.hxx -..\inc\galbrws.hxx %_DEST%\inc%_EXT%\svx\galbrws.hxx -..\inc\globlac.hrc %_DEST%\inc%_EXT%\svx\globlac.hrc -..\inc\globl3d.hxx %_DEST%\inc%_EXT%\svx\globl3d.hxx -..\inc\grafctrl.hxx %_DEST%\inc%_EXT%\svx\grafctrl.hxx -..\inc\hlnkitem.hxx %_DEST%\inc%_EXT%\svx\hlnkitem.hxx -..\inc\htmlcfg.hxx %_DEST%\inc%_EXT%\svx\htmlcfg.hxx -..\inc\htmlmode.hxx %_DEST%\inc%_EXT%\svx\htmlmode.hxx -..\inc\hyperdlg.hxx %_DEST%\inc%_EXT%\svx\hyperdlg.hxx -..\inc\imapdlg.hxx %_DEST%\inc%_EXT%\svx\imapdlg.hxx -..\inc\opengrf.hxx %_DEST%\inc%_EXT%\svx\opengrf.hxx -..\inc\insctrl.hxx %_DEST%\inc%_EXT%\svx\insctrl.hxx -..\inc\layctrl.hxx %_DEST%\inc%_EXT%\svx\layctrl.hxx -..\inc\lboxctrl.hxx %_DEST%\inc%_EXT%\svx\lboxctrl.hxx -..\inc\linectrl.hxx %_DEST%\inc%_EXT%\svx\linectrl.hxx -..\inc\linkmgr.hxx %_DEST%\inc%_EXT%\svx\linkmgr.hxx -..\inc\measctrl.hxx %_DEST%\inc%_EXT%\svx\measctrl.hxx -..\inc\modctrl.hxx %_DEST%\inc%_EXT%\svx\modctrl.hxx -..\inc\mscodec.hxx %_DEST%\inc%_EXT%\svx\mscodec.hxx -..\inc\msoleexp.hxx %_DEST%\inc%_EXT%\svx\msoleexp.hxx -..\inc\nlbkitem.hxx %_DEST%\inc%_EXT%\svx\nlbkitem.hxx -..\inc\numvset.hxx %_DEST%\inc%_EXT%\svx\numvset.hxx -..\inc\objfac3d.hxx %_DEST%\inc%_EXT%\svx\objfac3d.hxx -..\inc\ofaitem.hxx %_DEST%\inc%_EXT%\svx\ofaitem.hxx -..\inc\opaqitem.hxx %_DEST%\inc%_EXT%\svx\opaqitem.hxx -..\inc\optgenrl.hxx %_DEST%\inc%_EXT%\svx\optgenrl.hxx -..\inc\optgrid.hxx %_DEST%\inc%_EXT%\svx\optgrid.hxx -..\inc\optitems.hxx %_DEST%\inc%_EXT%\svx\optitems.hxx -..\inc\orienthelper.hxx %_DEST%\inc%_EXT%\svx\orienthelper.hxx -..\inc\ParseContext.hxx %_DEST%\inc%_EXT%\svx\ParseContext.hxx -..\inc\passwd.hxx %_DEST%\inc%_EXT%\svx\passwd.hxx -..\inc\pfiledlg.hxx %_DEST%\inc%_EXT%\svx\pfiledlg.hxx -..\inc\pgrditem.hxx %_DEST%\inc%_EXT%\svx\pgrditem.hxx -..\inc\postattr.hxx %_DEST%\inc%_EXT%\svx\postattr.hxx -..\inc\prntitem.hxx %_DEST%\inc%_EXT%\svx\prntitem.hxx -..\inc\protitem.hxx %_DEST%\inc%_EXT%\svx\protitem.hxx -..\inc\prtqry.hxx %_DEST%\inc%_EXT%\svx\prtqry.hxx -..\inc\pszctrl.hxx %_DEST%\inc%_EXT%\svx\pszctrl.hxx -..\inc\relfld.hxx %_DEST%\inc%_EXT%\svx\relfld.hxx -..\inc\rotmodit.hxx %_DEST%\inc%_EXT%\svx\rotmodit.hxx -..\inc\rubydialog.hxx %_DEST%\inc%_EXT%\svx\rubydialog.hxx -..\inc\rulritem.hxx %_DEST%\inc%_EXT%\svx\rulritem.hxx -..\inc\sdrpaintwindow.hxx %_DEST%\inc%_EXT%\svx\sdrpaintwindow.hxx -..\inc\selctrl.hxx %_DEST%\inc%_EXT%\svx\selctrl.hxx -..\inc\srchcfg.hxx %_DEST%\inc%_EXT%\svx\srchcfg.hxx -..\inc\srchdlg.hxx %_DEST%\inc%_EXT%\svx\srchdlg.hxx -..\inc\srchitem.hxx %_DEST%\inc%_EXT%\svx\srchitem.hxx -..\inc\svditer.hxx %_DEST%\inc%_EXT%\svx\svditer.hxx -..\inc\svdstr.hrc %_DEST%\inc%_EXT%\svx\svdstr.hrc -..\inc\svdviter.hxx %_DEST%\inc%_EXT%\svx\svdviter.hxx -..\inc\svimbase.hxx %_DEST%\inc%_EXT%\svx\svimbase.hxx -..\inc\svxerr.hxx %_DEST%\inc%_EXT%\svx\svxerr.hxx -..\inc\svxgrahicitem.hxx %_DEST%\inc%_EXT%\svx\svxgrahicitem.hxx -..\inc\svxmsbas.hxx %_DEST%\inc%_EXT%\svx\svxmsbas.hxx -..\inc\svxrtf.hxx %_DEST%\inc%_EXT%\svx\svxrtf.hxx -..\inc\swframeposstrings.hxx %_DEST%\inc%_EXT%\svx\swframeposstrings.hxx -..\inc\swframevalidation.hxx %_DEST%\inc%_EXT%\svx\swframevalidation.hxx -..\inc\swframeexample.hxx %_DEST%\inc%_EXT%\svx\swframeexample.hxx -..\inc\tbxalign.hxx %_DEST%\inc%_EXT%\svx\tbxalign.hxx -..\inc\tbxcolor.hxx %_DEST%\inc%_EXT%\svx\tbxcolor.hxx -..\inc\tbxctl.hxx %_DEST%\inc%_EXT%\svx\tbxctl.hxx -..\inc\tbxcustomshapes.hxx %_DEST%\inc%_EXT%\svx\tbxcustomshapes.hxx -..\inc\tbxdraw.hxx %_DEST%\inc%_EXT%\svx\tbxdraw.hxx -..\inc\txencbox.hxx %_DEST%\inc%_EXT%\svx\txencbox.hxx -..\inc\txenctab.hxx %_DEST%\inc%_EXT%\svx\txenctab.hxx -..\inc\txtrange.hxx %_DEST%\inc%_EXT%\svx\txtrange.hxx -..\inc\unoapi.hxx %_DEST%\inc%_EXT%\svx\unoapi.hxx -..\inc\unoedhlp.hxx %_DEST%\inc%_EXT%\svx\unoedhlp.hxx -..\inc\unofdesc.hxx %_DEST%\inc%_EXT%\svx\unofdesc.hxx -..\inc\unofill.hxx %_DEST%\inc%_EXT%\svx\unofill.hxx -..\inc\UnoForbiddenCharsTable.hxx %_DEST%\inc%_EXT%\svx\UnoForbiddenCharsTable.hxx -..\inc\unolingu.hxx %_DEST%\inc%_EXT%\svx\unolingu.hxx -..\inc\unomaster.hxx %_DEST%\inc%_EXT%\svx\unomaster.hxx -..\inc\UnoNamespaceMap.hxx %_DEST%\inc%_EXT%\svx\UnoNamespaceMap.hxx -..\inc\unonrule.hxx %_DEST%\inc%_EXT%\svx\unonrule.hxx -..\inc\unopool.hxx %_DEST%\inc%_EXT%\svx\unopool.hxx -..\inc\unoshcol.hxx %_DEST%\inc%_EXT%\svx\unoshcol.hxx -..\inc\verttexttbxctrl.hxx %_DEST%\inc%_EXT%\svx\verttexttbxctrl.hxx -..\inc\wrapfield.hxx %_DEST%\inc%_EXT%\svx\wrapfield.hxx -..\inc\xexch.hxx %_DEST%\inc%_EXT%\svx\xexch.hxx -..\inc\xmlcnitm.hxx %_DEST%\inc%_EXT%\svx\xmlcnitm.hxx -..\inc\xmleohlp.hxx %_DEST%\inc%_EXT%\svx\xmleohlp.hxx -..\inc\xmlexchg.hxx %_DEST%\inc%_EXT%\svx\xmlexchg.hxx -..\inc\xmlgrhlp.hxx %_DEST%\inc%_EXT%\svx\xmlgrhlp.hxx -..\inc\xmlsecctrl.hxx %_DEST%\inc%_EXT%\svx\xmlsecctrl.hxx -..\inc\xoutbmp.hxx %_DEST%\inc%_EXT%\svx\xoutbmp.hxx -..\inc\XPropertyTable.hxx %_DEST%\inc%_EXT%\svx\XPropertyTable.hxx -..\inc\zoom_def.hxx %_DEST%\inc%_EXT%\svx\zoom_def.hxx -..\inc\zoomctrl.hxx %_DEST%\inc%_EXT%\svx\zoomctrl.hxx - -..\inc\svx\xlinjoit.hxx %_DEST%\inc%_EXT%\svx\xlinjoit.hxx -..\inc\svx\impgrf.hxx %_DEST%\inc%_EXT%\svx\impgrf.hxx -..\inc\svx\dstribut_enum.hxx %_DEST%\inc%_EXT%\svx\dstribut_enum.hxx -..\inc\svx\svdfield.hxx %_DEST%\inc%_EXT%\svx\svdfield.hxx -..\inc\svx\svxitems.hrc %_DEST%\inc%_EXT%\svx\svxitems.hrc -..\inc\svx\svddef.hxx %_DEST%\inc%_EXT%\svx\svddef.hxx -..\inc\svx\svdfppt.hxx %_DEST%\inc%_EXT%\svx\svdfppt.hxx -..\inc\svx\ipolypolygoneditorcontroller.hxx %_DEST%\inc%_EXT%\svx\ipolypolygoneditorcontroller.hxx -..\inc\svx\polypolygoneditor.hxx %_DEST%\inc%_EXT%\svx\polypolygoneditor.hxx -..\inc\svx\svdsob.hxx %_DEST%\inc%_EXT%\svx\svdsob.hxx -..\inc\svx\svdlayer.hxx %_DEST%\inc%_EXT%\svx\svdlayer.hxx -..\inc\svx\adjitem.hxx %_DEST%\inc%_EXT%\svx\adjitem.hxx -..\inc\svx\akrnitem.hxx %_DEST%\inc%_EXT%\svx\akrnitem.hxx -..\inc\svx\algitem.hxx %_DEST%\inc%_EXT%\svx\algitem.hxx -..\inc\svx\simptabl.hxx %_DEST%\inc%_EXT%\svx\simptabl.hxx -..\inc\svx\ctredlin.hxx %_DEST%\inc%_EXT%\svx\ctredlin.hxx -..\inc\svx\blnkitem.hxx %_DEST%\inc%_EXT%\svx\blnkitem.hxx -..\inc\svx\bmpmask.hxx %_DEST%\inc%_EXT%\svx\bmpmask.hxx -..\inc\svx\borderline.hxx %_DEST%\inc%_EXT%\svx\borderline.hxx -..\inc\svx\boxitem.hxx %_DEST%\inc%_EXT%\svx\boxitem.hxx -..\inc\svx\brkitem.hxx %_DEST%\inc%_EXT%\svx\brkitem.hxx -..\inc\svx\brshitem.hxx %_DEST%\inc%_EXT%\svx\brshitem.hxx -..\inc\svx\camera3d.hxx %_DEST%\inc%_EXT%\svx\camera3d.hxx -..\inc\svx\charmap.hxx %_DEST%\inc%_EXT%\svx\charmap.hxx -..\inc\svx\checklbx.hxx %_DEST%\inc%_EXT%\svx\checklbx.hxx -..\inc\svx\cmapitem.hxx %_DEST%\inc%_EXT%\svx\cmapitem.hxx -..\inc\svx\cntritem.hxx %_DEST%\inc%_EXT%\svx\cntritem.hxx -..\inc\svx\colritem.hxx %_DEST%\inc%_EXT%\svx\colritem.hxx -..\inc\svx\contdlg.hxx %_DEST%\inc%_EXT%\svx\contdlg.hxx -..\inc\svx\tabarea.hxx %_DEST%\inc%_EXT%\svx\tabarea.hxx -..\inc\svx\tabline.hxx %_DEST%\inc%_EXT%\svx\tabline.hxx -..\inc\svx\crsditem.hxx %_DEST%\inc%_EXT%\svx\crsditem.hxx -..\inc\svx\cscoitem.hxx %_DEST%\inc%_EXT%\svx\cscoitem.hxx -..\inc\svx\colrctrl.hxx %_DEST%\inc%_EXT%\svx\colrctrl.hxx -..\inc\svx\cube3d.hxx %_DEST%\inc%_EXT%\svx\cube3d.hxx -..\inc\svx\polygn3d.hxx %_DEST%\inc%_EXT%\svx\polygn3d.hxx -..\inc\svx\lathe3d.hxx %_DEST%\inc%_EXT%\svx\lathe3d.hxx -..\inc\svx\e3ditem.hxx %_DEST%\inc%_EXT%\svx\e3ditem.hxx -..\inc\svx\def3d.hxx %_DEST%\inc%_EXT%\svx\def3d.hxx -..\inc\svx\svdtypes.hxx %_DEST%\inc%_EXT%\svx\svdtypes.hxx -..\inc\svx\volume3d.hxx %_DEST%\inc%_EXT%\svx\volume3d.hxx -..\inc\svx\xenum.hxx %_DEST%\inc%_EXT%\svx\xenum.hxx -..\inc\svx\dialmgr.hxx %_DEST%\inc%_EXT%\svx\dialmgr.hxx -..\inc\svx\dlgctl3d.hxx %_DEST%\inc%_EXT%\svx\dlgctl3d.hxx -..\inc\svx\dlgctrl.hxx %_DEST%\inc%_EXT%\svx\dlgctrl.hxx -..\inc\svx\dialogs.hrc %_DEST%\inc%_EXT%\svx\dialogs.hrc -..\inc\svx\escpitem.hxx %_DEST%\inc%_EXT%\svx\escpitem.hxx -..\inc\svx\extrud3d.hxx %_DEST%\inc%_EXT%\svx\extrud3d.hxx -..\inc\svx\escherex.hxx %_DEST%\inc%_EXT%\svx\escherex.hxx -..\inc\svx\f3dchild.hxx %_DEST%\inc%_EXT%\svx\f3dchild.hxx -..\inc\svx\fhgtitem.hxx %_DEST%\inc%_EXT%\svx\fhgtitem.hxx -..\inc\svx\fillctrl.hxx %_DEST%\inc%_EXT%\svx\fillctrl.hxx -..\inc\svx\float3d.hxx %_DEST%\inc%_EXT%\svx\float3d.hxx -..\inc\svx\flditem.hxx %_DEST%\inc%_EXT%\svx\flditem.hxx -..\inc\svx\fntctl.hxx %_DEST%\inc%_EXT%\svx\fntctl.hxx -..\inc\svx\fntctrl.hxx %_DEST%\inc%_EXT%\svx\fntctrl.hxx -..\inc\svx\fntszctl.hxx %_DEST%\inc%_EXT%\svx\fntszctl.hxx -..\inc\svx\fontwork.hxx %_DEST%\inc%_EXT%\svx\fontwork.hxx -..\inc\svx\framebordertype.hxx %_DEST%\inc%_EXT%\svx\framebordertype.hxx -..\inc\svx\framelink.hxx %_DEST%\inc%_EXT%\svx\framelink.hxx -..\inc\svx\framelinkarray.hxx %_DEST%\inc%_EXT%\svx\framelinkarray.hxx -..\inc\svx\frmsel.hxx %_DEST%\inc%_EXT%\svx\frmsel.hxx -..\inc\svx\graphctl.hxx %_DEST%\inc%_EXT%\svx\graphctl.hxx -..\inc\svx\hdft.hxx %_DEST%\inc%_EXT%\svx\hdft2.hxx -..\inc\svx\hyznitem.hxx %_DEST%\inc%_EXT%\svx\hyznitem.hxx -..\inc\svx\ifaceids.hxx %_DEST%\inc%_EXT%\svx\ifaceids.hxx -..\inc\svx\itemwin.hxx %_DEST%\inc%_EXT%\svx\itemwin.hxx -..\inc\svx\keepitem.hxx %_DEST%\inc%_EXT%\svx\keepitem.hxx -..\inc\svx\kernitem.hxx %_DEST%\inc%_EXT%\svx\kernitem.hxx -..\inc\svx\langbox.hxx %_DEST%\inc%_EXT%\svx\langbox.hxx -..\inc\svx\langitem.hxx %_DEST%\inc%_EXT%\svx\langitem.hxx -..\inc\svx\lcolitem.hxx %_DEST%\inc%_EXT%\svx\lcolitem.hxx -..\inc\svx\lrspitem.hxx %_DEST%\inc%_EXT%\svx\lrspitem.hxx -..\inc\svx\lspcitem.hxx %_DEST%\inc%_EXT%\svx\lspcitem.hxx -..\inc\svx\nhypitem.hxx %_DEST%\inc%_EXT%\svx\nhypitem.hxx -..\inc\svx\numinf.hxx %_DEST%\inc%_EXT%\svx\numinf.hxx -..\inc\svx\numfmtsh.hxx %_DEST%\inc%_EXT%\svx\numfmtsh.hxx -..\inc\svx\obj3d.hxx %_DEST%\inc%_EXT%\svx\obj3d.hxx -..\inc\svx\optlingu.hxx %_DEST%\inc%_EXT%\svx\optlingu.hxx -..\inc\svx\orphitem.hxx %_DEST%\inc%_EXT%\svx\orphitem.hxx -..\inc\svx\pagectrl.hxx %_DEST%\inc%_EXT%\svx\pagectrl.hxx -..\inc\svx\pageitem.hxx %_DEST%\inc%_EXT%\svx\pageitem.hxx -..\inc\svx\paperinf.hxx %_DEST%\inc%_EXT%\svx\paperinf.hxx -..\inc\svx\paraprev.hxx %_DEST%\inc%_EXT%\svx\paraprev.hxx -..\inc\svx\pbinitem.hxx %_DEST%\inc%_EXT%\svx\pbinitem.hxx -..\inc\svx\pmdlitem.hxx %_DEST%\inc%_EXT%\svx\pmdlitem.hxx -..\inc\svx\polysc3d.hxx %_DEST%\inc%_EXT%\svx\polysc3d.hxx -..\inc\svx\postitem.hxx %_DEST%\inc%_EXT%\svx\postitem.hxx -..\inc\svx\prszitem.hxx %_DEST%\inc%_EXT%\svx\prszitem.hxx -..\inc\svx\rectenum.hxx %_DEST%\inc%_EXT%\svx\rectenum.hxx -..\inc\svx\ruler.hxx %_DEST%\inc%_EXT%\svx\ruler.hxx -..\inc\svx\scene3d.hxx %_DEST%\inc%_EXT%\svx\scene3d.hxx -..\inc\svx\e3dsceneupdater.hxx %_DEST%\inc%_EXT%\svx\e3dsceneupdater.hxx -..\inc\svx\sdangitm.hxx %_DEST%\inc%_EXT%\svx\sdangitm.hxx -..\inc\svx\sderitm.hxx %_DEST%\inc%_EXT%\svx\sderitm.hxx -..\inc\svx\sdgcoitm.hxx %_DEST%\inc%_EXT%\svx\sdgcoitm.hxx -..\inc\svx\sdgcpitm.hxx %_DEST%\inc%_EXT%\svx\sdgcpitm.hxx -..\inc\svx\sdgluitm.hxx %_DEST%\inc%_EXT%\svx\sdgluitm.hxx -..\inc\svx\sdginitm.hxx %_DEST%\inc%_EXT%\svx\sdginitm.hxx -..\inc\svx\sdggaitm.hxx %_DEST%\inc%_EXT%\svx\sdggaitm.hxx -..\inc\svx\sdgmoitm.hxx %_DEST%\inc%_EXT%\svx\sdgmoitm.hxx -..\inc\svx\sdgtritm.hxx %_DEST%\inc%_EXT%\svx\sdgtritm.hxx -..\inc\svx\sdmetitm.hxx %_DEST%\inc%_EXT%\svx\sdmetitm.hxx -..\inc\svx\sdooitm.hxx %_DEST%\inc%_EXT%\svx\sdooitm.hxx -..\inc\svx\sdprcitm.hxx %_DEST%\inc%_EXT%\svx\sdprcitm.hxx -..\inc\svx\sdshcitm.hxx %_DEST%\inc%_EXT%\svx\sdshcitm.hxx -..\inc\svx\sdshitm.hxx %_DEST%\inc%_EXT%\svx\sdshitm.hxx -..\inc\svx\sdshtitm.hxx %_DEST%\inc%_EXT%\svx\sdshtitm.hxx -..\inc\svx\sdsxyitm.hxx %_DEST%\inc%_EXT%\svx\sdsxyitm.hxx -..\inc\svx\sdtaaitm.hxx %_DEST%\inc%_EXT%\svx\sdtaaitm.hxx -..\inc\svx\sdtacitm.hxx %_DEST%\inc%_EXT%\svx\sdtacitm.hxx -..\inc\svx\sdtaditm.hxx %_DEST%\inc%_EXT%\svx\sdtaditm.hxx -..\inc\svx\sdtagitm.hxx %_DEST%\inc%_EXT%\svx\sdtagitm.hxx -..\inc\svx\sdtaiitm.hxx %_DEST%\inc%_EXT%\svx\sdtaiitm.hxx -..\inc\svx\sdtfchim.hxx %_DEST%\inc%_EXT%\svx\sdtfchim.hxx -..\inc\svx\sdtaitm.hxx %_DEST%\inc%_EXT%\svx\sdtaitm.hxx -..\inc\svx\sdtakitm.hxx %_DEST%\inc%_EXT%\svx\sdtakitm.hxx -..\inc\svx\sdtayitm.hxx %_DEST%\inc%_EXT%\svx\sdtayitm.hxx -..\inc\svx\sdtcfitm.hxx %_DEST%\inc%_EXT%\svx\sdtcfitm.hxx -..\inc\svx\sdtditm.hxx %_DEST%\inc%_EXT%\svx\sdtditm.hxx -..\inc\svx\sdtfsitm.hxx %_DEST%\inc%_EXT%\svx\sdtfsitm.hxx -..\inc\svx\sdtmfitm.hxx %_DEST%\inc%_EXT%\svx\sdtmfitm.hxx -..\inc\svx\sdynitm.hxx %_DEST%\inc%_EXT%\svx\sdynitm.hxx -..\inc\svx\shaditem.hxx %_DEST%\inc%_EXT%\svx\shaditem.hxx -..\inc\svx\shdditem.hxx %_DEST%\inc%_EXT%\svx\shdditem.hxx -..\inc\svx\sizeitem.hxx %_DEST%\inc%_EXT%\svx\sizeitem.hxx -..\inc\svx\sphere3d.hxx %_DEST%\inc%_EXT%\svx\sphere3d.hxx -..\inc\svx\spltitem.hxx %_DEST%\inc%_EXT%\svx\spltitem.hxx -..\inc\svx\hangulhanja.hxx %_DEST%\inc%_EXT%\svx\hangulhanja.hxx -..\inc\svx\SpellPortions.hxx %_DEST%\inc%_EXT%\svx\SpellPortions.hxx -..\inc\svx\SpellDialogChildWindow.hxx %_DEST%\inc%_EXT%\svx\SpellDialogChildWindow.hxx -..\inc\svx\splwrap.hxx %_DEST%\inc%_EXT%\svx\splwrap.hxx -..\inc\svx\stddlg.hxx %_DEST%\inc%_EXT%\svx\stddlg.hxx -..\inc\svx\strarray.hxx %_DEST%\inc%_EXT%\svx\strarray.hxx -..\inc\svx\svdattr.hxx %_DEST%\inc%_EXT%\svx\svdattr.hxx -..\inc\svx\svdattrx.hxx %_DEST%\inc%_EXT%\svx\svdattrx.hxx -..\inc\svx\svdcrtv.hxx %_DEST%\inc%_EXT%\svx\svdcrtv.hxx -..\inc\svx\svddrag.hxx %_DEST%\inc%_EXT%\svx\svddrag.hxx -..\inc\svx\svddrgmt.hxx %_DEST%\inc%_EXT%\svx\svddrgmt.hxx -..\inc\svx\svddrgv.hxx %_DEST%\inc%_EXT%\svx\svddrgv.hxx -..\inc\svx\svdedtv.hxx %_DEST%\inc%_EXT%\svx\svdedtv.hxx -..\inc\svx\svdedxv.hxx %_DEST%\inc%_EXT%\svx\svdedxv.hxx -..\inc\svx\svdetc.hxx %_DEST%\inc%_EXT%\svx\svdetc.hxx -..\inc\svx\sdrhittesthelper.hxx %_DEST%\inc%_EXT%\svx\sdrhittesthelper.hxx -..\inc\svx\svdglev.hxx %_DEST%\inc%_EXT%\svx\svdglev.hxx -..\inc\svx\svdglue.hxx %_DEST%\inc%_EXT%\svx\svdglue.hxx -..\inc\svx\svdhdl.hxx %_DEST%\inc%_EXT%\svx\svdhdl.hxx -..\inc\svx\svdhlpln.hxx %_DEST%\inc%_EXT%\svx\svdhlpln.hxx -..\inc\svx\svdmark.hxx %_DEST%\inc%_EXT%\svx\svdmark.hxx -..\inc\svx\svdmodel.hxx %_DEST%\inc%_EXT%\svx\svdmodel.hxx -..\inc\svx\svdmrkv.hxx %_DEST%\inc%_EXT%\svx\svdmrkv.hxx -..\inc\svx\svdoattr.hxx %_DEST%\inc%_EXT%\svx\svdoattr.hxx -..\inc\svx\svdobj.hxx %_DEST%\inc%_EXT%\svx\svdobj.hxx -..\inc\svx\sdrobjectuser.hxx %_DEST%\inc%_EXT%\svx\sdrobjectuser.hxx -..\inc\svx\svdocapt.hxx %_DEST%\inc%_EXT%\svx\svdocapt.hxx -..\inc\svx\svdocirc.hxx %_DEST%\inc%_EXT%\svx\svdocirc.hxx -..\inc\svx\svdoedge.hxx %_DEST%\inc%_EXT%\svx\svdoedge.hxx -..\inc\svx\svdograf.hxx %_DEST%\inc%_EXT%\svx\svdograf.hxx -..\inc\svx\svdogrp.hxx %_DEST%\inc%_EXT%\svx\svdogrp.hxx -..\inc\svx\svdomeas.hxx %_DEST%\inc%_EXT%\svx\svdomeas.hxx -..\inc\svx\svdomedia.hxx %_DEST%\inc%_EXT%\svx\svdomedia.hxx -..\inc\svx\svdoole2.hxx %_DEST%\inc%_EXT%\svx\svdoole2.hxx -..\inc\svx\svdopage.hxx %_DEST%\inc%_EXT%\svx\svdopage.hxx -..\inc\svx\svdopath.hxx %_DEST%\inc%_EXT%\svx\svdopath.hxx -..\inc\svx\svdorect.hxx %_DEST%\inc%_EXT%\svx\svdorect.hxx -..\inc\svx\svdotext.hxx %_DEST%\inc%_EXT%\svx\svdotext.hxx -..\inc\svx\svdovirt.hxx %_DEST%\inc%_EXT%\svx\svdovirt.hxx -..\inc\svx\svdpage.hxx %_DEST%\inc%_EXT%\svx\svdpage.hxx -..\inc\svx\sdrmasterpagedescriptor.hxx %_DEST%\inc%_EXT%\svx\sdrmasterpagedescriptor.hxx -..\inc\svx\sdrcomment.hxx %_DEST%\inc%_EXT%\svx\sdrcomment.hxx -..\inc\svx\sdrpageuser.hxx %_DEST%\inc%_EXT%\svx\sdrpageuser.hxx -..\inc\svx\svdpagv.hxx %_DEST%\inc%_EXT%\svx\svdpagv.hxx -..\inc\svx\sdrpagewindow.hxx %_DEST%\inc%_EXT%\svx\sdrpagewindow.hxx -..\inc\svx\svdpntv.hxx %_DEST%\inc%_EXT%\svx\svdpntv.hxx -..\inc\svx\svdpoev.hxx %_DEST%\inc%_EXT%\svx\svdpoev.hxx -..\inc\svx\svdpool.hxx %_DEST%\inc%_EXT%\svx\svdpool.hxx -..\inc\svx\svdsnpv.hxx %_DEST%\inc%_EXT%\svx\svdsnpv.hxx -..\inc\svx\svdtrans.hxx %_DEST%\inc%_EXT%\svx\svdtrans.hxx -..\inc\svx\svdundo.hxx %_DEST%\inc%_EXT%\svx\svdundo.hxx -..\inc\svx\svdoutl.hxx %_DEST%\inc%_EXT%\svx\svdoutl.hxx -..\inc\svx\svdview.hxx %_DEST%\inc%_EXT%\svx\svdview.hxx -..\inc\svx\svdxcgv.hxx %_DEST%\inc%_EXT%\svx\svdxcgv.hxx -..\inc\svx\svxbox.hxx %_DEST%\inc%_EXT%\svx\svxbox.hxx -..\inc\svx\svxfont.hxx %_DEST%\inc%_EXT%\svx\svxfont.hxx -..\inc\svx\svxenum.hxx %_DEST%\inc%_EXT%\svx\svxenum.hxx -..\inc\svx\svxids.hrc %_DEST%\inc%_EXT%\svx\svxids.hrc -..\inc\svx\sxallitm.hxx %_DEST%\inc%_EXT%\svx\sxallitm.hxx -..\inc\svx\sxcaitm.hxx %_DEST%\inc%_EXT%\svx\sxcaitm.hxx -..\inc\svx\sxcecitm.hxx %_DEST%\inc%_EXT%\svx\sxcecitm.hxx -..\inc\svx\sxcgitm.hxx %_DEST%\inc%_EXT%\svx\sxcgitm.hxx -..\inc\svx\sxciaitm.hxx %_DEST%\inc%_EXT%\svx\sxciaitm.hxx -..\inc\svx\sxcikitm.hxx %_DEST%\inc%_EXT%\svx\sxcikitm.hxx -..\inc\svx\sxcllitm.hxx %_DEST%\inc%_EXT%\svx\sxcllitm.hxx -..\inc\svx\sxctitm.hxx %_DEST%\inc%_EXT%\svx\sxctitm.hxx -..\inc\svx\sxekitm.hxx %_DEST%\inc%_EXT%\svx\sxekitm.hxx -..\inc\svx\sxelditm.hxx %_DEST%\inc%_EXT%\svx\sxelditm.hxx -..\inc\svx\sxenditm.hxx %_DEST%\inc%_EXT%\svx\sxenditm.hxx -..\inc\svx\sxfiitm.hxx %_DEST%\inc%_EXT%\svx\sxfiitm.hxx -..\inc\svx\sxlayitm.hxx %_DEST%\inc%_EXT%\svx\sxlayitm.hxx -..\inc\svx\sxlogitm.hxx %_DEST%\inc%_EXT%\svx\sxlogitm.hxx -..\inc\svx\sxmbritm.hxx %_DEST%\inc%_EXT%\svx\sxmbritm.hxx -..\inc\svx\sxmfsitm.hxx %_DEST%\inc%_EXT%\svx\sxmfsitm.hxx -..\inc\svx\sxmkitm.hxx %_DEST%\inc%_EXT%\svx\sxmkitm.hxx -..\inc\svx\sxmlhitm.hxx %_DEST%\inc%_EXT%\svx\sxmlhitm.hxx -..\inc\svx\sxmoitm.hxx %_DEST%\inc%_EXT%\svx\sxmoitm.hxx -..\inc\svx\sxmovitm.hxx %_DEST%\inc%_EXT%\svx\sxmovitm.hxx -..\inc\svx\sxmsitm.hxx %_DEST%\inc%_EXT%\svx\sxmsitm.hxx -..\inc\svx\sxmspitm.hxx %_DEST%\inc%_EXT%\svx\sxmspitm.hxx -..\inc\svx\sxmsuitm.hxx %_DEST%\inc%_EXT%\svx\sxmsuitm.hxx -..\inc\svx\sxmtaitm.hxx %_DEST%\inc%_EXT%\svx\sxmtaitm.hxx -..\inc\svx\sxmtfitm.hxx %_DEST%\inc%_EXT%\svx\sxmtfitm.hxx -..\inc\svx\sxmtpitm.hxx %_DEST%\inc%_EXT%\svx\sxmtpitm.hxx -..\inc\svx\sxmtritm.hxx %_DEST%\inc%_EXT%\svx\sxmtritm.hxx -..\inc\svx\sxmuitm.hxx %_DEST%\inc%_EXT%\svx\sxmuitm.hxx -..\inc\svx\sxoneitm.hxx %_DEST%\inc%_EXT%\svx\sxoneitm.hxx -..\inc\svx\sxonitm.hxx %_DEST%\inc%_EXT%\svx\sxonitm.hxx -..\inc\svx\sxopitm.hxx %_DEST%\inc%_EXT%\svx\sxopitm.hxx -..\inc\svx\sxraitm.hxx %_DEST%\inc%_EXT%\svx\sxraitm.hxx -..\inc\svx\sxreaitm.hxx %_DEST%\inc%_EXT%\svx\sxreaitm.hxx -..\inc\svx\sxreoitm.hxx %_DEST%\inc%_EXT%\svx\sxreoitm.hxx -..\inc\svx\sxroaitm.hxx %_DEST%\inc%_EXT%\svx\sxroaitm.hxx -..\inc\svx\sxrooitm.hxx %_DEST%\inc%_EXT%\svx\sxrooitm.hxx -..\inc\svx\sxsaitm.hxx %_DEST%\inc%_EXT%\svx\sxsaitm.hxx -..\inc\svx\sxsalitm.hxx %_DEST%\inc%_EXT%\svx\sxsalitm.hxx -..\inc\svx\sxsiitm.hxx %_DEST%\inc%_EXT%\svx\sxsiitm.hxx -..\inc\svx\sxsoitm.hxx %_DEST%\inc%_EXT%\svx\sxsoitm.hxx -..\inc\svx\sxtraitm.hxx %_DEST%\inc%_EXT%\svx\sxtraitm.hxx -..\inc\svx\tbcontrl.hxx %_DEST%\inc%_EXT%\svx\tbcontrl.hxx -..\inc\svx\thesdlg.hxx %_DEST%\inc%_EXT%\svx\thesdlg.hxx -..\inc\svx\tstpitem.hxx %_DEST%\inc%_EXT%\svx\tstpitem.hxx -..\inc\svx\udlnitem.hxx %_DEST%\inc%_EXT%\svx\udlnitem.hxx -..\inc\svx\ulspitem.hxx %_DEST%\inc%_EXT%\svx\ulspitem.hxx -..\inc\svx\unomid.hxx %_DEST%\inc%_EXT%\svx\unomid.hxx -..\inc\svx\unopage.hxx %_DEST%\inc%_EXT%\svx\unopage.hxx -..\inc\svx\unoprnms.hxx %_DEST%\inc%_EXT%\svx\unoprnms.hxx -..\inc\svx\unoshape.hxx %_DEST%\inc%_EXT%\svx\unoshape.hxx -..\inc\svx\shapepropertynotifier.hxx %_DEST%\inc%_EXT%\svx\shapepropertynotifier.hxx -..\inc\svx\shapeproperty.hxx %_DEST%\inc%_EXT%\svx\shapeproperty.hxx -..\inc\svx\unoipset.hxx %_DEST%\inc%_EXT%\svx\unoipset.hxx -..\inc\svx\unoprov.hxx %_DEST%\inc%_EXT%\svx\unoprov.hxx -..\inc\svx\unomod.hxx %_DEST%\inc%_EXT%\svx\unomod.hxx -..\inc\svx\unomodel.hxx %_DEST%\inc%_EXT%\svx\unomodel.hxx -..\inc\svx\fmdpage.hxx %_DEST%\inc%_EXT%\svx\fmdpage.hxx -..\inc\svx\fmsearch.hxx %_DEST%\inc%_EXT%\svx\fmsearch.hxx -..\inc\svx\view3d.hxx %_DEST%\inc%_EXT%\svx\view3d.hxx -..\inc\svx\viewpt3d.hxx %_DEST%\inc%_EXT%\svx\viewpt3d.hxx -..\inc\svx\wghtitem.hxx %_DEST%\inc%_EXT%\svx\wghtitem.hxx -..\inc\svx\widwitem.hxx %_DEST%\inc%_EXT%\svx\widwitem.hxx -..\inc\svx\wrlmitem.hxx %_DEST%\inc%_EXT%\svx\wrlmitem.hxx -..\inc\svx\xbitmap.hxx %_DEST%\inc%_EXT%\svx\xbitmap.hxx -..\inc\svx\xbtmpit.hxx %_DEST%\inc%_EXT%\svx\xbtmpit.hxx -..\inc\svx\xcolit.hxx %_DEST%\inc%_EXT%\svx\xcolit.hxx -..\inc\svx\xdef.hxx %_DEST%\inc%_EXT%\svx\xdef.hxx -..\inc\svx\xdash.hxx %_DEST%\inc%_EXT%\svx\xdash.hxx -..\inc\svx\xfillit.hxx %_DEST%\inc%_EXT%\svx\xfillit.hxx -..\inc\svx\xfillit0.hxx %_DEST%\inc%_EXT%\svx\xfillit0.hxx -..\inc\svx\xflasit.hxx %_DEST%\inc%_EXT%\svx\xflasit.hxx -..\inc\svx\xflbckit.hxx %_DEST%\inc%_EXT%\svx\xflbckit.hxx -..\inc\svx\xflbmpit.hxx %_DEST%\inc%_EXT%\svx\xflbmpit.hxx -..\inc\svx\xflbmsli.hxx %_DEST%\inc%_EXT%\svx\xflbmsli.hxx -..\inc\svx\xflbmsxy.hxx %_DEST%\inc%_EXT%\svx\xflbmsxy.hxx -..\inc\svx\xflbmtit.hxx %_DEST%\inc%_EXT%\svx\xflbmtit.hxx -..\inc\svx\xflboxy.hxx %_DEST%\inc%_EXT%\svx\xflboxy.hxx -..\inc\svx\xflbstit.hxx %_DEST%\inc%_EXT%\svx\xflbstit.hxx -..\inc\svx\xflbtoxy.hxx %_DEST%\inc%_EXT%\svx\xflbtoxy.hxx -..\inc\svx\xflclit.hxx %_DEST%\inc%_EXT%\svx\xflclit.hxx -..\inc\svx\xsflclit.hxx %_DEST%\inc%_EXT%\svx\xsflclit.hxx -..\inc\svx\xflgrit.hxx %_DEST%\inc%_EXT%\svx\xflgrit.hxx -..\inc\svx\xflftrit.hxx %_DEST%\inc%_EXT%\svx\xflftrit.hxx -..\inc\svx\xflhtit.hxx %_DEST%\inc%_EXT%\svx\xflhtit.hxx -..\inc\svx\xfltrit.hxx %_DEST%\inc%_EXT%\svx\xfltrit.hxx -..\inc\svx\xftadit.hxx %_DEST%\inc%_EXT%\svx\xftadit.hxx -..\inc\svx\xftdiit.hxx %_DEST%\inc%_EXT%\svx\xftdiit.hxx -..\inc\svx\xftmrit.hxx %_DEST%\inc%_EXT%\svx\xftmrit.hxx -..\inc\svx\xftouit.hxx %_DEST%\inc%_EXT%\svx\xftouit.hxx -..\inc\svx\xftsfit.hxx %_DEST%\inc%_EXT%\svx\xftsfit.hxx -..\inc\svx\xftshcit.hxx %_DEST%\inc%_EXT%\svx\xftshcit.hxx -..\inc\svx\xftshit.hxx %_DEST%\inc%_EXT%\svx\xftshit.hxx -..\inc\svx\xftshtit.hxx %_DEST%\inc%_EXT%\svx\xftshtit.hxx -..\inc\svx\xftshxy.hxx %_DEST%\inc%_EXT%\svx\xftshxy.hxx -..\inc\svx\xftstit.hxx %_DEST%\inc%_EXT%\svx\xftstit.hxx -..\inc\svx\xgrad.hxx %_DEST%\inc%_EXT%\svx\xgrad.hxx -..\inc\svx\xgrscit.hxx %_DEST%\inc%_EXT%\svx\xgrscit.hxx -..\inc\svx\xhatch.hxx %_DEST%\inc%_EXT%\svx\xhatch.hxx -..\inc\svx\xit.hxx %_DEST%\inc%_EXT%\svx\xit.hxx -..\inc\svx\xlineit.hxx %_DEST%\inc%_EXT%\svx\xlineit.hxx -..\inc\svx\xlineit.hxx %_DEST%\inc%_EXT%\svx\xlineit.hxx -..\inc\svx\xlineit0.hxx %_DEST%\inc%_EXT%\svx\xlineit0.hxx -..\inc\svx\xlineit0.hxx %_DEST%\inc%_EXT%\svx\xlineit0.hxx -..\inc\svx\xlnasit.hxx %_DEST%\inc%_EXT%\svx\xlnasit.hxx -..\inc\svx\xlnclit.hxx %_DEST%\inc%_EXT%\svx\xlnclit.hxx -..\inc\svx\xlndsit.hxx %_DEST%\inc%_EXT%\svx\xlndsit.hxx -..\inc\svx\xlnedcit.hxx %_DEST%\inc%_EXT%\svx\xlnedcit.hxx -..\inc\svx\xlnedit.hxx %_DEST%\inc%_EXT%\svx\xlnedit.hxx -..\inc\svx\xlnedwit.hxx %_DEST%\inc%_EXT%\svx\xlnedwit.hxx -..\inc\svx\xlnstcit.hxx %_DEST%\inc%_EXT%\svx\xlnstcit.hxx -..\inc\svx\xlnstit.hxx %_DEST%\inc%_EXT%\svx\xlnstit.hxx -..\inc\svx\xlnstwit.hxx %_DEST%\inc%_EXT%\svx\xlnstwit.hxx -..\inc\svx\xlntrit.hxx %_DEST%\inc%_EXT%\svx\xlntrit.hxx -..\inc\svx\xlnwtit.hxx %_DEST%\inc%_EXT%\svx\xlnwtit.hxx -..\inc\svx\xpoly.hxx %_DEST%\inc%_EXT%\svx\xpoly.hxx -..\inc\svx\xpool.hxx %_DEST%\inc%_EXT%\svx\xpool.hxx -..\inc\svx\xpool.hxx %_DEST%\inc%_EXT%\xpool.hxx -..\inc\svx\xsetit.hxx %_DEST%\inc%_EXT%\svx\xsetit.hxx -..\inc\svx\xsetit.hxx %_DEST%\inc%_EXT%\xsetit.hxx -..\inc\svx\xtable.hxx %_DEST%\inc%_EXT%\svx\xtable.hxx -..\inc\svx\xtable.hxx %_DEST%\inc%_EXT%\xtable.hxx -..\inc\svx\xtextit.hxx %_DEST%\inc%_EXT%\svx\xtextit.hxx -..\inc\svx\xtextit.hxx %_DEST%\inc%_EXT%\xtextit.hxx -..\inc\svx\xtextit0.hxx %_DEST%\inc%_EXT%\svx\xtextit0.hxx -..\inc\svx\xtextit0.hxx %_DEST%\inc%_EXT%\xtextit0.hxx -..\inc\svx\zoomitem.hxx %_DEST%\inc%_EXT%\svx\zoomitem.hxx -..\inc\svx\viewlayoutitem.hxx %_DEST%\inc%_EXT%\svx\viewlayoutitem.hxx -..\inc\svx\zoomslideritem.hxx %_DEST%\inc%_EXT%\svx\zoomslideritem.hxx -..\inc\svx\zoomsliderctrl.hxx %_DEST%\inc%_EXT%\svx\zoomsliderctrl.hxx - - -..\inc\svx\itemtype.hxx %_DEST%\inc%_EXT%\svx\itemtype.hxx -..\inc\svx\outliner.hxx %_DEST%\inc%_EXT%\svx\outliner.hxx -..\inc\svx\paragraphdata.hxx %_DEST%\inc%_EXT%\svx\paragraphdata.hxx -..\inc\svx\outlobj.hxx %_DEST%\inc%_EXT%\svx\outlobj.hxx -..\inc\svx\editdata.hxx %_DEST%\inc%_EXT%\svx\editdata.hxx -..\inc\svx\editeng.hxx %_DEST%\inc%_EXT%\svx\editeng.hxx -..\inc\svx\eedata.hxx %_DEST%\inc%_EXT%\svx\eedata.hxx -..\inc\svx\editobj.hxx %_DEST%\inc%_EXT%\svx\editobj.hxx -..\inc\svx\editview.hxx %_DEST%\inc%_EXT%\svx\editview.hxx -..\inc\svx\eeitem.hxx %_DEST%\inc%_EXT%\svx\eeitem.hxx -..\inc\svx\eeitemid.hxx %_DEST%\inc%_EXT%\svx\eeitemid.hxx -..\inc\svx\svxacorr.hxx %_DEST%\inc%_EXT%\svx\svxacorr.hxx -..\inc\svx\swafopt.hxx %_DEST%\inc%_EXT%\svx\swafopt.hxx -..\inc\svx\fmmodel.hxx %_DEST%\inc%_EXT%\svx\fmmodel.hxx -..\inc\svx\fmpage.hxx %_DEST%\inc%_EXT%\svx\fmpage.hxx -..\inc\svx\fmview.hxx %_DEST%\inc%_EXT%\svx\fmview.hxx -..\inc\svx\fmglob.hxx %_DEST%\inc%_EXT%\svx\fmglob.hxx -..\inc\svx\fmshell.hxx %_DEST%\inc%_EXT%\svx\fmshell.hxx -..\inc\svx\svdouno.hxx %_DEST%\inc%_EXT%\svx\svdouno.hxx -..\inc\svx\deflt3d.hxx %_DEST%\inc%_EXT%\svx\deflt3d.hxx -..\inc\svx\unotext.hxx %_DEST%\inc%_EXT%\svx\unotext.hxx -..\inc\svx\unofield.hxx %_DEST%\inc%_EXT%\svx\unofield.hxx -..\inc\svx\mutxhelp.hxx %_DEST%\inc%_EXT%\svx\mutxhelp.hxx -..\inc\svx\AccessibleTextHelper.hxx %_DEST%\inc%_EXT%\svx\AccessibleTextHelper.hxx -..\inc\svx\unoviwed.hxx %_DEST%\inc%_EXT%\svx\unoviwed.hxx -..\inc\svx\unoviwou.hxx %_DEST%\inc%_EXT%\svx\unoviwou.hxx -..\inc\svx\unoedsrc.hxx %_DEST%\inc%_EXT%\svx\unoedsrc.hxx -..\inc\svx\unofored.hxx %_DEST%\inc%_EXT%\svx\unofored.hxx -..\inc\svx\unoforou.hxx %_DEST%\inc%_EXT%\svx\unoforou.hxx -..\inc\svx\e3dundo.hxx %_DEST%\inc%_EXT%\svx\e3dundo.hxx -..\inc\svx\msdffimp.hxx %_DEST%\inc%_EXT%\svx\msdffimp.hxx -..\inc\svx\msdffdef.hxx %_DEST%\inc%_EXT%\svx\msdffdef.hxx -..\inc\svx\msfiltertracer.hxx %_DEST%\inc%_EXT%\svx\msfiltertracer.hxx -..\inc\svx\unoshtxt.hxx %_DEST%\inc%_EXT%\svx\unoshtxt.hxx -..\inc\svx\numitem.hxx %_DEST%\inc%_EXT%\svx\numitem.hxx -..\inc\svx\numdef.hxx %_DEST%\inc%_EXT%\svx\numdef.hxx -..\inc\svx\fmdmod.hxx %_DEST%\inc%_EXT%\svx\fmdmod.hxx -..\inc\svx\fmgridcl.hxx %_DEST%\inc%_EXT%\svx\fmgridcl.hxx -..\inc\svx\gridctrl.hxx %_DEST%\inc%_EXT%\svx\gridctrl.hxx -..\inc\svx\unoshprp.hxx %_DEST%\inc%_EXT%\svx\unoshprp.hxx -..\inc\svx\sdasaitm.hxx %_DEST%\inc%_EXT%\svx\sdasaitm.hxx -..\inc\svx\sdasitm.hxx %_DEST%\inc%_EXT%\svx\sdasitm.hxx -..\inc\svx\grfcrop.hxx %_DEST%\inc%_EXT%\svx\grfcrop.hxx -..\inc\svx\grfflt.hxx %_DEST%\inc%_EXT%\svx\grfflt.hxx -..\inc\svx\svx3ditems.hxx %_DEST%\inc%_EXT%\svx\svx3ditems.hxx -..\inc\svx\msocximex.hxx %_DEST%\inc%_EXT%\svx\msocximex.hxx -..\inc\svx\emphitem.hxx %_DEST%\inc%_EXT%\svx\emphitem.hxx -..\inc\svx\twolinesitem.hxx %_DEST%\inc%_EXT%\svx\twolinesitem.hxx -..\inc\svx\scripttypeitem.hxx %_DEST%\inc%_EXT%\svx\scripttypeitem.hxx -..\inc\svx\scriptspaceitem.hxx %_DEST%\inc%_EXT%\svx\scriptspaceitem.hxx -..\inc\svx\hngpnctitem.hxx %_DEST%\inc%_EXT%\svx\hngpnctitem.hxx -..\inc\svx\forbiddenruleitem.hxx %_DEST%\inc%_EXT%\svx\forbiddenruleitem.hxx -..\inc\svx\charscaleitem.hxx %_DEST%\inc%_EXT%\svx\charscaleitem.hxx -..\inc\svx\charrotateitem.hxx %_DEST%\inc%_EXT%\svx\charrotateitem.hxx -..\inc\svx\charreliefitem.hxx %_DEST%\inc%_EXT%\svx\charreliefitem.hxx -..\inc\svx\paravertalignitem.hxx %_DEST%\inc%_EXT%\svx\paravertalignitem.hxx -..\inc\svx\dbaexchange.hxx %_DEST%\inc%_EXT%\svx\dbaexchange.hxx -..\inc\svx\dbaobjectex.hxx %_DEST%\inc%_EXT%\svx\dbaobjectex.hxx -..\inc\svx\ucsubset.hxx %_DEST%\inc%_EXT%\svx\ucsubset.hxx -..\inc\svx\ucsubset.hrc %_DEST%\inc%_EXT%\svx\ucsubset.hrc -..\inc\svx\dataaccessdescriptor.hxx %_DEST%\inc%_EXT%\svx\dataaccessdescriptor.hxx -..\inc\svx\frmdir.hxx %_DEST%\inc%_EXT%\svx\frmdir.hxx -..\inc\svx\frmdiritem.hxx %_DEST%\inc%_EXT%\svx\frmdiritem.hxx -..\inc\svx\frmdirlbox.hxx %_DEST%\inc%_EXT%\svx\frmdirlbox.hxx -..\inc\svx\AccessibleContextBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleContextBase.hxx -..\inc\svx\AccessibleComponentBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleComponentBase.hxx -..\inc\svx\AccessibleShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleShape.hxx -..\inc\svx\AccessibleGraphicShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleGraphicShape.hxx -..\inc\svx\AccessibleOLEShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleOLEShape.hxx -..\inc\svx\AccessibleShapeTreeInfo.hxx %_DEST%\inc%_EXT%\svx\AccessibleShapeTreeInfo.hxx -..\inc\svx\AccessibleShapeInfo.hxx %_DEST%\inc%_EXT%\svx\AccessibleShapeInfo.hxx -..\inc\svx\AccessibleControlShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleControlShape.hxx -..\inc\svx\IAccessibleViewForwarder.hxx %_DEST%\inc%_EXT%\svx\IAccessibleViewForwarder.hxx -..\inc\svx\IAccessibleViewForwarderListener.hxx %_DEST%\inc%_EXT%\svx\IAccessibleViewForwarderListener.hxx -..\inc\svx\IAccessibleParent.hxx %_DEST%\inc%_EXT%\svx\IAccessibleParent.hxx -..\inc\svx\ChildrenManager.hxx %_DEST%\inc%_EXT%\svx\ChildrenManager.hxx -..\inc\svx\ShapeTypeHandler.hxx %_DEST%\inc%_EXT%\svx\ShapeTypeHandler.hxx -..\inc\svx\SvxShapeTypes.hxx %_DEST%\inc%_EXT%\svx\SvxShapeTypes.hxx -..\inc\svx\writingmodeitem.hxx %_DEST%\inc%_EXT%\svx\writingmodeitem.hxx -..\inc\svx\svdoashp.hxx %_DEST%\inc%_EXT%\svx\svdoashp.hxx -..\inc\svx\extrusionbar.hxx %_DEST%\inc%_EXT%\svx\extrusionbar.hxx -..\inc\svx\fontworkbar.hxx %_DEST%\inc%_EXT%\svx\fontworkbar.hxx -..\inc\svx\svxdlg.hxx %_DEST%\inc%_EXT%\svx\svxdlg.hxx -..\inc\svx\tbxcolorupdate.hxx %_DEST%\inc%_EXT%\svx\tbxcolorupdate.hxx -..\inc\svx\svxdllapi.h %_DEST%\inc%_EXT%\svx\svxdllapi.h -..\inc\svx\SmartTagMgr.hxx %_DEST%\inc%_EXT%\svx\SmartTagMgr.hxx -..\inc\svx\SmartTagItem.hxx %_DEST%\inc%_EXT%\svx\SmartTagItem.hxx -..\inc\svx\SmartTagCtl.hxx %_DEST%\inc%_EXT%\svx\SmartTagCtl.hxx -..\inc\svx\databaselocationinput.hxx %_DEST%\inc%_EXT%\svx\databaselocationinput.hxx -..\inc\svx\dbcharsethelper.hxx %_DEST%\inc%_EXT%\svx\dbcharsethelper.hxx -..\inc\svx\dbtoolsclient.hxx %_DEST%\inc%_EXT%\svx\dbtoolsclient.hxx - -..\inc\svx\subtoolboxcontrol.hxx %_DEST%\inc%_EXT%\svx\subtoolboxcontrol.hxx -..\inc\svx\svdtext.hxx %_DEST%\inc%_EXT%\svx\svdtext.hxx -..\inc\svx\svdotable.hxx %_DEST%\inc%_EXT%\svx\svdotable.hxx -..\inc\svx\selectioncontroller.hxx %_DEST%\inc%_EXT%\svx\selectioncontroller.hxx -..\inc\svx\helperhittest3d.hxx %_DEST%\inc%_EXT%\svx\helperhittest3d.hxx -..\inc\svx\optimprove.hxx %_DEST%\inc%_EXT%\svx\optimprove.hxx mkdir: %_DEST%\inc%_EXT%\svx\sdr mkdir: %_DEST%\inc%_EXT%\svx\sdr\properties @@ -683,12 +127,4 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\table ..\uiconfig\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\global\accelerator\en-US\*.xml ..\uiconfig\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\global\accelerator\es\*.xml -..\inc\svx\subtoolboxcontrol.hxx %_DEST%\inc%_EXT%\svx\subtoolboxcontrol.hxx -..\inc\svx\svdtext.hxx %_DEST%\inc%_EXT%\svx\svdtext.hxx -..\inc\svx\svdotable.hxx %_DEST%\inc%_EXT%\svx\svdotable.hxx -..\inc\svx\selectioncontroller.hxx %_DEST%\inc%_EXT%\svx\selectioncontroller.hxx -..\inc\svx\helperhittest3d.hxx %_DEST%\inc%_EXT%\svx\helperhittest3d.hxx -..\inc\svx\optimprove.hxx %_DEST%\inc%_EXT%\svx\optimprove.hxx -..\inc\svx\msvbahelper.hxx %_DEST%\inc%_EXT%\svx\msvbahelper.hxx - ..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.* diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 610f219c21cf..2bca7593f423 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include #include -#include "DescriptionGenerator.hxx" +#include "svx/DescriptionGenerator.hxx" #include #include #include @@ -39,14 +39,14 @@ #include #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include #include #include #include #include -#include "svdstr.hrc" +#include "svx/svdstr.hrc" #include using namespace ::comphelper; diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 28cdb8b0882b..4c1869f6997a 100755 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include -#include "DescriptionGenerator.hxx" +#include "svx/DescriptionGenerator.hxx" #include #include #include @@ -51,7 +51,7 @@ #include #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include #include @@ -59,7 +59,7 @@ #ifndef _SVX_ACCESSIBILITY_HRC #include "accessibility.hrc" #endif -#include "svdstr.hrc" +#include "svx/svdstr.hrc" #include #include #include diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index 010bc5decfeb..8587639fa1fa 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "DescriptionGenerator.hxx" +#include "svx/DescriptionGenerator.hxx" #include #include #include @@ -52,12 +52,12 @@ #ifndef _SVX_ACCESSIBILITY_HRC #include "accessibility.hrc" #endif -#include "svdstr.hrc" +#include "svx/svdstr.hrc" #include #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include "accessibility.hrc" #include "DGColorNameLookUp.hxx" diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index b0523bda67e1..0119e7c71cbf 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -45,7 +45,7 @@ #include #include #include -#include +#include //===== local includes ======================================================== #include diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx index 228f2ed50492..4a4cad786b58 100755 --- a/svx/source/accessibility/ShapeTypeHandler.cxx +++ b/svx/source/accessibility/ShapeTypeHandler.cxx @@ -35,7 +35,7 @@ #include #include #include -#include "svdstr.hrc" +#include "svx/svdstr.hrc" using namespace ::rtl; diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 28ad49c6b65f..9ae86971a432 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -27,9 +27,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "EnhancedCustomShape2d.hxx" -#include "EnhancedCustomShapeGeometry.hxx" -#include "EnhancedCustomShapeTypeNames.hxx" +#include "svx/EnhancedCustomShape2d.hxx" +#include "svx/EnhancedCustomShapeGeometry.hxx" +#include "svx/EnhancedCustomShapeTypeNames.hxx" #include #include #include diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 059bb8f43b5c..3545805f4966 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 237a0537d472..ae7a1398c9e7 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -28,16 +28,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include "EnhancedCustomShapeEngine.hxx" -#include "EnhancedCustomShape2d.hxx" +#include "svx/EnhancedCustomShape2d.hxx" #include "EnhancedCustomShape3d.hxx" #include "EnhancedCustomShapeFontWork.hxx" #include "EnhancedCustomShapeHandle.hxx" -#include "EnhancedCustomShapeGeometry.hxx" +#include "svx/EnhancedCustomShapeGeometry.hxx" #include #ifndef _SVX_UNOPAGE_HXX #include "svx/unopage.hxx" #endif -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include #include @@ -49,7 +49,7 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include "unopolyhelper.hxx" #include #include diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 06c7098400a3..5a24cb1fd75d 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -46,7 +46,7 @@ #include #include #include -#include "EnhancedCustomShapeTypeNames.hxx" +#include "svx/EnhancedCustomShapeTypeNames.hxx" #include #include #include diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index a00a625693c4..dafd0d868963 100755 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "EnhancedCustomShape2d.hxx" +#include "svx/EnhancedCustomShape2d.hxx" #include #include diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx index aa8d7c253e6e..2bf28c81ca18 100644 --- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "EnhancedCustomShapeGeometry.hxx" +#include "svx/EnhancedCustomShapeGeometry.hxx" #include /* static const SvxMSDffVertPair Vert[] = diff --git a/svx/source/customshapes/EnhancedCustomShapeHandle.cxx b/svx/source/customshapes/EnhancedCustomShapeHandle.cxx index 0a87ad57d660..92104f0ae82e 100644 --- a/svx/source/customshapes/EnhancedCustomShapeHandle.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeHandle.cxx @@ -28,8 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include "EnhancedCustomShapeHandle.hxx" -#include "EnhancedCustomShape2d.hxx" -#include "unoapi.hxx" +#include "svx/EnhancedCustomShape2d.hxx" +#include "svx/unoapi.hxx" // ----------------------------------------------------------------------------- diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx index c3651f3b54cf..093bae0d2a2d 100644 --- a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "EnhancedCustomShapeTypeNames.hxx" +#include "svx/EnhancedCustomShapeTypeNames.hxx" #include #include diff --git a/svx/source/customshapes/tbxcustomshapes.cxx b/svx/source/customshapes/tbxcustomshapes.cxx index b3c4645a58f9..4cec80db354d 100644 --- a/svx/source/customshapes/tbxcustomshapes.cxx +++ b/svx/source/customshapes/tbxcustomshapes.cxx @@ -43,7 +43,7 @@ #include #include -#include "tbxcustomshapes.hxx" +#include "svx/tbxcustomshapes.hxx" SFX_IMPL_TOOLBOX_CONTROL(SvxTbxCtlCustomShapes, SfxBoolItem); diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 2eee0268816a..26dc3137aa52 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -52,7 +52,7 @@ #define _XOUTBMP_STATICS_ONLY #include -#include "xoutbmp.hxx" +#include "svx/xoutbmp.hxx" #include #include #include @@ -61,7 +61,7 @@ #include "contwnd.hxx" #include #include -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include /******************************************************************************/ diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 79e563510dbc..84670ee32418 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -37,9 +37,9 @@ #include // SdrObjList -#include "connctrl.hxx" +#include "svx/connctrl.hxx" #include -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" // #110094# #include diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index 590408bf6707..5019be9f9472 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include +#include #include #include #include @@ -40,7 +40,7 @@ #include // #i75482# -#include "sdrpaintwindow.hxx" +#include "svx/sdrpaintwindow.hxx" #define TRANSCOL Color( COL_WHITE ) diff --git a/svx/source/dialog/databaseregistrationui.cxx b/svx/source/dialog/databaseregistrationui.cxx index fb7b4a6903ef..68c7d970fecb 100644 --- a/svx/source/dialog/databaseregistrationui.cxx +++ b/svx/source/dialog/databaseregistrationui.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" // === includes (declaration) ============================================ -#include "databaseregistrationui.hxx" +#include "svx/databaseregistrationui.hxx" // === includes (UNO) ==================================================== // === /includes (UNO) =================================================== diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index 0d5e6ed4bd6f..562b194ab56a 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "dialcontrol.hxx" +#include "svx/dialcontrol.hxx" #include #include diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx index 6c7a42f90970..dede78faef1d 100644 --- a/svx/source/dialog/dlgutil.cxx +++ b/svx/source/dialog/dlgutil.cxx @@ -30,7 +30,7 @@ // include --------------------------------------------------------------- -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include #include #include diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx index 6443c12b427b..a6b03a17d890 100644 --- a/svx/source/dialog/fontlb.cxx +++ b/svx/source/dialog/fontlb.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "fontlb.hxx" +#include "svx/fontlb.hxx" #include // ============================================================================ diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 054a76fec493..c62cea74c69a 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -41,7 +41,7 @@ #include #include -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include #include "fontwork.hrc" diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index a50bc6247a5f..7c0794d8bb6e 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -41,12 +41,12 @@ #include #include "GraphCtlAccessibleContext.hxx" -#include "xoutbmp.hxx" +#include "svx/xoutbmp.hxx" #include #include // #i72889# -#include "sdrpaintwindow.hxx" +#include "svx/sdrpaintwindow.hxx" /************************************************************************* |* diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 729d4f748921..de6924c3147b 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -46,9 +46,9 @@ #include #include //CHINA001 #include "bbdlg.hxx" -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include -#include "htmlmode.hxx" +#include "svx/htmlmode.hxx" #include #include diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx index 6828f222facc..dcca52044531 100644 --- a/svx/source/dialog/hyperdlg.cxx +++ b/svx/source/dialog/hyperdlg.cxx @@ -31,7 +31,7 @@ // include --------------------------------------------------------------- #include #include -#include "hyperdlg.hxx" +#include "svx/hyperdlg.hxx" #include //CHINA001 #include #include diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx index c7c9f7a22939..b8f150736ea1 100644 --- a/svx/source/dialog/hyprlink.cxx +++ b/svx/source/dialog/hyprlink.cxx @@ -43,11 +43,11 @@ #include #include -#include "hlnkitem.hxx" +#include "svx/hlnkitem.hxx" #include #include "hyprlink.hrc" #include -#include "hyprlink.hxx" +#include "svx/hyprlink.hxx" #include "hyprdlg.hxx" using namespace ::rtl; diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index e876431b13ec..df396bf99f41 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -68,7 +68,7 @@ #endif #define _IMAPDLG_PRIVATE -#include "imapdlg.hxx" +#include "svx/imapdlg.hxx" #include #include @@ -76,7 +76,7 @@ #include "imapdlg.hrc" #include "imapwnd.hxx" #include "imapimp.hxx" -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include #include #include diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index b4da78cabe59..4442cb76bad4 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 3b56b443e2fe..13f29089b784 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -33,9 +33,9 @@ #include #include -#include "measctrl.hxx" +#include "svx/measctrl.hxx" #include -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" /************************************************************************* |* diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 7565539578df..f281580b93db 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -38,10 +38,10 @@ #include #include -#include "optgrid.hxx" +#include "svx/optgrid.hxx" #include #include "optgrid.hrc" -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" /* -----------------18.08.98 17:41------------------- * local functions diff --git a/svx/source/dialog/orienthelper.cxx b/svx/source/dialog/orienthelper.cxx index f546bb95dc21..95b6e5b4ca08 100644 --- a/svx/source/dialog/orienthelper.cxx +++ b/svx/source/dialog/orienthelper.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "orienthelper.hxx" +#include "svx/orienthelper.hxx" #include #include @@ -35,7 +35,7 @@ #ifndef _SV_BUTTON_HXX #include #endif -#include "dialcontrol.hxx" +#include "svx/dialcontrol.hxx" namespace svx { diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx index 19d97d368496..bb689c3fb8fa 100644 --- a/svx/source/dialog/passwd.cxx +++ b/svx/source/dialog/passwd.cxx @@ -36,7 +36,7 @@ #define _SVX_PASSWD_CXX -#include "passwd.hxx" +#include "svx/passwd.hxx" #include #include #include "passwd.hrc" diff --git a/svx/source/dialog/pfiledlg.cxx b/svx/source/dialog/pfiledlg.cxx index aa6e0b835e2c..6dd6f443aa6f 100644 --- a/svx/source/dialog/pfiledlg.cxx +++ b/svx/source/dialog/pfiledlg.cxx @@ -35,7 +35,7 @@ #include -#include "pfiledlg.hxx" +#include "svx/pfiledlg.hxx" #include #include diff --git a/svx/source/dialog/prtqry.cxx b/svx/source/dialog/prtqry.cxx index 07f4d2fe9928..0a19d52958e3 100644 --- a/svx/source/dialog/prtqry.cxx +++ b/svx/source/dialog/prtqry.cxx @@ -31,7 +31,7 @@ #ifndef _SVX_DIALOGS_HRC #include #endif -#include +#include #include #include diff --git a/svx/source/dialog/relfld.cxx b/svx/source/dialog/relfld.cxx index 8cdb6ee5ba3f..1224de5ba6ea 100644 --- a/svx/source/dialog/relfld.cxx +++ b/svx/source/dialog/relfld.cxx @@ -31,7 +31,7 @@ // include --------------------------------------------------------------- #include -#include "relfld.hxx" +#include "svx/relfld.hxx" // ----------------------------------------------------------------------- diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx index 38223bcb8893..23d62d4de85e 100644 --- a/svx/source/dialog/rlrcitem.cxx +++ b/svx/source/dialog/rlrcitem.cxx @@ -44,7 +44,7 @@ #include #include "editeng/protitem.hxx" #include "rlrcitem.hxx" -#include "rulritem.hxx" +#include "svx/rulritem.hxx" #include // class SvxRulerItem ---------------------------------------------------- diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 5a5839443170..d281802ac40e 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include +#include #include #include #include diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index fd0007cce8e5..331c38d6bdd6 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -30,7 +30,7 @@ #include #include -#include "rulritem.hxx" +#include "svx/rulritem.hxx" #include #include #include diff --git a/svx/source/dialog/srchctrl.cxx b/svx/source/dialog/srchctrl.cxx index 993288bcd622..479888463a5c 100644 --- a/svx/source/dialog/srchctrl.cxx +++ b/svx/source/dialog/srchctrl.cxx @@ -40,7 +40,7 @@ #include "srchctrl.hxx" -#include "srchdlg.hxx" +#include "svx/srchdlg.hxx" #include // class SvxSearchFamilyControllerItem ----------------------------------- diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 5f3aa24394a3..ccf326ca77b1 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -56,7 +56,7 @@ #include #define _SVX_SRCHDLG_CXX -#include "srchdlg.hxx" +#include "svx/srchdlg.hxx" #include #include @@ -69,7 +69,7 @@ #include #include "srchctrl.hxx" #include -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include #include #include //CHINA001 diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index cbf5a39997bd..482dc467d66c 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -49,14 +49,14 @@ #include #include #include -#include +#include #ifndef _XTABLE_HXX //autogen #include #endif -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/svx/source/dialog/svxgrahicitem.cxx b/svx/source/dialog/svxgrahicitem.cxx index 07daea2064ab..6d6d2cb126db 100644 --- a/svx/source/dialog/svxgrahicitem.cxx +++ b/svx/source/dialog/svxgrahicitem.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svxgrahicitem.hxx" +#include "svx/svxgrahicitem.hxx" TYPEINIT1(SvxGraphicItem,SfxPoolItem); SvxGraphicItem::SvxGraphicItem( USHORT _nWhich, const Graphic& rGraphic ) : SfxPoolItem( _nWhich ), aGraphic( rGraphic ) diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 00c1edaa7f04..36067cc78221 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -48,7 +48,7 @@ #include #include #include "rlrcitem.hxx" -#include "rulritem.hxx" +#include "svx/rulritem.hxx" #include #include #include "editeng/protitem.hxx" diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index f79e009bb332..8ba911fb90c0 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/dialog/swframeposstrings.cxx b/svx/source/dialog/swframeposstrings.cxx index 7faa97230c92..03b2746ae3fd 100644 --- a/svx/source/dialog/swframeposstrings.cxx +++ b/svx/source/dialog/swframeposstrings.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include +#include #include #include #include diff --git a/svx/source/dialog/swframeposstrings.src b/svx/source/dialog/swframeposstrings.src index 3c9788fa8c9e..c6a164630c5e 100644 --- a/svx/source/dialog/swframeposstrings.src +++ b/svx/source/dialog/swframeposstrings.src @@ -26,7 +26,7 @@ ************************************************************************/ #include -//the following defines have to match the (enum values + 1) in swframeposstrings.hxx! +//the following defines have to match the (enum values + 1) in svx/swframeposstrings.hxx! #define STR_LEFT 1 #define STR_RIGHT 2 #define STR_FROMLEFT 3 diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx index 718989b84450..751184e929c7 100644 --- a/svx/source/dialog/txencbox.cxx +++ b/svx/source/dialog/txencbox.cxx @@ -28,8 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "txencbox.hxx" -#include "txenctab.hxx" +#include "svx/txencbox.hxx" +#include "svx/txenctab.hxx" #include #include "svx/dbcharsethelper.hxx" #include diff --git a/svx/source/dialog/txenctab.cxx b/svx/source/dialog/txenctab.cxx index 3fc82705141c..74b60a08d2bd 100644 --- a/svx/source/dialog/txenctab.cxx +++ b/svx/source/dialog/txenctab.cxx @@ -30,7 +30,7 @@ #include // -> RID_SVXSTR_TEXTENCODING_TABLE #include -#include "txenctab.hxx" +#include "svx/txenctab.hxx" #include //------------------------------------------------------------------------ diff --git a/svx/source/dialog/wrapfield.cxx b/svx/source/dialog/wrapfield.cxx index 8c6da9f1ff81..ee152439254c 100644 --- a/svx/source/dialog/wrapfield.cxx +++ b/svx/source/dialog/wrapfield.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "wrapfield.hxx" +#include "svx/wrapfield.hxx" namespace svx { diff --git a/svx/source/engine3d/cube3d.cxx b/svx/source/engine3d/cube3d.cxx index 626ee80d46e3..b78d464d4897 100644 --- a/svx/source/engine3d/cube3d.cxx +++ b/svx/source/engine3d/cube3d.cxx @@ -28,10 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx index 7261586947c4..423a846d86a1 100644 --- a/svx/source/engine3d/extrud3d.cxx +++ b/svx/source/engine3d/extrud3d.cxx @@ -28,10 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index 8ff6af906eaa..e1e90d88c22f 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -48,9 +48,9 @@ #include #include #include -#include +#include -#include +#include #include #include // ProjectionType @@ -60,7 +60,7 @@ #include #include -#include +#include #define GALLERY_THEME "3D" #include diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx index 78324c22ed27..c5e77870a073 100644 --- a/svx/source/engine3d/helperhittest3d.cxx +++ b/svx/source/engine3d/helperhittest3d.cxx @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx index e6953f96f766..4d88dce0fb4d 100644 --- a/svx/source/engine3d/lathe3d.cxx +++ b/svx/source/engine3d/lathe3d.cxx @@ -28,11 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" #include #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 9f284d826d9f..c9ceb1ef78a6 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -28,14 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" #include #include #include #include -#include "svditer.hxx" -#include "globl3d.hxx" +#include "svx/svditer.hxx" +#include "svx/globl3d.hxx" #include #include #include diff --git a/svx/source/engine3d/objfac3d.cxx b/svx/source/engine3d/objfac3d.cxx index 3b06b249558e..493e5260cd7e 100644 --- a/svx/source/engine3d/objfac3d.cxx +++ b/svx/source/engine3d/objfac3d.cxx @@ -28,14 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include #include #include #include -#include "objfac3d.hxx" +#include "svx/objfac3d.hxx" #include /************************************************************************* diff --git a/svx/source/engine3d/polygn3d.cxx b/svx/source/engine3d/polygn3d.cxx index e91689424e18..0ec26903d2c0 100644 --- a/svx/source/engine3d/polygn3d.cxx +++ b/svx/source/engine3d/polygn3d.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include diff --git a/svx/source/engine3d/polysc3d.cxx b/svx/source/engine3d/polysc3d.cxx index 3c002e2533b8..212f5ccae44a 100644 --- a/svx/source/engine3d/polysc3d.cxx +++ b/svx/source/engine3d/polysc3d.cxx @@ -30,14 +30,14 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include #include #include #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index d799aec38eb7..ae81680ca5be 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -28,14 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" -#include "svditer.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" +#include "svx/svditer.hxx" #if defined( UNX ) || defined( ICC ) #include #endif -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include diff --git a/svx/source/engine3d/sphere3d.cxx b/svx/source/engine3d/sphere3d.cxx index ab9e3bc87f79..316c353ad7bb 100644 --- a/svx/source/engine3d/sphere3d.cxx +++ b/svx/source/engine3d/sphere3d.cxx @@ -28,11 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" #include #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 97fee2250658..cb1165267739 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -32,7 +32,7 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include @@ -43,7 +43,7 @@ #include #include #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include @@ -64,7 +64,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx index dce003fe90ae..121696d8ed6b 100644 --- a/svx/source/engine3d/view3d1.cxx +++ b/svx/source/engine3d/view3d1.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include @@ -37,7 +37,7 @@ #include #include #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index cbe9b49b81f1..82d0b538ce38 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -28,12 +28,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "dbexch.hrc" -#include "fmgridif.hxx" +#include "svx/dbexch.hrc" +#include "svx/fmgridif.hxx" #include "fmitems.hxx" #include "fmprop.hrc" #include "svx/fmtools.hxx" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmservs.hxx" #include "fmurl.hxx" #include "formcontrolfactory.hxx" diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 2cc87eb9e648..b5ef21a0ae6f 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "fmgridif.hxx" +#include "svx/fmgridif.hxx" #include "fmprop.hrc" #include "fmservs.hxx" #include "svx/fmtools.hxx" diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 6a3e4a17f5d7..debc0c8da2b1 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -30,7 +30,7 @@ #include "fmprop.hrc" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "svx/fmtools.hxx" #include "gridcell.hxx" #include "gridcols.hxx" diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 8cc52e4c0b7d..fa5a407f76dc 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -59,7 +59,7 @@ #include #ifndef _SVX_FMRESIDS_HRC -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #endif #ifndef _SVX_SVXIDS_HRC diff --git a/svx/source/fmcomp/gridctrl.src b/svx/source/fmcomp/gridctrl.src index e974f5b28b1a..46936200e712 100644 --- a/svx/source/fmcomp/gridctrl.src +++ b/svx/source/fmcomp/gridctrl.src @@ -25,7 +25,7 @@ * ************************************************************************/ -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include #include "globlmn.hrc" #include "fmhelp.hrc" diff --git a/svx/source/fmcomp/xmlexchg.cxx b/svx/source/fmcomp/xmlexchg.cxx index 5356e7c2b7dd..1026356e08c2 100644 --- a/svx/source/fmcomp/xmlexchg.cxx +++ b/svx/source/fmcomp/xmlexchg.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "xmlexchg.hxx" +#include "svx/xmlexchg.hxx" #include #include #include diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index 7b00319cb164..e1f069be96a6 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -28,9 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "ParseContext.hxx" +#include "svx/ParseContext.hxx" #include "stringlistresource.hxx" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx index 7c23c0a2020d..c6df77774c77 100644 --- a/svx/source/form/databaselocationinput.cxx +++ b/svx/source/form/databaselocationinput.cxx @@ -31,7 +31,7 @@ #include "svx/databaselocationinput.hxx" #include "svx/dialmgr.hxx" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" /** === begin UNO includes === **/ #include diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index e22ee66e0ea2..015d19407cc0 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -32,12 +32,12 @@ #include "fmservs.hxx" #include "datanavi.hrc" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmhelp.hrc" #include #include #include -#include "xmlexchg.hxx" +#include "svx/xmlexchg.hxx" #include #include #include diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src index 1b300c279312..4ddcba5d8ba8 100644 --- a/svx/source/form/datanavi.src +++ b/svx/source/form/datanavi.src @@ -27,7 +27,7 @@ #include "datanavi.hrc" #include "globlmn.hrc" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmhelp.hrc" #define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 9d1b65208fdf..3b910652a96b 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -34,7 +34,7 @@ #include "fmhelp.hrc" #include "fmitems.hxx" #include "fmprop.hrc" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "gridcell.hxx" /** === begin UNO includes === **/ diff --git a/svx/source/form/filtnav.src b/svx/source/form/filtnav.src index 82b74e84331c..45aa7ef1721a 100644 --- a/svx/source/form/filtnav.src +++ b/svx/source/form/filtnav.src @@ -26,7 +26,7 @@ ************************************************************************/ #include -#include "fmresids.hrc" +#include "svx/fmresids.hrc" Menu RID_FM_FILTER_MENU { ItemList = diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index bcc275896410..6768acfbe1f2 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -31,7 +31,7 @@ #include "fmhelp.hrc" #include "fmprop.hrc" #include "fmPropBrw.hxx" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmservs.hxx" #include "fmshimp.hxx" #include "fmpgeimp.hxx" diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx index c50dcb398928..1481a1846a36 100644 --- a/svx/source/form/fmexch.cxx +++ b/svx/source/form/fmexch.cxx @@ -33,7 +33,7 @@ #include #ifndef _SVX_DBEXCH_HRC -#include +#include #endif #include #include diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index c27b5b69d075..039c3361491d 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #ifndef _SVX_FMRESIDS_HRC -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #endif #ifndef _SVX_FMEXPL_HRC #include "fmexpl.hrc" @@ -54,7 +54,7 @@ #include "fmprop.hrc" #endif #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include diff --git a/svx/source/form/fmexpl.src b/svx/source/form/fmexpl.src index 17881727cd5f..45c721d47972 100644 --- a/svx/source/form/fmexpl.src +++ b/svx/source/form/fmexpl.src @@ -26,7 +26,7 @@ ************************************************************************/ #include -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmexpl.hrc" #include "globlmn.hrc" Menu RID_FMEXPLORER_POPUPMENU diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index e679779887a2..2b7ad83f7f5f 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -31,7 +31,7 @@ #include "fmprop.hrc" #include "fmvwimp.hxx" #include "fmpgeimp.hxx" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "svx/fmview.hxx" #include "svx/fmglob.hxx" #include "svx/fmpage.hxx" diff --git a/svx/source/form/fmobjfac.cxx b/svx/source/form/fmobjfac.cxx index ca96a9957ba7..1c7da93dfd95 100644 --- a/svx/source/form/fmobjfac.cxx +++ b/svx/source/form/fmobjfac.cxx @@ -33,7 +33,7 @@ #include "fmservs.hxx" #ifndef _FM_FMOBJFAC_HXX -#include "fmobjfac.hxx" +#include "svx/fmobjfac.hxx" #endif #ifndef _FM_FMGLOB_HXX @@ -56,7 +56,7 @@ #include #ifndef _SVX_FMRESIDS_HRC -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #endif #include #include diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index 0a5c7da9ea3c..2c2999ee34ea 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -44,7 +44,7 @@ #ifndef SVX_LIGHT #ifndef _SVX_FMRESIDS_HRC -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #endif #endif #include @@ -61,7 +61,7 @@ #include #endif #endif -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index 3ade4bdd3091..e239e982dd66 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svxerr.hxx" +#include "svx/svxerr.hxx" #include "fmpgeimp.hxx" #include "fmundo.hxx" #include "svx/fmtools.hxx" @@ -36,8 +36,8 @@ #include "fmservs.hxx" #include "fmobj.hxx" #include "formcontrolfactory.hxx" -#include "svditer.hxx" -#include "fmresids.hrc" +#include "svx/svditer.hxx" +#include "svx/fmresids.hrc" #include "svx/dbtoolsclient.hxx" #include "treevisitor.hxx" diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 828791a3d035..c3573cc34e35 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -64,7 +64,7 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include "fmobj.hxx" #ifndef _SVX_SVXIDS_HRC @@ -72,7 +72,7 @@ #endif #ifndef _SVX_FMRESIDS_HRC -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #endif #include "fmexch.hxx" #include diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 463749b68364..888c30969f6b 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -33,7 +33,7 @@ #include "fmpgeimp.hxx" #include "svx/fmtools.hxx" #include "fmprop.hrc" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmservs.hxx" #include "fmshimp.hxx" #include "fmtextcontrolshell.hxx" @@ -42,7 +42,7 @@ #include "fmvwimp.hxx" #include "formtoolbars.hxx" #include "gridcols.hxx" -#include "svditer.hxx" +#include "svx/svditer.hxx" #include "svx/dialmgr.hxx" #include "svx/dialogs.hrc" #include "svx/fmglob.hxx" diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx index 243b45e099fb..dc396feec29f 100644 --- a/svx/source/form/fmsrccfg.cxx +++ b/svx/source/form/fmsrccfg.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "fmsrccfg.hxx" +#include "svx/fmsrccfg.hxx" #include #include #include diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index a4bb5753e8bb..fcb6261f4106 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -29,10 +29,10 @@ #include "precompiled_svx.hxx" #ifndef _SVX_FMRESIDS_HRC -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #endif #include "svx/fmtools.hxx" -#include "fmsrccfg.hxx" +#include "svx/fmsrccfg.hxx" #include #include #include @@ -63,7 +63,7 @@ #include "fmprop.hrc" #endif #include "fmservs.hxx" -#include "fmsrcimp.hxx" +#include "svx/fmsrcimp.hxx" #include #include diff --git a/svx/source/form/fmstring.src b/svx/source/form/fmstring.src index 8e3df1a8cdf5..91b5d28203a0 100644 --- a/svx/source/form/fmstring.src +++ b/svx/source/form/fmstring.src @@ -25,7 +25,7 @@ * ************************************************************************/ -#include "fmresids.hrc" +#include "svx/fmresids.hrc" /* Strings fuer Uebersetzung */ String RID_ERR_CONTEXT_ADDFORM { diff --git a/svx/source/form/fmtextcontroldialogs.cxx b/svx/source/form/fmtextcontroldialogs.cxx index c10bdfe14ec5..d758b5622e0b 100644 --- a/svx/source/form/fmtextcontroldialogs.cxx +++ b/svx/source/form/fmtextcontroldialogs.cxx @@ -44,7 +44,7 @@ //#include "tabstpge.hxx" #endif -#include "flagsdef.hxx" +#include "svx/flagsdef.hxx" #include #include diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 430c52cfa4db..98eeb3927e69 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include "fmprop.hrc" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmtextcontroldialogs.hxx" #include "fmtextcontrolfeature.hxx" #include "fmtextcontrolshell.hxx" diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index ba7ba492c2fb..c777fe4da28e 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -31,10 +31,10 @@ #include "fmundo.hxx" #include "fmpgeimp.hxx" #include "svx/dbtoolsclient.hxx" -#include "svditer.hxx" +#include "svx/svditer.hxx" #include "fmobj.hxx" #include "fmprop.hrc" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "svx/fmglob.hxx" #include "svx/dialmgr.hxx" #include "svx/fmmodel.hxx" diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index fd7da1f7eb8f..462e95d38514 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -50,7 +50,7 @@ #include #include "fmitems.hxx" #include "fmobj.hxx" -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include @@ -76,7 +76,7 @@ #include #include #include -#include "sdrpaintwindow.hxx" +#include "svx/sdrpaintwindow.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 1b5c7daf371c..dae216753d22 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -32,15 +32,15 @@ #include "fmobj.hxx" #include "fmpgeimp.hxx" #include "fmprop.hrc" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmservs.hxx" #include "fmshimp.hxx" #include "svx/fmtools.hxx" #include "fmundo.hxx" #include "fmvwimp.hxx" #include "formcontrolfactory.hxx" -#include "sdrpaintwindow.hxx" -#include "svditer.hxx" +#include "svx/sdrpaintwindow.hxx" +#include "svx/svditer.hxx" #include "svx/dataaccessdescriptor.hxx" #include "svx/dialmgr.hxx" #include "svx/fmglob.hxx" @@ -51,7 +51,7 @@ #include "svx/sdrpagewindow.hxx" #include "svx/svdogrp.hxx" #include "svx/svdpagv.hxx" -#include "xmlexchg.hxx" +#include "svx/xmlexchg.hxx" /** === begin UNO includes === **/ #include diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 5d222e7f5e88..32a234396c54 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -31,7 +31,7 @@ #include "formcontrolfactory.hxx" #include "fmcontrollayout.hxx" #include "fmprop.hrc" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmservs.hxx" #include "svx/dialmgr.hxx" #include "svx/svdouno.hxx" diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index b8292785b457..a91b18b29cda 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -36,7 +36,7 @@ #include "formcontrolling.hxx" #include "fmprop.hrc" #include "svx/dialmgr.hxx" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmservs.hxx" #include "svx/fmtools.hxx" #include "fmurl.hxx" diff --git a/svx/source/form/formshell.src b/svx/source/form/formshell.src index 5a7e25e14f13..65171bd07646 100644 --- a/svx/source/form/formshell.src +++ b/svx/source/form/formshell.src @@ -25,7 +25,7 @@ * ************************************************************************/ -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include #include #include diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 0c83655042d2..d4249e5fa4ec 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -32,12 +32,12 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include "fmhelp.hrc" #include "fmexpl.hrc" #include "fmexpl.hxx" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmshimp.hxx" #include "fmservs.hxx" #include "fmundo.hxx" @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include //CHINA001 #include //CHINA001 diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 24a7d2c5d3d7..2065295006e9 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -32,7 +32,7 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include @@ -42,7 +42,7 @@ #include "fmhelp.hrc" #include "fmexpl.hrc" #include "fmexpl.hxx" -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #include "fmshimp.hxx" #include "fmobj.hxx" #include diff --git a/svx/source/form/sqlparserclient.cxx b/svx/source/form/sqlparserclient.cxx index 4b187bbb2b7d..a63db6e96d62 100644 --- a/svx/source/form/sqlparserclient.cxx +++ b/svx/source/form/sqlparserclient.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include "sqlparserclient.hxx" -#include "ParseContext.hxx" +#include "svx/ParseContext.hxx" //........................................................................ namespace svxform diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 7a51348dfaa3..aeb62d79f3f7 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -61,7 +61,7 @@ #endif #ifndef _SVX_FMRESIDS_HRC -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #endif #include #include diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index f275fd9efd72..fb13eddd15f0 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -45,11 +45,11 @@ #ifndef _SVX_DIALOGS_HRC #include #endif -#include "tbxctl.hxx" -#include "tbxdraw.hxx" +#include "svx/tbxctl.hxx" +#include "svx/tbxdraw.hxx" #include "tbxform.hxx" #ifndef _SVX_FMRESIDS_HRC -#include "fmresids.hrc" +#include "svx/fmresids.hrc" #endif #include "fmitems.hxx" #ifndef _SVX_FMHELP_HRC diff --git a/svx/source/form/typemap.cxx b/svx/source/form/typemap.cxx index f465e9d88dad..c12bb313f862 100644 --- a/svx/source/form/typemap.cxx +++ b/svx/source/form/typemap.cxx @@ -38,7 +38,7 @@ #include #include #ifndef _SVX_CLIPBOARDCTL_HXX_ -#include "clipfmtitem.hxx" +#include "svx/clipfmtitem.hxx" #endif #include #include "editeng/fontitem.hxx" diff --git a/svx/source/gallery2/galbrws.cxx b/svx/source/gallery2/galbrws.cxx index b048da9bf022..b972dccd9ab7 100644 --- a/svx/source/gallery2/galbrws.cxx +++ b/svx/source/gallery2/galbrws.cxx @@ -38,7 +38,7 @@ #include "svx/gallery1.hxx" #include "galbrws1.hxx" #include "galbrws2.hxx" -#include "galbrws.hxx" +#include "svx/galbrws.hxx" // ------------------- // - GallerySplitter - diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index ccbcd40862de..04f402804b0c 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -35,7 +35,7 @@ #include #include "helpid.hrc" #include "svx/gallery1.hxx" -#include "galtheme.hxx" +#include "svx/galtheme.hxx" #include "svx/galmisc.hxx" #include "galbrws1.hxx" #include diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index 91740fafcb14..2903dcabef59 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -30,7 +30,7 @@ #include #include #include -#include "galbrws.hxx" +#include "svx/galbrws.hxx" // ----------------- // - GalleryButton - diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 0483a1bc1425..045b52aa2e53 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -44,11 +44,11 @@ #include "svtools/filter.hxx" #include #include "helpid.hrc" -#include "gallery.hxx" +#include "svx/gallery.hxx" #include "galobj.hxx" #include "svx/gallery1.hxx" -#include "galtheme.hxx" -#include "galctrl.hxx" +#include "svx/galtheme.hxx" +#include "svx/galctrl.hxx" #include "svx/galmisc.hxx" #include "galbrws2.hxx" #include "gallery.hrc" diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 8022cecc0fbe..d6817134fefb 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -34,9 +34,9 @@ #include #include "helpid.hrc" #include "galbrws2.hxx" -#include "galtheme.hxx" +#include "svx/galtheme.hxx" #include "svx/galmisc.hxx" -#include "galctrl.hxx" +#include "svx/galctrl.hxx" #include "editeng/AccessibleStringWrap.hxx" #include #include "galobj.hxx" diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index 7e5b6fe5e3a9..cad6780f11f7 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -31,9 +31,9 @@ #include #include #include "svx/gallery1.hxx" -#include "galtheme.hxx" -#include "galbrws.hxx" -#include "gallery.hxx" +#include "svx/galtheme.hxx" +#include "svx/galbrws.hxx" +#include "svx/gallery.hxx" #include "galobj.hxx" // ----------- diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 419e160e6765..32ad01aca4a2 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -35,10 +35,10 @@ #include #include #include -#include "gallery.hxx" +#include "svx/gallery.hxx" #include "gallery.hrc" #include "svx/galmisc.hxx" -#include "galtheme.hxx" +#include "svx/galtheme.hxx" #include "svx/gallery1.hxx" #include #include diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 10dd5949dee2..835c7dc3e731 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -51,7 +51,7 @@ #include "codec.hxx" #include "gallery.hrc" #include "svx/gallery1.hxx" -#include "galtheme.hxx" +#include "svx/galtheme.hxx" #include "svx/galmisc.hxx" #include #include diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 8fd38025f4a5..730c1179a07e 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -52,7 +52,7 @@ #include #include #include "svx/galmisc.hxx" -#include "galtheme.hxx" +#include "svx/galtheme.hxx" #include #include #include diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx index bc8e6ef7c4bd..566aac738dd1 100644 --- a/svx/source/gengal/gengal.cxx +++ b/svx/source/gengal/gengal.cxx @@ -67,7 +67,7 @@ #include #include -#include +#include #include using namespace ::vos; diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index 3f89adb42626..a97793a64ea9 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -65,7 +65,7 @@ #include #include #include "svx/fmtools.hxx" -#include "fmsrccfg.hxx" +#include "svx/fmsrccfg.hxx" #include #include #include diff --git a/svx/source/inc/sqlparserclient.hxx b/svx/source/inc/sqlparserclient.hxx index ced2a0708b9c..01e175d51e4e 100644 --- a/svx/source/inc/sqlparserclient.hxx +++ b/svx/source/inc/sqlparserclient.hxx @@ -29,7 +29,7 @@ #define SVX_SQLPARSERCLIENT_HXX #include "svx/dbtoolsclient.hxx" -#include "ParseContext.hxx" +#include "svx/ParseContext.hxx" #include //........................................................................ diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx index 8957bd2e3ba0..474bf19f7bd6 100644 --- a/svx/source/items/chrtitem.cxx +++ b/svx/source/items/chrtitem.cxx @@ -44,7 +44,7 @@ #include #include -#include "chrtitem.hxx" +#include "svx/chrtitem.hxx" using namespace ::rtl; using namespace ::com::sun::star; diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index 086cd1cff161..bc3ca621635b 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -32,7 +32,7 @@ #define _SVSTDARR_STRINGSDTOR #include -#include +#include #include struct SvxClipboardFmtItem_Impl diff --git a/svx/source/items/drawitem.cxx b/svx/source/items/drawitem.cxx index 27d7dba45c49..f02848835ffd 100644 --- a/svx/source/items/drawitem.cxx +++ b/svx/source/items/drawitem.cxx @@ -33,7 +33,7 @@ #include -#include "drawitem.hxx" +#include "svx/drawitem.hxx" #include using namespace ::com::sun::star; diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx index a67a87021d31..987f5aa6df08 100644 --- a/svx/source/items/hlnkitem.cxx +++ b/svx/source/items/hlnkitem.cxx @@ -44,7 +44,7 @@ #include #endif -#include "hlnkitem.hxx" +#include "svx/hlnkitem.hxx" // ----------------------------------------------------------------------- diff --git a/svx/source/items/ofaitem.cxx b/svx/source/items/ofaitem.cxx index 4a3680cbe58b..e996373eb48e 100644 --- a/svx/source/items/ofaitem.cxx +++ b/svx/source/items/ofaitem.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "ofaitem.hxx" +#include "svx/ofaitem.hxx" OfaPtrItem::OfaPtrItem( USHORT _nWhich, void *_pPtr ) : SfxPoolItem( _nWhich ), pPtr( _pPtr ) diff --git a/svx/source/items/postattr.cxx b/svx/source/items/postattr.cxx index 5b03bbd6be2d..cab4207d56c5 100644 --- a/svx/source/items/postattr.cxx +++ b/svx/source/items/postattr.cxx @@ -31,7 +31,7 @@ // include --------------------------------------------------------------- #define _SVX_POSTATTR_CXX -#include "postattr.hxx" +#include "svx/postattr.hxx" #include #include #include diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx index 10a0adf3f0c9..6e6f46cdc373 100644 --- a/svx/source/items/rotmodit.cxx +++ b/svx/source/items/rotmodit.cxx @@ -42,7 +42,7 @@ #include #include -#include "rotmodit.hxx" +#include "svx/rotmodit.hxx" using namespace ::rtl; using namespace ::com::sun::star; diff --git a/svx/source/items/svxerr.cxx b/svx/source/items/svxerr.cxx index 317514601aa5..89b4266a1339 100644 --- a/svx/source/items/svxerr.cxx +++ b/svx/source/items/svxerr.cxx @@ -31,7 +31,7 @@ // include --------------------------------------------------------------- #include -#include "svxerr.hxx" +#include "svx/svxerr.hxx" #include #include diff --git a/svx/source/items/svxerr.src b/svx/source/items/svxerr.src index 382027a12b51..890e5687021d 100644 --- a/svx/source/items/svxerr.src +++ b/svx/source/items/svxerr.src @@ -26,7 +26,7 @@ ************************************************************************/ // include --------------------------------------------------------------- #define __RSC -#include "svxerr.hxx" +#include "svx/svxerr.hxx" #include #include diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx index f6b95067c5e2..db92fd66d425 100644 --- a/svx/source/mnuctrls/clipboardctl.cxx +++ b/svx/source/mnuctrls/clipboardctl.cxx @@ -36,8 +36,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx index 68e7c4d32472..48c1a1158c4c 100644 --- a/svx/source/mnuctrls/fntszctl.cxx +++ b/svx/source/mnuctrls/fntszctl.cxx @@ -43,7 +43,7 @@ #include "editeng/fontitem.hxx" #include "editeng/flstitem.hxx" -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include #define LOGIC OutputDevice::LogicToLogic diff --git a/svx/source/mnuctrls/makefile.mk b/svx/source/mnuctrls/makefile.mk index 9c208d9a787c..31c8e532143f 100644 --- a/svx/source/mnuctrls/makefile.mk +++ b/svx/source/mnuctrls/makefile.mk @@ -56,7 +56,7 @@ HXX1TARGET=mnuctrls HXX1EXT= hxx HXX1EXCL= -E:*include* HXX1DEPN=\ - $(INC)$/clipboardctl.hxx \ + $(INC)$/svx/clipboardctl.hxx \ $(INC)$/fntctl.hxx \ $(INC)$/fntszctl.hxx \ $(INC)$/SmartTagCtl.hxx diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx index da8518d7f1a1..c1204ed1bdf6 100644 --- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx +++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 1652855d84a8..d2264e219c48 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -38,13 +38,13 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 7172b0840476..d4748a14ed98 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -44,8 +44,8 @@ #include #include #include -#include "svdstr.hrc" -#include +#include "svx/svdstr.hrc" +#include #include #include #include diff --git a/svx/source/sdr/contact/viewcontactofsdrobj.cxx b/svx/source/sdr/contact/viewcontactofsdrobj.cxx index 6d609108e580..3b002e406be1 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobj.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 6fa63f7c073e..5ddd74004461 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx index 2a4d527fdcdd..fb57864903d1 100644 --- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx @@ -41,7 +41,7 @@ #include /** === end UNO includes === **/ -#include "sdrpaintwindow.hxx" +#include "svx/sdrpaintwindow.hxx" #include #include #include diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index 5ef26193d4b3..bc73fd523437 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx index ce8d0c79a5f9..6785f69f556b 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx @@ -39,7 +39,7 @@ #include #include "sdrmediawindow.hxx" #include -#include +#include ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 5d00418a5729..81450d42a50a 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "sdrpaintwindow.hxx" +#include "svx/sdrpaintwindow.hxx" /** === begin UNO includes === **/ #include diff --git a/svx/source/sdr/primitive2d/primitivefactory2d.cxx b/svx/source/sdr/primitive2d/primitivefactory2d.cxx index d6a6867b819e..d148f76576aa 100644 --- a/svx/source/sdr/primitive2d/primitivefactory2d.cxx +++ b/svx/source/sdr/primitive2d/primitivefactory2d.cxx @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 2320944afd03..5af4f316ccc0 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx index 41a3294b2a01..3ee3189ac4a8 100644 --- a/svx/source/sdr/properties/e3dsceneproperties.cxx +++ b/svx/source/sdr/properties/e3dsceneproperties.cxx @@ -32,7 +32,7 @@ #include #include #include -#include +#include ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx index eab977681490..37678966bc07 100644 --- a/svx/source/sdr/properties/itemsettools.cxx +++ b/svx/source/sdr/properties/itemsettools.cxx @@ -34,7 +34,7 @@ #include #include -#include +#include ////////////////////////////////////////////////////////////////////////////// // class to remember broadcast start positions diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx index 576f9745e167..f8c307f26309 100644 --- a/svx/source/sdr/properties/properties.cxx +++ b/svx/source/sdr/properties/properties.cxx @@ -31,7 +31,7 @@ #include #include #include -#include +#include ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/stbctrls/insctrl.cxx b/svx/source/stbctrls/insctrl.cxx index 241ffeb8bc36..036d01e1e21b 100644 --- a/svx/source/stbctrls/insctrl.cxx +++ b/svx/source/stbctrls/insctrl.cxx @@ -41,7 +41,7 @@ #include -#include "insctrl.hxx" +#include "svx/insctrl.hxx" #include #define PAINT_OFFSET 5 diff --git a/svx/source/stbctrls/makefile.mk b/svx/source/stbctrls/makefile.mk index 4e125adcd9d8..71c639cecdd3 100644 --- a/svx/source/stbctrls/makefile.mk +++ b/svx/source/stbctrls/makefile.mk @@ -61,12 +61,12 @@ HXX1TARGET=stbctrls HXX1EXT= hxx HXX1EXCL= -E:*include* HXX1DEPN=\ - $(INC)$/insctrl.hxx \ - $(INC)$/zoomctrl.hxx \ - $(INC)$/pszctrl.hxx \ - $(INC)$/selctrl.hxx \ - $(INC)$/modctrl.hxx \ - $(INC)$/xmlsecctrl.hxx \ + $(INC)$/svx/insctrl.hxx \ + $(INC)$/svx/zoomctrl.hxx \ + $(INC)$/svx/pszctrl.hxx \ + $(INC)$/svx/selctrl.hxx \ + $(INC)$/svx/modctrl.hxx \ + $(INC)$/svx/xmlsecctrl.hxx \ $(INC)$/zoomsliderctrl.hxx \ # --- Targets ------------------------------------------------------- diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index fbb212e131f0..986b84f7b8dc 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -40,7 +40,7 @@ #include -#include "modctrl.hxx" +#include "svx/modctrl.hxx" #include SFX_IMPL_STATUSBAR_CONTROL(SvxModifyControl, SfxBoolItem); diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index edb72ab05eac..4a622aa6ebc0 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -45,13 +45,13 @@ #include #define _SVX_PSZCTRL_CXX -#include "pszctrl.hxx" +#include "svx/pszctrl.hxx" #define PAINT_OFFSET 5 #include #include -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include "stbctrls.h" #include "sfx2/module.hxx" diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index 980216ce17bf..e56ba9aeaef9 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -39,7 +39,7 @@ #define _SVX_SELCTRL_CXX -#include "selctrl.hxx" +#include "svx/selctrl.hxx" #include #include diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index 06d1e9642b9e..ece7682fb2e1 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -53,14 +53,14 @@ #include #include -#include "xmlsecctrl.hxx" +#include "svx/xmlsecctrl.hxx" #include #define PAINT_OFFSET 5 //#include //#include -//#include "dlgutil.hxx" +//#include "svx/dlgutil.hxx" //#include "stbctrls.h" //#include diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index 63cbbb969d2d..fb9fc65583e3 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -39,7 +39,7 @@ #include -#include "zoomctrl.hxx" +#include "svx/zoomctrl.hxx" //CHINA001 #include "zoom.hxx" #include #include "stbctrls.h" diff --git a/svx/source/svdraw/ActionDescriptionProvider.cxx b/svx/source/svdraw/ActionDescriptionProvider.cxx index acd60e27680b..ffc753e61276 100644 --- a/svx/source/svdraw/ActionDescriptionProvider.cxx +++ b/svx/source/svdraw/ActionDescriptionProvider.cxx @@ -28,9 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "ActionDescriptionProvider.hxx" -#include "svdglob.hxx" -#include "svdstr.hrc" +#include "svx/ActionDescriptionProvider.hxx" +#include "svx/svdglob.hxx" +#include "svx/svdstr.hrc" ::rtl::OUString ActionDescriptionProvider::createDescription( ActionType eActionType , const ::rtl::OUString& rObjectName ) diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 85513fb3b926..ae3b1520c310 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index d173c1eea4d5..656ab9f2f27a 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include +#include #include #include #include diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index d831906fa94c..b81e1c0db009 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -54,11 +54,11 @@ #include #include // fuer RGB_Color() -#include "svditext.hxx" +#include "svx/svditext.hxx" #include // fuer DEGREE_CHAR #include -#include "svdglob.hxx" // Stringcache -#include "svdstr.hrc" +#include "svx/svdglob.hxx" // Stringcache +#include "svx/svdstr.hrc" #include #include #include diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index 9fd0edd3aac0..7980668c0b9a 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include -#include "xattr.hxx" +#include "svx/xattr.hxx" #include #include // Spezialbehandlung: Nach dem Create transparente Fuellung #include @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include "fmobj.hxx" #include #include diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index d04bf8851795..d41b5b1a1c34 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -37,7 +37,7 @@ #include #include -#include "xattr.hxx" +#include "svx/xattr.hxx" #include #include #include @@ -45,8 +45,8 @@ #include #include #include -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache #include #include #include @@ -59,7 +59,7 @@ #include #include #include -#include +#include #include #include #include @@ -68,7 +68,7 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index f1b84ac5f98e..f47d30fb3bdd 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include -#include "xattr.hxx" +#include "svx/xattr.hxx" #include #include #include @@ -38,12 +38,12 @@ #include #include #include -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" #include "svddrgm1.hxx" #include #include -#include +#include #include #include #include diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 3b878ce93138..5e89bfbdb8f5 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -40,8 +40,8 @@ #include #include #include // fuer die PolyPossiblities -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache #include // #i13033# diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 48870cda0e02..30af84a1aebe 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -40,8 +40,8 @@ #include #include // fuer SID_ATTR_TRANSFORM_... #include // fuer Get/SetGeoAttr -#include "svditext.hxx" -#include "svditer.hxx" +#include "svx/svditext.hxx" +#include "svx/svditer.hxx" #include #include #include @@ -50,8 +50,8 @@ #include // fuer MergeNotPersistAttr #include // fuer SearchOutlinerItems #include // fuer Crook -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache #include #include #include diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index e31ea11be7d6..c49b0a8aa68f 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -36,11 +36,11 @@ #include // fuer CombineObjects #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include // fuer Possibilities #include // und Mtf-Import -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache #include "svdfmtf.hxx" #include #include diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 76bcb828bb24..9744e9764488 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -50,12 +50,12 @@ #include #include #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include "svx/svdpagv.hxx" #include "svx/svdpage.hxx" #include "svx/svdetc.hxx" // fuer GetDraftFillColor @@ -67,16 +67,16 @@ #include #include // fuer SetSolidDragging() -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache -#include "globl3d.hxx" +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache +#include "svx/globl3d.hxx" #include #include // #98988# #include #include //add CHINA001 -#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 8a4245919821..74d0cf6046da 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -31,12 +31,12 @@ #include #include #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include #include -#include "svdglob.hxx" -#include "svdstr.hrc" -#include "svdviter.hxx" +#include "svx/svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdviter.hxx" #include #include #include diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 445fe60c0670..633d82d67816 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -57,7 +57,7 @@ #include #include #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include #include #include diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx index 6eab2ea7ecfa..e90d1972a4cd 100644 --- a/svx/source/svdraw/svdglev.cxx +++ b/svx/source/svdraw/svdglev.cxx @@ -32,8 +32,8 @@ #include #include -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache #include #include #include diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 3d90eae6d68c..271c466017d0 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -41,8 +41,8 @@ #include #include -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" #include #include "gradtrns.hxx" @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index fa3dbe852b3a..3ded3a1f90c3 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -36,7 +36,7 @@ #define _STDLIB_H #endif -#include "svditext.hxx" +#include "svx/svditext.hxx" #include #include #include @@ -66,7 +66,7 @@ #include #include -#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx index 30c423c7178c..0e7bc872c5a6 100644 --- a/svx/source/svdraw/svditer.cxx +++ b/svx/source/svdraw/svditer.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index 098c036dcad7..2c12a7b5d06c 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -31,8 +31,8 @@ #include #include // fuer Broadcasting -#include "svdglob.hxx" // StringCache -#include "svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource //////////////////////////////////////////////////////////////////////////////////////////////////// // SetOfByte diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index c871865ac87b..d61654e674ea 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -34,13 +34,13 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include // zur Abschaltung #include // des Cache bei #include // GetMarkDescription -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache //////////////////////////////////////////////////////////////////////////////////////////////////// #include diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 2fcdfdffbb8a..d9966a26755b 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -49,12 +49,12 @@ #include #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include // Fuer EditEngine::CreatePool() #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include @@ -65,8 +65,8 @@ #include #include #include -#include "svdglob.hxx" // Stringcache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // Stringcache +#include "svx/svdstr.hrc" // Objektname #include "svdoutlinercache.hxx" diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index b9598cef4ceb..0c29815584c0 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -31,8 +31,8 @@ #include #include #include -#include "svdglob.hxx" -#include "svditext.hxx" +#include "svx/svdglob.hxx" +#include "svx/svditext.hxx" #include #include #include @@ -48,14 +48,14 @@ #include "gradtrns.hxx" #include #include -#include "svdstr.hrc" +#include "svx/svdstr.hrc" #include #include #include #include #include #include -#include +#include #include #include diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx index fe271c80534d..f67b35bfdf67 100644 --- a/svx/source/svdraw/svdmrkv1.cxx +++ b/svx/source/svdraw/svdmrkv1.cxx @@ -31,7 +31,7 @@ #include #include #include -#include "svdglob.hxx" +#include "svx/svdglob.hxx" #include #include #include "svddrgm1.hxx" diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 58e0b7bdb425..2f255850e811 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include #include @@ -52,22 +52,22 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include #include // NotPersistItems #include // #32383# Die Verbinder nach Move nochmal anbroadcasten -#include "svdglob.hxx" // StringCache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Objektname #include #include "editeng/editstat.hxx" #include #include #include -#include "../customshapes/EnhancedCustomShapeGeometry.hxx" -#include "../customshapes/EnhancedCustomShapeTypeNames.hxx" -#include "../customshapes/EnhancedCustomShape2d.hxx" +#include "../svx/EnhancedCustomShapeGeometry.hxx" +#include "../svx/EnhancedCustomShapeTypeNames.hxx" +#include "../svx/EnhancedCustomShape2d.hxx" #include #include #include diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx index 81c1ca029ede..09965a1b98a6 100644 --- a/svx/source/svdraw/svdoattr.cxx +++ b/svx/source/svdraw/svdoattr.cxx @@ -30,7 +30,7 @@ #include #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include #include #include diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 6eb96fe4f088..6e1660761dc0 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -48,8 +48,8 @@ #include // Fuer Add/Del Ref #include // fuer Dragging (Ortho abfragen) #include "svdscrol.hxx" -#include "svdglob.hxx" // StringCache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Objektname #include // Factory #include // Factory #include // Factory @@ -75,7 +75,7 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index b92157823081..fd9ee15b8f2c 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -41,8 +41,8 @@ #include #include #include // fuer RectSnap -#include "svdglob.hxx" // StringCache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Objektname #include #include #include diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 12cdeac9ef85..67d01159a72d 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -47,8 +47,8 @@ #include #include // fuer die Objektkonvertierung #include // Zum Draggen (Ortho) -#include "svdglob.hxx" // StringCache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Objektname #include #include "svdoimp.hxx" #include diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index dc76855f05cc..027cca425437 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -43,8 +43,8 @@ #include #include #include -#include "svdglob.hxx" // StringCache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Objektname #include #include #include diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 1924235e7003..c9686eecb7db 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -46,14 +46,14 @@ #include #include -#include "svdglob.hxx" -#include "svdstr.hrc" +#include "svx/svdglob.hxx" +#include "svx/svdstr.hrc" #include #include #include #include #include -#include "svdviter.hxx" +#include "svx/svdviter.hxx" #include #include "svtools/filter.hxx" #include diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 4060369f8016..56c49ac7ddee 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -45,14 +45,14 @@ #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include #include // NotPersistItems #include // #32383# Die Verbinder nach Move nochmal anbroadcasten -#include "svdglob.hxx" // StringCache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Objektname #include #include diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 2bcf016d0e4a..ade79ec70878 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -30,7 +30,7 @@ #include #include -#include "svditext.hxx" // +#include "svx/svditext.hxx" // #include #include #include @@ -40,8 +40,8 @@ #include #include #include -#include "svdglob.hxx" // StringCache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Objektname #include #include #include diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 4008e9494f2e..fbce08fdfaa8 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -29,8 +29,8 @@ #include "precompiled_svx.hxx" #include -#include "svdglob.hxx" -#include "svdstr.hrc" +#include "svx/svdglob.hxx" +#include "svx/svdstr.hrc" #include #include diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 88d9aba87673..4973388ea6d4 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -77,8 +77,8 @@ #include #include -#include "svdglob.hxx" // Stringcache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // Stringcache +#include "svx/svdstr.hrc" // Objektname #include #include #include "unomlstr.hxx" diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx index a2d21e6e2269..dbe19ac40efe 100644 --- a/svx/source/svdraw/svdopage.cxx +++ b/svx/source/svdraw/svdopage.cxx @@ -29,8 +29,8 @@ #include "precompiled_svx.hxx" #include -#include "svdglob.hxx" // Stringcache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // Stringcache +#include "svx/svdstr.hrc" // Objektname #include #include #include diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 2b495725c006..c9b16f726785 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -41,8 +41,8 @@ #include #include #include // fuer MovCreate bei Freihandlinien -#include "svdglob.hxx" // Stringcache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // Stringcache +#include "svx/svdstr.hrc" // Objektname #ifdef _MSC_VER #pragma optimize ("",off) diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index b03dbf5b903a..84dab2cfb165 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -45,8 +45,8 @@ #include // das #include // Macro-Beispiel #include -#include "svdglob.hxx" // Stringcache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // Stringcache +#include "svx/svdstr.hrc" // Objektname #include #include #include diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index a2b7e8c0490c..dad8c1f205e3 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include // fuer Abfrage im Paint, ob das #include // Objekt gerade editiert wird #include // und fuer AnimationHandler (Laufschrift) @@ -37,8 +37,8 @@ #include #include "svdscrol.hxx" // fuer Laufschrift #include // OutlinerDefaults -#include "svdglob.hxx" // Stringcache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // Stringcache +#include "svx/svdstr.hrc" // Objektname #include #include #include diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 3675c7becac4..9bc3bbb4958c 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index f6780bd7c90d..639f4382a572 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -64,7 +64,7 @@ #include #include #include -#include +#include #include #include diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 13064e890313..8b6dab72d5e9 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -30,7 +30,7 @@ #include #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include // fuer GetMaxObjSize und GetStyleSheetPool #include #include // fuer SetDirty bei NbcAdjustTextFrameWidthAndHeight diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index 97da16876ac0..0e4feeedd2f3 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -33,8 +33,8 @@ #include #include #include // fuer SetXPolyDirty in MovCreate bei SolidDragging -#include "svdglob.hxx" // Stringcache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // Stringcache +#include "svx/svdstr.hrc" // Objektname #include #include #include diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index c7715f37764c..6f749a297aef 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include // fuer GetMaxObjSize #include #include diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index 7d176fbfe811..57bcc7a22ae8 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include #include #include diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index bd1564ab3f4e..4559dacb31d8 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include #include #include @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index b98e5ba5c1c6..894a5c72926f 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -47,17 +47,17 @@ #include #include #include -#include "svdglob.hxx" // Stringcache -#include "svdstr.hrc" // Objektname +#include "svx/svdglob.hxx" // Stringcache +#include "svx/svdstr.hrc" // Objektname #include #include #include -#include "svdviter.hxx" +#include "svx/svdviter.hxx" #include #include #include #include -#include +#include #include #include diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 6dd816d429da..872d88bc180b 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -49,7 +49,7 @@ #include // fuer SwapInAll() #include // Zum kopieren der Konnektoren #include // Sonderbehandlung OLE beim SdrExchangeFormat -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 6239708394bd..c594813f4292 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -47,7 +47,7 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include @@ -66,7 +66,7 @@ using namespace ::rtl; using namespace ::com::sun::star; #include -#include +#include TYPEINIT1(SdrPageView, SfxListener); DBG_NAME(SdrPageView); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 998c687608fc..e936d43c4552 100755 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include @@ -54,7 +54,7 @@ #include #include #include "svdibrow.hxx" -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index 27e2884bb90c..3a3942319661 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -34,8 +34,8 @@ #include #include #include -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache #include #include #include diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx index 1a8f735887cf..a58081ad0ee0 100644 --- a/svx/source/svdraw/svdsnpv.cxx +++ b/svx/source/svdraw/svdsnpv.cxx @@ -35,13 +35,13 @@ #include #include #include -#include "svditer.hxx" +#include "svx/svditer.hxx" #include #include #include #include #include -#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// // #114409#-1 Migrate PageOrigin diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src index ee6cbaea9632..ce024291241b 100644 --- a/svx/source/svdraw/svdstr.src +++ b/svx/source/svdraw/svdstr.src @@ -26,7 +26,7 @@ ************************************************************************/ /* StarView resource file */ -#include "svdstr.hrc" +#include "svx/svdstr.hrc" // Ab hier gecachte Strings String STR_ObjNameSingulNONE { diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 667dd3a340b5..a20ebd9baf65 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -29,15 +29,15 @@ #include "precompiled_svx.hxx" #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include #include #include #include #include #include -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache #include #include #include @@ -47,7 +47,7 @@ #include #include -#include "svdviter.hxx" +#include "svx/svdviter.hxx" //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 856820b6d864..960c440d5973 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -29,8 +29,8 @@ #include "precompiled_svx.hxx" #include -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache #include #include #include @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include diff --git a/svx/source/svdraw/svdviter.cxx b/svx/source/svdraw/svdviter.cxx index 9c52ee87cf23..ceb192e85683 100644 --- a/svx/source/svdraw/svdviter.cxx +++ b/svx/source/svdraw/svdviter.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "svdviter.hxx" +#include "svx/svdviter.hxx" #include #include #include @@ -36,7 +36,7 @@ #include #include #include -#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index d19b190b3d6a..181b086988db 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -30,11 +30,11 @@ #include #include -#include "xexch.hxx" +#include "svx/xexch.hxx" #include #include #include -#include "svditext.hxx" +#include "svx/svditext.hxx" #include #include #include @@ -45,9 +45,9 @@ #include #include #include // Fuer GetMapFactor zum umskalieren bei PasteModel -#include "svdstr.hrc" // Namen aus der Resource -#include "svdglob.hxx" // StringCache -#include "xoutbmp.hxx" +#include "svx/svdstr.hrc" // Namen aus der Resource +#include "svx/svdglob.hxx" // StringCache +#include "svx/xoutbmp.hxx" #include #include #include diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index 71b94d021650..ce04c9f6307a 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -30,7 +30,7 @@ #include -#include "DescriptionGenerator.hxx" +#include "svx/DescriptionGenerator.hxx" #include #include diff --git a/svx/source/table/cellcursor.cxx b/svx/source/table/cellcursor.cxx index 70329213d01a..7fb3a7ffcf70 100644 --- a/svx/source/table/cellcursor.cxx +++ b/svx/source/table/cellcursor.cxx @@ -33,8 +33,8 @@ #include "tablelayouter.hxx" #include "cell.hxx" #include "svx/svdmodel.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" // ----------------------------------------------------------------------------- diff --git a/svx/source/table/celleditsource.cxx b/svx/source/table/celleditsource.cxx index 218d8631cb75..4b49088be6e2 100644 --- a/svx/source/table/celleditsource.cxx +++ b/svx/source/table/celleditsource.cxx @@ -55,7 +55,7 @@ #include "svx/svdpage.hxx" #include "editeng/editeng.hxx" #include "editeng/unotext.hxx" -#include "sdrpaintwindow.hxx" +#include "svx/sdrpaintwindow.hxx" //------------------------------------------------------------------------ diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index d7f16cd15d3c..71e48ff06cb0 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -63,8 +63,8 @@ #include "svx/framelink.hxx" #include "svx/sdr/table/tabledesign.hxx" #include "svx/svdundo.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" #include "editeng/writingmodeitem.hxx" #include "editeng/frmdiritem.hxx" #include "svx/xflhtit.hxx" diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 4a0432c0c15f..a4ba47047efe 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -59,15 +59,15 @@ #include "svx/sdrpagewindow.hxx" #include #include -#include "sdrpaintwindow.hxx" +#include "svx/sdrpaintwindow.hxx" #include #include #include "cell.hxx" #include #include #include "editeng/bolnitem.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" #include "svx/svdpage.hxx" #include "tableundo.hxx" #include "tablelayouter.hxx" diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx index 33833f8b81b1..46df8c681db5 100644 --- a/svx/source/table/tablehandles.cxx +++ b/svx/source/table/tablehandles.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 5e13bce7101e..7f855752dcf2 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -44,8 +44,8 @@ #include "editeng/borderline.hxx" #include "editeng/boxitem.hxx" #include "svx/svdmodel.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" using ::rtl::OUString; using ::com::sun::star::awt::XLayoutConstrains; diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index 1c8d0aa60dc8..b62d1187e14c 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -46,8 +46,8 @@ #include "tableundo.hxx" #include "svx/svdotable.hxx" #include "svx/svdmodel.hxx" -#include "svdstr.hrc" -#include "svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/svdglob.hxx" //#define PLEASE_DEBUG_THE_TABLES 1 diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index bf3612e55250..260a2e2e646c 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -40,12 +40,12 @@ #include #include -#include "drawitem.hxx" +#include "svx/drawitem.hxx" #include -#include "xattr.hxx" +#include "svx/xattr.hxx" #include #include -#include "xexch.hxx" +#include "svx/xexch.hxx" #include SFX_IMPL_DOCKINGWINDOW( SvxColorChildWindow, SID_COLOR_CONTROL ) diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index a4cab5f3ef16..45a53ee7758a 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -42,7 +42,7 @@ #include #include #include -#include "chrtitem.hxx" +#include "svx/chrtitem.hxx" #include #include @@ -50,7 +50,7 @@ #include #include -#include "extrusioncontrols.hxx" +#include "svx/extrusioncontrols.hxx" #include "extrusioncontrols.hrc" #include #include "toolbarmenu.hxx" diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 31c77e221d62..5b740dbef004 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -44,8 +44,8 @@ #define TMP_STR_BEGIN '[' #define TMP_STR_END ']' -#include "drawitem.hxx" -#include "xattr.hxx" +#include "svx/drawitem.hxx" +#include "svx/xattr.hxx" #include #include #include diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 1b4f89ca1e8c..c1dd5443e610 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -32,12 +32,12 @@ #include #include #include -#include +#include #include #include #include -#include "gallery.hxx" +#include "svx/gallery.hxx" #include #include #include @@ -46,7 +46,7 @@ #include #include "toolbarmenu.hxx" -#include "fontworkgallery.hxx" +#include "svx/fontworkgallery.hxx" #include "fontworkgallery.hrc" #include diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx index 0333cc62a374..45e76f8ae6e9 100644 --- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx +++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "formatpaintbrushctrl.hxx" +#include "svx/formatpaintbrushctrl.hxx" // header for class SfxBoolItem #include diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index fa5ddd579dee..5fb37a5fe319 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -64,8 +64,8 @@ #include #include #include -#include "grafctrl.hxx" -#include "tbxcolor.hxx" +#include "svx/grafctrl.hxx" +#include "svx/tbxcolor.hxx" // namespaces using ::rtl::OUString; diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 9415ddaf1814..26b5a508491e 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -49,11 +49,11 @@ #include #include #include -#include "drawitem.hxx" +#include "svx/drawitem.hxx" #include -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include -#include "linectrl.hxx" +#include "svx/linectrl.hxx" #include #include "linectrl.hrc" diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index 139506028292..04e7e3dc543a 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -40,7 +40,7 @@ #include #include -#include "layctrl.hxx" +#include "svx/layctrl.hxx" #include #include #include diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 6d05c8bdb946..4fe822f94955 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -46,7 +46,7 @@ #include #include #include -#include +#include #ifndef _VCL_MNEMONIC_HXX_ #include #endif diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index 6deab3eca30b..0b7e6fe7182b 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -42,10 +42,10 @@ #include #include "helpid.hrc" -#include "drawitem.hxx" -#include "xattr.hxx" +#include "svx/drawitem.hxx" +#include "svx/xattr.hxx" #include -#include "linectrl.hxx" +#include "svx/linectrl.hxx" #include #include diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 5c99e84e6a47..8e100c083814 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -72,7 +72,7 @@ #include #include #include "helpid.hrc" -#include "htmlmode.hxx" +#include "svx/htmlmode.hxx" #include #include "editeng/fontitem.hxx" #include @@ -81,9 +81,9 @@ #include #include "editeng/flstitem.hxx" #include "editeng/bolnitem.hxx" -#include "drawitem.hxx" +#include "svx/drawitem.hxx" #include -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include #include "colorwindow.hxx" #include diff --git a/svx/source/tbxctrls/tbxalign.cxx b/svx/source/tbxctrls/tbxalign.cxx index 3d9d6881eec7..e0bcd03b62fc 100644 --- a/svx/source/tbxctrls/tbxalign.cxx +++ b/svx/source/tbxctrls/tbxalign.cxx @@ -32,8 +32,8 @@ #include #include -#include "tbxalign.hxx" -#include "tbxdraw.hxx" +#include "svx/tbxalign.hxx" +#include "svx/tbxdraw.hxx" #include "tbxdraw.hrc" #include #ifndef _SFX_IMAGEMGR_HXX diff --git a/svx/source/tbxctrls/tbxcolor.cxx b/svx/source/tbxctrls/tbxcolor.cxx index 57d791f1babd..83b48b9e57b7 100644 --- a/svx/source/tbxctrls/tbxcolor.cxx +++ b/svx/source/tbxctrls/tbxcolor.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "tbxcolor.hxx" +#include "svx/tbxcolor.hxx" #include #include diff --git a/svx/source/tbxctrls/tbxdrctl.cxx b/svx/source/tbxctrls/tbxdrctl.cxx index 5160c78ead27..34969ca00bc2 100644 --- a/svx/source/tbxctrls/tbxdrctl.cxx +++ b/svx/source/tbxctrls/tbxdrctl.cxx @@ -42,9 +42,9 @@ #include #include -#include "tbxctl.hxx" -#include "tbxdraw.hxx" -#include "tbxcolor.hxx" +#include "svx/tbxctl.hxx" +#include "svx/tbxdraw.hxx" +#include "svx/tbxcolor.hxx" #include "tbxdraw.hrc" #include diff --git a/svx/source/tbxctrls/verttexttbxctrl.cxx b/svx/source/tbxctrls/verttexttbxctrl.cxx index 579fe9f511cf..14ffdc778361 100644 --- a/svx/source/tbxctrls/verttexttbxctrl.cxx +++ b/svx/source/tbxctrls/verttexttbxctrl.cxx @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx index daf1f23d4442..cf1c7dd50e3e 100644 --- a/svx/source/toolbars/extrusionbar.cxx +++ b/svx/source/toolbars/extrusionbar.cxx @@ -50,10 +50,10 @@ #endif #include #include -#include "chrtitem.hxx" +#include "svx/chrtitem.hxx" #include -#include "extrusioncontrols.hxx" +#include "svx/extrusioncontrols.hxx" using namespace ::svx; using namespace ::rtl; diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index 777aead3fa1a..49a4f62609a9 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -32,7 +32,7 @@ #include #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include #include @@ -48,11 +48,11 @@ #include #include #include -#include +#include #include #include -#include "fontworkgallery.hxx" +#include "svx/fontworkgallery.hxx" using ::rtl::OUString; @@ -349,7 +349,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem } } -#include "gallery.hxx" +#include "svx/gallery.hxx" #include #include #include diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index b80be1076b7e..a2cb2fa29ca4 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -65,9 +65,9 @@ #include #include #include -#include "xoutbmp.hxx" +#include "svx/xoutbmp.hxx" #include "svtools/filter.hxx" -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include #include diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx index a802af33fbbd..e2f508ff224a 100644 --- a/svx/source/unodraw/UnoNameItemTable.cxx +++ b/svx/source/unodraw/UnoNameItemTable.cxx @@ -39,7 +39,7 @@ #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" using namespace ::com::sun::star; using namespace ::rtl; diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx index 5c7ad5226aff..0a26b0291890 100644 --- a/svx/source/unodraw/UnoNamespaceMap.cxx +++ b/svx/source/unodraw/UnoNamespaceMap.cxx @@ -30,7 +30,7 @@ #include -#include "UnoNamespaceMap.hxx" +#include "svx/UnoNamespaceMap.hxx" #include #include @@ -41,7 +41,7 @@ #include #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include "editeng/xmlcnitm.hxx" diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index 6f69b1405d0e..617d1737a482 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "XPropertyTable.hxx" +#include "svx/XPropertyTable.hxx" #include #include #include @@ -42,7 +42,7 @@ #include "unopolyhelper.hxx" #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include diff --git a/svx/source/unodraw/unobtabl.cxx b/svx/source/unodraw/unobtabl.cxx index 70576f4fab95..793e9a6d858b 100644 --- a/svx/source/unodraw/unobtabl.cxx +++ b/svx/source/unodraw/unobtabl.cxx @@ -36,10 +36,10 @@ #include #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include -#include "unofill.hxx" +#include "svx/unofill.hxx" #include using namespace ::com::sun::star; diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 5dd4814c6ab5..31e8dbc49c35 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -35,9 +35,9 @@ #include "../customshapes/EnhancedCustomShapeEngine.hxx" #include -#include "unoshcol.hxx" +#include "svx/unoshcol.hxx" #include "recoveryui.hxx" -#include "xmlgrhlp.hxx" +#include "svx/xmlgrhlp.hxx" #include "tbunocontroller.hxx" using namespace ::com::sun::star; diff --git a/svx/source/unodraw/unodtabl.cxx b/svx/source/unodraw/unodtabl.cxx index 19663ab08ade..9c7637c4d5a9 100644 --- a/svx/source/unodraw/unodtabl.cxx +++ b/svx/source/unodraw/unodtabl.cxx @@ -38,7 +38,7 @@ #include #include -#include "unofill.hxx" +#include "svx/unofill.hxx" using namespace ::com::sun::star; using namespace ::rtl; diff --git a/svx/source/unodraw/unogtabl.cxx b/svx/source/unodraw/unogtabl.cxx index 3cd4b13ac38e..bbb575a06410 100644 --- a/svx/source/unodraw/unogtabl.cxx +++ b/svx/source/unodraw/unogtabl.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "unofill.hxx" +#include "svx/unofill.hxx" #include using namespace ::com::sun::star; diff --git a/svx/source/unodraw/unohtabl.cxx b/svx/source/unodraw/unohtabl.cxx index b774afe5c7ad..64fbdae052a0 100644 --- a/svx/source/unodraw/unohtabl.cxx +++ b/svx/source/unodraw/unohtabl.cxx @@ -37,7 +37,7 @@ #include #include #include -#include "unofill.hxx" +#include "svx/unofill.hxx" using namespace ::com::sun::star; using namespace ::rtl; diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index a10d097981f5..195411b1e944 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -41,17 +41,17 @@ #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx index dbb7269c1318..297acff8d382 100644 --- a/svx/source/unodraw/unomtabl.cxx +++ b/svx/source/unodraw/unomtabl.cxx @@ -50,9 +50,9 @@ #include -#include "unofill.hxx" +#include "svx/unofill.hxx" -#include "unoapi.hxx" +#include "svx/unoapi.hxx" using namespace ::com::sun::star; using namespace ::rtl; diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 9fea6a6fda5d..294d621b8ff8 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -49,11 +49,11 @@ #include #include #include "shapeimpl.hxx" -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include #include diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 8c2d7ecde19a..17c32389e311 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -36,7 +36,7 @@ #include #include #include -#include "unopool.hxx" +#include "svx/unopool.hxx" #include #include #include @@ -48,7 +48,7 @@ #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include using namespace ::com::sun::star; diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 9a9717b34495..b682d19dd1af 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -45,11 +45,11 @@ #include #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 1f2d4fd3145b..cc608c8d9dcb 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -65,7 +65,7 @@ #include "unopolyhelper.hxx" // #i29181# -#include "svdviter.hxx" +#include "svx/svdviter.hxx" #include #include #include diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index 92d1706d4e6a..fd8f9dd1d2d9 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -45,7 +45,7 @@ #include #include #include -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include #include #include @@ -324,7 +324,7 @@ static void ConvertObjectToHomogenMatric( E3dObject* pObject, Any& rValue ) } //---------------------------------------------------------------------- -#include +#include struct ImpRememberTransAndRect { diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index cf3bdc6621f0..5085dd72fe57 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -60,11 +60,11 @@ #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include "svx/svdpagv.hxx" #include "svx/svdview.hxx" -#include "svdglob.hxx" -#include "svdstr.hrc" +#include "svx/svdglob.hxx" +#include "svx/svdstr.hrc" /////////////////////////////////////////////////////////////////////// diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 1e79962736aa..99a378f0ceb4 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -61,7 +61,7 @@ #include "svx/svdogrp.hxx" #include "svx/scene3d.hxx" #include "svx/svdmodel.hxx" -#include "globl3d.hxx" +#include "svx/globl3d.hxx" #include "svx/fmglob.hxx" #include "svx/unopage.hxx" #include "svx/view3d.hxx" @@ -72,7 +72,7 @@ #include "svx/unoshprp.hxx" #include "svx/sxciaitm.hxx" // todo: remove #include "svx/svdograf.hxx" -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include "svx/svdomeas.hxx" #include "svx/svdpagv.hxx" #include "svx/svdpool.hxx" @@ -90,9 +90,9 @@ #include "svx/xlnedit.hxx" #include "svx/xlnstit.hxx" #include "svx/xlndsit.hxx" -#include "svdglob.hxx" -#include "svdstr.hrc" -#include "unomaster.hxx" +#include "svx/svdglob.hxx" +#include "svx/svdstr.hrc" +#include "svx/unomaster.hxx" #include #include #include diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 3b45753175e6..f42e06cd8619 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include -#include "unoshcol.hxx" +#include "svx/unoshcol.hxx" #include #include diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 05551414507c..04770faf694b 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -55,7 +55,7 @@ #include #include #include -#include +#include using namespace ::osl; using namespace ::vos; diff --git a/svx/source/unodraw/unottabl.cxx b/svx/source/unodraw/unottabl.cxx index 58dcbc39d03c..46a84bf52fad 100644 --- a/svx/source/unodraw/unottabl.cxx +++ b/svx/source/unodraw/unottabl.cxx @@ -35,7 +35,7 @@ #include #include -#include "unofill.hxx" +#include "svx/unofill.hxx" #include #include "UnoNameItemTable.hxx" diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index 53bd6b99e5fc..ac90eb5ee362 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -30,7 +30,7 @@ #include "unogalitem.hxx" #include "unogaltheme.hxx" -#include "galtheme.hxx" +#include "svx/galtheme.hxx" #include "svx/galmisc.hxx" #include #include diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx index e2596eba84ec..1145be7e3f5e 100644 --- a/svx/source/unogallery/unogaltheme.cxx +++ b/svx/source/unogallery/unogaltheme.cxx @@ -32,7 +32,7 @@ #include "unogaltheme.hxx" #include "unogalitem.hxx" -#include "galtheme.hxx" +#include "svx/galtheme.hxx" #include "svx/gallery1.hxx" #include "svx/galmisc.hxx" #include diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index ff161c0a1b2b..fdeda1dd726b 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -56,7 +56,7 @@ #include #endif #include -#include "xmleohlp.hxx" +#include "svx/xmleohlp.hxx" // ----------- // - Defines - diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx index 55a80ec40d89..c3b5bc5e55d0 100644 --- a/svx/source/xml/xmlexport.cxx +++ b/svx/source/xml/xmlexport.cxx @@ -44,8 +44,8 @@ #include #include #include -#include -#include +#include +#include #include diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index bda709dc4abd..a3495d40b2d8 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -47,7 +47,7 @@ #include #include "svtools/filter.hxx" -#include "xmlgrhlp.hxx" +#include "svx/xmlgrhlp.hxx" #include diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index 58860317040c..b04b083f486b 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -54,7 +54,7 @@ #include #include #include -#include "xmlgrhlp.hxx" +#include "svx/xmlgrhlp.hxx" #include "xmlxtexp.hxx" diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index 58cf00441520..c2071d4bd252 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -60,7 +60,7 @@ #include "xmloff/ImageStyle.hxx" #include "xmloff/MarkerStyle.hxx" #include -#include "xmlgrhlp.hxx" +#include "svx/xmlgrhlp.hxx" #include "xmloff/attrlist.hxx" #include "xmlxtimp.hxx" diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 1f9bec471c8f..6b3419c7b04e 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -38,7 +38,7 @@ #include #include #include -#include "xoutbmp.hxx" +#include "svx/xoutbmp.hxx" #include #include diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index a301e47e5c25..2de5f4a19e67 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -44,15 +44,15 @@ #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include "unopolyhelper.hxx" #include #include #include -#include "svdstr.hrc" -#include "xattr.hxx" +#include "svx/svdstr.hrc" +#include "svx/xattr.hxx" #include #include #include diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index ea91bc120201..0c8fc3e9cbec 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -35,7 +35,7 @@ #include #include -#include "xattr.hxx" +#include "svx/xattr.hxx" #include #include #include diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index 486602e28256..57c894e00475 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -38,13 +38,13 @@ #include #include -#include "xattr.hxx" +#include "svx/xattr.hxx" #include #include #include #include -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include #include diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx index eec20c0fe80c..8b658918069a 100644 --- a/svx/source/xoutdev/xexch.cxx +++ b/svx/source/xoutdev/xexch.cxx @@ -43,7 +43,7 @@ #endif #include #include -#include "xexch.hxx" +#include "svx/xexch.hxx" TYPEINIT1_AUTOFACTORY( XFillExchangeData, SvDataCopyStream ); diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx index 47dda35245a4..3d377c88fa4d 100644 --- a/svx/source/xoutdev/xpool.cxx +++ b/svx/source/xoutdev/xpool.cxx @@ -29,7 +29,7 @@ #include "precompiled_svx.hxx" #include -#include "xattr.hxx" +#include "svx/xattr.hxx" #include #include #include diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx index b4a426b0cf11..d61c339f762d 100644 --- a/svx/source/xoutdev/xtabbtmp.cxx +++ b/svx/source/xoutdev/xtabbtmp.cxx @@ -31,7 +31,7 @@ #ifndef SVX_LIGHT #include -#include "XPropertyTable.hxx" +#include "svx/XPropertyTable.hxx" #include #include "xmlxtexp.hxx" diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx index 853d397010b7..2b3ac7ab850b 100644 --- a/svx/source/xoutdev/xtabcolr.cxx +++ b/svx/source/xoutdev/xtabcolr.cxx @@ -31,7 +31,7 @@ #ifndef SVX_LIGHT #include -#include "XPropertyTable.hxx" +#include "svx/XPropertyTable.hxx" #include #include diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx index 88cec422f49a..3455ed4d3588 100644 --- a/svx/source/xoutdev/xtabdash.cxx +++ b/svx/source/xoutdev/xtabdash.cxx @@ -33,7 +33,7 @@ #ifndef SVX_LIGHT #include -#include "XPropertyTable.hxx" +#include "svx/XPropertyTable.hxx" #include #include "xmlxtexp.hxx" diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx index 2a64d4b8855a..3a9f24c6d15a 100644 --- a/svx/source/xoutdev/xtabgrdt.cxx +++ b/svx/source/xoutdev/xtabgrdt.cxx @@ -33,7 +33,7 @@ #ifndef SVX_LIGHT #include -#include "XPropertyTable.hxx" +#include "svx/XPropertyTable.hxx" #include #include "xmlxtexp.hxx" diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx index 703b2db16b1f..ef5beece8dc8 100644 --- a/svx/source/xoutdev/xtabhtch.cxx +++ b/svx/source/xoutdev/xtabhtch.cxx @@ -33,7 +33,7 @@ #ifndef SVX_LIGHT #include -#include "XPropertyTable.hxx" +#include "svx/XPropertyTable.hxx" #include #include @@ -50,7 +50,7 @@ #include #include #include -#include "dlgutil.hxx" +#include "svx/dlgutil.hxx" #include #include #include diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx index 54d359506f77..ac5dcc739e41 100644 --- a/svx/source/xoutdev/xtablend.cxx +++ b/svx/source/xoutdev/xtablend.cxx @@ -33,7 +33,7 @@ #ifndef SVX_LIGHT #include -#include "XPropertyTable.hxx" +#include "svx/XPropertyTable.hxx" #include #include "xmlxtexp.hxx" From 052075d834318a920a49f134b5fb1d8e2b7187a4 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 20 Apr 2010 16:07:09 +0200 Subject: [PATCH 014/279] gnumake2: fix build breakers in framework --- framework/inc/framework/imagesconfiguration.hxx | 2 +- framework/inc/framework/menuextensionsupplier.hxx | 2 +- framework/inc/threadhelp/lockhelper.hxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/inc/framework/imagesconfiguration.hxx b/framework/inc/framework/imagesconfiguration.hxx index 91efb1034762..0771e2d8f7f1 100644 --- a/framework/inc/framework/imagesconfiguration.hxx +++ b/framework/inc/framework/imagesconfiguration.hxx @@ -44,7 +44,7 @@ namespace framework { -enum FWE_DLLPUBLIC ImageMaskMode +enum ImageMaskMode { ImageMaskMode_Color, ImageMaskMode_Bitmap diff --git a/framework/inc/framework/menuextensionsupplier.hxx b/framework/inc/framework/menuextensionsupplier.hxx index 9f34f1dd7327..f6ca60d4fecc 100644 --- a/framework/inc/framework/menuextensionsupplier.hxx +++ b/framework/inc/framework/menuextensionsupplier.hxx @@ -29,7 +29,7 @@ #define __FRAMEWORK_CLASSES_MENUEXTENSIONSUPPLIER_HXX_ #include -#include +#include struct FWE_DLLPUBLIC MenuExtensionItem { diff --git a/framework/inc/threadhelp/lockhelper.hxx b/framework/inc/threadhelp/lockhelper.hxx index 8604477c88b6..d6ebae6d4b9c 100644 --- a/framework/inc/threadhelp/lockhelper.hxx +++ b/framework/inc/threadhelp/lockhelper.hxx @@ -64,7 +64,7 @@ namespace framework{ of your implementation - because base classes are initialized by his order and before your member! Thats why ist a good place to declare your thread help member so. *//*-*************************************************************************************************************/ -enum FWI_DLLPUBLIC ELockType +enum ELockType { E_NOTHING = 0 , E_OWNMUTEX = 1 , From ac3e6ba88ce30aa281d5b10ce92a39ae80b56c2c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 20 Apr 2010 16:18:33 +0200 Subject: [PATCH 015/279] gnumake2: fix framework d.lst --- framework/prj/d.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/prj/d.lst b/framework/prj/d.lst index 1afa9dd09637..cffe72a703d6 100644 --- a/framework/prj/d.lst +++ b/framework/prj/d.lst @@ -27,8 +27,8 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar ..\%__SRC%\lib\ifwe.lib %_DEST%\lib%_EXT%\ifwe.lib ..\%__SRC%\lib\ifwi.lib %_DEST%\lib%_EXT%\ifwi.lib -..\inc\framework/*.h %_DEST%\inc%_EXT%\*.h -..\inc\framework/*.hxx %_DEST%\inc%_EXT%\*.hxx +..\inc\framework/*.h %_DEST%\inc%_EXT%\framework\*.h +..\inc\framework/*.hxx %_DEST%\inc%_EXT%\framework\*.hxx ..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml ..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml From 574e8413cadcc90c0c7894d9b14980133a0622fe Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 20 Apr 2010 18:47:56 +0200 Subject: [PATCH 016/279] gnumake2: fix warning in fmshell.cxx --- svx/source/form/fmshell.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 828791a3d035..faaddc71acab 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -285,7 +285,7 @@ void FmFormShell::NotifyMarkListChanged(FmFormView* pWhichView) } //------------------------------------------------------------------------ -sal_uInt16 FmFormShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing) +sal_uInt16 FmFormShell::PrepareClose(sal_Bool bUI, sal_Bool /*bForBrowsing*/) { if ( GetImpl()->didPrepareClose() ) // we already did a PrepareClose for the current modifications of the current form From 9bc2851f0eefd96d06385410c4a0a7ed419acb0d Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 21 Apr 2010 14:09:27 +0200 Subject: [PATCH 017/279] CWS gnumake2: various fixes after merging with DEV300_m76 --- framework/prj/build.lst | 34 +--------- framework/prj/d.lst | 56 ---------------- sfx2/prj/build.lst | 23 +------ sfx2/prj/d.lst | 31 --------- sfx2/prj/target_lib_sfx2.mk | 31 ++++----- sfx2/prj/target_module_sfx2.mk | 5 ++ sfx2/prj/target_package_inc.mk | 101 ++++++++++++++--------------- sfx2/prj/target_package_sdi.mk | 30 +++++++++ xmloff/prj/build.lst | 16 +---- xmloff/prj/d.lst | 53 --------------- xmloff/prj/target_module_xmloff.mk | 2 + xmloff/prj/target_package_dtd.mk | 45 +++++++++++++ xmloff/prj/target_package_inc.mk | 4 +- 13 files changed, 156 insertions(+), 275 deletions(-) create mode 100644 sfx2/prj/target_package_sdi.mk create mode 100644 xmloff/prj/target_package_dtd.mk diff --git a/framework/prj/build.lst b/framework/prj/build.lst index 12e597204710..3591f5b29a63 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,31 +1,3 @@ -fr framework : l10n svtools NULL -fr framework usr1 - all fr_mkout NULL -fr framework\inc nmake - all fr_inc NULL -fr framework\source\accelerators nmake - all fr_accelerators fr_threadhelp fr_inc NULL -fr framework\source\classes nmake - all fr_classes fr_threadhelp fr_constant fr_inc NULL -fr framework\source\constant nmake - all fr_constant fr_inc NULL -fr framework\source\dispatch nmake - all fr_dispatch fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\classes nmake - all fr_fweclasses fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\dispatch nmake - all fr_fwedispatch fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\helper nmake - all fr_fwehelper fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\interaction nmake - all fr_fweinteraction fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\xml nmake - all fr_fwexml fr_threadhelp fr_inc NULL -fr framework\source\fwi\classes nmake - all fr_fwiclasses fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwi\helper nmake - all fr_fwihelper fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwi\jobs nmake - all fr_fwijobs fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwi\threadhelp nmake - all fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwi\uielement nmake - all fr_fwiuielement fr_threadhelp fr_inc NULL -fr framework\source\helper nmake - all fr_helper fr_threadhelp fr_constant fr_inc NULL -fr framework\source\interaction nmake - all fr_interaction fr_threadhelp fr_constant fr_inc NULL -fr framework\source\jobs nmake - all fr_jobs fr_threadhelp fr_constant fr_inc NULL -fr framework\source\layoutmanager nmake - all fr_layoutmanager fr_threadhelp fr_inc NULL -fr framework\source\loadenv nmake - all fr_loadenv fr_threadhelp fr_constant fr_inc NULL -fr framework\source\recording nmake - all fr_recording fr_threadhelp fr_constant fr_inc NULL -fr framework\source\register nmake - all fr_register fr_threadhelp fr_constant fr_inc NULL -fr framework\source\services nmake - all fr_services fr_threadhelp fr_constant fr_inc NULL -fr framework\source\tabwin nmake - all fr_tabwin fr_threadhelp fr_inc NULL -fr framework\source\uiconfiguration nmake - all fr_uiconfiguration fr_threadhelp fr_inc NULL -fr framework\source\uielement nmake - all fr_uielement fr_threadhelp fr_inc NULL -fr framework\source\uifactory nmake - all fr_uifactory fr_threadhelp fr_inc NULL -fr framework\source\xml nmake - all fr_xml fr_threadhelp fr_inc NULL -fr framework\util nmake - all fr_util fr_constant fr_threadhelp fr_classes fr_loadenv fr_jobs fr_interaction fr_helper fr_dispatch fr_services fr_register fr_recording fr_layoutmanager fr_uielement fr_uifactory fr_xml fr_uiconfiguration fr_accelerators fr_tabwin fr_fweclasses fr_fwedispatch fr_fwehelper fr_fweinteraction fr_fwexml fr_fwiclasses fr_fwihelper fr_fwijobs fr_fwiuielement NULL +fr framework : l10n svtools NULL +fr framework usr1 - all fr_mkout NULL +fr framework\prj nmake - all fr_all NULL diff --git a/framework/prj/d.lst b/framework/prj/d.lst index bf17da0a7164..8b137891791f 100644 --- a/framework/prj/d.lst +++ b/framework/prj/d.lst @@ -1,57 +1 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %_DEST%\inc%_EXT%\framework -mkdir: %_DEST%\xml%_EXT%\uiconfig -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator\en-US -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\*.exe %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\login %_DEST%\bin%_EXT%\login.bin -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__SRC%\lib\lib*.dylib %_DEST%\lib%_EXT% - -..\dtd\menubar.dtd %_DEST%\bin%_EXT%\menubar.dtd -..\dtd\toolbar.dtd %_DEST%\bin%_EXT%\toolbar.dtd -..\dtd\statusbar.dtd %_DEST%\bin%_EXT%\statusbar.dtd -..\dtd\event.dtd %_DEST%\bin%_EXT%\event.dtd -..\dtd\accelerator.dtd %_DEST%\bin%_EXT%\accelerator.dtd -..\dtd\image.dtd %_DEST%\bin%_EXT%\image.dtd -..\dtd\groupuinames.dtd %_DEST%\bin%_EXT%\groupuinames.dtd - -..\%__SRC%\lib\ifwe.lib %_DEST%\lib%_EXT%\ifwe.lib -..\%__SRC%\lib\ifwi.lib %_DEST%\lib%_EXT%\ifwi.lib -..\inc\fwedllapi.h %_DEST%\inc%_EXT%\fwedllapi.h -..\inc\fwidllapi.h %_DEST%\inc%_EXT%\fwidllapi.h -..\inc\fwkdllapi.h %_DEST%\inc%_EXT%\fwkdllapi.h -..\inc\helper\imageproducer.hxx %_DEST%\inc%_EXT%\framework\imageproducer.hxx -..\inc\helper\acceleratorinfo.hxx %_DEST%\inc%_EXT%\framework\acceleratorinfo.hxx -..\inc\helper\actiontriggerhelper.hxx %_DEST%\inc%_EXT%\framework\actiontriggerhelper.hxx -..\inc\xml\menuconfiguration.hxx %_DEST%\inc%_EXT%\framework\menuconfiguration.hxx -..\inc\classes\bmkmenu.hxx %_DEST%\inc%_EXT%\framework\bmkmenu.hxx -..\inc\xml\toolboxconfiguration.hxx %_DEST%\inc%_EXT%\framework\toolboxconfiguration.hxx -..\inc\xml\statusbarconfiguration.hxx %_DEST%\inc%_EXT%\framework\statusbarconfiguration.hxx -..\inc\xml\eventsconfiguration.hxx %_DEST%\inc%_EXT%\framework\eventsconfiguration.hxx -..\inc\xml\imagesconfiguration.hxx %_DEST%\inc%_EXT%\framework\imagesconfiguration.hxx -..\inc\classes\addonsoptions.hxx %_DEST%\inc%_EXT%\framework\addonsoptions.hxx -..\inc\dispatch\interaction.hxx %_DEST%\inc%_EXT%\framework\interaction.hxx -..\inc\classes\addonmenu.hxx %_DEST%\inc%_EXT%\framework\addonmenu.hxx -..\inc\classes\sfxhelperfunctions.hxx %_DEST%\inc%_EXT%\framework\sfxhelperfunctions.hxx -..\inc\helper\configimporter.hxx %_DEST%\inc%_EXT%\framework\configimporter.hxx -..\inc\classes\menuextensionsupplier.hxx %_DEST%\inc%_EXT%\framework\menuextensionsupplier.hxx -..\inc\interaction\preventduplicateinteraction.hxx %_DEST%\inc%_EXT%\framework\preventduplicateinteraction.hxx -..\inc\helper\titlehelper.hxx %_DEST%\inc%_EXT%\framework\titlehelper.hxx - -..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml -..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml -..\uiconfig\startmodule\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator\en-US\*.xml -..\uiconfig\startmodule\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar\*.xml - -..\source\unotypes\fw?.xml %_DEST%\xml%_EXT%\*.xml diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index 89e618e8fc12..7dc2a95cb994 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -1,23 +1,4 @@ sf sfx2 : l10n idl basic xmlscript framework shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL sf sfx2 usr1 - all sf_mkout NULL -sf sfx2\inc nmake - all sf_inc NULL -sf sfx2\prj get - all sf_prj NULL -sf sfx2\win\res get - all sf_wres NULL -sf sfx2\mac\res get - all sf_mres NULL -sf sfx2\source\inc get - all sf_sinc NULL -sf sfx2\sdi nmake - all sf_sdi NULL -sf sfx2\source\appl nmake - all sf_appl sf_sdi sf_inc NULL -sf sfx2\source\view nmake - all sf_view sf_sdi sf_inc NULL -sf sfx2\source\bastyp nmake - all sf_bast sf_sdi sf_inc NULL -sf sfx2\source\config nmake - all sf_cnfg sf_sdi sf_inc NULL -sf sfx2\source\control nmake - all sf_ctrl sf_sdi sf_inc NULL -sf sfx2\source\dialog nmake - all sf_dlg sf_sdi sf_inc NULL -sf sfx2\source\doc nmake - all sf_doc sf_sdi sf_inc NULL -sf sfx2\source\layout nmake - all sf_layout sf_sdi sf_inc NULL -sf sfx2\source\menu nmake - all sf_menu sf_sdi sf_inc NULL -sf sfx2\source\notify nmake - all sf_noti sf_sdi sf_inc NULL -sf sfx2\source\statbar nmake - all sf_sbar sf_sdi sf_inc NULL -sf sfx2\source\toolbox nmake - all sf_tbox sf_sdi sf_inc NULL -sf sfx2\source\inet nmake - all sf_inet sf_sdi sf_inc NULL -sf sfx2\source\explorer nmake - all sf_expl sf_sdi sf_inc NULL -sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL +sf sfx2\prj nmake - all sf_prj NULL + diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst index 2b956707606a..8b137891791f 100644 --- a/sfx2/prj/d.lst +++ b/sfx2/prj/d.lst @@ -1,32 +1 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %COMMON_DEST%\res%_EXT% -mkdir: %_DEST%\inc%_EXT%\sfx2 - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\lib\sfx.lib %_DEST%\lib%_EXT%\sfx.lib -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\slb\sfx.lib %_DEST%\lib%_EXT%\xsfx.lib -..\%__SRC%\lib\isfx.lib %_DEST%\lib%_EXT%\isfx.lib -..\%__SRC%\lib\debug.lib %_DEST%\lib%_EXT%\sfxdebug.lib -..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym -..\%__SRC%\bin\sfx?????.dll %_DEST%\bin%_EXT%\sfx?????.dll -..\%__SRC%\bin\sfx*.res %_DEST%\bin%_EXT%\sfx*.res -..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym -..\%__SRC%\misc\sfx?????.map %_DEST%\bin%_EXT%\sfx?????.map -..\%__SRC%\bin\elc?????.dll %_DEST%\bin%_EXT%\elc?????.dll -..\%__SRC%\srs\sfx.srs %_DEST%\res%_EXT%\sfx.srs -..\%COMMON_OUTDIR%\srs\sfx_srs.hid %COMMON_DEST%\res%_EXT%\sfx_srs.hid -..\%__SRC%\srs\sfxslots.srs %_DEST%\res%_EXT%\sfxslots.srs -..\%COMMON_OUTDIR%\srs\sfxslots_srs.hid %COMMON_DEST%\res%_EXT%\sfxslots_srs.hid -..\util\sfx.xml %_DEST%\xml%_EXT%\sfx.xml -..\%__SRC%\misc\sfx2.csv %_DEST%\inc%_EXT%\sfx2.csv - -..\inc\sfx2\*.h %_DEST%\inc%_EXT%\sfx2\*.h -..\inc\sfx2\*.hxx %_DEST%\inc%_EXT%\sfx2\*.hxx -..\inc\sfx2\*.hrc %_DEST%\inc%_EXT%\sfx2\*.hrc - -..\sdi\sfx.sdi %_DEST%\inc%_EXT%\sfx2\sfx.sdi -..\sdi\sfxitems.sdi %_DEST%\inc%_EXT%\sfx2\sfxitems.sdi diff --git a/sfx2/prj/target_lib_sfx2.mk b/sfx2/prj/target_lib_sfx2.mk index c08f563d2827..9d39fd1c0d50 100644 --- a/sfx2/prj/target_lib_sfx2.mk +++ b/sfx2/prj/target_lib_sfx2.mk @@ -28,6 +28,7 @@ $(eval $(call gb_Library_Library,sfx)) $(call gb_Library_get_headers_target,sfx) : $(call gb_SdiTarget_get_target,sfx2/sdi/sfxslots) +$(call gb_SdiTarget_get_target,sfx2/sdi/sfxslots) :| $(call gb_Library_get_external_headers_target,sfx) $(call gb_Library_get_clean_target,sfx) : $(call gb_SdiTarget_get_clean_target,sfx2/sdi/sfxslots) $(eval $(call gb_Library_set_include,sfx,\ @@ -59,24 +60,24 @@ endif $(eval $(call gb_Library_add_linked_libs,sfx,\ comphelper \ + cppu \ + cppuhelper \ + fwe \ i18nisolang1 \ + sal \ + sax \ sb \ sot \ + stl \ svl \ svt \ tk \ tl \ ucbhelper \ - cppu \ - cppuhelper \ - sal \ utl \ vcl \ vos3 \ - fwe \ - sax \ xml2 \ - stl \ )) $(eval $(call gb_Library_add_linked_system_libs,sfx,\ @@ -155,8 +156,8 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/dialog/about \ sfx2/source/dialog/alienwarn \ sfx2/source/dialog/basedlgs \ - sfx2/source/dialog/dinfedt \ sfx2/source/dialog/dinfdlg \ + sfx2/source/dialog/dinfedt \ sfx2/source/dialog/dockwin \ sfx2/source/dialog/filedlghelper \ sfx2/source/dialog/filtergrouping \ @@ -181,6 +182,10 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/dialog/tplcitem \ sfx2/source/dialog/tplpitem \ sfx2/source/dialog/versdlg \ + sfx2/source/doc/DocumentMetadataAccess \ + sfx2/source/doc/Metadatable \ + sfx2/source/doc/QuerySaveDocument \ + sfx2/source/doc/SfxDocumentMetaData \ sfx2/source/doc/docfac \ sfx2/source/doc/docfile \ sfx2/source/doc/docfilt \ @@ -188,17 +193,15 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/doc/docinsert \ sfx2/source/doc/docmacromode \ sfx2/source/doc/docstoragemodifylistener \ + sfx2/source/doc/doctdlg \ sfx2/source/doc/doctempl \ sfx2/source/doc/doctemplates \ sfx2/source/doc/doctemplateslocal \ - sfx2/source/doc/doctdlg \ - sfx2/source/doc/DocumentMetadataAccess \ sfx2/source/doc/docvor \ sfx2/source/doc/frmdescr \ sfx2/source/doc/graphhelp \ sfx2/source/doc/guisaveas \ sfx2/source/doc/iframe \ - sfx2/source/doc/Metadatable \ sfx2/source/doc/new \ sfx2/source/doc/objcont \ sfx2/source/doc/objembed \ @@ -213,16 +216,14 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/doc/ownsubfilterservice \ sfx2/source/doc/plugin \ sfx2/source/doc/printhelper \ - sfx2/source/doc/QuerySaveDocument \ sfx2/source/doc/querytemplate \ sfx2/source/doc/sfxacldetect \ sfx2/source/doc/sfxbasemodel \ - sfx2/source/doc/SfxDocumentMetaData \ sfx2/source/doc/sfxmodelfactory \ sfx2/source/explorer/nochaos \ sfx2/source/inet/inettbc \ - sfx2/source/menu/mnumgr \ sfx2/source/menu/mnuitem \ + sfx2/source/menu/mnumgr \ sfx2/source/menu/objmnctl \ sfx2/source/menu/virtmenu \ sfx2/source/notify/eventsupplier \ @@ -239,10 +240,10 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/view/sfxbasecontroller \ sfx2/source/view/userinputinterception \ sfx2/source/view/viewfac \ - sfx2/source/view/viewprn \ - sfx2/source/view/viewsh \ sfx2/source/view/viewfrm \ sfx2/source/view/viewfrm2 \ + sfx2/source/view/viewprn \ + sfx2/source/view/viewsh \ )) $(eval $(call gb_SdiTarget_SdiTarget,sfx2/sdi/sfxslots,sfx2/sdi/sfx)) diff --git a/sfx2/prj/target_module_sfx2.mk b/sfx2/prj/target_module_sfx2.mk index d3a1996bab05..3ec4e606795f 100644 --- a/sfx2/prj/target_module_sfx2.mk +++ b/sfx2/prj/target_module_sfx2.mk @@ -28,13 +28,18 @@ $(eval $(call gb_Module_Module,sfx2,\ $(call gb_AllLangResTarget_get_target,sfx) \ $(call gb_Library_get_target,sfx) \ + $(call gb_Package_get_target,sfx2_inc) \ + $(call gb_Package_get_target,sfx2_sdi) \ )) +# $(call gb_Library_get_target,qstart) \ $(eval $(call gb_Module_read_includes,sfx2,\ lib_sfx2 \ package_inc \ + package_sdi \ res_sfx2 \ )) +# lib_qstart \ #todo: map file? #todo: source/appl ohne Optimierung? diff --git a/sfx2/prj/target_package_inc.mk b/sfx2/prj/target_package_inc.mk index aa369dde5e0b..dd836b286f8b 100644 --- a/sfx2/prj/target_package_inc.mk +++ b/sfx2/prj/target_package_inc.mk @@ -26,74 +26,100 @@ #************************************************************************* $(eval $(call gb_Package_Package,sfx2_inc,$(SRCDIR)/sfx2/inc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) - -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dllapi.h,sfx2/dllapi.h)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/appuno.hxx,sfx2/appuno.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basedlgs.hxx,sfx2/basedlgs.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basmgr.hxx,sfx2/basmgr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/bindings.hxx,sfx2/bindings.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/brokenpackageint.hxx,sfx2/brokenpackageint.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/chalign.hxx,sfx2/chalign.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/childwin.hxx,sfx2/childwin.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/cntids.hrc,sfx2/cntids.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/controlwrapper.hxx,sfx2/controlwrapper.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ctrlitem.hxx,sfx2/ctrlitem.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dispatch.hxx,sfx2/dispatch.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dialogs.hrc,sfx2/dialogs.hrc)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfdlg.hxx,sfx2/dinfdlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfedt.hxx,sfx2/dinfedt.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinf.hxx,sfx2/docinf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dispatch.hxx,sfx2/dispatch.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dllapi.h,sfx2/dllapi.h)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfac.hxx,sfx2/docfac.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfile.hxx,sfx2/docfile.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfilt.hxx,sfx2/docfilt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinf.hxx,sfx2/docinf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinsert.hxx,sfx2/docinsert.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dockwin.hxx,sfx2/dockwin.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctempl.hxx,sfx2/doctempl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docmacromode.hxx,sfx2/docmacromode.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docstoragemodifylistener.hxx,sfx2/docstoragemodifylistener.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctdlg.hxx,sfx2/doctdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctempl.hxx,sfx2/doctempl.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/event.hxx,sfx2/event.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/evntconf.hxx,sfx2/evntconf.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/filedlghelper.hxx,sfx2/filedlghelper.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/fcontnr.hxx,sfx2/fcontnr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/filedlghelper.hxx,sfx2/filedlghelper.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frame.hxx,sfx2/frame.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmdescr.hxx,sfx2/frmdescr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtml.hxx,sfx2/frmhtml.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtmlw.hxx,sfx2/frmhtmlw.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/genlink.hxx,sfx2/genlink.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/hintpost.hxx,sfx2/hintpost.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgmgr.hxx,sfx2/imgmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imagemgr.hxx,sfx2/imagemgr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgdef.hxx,sfx2/imgdef.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgmgr.hxx,sfx2/imgmgr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ipclient.hxx,sfx2/ipclient.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemconnect.hxx,sfx2/itemconnect.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemwrapper.hxx,sfx2/itemwrapper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-post.hxx,sfx2/layout-post.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-pre.hxx,sfx2/layout-pre.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-tabdlg.hxx,sfx2/layout-tabdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linkmgr.hxx,sfx2/linkmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linksrc.hxx,sfx2/linksrc.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/lnkbase.hxx,sfx2/lnkbase.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/macrconf.hxx,sfx2/macrconf.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/topfrm.hxx,sfx2/topfrm.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mailmodelapi.hxx,sfx2/mailmodelapi.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mgetempl.hxx,sfx2/mgetempl.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mieclip.hxx,sfx2/mieclip.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minarray.hxx,sfx2/minarray.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minfitem.hxx,sfx2/minfitem.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minstack.hxx,sfx2/minstack.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnuitem.hxx,sfx2/mnuitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnumgr.hxx,sfx2/mnumgr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/module.hxx,sfx2/module.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msg.hxx,sfx2/msg.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnumgr.hxx,sfx2/mnumgr.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/newstyle.hxx,sfx2/newstyle.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/new.hxx,sfx2/new.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/navigat.hxx,sfx2/navigat.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msgpool.hxx,sfx2/msgpool.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/passwd.hxx,sfx2/passwd.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/prnmon.hxx,sfx2/prnmon.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/navigat.hxx,sfx2/navigat.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/new.hxx,sfx2/new.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/newstyle.hxx,sfx2/newstyle.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objface.hxx,sfx2/objface.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objitem.hxx,sfx2/objitem.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/signaturestate.hxx,sfx2/signaturestate.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docmacromode.hxx,sfx2/docmacromode.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sfx2/userinputinterception.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docstoragemodifylistener.hxx,sfx2/docstoragemodifylistener.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxmodelfactory.hxx,sfx2/sfxmodelfactory.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objsh.hxx,sfx2/objsh.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/opengrf.hxx,sfx2/opengrf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/passwd.hxx,sfx2/passwd.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printer.hxx,sfx2/printer.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printopt.hxx,sfx2/printopt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/prnmon.hxx,sfx2/prnmon.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/progress.hxx,sfx2/progress.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/querystatus.hxx,sfx2/querystatus.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/request.hxx,sfx2/request.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfx.hrc,sfx2/sfx.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasecontroller.hxx,sfx2/sfxbasecontroller.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasemodel.hxx,sfx2/sfxbasemodel.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdefs.hxx,sfx2/sfxdefs.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdlg.hxx,sfx2/sfxdlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhelp.hxx,sfx2/sfxhelp.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhtml.hxx,sfx2/sfxhtml.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxmodelfactory.hxx,sfx2/sfxmodelfactory.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxresid.hxx,sfx2/sfxresid.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxsids.hrc,sfx2/sfxsids.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxstatuslistener.hxx,sfx2/sfxstatuslistener.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxuno.hxx,sfx2/sfxuno.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/shell.hxx,sfx2/shell.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/signaturestate.hxx,sfx2/signaturestate.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/stbitem.hxx,sfx2/stbitem.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styfitem.hxx,sfx2/styfitem.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styledlg.hxx,sfx2/styledlg.hxx)) @@ -101,42 +127,11 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tabdlg.hxx,sfx2/tabdlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tbxctrl.hxx,sfx2/tbxctrl.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templdlg.hxx,sfx2/templdlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tplpitem.hxx,sfx2/tplpitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/unoctitm.hxx,sfx2/unoctitm.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sfx2/userinputinterception.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfac.hxx,sfx2/viewfac.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfrm.hxx,sfx2/viewfrm.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewsh.hxx,sfx2/viewsh.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfac.hxx,sfx2/viewfac.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/appuno.hxx,sfx2/appuno.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxuno.hxx,sfx2/sfxuno.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasemodel.hxx,sfx2/sfxbasemodel.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasecontroller.hxx,sfx2/sfxbasecontroller.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/unoctitm.hxx,sfx2/unoctitm.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/srchitem.hxx,sfx2/srchitem.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/srchdefs.hxx,sfx2/srchdefs.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/cntids.hrc,sfx2/cntids.hrc)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basmgr.hxx,sfx2/basmgr.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imagemgr.hxx,sfx2/imagemgr.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdlg.hxx,sfx2/sfxdlg.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dialogs.hrc,sfx2/dialogs.hrc)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemwrapper.hxx,sfx2/itemwrapper.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/controlwrapper.hxx,sfx2/controlwrapper.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemconnect.hxx,sfx2/itemconnect.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/lnkbase.hxx,sfx2/lnkbase.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linkmgr.hxx,sfx2/linkmgr.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linksrc.hxx,sfx2/linksrc.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/querystatus.hxx,sfx2/querystatus.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxstatuslistener.hxx,sfx2/sfxstatuslistener.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mailmodelapi.hxx,sfx2/mailmodelapi.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinsert.hxx,sfx2/docinsert.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-tabdlg.hxx,sfx2/layout-tabdlg.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-post.hxx,sfx2/layout-post.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-pre.hxx,sfx2/layout-pre.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx)) - - - diff --git a/sfx2/prj/target_package_sdi.mk b/sfx2/prj/target_package_sdi.mk new file mode 100644 index 000000000000..63f2138adf4f --- /dev/null +++ b/sfx2/prj/target_package_sdi.mk @@ -0,0 +1,30 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,sfx2_sdi,$(SRCDIR)/sfx2/sdi)) +$(eval $(call gb_Package_add_file,sfx2_sdi,inc/sfx2/sfx.sdi,sfx.sdi)) +$(eval $(call gb_Package_add_file,sfx2_sdi,inc/sfx2/sfxitems.sdi,sfxitems.sdi)) diff --git a/xmloff/prj/build.lst b/xmloff/prj/build.lst index 8817d4590715..4dcebafb0386 100644 --- a/xmloff/prj/build.lst +++ b/xmloff/prj/build.lst @@ -1,16 +1,4 @@ xo xmloff : offapi svl vos NULL xo xmloff usr1 - all xo_mkout NULL -xo xmloff\prj get - all xo_prj NULL -xo xmloff\inc nmake - all xo_inc NULL -xo xmloff\source\core nmake - all xo_core xo_inc NULL -xo xmloff\source\meta nmake - all xo_meta xo_inc NULL -xo xmloff\source\style nmake - all xo_style xo_inc NULL -xo xmloff\source\text nmake - all xo_text xo_inc NULL -xo xmloff\source\draw nmake - all xo_draw xo_inc NULL -xo xmloff\source\chart nmake - all xo_chart xo_inc NULL -xo xmloff\source\forms nmake - all xo_forms xo_inc NULL -xo xmloff\source\script nmake - all xo_script xo_inc NULL -xo xmloff\source\transform nmake - all xo_transform xo_util xo_inc NULL -xo xmloff\source\xforms nmake - all xo_xforms xo_inc NULL -xo xmloff\source\table nmake - all xo_table xo_inc NULL -xo xmloff\util nmake - all xo_util xo_chart xo_core xo_draw xo_forms xo_meta xo_script xo_style xo_text xo_xforms xo_table NULL +xo xmloff\prj nmake - all xo_prj NULL + diff --git a/xmloff/prj/d.lst b/xmloff/prj/d.lst index 658ce7454d5b..8b137891791f 100644 --- a/xmloff/prj/d.lst +++ b/xmloff/prj/d.lst @@ -1,54 +1 @@ -mkdir: %_DEST%\inc%_EXT%\xmloff -..\%__SRC%\misc\*.map %_DEST%\bin%_EXT%\*.map -..\%__SRC%\lib\ixo.lib %_DEST%\lib%_EXT%\ixo.lib -..\%__SRC%\lib\xol.lib %_DEST%\lib%_EXT%\xol.lib -..\%__SRC%\lib\libxol.a %_DEST%\lib%_EXT%\libxol.a -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib - -..\dtd\* %_DEST%\bin%_EXT% - -..\inc\xmloff\odffields.hxx %_DEST%\inc%_EXT%\xmloff\odffields.hxx -..\inc\xmloff\dllapi.h %_DEST%\inc%_EXT%\xmloff\dllapi.h -..\inc\xmloff\attrlist.hxx %_DEST%\inc%_EXT%\xmloff\attrlist.hxx -..\inc\i18nmap.hxx %_DEST%\inc%_EXT%\xmloff\i18nmap.hxx -..\inc\unoatrcn.hxx %_DEST%\inc%_EXT%\xmloff\unoatrcn.hxx -..\inc\xmlkywd.hxx %_DEST%\inc%_EXT%\xmloff\xmlkywd.hxx -..\inc\xmlcnitm.hxx %_DEST%\inc%_EXT%\xmloff\xmlcnitm.hxx -..\inc\xmlnmspe.hxx %_DEST%\inc%_EXT%\xmloff\xmlnmspe.hxx -..\inc\xmlreg.hxx %_DEST%\inc%_EXT%\xmloff\xmlreg.hxx -..\inc\xmltabe.hxx %_DEST%\inc%_EXT%\xmloff\xmltabe.hxx -..\inc\numehelp.hxx %_DEST%\inc%_EXT%\xmloff\numehelp.hxx -..\inc\XMLTextListAutoStylePool.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextListAutoStylePool.hxx -..\inc\functional.hxx %_DEST%\inc%_EXT%\xmloff\functional.hxx -..\inc\VisAreaExport.hxx %_DEST%\inc%_EXT%\xmloff\VisAreaExport.hxx -..\inc\VisAreaContext.hxx %_DEST%\inc%_EXT%\xmloff\VisAreaContext.hxx -..\inc\DashStyle.hxx %_DEST%\inc%_EXT%\xmloff\DashStyle.hxx -..\inc\GradientStyle.hxx %_DEST%\inc%_EXT%\xmloff\GradientStyle.hxx -..\inc\MarkerStyle.hxx %_DEST%\inc%_EXT%\xmloff\MarkerStyle.hxx -..\inc\HatchStyle.hxx %_DEST%\inc%_EXT%\xmloff\HatchStyle.hxx -..\inc\ImageStyle.hxx %_DEST%\inc%_EXT%\xmloff\ImageStyle.hxx -..\source\text\XMLTextShapeImportHelper.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextShapeImportHelper.hxx -..\inc\xmloff\SettingsExportHelper.hxx %_DEST%\inc%_EXT%\xmloff\SettingsExportHelper.hxx -..\inc\xmloff\XMLSettingsExportContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLSettingsExportContext.hxx -..\inc\xmloff\DocumentSettingsContext.hxx %_DEST%\inc%_EXT%\xmloff\DocumentSettingsContext.hxx -..\inc\xmloff\XMLGraphicsDefaultStyle.hxx %_DEST%\inc%_EXT%\xmloff\XMLGraphicsDefaultStyle.hxx -..\inc\XMLEmbeddedObjectExportFilter.hxx %_DEST%\inc%_EXT%\xmloff\XMLEmbeddedObjectExportFilter.hxx -..\inc\XMLFilterServiceNames.h %_DEST%\inc%_EXT%\xmloff\XMLFilterServiceNames.h -..\inc\xmlerror.hxx %_DEST%\inc%_EXT%\xmloff\xmlerror.hxx -..\inc\xformsimport.hxx %_DEST%\inc%_EXT%\xmloff\xformsimport.hxx -..\inc\xformsexport.hxx %_DEST%\inc%_EXT%\xmloff\xformsexport.hxx -..\inc\txtimppr.hxx %_DEST%\inc%_EXT%\xmloff\txtimppr.hxx - -..\inc\xmloff\*.hxx %_DEST%\inc%_EXT%\xmloff\*.hxx -..\inc\xmloff\*.h %_DEST%\inc%_EXT%\xmloff\*.h - -..\xml\components.xml %_DEST%\xml%_EXT%\components.xml - -mkdir: %_DEST%\inc%_EXT%\xmloff\table -..\inc\xmloff\table\XMLTableExport.hxx %_DEST%\inc%_EXT%\xmloff\table\XMLTableExport.hxx -..\inc\xmloff\table\XMLTableImport.hxx %_DEST%\inc%_EXT%\xmloff\table\XMLTableImport.hxx - -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib diff --git a/xmloff/prj/target_module_xmloff.mk b/xmloff/prj/target_module_xmloff.mk index 4d4d82412fab..6a90531db467 100644 --- a/xmloff/prj/target_module_xmloff.mk +++ b/xmloff/prj/target_module_xmloff.mk @@ -28,12 +28,14 @@ $(eval $(call gb_Module_Module,xmloff,\ $(call gb_Library_get_target,xo) \ $(call gb_Library_get_target,xof) \ + $(call gb_Package_get_target,xmloff_dtd) \ $(call gb_Package_get_target,xmloff_inc) \ )) $(eval $(call gb_Module_read_includes,xmloff,\ lib_xo \ lib_xof \ + package_dtd \ package_inc \ )) diff --git a/xmloff/prj/target_package_dtd.mk b/xmloff/prj/target_package_dtd.mk new file mode 100644 index 000000000000..fbfbe4a1400d --- /dev/null +++ b/xmloff/prj/target_package_dtd.mk @@ -0,0 +1,45 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,xmloff_dtd,$(SRCDIR)/xmloff/dtd)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/Blocklist.dtd,Blocklist.dtd)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/chart.mod,chart.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/datastyl.mod,datastyl.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/defs.mod,defs.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/drawing.mod,drawing.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/dtypes.mod,dtypes.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/form.mod,form.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/meta.mod,meta.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/nmspace.mod,nmspace.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/office.dtd,office.dtd)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/office.mod,office.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/openoffice-2.0-schema.rng,openoffice-2.0-schema.rng)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/script.mod,script.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/settings.mod,settings.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/style.mod,style.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/table.mod,table.mod)) +$(eval $(call gb_Package_add_file,xmloff_dtd,bin/text.mod,text.mod)) diff --git a/xmloff/prj/target_package_inc.mk b/xmloff/prj/target_package_inc.mk index 76e9b485cb22..cd0500c6b55d 100644 --- a/xmloff/prj/target_package_inc.mk +++ b/xmloff/prj/target_package_inc.mk @@ -126,4 +126,6 @@ $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SettingsExportHelper.hxx $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlictxt.hxx,xmloff/xmlictxt.hxx)) $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/table/XMLTableExport.hxx,xmloff/table/XMLTableExport.hxx)) $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/table/XMLTableImport.hxx,xmloff/table/XMLTableImport.hxx)) - +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLSettingsExportContext.hxx,xmloff/XMLSettingsExportContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextShapeImportHelper.hxx,xmloff/XMLTextShapeImportHelper.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/odffields.hxx,xmloff/odffields.hxx)) From 1aeb4427c8b6f174fd0f5280f4023209ab07af0a Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 21 Apr 2010 14:55:42 +0200 Subject: [PATCH 018/279] CWS gnumake2: not using implicit rules --- framework/prj/makefile.mk | 2 +- sfx2/prj/makefile.mk | 2 +- xmloff/prj/makefile.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/prj/makefile.mk b/framework/prj/makefile.mk index a5f9aa9d8248..2a0b99e72fd5 100644 --- a/framework/prj/makefile.mk +++ b/framework/prj/makefile.mk @@ -1,2 +1,2 @@ all: - cd .. && make -sj9 + cd .. && make -srj9 diff --git a/sfx2/prj/makefile.mk b/sfx2/prj/makefile.mk index a5f9aa9d8248..2a0b99e72fd5 100644 --- a/sfx2/prj/makefile.mk +++ b/sfx2/prj/makefile.mk @@ -1,2 +1,2 @@ all: - cd .. && make -sj9 + cd .. && make -srj9 diff --git a/xmloff/prj/makefile.mk b/xmloff/prj/makefile.mk index a5f9aa9d8248..2a0b99e72fd5 100644 --- a/xmloff/prj/makefile.mk +++ b/xmloff/prj/makefile.mk @@ -1,2 +1,2 @@ all: - cd .. && make -sj9 + cd .. && make -srj9 From caa9023cf0d5f63919709ebbdab067d3c94a2e70 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 21 Apr 2010 18:07:43 +0200 Subject: [PATCH 019/279] CWS gnumake2: small fixes in makefiles --- framework/prj/target_package_inc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/prj/target_package_inc.mk b/framework/prj/target_package_inc.mk index e087c6038001..8cb41e542265 100644 --- a/framework/prj/target_package_inc.mk +++ b/framework/prj/target_package_inc.mk @@ -42,6 +42,6 @@ $(eval $(call gb_Package_add_file,framework_inc,inc/framework/preventduplicatein $(eval $(call gb_Package_add_file,framework_inc,inc/framework/sfxhelperfunctions.hxx,framework/sfxhelperfunctions.hxx)) $(eval $(call gb_Package_add_file,framework_inc,inc/framework/titlehelper.hxx,framework/titlehelper.hxx)) $(eval $(call gb_Package_add_file,framework_inc,inc/framework/toolboxconfiguration.hxx,framework/toolboxconfiguration.hxx)) -$(eval $(call gb_Package_add_file,framework_inc,inc/framework/fwedllapi.h,fwedllapi.h)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/fwedllapi.h,framework/fwedllapi.h)) $(eval $(call gb_Package_add_file,framework_inc,inc/fwkdllapi.h,fwkdllapi.h)) $(eval $(call gb_Package_add_file,framework_inc,inc/fwidllapi.h,fwidllapi.h)) From b8f0e80d0e60345015e99a4d93d5bef7ff05f82a Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 22 Apr 2010 18:36:39 +0200 Subject: [PATCH 020/279] CWS gnumake2: Sdi deps should work now --- sfx2/prj/target_lib_sfx2.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sfx2/prj/target_lib_sfx2.mk b/sfx2/prj/target_lib_sfx2.mk index 9d39fd1c0d50..a9b97e84e172 100644 --- a/sfx2/prj/target_lib_sfx2.mk +++ b/sfx2/prj/target_lib_sfx2.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,sfx)) +$(call gb_Library_get_headers_target,sfx) : $(call gb_Package_get_target,sfx2_inc) +$(call gb_Library_get_headers_target,sfx) : $(call gb_Package_get_target,sfx2_sdi) $(call gb_Library_get_headers_target,sfx) : $(call gb_SdiTarget_get_target,sfx2/sdi/sfxslots) $(call gb_SdiTarget_get_target,sfx2/sdi/sfxslots) :| $(call gb_Library_get_external_headers_target,sfx) $(call gb_Library_get_clean_target,sfx) : $(call gb_SdiTarget_get_clean_target,sfx2/sdi/sfxslots) From 44b27fb699c6541f9c85091983d1faa23079217a Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 23 Apr 2010 15:15:43 +0200 Subject: [PATCH 021/279] CWS gnumake2: added cnvenience methods for adding package and sdi headers --- sfx2/prj/target_lib_sfx2.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sfx2/prj/target_lib_sfx2.mk b/sfx2/prj/target_lib_sfx2.mk index a9b97e84e172..0a93faf16f15 100644 --- a/sfx2/prj/target_lib_sfx2.mk +++ b/sfx2/prj/target_lib_sfx2.mk @@ -27,11 +27,12 @@ $(eval $(call gb_Library_Library,sfx)) -$(call gb_Library_get_headers_target,sfx) : $(call gb_Package_get_target,sfx2_inc) -$(call gb_Library_get_headers_target,sfx) : $(call gb_Package_get_target,sfx2_sdi) -$(call gb_Library_get_headers_target,sfx) : $(call gb_SdiTarget_get_target,sfx2/sdi/sfxslots) -$(call gb_SdiTarget_get_target,sfx2/sdi/sfxslots) :| $(call gb_Library_get_external_headers_target,sfx) -$(call gb_Library_get_clean_target,sfx) : $(call gb_SdiTarget_get_clean_target,sfx2/sdi/sfxslots) +$(eval $(call gb_Library_add_package_headers,sfx,\ + sfx2_inc \ + sfx2_sdi \ +)) + +$(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) $(eval $(call gb_Library_set_include,sfx,\ $$(INCLUDE) \ From 661e2cc1a5a7bb3d679d57538878c79aab311b2f Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 24 Apr 2010 00:09:05 +0200 Subject: [PATCH 022/279] CWS gnumake2: avoid export of template symbols --- basic/source/uno/modsizeexceeded.cxx | 14 +- framework/inc/framework/fwedllapi.h | 4 +- framework/inc/framework/interaction.hxx | 242 ++---------------- framework/source/fwe/dispatch/interaction.cxx | 222 +++++++++++++--- framework/source/loadenv/loadenv.cxx | 14 +- sfx2/inc/sfx2/brokenpackageint.hxx | 56 +--- sfx2/source/appl/appuno.cxx | 107 ++++++-- sfx2/source/doc/docfile.cxx | 11 +- sfx2/source/doc/objmisc.cxx | 15 +- sfx2/source/doc/sfxbasemodel.cxx | 14 +- sfx2/source/inc/fltoptint.hxx | 10 +- sfx2/source/view/frmload.cxx | 9 +- svx/source/unodraw/UnoGraphicExporter.cxx | 7 +- 13 files changed, 361 insertions(+), 364 deletions(-) diff --git a/basic/source/uno/modsizeexceeded.cxx b/basic/source/uno/modsizeexceeded.cxx index 95c5b0ac2a83..3efc7f2d230b 100644 --- a/basic/source/uno/modsizeexceeded.cxx +++ b/basic/source/uno/modsizeexceeded.cxx @@ -29,7 +29,7 @@ #include "precompiled_basic.hxx" #include "basic/modsizeexceeded.hxx" -#include +#include #include using namespace com::sun::star; @@ -44,8 +44,8 @@ ModuleSizeExceeded::ModuleSizeExceeded( const uno::Sequence< ::rtl::OUString >& m_aRequest <<= aReq; - m_xAbort.set( uno::Reference< task::XInteractionAbort >(new framework::ContinuationAbort), uno::UNO_QUERY ); - m_xApprove.set( uno::Reference< task::XInteractionApprove >(new framework::ContinuationApprove ), uno::UNO_QUERY ); + m_xAbort.set( uno::Reference< task::XInteractionAbort >(new comphelper::OInteractionAbort), uno::UNO_QUERY ); + m_xApprove.set( uno::Reference< task::XInteractionApprove >(new comphelper::OInteractionApprove ), uno::UNO_QUERY ); m_lContinuations.realloc( 2 ); m_lContinuations[0] = m_xApprove; m_lContinuations[1] = m_xAbort; @@ -54,15 +54,15 @@ ModuleSizeExceeded::ModuleSizeExceeded( const uno::Sequence< ::rtl::OUString >& sal_Bool ModuleSizeExceeded::isAbort() const { - framework::ContinuationAbort* pBase = static_cast< framework::ContinuationAbort* >( m_xAbort.get() ); - return pBase->isSelected(); + comphelper::OInteractionAbort* pBase = static_cast< comphelper::OInteractionAbort* >( m_xAbort.get() ); + return pBase->wasSelected(); } sal_Bool ModuleSizeExceeded::isApprove() const { - framework::ContinuationApprove* pBase = static_cast< framework::ContinuationApprove* >( m_xApprove.get() ); - return pBase->isSelected(); + comphelper::OInteractionApprove* pBase = static_cast< comphelper::OInteractionApprove* >( m_xApprove.get() ); + return pBase->wasSelected(); } diff --git a/framework/inc/framework/fwedllapi.h b/framework/inc/framework/fwedllapi.h index 2742d09ab134..2d818876a0ac 100644 --- a/framework/inc/framework/fwedllapi.h +++ b/framework/inc/framework/fwedllapi.h @@ -5,8 +5,8 @@ #if defined(FWE_DLLIMPLEMENTATION) #define FWE_DLLPUBLIC SAL_DLLPUBLIC_EXPORT -#include -template struct FWE_DLLPUBLIC cppu::OBroadcastHelperVar; +//#include +//template struct FWE_DLLPUBLIC cppu::OBroadcastHelperVar; //class FWE_DLLPUBLIC SvPtrarr; #else #define FWE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT diff --git a/framework/inc/framework/interaction.hxx b/framework/inc/framework/interaction.hxx index 05c4303f4b8e..03c8fde19736 100644 --- a/framework/inc/framework/interaction.hxx +++ b/framework/inc/framework/interaction.hxx @@ -28,14 +28,6 @@ #ifndef __FRAMEWORK_DISPATCH_INTERACTION_HXX_ #define __FRAMEWORK_DISPATCH_INTERACTION_HXX_ -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ - #include #include #include @@ -56,147 +48,8 @@ #include #include -//_________________________________________________________________________________________________________________ -// namespace -//_________________________________________________________________________________________________________________ - namespace framework{ -//_________________________________________________________________________________________________________________ -// non exported const -//_________________________________________________________________________________________________________________ - -//_________________________________________________________________________________________________________________ -// non exported definitions -//_________________________________________________________________________________________________________________ - -//_________________________________________________________________________________________________________________ -// declarations -//_________________________________________________________________________________________________________________ - -/*-************************************************************************************************************//** - @short base for continuation classes - @descr An interaction continuation could be used on XInteractionHandler/XInteractionRequest - to abort or react for it. - Base functionality is everytime the same - handler mark right continuation by calling - interface method "select()". User of interaction can detect it by testing c++ method "isSelected()"! - Superclasses can add additional interfaces or methods to support additional features ... - but selection of it is supported here! - - @implements XInterface - XTypeProvider (supported by WeakImplHelper!) - XInteractionContinuation - - @base WeakImplHelper1 - - @devstatus ready to use - @threadsafe no (used on once position only!) -*//*-*************************************************************************************************************/ -template< class TContinuationType > -class ContinuationBase : public ::cppu::WeakImplHelper1< TContinuationType > -{ - // c++ interface - public: - - //--------------------------------------------------------------------------------------------------------- - // initialize continuation with right start values - //--------------------------------------------------------------------------------------------------------- - ContinuationBase() - : m_bSelected( sal_False ) - { - } - - //--------------------------------------------------------------------------------------------------------- - // was continuation selected by handler? - //--------------------------------------------------------------------------------------------------------- - sal_Bool isSelected() const - { - return m_bSelected; - } - - //--------------------------------------------------------------------------------------------------------- - // make using more then once possible - //--------------------------------------------------------------------------------------------------------- - void reset() - { - m_bSelected = sal_False; - } - - // uno interface - public: - - //--------------------------------------------------------------------------------------------------------- - // called by handler to mark continuation as the only possible solution for started interaction - //--------------------------------------------------------------------------------------------------------- - virtual void SAL_CALL select() throw( ::com::sun::star::uno::RuntimeException ) - { - m_bSelected = sal_True; - } - - // member - private: - - sal_Bool m_bSelected; - -}; // class ContinuationBase - -//template class FWE_DLLEXPORT ContinuationBase; - -/*-************************************************************************************************************//** - @short declaration of some simple continuations - @descr These derived classes implements some simple continuations, which doesnt need and additional - interfaces or methods. Her selected state is the only neccessary feature. User of it can - distinguish by type between different functionality! - - @implements - - - @base ContinuationBase - - @devstatus ready to use - @threadsafe no (used on once position only!) -*//*-*************************************************************************************************************/ -typedef ContinuationBase< ::com::sun::star::task::XInteractionAbort > ContinuationAbort; -typedef ContinuationBase< ::com::sun::star::task::XInteractionApprove > ContinuationApprove; -typedef ContinuationBase< ::com::sun::star::task::XInteractionDisapprove > ContinuationDisapprove; -typedef ContinuationBase< ::com::sun::star::task::XInteractionRetry > ContinuationRetry; - -/*-************************************************************************************************************//** - @short declaration of special continuation for filter selection - @descr Sometimes filter detection during loading document failed. Then we need a possibility - to ask user for his decision. These continuation transport selected filter by user to - code user of interaction. - - @attention This implementation could be used one times only. We don't support a resetable continuation yet! - Why? Normaly interaction should show a filter selection dialog and ask user for his decision. - He can select any filter - then instances of these class will be called by handler ... or user - close dialog without any selection. Then another continuation should be slected by handler to - abort continuations ... Retrying isn't very usefull here ... I think. - - @implements XInteractionFilterSelect - - @base ImplInheritanceHelper1 - ContinuationBase - - @devstatus ready to use - @threadsafe no (used on once position only!) -*//*-*************************************************************************************************************/ -class FWE_DLLPUBLIC ContinuationFilterSelect : public ContinuationBase< ::com::sun::star::document::XInteractionFilterSelect > -{ - // c++ interface - public: - ContinuationFilterSelect(); - - // uno interface - public: - virtual void SAL_CALL setFilter( const ::rtl::OUString& sFilter ) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::rtl::OUString SAL_CALL getFilter( ) throw( ::com::sun::star::uno::RuntimeException ); - - // member - private: - ::rtl::OUString m_sFilter; - -}; // class ContinuationFilterSelect - /*-************************************************************************************************************//** @short special request for interaction to ask user for right filter @descr These helper can be used to ask user for right filter, if filter detection failed. @@ -219,27 +72,18 @@ class FWE_DLLPUBLIC ContinuationFilterSelect : public ContinuationBase< ::com::s @devstatus ready to use @threadsafe no (used on once position only!) *//*-*************************************************************************************************************/ -class FWE_DLLPUBLIC RequestFilterSelect : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +class RequestFilterSelect_Impl; +class FWE_DLLPUBLIC RequestFilterSelect { - // c++ interface + RequestFilterSelect_Impl* pImp; + public: RequestFilterSelect( const ::rtl::OUString& sURL ); + ~RequestFilterSelect(); sal_Bool isAbort () const; ::rtl::OUString getFilter() const; - - // uno interface - public: - virtual ::com::sun::star::uno::Any SAL_CALL getRequest () throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException ); - - // member - private: - ::com::sun::star::uno::Any m_aRequest ; - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; - ContinuationAbort* m_pAbort ; - ContinuationFilterSelect* m_pFilter ; - -}; // class RequestFilterSelect + com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > GetRequest(); +}; /*-************************************************************************************************************//** @short special request for interaction @@ -254,29 +98,13 @@ class FWE_DLLPUBLIC RequestFilterSelect : public ::cppu::WeakImplHelper1< ::com: @devstatus ready to use @threadsafe no (used on once position only!) *//*-*************************************************************************************************************/ -class FWE_DLLPUBLIC RequestAmbigousFilter : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +class FWE_DLLPUBLIC InteractionRequest { - // c++ interface - public: - RequestAmbigousFilter( const ::rtl::OUString& sURL , - const ::rtl::OUString& sSelectedFilter , - const ::rtl::OUString& sDetectedFilter ); - sal_Bool isAbort () const; - ::rtl::OUString getFilter() const; - - // uno interface - public: - virtual ::com::sun::star::uno::Any SAL_CALL getRequest () throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException ); - - // member - private: - ::com::sun::star::uno::Any m_aRequest ; - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; - ContinuationAbort* m_pAbort ; - ContinuationFilterSelect* m_pFilter ; - -}; // class RequestFilterSelect +public: + static com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > + CreateRequest( const ::com::sun::star::uno::Any& aRequest, + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > lContinuations ); +}; /*-************************************************************************************************************//** @short special request for interaction @@ -291,37 +119,23 @@ class FWE_DLLPUBLIC RequestAmbigousFilter : public ::cppu::WeakImplHelper1< ::co @devstatus ready to use @threadsafe no (used on once position only!) *//*-*************************************************************************************************************/ -class FWE_DLLPUBLIC InteractionRequest : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +/* +class RequestAmbigousFilter_Impl; +class RequestAmbigousFilter // seems to be unused currently { + RequestAmbigousFilter_Impl* pImp; + // c++ interface - public: - InteractionRequest( const ::com::sun::star::uno::Any& aRequest , - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > lContinuations ) - { - m_aRequest = aRequest ; - m_lContinuations = lContinuations; - } - - // uno interface - public: - virtual ::com::sun::star::uno::Any SAL_CALL getRequest() - throw( ::com::sun::star::uno::RuntimeException ) - { - return m_aRequest; - } - - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() - throw( ::com::sun::star::uno::RuntimeException ) - { - return m_lContinuations; - } - - // member - private: - ::com::sun::star::uno::Any m_aRequest ; - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; - -}; // class RequestFilterSelect +public: + RequestAmbigousFilter( const ::rtl::OUString& sURL, + const ::rtl::OUString& sSelectedFilter , + const ::rtl::OUString& sDetectedFilter ); + ~RequestAmbigousFilter(); + sal_Bool isAbort () const; + ::rtl::OUString getFilter() const; + com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > GetRequest(); +}; + */ } // namespace framework diff --git a/framework/source/fwe/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx index 528bf855ab58..9b3d4f4c69d8 100644 --- a/framework/source/fwe/dispatch/interaction.cxx +++ b/framework/source/fwe/dispatch/interaction.cxx @@ -31,35 +31,51 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ +#include #include #include -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ - -//_________________________________________________________________________________________________________________ -// includes of other projects -//_________________________________________________________________________________________________________________ - -//_________________________________________________________________________________________________________________ -// namespace -//_________________________________________________________________________________________________________________ +using namespace ::com::sun::star; namespace framework{ -//template class FWE_DLLEXPORT ContinuationBase; -//_________________________________________________________________________________________________________________ -// non exported const -//_________________________________________________________________________________________________________________ +/*-************************************************************************************************************//** + @short declaration of special continuation for filter selection + @descr Sometimes filter detection during loading document failed. Then we need a possibility + to ask user for his decision. These continuation transport selected filter by user to + code user of interaction. -//_________________________________________________________________________________________________________________ -// non exported definitions -//_________________________________________________________________________________________________________________ + @attention This implementation could be used one times only. We don't support a resetable continuation yet! + Why? Normaly interaction should show a filter selection dialog and ask user for his decision. + He can select any filter - then instances of these class will be called by handler ... or user + close dialog without any selection. Then another continuation should be slected by handler to + abort continuations ... Retrying isn't very usefull here ... I think. + + @implements XInteractionFilterSelect + + @base ImplInheritanceHelper1 + ContinuationBase + + @devstatus ready to use + @threadsafe no (used on once position only!) +*//*-*************************************************************************************************************/ +class ContinuationFilterSelect : public comphelper::OInteraction< ::com::sun::star::document::XInteractionFilterSelect > +{ + // c++ interface + public: + ContinuationFilterSelect(); + + // uno interface + public: + virtual void SAL_CALL setFilter( const ::rtl::OUString& sFilter ) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::rtl::OUString SAL_CALL getFilter( ) throw( ::com::sun::star::uno::RuntimeException ); + + // member + private: + ::rtl::OUString m_sFilter; + +}; // class ContinuationFilterSelect -//_________________________________________________________________________________________________________________ -// declarations -//_________________________________________________________________________________________________________________ //--------------------------------------------------------------------------------------------------------- // initialize continuation with right start values @@ -85,11 +101,29 @@ void SAL_CALL ContinuationFilterSelect::setFilter( const ::rtl::OUString& sFilte return m_sFilter; } +class RequestFilterSelect_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ +public: + RequestFilterSelect_Impl( const ::rtl::OUString& sURL ); + sal_Bool isAbort () const; + ::rtl::OUString getFilter() const; + +public: + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException ); + +private: + ::com::sun::star::uno::Any m_aRequest ; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionAbort* m_pAbort; + ContinuationFilterSelect* m_pFilter; +}; + //--------------------------------------------------------------------------------------------------------- // initialize instance with all neccessary informations // We use it without any further checks on our member then ...! //--------------------------------------------------------------------------------------------------------- -RequestFilterSelect::RequestFilterSelect( const ::rtl::OUString& sURL ) +RequestFilterSelect_Impl::RequestFilterSelect_Impl( const ::rtl::OUString& sURL ) { ::rtl::OUString temp; css::uno::Reference< css::uno::XInterface > temp2; @@ -98,7 +132,7 @@ RequestFilterSelect::RequestFilterSelect( const ::rtl::OUString& sURL ) sURL ); m_aRequest <<= aFilterRequest; - m_pAbort = new ContinuationAbort ; + m_pAbort = new comphelper::OInteractionAbort; m_pFilter = new ContinuationFilterSelect; m_lContinuations.realloc( 2 ); @@ -110,16 +144,16 @@ RequestFilterSelect::RequestFilterSelect( const ::rtl::OUString& sURL ) // return abort state of interaction // If it is true, return value of method "getFilter()" will be unspecified then! //--------------------------------------------------------------------------------------------------------- -sal_Bool RequestFilterSelect::isAbort() const +sal_Bool RequestFilterSelect_Impl::isAbort() const { - return m_pAbort->isSelected(); + return m_pAbort->wasSelected(); } //--------------------------------------------------------------------------------------------------------- // return user selected filter // Return value valid for non aborted interaction only. Please check "isAbort()" before you call these ony! //--------------------------------------------------------------------------------------------------------- -::rtl::OUString RequestFilterSelect::getFilter() const +::rtl::OUString RequestFilterSelect_Impl::getFilter() const { return m_pFilter->getFilter(); } @@ -128,7 +162,7 @@ sal_Bool RequestFilterSelect::isAbort() const // handler call it to get type of request // Is hard coded to "please select filter" here. see ctor for further informations. //--------------------------------------------------------------------------------------------------------- -css::uno::Any SAL_CALL RequestFilterSelect::getRequest() throw( css::uno::RuntimeException ) +css::uno::Any SAL_CALL RequestFilterSelect_Impl::getRequest() throw( css::uno::RuntimeException ) { return m_aRequest; } @@ -139,16 +173,102 @@ css::uno::Any SAL_CALL RequestFilterSelect::getRequest() throw( css::uno::Runtim // After interaction we support read access on these continuations on our c++ interface to // return user decision. //--------------------------------------------------------------------------------------------------------- -css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL RequestFilterSelect::getContinuations() throw( css::uno::RuntimeException ) +css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL RequestFilterSelect_Impl::getContinuations() throw( css::uno::RuntimeException ) { return m_lContinuations; } + +RequestFilterSelect::RequestFilterSelect( const ::rtl::OUString& sURL ) +{ + pImp = new RequestFilterSelect_Impl( sURL ); + pImp->acquire(); +} + +RequestFilterSelect::~RequestFilterSelect() +{ + pImp->release(); +} + + +//--------------------------------------------------------------------------------------------------------- +// return abort state of interaction +// If it is true, return value of method "getFilter()" will be unspecified then! +//--------------------------------------------------------------------------------------------------------- +sal_Bool RequestFilterSelect::isAbort() const +{ + return pImp->isAbort(); +} + +//--------------------------------------------------------------------------------------------------------- +// return user selected filter +// Return value valid for non aborted interaction only. Please check "isAbort()" before you call these ony! +//--------------------------------------------------------------------------------------------------------- +::rtl::OUString RequestFilterSelect::getFilter() const +{ + return pImp->getFilter(); +} + +uno::Reference < task::XInteractionRequest > RequestFilterSelect::GetRequest() +{ + return uno::Reference < task::XInteractionRequest > (pImp); +} + +/* +class RequestAmbigousFilter_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ +public: + RequestAmbigousFilter_Impl( const ::rtl::OUString& sURL , + const ::rtl::OUString& sSelectedFilter , + const ::rtl::OUString& sDetectedFilter ); + sal_Bool isAbort () const; + ::rtl::OUString getFilter() const; + + virtual ::com::sun::star::uno::Any SAL_CALL getRequest () throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException ); + + ::com::sun::star::uno::Any m_aRequest ; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + ContinuationAbort* m_pAbort ; + ContinuationFilterSelect* m_pFilter ; +}; + +RequestAmbigousFilter::RequestAmbigousFilter( const ::rtl::OUString& sURL, const ::rtl::OUString& sSelectedFilter, + const ::rtl::OUString& sDetectedFilter ) +{ + pImp = new RequestAmbigousFilter_Impl( sURL, sSelectedFilter, sDetectedFilter ); + pImp->acquire(); +} + +RequestAmbigousFilter::~RequestAmbigousFilter() +{ + pImp->release(); +} + +sal_Bool RequestAmbigousFilter::isAbort() const +{ + return pImp->isAbort(); +} + +//--------------------------------------------------------------------------------------------------------- +// return user selected filter +// Return value valid for non aborted interaction only. Please check "isAbort()" before you call these ony! +//--------------------------------------------------------------------------------------------------------- +::rtl::OUString RequestAmbigousFilter::getFilter() const +{ + return pImp->getFilter(); +} + +uno::Reference < task::XInteractionRequest > RequestAmbigousFilter::GetRequest() +{ + return uno::Reference < task::XInteractionRequest > (pImp); +} + //--------------------------------------------------------------------------------------------------------- // initialize instance with all neccessary informations // We use it without any further checks on our member then ...! //--------------------------------------------------------------------------------------------------------- -RequestAmbigousFilter::RequestAmbigousFilter( const ::rtl::OUString& sURL , +RequestAmbigousFilter_Impl::RequestAmbigousFilter_Impl( const ::rtl::OUString& sURL , const ::rtl::OUString& sSelectedFilter , const ::rtl::OUString& sDetectedFilter ) { @@ -173,7 +293,7 @@ RequestAmbigousFilter::RequestAmbigousFilter( const ::rtl::OUString& sURL // return abort state of interaction // If it is true, return value of method "getFilter()" will be unspecified then! //--------------------------------------------------------------------------------------------------------- -sal_Bool RequestAmbigousFilter::isAbort() const +sal_Bool RequestAmbigousFilter_Impl::isAbort() const { return m_pAbort->isSelected(); } @@ -182,7 +302,7 @@ sal_Bool RequestAmbigousFilter::isAbort() const // return user selected filter // Return value valid for non aborted interaction only. Please check "isAbort()" before you call these ony! //--------------------------------------------------------------------------------------------------------- -::rtl::OUString RequestAmbigousFilter::getFilter() const +::rtl::OUString RequestAmbigousFilter_Impl::getFilter() const { return m_pFilter->getFilter(); } @@ -191,7 +311,7 @@ sal_Bool RequestAmbigousFilter::isAbort() const // handler call it to get type of request // Is hard coded to "please select filter" here. see ctor for further informations. //--------------------------------------------------------------------------------------------------------- -css::uno::Any SAL_CALL RequestAmbigousFilter::getRequest() throw( css::uno::RuntimeException ) +css::uno::Any SAL_CALL RequestAmbigousFilter_Impl::getRequest() throw( css::uno::RuntimeException ) { return m_aRequest; } @@ -202,9 +322,45 @@ css::uno::Any SAL_CALL RequestAmbigousFilter::getRequest() throw( css::uno::Runt // After interaction we support read access on these continuations on our c++ interface to // return user decision. //--------------------------------------------------------------------------------------------------------- -css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL RequestAmbigousFilter::getContinuations() throw( css::uno::RuntimeException ) +css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL RequestAmbigousFilter_Impl::getContinuations() throw( css::uno::RuntimeException ) +{ + return m_lContinuations; +} +*/ + +class InteractionRequest_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + uno::Any m_aRequest; + uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + +public: + InteractionRequest_Impl( const ::com::sun::star::uno::Any& aRequest, + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > lContinuations ) + { + m_aRequest = aRequest; + m_lContinuations = lContinuations; + } + + virtual uno::Any SAL_CALL getRequest() throw( uno::RuntimeException ); + virtual uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( uno::RuntimeException ); +}; + +uno::Any SAL_CALL InteractionRequest_Impl::getRequest() throw( uno::RuntimeException ) +{ + return m_aRequest; +} + +uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL InteractionRequest_Impl::getContinuations() + throw( uno::RuntimeException ) { return m_lContinuations; } +uno::Reference < task::XInteractionRequest > InteractionRequest::CreateRequest( + const uno::Any& aRequest, const uno::Sequence< uno::Reference< task::XInteractionContinuation > > lContinuations ) +{ + return new InteractionRequest_Impl( aRequest, lContinuations ); +} + } // namespace framework diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 365ac2efacbc..07c8846bb3ce 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -39,6 +39,8 @@ #ifndef __FRAMEWORK_CONSTANT_FILTER_HXX_ #include #endif + +#include #include #ifndef __FRAMEWORK_CONSTANT_FRAMELOADER_HXX_ @@ -1060,8 +1062,8 @@ sal_Bool LoadEnv::impl_furtherDocsAllowed() css::uno::Any aInteraction; css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > lContinuations(2); - ContinuationAbort* pAbort = new ContinuationAbort(); - ContinuationApprove* pApprove = new ContinuationApprove(); + comphelper::OInteractionAbort* pAbort = new comphelper::OInteractionAbort(); + comphelper::OInteractionApprove* pApprove = new comphelper::OInteractionApprove(); lContinuations[0] = css::uno::Reference< css::task::XInteractionContinuation >( static_cast< css::task::XInteractionContinuation* >(pAbort), @@ -1073,13 +1075,7 @@ sal_Bool LoadEnv::impl_furtherDocsAllowed() css::task::ErrorCodeRequest aErrorCode; aErrorCode.ErrCode = ERRCODE_SFX_NOMOREDOCUMENTSALLOWED; aInteraction <<= aErrorCode; - - InteractionRequest* pRequest = new InteractionRequest(aInteraction, lContinuations); - css::uno::Reference< css::task::XInteractionRequest > xRequest( - static_cast< css::task::XInteractionRequest* >(pRequest), - css::uno::UNO_QUERY_THROW); - - xInteraction->handle(xRequest); + xInteraction->handle( InteractionRequest::CreateRequest(aInteraction, lContinuations) ); } } diff --git a/sfx2/inc/sfx2/brokenpackageint.hxx b/sfx2/inc/sfx2/brokenpackageint.hxx index e39c92c599ae..5186e875a6ea 100644 --- a/sfx2/inc/sfx2/brokenpackageint.hxx +++ b/sfx2/inc/sfx2/brokenpackageint.hxx @@ -30,58 +30,26 @@ #include #include #include -#include -using namespace ::framework; -typedef ContinuationBase< ::com::sun::star::task::XInteractionApprove > SfxContinuationApprove; -typedef ContinuationBase< ::com::sun::star::task::XInteractionDisapprove > SfxContinuationDisapprove; - -class SFX2_DLLPUBLIC RequestPackageReparation : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +class RequestPackageReparation_Impl; +class SFX2_DLLPUBLIC RequestPackageReparation { - ::com::sun::star::uno::Any m_aRequest; - - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > m_lContinuations; - - SfxContinuationApprove* m_pApprove; - SfxContinuationDisapprove* m_pDisapprove; - + RequestPackageReparation_Impl* pImp; public: RequestPackageReparation( ::rtl::OUString aName ); - - sal_Bool isApproved() { return m_pApprove->isSelected(); } - - virtual ::com::sun::star::uno::Any SAL_CALL getRequest() - throw( ::com::sun::star::uno::RuntimeException ); - - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > SAL_CALL getContinuations() - throw( ::com::sun::star::uno::RuntimeException ); + ~RequestPackageReparation(); + sal_Bool isApproved(); + com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > GetRequest(); }; -class SFX2_DLLPUBLIC NotifyBrokenPackage : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +class NotifyBrokenPackage_Impl; +class SFX2_DLLPUBLIC NotifyBrokenPackage { - ::com::sun::star::uno::Any m_aRequest; - - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > m_lContinuations; - - ContinuationAbort* m_pAbort; - + NotifyBrokenPackage_Impl* pImp; public: NotifyBrokenPackage( ::rtl::OUString aName ); - - sal_Bool isAborted() { return m_pAbort->isSelected(); } - - virtual ::com::sun::star::uno::Any SAL_CALL getRequest() - throw( ::com::sun::star::uno::RuntimeException ); - - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > SAL_CALL getContinuations() - throw( ::com::sun::star::uno::RuntimeException ); + ~NotifyBrokenPackage(); + sal_Bool isAborted(); + com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > GetRequest(); }; diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 6498df6ca62a..24a1725aa99c 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -94,6 +94,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::ucb; @@ -2367,7 +2368,7 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; + m_pAbort = new comphelper::OInteractionAbort; m_pOptions = new FilterOptionsContinuation; m_lContinuations.realloc( 2 ); @@ -2389,67 +2390,139 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: } //========================================================================= +class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionApprove* m_pApprove; + comphelper::OInteractionDisapprove* m_pDisapprove; -RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) +public: + RequestPackageReparation_Impl( ::rtl::OUString aName ); + sal_Bool isApproved(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +RequestPackageReparation_Impl::RequestPackageReparation_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, temp2, aName ); - m_aRequest <<= aBrokenPackageRequest; - - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; - + m_pApprove = new comphelper::OInteractionApprove; + m_pDisapprove = new comphelper::OInteractionDisapprove; m_lContinuations.realloc( 2 ); m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); } -::com::sun::star::uno::Any SAL_CALL RequestPackageReparation::getRequest() +sal_Bool RequestPackageReparation_Impl::isApproved() +{ + return m_pApprove->wasSelected(); +} + +::com::sun::star::uno::Any SAL_CALL RequestPackageReparation_Impl::getRequest() throw( ::com::sun::star::uno::RuntimeException ) { return m_aRequest; } ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL RequestPackageReparation::getContinuations() + SAL_CALL RequestPackageReparation_Impl::getContinuations() throw( ::com::sun::star::uno::RuntimeException ) { return m_lContinuations; } -//========================================================================= +RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) +{ + pImp = new RequestPackageReparation_Impl( aName ); + pImp->acquire(); +} -NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) +RequestPackageReparation::~RequestPackageReparation() +{ + pImp->release(); +} + +sal_Bool RequestPackageReparation::isApproved() +{ + return pImp->isApproved(); +} + +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > RequestPackageReparation::GetRequest() +{ + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); +} + +//========================================================================= +class NotifyBrokenPackage_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionAbort* m_pAbort; + +public: + NotifyBrokenPackage_Impl( ::rtl::OUString aName ); + sal_Bool isAborted(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, temp2, aName ); - m_aRequest <<= aBrokenPackageRequest; - - m_pAbort = new ContinuationAbort; - + m_pAbort = new comphelper::OInteractionAbort; m_lContinuations.realloc( 1 ); m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); } -::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage::getRequest() +sal_Bool NotifyBrokenPackage_Impl::isAborted() +{ + return m_pAbort->wasSelected(); +} + +::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage_Impl::getRequest() throw( ::com::sun::star::uno::RuntimeException ) { return m_aRequest; } ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL NotifyBrokenPackage::getContinuations() + SAL_CALL NotifyBrokenPackage_Impl::getContinuations() throw( ::com::sun::star::uno::RuntimeException ) { return m_lContinuations; } +NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) +{ + pImp = new NotifyBrokenPackage_Impl( aName ); + pImp->acquire(); +} + +NotifyBrokenPackage::~NotifyBrokenPackage() +{ + pImp->release(); +} + +sal_Bool NotifyBrokenPackage::isAborted() +{ + return pImp->isAborted(); +} + +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > NotifyBrokenPackage::GetRequest() +{ + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); +} diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 7bc679fc94b2..c18ad2c7016c 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -81,6 +81,7 @@ #include #include #include +#include #include #include #include @@ -3772,19 +3773,17 @@ sal_Bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteraction { uno::Sequence< uno::Reference< task::XInteractionContinuation > > aContinuations( bAllowAbort ? 2 : 1 ); - ::rtl::Reference< ::framework::ContinuationApprove > pApprove( new ::framework::ContinuationApprove() ); + ::rtl::Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove ); aContinuations[ 0 ] = pApprove.get(); if ( bAllowAbort ) { - ::rtl::Reference< ::framework::ContinuationAbort > pAbort( new ::framework::ContinuationAbort() ); + ::rtl::Reference< ::comphelper::OInteractionAbort > pAbort( new ::comphelper::OInteractionAbort ); aContinuations[ 1 ] = pAbort.get(); } - uno::Reference< task::XInteractionRequest > xRequest( new ::framework::InteractionRequest( aRequest, aContinuations ) ); - xHandler->handle( xRequest ); - - bResult = pApprove->isSelected(); + xHandler->handle(::framework::InteractionRequest::CreateRequest (aRequest,aContinuations)); + bResult = pApprove->wasSelected(); } catch( const Exception& ) { diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 7e5b69081f1b..692359ac4669 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -118,6 +118,7 @@ using namespace ::com::sun::star::container; #include #include #include +#include #include #include @@ -2257,8 +2258,8 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError( { uno::Any aInteraction; uno::Sequence< uno::Reference< task::XInteractionContinuation > > lContinuations(2); - ::framework::ContinuationAbort* pAbort = new ::framework::ContinuationAbort(); - ::framework::ContinuationApprove* pApprove = new ::framework::ContinuationApprove(); + ::comphelper::OInteractionAbort* pAbort = new ::comphelper::OInteractionAbort(); + ::comphelper::OInteractionApprove* pApprove = new ::comphelper::OInteractionApprove(); lContinuations[0] = uno::Reference< task::XInteractionContinuation >( static_cast< task::XInteractionContinuation* >( pAbort ), uno::UNO_QUERY ); lContinuations[1] = uno::Reference< task::XInteractionContinuation >( @@ -2267,14 +2268,8 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError( task::ErrorCodeRequest aErrorCode; aErrorCode.ErrCode = nError; aInteraction <<= aErrorCode; - - ::framework::InteractionRequest* pRequest = new ::framework::InteractionRequest(aInteraction,lContinuations); - uno::Reference< task::XInteractionRequest > xRequest( - static_cast< task::XInteractionRequest* >( pRequest ), - uno::UNO_QUERY); - - xHandler->handle(xRequest); - bResult = pAbort->isSelected(); + xHandler->handle(::framework::InteractionRequest::CreateRequest (aInteraction,lContinuations)); + bResult = pAbort->wasSelected(); } catch( uno::Exception& ) {} diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 38cd688b96f1..5c746736a9ae 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1790,10 +1790,9 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >& SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairItem, SfxBoolItem, SID_REPAIRPACKAGE, FALSE ); if ( !pRepairItem || !pRepairItem->GetValue() ) { - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocName ); - com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > xRequest ( pRequest ); - xHandler->handle( xRequest ); - if( pRequest->isApproved() ) + RequestPackageReparation aRequest( aDocName ); + xHandler->handle( aRequest.GetRequest() ); + if( aRequest.isApproved() ) { // broken package: try second loading and allow repair pMedium->GetItemSet()->Put( SfxBoolItem( SID_REPAIRPACKAGE, sal_True ) ); @@ -1813,9 +1812,8 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >& if ( nError == ERRCODE_IO_BROKENPACKAGE ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocName ); - com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > xRequest ( pNotifyRequest ); - xHandler->handle( xRequest ); + NotifyBrokenPackage aRequest( aDocName ); + xHandler->handle( aRequest.GetRequest() ); } } } @@ -3246,7 +3244,7 @@ uno::Reference< ui::XUIConfigurationManager > SAL_CALL SfxBaseModel::getUIConfig uno::Reference< lang::XMultiServiceFactory > xServiceMgr( ::comphelper::getProcessServiceFactory() ); uno::Sequence< uno::Reference< container::XIndexContainer > > rToolbars; - sal_Bool bImported = UIConfigurationImporterOOo1x::ImportCustomToolbars( + sal_Bool bImported = framework::UIConfigurationImporterOOo1x::ImportCustomToolbars( xNewUIConfMan, rToolbars, xServiceMgr, xOOo1ConfigStorage ); if ( bImported ) { diff --git a/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx index b4aed7ccdd99..5cb3f162e6c8 100644 --- a/sfx2/source/inc/fltoptint.hxx +++ b/sfx2/source/inc/fltoptint.hxx @@ -28,11 +28,11 @@ #include #include #include -#include +#include -using namespace ::framework; +//using namespace ::framework; -class FilterOptionsContinuation : public ContinuationBase< ::com::sun::star::document::XInteractionFilterOptions > +class FilterOptionsContinuation : public comphelper::OInteraction< ::com::sun::star::document::XInteractionFilterOptions > { ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties; @@ -49,7 +49,7 @@ class RequestFilterOptions : public ::cppu::WeakImplHelper1< ::com::sun::star::t ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; - ContinuationAbort* m_pAbort; + comphelper::OInteractionAbort* m_pAbort; FilterOptionsContinuation* m_pOptions; @@ -57,7 +57,7 @@ public: RequestFilterOptions( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > rModel, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties ); - sal_Bool isAbort() { return m_pAbort->isSelected(); } + sal_Bool isAbort() { return m_pAbort->wasSelected(); } ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > getFilterOptions() { diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index f30ed34f7846..592163f20f17 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -216,11 +216,10 @@ const SfxFilter* SfxFrameLoader_Impl::impl_getFilterFromServiceName_nothrow( con ::rtl::OUString sFilterName; try { - ::framework::RequestFilterSelect* pRequest = new ::framework::RequestFilterSelect( i_rDocumentURL ); - Reference< XInteractionRequest > xRequest ( pRequest ); - i_rxHandler->handle( xRequest ); - if( !pRequest->isAbort() ) - sFilterName = pRequest->getFilter(); + ::framework::RequestFilterSelect aRequest( i_rDocumentURL ); + i_rxHandler->handle( aRequest.GetRequest() ); + if( !aRequest.isAbort() ) + sFilterName = aRequest.getFilter(); } catch( const Exception& ) { diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index a2cb2fa29ca4..986942ffaecf 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -46,6 +46,7 @@ #include #include +#include #include #include #include @@ -1060,15 +1061,13 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes { Any aInteraction; Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > lContinuations(1); - ::framework::ContinuationApprove* pApprove = new ::framework::ContinuationApprove(); + ::comphelper::OInteractionApprove* pApprove = new ::comphelper::OInteractionApprove(); lContinuations[0] = Reference< XInteractionContinuation >(static_cast< XInteractionContinuation* >(pApprove), UNO_QUERY); GraphicFilterRequest aErrorCode; aErrorCode.ErrCode = nStatus; aInteraction <<= aErrorCode; - framework::InteractionRequest* pRequest = new framework::InteractionRequest( aInteraction, lContinuations ); - Reference< XInteractionRequest >xRequest( static_cast< XInteractionRequest* >(pRequest), UNO_QUERY ); - aSettings.mxInteractionHandler->handle( xRequest ); + aSettings.mxInteractionHandler->handle( framework::InteractionRequest::CreateRequest( aInteraction, lContinuations ) ); } return nStatus == GRFILTER_OK; } From 847276934a43760b2cc9822a37b6ca00ec20469f Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Tue, 27 Apr 2010 11:39:42 +0200 Subject: [PATCH 023/279] CWS gnumake2: refactoring --- framework/Makefile | 10 ++++++++-- sfx2/Makefile | 10 ++++++++-- xmloff/Makefile | 10 ++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/framework/Makefile b/framework/Makefile index d020b04dba7c..9ab4b8ba83f4 100644 --- a/framework/Makefile +++ b/framework/Makefile @@ -25,6 +25,12 @@ # #************************************************************************* -include ../solenv/inc/gbuild.mk +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk -$(eval $(call gb_Module_make_global_targets,$(notdir $(shell pwd)))) + +gb_CURRENT_MODULE := $(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))) + +$(eval $(call gb_Module_make_global_targets,$(gb_CURRENT_MODULE))) + +# vim: set noet sw=4 ts=4: diff --git a/sfx2/Makefile b/sfx2/Makefile index d020b04dba7c..9ab4b8ba83f4 100644 --- a/sfx2/Makefile +++ b/sfx2/Makefile @@ -25,6 +25,12 @@ # #************************************************************************* -include ../solenv/inc/gbuild.mk +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk -$(eval $(call gb_Module_make_global_targets,$(notdir $(shell pwd)))) + +gb_CURRENT_MODULE := $(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))) + +$(eval $(call gb_Module_make_global_targets,$(gb_CURRENT_MODULE))) + +# vim: set noet sw=4 ts=4: diff --git a/xmloff/Makefile b/xmloff/Makefile index d020b04dba7c..9ab4b8ba83f4 100644 --- a/xmloff/Makefile +++ b/xmloff/Makefile @@ -25,6 +25,12 @@ # #************************************************************************* -include ../solenv/inc/gbuild.mk +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk -$(eval $(call gb_Module_make_global_targets,$(notdir $(shell pwd)))) + +gb_CURRENT_MODULE := $(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))) + +$(eval $(call gb_Module_make_global_targets,$(gb_CURRENT_MODULE))) + +# vim: set noet sw=4 ts=4: From 7c142871bc30b788fa350ee419f61bfdded1a14c Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 29 Apr 2010 16:27:41 +0200 Subject: [PATCH 024/279] CWS gnumake2: fix template export of MSVC --- .../inc/classes/actiontriggerpropertyset.hxx | 22 +++---- framework/inc/framework/fwedllapi.h | 3 - framework/inc/fwkdllapi.h | 2 - .../inc/helper/popupmenucontrollerbase.hxx | 65 ++++++++++--------- .../inc/helper/uiconfigelementwrapperbase.hxx | 59 +++++++++-------- framework/inc/helper/uielementwrapperbase.hxx | 43 ++++++------ framework/inc/uielement/rootitemcontainer.hxx | 14 ++-- 7 files changed, 107 insertions(+), 101 deletions(-) diff --git a/framework/inc/classes/actiontriggerpropertyset.hxx b/framework/inc/classes/actiontriggerpropertyset.hxx index a02794891634..3f373f272afd 100644 --- a/framework/inc/classes/actiontriggerpropertyset.hxx +++ b/framework/inc/classes/actiontriggerpropertyset.hxx @@ -49,7 +49,7 @@ namespace framework { -class FWE_DLLPUBLIC ActionTriggerPropertySet : public ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. +class ActionTriggerPropertySet : public ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. public ::com::sun::star::lang::XServiceInfo , public ::com::sun::star::lang::XTypeProvider, public ::cppu::OBroadcastHelper , @@ -57,23 +57,23 @@ class FWE_DLLPUBLIC ActionTriggerPropertySet : public ThreadHelpBase public ::cppu::OWeakObject { public: - ActionTriggerPropertySet( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); - virtual ~ActionTriggerPropertySet(); + FWE_DLLPUBLIC ActionTriggerPropertySet( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + FWE_DLLPUBLIC virtual ~ActionTriggerPropertySet(); // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() throw (); - virtual void SAL_CALL release() throw (); + virtual FWE_DLLPUBLIC void SAL_CALL acquire() throw (); + virtual FWE_DLLPUBLIC void SAL_CALL release() throw (); // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); // XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException); private: //--------------------------------------------------------------------------------------------------------- diff --git a/framework/inc/framework/fwedllapi.h b/framework/inc/framework/fwedllapi.h index 2d818876a0ac..c3aa1bb81d1d 100644 --- a/framework/inc/framework/fwedllapi.h +++ b/framework/inc/framework/fwedllapi.h @@ -5,9 +5,6 @@ #if defined(FWE_DLLIMPLEMENTATION) #define FWE_DLLPUBLIC SAL_DLLPUBLIC_EXPORT -//#include -//template struct FWE_DLLPUBLIC cppu::OBroadcastHelperVar; -//class FWE_DLLPUBLIC SvPtrarr; #else #define FWE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT #endif diff --git a/framework/inc/fwkdllapi.h b/framework/inc/fwkdllapi.h index 45c65b166eb5..a22303386b68 100644 --- a/framework/inc/fwkdllapi.h +++ b/framework/inc/fwkdllapi.h @@ -4,7 +4,5 @@ #include "sal/types.h" #include -#include -template struct FWI_DLLPUBLIC cppu::OBroadcastHelperVar; #endif /* INCLUDED_FWKDLLAPI_H */ diff --git a/framework/inc/helper/popupmenucontrollerbase.hxx b/framework/inc/helper/popupmenucontrollerbase.hxx index c270f22300af..97fa8806a8c7 100644 --- a/framework/inc/helper/popupmenucontrollerbase.hxx +++ b/framework/inc/helper/popupmenucontrollerbase.hxx @@ -64,7 +64,7 @@ namespace framework { - class FWI_DLLPUBLIC PopupMenuControllerBase : public com::sun::star::lang::XTypeProvider , + class PopupMenuControllerBase : public com::sun::star::lang::XTypeProvider , public com::sun::star::lang::XServiceInfo , public ::com::sun::star::frame::XPopupMenuController , public com::sun::star::lang::XInitialization , @@ -78,56 +78,61 @@ namespace framework public ::cppu::OWeakObject { public: - PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); - virtual ~PopupMenuControllerBase(); + FWI_DLLPUBLIC PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + FWI_DLLPUBLIC virtual ~PopupMenuControllerBase(); - // XInterface, XTypeProvider, XServiceInfo - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER + // XInterface + virtual FWI_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); + virtual FWI_DLLPUBLIC void SAL_CALL acquire() throw(); + virtual FWI_DLLPUBLIC void SAL_CALL release() throw(); + + // XTypeProvider + virtual FWI_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); + virtual FWI_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0; - virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0; - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0; + virtual FWI_DLLPUBLIC ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0; + virtual FWI_DLLPUBLIC sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0; + virtual FWI_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0; // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); // XStatusListener - virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0; + virtual FWI_DLLPUBLIC void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0; // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); // XDispatchProvider - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException ); + virtual FWI_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException ); + virtual FWI_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException ); // XDispatch - virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); + virtual FWI_DLLPUBLIC void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException ); + virtual FWI_DLLPUBLIC void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); + virtual FWI_DLLPUBLIC void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); // XEventListener - virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual FWI_DLLPUBLIC void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); // XComponent - virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual FWI_DLLPUBLIC void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); protected: - virtual void resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); - virtual void impl_setPopupMenu(); - virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); - ::rtl::OUString determineBaseURL( const ::rtl::OUString& aURL ); + virtual FWI_DLLPUBLIC void resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); + virtual FWI_DLLPUBLIC void impl_setPopupMenu(); + virtual FWI_DLLPUBLIC void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); + FWI_DLLPUBLIC ::rtl::OUString determineBaseURL( const ::rtl::OUString& aURL ); bool m_bInitialized; diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx index d85f5ac295d0..09045ef24829 100644 --- a/framework/inc/helper/uiconfigelementwrapperbase.hxx +++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx @@ -63,7 +63,7 @@ namespace framework { -class FWE_DLLPUBLIC UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider , +class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider , public ::com::sun::star::ui::XUIElement , public ::com::sun::star::ui::XUIElementSettings , public ::com::sun::star::lang::XInitialization , @@ -79,42 +79,45 @@ class FWE_DLLPUBLIC UIConfigElementWrapperBase : public ::com::sun::star::lang:: // public methods //------------------------------------------------------------------------------------------------------------- public: - UIConfigElementWrapperBase( sal_Int16 nType,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory ); - virtual ~UIConfigElementWrapperBase(); + FWE_DLLPUBLIC UIConfigElementWrapperBase( sal_Int16 nType,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory ); + virtual FWE_DLLPUBLIC ~UIConfigElementWrapperBase(); - //--------------------------------------------------------------------------------------------------------- - // XInterface, XTypeProvider - //--------------------------------------------------------------------------------------------------------- - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER + // XInterface + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); + virtual FWE_DLLPUBLIC void SAL_CALL acquire() throw(); + virtual FWE_DLLPUBLIC void SAL_CALL release() throw(); + + // XTypeProvider + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); // XComponent - virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException) = 0; - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual FWE_DLLPUBLIC void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); // XUIElementSettings - virtual void SAL_CALL updateSettings() throw (::com::sun::star::uno::RuntimeException) = 0; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL updateSettings() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException); // XUIElement - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; // XUpdatable - virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); // XUIConfigurationListener - virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); // XEventListener using cppu::OPropertySetHelper::disposing; - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); //------------------------------------------------------------------------------------------------------------- // protected methods @@ -122,21 +125,21 @@ class FWE_DLLPUBLIC UIConfigElementWrapperBase : public ::com::sun::star::lang:: protected: // OPropertySetHelper - virtual sal_Bool SAL_CALL convertFastPropertyValue ( com::sun::star::uno::Any& aConvertedValue , + virtual FWE_DLLPUBLIC sal_Bool SAL_CALL convertFastPropertyValue ( com::sun::star::uno::Any& aConvertedValue , com::sun::star::uno::Any& aOldValue , sal_Int32 nHandle , const com::sun::star::uno::Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ); - virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , + virtual FWE_DLLPUBLIC void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ); using cppu::OPropertySetHelper::getFastPropertyValue; - virtual void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue , + virtual FWE_DLLPUBLIC void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue , sal_Int32 nHandle ) const; - virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException); - virtual void impl_fillNewData(); + virtual FWE_DLLPUBLIC void impl_fillNewData(); - static const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor(); + static FWE_DLLPUBLIC const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor(); sal_Int16 m_nType; bool m_bPersistent : 1, diff --git a/framework/inc/helper/uielementwrapperbase.hxx b/framework/inc/helper/uielementwrapperbase.hxx index 242a2553f47a..32b23f732c48 100644 --- a/framework/inc/helper/uielementwrapperbase.hxx +++ b/framework/inc/helper/uielementwrapperbase.hxx @@ -58,7 +58,7 @@ namespace framework { -class FWE_DLLPUBLIC UIElementWrapperBase : public ::com::sun::star::lang::XTypeProvider , +class UIElementWrapperBase : public ::com::sun::star::lang::XTypeProvider , public ::com::sun::star::ui::XUIElement , public ::com::sun::star::lang::XInitialization , public ::com::sun::star::lang::XComponent , @@ -72,28 +72,31 @@ class FWE_DLLPUBLIC UIElementWrapperBase : public ::com::sun::star::lang::XTypeP // public methods //------------------------------------------------------------------------------------------------------------- public: - UIElementWrapperBase( sal_Int16 nType ); - virtual ~UIElementWrapperBase(); + FWE_DLLPUBLIC UIElementWrapperBase( sal_Int16 nType ); + virtual FWE_DLLPUBLIC ~UIElementWrapperBase(); - //--------------------------------------------------------------------------------------------------------- - // XInterface, XTypeProvider - //--------------------------------------------------------------------------------------------------------- - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER + // XInterface + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); + virtual FWE_DLLPUBLIC void SAL_CALL acquire() throw(); + virtual FWE_DLLPUBLIC void SAL_CALL release() throw(); + + // XTypeProvider + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); // XComponent - virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException) = 0; - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual FWE_DLLPUBLIC void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); // XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); // XUpdatable - virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); // XUIElement - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; //------------------------------------------------------------------------------------------------------------- // protected methods @@ -101,19 +104,19 @@ class FWE_DLLPUBLIC UIElementWrapperBase : public ::com::sun::star::lang::XTypeP protected: // OPropertySetHelper - virtual sal_Bool SAL_CALL convertFastPropertyValue ( com::sun::star::uno::Any& aConvertedValue , + virtual FWE_DLLPUBLIC sal_Bool SAL_CALL convertFastPropertyValue ( com::sun::star::uno::Any& aConvertedValue , com::sun::star::uno::Any& aOldValue , sal_Int32 nHandle , const com::sun::star::uno::Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ); - virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , + virtual FWE_DLLPUBLIC void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ); using cppu::OPropertySetHelper::getFastPropertyValue; - virtual void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue , + virtual FWE_DLLPUBLIC void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue , sal_Int32 nHandle ) const; - virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException); + virtual FWE_DLLPUBLIC ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException); - static const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor(); + static FWE_DLLPUBLIC const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor(); ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener rtl::OUString m_aResourceURL; diff --git a/framework/inc/uielement/rootitemcontainer.hxx b/framework/inc/uielement/rootitemcontainer.hxx index b6f8e2997d1d..df2920983c3d 100644 --- a/framework/inc/uielement/rootitemcontainer.hxx +++ b/framework/inc/uielement/rootitemcontainer.hxx @@ -62,7 +62,7 @@ namespace framework { class ConstItemContainer; -class FWI_DLLPUBLIC RootItemContainer : public ::com::sun::star::lang::XTypeProvider , +class RootItemContainer : public ::com::sun::star::lang::XTypeProvider , public ::com::sun::star::container::XIndexContainer , public ::com::sun::star::lang::XSingleComponentFactory , public ::com::sun::star::lang::XUnoTunnel , @@ -74,10 +74,10 @@ class FWI_DLLPUBLIC RootItemContainer : public ::com::sun::star::lang::XTypeProv friend class ConstItemContainer; public: - RootItemContainer(); - RootItemContainer( const ConstItemContainer& rConstItemContainer ); - RootItemContainer( const com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess >& rItemAccessContainer ); - virtual ~RootItemContainer(); + FWI_DLLPUBLIC RootItemContainer(); + FWI_DLLPUBLIC RootItemContainer( const ConstItemContainer& rConstItemContainer ); + FWI_DLLPUBLIC RootItemContainer( const com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess >& rItemAccessContainer ); + virtual FWI_DLLPUBLIC ~RootItemContainer(); //--------------------------------------------------------------------------------------------------------- // XInterface, XTypeProvider @@ -86,8 +86,8 @@ class FWI_DLLPUBLIC RootItemContainer : public ::com::sun::star::lang::XTypeProv FWK_DECLARE_XTYPEPROVIDER // XUnoTunnel - static const ::com::sun::star::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw(); - static RootItemContainer* GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw(); + static FWI_DLLPUBLIC const ::com::sun::star::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw(); + static FWI_DLLPUBLIC RootItemContainer* GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw(); sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException); // XIndexContainer From 53c343ce49df7b1f34edd90dd5b4f75227c6171e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 29 Apr 2010 17:05:47 +0200 Subject: [PATCH 025/279] gnumake2: apple gcc does not like DLLPUBLIC forward delcarations --- framework/inc/classes/protocolhandlercache.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/inc/classes/protocolhandlercache.hxx b/framework/inc/classes/protocolhandlercache.hxx index ca54360c626a..ffdcaa1f253b 100644 --- a/framework/inc/classes/protocolhandlercache.hxx +++ b/framework/inc/classes/protocolhandlercache.hxx @@ -133,7 +133,7 @@ typedef BaseHash< ProtocolHandler > HandlerHash; @modified 30.04.2002 11:19, as96863 */ -class FWI_DLLPUBLIC HandlerCFGAccess; +class HandlerCFGAccess; class FWI_DLLPUBLIC HandlerCache { /* member */ From b7c99eb8233af8f6bc0b25de3205e2e769f24783 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 30 Apr 2010 08:27:41 +0200 Subject: [PATCH 026/279] CWS gnumake2: gcc needs RTTI for not exported base class; make if private and exported --- .../inc/helper/popupmenucontrollerbase.hxx | 67 +++++++++---------- framework/util/makefile.pmk | 1 + 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/framework/inc/helper/popupmenucontrollerbase.hxx b/framework/inc/helper/popupmenucontrollerbase.hxx index 97fa8806a8c7..f424c1fbb917 100644 --- a/framework/inc/helper/popupmenucontrollerbase.hxx +++ b/framework/inc/helper/popupmenucontrollerbase.hxx @@ -64,7 +64,7 @@ namespace framework { - class PopupMenuControllerBase : public com::sun::star::lang::XTypeProvider , + class FWI_DLLPUBLIC PopupMenuControllerBase : public com::sun::star::lang::XTypeProvider , public com::sun::star::lang::XServiceInfo , public ::com::sun::star::frame::XPopupMenuController , public com::sun::star::lang::XInitialization , @@ -74,66 +74,65 @@ namespace framework public com::sun::star::frame::XDispatch , public com::sun::star::lang::XComponent , protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. - public ::cppu::OBroadcastHelper , + private ::cppu::OBroadcastHelper , public ::cppu::OWeakObject { public: - FWI_DLLPUBLIC PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); - FWI_DLLPUBLIC virtual ~PopupMenuControllerBase(); + PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + virtual ~PopupMenuControllerBase(); // XInterface - virtual FWI_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); - virtual FWI_DLLPUBLIC void SAL_CALL acquire() throw(); - virtual FWI_DLLPUBLIC void SAL_CALL release() throw(); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); // XTypeProvider - virtual FWI_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); - virtual FWI_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); // XServiceInfo - virtual FWI_DLLPUBLIC ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0; - virtual FWI_DLLPUBLIC sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0; - virtual FWI_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0; + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0; + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0; + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0; // XPopupMenuController - virtual FWI_DLLPUBLIC void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); - virtual FWI_DLLPUBLIC void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); // XInitialization - virtual FWI_DLLPUBLIC void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); // XStatusListener - virtual FWI_DLLPUBLIC void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0; + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0; // XMenuListener - virtual FWI_DLLPUBLIC void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual FWI_DLLPUBLIC void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual FWI_DLLPUBLIC void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual FWI_DLLPUBLIC void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); // XDispatchProvider - virtual FWI_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException ); - virtual FWI_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException ); // XDispatch - virtual FWI_DLLPUBLIC void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException ); - virtual FWI_DLLPUBLIC void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); - virtual FWI_DLLPUBLIC void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); // XEventListener - virtual FWI_DLLPUBLIC void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); // XComponent - virtual FWI_DLLPUBLIC void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); - virtual FWI_DLLPUBLIC void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual FWI_DLLPUBLIC void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); protected: - virtual FWI_DLLPUBLIC void resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); - virtual FWI_DLLPUBLIC void impl_setPopupMenu(); - virtual FWI_DLLPUBLIC void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); - FWI_DLLPUBLIC ::rtl::OUString determineBaseURL( const ::rtl::OUString& aURL ); - + virtual void resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); + virtual void impl_setPopupMenu(); + virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); + ::rtl::OUString determineBaseURL( const ::rtl::OUString& aURL ); bool m_bInitialized; bool m_bDisposed; diff --git a/framework/util/makefile.pmk b/framework/util/makefile.pmk index e567ba01c141..6dc45f466d26 100644 --- a/framework/util/makefile.pmk +++ b/framework/util/makefile.pmk @@ -36,3 +36,4 @@ PATH_SEPERATOR=";" .ENDIF JARFILES = uno.jar +VISIBILITY_HIDDEN=TRUE From a406648e74b01e304b1371044d3d4fb00105604a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 30 Apr 2010 19:46:04 +0200 Subject: [PATCH 027/279] gnumake2: sfx2: fix quickstarter build on MacOSX --- sfx2/prj/target_lib_sfx2.mk | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sfx2/prj/target_lib_sfx2.mk b/sfx2/prj/target_lib_sfx2.mk index 0a93faf16f15..d9b8c52e3736 100644 --- a/sfx2/prj/target_lib_sfx2.mk +++ b/sfx2/prj/target_lib_sfx2.mk @@ -54,13 +54,6 @@ $(eval $(call gb_Library_set_defs,sfx,\ -DABOUTBMPNAMES="$(ABOUTBITMAPS)" \ )) -ifneq ($(OS),UNX) -$(eval $(call gb_Library_set_defs,sfx,\ - $$(DEFS) \ - -DENABLE_QUICKSTART_APPLET \ -)) -endif - $(eval $(call gb_Library_add_linked_libs,sfx,\ comphelper \ cppu \ @@ -258,14 +251,25 @@ $(eval $(call gb_SdiTarget_set_include,sfx2/sdi/sfxslots,\ -I$(SRCDIR)/sfx2/sdi \ )) +ifeq ($(OS),$(filter WNT MACOSX,$(OS))) +$(eval $(call gb_Library_set_defs,sfx,\ + $$(DEFS) \ + -DENABLE_QUICKSTART_APPLET \ +)) +endif + ifeq ($(OS),OS2) $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/appl/shutdowniconOs2.ob \ )) endif -ifeq ($(OS),OSX) -$(eval $(call gb_Library_add_exception_objects,sfx,\ - sfx2/source/appl/shutdowniconaqua.ob \ +ifeq ($(OS),MACOSX) +$(eval $(call gb_Library_add_objcxxobjects,sfx,\ + sfx2/source/appl/shutdowniconaqua \ +)) +$(eval $(call gb_Library_add_linked_libs,sfx,\ + objc \ + Cocoa \ )) endif ifeq ($(OS),WNT) From 5963ef74dbeea6f13e88eeed3145bda83827187d Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 30 Apr 2010 21:26:42 +0200 Subject: [PATCH 028/279] CWS gnumake2: svx cleanup --- svx/util/cui.dxp | 1 - svx/util/cui.flt | 139 ----------------------------------------------- svx/util/dl.flt | 139 ----------------------------------------------- svx/util/svx.flt | 134 --------------------------------------------- 4 files changed, 413 deletions(-) delete mode 100644 svx/util/cui.dxp delete mode 100644 svx/util/cui.flt delete mode 100644 svx/util/dl.flt delete mode 100644 svx/util/svx.flt diff --git a/svx/util/cui.dxp b/svx/util/cui.dxp deleted file mode 100644 index cfee3729bf0c..000000000000 --- a/svx/util/cui.dxp +++ /dev/null @@ -1 +0,0 @@ -CreateDialogFactory diff --git a/svx/util/cui.flt b/svx/util/cui.flt deleted file mode 100644 index 8ab7afd3bf61..000000000000 --- a/svx/util/cui.flt +++ /dev/null @@ -1,139 +0,0 @@ -lcl -+getImplementation -Impl -IMPL -START -CharAttribList -CharPosArray -ContentAttribs -ContentAttribsInfo -ContentInfo -ContentNode -DeletedNodeInfo -EditAttrib -EditCharAttrib -EditDbg -EditDoc -EditEngineItemPool -EditHTMLParser -EditLine -EditNodeIdx -EditPaM -EditPosition -EditRTFParser -EditSel -EditSpellWrapper -EditStyleSheet -EditUndoConnectParas -EditUndoDelContent -EditUndoInsertChars -EditUndoInsertFeature -EditUndoManager -EditUndoMoveParagraphs -EditUndoRemoveChars -EditUndoRemoveFeature -EditUndoSetAttribs -EditUndoSetParaAttribs -EditUndoSetStyleSheet -EditUndoSplitPara -GlobalEditData -IdleFormattter -ImpEditEngine -ImpEditView -InternalEditStatus -ParaPortion -ParagraphList -RTFPardAttrMapIds -RTFPlainAttrMapIds -SelRange -SortedPositions_SAR -SvxACorrChars -SvxColorList -SvxFontTable -SvxRTFStyleType -SvxTabStopArr_SAR -TextPortionList -XEditAttrib -XParaPortionList -BinTextObject -DialogsResMgr -E3dDragMethod -E3dTriangle -GetImp -ImpA -ImpB -ImpBrw -ImpC -ImpCheck -ImpColor -ImpD -ImpDrag -ImpEdCtrl -ImpEdit -ImpF -+ImpGetResStr -ImpGet -ImpH -ImpHide -ImpI -ImpItem -ImpJ -ImpL -ImpList -ImpM -ImpMulti -ImportInfo -ImpP -ImpPaint -ImpPast -ImpRecalc -ImpReset -ImpRemove -ImpRef -ImpReset -ImpS -ImpScroll -ImpSdrGDIMetaFileImport -ImpSet -ImpShow -ImpT -ImpX -OLUndoAttr -OLUndoDepth -OLUndoExpand -OLUndoHeight -OutlinerEditEng -SdrGraphicLink -SdrItemBrowser -SdrOleLink -SpellCache -SvFileObject -WrongList -WrongRanges -XIOCompat -_SdrItemBrowserControl -_SdrItemBrowserWindow -+FmXGridControl -+FmXGridPeer -FmX -FmExp -ODatabaseForm -WEP -LIBMAIN -LibMain -??_5 -??_7 -??_8 -??_9 -??_C -??_E -??_F -??_G -??_H -??_I -___CT -_alloc -_CT -exception::exception -_TI2 -___CT diff --git a/svx/util/dl.flt b/svx/util/dl.flt deleted file mode 100644 index 8ab7afd3bf61..000000000000 --- a/svx/util/dl.flt +++ /dev/null @@ -1,139 +0,0 @@ -lcl -+getImplementation -Impl -IMPL -START -CharAttribList -CharPosArray -ContentAttribs -ContentAttribsInfo -ContentInfo -ContentNode -DeletedNodeInfo -EditAttrib -EditCharAttrib -EditDbg -EditDoc -EditEngineItemPool -EditHTMLParser -EditLine -EditNodeIdx -EditPaM -EditPosition -EditRTFParser -EditSel -EditSpellWrapper -EditStyleSheet -EditUndoConnectParas -EditUndoDelContent -EditUndoInsertChars -EditUndoInsertFeature -EditUndoManager -EditUndoMoveParagraphs -EditUndoRemoveChars -EditUndoRemoveFeature -EditUndoSetAttribs -EditUndoSetParaAttribs -EditUndoSetStyleSheet -EditUndoSplitPara -GlobalEditData -IdleFormattter -ImpEditEngine -ImpEditView -InternalEditStatus -ParaPortion -ParagraphList -RTFPardAttrMapIds -RTFPlainAttrMapIds -SelRange -SortedPositions_SAR -SvxACorrChars -SvxColorList -SvxFontTable -SvxRTFStyleType -SvxTabStopArr_SAR -TextPortionList -XEditAttrib -XParaPortionList -BinTextObject -DialogsResMgr -E3dDragMethod -E3dTriangle -GetImp -ImpA -ImpB -ImpBrw -ImpC -ImpCheck -ImpColor -ImpD -ImpDrag -ImpEdCtrl -ImpEdit -ImpF -+ImpGetResStr -ImpGet -ImpH -ImpHide -ImpI -ImpItem -ImpJ -ImpL -ImpList -ImpM -ImpMulti -ImportInfo -ImpP -ImpPaint -ImpPast -ImpRecalc -ImpReset -ImpRemove -ImpRef -ImpReset -ImpS -ImpScroll -ImpSdrGDIMetaFileImport -ImpSet -ImpShow -ImpT -ImpX -OLUndoAttr -OLUndoDepth -OLUndoExpand -OLUndoHeight -OutlinerEditEng -SdrGraphicLink -SdrItemBrowser -SdrOleLink -SpellCache -SvFileObject -WrongList -WrongRanges -XIOCompat -_SdrItemBrowserControl -_SdrItemBrowserWindow -+FmXGridControl -+FmXGridPeer -FmX -FmExp -ODatabaseForm -WEP -LIBMAIN -LibMain -??_5 -??_7 -??_8 -??_9 -??_C -??_E -??_F -??_G -??_H -??_I -___CT -_alloc -_CT -exception::exception -_TI2 -___CT diff --git a/svx/util/svx.flt b/svx/util/svx.flt deleted file mode 100644 index 26520493b8ca..000000000000 --- a/svx/util/svx.flt +++ /dev/null @@ -1,134 +0,0 @@ -lcl -+getImplementation -Impl -IMPL -START -CharAttribList -CharPosArray -ContentAttribs -ContentAttribsInfo -ContentInfo -ContentNode -DeletedNodeInfo -EditAttrib -EditCharAttrib -EditDbg -EditDoc -EditEngineItemPool -EditHTMLParser -EditLine -EditNodeIdx -EditPaM -EditPosition -EditRTFParser -EditSel -EditSpellWrapper -EditStyleSheet -EditUndoConnectParas -EditUndoDelContent -EditUndoInsertChars -EditUndoInsertFeature -EditUndoManager -EditUndoMoveParagraphs -EditUndoRemoveChars -EditUndoRemoveFeature -EditUndoSetAttribs -EditUndoSetParaAttribs -EditUndoSetStyleSheet -EditUndoSplitPara -GlobalEditData -IdleFormattter -ImpEditEngine -ImpEditView -InternalEditStatus -ParaPortion -ParagraphList -RTFPardAttrMapIds -RTFPlainAttrMapIds -SelRange -SortedPositions_SAR -SvxACorrChars -SvxColorList -SvxFontTable -SvxRTFStyleType -SvxTabStopArr_SAR -TextPortionList -XEditAttrib -XParaPortionList -BinTextObject -E3dDragMethod -E3dTriangle -GetImp -ImpA -ImpB -ImpBrw -ImpC -ImpCheck -ImpColor -ImpD -ImpDrag -ImpEdCtrl -ImpEdit -ImpF -ImpGet -ImpH -ImpHide -ImpI -ImpItem -ImpJ -ImpL -ImpList -ImpM -ImpMulti -ImportInfo -ImpP -ImpPaint -ImpPast -ImpRecalc -ImpReset -ImpRemove -ImpRef -ImpReset -ImpS -ImpScroll -ImpSdrGDIMetaFileImport -ImpSet -ImpShow -ImpT -ImpX -OLUndoAttr -OLUndoDepth -OLUndoExpand -OLUndoHeight -OutlinerEditEng -SdrGraphicLink -SdrItemBrowser -SdrOleLink -SpellCache -SvFileObject -WrongList -WrongRanges -XIOCompat -_SdrItemBrowserControl -_SdrItemBrowserWindow -+FmXGridPeer -+FmXGridControl -FmX -FmExp -ODatabaseForm -WEP -LIBMAIN -LibMain -??_5 -??_7 -??_8 -??_9 -??_C -??_E -??_F -??_G -??_H -??_I -__CT -union_impl -alternative From fd59f40e43247af3ee1a2b728c21348f3c6b597e Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 30 Apr 2010 21:27:17 +0200 Subject: [PATCH 029/279] CWS gnumake2: first gbuild version for svx --- svx/Makefile | 36 +++ svx/prj/makefile.mk | 2 + svx/prj/target_lib_svx.mk | 261 ++++++++++++++++++++ svx/prj/target_lib_svxcore.mk | 450 ++++++++++++++++++++++++++++++++++ svx/prj/target_module_svx.mk | 52 ++++ svx/prj/target_package_inc.mk | 154 ++++++++++++ svx/prj/target_res_svx.mk | 112 +++++++++ 7 files changed, 1067 insertions(+) create mode 100644 svx/Makefile create mode 100644 svx/prj/makefile.mk create mode 100644 svx/prj/target_lib_svx.mk create mode 100644 svx/prj/target_lib_svxcore.mk create mode 100644 svx/prj/target_module_svx.mk create mode 100644 svx/prj/target_package_inc.mk create mode 100644 svx/prj/target_res_svx.mk diff --git a/svx/Makefile b/svx/Makefile new file mode 100644 index 000000000000..963c7870d955 --- /dev/null +++ b/svx/Makefile @@ -0,0 +1,36 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + + +gb_CURRENT_MODULE := $(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))) + +$(eval $(call gb_Module_make_global_targets,$(gb_CURRENT_MODULE))) + + diff --git a/svx/prj/makefile.mk b/svx/prj/makefile.mk new file mode 100644 index 000000000000..2a0b99e72fd5 --- /dev/null +++ b/svx/prj/makefile.mk @@ -0,0 +1,2 @@ +all: + cd .. && make -srj9 diff --git a/svx/prj/target_lib_svx.mk b/svx/prj/target_lib_svx.mk new file mode 100644 index 000000000000..6810f7f30fed --- /dev/null +++ b/svx/prj/target_lib_svx.mk @@ -0,0 +1,261 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,svx)) + +$(eval $(call gb_Library_set_include,svx,\ + $$(SOLARINC) \ + -I$(WORKDIR)/inc/svx/ \ + -I$(SRCDIR)/svx/inc \ + -I$(SRCDIR)/svx/source/inc \ + -I$(SRCDIR)/svx/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_defs,svx,\ + $$(DEFS) \ + -DACCESSIBLE_LAYOUT \ + -DSVX_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,svx,\ + basegfx \ + sb \ + comphelper \ + cppuhelper \ + cppu \ + drawinglayer \ + editeng \ + i18nisolang1 \ + icuuc \ + sal \ + sfx \ + sot \ + svl \ + svt \ + svxcore \ + tk \ + tl \ + ucbhelper \ + utl \ + vcl \ + vos3 \ + xo \ + xcr \ + stl \ +)) + +# svx/source/unodialogs/textconversiondlgs/services \ +# svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog \ +# svx/source/unodialogs/textconversiondlgs/chinese_translationdialog \ +# svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog \ +# svx/source/unodialogs/textconversiondlgs/resid \ + + +$(eval $(call gb_Library_add_exception_objects,svx,\ + svx/source/unodraw/recoveryui \ + svx/source/unodraw/unoshcol \ + svx/source/unodraw/unoctabl \ + svx/source/unodraw/unopool \ + svx/source/unodraw/UnoNamespaceMap \ + svx/source/tbxctrls/layctrl \ + svx/source/tbxctrls/tbxcolor \ + svx/source/tbxctrls/formatpaintbrushctrl \ + svx/source/tbxctrls/colrctrl \ + svx/source/tbxctrls/itemwin \ + svx/source/tbxctrls/tbxalign \ + svx/source/tbxctrls/fillctrl \ + svx/source/tbxctrls/tbunocontroller \ + svx/source/tbxctrls/subtoolboxcontrol \ + svx/source/tbxctrls/grafctrl \ + svx/source/tbxctrls/linectrl \ + svx/source/tbxctrls/tbxdrctl \ + svx/source/tbxctrls/verttexttbxctrl \ + svx/source/tbxctrls/lboxctrl \ + svx/source/table/tablertfexporter \ + svx/source/table/tablertfimporter \ + svx/source/table/accessiblecell \ + svx/source/table/accessibletableshape \ + svx/source/table/tabledesign \ + svx/source/table/celleditsource \ + svx/source/svdraw/svdoimp \ + svx/source/svdraw/svdscrol \ + svx/source/svdraw/ActionDescriptionProvider \ + svx/source/svdraw/impgrfll \ + svx/source/items/SmartTagItem \ + svx/source/items/svxempty \ + svx/source/items/viewlayoutitem \ + svx/source/items/zoomslideritem \ + svx/source/items/hlnkitem \ + svx/source/items/numfmtsh \ + svx/source/items/algitem \ + svx/source/items/zoomitem \ + svx/source/items/ofaitem \ + svx/source/items/pageitem \ + svx/source/items/numinf \ + svx/source/items/postattr \ + svx/source/items/rotmodit \ + svx/source/items/svxerr \ + svx/source/form/databaselocationinput \ + svx/source/form/fmsrcimp \ + svx/source/form/filtnav \ + svx/source/form/tabwin \ + svx/source/form/fmsrccfg \ + svx/source/form/fmobjfac \ + svx/source/form/tbxform \ + svx/source/form/fmPropBrw \ + svx/source/form/dbcharsethelper \ + svx/source/stbctrls/pszctrl \ + svx/source/stbctrls/insctrl \ + svx/source/stbctrls/selctrl \ + svx/source/stbctrls/xmlsecctrl \ + svx/source/stbctrls/modctrl \ + svx/source/stbctrls/zoomsliderctrl \ + svx/source/stbctrls/zoomctrl \ + svx/source/gengal/gengal \ + svx/source/unogallery/unogaltheme \ + svx/source/unogallery/unogalitem \ + svx/source/unogallery/unogalthemeprovider \ + svx/source/mnuctrls/SmartTagCtl \ + svx/source/mnuctrls/fntctl \ + svx/source/mnuctrls/clipboardctl \ + svx/source/mnuctrls/fntszctl \ + svx/source/fmcomp/dbaobjectex \ + svx/source/smarttags/SmartTagMgr \ + svx/source/accessibility/AccessibleOLEShape \ + svx/source/accessibility/AccessibleShapeTreeInfo \ + svx/source/accessibility/DGColorNameLookUp \ + svx/source/accessibility/charmapacc \ + svx/source/accessibility/AccessibleShape \ + svx/source/accessibility/AccessibleTextHelper \ + svx/source/accessibility/svxrectctaccessiblecontext \ + svx/source/accessibility/AccessibleGraphicShape \ + svx/source/accessibility/AccessibleEmptyEditSource \ + svx/source/accessibility/ChildrenManagerImpl \ + svx/source/accessibility/AccessibleShapeInfo \ + svx/source/accessibility/DescriptionGenerator \ + svx/source/accessibility/ShapeTypeHandler \ + svx/source/accessibility/ChildrenManager \ + svx/source/accessibility/AccessibleControlShape \ + svx/source/accessibility/AccessibleTextEventQueue \ + svx/source/accessibility/AccessibleFrameSelector \ + svx/source/accessibility/SvxShapeTypes \ + svx/source/accessibility/GraphCtlAccessibleContext \ + svx/source/customshapes/tbxcustomshapes \ + svx/source/engine3d/float3d \ + svx/source/engine3d/volume3d \ + svx/source/engine3d/viewpt3d \ + svx/source/dialog/srchdlg \ + svx/source/dialog/rubydialog \ + svx/source/dialog/srchctrl \ + svx/source/dialog/paraprev \ + svx/source/dialog/fontwork \ + svx/source/dialog/framelinkarray \ + svx/source/dialog/svxbmpnumvalueset \ + svx/source/dialog/hyperdlg \ + svx/source/dialog/wrapfield \ + svx/source/dialog/svxruler \ + svx/source/dialog/ctredlin \ + svx/source/dialog/rulritem \ + svx/source/dialog/dialcontrol \ + svx/source/dialog/databaseregistrationui \ + svx/source/dialog/txencbox \ + svx/source/dialog/charmap \ + svx/source/dialog/passwd \ + svx/source/dialog/dlgctrl \ + svx/source/dialog/hdft \ + svx/source/dialog/frmdirlbox \ + svx/source/dialog/fntctrl \ + svx/source/dialog/docrecovery \ + svx/source/dialog/checklbx \ + svx/source/dialog/swframeposstrings \ + svx/source/dialog/svxgrahicitem \ + svx/source/dialog/relfld \ + svx/source/dialog/SpellDialogChildWindow \ + svx/source/dialog/strarray \ + svx/source/dialog/prtqry \ + svx/source/dialog/connctrl \ + svx/source/dialog/contwnd \ + svx/source/dialog/pfiledlg \ + svx/source/dialog/dlgctl3d \ + svx/source/dialog/hyprlink \ + svx/source/dialog/grfflt \ + svx/source/dialog/measctrl \ + svx/source/dialog/orienthelper \ + svx/source/dialog/frmsel \ + svx/source/dialog/swframeexample \ + svx/source/dialog/_bmpmask \ + svx/source/dialog/graphctl \ + svx/source/dialog/rlrcitem \ + svx/source/dialog/fontlb \ + svx/source/dialog/optgrid \ + svx/source/dialog/imapwnd \ + svx/source/dialog/pagectrl \ + svx/source/dialog/_contdlg \ + svx/source/dialog/txenctab \ + svx/source/dialog/imapdlg \ + svx/source/customshapes/EnhancedCustomShape3d \ + svx/source/customshapes/EnhancedCustomShapeHandle \ + svx/source/customshapes/EnhancedCustomShapeEngine \ + svx/source/customshapes/EnhancedCustomShapeFontWork \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_exception_objects,svx,\ + svx/source/dialog/sendreportunx \ +)) +$(eval $(call gb_Library_add_linked_libs,svx,\ + dl \ + m \ + pthread \ +)) +else +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,svx,\ + advapi32 \ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +$(eval $(call gb_Library_add_exception_objects,svx,\ + svx/source/dialog/sendreportw32 \ +)) +)) +else +$(eval $(call gb_Library_add_exception_objects,svx,\ + svx/source/dialog/sendreportgen \ +)) +endif + +$(eval $(call gb_Library_add_linked_libs,svx,\ + shell \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/svx/prj/target_lib_svxcore.mk b/svx/prj/target_lib_svxcore.mk new file mode 100644 index 000000000000..d268c7e91f68 --- /dev/null +++ b/svx/prj/target_lib_svxcore.mk @@ -0,0 +1,450 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,svxcore)) + +$(eval $(call gb_Library_add_sdi_headers,svx,svx/sdi/svxslots)) + +$(eval $(call gb_Library_set_include,svxcore,\ + $$(SOLARINC) \ + -I$(WORKDIR)/inc/svx/ \ + -I$(SRCDIR)/svx/inc \ + -I$(SRCDIR)/svx/source/inc \ + -I$(SRCDIR)/svx/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ + -I$(WORKDIR)/inc/svx/sdi \ +)) + +$(eval $(call gb_Library_set_defs,svxcore,\ + $$(DEFS) \ + -DACCESSIBLE_LAYOUT \ + -DSVX_DLLIMPLEMENTATION \ + -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ +)) + +$(eval $(call gb_Library_add_linked_libs,svxcore,\ + avmedia \ + basegfx \ + sb \ + comphelper \ + cppuhelper \ + cppu \ + drawinglayer \ + editeng \ + fwe \ + i18nisolang1 \ + icuuc \ + lng \ + sal \ + sfx \ + sot \ + svl \ + svt \ + tk \ + tl \ + ucbhelper \ + utl \ + vcl \ + vos3 \ + xo \ +)) + +$(eval $(call gb_Library_add_exception_objects,svxcore,\ + svx/source/sdr/animation/scheduler \ + svx/source/sdr/animation/objectanimator \ + svx/source/sdr/animation/animationstate \ + svx/source/sdr/attribute/sdrlinefillshadowtextattribute \ + svx/source/sdr/attribute/sdrfilltextattribute \ + svx/source/sdr/attribute/sdrshadowtextattribute \ + svx/source/sdr/attribute/sdrtextattribute \ + svx/source/sdr/attribute/sdrlineshadowtextattribute \ + svx/source/sdr/attribute/sdrformtextattribute \ + svx/source/sdr/attribute/sdrformtextoutlineattribute \ + svx/source/sdr/contact/viewobjectcontactofgroup \ + svx/source/sdr/contact/viewobjectcontactofsdrpage \ + svx/source/sdr/contact/viewcontactofpageobj \ + svx/source/sdr/contact/viewcontactofe3d \ + svx/source/sdr/contact/viewcontactofe3dcube \ + svx/source/sdr/contact/viewcontactofsdrmediaobj \ + svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor \ + svx/source/sdr/contact/viewobjectcontactofpageobj \ + svx/source/sdr/contact/viewobjectcontactofe3dscene \ + svx/source/sdr/contact/viewcontactofgraphic \ + svx/source/sdr/contact/viewobjectcontactredirector \ + svx/source/sdr/contact/viewcontactofsdrcircobj \ + svx/source/sdr/contact/viewcontactofgroup \ + svx/source/sdr/contact/viewcontactofunocontrol \ + svx/source/sdr/contact/viewcontactofsdrobjcustomshape \ + svx/source/sdr/contact/viewcontactofsdrobj \ + svx/source/sdr/contact/objectcontact \ + svx/source/sdr/contact/viewcontactoftextobj \ + svx/source/sdr/contact/viewcontactofe3dlathe \ + svx/source/sdr/contact/viewcontactofsdrpage \ + svx/source/sdr/contact/viewcontactofe3dextrude \ + svx/source/sdr/contact/viewcontactofmasterpagedescriptor \ + svx/source/sdr/contact/viewcontact \ + svx/source/sdr/contact/viewcontactofsdrole2obj \ + svx/source/sdr/contact/displayinfo \ + svx/source/sdr/contact/objectcontacttools \ + svx/source/sdr/contact/viewcontactofe3dscene \ + svx/source/sdr/contact/viewcontactofsdrrectobj \ + svx/source/sdr/contact/viewobjectcontactofsdrole2obj \ + svx/source/sdr/contact/viewobjectcontactofunocontrol \ + svx/source/sdr/contact/viewobjectcontactofgraphic \ + svx/source/sdr/contact/sdrmediawindow \ + svx/source/sdr/contact/viewobjectcontactofsdrmediaobj \ + svx/source/sdr/contact/viewcontactofsdrcaptionobj \ + svx/source/sdr/contact/viewcontactofvirtobj \ + svx/source/sdr/contact/viewcontactofe3dsphere \ + svx/source/sdr/contact/viewcontactofe3dpolygon \ + svx/source/sdr/contact/viewcontactofsdredgeobj \ + svx/source/sdr/contact/viewobjectcontact \ + svx/source/sdr/contact/viewobjectcontactofsdrobj \ + svx/source/sdr/contact/objectcontactofpageview \ + svx/source/sdr/contact/viewcontactofsdrpathobj \ + svx/source/sdr/contact/viewcontactofsdrmeasureobj \ + svx/source/sdr/contact/objectcontactofobjlistpainter \ + svx/source/sdr/contact/viewobjectcontactofe3d \ + svx/source/customshapes/EnhancedCustomShapeGeometry \ + svx/source/customshapes/EnhancedCustomShapeTypeNames \ + svx/source/customshapes/EnhancedCustomShape2d \ + svx/source/customshapes/EnhancedCustomShapeFunctionParser \ + svx/source/dialog/dialmgr \ + svx/source/dialog/dlgutil \ + svx/source/dialog/framelink \ + svx/source/dialog/langbox \ + svx/source/dialog/simptabl \ + svx/source/dialog/svxdlg \ + svx/source/dialog/stddlg \ + svx/source/engine3d/deflt3d \ + svx/source/engine3d/polysc3d \ + svx/source/engine3d/sphere3d \ + svx/source/engine3d/helperminimaldepth3d \ + svx/source/engine3d/obj3d \ + svx/source/engine3d/dragmt3d \ + svx/source/engine3d/scene3d \ + svx/source/engine3d/view3d \ + svx/source/engine3d/e3dsceneupdater \ + svx/source/engine3d/viewpt3d2 \ + svx/source/engine3d/svx3ditems \ + svx/source/engine3d/camera3d \ + svx/source/engine3d/e3dundo \ + svx/source/engine3d/objfac3d \ + svx/source/engine3d/lathe3d \ + svx/source/engine3d/polygn3d \ + svx/source/engine3d/view3d1 \ + svx/source/engine3d/cube3d \ + svx/source/engine3d/helperhittest3d \ + svx/source/engine3d/extrud3d \ + svx/source/sdr/event/eventhandler \ + svx/source/fmcomp/gridctrl \ + svx/source/fmcomp/xmlexchg \ + svx/source/fmcomp/trace \ + svx/source/fmcomp/fmgridcl \ + svx/source/fmcomp/gridcell \ + svx/source/fmcomp/dbaexchange \ + svx/source/fmcomp/gridcols \ + svx/source/fmcomp/fmgridif \ + svx/source/form/formfeaturedispatcher \ + svx/source/form/typeconversionclient \ + svx/source/form/fmpgeimp \ + svx/source/form/fmcontrolbordermanager \ + svx/source/form/fmshell \ + svx/source/form/fmundo \ + svx/source/form/ParseContext \ + svx/source/form/fmexpl \ + svx/source/form/fmtools \ + svx/source/form/fmexch \ + svx/source/form/formcontroller \ + svx/source/form/dataaccessdescriptor \ + svx/source/form/fmtextcontrolshell \ + svx/source/form/datalistener \ + svx/source/form/formcontrolfactory \ + svx/source/form/sdbdatacolumn \ + svx/source/form/fmview \ + svx/source/form/delayedevent \ + svx/source/form/fmservs \ + svx/source/form/fmobj \ + svx/source/form/fmdocumentclassification \ + svx/source/form/sqlparserclient \ + svx/source/form/fmshimp \ + svx/source/form/typemap \ + svx/source/form/fmscriptingenv \ + svx/source/form/dbtoolsclient \ + svx/source/form/fmpage \ + svx/source/form/stringlistresource \ + svx/source/form/fmmodel \ + svx/source/form/formtoolbars \ + svx/source/form/fmdpage \ + svx/source/form/fmitems \ + svx/source/form/navigatortreemodel \ + svx/source/form/fmvwimp \ + svx/source/form/fmtextcontrolfeature \ + svx/source/form/fmdmod \ + svx/source/form/fmcontrollayout \ + svx/source/form/fmtextcontroldialogs \ + svx/source/form/formdispatchinterceptor \ + svx/source/form/formcontrolling \ + svx/source/form/navigatortree \ + svx/source/form/datanavi \ + svx/source/form/legacyformcontroller \ + svx/source/form/xfm_addcondition \ + svx/source/gallery2/galexpl \ + svx/source/gallery2/galtheme \ + svx/source/gallery2/galctrl \ + svx/source/gallery2/gallery1 \ + svx/source/gallery2/galmisc \ + svx/source/gallery2/galobj \ + svx/source/gallery2/galbrws2 \ + svx/source/gallery2/galbrws \ + svx/source/gallery2/galbrws1 \ + svx/source/gallery2/codec \ + svx/source/items/drawitem \ + svx/source/items/chrtitem \ + svx/source/items/e3ditem \ + svx/source/items/grfitem \ + svx/source/items/clipfmtitem \ + svx/source/items/customshapeitem \ + svx/source/sdr/overlay/overlayline \ + svx/source/sdr/overlay/overlaycrosshair \ + svx/source/sdr/overlay/overlayrollingrectangle \ + svx/source/sdr/overlay/overlaytriangle \ + svx/source/sdr/overlay/overlayselection \ + svx/source/sdr/overlay/overlayhatchrect \ + svx/source/sdr/overlay/overlaybitmapex \ + svx/source/sdr/overlay/overlaymanagerbuffered \ + svx/source/sdr/overlay/overlayhelpline \ + svx/source/sdr/overlay/overlayanimatedbitmapex \ + svx/source/sdr/overlay/overlaypolypolygon \ + svx/source/sdr/overlay/overlayobjectcell \ + svx/source/sdr/overlay/overlaytools \ + svx/source/sdr/overlay/overlayprimitive2dsequenceobject \ + svx/source/sdr/overlay/overlayobject \ + svx/source/sdr/overlay/overlaymanager \ + svx/source/sdr/overlay/overlayobjectlist \ + svx/source/sdr/primitive2d/sdrellipseprimitive2d \ + svx/source/sdr/primitive2d/sdrprimitivetools \ + svx/source/sdr/primitive2d/sdrtextprimitive2d \ + svx/source/sdr/primitive2d/primitivefactory2d \ + svx/source/sdr/primitive2d/sdrolecontentprimitive2d \ + svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d \ + svx/source/sdr/primitive2d/sdrgrafprimitive2d \ + svx/source/sdr/primitive2d/sdrole2primitive2d \ + svx/source/sdr/primitive2d/sdrpathprimitive2d \ + svx/source/sdr/primitive2d/sdrrectangleprimitive2d \ + svx/source/sdr/primitive2d/sdrcaptionprimitive2d \ + svx/source/sdr/primitive2d/sdrconnectorprimitive2d \ + svx/source/sdr/primitive2d/sdrmeasureprimitive2d \ + svx/source/sdr/primitive2d/sdrattributecreator \ + svx/source/sdr/primitive2d/sdrdecompositiontools \ + svx/source/sdr/primitive3d/sdrattributecreator3d \ + svx/source/sdr/properties/pageproperties \ + svx/source/sdr/properties/e3dsceneproperties \ + svx/source/sdr/properties/itemsettools \ + svx/source/sdr/properties/captionproperties \ + svx/source/sdr/properties/e3dextrudeproperties \ + svx/source/sdr/properties/e3dproperties \ + svx/source/sdr/properties/measureproperties \ + svx/source/sdr/properties/customshapeproperties \ + svx/source/sdr/properties/rectangleproperties \ + svx/source/sdr/properties/groupproperties \ + svx/source/sdr/properties/properties \ + svx/source/sdr/properties/e3dlatheproperties \ + svx/source/sdr/properties/graphicproperties \ + svx/source/sdr/properties/circleproperties \ + svx/source/sdr/properties/emptyproperties \ + svx/source/sdr/properties/e3dsphereproperties \ + svx/source/sdr/properties/defaultproperties \ + svx/source/sdr/properties/textproperties \ + svx/source/sdr/properties/attributeproperties \ + svx/source/sdr/properties/connectorproperties \ + svx/source/sdr/properties/e3dcompoundproperties \ + svx/source/sdr/properties/oleproperties \ + svx/source/svdraw/svdglev \ + svx/source/svdraw/svdhdl \ + svx/source/svdraw/svdomedia \ + svx/source/svdraw/svdedxv \ + svx/source/svdraw/svdoedge \ + svx/source/svdraw/svdundo \ + svx/source/svdraw/svdmrkv1 \ + svx/source/svdraw/svdotxfl \ + svx/source/svdraw/sdrcomment \ + svx/source/svdraw/svdcrtv \ + svx/source/svdraw/svdouno \ + svx/source/svdraw/svditer \ + svx/source/svdraw/svdotxln \ + svx/source/svdraw/svdxcgv \ + svx/source/svdraw/svdomeas \ + svx/source/svdraw/svdpntv \ + svx/source/svdraw/svdattr \ + svx/source/svdraw/svdotxdr \ + svx/source/svdraw/svdtext \ + svx/source/svdraw/svdedtv2 \ + svx/source/svdraw/svddrag \ + svx/source/svdraw/svdopage \ + svx/source/svdraw/svddrgmt \ + svx/source/svdraw/svdogrp \ + svx/source/svdraw/svdovirt \ + svx/source/svdraw/svddrgv \ + svx/source/svdraw/sdrpaintwindow \ + svx/source/svdraw/polypolygoneditor \ + svx/source/svdraw/svdpoev \ + svx/source/svdraw/svdotextpathdecomposition \ + svx/source/svdraw/svdmrkv \ + svx/source/svdraw/svdview \ + svx/source/svdraw/svdoashp \ + svx/source/svdraw/svdoutlinercache \ + svx/source/svdraw/svdetc \ + svx/source/svdraw/svdlayer \ + svx/source/svdraw/svdfmtf \ + svx/source/svdraw/gradtrns \ + svx/source/svdraw/svdotxed \ + svx/source/svdraw/svdhlpln \ + svx/source/svdraw/svdedtv \ + svx/source/svdraw/svdmodel \ + svx/source/svdraw/svdopath \ + svx/source/svdraw/svdtrans \ + svx/source/svdraw/svdpagv \ + svx/source/svdraw/svdorect \ + svx/source/svdraw/svdedtv1 \ + svx/source/svdraw/svdograf \ + svx/source/svdraw/sdrhittesthelper \ + svx/source/svdraw/svdglue \ + svx/source/svdraw/svdobj \ + svx/source/svdraw/svdsnpv \ + svx/source/svdraw/svdotext \ + svx/source/svdraw/svdoattr \ + svx/source/svdraw/svdviter \ + svx/source/svdraw/svdpage \ + svx/source/svdraw/svdoole2 \ + svx/source/svdraw/svdibrow \ + svx/source/svdraw/sdrmasterpagedescriptor \ + svx/source/svdraw/svdocapt \ + svx/source/svdraw/svdmark \ + svx/source/svdraw/svdocirc \ + svx/source/svdraw/selectioncontroller \ + svx/source/svdraw/clonelist \ + svx/source/svdraw/svdotxtr \ + svx/source/svdraw/svdoutl \ + svx/source/svdraw/sdrpagewindow \ + svx/source/svdraw/svdotxat \ + svx/source/svdraw/svdotextdecomposition \ + svx/source/table/tablecontroller \ + svx/source/table/tablerow \ + svx/source/table/tablelayouter \ + svx/source/table/tablecolumn \ + svx/source/table/tablemodel \ + svx/source/table/svdotable \ + svx/source/table/cellcursor \ + svx/source/table/propertyset \ + svx/source/table/tablecolumns \ + svx/source/table/viewcontactoftableobj \ + svx/source/table/cellrange \ + svx/source/table/tableundo \ + svx/source/table/tablerows \ + svx/source/table/tablehandles \ + svx/source/table/cell \ + svx/source/tbxctrls/fontworkgallery \ + svx/source/tbxctrls/extrusioncontrols \ + svx/source/tbxctrls/tbcontrl \ + svx/source/tbxctrls/toolbarmenu \ + svx/source/tbxctrls/tbxcolorupdate \ + svx/source/toolbars/fontworkbar \ + svx/source/toolbars/extrusionbar \ + svx/source/unodraw/unoshap4 \ + svx/source/unodraw/unomlstr \ + svx/source/unodraw/unoshtxt \ + svx/source/unodraw/gluepts \ + svx/source/unodraw/shapepropertynotifier \ + svx/source/unodraw/tableshape \ + svx/source/unodraw/unohtabl \ + svx/source/unodraw/unoshape \ + svx/source/unodraw/UnoGraphicExporter \ + svx/source/unodraw/unobtabl \ + svx/source/unodraw/XPropertyTable \ + svx/source/unodraw/unoshap3 \ + svx/source/unodraw/unottabl \ + svx/source/unodraw/UnoNameItemTable \ + svx/source/unodraw/unogtabl \ + svx/source/unodraw/unomod \ + svx/source/unodraw/unopage \ + svx/source/unodraw/unoprov \ + svx/source/unodraw/unomtabl \ + svx/source/unodraw/unoshap2 \ + svx/source/unodraw/unodtabl \ + svx/source/xml/xmlexport \ + svx/source/xml/xmlgrhlp \ + svx/source/xml/xmlxtimp \ + svx/source/xml/xmlxtexp \ + svx/source/xml/xmleohlp \ + svx/source/xoutdev/xtablend \ + svx/source/xoutdev/xattr \ + svx/source/xoutdev/xtabgrdt \ + svx/source/xoutdev/xtabhtch \ + svx/source/xoutdev/_xoutbmp \ + svx/source/xoutdev/xtabdash \ + svx/source/xoutdev/xtabbtmp \ + svx/source/xoutdev/xexch \ + svx/source/xoutdev/xtabcolr \ + svx/source/xoutdev/xattr2 \ + svx/source/xoutdev/xtable \ + svx/source/xoutdev/xattrbmp \ + svx/source/xoutdev/_xpoly \ + svx/source/xoutdev/xpool \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,svxcore,\ + dl \ + m \ + pthread \ + stl \ +)) +endif + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,svxcore,\ + advapi32 \ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif + +$(eval $(call gb_SdiTarget_SdiTarget,svx/sdi/svxslots,svx/sdi/svx)) + + +$(eval $(call gb_SdiTarget_set_include,svx/sdi/svxslots,\ + $$(INCLUDE) \ + -I$(SRCDIR)/svx/inc \ + -I$(SRCDIR)/svx/sdi \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/svx/prj/target_module_svx.mk b/svx/prj/target_module_svx.mk new file mode 100644 index 000000000000..5978c97e5500 --- /dev/null +++ b/svx/prj/target_module_svx.mk @@ -0,0 +1,52 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Module_Module,svx,\ + $(call gb_AllLangResTarget_get_target,svx) \ + $(call gb_Library_get_target,svxcore) \ + $(call gb_Library_get_target,svx) \ +)) + +$(eval $(call gb_Module_read_includes,svx,\ + lib_svx \ + lib_svxcore \ + res_svx \ +)) + +#todo: noopt for EnhanceCustomShapesFunctionParser.cxx on Solaris Sparc and MacOSX +#todo: -DBOOST_SPIRIT_USE_OLD_NAMESPACE only in CustomShapes +#todo: -DUNICODE and -D_UNICODE on WNT for source/dialog +#todo: noopt for viewpt3d.cxx with MSVC and ICC +#todo: set -DENABLE_VBA in case $(ENABLE_VBA)="YES"; can we do it in gbuild.mk? +#todo: gengal +#todo: set -D... for ENABLE_GTK/KDE/KDE4 -> in gbuild.mk? +#todo: ibrwimp.lib in util/makefile.mk on Windows ?! +#todo: GENHID +#todo: uiconfig +#todo: exports from gallery (util/gal.dxp) and svx (svx.dxp) +#todo: resources, textconversion, packages + diff --git a/svx/prj/target_package_inc.mk b/svx/prj/target_package_inc.mk new file mode 100644 index 000000000000..dd836b286f8b --- /dev/null +++ b/svx/prj/target_package_inc.mk @@ -0,0 +1,154 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,sfx2_inc,$(SRCDIR)/sfx2/inc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/appuno.hxx,sfx2/appuno.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basedlgs.hxx,sfx2/basedlgs.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basmgr.hxx,sfx2/basmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/bindings.hxx,sfx2/bindings.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/brokenpackageint.hxx,sfx2/brokenpackageint.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/chalign.hxx,sfx2/chalign.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/childwin.hxx,sfx2/childwin.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/cntids.hrc,sfx2/cntids.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/controlwrapper.hxx,sfx2/controlwrapper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ctrlitem.hxx,sfx2/ctrlitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dialogs.hrc,sfx2/dialogs.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfdlg.hxx,sfx2/dinfdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfedt.hxx,sfx2/dinfedt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dispatch.hxx,sfx2/dispatch.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dllapi.h,sfx2/dllapi.h)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfac.hxx,sfx2/docfac.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfile.hxx,sfx2/docfile.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfilt.hxx,sfx2/docfilt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinf.hxx,sfx2/docinf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinsert.hxx,sfx2/docinsert.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dockwin.hxx,sfx2/dockwin.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docmacromode.hxx,sfx2/docmacromode.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docstoragemodifylistener.hxx,sfx2/docstoragemodifylistener.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctdlg.hxx,sfx2/doctdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctempl.hxx,sfx2/doctempl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/event.hxx,sfx2/event.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/evntconf.hxx,sfx2/evntconf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/fcontnr.hxx,sfx2/fcontnr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/filedlghelper.hxx,sfx2/filedlghelper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frame.hxx,sfx2/frame.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmdescr.hxx,sfx2/frmdescr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtml.hxx,sfx2/frmhtml.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtmlw.hxx,sfx2/frmhtmlw.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/genlink.hxx,sfx2/genlink.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/hintpost.hxx,sfx2/hintpost.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imagemgr.hxx,sfx2/imagemgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgdef.hxx,sfx2/imgdef.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgmgr.hxx,sfx2/imgmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ipclient.hxx,sfx2/ipclient.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemconnect.hxx,sfx2/itemconnect.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemwrapper.hxx,sfx2/itemwrapper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-post.hxx,sfx2/layout-post.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-pre.hxx,sfx2/layout-pre.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-tabdlg.hxx,sfx2/layout-tabdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linkmgr.hxx,sfx2/linkmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linksrc.hxx,sfx2/linksrc.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/lnkbase.hxx,sfx2/lnkbase.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/macrconf.hxx,sfx2/macrconf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mailmodelapi.hxx,sfx2/mailmodelapi.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mgetempl.hxx,sfx2/mgetempl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mieclip.hxx,sfx2/mieclip.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minarray.hxx,sfx2/minarray.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minfitem.hxx,sfx2/minfitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minstack.hxx,sfx2/minstack.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnuitem.hxx,sfx2/mnuitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnumgr.hxx,sfx2/mnumgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/module.hxx,sfx2/module.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msg.hxx,sfx2/msg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msgpool.hxx,sfx2/msgpool.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/navigat.hxx,sfx2/navigat.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/new.hxx,sfx2/new.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/newstyle.hxx,sfx2/newstyle.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objface.hxx,sfx2/objface.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objitem.hxx,sfx2/objitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objsh.hxx,sfx2/objsh.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/opengrf.hxx,sfx2/opengrf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/passwd.hxx,sfx2/passwd.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printer.hxx,sfx2/printer.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printopt.hxx,sfx2/printopt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/prnmon.hxx,sfx2/prnmon.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/progress.hxx,sfx2/progress.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/querystatus.hxx,sfx2/querystatus.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/request.hxx,sfx2/request.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfx.hrc,sfx2/sfx.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasecontroller.hxx,sfx2/sfxbasecontroller.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasemodel.hxx,sfx2/sfxbasemodel.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdefs.hxx,sfx2/sfxdefs.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdlg.hxx,sfx2/sfxdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhelp.hxx,sfx2/sfxhelp.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhtml.hxx,sfx2/sfxhtml.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxmodelfactory.hxx,sfx2/sfxmodelfactory.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxresid.hxx,sfx2/sfxresid.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxsids.hrc,sfx2/sfxsids.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxstatuslistener.hxx,sfx2/sfxstatuslistener.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxuno.hxx,sfx2/sfxuno.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/shell.hxx,sfx2/shell.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/signaturestate.hxx,sfx2/signaturestate.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/stbitem.hxx,sfx2/stbitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styfitem.hxx,sfx2/styfitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styledlg.hxx,sfx2/styledlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tabdlg.hxx,sfx2/tabdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tbxctrl.hxx,sfx2/tbxctrl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templdlg.hxx,sfx2/templdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tplpitem.hxx,sfx2/tplpitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/unoctitm.hxx,sfx2/unoctitm.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sfx2/userinputinterception.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfac.hxx,sfx2/viewfac.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfrm.hxx,sfx2/viewfrm.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewsh.hxx,sfx2/viewsh.hxx)) + + + + + + + + + + + + + + + + + + + + diff --git a/svx/prj/target_res_svx.mk b/svx/prj/target_res_svx.mk new file mode 100644 index 000000000000..67d3cfab1cc1 --- /dev/null +++ b/svx/prj/target_res_svx.mk @@ -0,0 +1,112 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,svx)) + +$(eval $(call gb_AllLangResTarget_set_reslocation,svx,svx)) +#$(eval $(call gb_AllLangResTarget_set_reslocation,svx,svx/source/svdraw)) + +$(eval $(call gb_AllLangResTarget_add_srs,svx,\ + svx/res \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,svx/res)) + +$(eval $(call gb_SrsTarget_set_include,svx/res,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc \ + -I$(WORKDIR)/inc \ + -I$(SRCDIR)/svx/source/inc \ + -I$(SRCDIR)/svx/source/dialog \ + -I$(SRCDIR)/svx/inc/ \ + -I$(SRCDIR)/svx/unxlngi6.pro/inc/ \ +)) + +#svx/source/src/errtxt.src +#svx/source/src/app.src + +#svx/source/intro/iso.src +#svx/source/intro/ooo.src + +#svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.src +#svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src + +$(eval $(call gb_SrsTarget_add_files,svx/res,\ + svx/source/stbctrls/stbctrls.src \ + svx/source/dialog/passwd.src \ + svx/source/dialog/language.src \ + svx/source/dialog/bmpmask.src \ + svx/source/dialog/ucsubset.src \ + svx/source/dialog/hdft.src \ + svx/source/dialog/imapdlg.src \ + svx/source/dialog/swframeposstrings.src \ + svx/source/dialog/prtqry.src \ + svx/source/dialog/txenctab.src \ + svx/source/dialog/dlgctrl.src \ + svx/source/dialog/frmsel.src \ + svx/source/dialog/ctredlin.src \ + svx/source/dialog/sdstring.src \ + svx/source/dialog/ruler.src \ + svx/source/dialog/srchdlg.src \ + svx/source/dialog/optgrid.src \ + svx/source/dialog/langbox.src \ + svx/source/dialog/contdlg.src \ + svx/source/dialog/rubydialog.src \ + svx/source/dialog/fontwork.src \ + svx/source/dialog/docrecovery.src \ + svx/source/dialog/hyprlink.src \ + svx/source/dialog/svxbmpnumvalueset.src \ + svx/source/engine3d/string3d.src \ + svx/source/engine3d/float3d.src \ + svx/source/mnuctrls/mnuctrls.src \ + svx/source/tbxctrls/linectrl.src \ + svx/source/tbxctrls/colrctrl.src \ + svx/source/tbxctrls/extrusioncontrols.src \ + svx/source/tbxctrls/tbxdraw.src \ + svx/source/tbxctrls/grafctrl.src \ + svx/source/tbxctrls/lboxctrl.src \ + svx/source/tbxctrls/tbcontrl.src \ + svx/source/tbxctrls/fontworkgallery.src \ + svx/source/fmcomp/gridctrl.src \ + svx/source/form/fmexpl.src \ + svx/source/form/formshell.src \ + svx/source/form/fmstring.src \ + svx/source/form/datanavi.src \ + svx/source/form/filtnav.src \ + svx/source/unodraw/unodraw.src \ + svx/source/table/table.src \ + svx/source/toolbars/extrusionbar.src \ + svx/source/toolbars/fontworkbar.src \ + svx/source/gallery2/galtheme.src \ + svx/source/gallery2/gallery.src \ + svx/source/svdraw/svdstr.src \ + svx/source/accessibility/accessibility.src \ + svx/source/items/svxitems.src \ + svx/source/items/svxerr.src \ +)) + + From abb3fd0f277363a870a6e441f0d0c2ce8ced5e5f Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 6 May 2010 14:56:47 +0200 Subject: [PATCH 030/279] CWS gnumake2: found missing return statement by accident --- sfx2/source/control/unoctitm.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index d2ad8c645eb7..114db6385b76 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -463,7 +463,7 @@ void SfxOfficeDispatch::SetMasterUnoCommand( sal_Bool bSet ) sal_Bool SfxOfficeDispatch::IsMasterUnoCommand() const { if ( pControllerItem ) - pControllerItem->isMasterSlaveCommand(); + return pControllerItem->isMasterSlaveCommand(); return sal_False; } From c2c267562f199efdfa2e3787cba014a0541e8066 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 6 May 2010 15:13:08 +0200 Subject: [PATCH 031/279] CWS gnumake2: don't create static libs in tools --- shell/source/tools/lngconvex/makefile.mk | 4 ++-- svx/inc/pch/precompiled_svx.hxx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/shell/source/tools/lngconvex/makefile.mk b/shell/source/tools/lngconvex/makefile.mk index da28e5ff68f4..3ee6298e744f 100644 --- a/shell/source/tools/lngconvex/makefile.mk +++ b/shell/source/tools/lngconvex/makefile.mk @@ -58,8 +58,8 @@ APP1STDLIBS= $(SALLIB)\ $(I18NISOLANGLIB) .IF "$(COM)"!="GCC" -APP1STDLIBS+= $(TOOLSLIBST) \ - msvcprt.lib +APP1STDLIBS+= msvcprt.lib +#$(TOOLSLIBST) .ENDIF # --- Targets ------------------------------------------------------ diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx index 95ed1449c846..03cfd7df85fd 100644 --- a/svx/inc/pch/precompiled_svx.hxx +++ b/svx/inc/pch/precompiled_svx.hxx @@ -55,7 +55,6 @@ #include "boost/scoped_ptr.hpp" #include "boost/shared_ptr.hpp" #include "boost/spirit/include/classic_core.hpp" -#include "bootstrp/sstring.hxx" #include "com/sun/star/accessibility/AccessibleEventId.hpp" #include "com/sun/star/accessibility/AccessibleEventObject.hpp" #include "com/sun/star/accessibility/AccessibleRelationType.hpp" From 137b283deb31f38a25d9996dc1a0c2057d39998a Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Tue, 1 Jun 2010 17:28:33 +0200 Subject: [PATCH 032/279] CWS gnumake2: fitting sdi into the workdir structure --- sfx2/prj/target_lib_sfx2.mk | 7 +++---- svx/prj/target_lib_svxcore.mk | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sfx2/prj/target_lib_sfx2.mk b/sfx2/prj/target_lib_sfx2.mk index d9b8c52e3736..952fb9ce05f5 100644 --- a/sfx2/prj/target_lib_sfx2.mk +++ b/sfx2/prj/target_lib_sfx2.mk @@ -35,14 +35,13 @@ $(eval $(call gb_Library_add_package_headers,sfx,\ $(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) $(eval $(call gb_Library_set_include,sfx,\ - $$(INCLUDE) \ - -I$(WORKDIR)/inc/sfx2/sdi \ - -I$(WORKDIR)/inc/sfx2 \ - -I$(WORKDIR)/inc/ \ -I$(SRCDIR)/sfx2/inc \ -I$(SRCDIR)/sfx2/inc/sfx2 \ -I$(SRCDIR)/sfx2/source/inc \ -I$(SRCDIR)/sfx2/inc/pch \ + -I$(WORKDIR)/SdiTarget/sfx2/sdi \ + -I$(WORKDIR)/inc/ \ + $$(INCLUDE) \ -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ $(LIBXML_CFLAGS) \ diff --git a/svx/prj/target_lib_svxcore.mk b/svx/prj/target_lib_svxcore.mk index d268c7e91f68..f337588232fb 100644 --- a/svx/prj/target_lib_svxcore.mk +++ b/svx/prj/target_lib_svxcore.mk @@ -30,14 +30,13 @@ $(eval $(call gb_Library_Library,svxcore)) $(eval $(call gb_Library_add_sdi_headers,svx,svx/sdi/svxslots)) $(eval $(call gb_Library_set_include,svxcore,\ - $$(SOLARINC) \ - -I$(WORKDIR)/inc/svx/ \ -I$(SRCDIR)/svx/inc \ -I$(SRCDIR)/svx/source/inc \ -I$(SRCDIR)/svx/inc/pch \ + -I$(WORKDIR)/SdiTarget/svx/sdi \ + $$(INCLUDE) \ -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ - -I$(WORKDIR)/inc/svx/sdi \ )) $(eval $(call gb_Library_set_defs,svxcore,\ From b25e198437049b3db6d70a4fb81713fd937b6f5a Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 18 Jun 2010 19:03:40 +0200 Subject: [PATCH 033/279] CWS gnumake2: enabling precompiled headers where possible --- framework/prj/target_lib_fwe.mk | 2 +- framework/prj/target_lib_fwi.mk | 2 +- framework/prj/target_lib_fwk.mk | 8 +++++--- framework/prj/target_lib_fwl.mk | 2 +- framework/prj/target_lib_fwm.mk | 2 +- sfx2/prj/target_lib_sfx2.mk | 2 ++ xmloff/prj/target_lib_xo.mk | 4 +++- xmloff/prj/target_lib_xof.mk | 8 ++++---- 8 files changed, 18 insertions(+), 12 deletions(-) diff --git a/framework/prj/target_lib_fwe.mk b/framework/prj/target_lib_fwe.mk index 9387cad85a67..1cd47b05cb24 100644 --- a/framework/prj/target_lib_fwe.mk +++ b/framework/prj/target_lib_fwe.mk @@ -27,7 +27,7 @@ $(eval $(call gb_Library_Library,fwe)) -$(call gb_Library_get_headers_target,fwe) : $(call gb_Package_get_target,framework_inc) +$(eval $(call gb_Library_add_package_headers,fwe,framework_inc)) $(eval $(call gb_Library_set_include,fwe,\ $$(INCLUDE) \ diff --git a/framework/prj/target_lib_fwi.mk b/framework/prj/target_lib_fwi.mk index 0c1d9a63fedf..1d53d9b1ab6e 100644 --- a/framework/prj/target_lib_fwi.mk +++ b/framework/prj/target_lib_fwi.mk @@ -27,7 +27,7 @@ $(eval $(call gb_Library_Library,fwi)) -$(call gb_Library_get_headers_target,fwi) : $(call gb_Package_get_target,framework_inc) +$(eval $(call gb_Library_add_package_headers,fwi,framework_inc)) $(eval $(call gb_Library_set_defs,fwi,\ $$(DEFS) \ diff --git a/framework/prj/target_lib_fwk.mk b/framework/prj/target_lib_fwk.mk index 272f57e7df36..37b5fbcb586e 100644 --- a/framework/prj/target_lib_fwk.mk +++ b/framework/prj/target_lib_fwk.mk @@ -27,14 +27,16 @@ $(eval $(call gb_Library_Library,fwk)) -$(call gb_Library_get_headers_target,fwk) : $(call gb_Package_get_target,framework_inc) +$(eval $(call gb_Library_add_package_headers,fwk,framework_inc)) + +$(eval $(call gb_Library_add_precompiled_header,fwk,$(SRCDIR)/framework/inc/pch/precompiled_framework)) $(eval $(call gb_Library_set_include,fwk,\ - $$(INCLUDE) \ - -I$(WORKDIR)/inc/framework/ \ -I$(SRCDIR)/framework/inc \ -I$(SRCDIR)/framework/inc/pch \ -I$(SRCDIR)/framework/source/inc \ + -I$(WORKDIR)/inc/framework/ \ + $$(INCLUDE) \ -I$(OUTDIR)/inc/framework \ -I$(OUTDIR)/inc/offuh \ )) diff --git a/framework/prj/target_lib_fwl.mk b/framework/prj/target_lib_fwl.mk index 8e549041cae3..a43ab9544493 100644 --- a/framework/prj/target_lib_fwl.mk +++ b/framework/prj/target_lib_fwl.mk @@ -27,7 +27,7 @@ $(eval $(call gb_Library_Library,fwl)) -$(call gb_Library_get_headers_target,fwl) : $(call gb_Package_get_target,framework_inc) +$(eval $(call gb_Library_add_package_headers,fwl,framework_inc)) $(eval $(call gb_Library_set_include,fwl,\ $$(INCLUDE) \ diff --git a/framework/prj/target_lib_fwm.mk b/framework/prj/target_lib_fwm.mk index e0b4df3ef2c8..0c84ab2de2a4 100644 --- a/framework/prj/target_lib_fwm.mk +++ b/framework/prj/target_lib_fwm.mk @@ -27,7 +27,7 @@ $(eval $(call gb_Library_Library,fwm)) -$(call gb_Library_get_headers_target,fwm) : $(call gb_Package_get_target,framework_inc) +$(eval $(call gb_Library_add_package_headers,fwm,framework_inc)) $(eval $(call gb_Library_set_include,fwm,\ $$(INCLUDE) \ diff --git a/sfx2/prj/target_lib_sfx2.mk b/sfx2/prj/target_lib_sfx2.mk index 952fb9ce05f5..9c1dc852e69c 100644 --- a/sfx2/prj/target_lib_sfx2.mk +++ b/sfx2/prj/target_lib_sfx2.mk @@ -32,6 +32,8 @@ $(eval $(call gb_Library_add_package_headers,sfx,\ sfx2_sdi \ )) +#$(eval $(call gb_Library_add_precompiled_header,sfx,$(SRCDIR)/sfx2/inc/pch/precompiled_sfx2)) + $(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) $(eval $(call gb_Library_set_include,sfx,\ diff --git a/xmloff/prj/target_lib_xo.mk b/xmloff/prj/target_lib_xo.mk index d503388be383..5a13d5053f93 100644 --- a/xmloff/prj/target_lib_xo.mk +++ b/xmloff/prj/target_lib_xo.mk @@ -27,7 +27,9 @@ $(eval $(call gb_Library_Library,xo)) -$(call gb_Library_get_headers_target,xo) : $(call gb_Package_get_target,xo_inc) +$(eval $(call gb_Library_add_package_headers,xo,xmloff_inc)) + +$(eval $(call gb_Library_add_precompiled_header,xo,$(SRCDIR)/xmloff/inc/pch/precompiled_xmloff)) $(eval $(call gb_Library_set_include,xo,\ $$(SOLARINC) \ diff --git a/xmloff/prj/target_lib_xof.mk b/xmloff/prj/target_lib_xof.mk index a414106da31e..320aafbf12fe 100644 --- a/xmloff/prj/target_lib_xof.mk +++ b/xmloff/prj/target_lib_xof.mk @@ -28,13 +28,13 @@ $(eval $(call gb_Library_Library,xof)) $(eval $(call gb_Library_set_include,xof,\ - $$(SOLARINC) \ - -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/xmloff/inc/pch \ -I$(SRCDIR)/xmloff/inc \ -I$(SRCDIR)/xmloff/source/inc \ - -I$(SRCDIR)/xmloff/inc/pch \ - -I$(OUTDIR)/inc/offuh \ + -I$(WORKDIR)/inc/ \ + $$(INCLUDE) \ -I$(OUTDIR)/inc \ + -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_add_linked_libs,xof,\ From 20942b145dddc64e3af471ba13710e37f8c60ebb Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Mon, 21 Jun 2010 16:17:24 +0200 Subject: [PATCH 034/279] CWS gnumake2: pch for debug builds, fixing header package deps --- framework/prj/target_lib_fwe.mk | 8 +++----- framework/prj/target_lib_fwi.mk | 6 +++--- framework/prj/target_lib_fwk.mk | 4 +--- framework/prj/target_lib_fwl.mk | 6 ++---- framework/prj/target_lib_fwm.mk | 8 +++----- 5 files changed, 12 insertions(+), 20 deletions(-) diff --git a/framework/prj/target_lib_fwe.mk b/framework/prj/target_lib_fwe.mk index 1cd47b05cb24..718e9c38ea22 100644 --- a/framework/prj/target_lib_fwe.mk +++ b/framework/prj/target_lib_fwe.mk @@ -27,14 +27,12 @@ $(eval $(call gb_Library_Library,fwe)) -$(eval $(call gb_Library_add_package_headers,fwe,framework_inc)) - $(eval $(call gb_Library_set_include,fwe,\ - $$(INCLUDE) \ - -I$(WORKDIR)/inc/framework/ \ - -I$(SRCDIR)/framework/inc \ -I$(SRCDIR)/framework/inc/pch \ -I$(SRCDIR)/framework/source/inc \ + -I$(SRCDIR)/framework/inc \ + -I$(WORKDIR)/inc/framework/ \ + $$(INCLUDE) \ -I$(OUTDIR)/inc/framework \ -I$(OUTDIR)/inc/offuh \ )) diff --git a/framework/prj/target_lib_fwi.mk b/framework/prj/target_lib_fwi.mk index 1d53d9b1ab6e..0e00df9d8300 100644 --- a/framework/prj/target_lib_fwi.mk +++ b/framework/prj/target_lib_fwi.mk @@ -35,11 +35,11 @@ $(eval $(call gb_Library_set_defs,fwi,\ )) $(eval $(call gb_Library_set_include,fwi,\ - $$(INCLUDE) \ - -I$(WORKDIR)/inc/framework/ \ - -I$(SRCDIR)/framework/inc \ -I$(SRCDIR)/framework/inc/pch \ -I$(SRCDIR)/framework/source/inc \ + -I$(SRCDIR)/framework/inc \ + -I$(WORKDIR)/inc/framework/ \ + $$(INCLUDE) \ -I$(OUTDIR)/inc/framework \ -I$(OUTDIR)/inc/offuh \ )) diff --git a/framework/prj/target_lib_fwk.mk b/framework/prj/target_lib_fwk.mk index 37b5fbcb586e..8ff8adb4e5fb 100644 --- a/framework/prj/target_lib_fwk.mk +++ b/framework/prj/target_lib_fwk.mk @@ -27,14 +27,12 @@ $(eval $(call gb_Library_Library,fwk)) -$(eval $(call gb_Library_add_package_headers,fwk,framework_inc)) - $(eval $(call gb_Library_add_precompiled_header,fwk,$(SRCDIR)/framework/inc/pch/precompiled_framework)) $(eval $(call gb_Library_set_include,fwk,\ - -I$(SRCDIR)/framework/inc \ -I$(SRCDIR)/framework/inc/pch \ -I$(SRCDIR)/framework/source/inc \ + -I$(SRCDIR)/framework/inc \ -I$(WORKDIR)/inc/framework/ \ $$(INCLUDE) \ -I$(OUTDIR)/inc/framework \ diff --git a/framework/prj/target_lib_fwl.mk b/framework/prj/target_lib_fwl.mk index a43ab9544493..f3ec59fd6c61 100644 --- a/framework/prj/target_lib_fwl.mk +++ b/framework/prj/target_lib_fwl.mk @@ -27,14 +27,12 @@ $(eval $(call gb_Library_Library,fwl)) -$(eval $(call gb_Library_add_package_headers,fwl,framework_inc)) - $(eval $(call gb_Library_set_include,fwl,\ - $$(INCLUDE) \ - -I$(WORKDIR)/inc/framework/ \ -I$(SRCDIR)/framework/inc \ -I$(SRCDIR)/framework/inc/pch \ -I$(SRCDIR)/framework/source/inc \ + -I$(WORKDIR)/inc/framework/ \ + $$(INCLUDE) \ -I$(OUTDIR)/inc/framework \ -I$(OUTDIR)/inc/offuh \ )) diff --git a/framework/prj/target_lib_fwm.mk b/framework/prj/target_lib_fwm.mk index 0c84ab2de2a4..56a6a9f74f6b 100644 --- a/framework/prj/target_lib_fwm.mk +++ b/framework/prj/target_lib_fwm.mk @@ -27,14 +27,12 @@ $(eval $(call gb_Library_Library,fwm)) -$(eval $(call gb_Library_add_package_headers,fwm,framework_inc)) - $(eval $(call gb_Library_set_include,fwm,\ - $$(INCLUDE) \ - -I$(WORKDIR)/inc/framework/ \ - -I$(SRCDIR)/framework/inc \ -I$(SRCDIR)/framework/inc/pch \ + -I$(SRCDIR)/framework/inc \ -I$(SRCDIR)/framework/source/inc \ + -I$(WORKDIR)/inc/framework/ \ + $$(INCLUDE) \ -I$(OUTDIR)/inc/framework \ -I$(OUTDIR)/inc/offuh \ )) From 2b1c9f5c63f4d90db0137b1c8c91340bb2559115 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 22 Jun 2010 11:12:01 +0200 Subject: [PATCH 035/279] dockingwindows: #i112595# First refactoring version of the layout manager including skeleton classes for new docking windows --- framework/inc/services.h | 4 + framework/inc/services/layoutmanager.hxx | 140 +- framework/inc/services/modelwinservice.hxx | 122 + framework/inc/uielement/panelwindow.hxx | 81 + framework/inc/uielement/panelwrapper.hxx | 70 + framework/inc/uielement/uielement.hxx | 146 + framework/source/layoutmanager/helpers.cxx | 304 + framework/source/layoutmanager/helpers.hxx | 85 + .../source/layoutmanager/layoutmanager.cxx | 3255 +------- .../layoutmanager/layoutmanager.cxx.bak | 7388 +++++++++++++++++ framework/source/layoutmanager/makefile.mk | 15 +- framework/source/layoutmanager/panel.cxx | 88 + framework/source/layoutmanager/panel.hxx | 88 + .../source/layoutmanager/panelmanager.cxx | 184 + .../source/layoutmanager/panelmanager.hxx | 109 + .../layoutmanager/toolbarlayoutmanager.cxx | 3915 +++++++++ .../layoutmanager/toolbarlayoutmanager.hxx | 318 + framework/source/layoutmanager/uielement.cxx | 156 + framework/source/services/makefile.mk | 3 +- framework/source/services/modelwinservice.cxx | 279 + framework/source/uielement/makefile.mk | 2 + framework/source/uielement/panelwindow.cxx | 77 + framework/source/uielement/panelwrapper.cxx | 227 + framework/util/makefile.mk | 10 +- 24 files changed, 13814 insertions(+), 3252 deletions(-) create mode 100755 framework/inc/services/modelwinservice.hxx create mode 100755 framework/inc/uielement/panelwindow.hxx create mode 100755 framework/inc/uielement/panelwrapper.hxx create mode 100755 framework/inc/uielement/uielement.hxx create mode 100755 framework/source/layoutmanager/helpers.cxx create mode 100755 framework/source/layoutmanager/helpers.hxx create mode 100755 framework/source/layoutmanager/layoutmanager.cxx.bak create mode 100755 framework/source/layoutmanager/panel.cxx create mode 100755 framework/source/layoutmanager/panel.hxx create mode 100755 framework/source/layoutmanager/panelmanager.cxx create mode 100755 framework/source/layoutmanager/panelmanager.hxx create mode 100755 framework/source/layoutmanager/toolbarlayoutmanager.cxx create mode 100755 framework/source/layoutmanager/toolbarlayoutmanager.hxx create mode 100755 framework/source/layoutmanager/uielement.cxx create mode 100755 framework/source/services/modelwinservice.cxx create mode 100755 framework/source/uielement/panelwindow.cxx create mode 100755 framework/source/uielement/panelwrapper.cxx diff --git a/framework/inc/services.h b/framework/inc/services.h index 9c19f8b6251e..bdd6221eff9c 100644 --- a/framework/inc/services.h +++ b/framework/inc/services.h @@ -125,6 +125,8 @@ namespace framework{ #define SERVICENAME_TABWINDOWSERVICE DECLARE_ASCII("com.sun.star.ui.dialogs.TabContainerWindow" ) #define SERVICENAME_WINDOWCONTENTFACTORYMANAGER DECLARE_ASCII("com.sun.star.ui.WindowContentFactoryManager" ) #define SERVICENAME_DISPLAYACCESS DECLARE_ASCII("com.sun.star.awt.DisplayAccess" ) +#define SERVICENAME_PANELFACTORY DECLARE_ASCII("com.sun.star.ui.PanelFactory" ) +#define SERVICENAME_MODELWINSERVICE DECLARE_ASCII("com.sun.star.ui.ModelWinService" ) //_________________________________________________________________________________________________________________ // used implementationnames by framework @@ -211,6 +213,8 @@ namespace framework{ #define IMPLEMENTATIONNAME_IMAGEMANAGER DECLARE_ASCII("com.sun.star.comp.framework.ImageManager" ) #define IMPLEMENTATIONNAME_TABWINDOWSERVICE DECLARE_ASCII("com.sun.star.comp.framework.TabWindowService" ) #define IMPLEMENTATIONNAME_WINDOWCONTENTFACTORYMANAGER DECLARE_ASCII("com.sun.star.comp.framework.WindowContentFactoryManager" ) +#define IMPLEMENTATIONNAME_PANELFACTORY DECLARE_ASCII("com.sun.star.comp.framework.PanelFactory" ) +#define IMPLEMENTATIONNAME_MODELWINSERVICE DECLARE_ASCII("com.sun.star.comp.framework.ModelWinService" ) } // namespace framework diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 2ccba9e7ffde..898d1c240b2b 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -6,6 +6,9 @@ * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -50,6 +53,8 @@ #include #include #include +#include +#include //_________________________________________________________________________________________________________________ // interface includes @@ -87,6 +92,8 @@ class MenuBar; namespace framework { + class ToolbarLayoutManager; + class PanelManager; class GlobalSettings; typedef ::cppu::WeakImplHelper9 < ::com::sun::star::lang::XServiceInfo , ::com::sun::star::frame::XLayoutManager @@ -233,101 +240,19 @@ namespace framework sal_Int16 m_nLines; sal_Bool m_bIsHorizontal; }; - struct SingleRowColumnWindowData - { - SingleRowColumnWindowData() : nVarSize( 0 ), nStaticSize( 0 ), nSpace( 0 ) {} - - std::vector< rtl::OUString > aUIElementNames; - std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > aRowColumnWindows; - std::vector< ::com::sun::star::awt::Rectangle > aRowColumnWindowSizes; - std::vector< sal_Int32 > aRowColumnSpace; - ::com::sun::star::awt::Rectangle aRowColumnRect; - sal_Int32 nVarSize; - sal_Int32 nStaticSize; - sal_Int32 nSpace; - sal_Int32 nRowColumn; - }; protected: DECL_LINK( AsyncLayoutHdl, Timer * ); private: - enum DockingOperation - { - DOCKOP_BEFORE_COLROW, - DOCKOP_ON_COLROW, - DOCKOP_AFTER_COLROW - }; - struct UIElement - { - UIElement() : m_bFloating( sal_False ), - m_bVisible( sal_True ), - m_bUserActive( sal_False ), - m_bCreateNewRowCol0( sal_False ), - m_bDeactiveHide( sal_False ), - m_bMasterHide( sal_False ), - m_bContextSensitive( sal_False ), - m_bContextActive( sal_True ), - m_bNoClose( sal_False ), - m_bSoftClose( sal_False ), - m_bStateRead( sal_False ), - m_nStyle( BUTTON_SYMBOL ) - {} - - UIElement( const rtl::OUString& rName, - const rtl::OUString& rType, - const com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement, - sal_Bool bFloating = sal_False - ) : m_aType( rType ), - m_aName( rName ), - m_xUIElement( rUIElement ), - m_bFloating( bFloating ), - m_bVisible( sal_True ), - m_bUserActive( sal_False ), - m_bCreateNewRowCol0( sal_False ), - m_bDeactiveHide( sal_False ), - m_bMasterHide( sal_False ), - m_bContextSensitive( sal_False ), - m_bContextActive( sal_True ), - m_bNoClose( sal_False ), - m_bSoftClose( sal_False ), - m_bStateRead( sal_False ), - m_nStyle( BUTTON_SYMBOL ) {} - - bool operator< ( const UIElement& aUIElement ) const; - UIElement& operator=( const UIElement& rUIElement ); - - rtl::OUString m_aType; - rtl::OUString m_aName; - rtl::OUString m_aUIName; - com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement; - sal_Bool m_bFloating, - m_bVisible, - m_bUserActive, - m_bCreateNewRowCol0, - m_bDeactiveHide, - m_bMasterHide, - m_bContextSensitive, - m_bContextActive; - sal_Bool m_bNoClose, - m_bSoftClose, - m_bStateRead; - sal_Int16 m_nStyle; - DockedData m_aDockedData; - FloatingData m_aFloatingData; - }; - typedef std::vector< UIElement > UIElementVector; - //--------------------------------------------------------------------------------------------------------- - // helper - //--------------------------------------------------------------------------------------------------------- - //--------------------------------------------------------------------------------------------------------- // helper //--------------------------------------------------------------------------------------------------------- void impl_clearUpMenuBar(); void implts_reset( sal_Bool bAttach ); + void implts_setMenuBarCloser(sal_Bool bCloserState); void implts_updateMenuBarClose(); sal_Bool implts_resetMenuBar(); @@ -347,60 +272,25 @@ namespace framework void implts_setElementData( UIElement& rUIElement, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDockableWindow >& rDockWindow ); void implts_sortUIElements(); void implts_destroyElements(); - void implts_destroyDockingAreaWindows(); - void implts_createAddonsToolBars(); - void implts_createCustomToolBars(); - void implts_createNonContextSensitiveToolBars(); - void implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aCustomTbxSeq ); - void implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ); void implts_toggleFloatingUIElementsVisibility( sal_Bool bActive ); void implts_reparentChildWindows(); + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createDockingWindow( const ::rtl::OUString& aElementName ); sal_Bool implts_isEmbeddedLayoutManager() const; sal_Int16 implts_getCurrentSymbolsSize(); sal_Int16 implts_getCurrentSymbolsStyle(); - ::com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > implts_createToolkitWindow( const ::com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rParent ); ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createElement( const rtl::OUString& aName ); - rtl::OUString implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const; - - // docking methods - ::Rectangle implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ); - void implts_calcDockingPosSize( UIElement& aUIElement, DockingOperation& eDockOperation, ::Rectangle& rTrackingRect, const Point& rMousePos ); - DockingOperation implts_determineDockingOperation( ::com::sun::star::ui::DockingArea DockingArea, const ::Rectangle& rRowColRect, const Point& rMousePos ); - ::Rectangle implts_getWindowRectFromRowColumn( ::com::sun::star::ui::DockingArea DockingArea, const SingleRowColumnWindowData& rRowColumnWindowData, const ::Point& rMousePos, const rtl::OUString& rExcludeElementName ); - ::Rectangle implts_determineFrontDockingRect( ::com::sun::star::ui::DockingArea eDockingArea, - sal_Int32 nRowCol, - const ::Rectangle& rDockedElementRect, - const ::rtl::OUString& rMovedElementName, - const ::Rectangle& rMovedElementRect ); - void implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockingArea, - sal_Int32 nOffset, - SingleRowColumnWindowData& rRowColumnWindowData, - const ::Size& rContainerSize ); - ::Rectangle implts_calcTrackingAndElementRect( ::com::sun::star::ui::DockingArea eDockingArea, - sal_Int32 nRowCol, - UIElement& rUIElement, - const ::Rectangle& rTrackingRect, - const ::Rectangle& rRowColumnRect, - const ::Size& rContainerWinSize ); - void implts_renumberRowColumnData( ::com::sun::star::ui::DockingArea eDockingArea, DockingOperation eDockingOperation, const UIElement& rUIElement ); // layouting methods sal_Bool implts_compareRectangles( const ::com::sun::star::awt::Rectangle& rRect1, const ::com::sun::star::awt::Rectangle& rRect2 ); sal_Bool implts_resizeContainerWindow( const ::com::sun::star::awt::Size& rContainerSize, const ::com::sun::star::awt::Point& rComponentPos ); ::Size implts_getTopBottomDockingAreaSizes(); ::Size implts_getContainerWindowOutputSize(); - ::com::sun::star::awt::Rectangle implts_getDockingAreaWindowSizes(); - void implts_getDockingAreaElementInfos( ::com::sun::star::ui::DockingArea DockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ); - void implts_getDockingAreaElementInfoOnSingleRowCol( ::com::sun::star::ui::DockingArea, - sal_Int32 nRowCol, - SingleRowColumnWindowData& rRowColumnWindowData ); - ::Point implts_findNextCascadeFloatingPos(); - void implts_findNextDockingPos( ::com::sun::star::ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ); + + void implts_setDockingAreaWindowSizes( const css::awt::Rectangle& rBorderSpace ); ::com::sun::star::awt::Rectangle implts_calcDockingAreaSizes(); - void implts_setDockingAreaWindowSizes( const com::sun::star::awt::Rectangle& rBorderSpace ); sal_Bool implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize ); - void implts_doLayout_notify( sal_Bool bOuterResize ); + void implts_doLayout_notify( sal_Bool bOuterResize ); // internal methods to control status/progress bar ::Size implts_getStatusBarSize(); @@ -425,8 +315,6 @@ namespace framework void implts_setVisibleState( sal_Bool bShow ); void implts_updateUIElementsVisibleState( sal_Bool bShow ); void implts_setCurrentUIVisibility( sal_Bool bShow ); - 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(); @@ -476,7 +364,6 @@ namespace framework bool m_bHideCurrentUI; bool m_bGlobalSettings; bool m_bPreserveContentSize; - DockingOperation m_eDockOperation; UIElement m_aDockUIElement; css::awt::Rectangle m_aDockingArea; css::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor > m_xDockingAreaAcceptor; @@ -515,6 +402,9 @@ namespace framework sal_Int16 m_eSymbolsStyle; Timer m_aAsyncLayoutTimer; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener + PanelManager* m_pPanelManager; + ToolbarLayoutManager* m_pToolbarManager; + css::uno::Reference< ::com::sun::star::awt::XDockableWindowListener > m_xToolbarManager; }; } // namespace framework diff --git a/framework/inc/services/modelwinservice.hxx b/framework/inc/services/modelwinservice.hxx new file mode 100755 index 000000000000..7e07fcb0cd37 --- /dev/null +++ b/framework/inc/services/modelwinservice.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * 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: urltransformer.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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_SERVICES_MODELWINSERVICE_HXX_ +#define __FRAMEWORK_SERVICES_MODELWINSERVICE_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +namespace framework{ + +class IModelWin +{ + public: + virtual void registerModelForXWindow( const css::uno::Reference< css::awt::XWindow >& rWindow, const css::uno::Reference< css::awt::XControlModel >& rModel ) = 0; + virtual void deregisterModelForXWindow( const css::uno::Reference< css::awt::XWindow >& rWindow ) = 0; +}; + +class ModelWinService : public css::lang::XTypeProvider + , public css::lang::XServiceInfo + , public css::container::XNameAccess + , public IModelWin + , public ::cppu::OWeakObject +{ + public: + ModelWinService(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + virtual ~ModelWinService(); + + //--------------------------------------------------------------------------------------------------------- + // XInterface, XTypeProvider, XServiceInfo + //--------------------------------------------------------------------------------------------------------- + + FWK_DECLARE_XINTERFACE + FWK_DECLARE_XTYPEPROVIDER + DECLARE_XSERVICEINFO + + //--------------------------------------------------------------------------------------------------------- + // IModelWin + //--------------------------------------------------------------------------------------------------------- + virtual void registerModelForXWindow( const css::uno::Reference< css::awt::XWindow >& rWindow, const css::uno::Reference< css::awt::XControlModel >& rModel ); + virtual void deregisterModelForXWindow( const css::uno::Reference< css::awt::XWindow >& rWindow ); + + //--------------------------------------------------------------------------------------------------------- + // XNameAccess + //--------------------------------------------------------------------------------------------------------- + virtual css::uno::Any SAL_CALL getByName( const ::rtl::OUString& sName ) throw( css::container::NoSuchElementException , + css::lang::WrappedTargetException , + css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& sName ) throw( css::uno::RuntimeException ); + + //--------------------------------------------------------------------------------------------------------- + // XElementAccess + //--------------------------------------------------------------------------------------------------------- + virtual css::uno::Type SAL_CALL getElementType() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasElements() throw( css::uno::RuntimeException ); + + private: + css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager; +}; + +} + +#endif // __FRAMEWORK_SERVICES_MODELWINSERVICE_HXX_ diff --git a/framework/inc/uielement/panelwindow.hxx b/framework/inc/uielement/panelwindow.hxx new file mode 100755 index 000000000000..e1b8ae2abcc7 --- /dev/null +++ b/framework/inc/uielement/panelwindow.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_PANELWINDOW_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_PANELWINDOW_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +namespace framework +{ + +class PanelWindow : public DockingWindow +{ + public: + PanelWindow( Window* pParent, WinBits nWinBits =0); + virtual ~PanelWindow(); + + const ::rtl::OUString& getResourceURL() const; + void setResourceURL(const ::rtl::OUString& rResourceURL); + Window* getContentWindow() const; + void setContentWindow( Window* pContentWindow ); + + virtual void Command ( const CommandEvent& rCEvt ); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual void Resize(); + + // Provide additional handlers to support external implementations + void SetCommandHdl( const Link& aLink ) { m_aCommandHandler = aLink; } + const Link& GetCommandHdl() const { return m_aCommandHandler; } + void SetStateChangedHdl( const Link& aLink ) { m_aStateChangedHandler = aLink; } + const Link& GetStateChangedHdl() const { return m_aStateChangedHandler; } + void SetDataChangedHdl( const Link& aLink ) { m_aDataChangedHandler = aLink; } + const Link& GetDataChangedHdl() { return m_aDataChangedHandler; } + + private: + ::rtl::OUString m_aResourceURL; + Link m_aCommandHandler; + Link m_aStateChangedHandler; + Link m_aDataChangedHandler; + Window* m_pContentWindow; +}; + +} + +#endif // __FRAMEWORK_UIELEMENT_PANELWINDOW_HXX_ diff --git a/framework/inc/uielement/panelwrapper.hxx b/framework/inc/uielement/panelwrapper.hxx new file mode 100755 index 000000000000..c3f72140ad59 --- /dev/null +++ b/framework/inc/uielement/panelwrapper.hxx @@ -0,0 +1,70 @@ + + +#ifndef __FRAMEWORK_UIELEMENT_PANELWRAPPER_HXX_ +#define __FRAMEWORK_UIELEMENT_PANELWRAPPER_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +namespace framework +{ + +class PanelWrapper : public UIElementWrapperBase +{ + public: + PanelWrapper( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + virtual ~PanelWrapper(); + + // XInterface + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException ); + + // XComponent + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); + + // XInitialization + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + + // XUIElement + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException); + + // XUpdatable + virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + using cppu::OPropertySetHelper::disposing; + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); + + ::rtl::OUString getResourceURL() { return m_aResourceURL; } + + //------------------------------------------------------------------------------------------------------------- + // protected methods + //------------------------------------------------------------------------------------------------------------- + protected: + virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ); + + private: + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; + com::sun::star::uno::Reference< com::sun::star::awt::XWindow > m_xPanelWindow; + bool m_bNoClose; +}; + +} + +#endif // __FRAMEWORK_UIELEMENT_PANELWRAPPER_HXX_ diff --git a/framework/inc/uielement/uielement.hxx b/framework/inc/uielement/uielement.hxx new file mode 100755 index 000000000000..98e65d5c5a93 --- /dev/null +++ b/framework/inc/uielement/uielement.hxx @@ -0,0 +1,146 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +namespace framework +{ + +struct DockedData +{ + DockedData() : m_aPos( LONG_MAX, LONG_MAX ), + m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ), + m_bLocked( sal_False ) {} + + Point m_aPos; + Size m_aSize; + sal_Int16 m_nDockedArea; + sal_Bool m_bLocked; +}; + +struct FloatingData +{ + FloatingData() : m_aPos( LONG_MAX, LONG_MAX ), + m_nLines( 1 ), + m_bIsHorizontal( sal_True ) {} + + Point m_aPos; + Size m_aSize; + sal_Int16 m_nLines; + sal_Bool m_bIsHorizontal; +}; + +struct UIElement +{ + UIElement() : m_bFloating( sal_False ), + m_bVisible( sal_True ), + m_bUserActive( sal_False ), + m_bCreateNewRowCol0( sal_False ), + m_bDeactiveHide( sal_False ), + m_bMasterHide( sal_False ), + m_bContextSensitive( sal_False ), + m_bContextActive( sal_True ), + m_bNoClose( sal_False ), + m_bSoftClose( sal_False ), + m_bStateRead( sal_False ), + m_nStyle( BUTTON_SYMBOL ) + {} + + UIElement( const rtl::OUString& rName, + const rtl::OUString& rType, + const com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement, + sal_Bool bFloating = sal_False + ) : m_aType( rType ), + m_aName( rName ), + m_xUIElement( rUIElement ), + m_bFloating( bFloating ), + m_bVisible( sal_True ), + m_bUserActive( sal_False ), + m_bCreateNewRowCol0( sal_False ), + m_bDeactiveHide( sal_False ), + m_bMasterHide( sal_False ), + m_bContextSensitive( sal_False ), + m_bContextActive( sal_True ), + m_bNoClose( sal_False ), + m_bSoftClose( sal_False ), + m_bStateRead( sal_False ), + m_nStyle( BUTTON_SYMBOL ) {} + + bool operator< ( const UIElement& aUIElement ) const; + UIElement& operator=( const UIElement& rUIElement ); + + rtl::OUString m_aType; + rtl::OUString m_aName; + rtl::OUString m_aUIName; + com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement; + sal_Bool m_bFloating, + m_bVisible, + m_bUserActive, + m_bCreateNewRowCol0, + m_bDeactiveHide, + m_bMasterHide, + m_bContextSensitive, + m_bContextActive; + sal_Bool m_bNoClose, + m_bSoftClose, + m_bStateRead; + sal_Int16 m_nStyle; + DockedData m_aDockedData; + FloatingData m_aFloatingData; +}; + +typedef std::vector< UIElement > UIElementVector; + +} // namespace framework + +#endif // __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_ diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx new file mode 100755 index 000000000000..bfa20e9324cd --- /dev/null +++ b/framework/source/layoutmanager/helpers.cxx @@ -0,0 +1,304 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include "helpers.hxx" +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +using namespace com::sun::star; + +namespace framework +{ + +// ATTENTION! +// This value is directly copied from the sfx2 project. +// You have to change BOTH values, see sfx2/inc/sfx2/sfxsids.hrc (SID_DOCKWIN_START) +static const sal_Int32 DOCKWIN_ID_BASE = 9800; + +bool lcl_checkUIElement(const uno::Reference< ui::XUIElement >& xUIElement, awt::Rectangle& _rPosSize, uno::Reference< awt::XWindow >& _xWindow) +{ + bool bRet = xUIElement.is(); + if ( bRet ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + _xWindow.set( xUIElement->getRealInterface(), uno::UNO_QUERY ); + _rPosSize = _xWindow->getPosSize(); + + Window* pWindow = VCLUnoHelper::GetWindow( _xWindow ); + if ( pWindow->GetType() == WINDOW_TOOLBOX ) + { + ::Size aSize = ((ToolBox*)pWindow)->CalcWindowSizePixel( 1 ); + _rPosSize.Width = aSize.Width(); + _rPosSize.Height = aSize.Height(); + } + } // if ( xUIElement.is() ) + return bRet; +} + +uno::Reference< awt::XWindowPeer > createToolkitWindow( const uno::Reference< lang::XMultiServiceFactory >& rFactory, const uno::Reference< awt::XWindowPeer >& rParent, const char* pService ) +{ + const rtl::OUString aAWTToolkit( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" )); + + uno::Reference< awt::XWindowPeer > xPeer; + if ( rFactory.is() ) + { + uno::Reference< awt::XToolkit > xToolkit( rFactory->createInstance( aAWTToolkit ), uno::UNO_QUERY_THROW ); + if ( xToolkit.is() ) + { + // describe window properties. + css::awt::WindowDescriptor aDescriptor; + aDescriptor.Type = awt::WindowClass_SIMPLE ; + aDescriptor.WindowServiceName = DECLARE_ASCII(pService) ; + aDescriptor.ParentIndex = -1 ; + aDescriptor.Parent = uno::Reference< awt::XWindowPeer >( rParent, uno::UNO_QUERY ) ; + aDescriptor.Bounds = awt::Rectangle(0,0,0,0) ; + aDescriptor.WindowAttributes = 0 ; + + // create a awt window + xPeer = xToolkit->createWindow( aDescriptor ); + } + } + + return xPeer; +} + +// convert alignment constant to vcl's WindowAlign type +WindowAlign ImplConvertAlignment( sal_Int16 aAlignment ) +{ + if ( aAlignment == ui::DockingArea_DOCKINGAREA_LEFT ) + return WINDOWALIGN_LEFT; + else if ( aAlignment == ui::DockingArea_DOCKINGAREA_RIGHT ) + return WINDOWALIGN_RIGHT; + else if ( aAlignment == ui::DockingArea_DOCKINGAREA_TOP ) + return WINDOWALIGN_TOP; + else + return WINDOWALIGN_BOTTOM; +} + +bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ) +{ + sal_Int32 nIndex = 0; + + ::rtl::OUString aUIResourceURL( UIRESOURCE_URL ); + if ( aResourceURL.indexOf( aUIResourceURL ) == 0 ) + { + ::rtl::OUString aPathPart = aResourceURL.copy( aUIResourceURL.getLength() ); + ::rtl::OUString aUIResource = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex ); + + aElementType = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex ); + aElementName = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex ); + return true; + } + + return false; +} + +css::awt::Rectangle impl_convertRectangleToAWT( const ::Rectangle& rRect ) +{ + css::awt::Rectangle aRect; + aRect.X = rRect.Left(); + aRect.Y = rRect.Top(); + aRect.Width = rRect.GetWidth(); + aRect.Height = rRect.GetHeight(); + return aRect; +} + +::Rectangle impl_convertAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ) +{ + ::Rectangle aRect; + aRect.Left() = rRect.X; + aRect.Top() = rRect.Y; + aRect.Right() = rRect.X + rRect.Width; + aRect.Bottom() = rRect.Y + rRect.Height; + + return aRect; +} + +uno::Reference< frame::XModel > impl_getModelFromFrame( const uno::Reference< frame::XFrame >& rFrame ) +{ + // Query for the model to get check the context information + uno::Reference< frame::XModel > xModel; + if ( rFrame.is() ) + { + uno::Reference< frame::XController > xController( rFrame->getController(), uno::UNO_QUERY ); + if ( xController.is() ) + xModel = xController->getModel(); + } + + return xModel; +} + +sal_Bool implts_isPreviewModel( const uno::Reference< frame::XModel >& xModel ) +{ + if ( xModel.is() ) + { + ::comphelper::MediaDescriptor aDesc( xModel->getArgs() ); + return aDesc.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_PREVIEW(), (sal_Bool)sal_False); + } + else + return sal_False; +} + +sal_Bool implts_isFrameOrWindowTop( const uno::Reference< frame::XFrame >& xFrame ) +{ + if (xFrame->isTop()) + return sal_True; + + uno::Reference< awt::XTopWindow > xWindowCheck(xFrame->getContainerWindow(), uno::UNO_QUERY); // dont use _THROW here ... its a check only + if (xWindowCheck.is()) + { + // --> PB 2007-06-18 #i76867# top and system window is required. + ::vos::OGuard aSolarLock(&Application::GetSolarMutex()); + uno::Reference< awt::XWindow > xWindow( xWindowCheck, uno::UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + return ( pWindow && pWindow->IsSystemWindow() ); + // <-- + } + + return sal_False; +} + +void impl_setDockingWindowVisibility( const css::uno::Reference< css::lang::XMultiServiceFactory>& rSMGR, const css::uno::Reference< css::frame::XFrame >& rFrame, const ::rtl::OUString& rDockingWindowName, bool bVisible ) +{ + const ::rtl::OUString aDockWinPrefixCommand( RTL_CONSTASCII_USTRINGPARAM( "DockingWindow" )); + css::uno::WeakReference< css::frame::XDispatchHelper > xDispatchHelper; + + sal_Int32 nID = rDockingWindowName.toInt32(); + sal_Int32 nIndex = nID - DOCKWIN_ID_BASE; + + css::uno::Reference< css::frame::XDispatchProvider > xProvider(rFrame, css::uno::UNO_QUERY); + if ( nIndex >= 0 && xProvider.is() ) + { + ::rtl::OUString aDockWinCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:" )); + ::rtl::OUString aDockWinArgName( aDockWinPrefixCommand ); + + aDockWinArgName += ::rtl::OUString::valueOf( nIndex ); + + css::uno::Sequence< css::beans::PropertyValue > aArgs(1); + aArgs[0].Name = aDockWinArgName; + aArgs[0].Value = css::uno::makeAny( bVisible ); + + css::uno::Reference< css::frame::XDispatchHelper > xDispatcher( xDispatchHelper ); + if ( !xDispatcher.is()) + { + xDispatcher = css::uno::Reference< css::frame::XDispatchHelper >( + rSMGR->createInstance(SERVICENAME_DISPATCHHELPER), css::uno::UNO_QUERY_THROW); + } + + aDockWinCommand = aDockWinCommand + aDockWinArgName; + xDispatcher->executeDispatch( + xProvider, + aDockWinCommand, + ::rtl::OUString::createFromAscii("_self"), + 0, + aArgs); + } +} + +void impl_addWindowListeners( + const css::uno::Reference< css::uno::XInterface >& xThis, + const css::uno::Reference< css::ui::XUIElement >& xUIElement ) +{ + css::uno::Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), css::uno::UNO_QUERY ); + css::uno::Reference< css::awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), css::uno::UNO_QUERY ); + if ( xDockWindow.is() && xWindow.is() ) + { + try + { + xDockWindow->addDockableWindowListener( + css::uno::Reference< css::awt::XDockableWindowListener >( + xThis, css::uno::UNO_QUERY )); + xWindow->addWindowListener( + css::uno::Reference< css::awt::XWindowListener >( + xThis, css::uno::UNO_QUERY )); + xDockWindow->enableDocking( sal_True ); + } + catch ( css::uno::Exception& ) + { + } + } +} + +css::uno::Reference< css::awt::XWindowPeer > implts_createToolkitWindow( + const css::uno::Reference< css::awt::XToolkit >& rToolkit, + const css::uno::Reference< css::awt::XWindowPeer >& rParent ) +{ + css::uno::Reference< css::awt::XWindowPeer > xPeer; + if ( rToolkit.is() ) + { + // describe window properties. + css::awt::WindowDescriptor aDescriptor; + aDescriptor.Type = css::awt::WindowClass_SIMPLE; + aDescriptor.WindowServiceName = DECLARE_ASCII("dockingarea"); + aDescriptor.ParentIndex = -1; + aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >( rParent, css::uno::UNO_QUERY ); + aDescriptor.Bounds = css::awt::Rectangle(0,0,0,0); + aDescriptor.WindowAttributes = 0; + + // create a docking area window + xPeer = rToolkit->createWindow( aDescriptor ); + } + + return xPeer; +} + +} // namespace framework diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx new file mode 100755 index 000000000000..71eb623df6ff --- /dev/null +++ b/framework/source/layoutmanager/helpers.hxx @@ -0,0 +1,85 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_HELPERS_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_HELPERS_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +#define UIRESOURCE_PROTOCO_ASCII "private:" +#define UIRESOURCE_RESOURCE_ASCII "resource" +#define UIRESOURCE_URL_ASCII "private:resource" +#define UIRESOURCE_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( UIRESOURCE_URL_ASCII )) + +namespace framework +{ + +bool lcl_checkUIElement(const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement,::com::sun::star::awt::Rectangle& _rPosSize, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xWindow); +::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > createToolkitWindow( const css::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rFactory, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent, const char* pService ); +WindowAlign ImplConvertAlignment( sal_Int16 aAlignment ); +bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ); +::com::sun::star::awt::Rectangle impl_convertRectangleToAWT( const ::Rectangle& rRect ); +::Rectangle impl_convertAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ); +::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > impl_getModelFromFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); +sal_Bool implts_isPreviewModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel ); +sal_Bool implts_isFrameOrWindowTop( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame ); +void impl_setDockingWindowVisibility( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& rSMGR, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rDockingWindowName, bool bVisible ); +void impl_addWindowListeners( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xThis, const ::com::sun::star::uno::Reference< css::ui::XUIElement >& xUIElement ); +::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > implts_createToolkitWindow( const css::uno::Reference< ::com::sun::star::awt::XToolkit >& rToolkit, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent ); + +} + +#endif // __FRAMEWORK_LAYOUTMANAGER_HELPERS_HXX_ diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 458368bd6581..4eb3d76a8f08 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -6,6 +6,9 @@ * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: layoutmanager.cxx,v $ + * $Revision: 1.72 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -32,26 +35,21 @@ // my own includes //_________________________________________________________________________________________________________________ -// #include - -#ifndef _FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_ #include -#endif +#include +#include #include #include - #include #include #include #include #include - -#ifndef __FRAMEWORK_CLASSES_RESOURCE_HRC_ #include -#endif #include #include #include +#include //_________________________________________________________________________________________________________________ // interface includes @@ -115,49 +113,12 @@ using namespace ::com::sun::star::ui; using namespace com::sun::star::frame; using namespace ::com::sun::star::frame; -#define UIRESOURCE_PROTOCO_ASCII "private:" -#define UIRESOURCE_RESOURCE_ASCII "resource" -#define UIRESOURCE_URL_ASCII "private:resource" -#define UIRESOURCE_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( UIRESOURCE_URL_ASCII )) // ATTENTION! // This value is directly copied from the sfx2 project. // You have to change BOTH values, see sfx2/inc/sfx2/sfxsids.hrc (SID_DOCKWIN_START) static const sal_Int32 DOCKWIN_ID_BASE = 9800; -bool lcl_checkUIElement(const Reference< XUIElement >& xUIElement,css::awt::Rectangle& _rPosSize,Reference< css::awt::XWindow >& _xWindow) -{ - bool bRet = xUIElement.is(); - if ( bRet ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - _xWindow.set( xUIElement->getRealInterface(), UNO_QUERY ); - _rPosSize = _xWindow->getPosSize(); - - Window* pWindow = VCLUnoHelper::GetWindow( _xWindow ); - if ( pWindow->GetType() == WINDOW_TOOLBOX ) - { - ::Size aSize = ((ToolBox*)pWindow)->CalcWindowSizePixel( 1 ); - _rPosSize.Width = aSize.Width(); - _rPosSize.Height = aSize.Height(); - } - } // if ( xUIElement.is() ) - return bRet; -} - -// convert alignment constant to vcl's WindowAlign type -static WindowAlign ImplConvertAlignment( sal_Int16 aAlignment ) -{ - if ( aAlignment == DockingArea_DOCKINGAREA_LEFT ) - return WINDOWALIGN_LEFT; - else if ( aAlignment == DockingArea_DOCKINGAREA_RIGHT ) - return WINDOWALIGN_RIGHT; - else if ( aAlignment == DockingArea_DOCKINGAREA_TOP ) - return WINDOWALIGN_TOP; - else - return WINDOWALIGN_BOTTOM; -} - //_________________________________________________________________________________________________________________ // Namespace //_________________________________________________________________________________________________________________ @@ -172,179 +133,6 @@ struct UIElementVisibility bool bVisible; }; -bool LayoutManager::UIElement::operator< ( const LayoutManager::UIElement& aUIElement ) const -{ - if ( !m_xUIElement.is() && aUIElement.m_xUIElement.is() ) - return false; - else if ( m_xUIElement.is() && !aUIElement.m_xUIElement.is() ) - return true; - else if ( !m_bVisible && aUIElement.m_bVisible ) - return false; - else if ( m_bVisible && !aUIElement.m_bVisible ) - return true; - else if ( !m_bFloating && aUIElement.m_bFloating ) - return true; - else if ( m_bFloating && !aUIElement.m_bFloating ) - return false; - else - { - if ( m_bFloating ) - { - bool bEqual = ( m_aFloatingData.m_aPos.Y() == aUIElement.m_aFloatingData.m_aPos.Y() ); - if ( bEqual ) - return ( m_aFloatingData.m_aPos.X() < aUIElement.m_aFloatingData.m_aPos.X() ); - else - return ( m_aFloatingData.m_aPos.Y() < aUIElement.m_aFloatingData.m_aPos.Y() ); - } - else - { - if ( m_aDockedData.m_nDockedArea < aUIElement.m_aDockedData.m_nDockedArea ) - return true; - else if ( m_aDockedData.m_nDockedArea > aUIElement.m_aDockedData.m_nDockedArea ) - return false; - else - { - if ( m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_TOP || - m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) - { - if ( !( m_aDockedData.m_aPos.Y() == aUIElement.m_aDockedData.m_aPos.Y() ) ) - return ( m_aDockedData.m_aPos.Y() < aUIElement.m_aDockedData.m_aPos.Y() ); - else - { - bool bEqual = ( m_aDockedData.m_aPos.X() == aUIElement.m_aDockedData.m_aPos.X() ); - if ( bEqual ) - { - return m_bUserActive && !aUIElement.m_bUserActive; - } - else - return ( m_aDockedData.m_aPos.X() < aUIElement.m_aDockedData.m_aPos.X() ); - } - } - else - { - if ( !( m_aDockedData.m_aPos.X() == aUIElement.m_aDockedData.m_aPos.X() ) ) - return ( m_aDockedData.m_aPos.X() < aUIElement.m_aDockedData.m_aPos.X() ); - else - { - bool bEqual = ( m_aDockedData.m_aPos.Y() == aUIElement.m_aDockedData.m_aPos.Y() ); - if ( bEqual ) - { - return m_bUserActive && !aUIElement.m_bUserActive; - } - else - return ( m_aDockedData.m_aPos.Y() < aUIElement.m_aDockedData.m_aPos.Y() ); - } - } - } - } - } -} - -LayoutManager::UIElement& LayoutManager::UIElement::operator= ( const LayoutManager::UIElement& rUIElement ) -{ - if (this == &rUIElement) { return *this; } - m_aType = rUIElement.m_aType; - m_aName = rUIElement.m_aName; - m_aUIName = rUIElement.m_aUIName; - m_xUIElement = rUIElement.m_xUIElement; - m_bFloating = rUIElement.m_bFloating; - m_bVisible = rUIElement.m_bVisible; - m_bUserActive = rUIElement.m_bUserActive; - m_bCreateNewRowCol0 = rUIElement.m_bCreateNewRowCol0; - m_bDeactiveHide = rUIElement.m_bDeactiveHide; - m_bMasterHide = rUIElement.m_bMasterHide; - m_bContextSensitive = rUIElement.m_bContextSensitive; - m_bContextActive = rUIElement.m_bContextActive; - m_bNoClose = rUIElement.m_bNoClose; - m_bSoftClose = rUIElement.m_bSoftClose; - m_bStateRead = rUIElement.m_bStateRead; - m_nStyle = rUIElement.m_nStyle; - m_aDockedData = rUIElement.m_aDockedData; - m_aFloatingData = rUIElement.m_aFloatingData; - return *this; -} - -static Reference< XModel > impl_getModelFromFrame( const Reference< XFrame >& rFrame ) -{ - // Query for the model to get check the context information - Reference< XModel > xModel; - if ( rFrame.is() ) - { - Reference< XController > xController( rFrame->getController(), UNO_QUERY ); - if ( xController.is() ) - xModel = xController->getModel(); - } - - return xModel; -} - -static sal_Bool implts_isPreviewModel( const Reference< XModel >& xModel ) -{ - if ( xModel.is() ) - { - ::comphelper::MediaDescriptor aDesc( xModel->getArgs() ); - return aDesc.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_PREVIEW(), (sal_Bool)sal_False); - } - else - return sal_False; -} - -static sal_Bool implts_isFrameOrWindowTop( const css::uno::Reference< css::frame::XFrame >& xFrame ) -{ - if (xFrame->isTop()) - return sal_True; - - css::uno::Reference< css::awt::XTopWindow > xWindowCheck(xFrame->getContainerWindow(), css::uno::UNO_QUERY); // dont use _THROW here ... its a check only - if (xWindowCheck.is()) - { - // --> PB 2007-06-18 #i76867# top and system window is required. - ::vos::OGuard aSolarLock(&Application::GetSolarMutex()); - css::uno::Reference< css::awt::XWindow > xWindow( xWindowCheck, UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - return ( pWindow && pWindow->IsSystemWindow() ); - // <-- - } - - return sal_False; -} - -static void impl_setDockingWindowVisibility( const css::uno::Reference< css::lang::XMultiServiceFactory>& rSMGR, const css::uno::Reference< css::frame::XFrame >& rFrame, const ::rtl::OUString& rDockingWindowName, bool bVisible ) -{ - const ::rtl::OUString aDockWinPrefixCommand( RTL_CONSTASCII_USTRINGPARAM( "DockingWindow" )); - css::uno::WeakReference< css::frame::XDispatchHelper > xDispatchHelper; - - sal_Int32 nID = rDockingWindowName.toInt32(); - sal_Int32 nIndex = nID - DOCKWIN_ID_BASE; - - css::uno::Reference< css::frame::XDispatchProvider > xProvider(rFrame, css::uno::UNO_QUERY); - if ( nIndex >= 0 && xProvider.is() ) - { - ::rtl::OUString aDockWinCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:" )); - ::rtl::OUString aDockWinArgName( aDockWinPrefixCommand ); - - aDockWinArgName += ::rtl::OUString::valueOf( nIndex ); - - css::uno::Sequence< css::beans::PropertyValue > aArgs(1); - aArgs[0].Name = aDockWinArgName; - aArgs[0].Value = css::uno::makeAny( bVisible ); - - css::uno::Reference< css::frame::XDispatchHelper > xDispatcher( xDispatchHelper ); - if ( !xDispatcher.is()) - { - xDispatcher = css::uno::Reference< css::frame::XDispatchHelper >( - rSMGR->createInstance(SERVICENAME_DISPATCHHELPER), css::uno::UNO_QUERY_THROW); - } - - aDockWinCommand = aDockWinCommand + aDockWinArgName; - xDispatcher->executeDispatch( - xProvider, - aDockWinCommand, - ::rtl::OUString::createFromAscii("_self"), - 0, - aArgs); - } -} - //***************************************************************************************************************** // XInterface, XTypeProvider, XServiceInfo //***************************************************************************************************************** @@ -383,7 +171,6 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM , m_bHideCurrentUI( false ) , m_bGlobalSettings( sal_False ) , m_bPreserveContentSize( false ) - , m_eDockOperation( DOCKOP_ON_COLROW ) , m_pInplaceMenuBar( NULL ) , m_xModuleManager( Reference< XModuleManager >( xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY )) @@ -410,12 +197,16 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM , m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )) , m_pAddonOptions( 0 ) , m_aListenerContainer( m_aLock.getShareableOslMutex() ) + , m_pPanelManager( 0 ) + , m_pToolbarManager( 0 ) { // Initialize statusbar member m_aStatusBarElement.m_aType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "statusbar" )); m_aStatusBarElement.m_aName = m_aStatusBarAlias; - m_pMiscOptions = new SvtMiscOptions(); + m_pMiscOptions = new SvtMiscOptions(); + m_pToolbarManager = new ToolbarLayoutManager( xServiceManager, m_xUIElementFactoryManager ); + m_xToolbarManager = uno::Reference< awt::XDockableWindowListener >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY ); m_pMiscOptions->AddListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); @@ -425,7 +216,6 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM m_aAsyncLayoutTimer.SetTimeout( 50 ); m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) ); - registerProperty( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, ::getCppuType( &m_bAutomaticToolbars ) ); registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, css::beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, ::getCppuType( &m_bHideCurrentUI ) ); registerProperty( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY, &m_nLockCount, getCppuType( &m_nLockCount ) ); @@ -511,27 +301,6 @@ void LayoutManager::impl_clearUpMenuBar() implts_unlock(); } -sal_Bool LayoutManager::impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ) -{ - URL aURL; - sal_Int32 nIndex = 0; - - aURL.Complete = aResourceURL; - m_xURLTransformer->parseStrict( aURL ); - - ::rtl::OUString aUIResource = aURL.Path.getToken( 0, (sal_Unicode)'/', nIndex ); - - if (( aURL.Protocol.equalsIgnoreAsciiCaseAscii( UIRESOURCE_PROTOCO_ASCII )) && - ( aUIResource.equalsIgnoreAsciiCaseAscii( UIRESOURCE_RESOURCE_ASCII ))) - { - aElementType = aURL.Path.getToken( 0, (sal_Unicode)'/', nIndex ); - aElementName = aURL.Path.getToken( 0, (sal_Unicode)'/', nIndex ); - return sal_True; - } - - return sal_False; -} - void LayoutManager::implts_lock() { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -697,14 +466,17 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) aModuleIdentifier = ::rtl::OUString(); } + Reference< XUIConfigurationManager > xModCfgMgr( xModuleCfgMgr, UNO_QUERY ); + Reference< XUIConfigurationManager > xDokCfgMgr( xDocCfgMgr, UNO_QUERY ); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_xModel = xModel; m_aDockingArea = css::awt::Rectangle(); m_bComponentAttached = bAttached; m_aModuleIdentifier = aModuleIdentifier; - m_xModuleCfgMgr = Reference< XUIConfigurationManager >( xModuleCfgMgr, UNO_QUERY ); - m_xDocCfgMgr = Reference< XUIConfigurationManager >( xDocCfgMgr, UNO_QUERY ); + m_xModuleCfgMgr = xModCfgMgr; + m_xDocCfgMgr = xDokCfgMgr; m_xPersistentWindowState = xPersistentWindowState; m_aStatusBarElement.m_bStateRead = sal_False; // reset state to read data again! aWriteLock.unlock(); @@ -712,32 +484,15 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) if ( bAttached ) { - // reset docking area windows back to zero size - try - { - if ( xTopDockingWindow.is() ) - xTopDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xLeftDockingWindow.is() ) - xLeftDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xRightDockingWindow.is() ) - xRightDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xBottomDockingWindow.is() ) - xBottomDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - } - catch ( Exception& ) - { - } - - if ( bAutomaticToolbars ) - { - implts_createCustomToolBars(); - implts_createAddonsToolBars(); - implts_createNonContextSensitiveToolBars(); - } - implts_sortUIElements(); + m_pToolbarManager->attach( xFrame, xModCfgMgr, xDokCfgMgr, xPersistentWindowState ); + css::uno::Reference< css::awt::XWindowPeer > xParent( xContainerWindow, UNO_QUERY ); + m_pToolbarManager->setParentWindow( xParent ); } else + { + m_pToolbarManager->reset(); implts_destroyElements(); + } } implts_unlock(); @@ -784,333 +539,6 @@ void LayoutManager::implts_destroyElements() aWriteLock.unlock(); } -void LayoutManager::implts_destroyDockingAreaWindows() -{ - std::vector< Reference< css::awt::XWindow > > oldDockingAreaWindows; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] ); - - m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT].clear(); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - const sal_uInt32 nCount = oldDockingAreaWindows.size(); - for ( sal_uInt32 i=0; i < nCount; i++ ) - { - if ( oldDockingAreaWindows[i].is() ) - { - try - { - oldDockingAreaWindows[i]->dispose(); - } - catch ( Exception& ) - { - } - } - } -} - -void LayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ) -{ - if ( aTbxResName.getLength() > 0 ) - { - createElement( aTbxResName ); - if ( aTitle ) - { - Reference< XUIElement > xUIElement = getElement( aTbxResName ); - if ( xUIElement.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - pWindow->SetText( aTitle ); - } - } - } -} - -void LayoutManager::implts_createCustomToolBars( - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aTbxSeqSeq ) -{ - const Sequence< PropertyValue >* pTbxSeq = aTbxSeqSeq.getConstArray(); - for ( sal_Int32 i = 0; i < aTbxSeqSeq.getLength(); i++ ) - { - const Sequence< PropertyValue >& rTbxSeq = pTbxSeq[i]; - ::rtl::OUString aTbxResName; - ::rtl::OUString aTbxTitle; - for ( sal_Int32 j = 0; j < rTbxSeq.getLength(); j++ ) - { - if ( rTbxSeq[j].Name.equalsAscii( "ResourceURL" )) - rTbxSeq[j].Value >>= aTbxResName; - else if ( rTbxSeq[j].Name.equalsAscii( "UIName" )) - rTbxSeq[j].Value >>= aTbxTitle; - } - - // Only create custom toolbars. Their name have to start with "custom_"! - if ( aTbxResName.getLength() > 0 && aTbxResName.indexOf( m_aCustomTbxPrefix ) != -1 ) - implts_createCustomToolBar( aTbxResName, aTbxTitle ); - } -} - -void LayoutManager::implts_createCustomToolBars() -{ - ReadGuard aReadLock( m_aLock ); - if ( !m_bComponentAttached ) - return; - - Reference< XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); - Reference< XFrame > xFrame( m_xFrame ); - Reference< XModel > xModel; - Reference< XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr, UNO_QUERY ); - Reference< XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr, UNO_QUERY ); - aReadLock.unlock(); - - if ( xFrame.is() ) - { - xModel = impl_getModelFromFrame( xFrame ); - if ( implts_isPreviewModel( xModel )) - return; // no custom toolbars for preview frame! - - Sequence< Sequence< PropertyValue > > aTbxSeq; - if ( xDocCfgMgr.is() ) - { - aTbxSeq = xDocCfgMgr->getUIElementsInfo( UIElementType::TOOLBAR ); - implts_createCustomToolBars( aTbxSeq ); // first create all document based toolbars - } - if ( xModuleCfgMgr.is() ) - { - aTbxSeq = xModuleCfgMgr->getUIElementsInfo( UIElementType::TOOLBAR ); - implts_createCustomToolBars( aTbxSeq ); // second create module based toolbars - } - } -} - -rtl::OUString LayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const -{ - String aAddonGenericTitle; - - aAddonGenericTitle = String( FwkResId( STR_TOOLBAR_TITLE_ADDON )); - const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - - String aNumStr = rI18nHelper.GetNum( nNumber, 0, FALSE, FALSE ); - aAddonGenericTitle.SearchAndReplaceAscii( "%num%", aNumStr ); - - return rtl::OUString( aAddonGenericTitle ); -} - -void LayoutManager::implts_createAddonsToolBars() -{ - WriteGuard aWriteLock( m_aLock ); - if ( !m_bComponentAttached ) - return; - - Reference< XModel > xModel; - Reference< XFrame > xFrame( m_xFrame ); - if ( !xFrame.is() ) - return; - - if ( !m_pAddonOptions ) - m_pAddonOptions = new AddonsOptions; - - Reference< XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); - aWriteLock.unlock(); - - xModel = impl_getModelFromFrame( xFrame ); - if ( implts_isPreviewModel( xModel )) - return; // no addon toolbars for preview frame! - - UIElementVector aUIElementVector; - Sequence< Sequence< PropertyValue > > aAddonToolBarData; - Reference< XUIElement > xUIElement; - - sal_uInt32 nCount = m_pAddonOptions->GetAddonsToolBarCount(); - ::rtl::OUString aAddonsToolBarStaticName( m_aFullAddonTbxPrefix ); - ::rtl::OUString aElementType( RTL_CONSTASCII_USTRINGPARAM( "toolbar" )); - - Sequence< PropertyValue > aPropSeq( 2 ); - aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); - aPropSeq[0].Value <<= xFrame; - aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationData" )); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - ::rtl::OUString aAddonToolBarName( aAddonsToolBarStaticName + m_pAddonOptions->GetAddonsToolbarResourceName(i) ); - aAddonToolBarData = m_pAddonOptions->GetAddonsToolBarPart( i ); - aPropSeq[1].Value <<= aAddonToolBarData; - - aWriteLock.lock(); - UIElement aElement = impl_findElement( aAddonToolBarName ); - aWriteLock.unlock(); - - // #i79828 - // It's now possible that we are called more than once. Be sure to not create - // add-on toolbars more than once! - if ( aElement.m_xUIElement.is() ) - continue; - - try - { - xUIElement = xUIElementFactory->createUIElement( aAddonToolBarName, aPropSeq ); - if ( xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), UNO_QUERY ); - if ( xDockWindow.is() ) - { - try - { - xDockWindow->addDockableWindowListener( Reference< css::awt::XDockableWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); - xDockWindow->enableDocking( sal_True ); - Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); - if ( xWindow.is() ) - xWindow->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - } - - ::rtl::OUString aGenericAddonTitle = implts_generateGenericAddonToolbarTitle( i+1 ); - - if ( aElement.m_aName.getLength() > 0 ) - { - // Reuse a local entry so we are able to use the latest - // UI changes for this document. - implts_setElementData( aElement, xDockWindow ); - aElement.m_xUIElement = xUIElement; - if ( aElement.m_aUIName.getLength() == 0 ) - { - aElement.m_aUIName = aGenericAddonTitle; - implts_writeWindowStateData( aElement.m_aName, aElement ); - } - } - else - { - // Create new UI element and try to read its state data - UIElement aNewToolbar( aAddonToolBarName, aElementType, xUIElement ); - aNewToolbar.m_bFloating = sal_True; - implts_readWindowStateData( aAddonToolBarName, aNewToolbar ); - implts_setElementData( aNewToolbar, xDockWindow ); - if ( aNewToolbar.m_aUIName.getLength() == 0 ) - { - aNewToolbar.m_aUIName = aGenericAddonTitle; - implts_writeWindowStateData( aNewToolbar.m_aName, aNewToolbar ); - } - implts_insertUIElement( aNewToolbar ); - } - - Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); - if ( xWindow.is() ) - { - // Set generic title for add-on toolbar - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow->GetText().Len() == 0 ) - pWindow->SetText( aGenericAddonTitle ); - if ( pWindow->GetType() == WINDOW_TOOLBOX ) - { - ToolBox* pToolbar = (ToolBox *)pWindow; - pToolbar->SetMenuType(); - } - } - } - } - catch ( NoSuchElementException& ) - { - } - catch ( IllegalArgumentException& ) - { - } - } -} - -void LayoutManager::implts_createNonContextSensitiveToolBars() -{ - ReadGuard aReadLock( m_aLock ); - - if ( !m_xPersistentWindowState.is() || - !m_xFrame.is() || - !m_bComponentAttached ) - return; - - Reference< XFrame > xFrame( m_xFrame ); - - Reference< XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); - Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - aReadLock.unlock(); - - if ( implts_isPreviewModel( impl_getModelFromFrame( xFrame ))) - return; - - std::vector< rtl::OUString > aMakeVisibleToolbars; - - try - { - Sequence< rtl::OUString > aToolbarNames = xPersistentWindowState->getElementNames(); - - if ( aToolbarNames.getLength() > 0 ) - { - rtl::OUString aElementType; - rtl::OUString aElementName; - rtl::OUString aName; - - Reference< ::com::sun::star::ui::XUIElement > xUIElement; - aMakeVisibleToolbars.reserve(aToolbarNames.getLength()); - WriteGuard aWriteLock( m_aLock ); - - const rtl::OUString* pTbNames = aToolbarNames.getConstArray(); - for ( sal_Int32 i = 0; i < aToolbarNames.getLength(); i++ ) - { - aName = pTbNames[i]; - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - // Check that we only create: - // - Toolbars (the statusbar is also member of the persistent window state) - // - Not custom toolbars, there are created with their own method (implts_createCustomToolbars) - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && - aElementName.indexOf( m_aCustomTbxPrefix ) == -1 ) - { - UIElement aNewToolbar( aName, aElementType, xUIElement ); - bool bFound = implts_findElement( aName, aNewToolbar ); - if ( !bFound ) - implts_readWindowStateData( aName, aNewToolbar ); - - if ( aNewToolbar.m_bVisible && - !aNewToolbar.m_bContextSensitive ) - { - if ( !bFound ) - implts_insertUIElement( aNewToolbar ); - aMakeVisibleToolbars.push_back( aName ); - } - } - } - } - } - } - catch ( RuntimeException& e ) - { - throw e; - } - catch ( Exception& ) - { - } - - if ( !aMakeVisibleToolbars.empty() ) - { - implts_lock(); - ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &LayoutManager::requestElement, this,_1 )); - implts_unlock(); - } -} - void LayoutManager::implts_toggleFloatingUIElementsVisibility( sal_Bool bActive ) { WriteGuard aWriteLock( m_aLock ); @@ -1241,7 +669,7 @@ sal_Bool LayoutManager::implts_findElement( const rtl::OUString& aName, UIElemen return sal_False; } -LayoutManager::UIElement& LayoutManager::impl_findElement( const rtl::OUString& aName ) +UIElement& LayoutManager::impl_findElement( const rtl::OUString& aName ) { static UIElement aEmptyElement; @@ -1578,12 +1006,12 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con if ( xPersistentWindowState->hasByName( aName )) { - Reference< XNameReplace > xReplace( xPersistentWindowState, UNO_QUERY ); + Reference< XNameReplace > xReplace( xPersistentWindowState, uno::UNO_QUERY ); xReplace->replaceByName( aName, makeAny( aWindowState )); } else { - Reference< XNameContainer > xInsert( xPersistentWindowState, UNO_QUERY ); + Reference< XNameContainer > xInsert( xPersistentWindowState, uno::UNO_QUERY ); xInsert->insertByName( aName, makeAny( aWindowState )); } } @@ -1598,360 +1026,6 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con aWriteLock.unlock(); } -void LayoutManager::implts_setElementData( UIElement& rElement, const Reference< css::awt::XDockableWindow >& rDockWindow ) -{ - ReadGuard aReadLock( m_aLock ); - sal_Bool bShowElement( rElement.m_bVisible && !rElement.m_bMasterHide && m_bParentWindowVisible ); - aReadLock.unlock(); - - Reference< css::awt::XDockableWindow > xDockWindow( rDockWindow ); - Reference< css::awt::XWindow2 > xWindow( xDockWindow, UNO_QUERY ); - - Window* pWindow( 0 ); - ToolBox* pToolBox( 0 ); - - if ( xDockWindow.is() && xWindow.is() ) - { - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - String aText = pWindow->GetText(); - if ( aText.Len() == 0 ) - pWindow->SetText( rElement.m_aUIName ); - if ( rElement.m_bNoClose ) - pWindow->SetStyle( pWindow->GetStyle() & ~WB_CLOSEABLE ); - if ( pWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pWindow; - } - if ( pToolBox ) - { - if (( rElement.m_nStyle < 0 ) || - ( rElement.m_nStyle > BUTTON_SYMBOLTEXT )) - rElement.m_nStyle = BUTTON_SYMBOL; - pToolBox->SetButtonType( (ButtonType)rElement.m_nStyle ); - if ( rElement.m_bNoClose ) - pToolBox->SetFloatStyle( pToolBox->GetFloatStyle() & ~WB_CLOSEABLE ); - } - } - - if ( rElement.m_bFloating ) - { - if ( pWindow ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - String aText = pWindow->GetText(); - if ( aText.Len() == 0 ) - pWindow->SetText( rElement.m_aUIName ); - } - - ::Point aPos( rElement.m_aFloatingData.m_aPos.X(), - rElement.m_aFloatingData.m_aPos.Y() ); - sal_Bool bWriteData( sal_False ); - sal_Bool bUndefPos = ( rElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || - rElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); - sal_Bool bSetSize = ( rElement.m_aFloatingData.m_aSize.Width() != 0 && - rElement.m_aFloatingData.m_aSize.Height() != 0 ); - xDockWindow->setFloatingMode( sal_True ); - if ( bUndefPos ) - { - aPos = implts_findNextCascadeFloatingPos(); - rElement.m_aFloatingData.m_aPos = aPos; // set new cascaded position - bWriteData = sal_True; - } - - if( bSetSize ) - xWindow->setOutputSize( AWTSize( rElement.m_aFloatingData.m_aSize ) ); - else - { - if( pToolBox ) - { - // set an optimal initial floating size - vos::OGuard aGuard( Application::GetSolarMutex() ); - ::Size aSize( pToolBox->CalcFloatingWindowSizePixel() ); - pToolBox->SetOutputSizePixel( aSize ); - } - } - - // #i60882# IMPORTANT: Set position after size as it is - // possible that we position some part of the toolbar - // outside of the desktop. A default constructed toolbar - // always has one line. Now VCL automatically - // position the toolbar back into the desktop. Therefore - // we resize the toolbar with the new (wrong) position. - // To fix this problem we have to set the size BEFORE the - // position. - xWindow->setPosSize( aPos.X(), aPos.Y(), 0, 0, - css::awt::PosSize::POS ); - - if ( bWriteData ) - implts_writeWindowStateData( rElement.m_aName, rElement ); - if ( bShowElement && pWindow ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - } - } - else - { - ::Point aDockPos; - ::Point aPixelPos; - sal_Bool bSetSize( sal_False ); - ::Size aSize; - - if ( pToolBox ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pToolBox->SetAlign( ImplConvertAlignment(rElement.m_aDockedData.m_nDockedArea ) ); - pToolBox->SetLineCount( 1 ); - if ( rElement.m_aDockedData.m_bLocked ) - xDockWindow->lock(); - aSize = pToolBox->CalcWindowSizePixel(); - bSetSize = sal_True; - - if (( rElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && - ( rElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) - { - implts_findNextDockingPos( (DockingArea)rElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); - rElement.m_aDockedData.m_aPos = aDockPos; - } - } - - xWindow->setPosSize( aPixelPos.X(), - aPixelPos.Y(), - 0, 0, - css::awt::PosSize::POS ); - if( bSetSize ) - xWindow->setOutputSize( AWTSize( aSize) ); - - if ( bShowElement && pWindow ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow->Show( sal_True ); - } - } - } -} - -::Point LayoutManager::implts_findNextCascadeFloatingPos() -{ - const sal_Int32 nHotZoneX = 50; - const sal_Int32 nHotZoneY = 50; - const sal_Int32 nCascadeIndentX = 15; - const sal_Int32 nCascadeIndentY = 15; - - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - Reference< css::awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - Reference< css::awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - aReadLock.unlock(); - - ::Point aStartPos( nCascadeIndentX, nCascadeIndentY ); - ::Point aCurrPos( aStartPos ); - css::awt::Rectangle aRect; - - Window* pContainerWindow( 0 ); - if ( xContainerWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - if ( pContainerWindow ) - aStartPos = pContainerWindow->OutputToScreenPixel( aStartPos ); - } - - // Determine size of top and left docking area - css::awt::Rectangle aTopRect = xTopDockingWindow->getPosSize(); - css::awt::Rectangle aLeftRect = xLeftDockingWindow->getPosSize(); - - aStartPos.X() += aLeftRect.Width + nCascadeIndentX; - aStartPos.Y() += aTopRect.Height + nCascadeIndentY; - aCurrPos = aStartPos; - - // Try to find a cascaded position for the new floating window - UIElementVector::const_iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); - if ( xDockWindow.is() && xDockWindow->isFloating() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() ) - { - css::awt::Rectangle aFloatRect = xWindow->getPosSize(); - if ((( aFloatRect.X - nHotZoneX ) <= aCurrPos.X() ) && - ( aFloatRect.X >= aCurrPos.X() ) && - (( aFloatRect.Y - nHotZoneY ) <= aCurrPos.Y() ) && - ( aFloatRect.Y >= aCurrPos.Y() )) - { - aCurrPos.X() = aFloatRect.X + nCascadeIndentX; - aCurrPos.Y() = aFloatRect.Y + nCascadeIndentY; - } - } - } - } - } - - return aCurrPos; -} - -void LayoutManager::implts_findNextDockingPos( DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ) -{ - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xDockingWindow = m_xDockAreaWindows[DockingArea]; - ::Size aDockingWinSize; - Window* pDockingWindow( 0 ); - aReadLock.unlock(); - - if (( DockingArea < DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea > DockingArea_DOCKINGAREA_RIGHT )) - DockingArea = DockingArea_DOCKINGAREA_TOP; - - { - // Retrieve output size from container Window - vos::OGuard aGuard( Application::GetSolarMutex() ); - pDockingWindow = VCLUnoHelper::GetWindow( xDockingWindow ); - if ( pDockingWindow ) - aDockingWinSize = pDockingWindow->GetOutputSizePixel(); - } - - sal_Int32 nFreeRowColPixelPos( 0 ); - sal_Int32 nMaxSpace( 0 ); - sal_Int32 nNeededSpace( 0 ); - sal_Int32 nTopDockingAreaSize( 0 ); - - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - nMaxSpace = aDockingWinSize.Width(); - nNeededSpace = aUIElementSize.Width(); - } - else - { - nMaxSpace = aDockingWinSize.Height(); - nNeededSpace = aUIElementSize.Height(); - nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); - } - - std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; - - implts_getDockingAreaElementInfos( DockingArea, aRowColumnsWindowData ); - sal_Int32 nPixelPos( 0 ); - const sal_uInt32 nCount = aRowColumnsWindowData.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - SingleRowColumnWindowData& rRowColumnWindowData = aRowColumnsWindowData[i]; - - if (( DockingArea == DockingArea_DOCKINGAREA_BOTTOM ) || - ( DockingArea == DockingArea_DOCKINGAREA_RIGHT )) - nPixelPos += rRowColumnWindowData.nStaticSize; - - if ((( nMaxSpace - rRowColumnWindowData.nVarSize ) >= nNeededSpace ) || - ( rRowColumnWindowData.nSpace >= nNeededSpace )) - { - // Check current row where we can find the needed space - sal_Int32 nCurrPos( 0 ); - const sal_uInt32 nWindowSizesCount = rRowColumnWindowData.aRowColumnWindowSizes.size(); - for ( sal_uInt32 j = 0; j < nWindowSizesCount; j++ ) - { - css::awt::Rectangle rRect = rRowColumnWindowData.aRowColumnWindowSizes[j]; - sal_Int32& rSpace = rRowColumnWindowData.aRowColumnSpace[j]; - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - if ( rSpace >= nNeededSpace ) - { - rVirtualPos = ::Point( nCurrPos, rRowColumnWindowData.nRowColumn ); - if ( DockingArea == DockingArea_DOCKINGAREA_TOP ) - rPixelPos = ::Point( nCurrPos, nPixelPos ); - else - rPixelPos = ::Point( nCurrPos, aDockingWinSize.Height() - nPixelPos ); - return; - } - nCurrPos = rRect.X + rRect.Width; - } - else - { - if ( rSpace >= nNeededSpace ) - { - rVirtualPos = ::Point( rRowColumnWindowData.nRowColumn, nCurrPos ); - if ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) - rPixelPos = ::Point( nPixelPos, nTopDockingAreaSize + nCurrPos ); - else - rPixelPos = ::Point( aDockingWinSize.Width() - nPixelPos , nTopDockingAreaSize + nCurrPos ); - return; - } - nCurrPos = rRect.Y + rRect.Height; - } - } - - if (( nCurrPos + nNeededSpace ) <= nMaxSpace ) - { - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - rVirtualPos = ::Point( nCurrPos, rRowColumnWindowData.nRowColumn ); - if ( DockingArea == DockingArea_DOCKINGAREA_TOP ) - rPixelPos = ::Point( nCurrPos, nPixelPos ); - else - rPixelPos = ::Point( nCurrPos, aDockingWinSize.Height() - nPixelPos ); - return; - } - else - { - rVirtualPos = ::Point( rRowColumnWindowData.nRowColumn, nCurrPos ); - if ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) - rPixelPos = ::Point( nPixelPos, nTopDockingAreaSize + nCurrPos ); - else - rPixelPos = ::Point( aDockingWinSize.Width() - nPixelPos , nTopDockingAreaSize + nCurrPos ); - return; - } - } - } - - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_LEFT )) - nPixelPos += rRowColumnWindowData.nStaticSize; - } - - sal_Int32 nNextFreeRowCol( 0 ); - sal_Int32 nRowColumnsCount = aRowColumnsWindowData.size(); - if ( nRowColumnsCount > 0 ) - nNextFreeRowCol = aRowColumnsWindowData[nRowColumnsCount-1].nRowColumn+1; - else - nNextFreeRowCol = 0; - - if ( nNextFreeRowCol == 0 ) - { - if ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - nFreeRowColPixelPos = aDockingWinSize.Height() - aUIElementSize.Height(); - else if ( DockingArea == DockingArea_DOCKINGAREA_RIGHT ) - nFreeRowColPixelPos = aDockingWinSize.Width() - aUIElementSize.Width(); - } - - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - rVirtualPos = ::Point( 0, nNextFreeRowCol ); - if ( DockingArea == DockingArea_DOCKINGAREA_TOP ) - rPixelPos = ::Point( 0, nFreeRowColPixelPos ); - else - rPixelPos = ::Point( 0, aDockingWinSize.Height() - nFreeRowColPixelPos ); - } - else - { - rVirtualPos = ::Point( nNextFreeRowCol, 0 ); - rPixelPos = ::Point( aDockingWinSize.Width() - nFreeRowColPixelPos, 0 ); - } -} - ::Size LayoutManager::implts_getContainerWindowOutputSize() { ReadGuard aReadLock( m_aLock ); @@ -1992,1053 +1066,6 @@ void LayoutManager::implts_sortUIElements() aWriteLock.unlock(); } -void LayoutManager::implts_getDockingAreaElementInfos( DockingArea eDockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ) -{ - std::vector< UIElement > aWindowVector; - - if (( eDockingArea < DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea > DockingArea_DOCKINGAREA_RIGHT )) - eDockingArea = DockingArea_DOCKINGAREA_TOP; - - Reference< css::awt::XWindow > xDockAreaWindow; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - aWindowVector.reserve(m_aUIElements.size()); - xDockAreaWindow = m_xDockAreaWindows[eDockingArea]; - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea && pIter->m_bVisible && !pIter->m_bFloating ) - { - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow.is() ) - { - // docked windows - aWindowVector.push_back( *pIter ); - } - } - } - } - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - rRowColumnsWindowData.clear(); - - // Collect data from windows that are on the same row/column - sal_Int32 j; - sal_Int32 nIndex( 0 ); - sal_Int32 nLastPos( 0 ); - sal_Int32 nCurrPos( -1 ); - sal_Int32 nLastRowColPixelPos( 0 ); - css::awt::Rectangle aDockAreaRect; - - if ( xDockAreaWindow.is() ) - aDockAreaRect = xDockAreaWindow->getPosSize(); - - if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) - nLastRowColPixelPos = 0; - else if ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - nLastRowColPixelPos = aDockAreaRect.Height; - else if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) - nLastRowColPixelPos = 0; - else - nLastRowColPixelPos = aDockAreaRect.Width; - - const sal_uInt32 nCount = aWindowVector.size(); - for ( j = 0; j < sal_Int32( nCount); j++ ) - { - const UIElement& rElement = aWindowVector[j]; - Reference< css::awt::XWindow > xWindow; - Reference< XUIElement > xUIElement( rElement.m_xUIElement ); - css::awt::Rectangle aPosSize; - if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) ) - continue; - if (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - if ( nCurrPos == -1 ) - { - nCurrPos = rElement.m_aDockedData.m_aPos.Y(); - nLastPos = 0; - - SingleRowColumnWindowData aRowColumnWindowData; - aRowColumnWindowData.nRowColumn = nCurrPos; - rRowColumnsWindowData.push_back( aRowColumnWindowData ); - } - - sal_Int32 nSpace( 0 ); - if ( rElement.m_aDockedData.m_aPos.Y() != nCurrPos ) - { - if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) - nLastRowColPixelPos += rRowColumnsWindowData[nIndex].nStaticSize; - else - nLastRowColPixelPos -= rRowColumnsWindowData[nIndex].nStaticSize; - ++nIndex; - nLastPos = 0; - nCurrPos = rElement.m_aDockedData.m_aPos.Y(); - SingleRowColumnWindowData aRowColumnWindowData; - aRowColumnWindowData.nRowColumn = nCurrPos; - rRowColumnsWindowData.push_back( aRowColumnWindowData ); - } - - // Calc space before an element and store it - nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); - if ( rElement.m_aDockedData.m_aPos.X() >= nLastPos ) - { - rRowColumnsWindowData[nIndex].nSpace += nSpace; - nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width; - } - else - { - nSpace = 0; - nLastPos += aPosSize.Width; - } - rRowColumnsWindowData[nIndex].aRowColumnSpace.push_back( nSpace ); - - rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); - rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); - rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); - if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Height ) - rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Height; - if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, nLastRowColPixelPos, - aDockAreaRect.Width, aPosSize.Height ); - else - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, ( nLastRowColPixelPos - aPosSize.Height ), - aDockAreaRect.Width, aPosSize.Height ); - rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Width + nSpace; - } - else - { - if ( nCurrPos == -1 ) - { - nCurrPos = rElement.m_aDockedData.m_aPos.X(); - nLastPos = 0; - - SingleRowColumnWindowData aRowColumnWindowData; - aRowColumnWindowData.nRowColumn = nCurrPos; - rRowColumnsWindowData.push_back( aRowColumnWindowData ); - } - - sal_Int32 nSpace( 0 ); - if ( rElement.m_aDockedData.m_aPos.X() != nCurrPos ) - { - if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) - nLastRowColPixelPos += rRowColumnsWindowData[nIndex].nStaticSize; - else - nLastRowColPixelPos -= rRowColumnsWindowData[nIndex].nStaticSize; - ++nIndex; - nLastPos = 0; - nCurrPos = rElement.m_aDockedData.m_aPos.X(); - SingleRowColumnWindowData aRowColumnWindowData; - aRowColumnWindowData.nRowColumn = nCurrPos; - rRowColumnsWindowData.push_back( aRowColumnWindowData ); - } - - // Calc space before an element and store it - nSpace = ( rElement.m_aDockedData.m_aPos.Y() - nLastPos ); - if ( rElement.m_aDockedData.m_aPos.Y() > nLastPos ) - { - rRowColumnsWindowData[nIndex].nSpace += nSpace; - nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; - } - else - { - nSpace = 0; - nLastPos += aPosSize.Height; - } - rRowColumnsWindowData[nIndex].aRowColumnSpace.push_back( nSpace ); - - rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); - rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); - rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); - if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Width ) - rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Width; - if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( nLastRowColPixelPos, 0, - aPosSize.Width, aDockAreaRect.Height ); - else - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( ( nLastRowColPixelPos - aPosSize.Width ), 0, - aPosSize.Width, aDockAreaRect.Height ); - rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Height + nSpace; - } - } -} - -void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea eDockingArea, sal_Int32 nRowCol, SingleRowColumnWindowData& rRowColumnWindowData ) -{ - std::vector< UIElement > aWindowVector; - - if (( eDockingArea < DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea > DockingArea_DOCKINGAREA_RIGHT )) - eDockingArea = DockingArea_DOCKINGAREA_TOP; - - sal_Bool bHorzDockArea = (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - UIElementVector::iterator pIter; - UIElementVector::iterator pEnd = m_aUIElements.end(); - for ( pIter = m_aUIElements.begin(); pIter != pEnd; pIter++ ) - { - if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea ) - { - sal_Bool bSameRowCol = bHorzDockArea ? - ( pIter->m_aDockedData.m_aPos.Y() == nRowCol ) : - ( pIter->m_aDockedData.m_aPos.X() == nRowCol ); - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - - if ( bSameRowCol && xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( pWindow && pIter->m_bVisible && xDockWindow.is() && !pIter->m_bFloating ) - { - // docked windows - aWindowVector.push_back( *pIter ); - } - } - } - } - } - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - // Initialize structure - rRowColumnWindowData.aUIElementNames.clear(); - rRowColumnWindowData.aRowColumnWindows.clear(); - rRowColumnWindowData.aRowColumnWindowSizes.clear(); - rRowColumnWindowData.aRowColumnSpace.clear(); - rRowColumnWindowData.nVarSize = 0; - rRowColumnWindowData.nStaticSize = 0; - rRowColumnWindowData.nSpace = 0; - rRowColumnWindowData.nRowColumn = nRowCol; - - // Collect data from windows that are on the same row/column - sal_Int32 j; - sal_Int32 nLastPos( 0 ); - - const sal_uInt32 nCount = aWindowVector.size(); - for ( j = 0; j < sal_Int32( nCount); j++ ) - { - const UIElement& rElement = aWindowVector[j]; - Reference< css::awt::XWindow > xWindow; - Reference< XUIElement > xUIElement( rElement.m_xUIElement ); - css::awt::Rectangle aPosSize; - if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) ) - continue; - - sal_Int32 nSpace; - if (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); - - // Calc space before an element and store it - if ( rElement.m_aDockedData.m_aPos.X() > nLastPos ) - rRowColumnWindowData.nSpace += nSpace; - else - nSpace = 0; - - nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width; - - - rRowColumnWindowData.aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); - if ( rRowColumnWindowData.nStaticSize < aPosSize.Height ) - rRowColumnWindowData.nStaticSize = aPosSize.Height; - rRowColumnWindowData.nVarSize += aPosSize.Width; - } - else - { - // Calc space before an element and store it - nSpace = ( rElement.m_aDockedData.m_aPos.Y() - nLastPos ); - if ( rElement.m_aDockedData.m_aPos.Y() > nLastPos ) - rRowColumnWindowData.nSpace += nSpace; - else - nSpace = 0; - - nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; - - rRowColumnWindowData.aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); - if ( rRowColumnWindowData.nStaticSize < aPosSize.Width ) - rRowColumnWindowData.nStaticSize = aPosSize.Width; - rRowColumnWindowData.nVarSize += aPosSize.Height; - } - - rRowColumnWindowData.aUIElementNames.push_back( rElement.m_aName ); - rRowColumnWindowData.aRowColumnWindows.push_back( xWindow ); - rRowColumnWindowData.aRowColumnSpace.push_back( nSpace ); - rRowColumnWindowData.nVarSize += nSpace; - } -} - -::Rectangle LayoutManager::implts_determineFrontDockingRect( - DockingArea eDockingArea, - sal_Int32 nRowCol, - const ::Rectangle& rDockedElementRect, - const ::rtl::OUString& rMovedElementName, - const ::Rectangle& rMovedElementRect ) -{ - SingleRowColumnWindowData aRowColumnWindowData; - - sal_Bool bHorzDockArea = (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - - implts_getDockingAreaElementInfoOnSingleRowCol( eDockingArea, nRowCol, aRowColumnWindowData ); - if ( aRowColumnWindowData.aRowColumnWindows.empty() ) - return rMovedElementRect; - else - { - sal_Int32 nSpace( 0 ); - ::Rectangle aFrontDockingRect( rMovedElementRect ); - const sal_uInt32 nCount = aRowColumnWindowData.aRowColumnWindows.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - if ( bHorzDockArea ) - { - if ( aRowColumnWindowData.aRowColumnWindowSizes[i].X >= rDockedElementRect.Left() ) - { - nSpace += aRowColumnWindowData.aRowColumnSpace[i]; - break; - } - else if ( aRowColumnWindowData.aUIElementNames[i] == rMovedElementName ) - nSpace += aRowColumnWindowData.aRowColumnWindowSizes[i].Width + - aRowColumnWindowData.aRowColumnSpace[i]; - else - nSpace = 0; - } - else - { - if ( aRowColumnWindowData.aRowColumnWindowSizes[i].Y >= rDockedElementRect.Top() ) - { - nSpace += aRowColumnWindowData.aRowColumnSpace[i]; - break; - } - else if ( aRowColumnWindowData.aUIElementNames[i] == rMovedElementName ) - nSpace += aRowColumnWindowData.aRowColumnWindowSizes[i].Height + - aRowColumnWindowData.aRowColumnSpace[i]; - else - nSpace = 0; - } - } - - if ( nSpace > 0 ) - { - sal_Int32 nMove = std::min( nSpace, static_cast(aFrontDockingRect.getWidth()) ); - if ( bHorzDockArea ) - aFrontDockingRect.Move( -nMove, 0 ); - else - aFrontDockingRect.Move( 0, -nMove ); - } - - return aFrontDockingRect; - } -} - -::Rectangle LayoutManager::implts_getWindowRectFromRowColumn( - ::com::sun::star::ui::DockingArea DockingArea, - const SingleRowColumnWindowData& rRowColumnWindowData, - const ::Point& rMousePos, - const rtl::OUString& rExcludeElementName ) -{ - ::Rectangle aWinRect; - - if (( DockingArea < DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea > DockingArea_DOCKINGAREA_RIGHT )) - DockingArea = DockingArea_DOCKINGAREA_TOP; - - if ( rRowColumnWindowData.aRowColumnWindows.empty() ) - return aWinRect; - else - { - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - Reference< css::awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[DockingArea]; - aReadLock.unlock(); - - // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect - vos::OGuard aGuard( Application::GetSolarMutex() ); - - // Retrieve output size from container Window - Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow )); - Window* pDockingAreaWindow( VCLUnoHelper::GetWindow( xDockingAreaWindow )); - if ( pDockingAreaWindow && pContainerWindow ) - { - const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindows.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - css::awt::Rectangle aWindowRect = rRowColumnWindowData.aRowColumnWindows[i]->getPosSize(); - ::Rectangle aRect( aWindowRect.X, aWindowRect.Y, aWindowRect.X+aWindowRect.Width, aWindowRect.Y+aWindowRect.Height ); - aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); - if ( aRect.IsInside( rMousePos )) - { - // Check if we have found the excluded element. If yes, we have to provide an empty rectangle. - // We prevent that a toolbar cannot be moved when the mouse pointer is inside its own rectangle! - if ( rExcludeElementName != rRowColumnWindowData.aUIElementNames[i] ) - return aRect; - else - break; - } - } - } - } - - return aWinRect; -} - -framework::LayoutManager::DockingOperation -LayoutManager::implts_determineDockingOperation( - ::com::sun::star::ui::DockingArea DockingArea, - const ::Rectangle& rRowColRect, - const Point& rMousePos ) -{ - const sal_Int32 nHorzVerticalRegionSize = 6; - const sal_Int32 nHorzVerticalMoveRegion = 4; - - if ( rRowColRect.IsInside( rMousePos )) - { - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - sal_Int32 nRegion = rRowColRect.getHeight() / nHorzVerticalRegionSize; - sal_Int32 nPosY = rRowColRect.Top() + nRegion; - - if ( rMousePos.Y() < nPosY ) - return ( DockingArea == DockingArea_DOCKINGAREA_TOP ) ? DOCKOP_BEFORE_COLROW : DOCKOP_AFTER_COLROW; - else if ( rMousePos.Y() < ( nPosY + nRegion*nHorzVerticalMoveRegion )) - return DOCKOP_ON_COLROW; - else - return ( DockingArea == DockingArea_DOCKINGAREA_TOP ) ? DOCKOP_AFTER_COLROW : DOCKOP_BEFORE_COLROW; - } - else - { - sal_Int32 nRegion = rRowColRect.getWidth() / nHorzVerticalRegionSize; - sal_Int32 nPosX = rRowColRect.Left() + nRegion; - - if ( rMousePos.X() < nPosX ) - return ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) ? DOCKOP_BEFORE_COLROW : DOCKOP_AFTER_COLROW; - else if ( rMousePos.X() < ( nPosX + nRegion*nHorzVerticalMoveRegion )) - return DOCKOP_ON_COLROW; - else - return ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) ? DOCKOP_AFTER_COLROW : DOCKOP_BEFORE_COLROW; - } - } - else - return DOCKOP_ON_COLROW; -} - -::Rectangle LayoutManager::implts_calcTrackingAndElementRect( - ::com::sun::star::ui::DockingArea eDockingArea, - sal_Int32 nRowCol, - UIElement& rUIElement, - const ::Rectangle& rTrackingRect, - const ::Rectangle& rRowColumnRect, - const ::Size& rContainerWinSize ) -{ - sal_Bool bHorizontalDockArea( ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - - sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); - sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); - - ::Size aStatusBarSize( implts_getStatusBarSize() ); - sal_Int32 nMaxLeftRightDockAreaSize = rContainerWinSize.Height() - - nTopDockingAreaSize - - nBottomDockingAreaSize - - aStatusBarSize.Height(); - - ::Rectangle aTrackingRect( rTrackingRect ); - if ( bHorizontalDockArea ) - { - sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 ))); - if (( nPosX + rTrackingRect.getWidth()) > rContainerWinSize.Width() ) - nPosX = std::min( nPosX, - std::max( sal_Int32( rContainerWinSize.Width() - rTrackingRect.getWidth() ), - sal_Int32( 0 ))); - - sal_Int32 nSize = std::min( rContainerWinSize.Width(), rTrackingRect.getWidth() ); - - aTrackingRect.SetPos( ::Point( nPosX, rRowColumnRect.Top() )); - aTrackingRect.setWidth( nSize ); - aTrackingRect.setHeight( rRowColumnRect.getHeight() ); - - // Set virtual position - rUIElement.m_aDockedData.m_aPos.X() = nPosX; - rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; - } - else - { - sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), - sal_Int32( nMaxLeftRightDockAreaSize )); - - sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); - if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) - nPosY = std::min( nPosY, - std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), - sal_Int32( nTopDockingAreaSize ))); - - sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast(aTrackingRect.getHeight()) ); - - aTrackingRect.SetPos( ::Point( rRowColumnRect.Left(), nPosY )); - aTrackingRect.setWidth( rRowColumnRect.getWidth() ); - aTrackingRect.setHeight( nSize ); - - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[eDockingArea]; - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - aReadLock.unlock(); - - sal_Int32 nDockPosY( 0 ); - Window* pDockingAreaWindow( 0 ); - Window* pContainerWindow( 0 ); - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - nDockPosY = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( ::Point( 0, nPosY ))).Y(); - } - - // Set virtual position - rUIElement.m_aDockedData.m_aPos.X() = nRowCol; - rUIElement.m_aDockedData.m_aPos.Y() = nDockPosY; - } - - return aTrackingRect; -} - -void implts_setTrackingRect( DockingArea eDockingArea, const Point& rMousePos, ::Rectangle& rTrackingRect ) -{ - sal_Bool bHorizontalDockArea( ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - - ::Point aPoint = rTrackingRect.TopLeft(); - if ( bHorizontalDockArea ) - aPoint.X() = rMousePos.X(); - else - aPoint.Y() = rMousePos.Y(); - rTrackingRect.SetPos( aPoint ); -} - -void LayoutManager::implts_calcDockingPosSize( - UIElement& rUIElement, - DockingOperation& rDockingOperation, - ::Rectangle& rTrackingRect, - const Point& rMousePos ) -{ - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - ::Size aContainerWinSize; - Window* pContainerWindow( 0 ); - aReadLock.unlock(); - - { - // Retrieve output size from container Window - vos::OGuard aGuard( Application::GetSolarMutex() ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - aContainerWinSize = pContainerWindow->GetOutputSizePixel(); - } - - if ( !rUIElement.m_xUIElement.is() ) - { - rTrackingRect = ::Rectangle(); - return; - } - - Window* pDockWindow( 0 ); - Window* pDockingAreaWindow( 0 ); - ToolBox* pToolBox( 0 ); - Reference< css::awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow > xDockingAreaWindow; - ::Rectangle aTrackingRect( rTrackingRect ); - ::com::sun::star::ui::DockingArea eDockedArea( (::com::sun::star::ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); - sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); - sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); - sal_Bool bHorizontalDockArea( ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM )); - ::Size aStatusBarSize( implts_getStatusBarSize() ); - sal_Int32 nMaxLeftRightDockAreaSize = aContainerWinSize.Height() - - nTopDockingAreaSize - - nBottomDockingAreaSize - - aStatusBarSize.Height(); - ::Rectangle aDockingAreaRect; - - aReadLock.lock(); - xDockingAreaWindow = m_xDockAreaWindows[eDockedArea]; - aReadLock.unlock(); - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); - pDockWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pDockWindow && pDockWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pDockWindow; - - aDockingAreaRect = ::Rectangle( pDockingAreaWindow->GetPosPixel(), pDockingAreaWindow->GetSizePixel() ); - if ( pToolBox ) - { - // docked toolbars always have one line - ::Size aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( sal_Int16( eDockedArea )) ); - aTrackingRect.SetSize( ::Size( aSize.Width(), aSize.Height() )); - } - } - - // default docking operation, dock on the given row/column - sal_Bool bOpOutsideOfDockingArea( !aDockingAreaRect.IsInside( rMousePos )); - std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; - - rDockingOperation = DOCKOP_ON_COLROW; - implts_getDockingAreaElementInfos( eDockedArea, aRowColumnsWindowData ); - - // determine current first row/column and last row/column - sal_Int32 nMaxRowCol( -1 ); - sal_Int32 nMinRowCol( SAL_MAX_INT32 ); - const sal_uInt32 nCount = aRowColumnsWindowData.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - if ( aRowColumnsWindowData[i].nRowColumn > nMaxRowCol ) - nMaxRowCol = aRowColumnsWindowData[i].nRowColumn; - if ( aRowColumnsWindowData[i].nRowColumn < nMinRowCol ) - nMinRowCol = aRowColumnsWindowData[i].nRowColumn; - } - - if ( !bOpOutsideOfDockingArea ) - { - // docking inside our docking area - sal_Int32 nIndex( -1 ); - sal_Int32 nRowCol( -1 ); - ::Rectangle aWindowRect; - ::Rectangle aRowColumnRect; - - const sal_uInt32 nWindowDataCount = aRowColumnsWindowData.size(); - for ( sal_uInt32 i = 0; i < nWindowDataCount; i++ ) - { - ::Rectangle aRect( aRowColumnsWindowData[i].aRowColumnRect.X, - aRowColumnsWindowData[i].aRowColumnRect.Y, - aRowColumnsWindowData[i].aRowColumnRect.X + aRowColumnsWindowData[i].aRowColumnRect.Width, - aRowColumnsWindowData[i].aRowColumnRect.Y + aRowColumnsWindowData[i].aRowColumnRect.Height ); - - { - // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect - vos::OGuard aGuard( Application::GetSolarMutex() ); - aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); - } - - sal_Bool bIsInsideRowCol( aRect.IsInside( rMousePos ) ); - if ( bIsInsideRowCol ) - { - nIndex = i; - nRowCol = aRowColumnsWindowData[i].nRowColumn; - rDockingOperation = implts_determineDockingOperation( eDockedArea, aRect, rMousePos ); - aWindowRect = implts_getWindowRectFromRowColumn( eDockedArea, aRowColumnsWindowData[i], rMousePos, rUIElement.m_aName ); - aRowColumnRect = aRect; - break; - } - } - - OSL_ENSURE( ( nIndex >= 0 ) && ( nRowCol >= 0 ), "Impossible case - no row/column found but mouse pointer is inside our docking area" ); - if (( nIndex >= 0 ) && ( nRowCol >= 0 )) - { - if ( rDockingOperation == DOCKOP_ON_COLROW ) - { - if ( !aWindowRect.IsEmpty()) - { - // Tracking rect is on a row/column and mouse is over a docked toolbar. - // Determine if the tracking rect must be located before/after the docked toolbar. - - ::Rectangle aUIElementRect( aWindowRect ); - sal_Int32 nMiddle( bHorizontalDockArea ? ( aWindowRect.Left() + aWindowRect.getWidth() / 2 ) : - ( aWindowRect.Top() + aWindowRect.getHeight() / 2 )); - sal_Bool bInsertBefore( bHorizontalDockArea ? ( rMousePos.X() < nMiddle ) : ( rMousePos.Y() < nMiddle )); - if ( bInsertBefore ) - { - if ( bHorizontalDockArea ) - { - sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( aContainerWinSize.Width() - aWindowRect.Left() ), - sal_Int32( aTrackingRect.getWidth() ))); - if ( nSize == 0 ) - nSize = aWindowRect.getWidth(); - - aUIElementRect.SetSize( ::Size( nSize, aWindowRect.getHeight() )); - aWindowRect = implts_determineFrontDockingRect( eDockedArea, nRowCol, aWindowRect,rUIElement.m_aName, aUIElementRect ); - - // Set virtual position - rUIElement.m_aDockedData.m_aPos.X() = aWindowRect.Left(); - rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; - } - else - { - sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( - nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Top() ), - sal_Int32( aTrackingRect.getHeight() ))); - if ( nSize == 0 ) - nSize = aWindowRect.getHeight(); - - aUIElementRect.SetSize( ::Size( aWindowRect.getWidth(), nSize )); - aWindowRect = implts_determineFrontDockingRect( eDockedArea, nRowCol, aWindowRect, rUIElement.m_aName, aUIElementRect ); - - // Set virtual position - sal_Int32 nPosY = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( aWindowRect.TopLeft() )).Y(); - rUIElement.m_aDockedData.m_aPos.X() = nRowCol; - rUIElement.m_aDockedData.m_aPos.Y() = nPosY; - } - - rTrackingRect = aWindowRect; - return; - } - else - { - if ( bHorizontalDockArea ) - { - sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32(( aContainerWinSize.Width() ) - aWindowRect.Right() ), - sal_Int32( aTrackingRect.getWidth() ))); - if ( nSize == 0 ) - { - aUIElementRect.SetPos( ::Point( aContainerWinSize.Width() - aTrackingRect.getWidth(), aWindowRect.Top() )); - aUIElementRect.SetSize( ::Size( aTrackingRect.getWidth(), aWindowRect.getHeight() )); - rUIElement.m_aDockedData.m_aPos.X() = aUIElementRect.Left(); - } - else - { - aUIElementRect.SetPos( ::Point( aWindowRect.Right(), aWindowRect.Top() )); - aUIElementRect.SetSize( ::Size( nSize, aWindowRect.getHeight() )); - rUIElement.m_aDockedData.m_aPos.X() = aWindowRect.Right(); - } - - // Set virtual position - rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; - } - else - { - sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Bottom() ), - sal_Int32( aTrackingRect.getHeight() ))); - aUIElementRect.SetPos( ::Point( aWindowRect.Left(), aWindowRect.Bottom() )); - aUIElementRect.SetSize( ::Size( aWindowRect.getWidth(), nSize )); - - // Set virtual position - sal_Int32 nPosY( 0 ); - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - nPosY = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( aWindowRect.BottomRight() )).Y(); - } - rUIElement.m_aDockedData.m_aPos.X() = nRowCol; - rUIElement.m_aDockedData.m_aPos.Y() = nPosY; - } - - rTrackingRect = aUIElementRect; - return; - } - } - else - { - implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); - rTrackingRect = implts_calcTrackingAndElementRect( - eDockedArea, nRowCol, rUIElement, - aTrackingRect, aRowColumnRect, aContainerWinSize ); - return; - } - } - else - { - if ((( nRowCol == nMinRowCol ) && ( rDockingOperation == DOCKOP_BEFORE_COLROW )) || - (( nRowCol == nMaxRowCol ) && ( rDockingOperation == DOCKOP_AFTER_COLROW ))) - bOpOutsideOfDockingArea = sal_True; - else - { - // handle docking before/after a row - implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); - rTrackingRect = implts_calcTrackingAndElementRect( - eDockedArea, nRowCol, rUIElement, - aTrackingRect, aRowColumnRect, aContainerWinSize ); - - sal_Int32 nOffsetX( 0 ); - sal_Int32 nOffsetY( 0 ); - if ( bHorizontalDockArea ) - nOffsetY = sal_Int32( floor( aRowColumnRect.getHeight() / 2 + 0.5 )); - else - nOffsetX = sal_Int32( floor( aRowColumnRect.getWidth() / 2 + 0.5 )); - - if ( rDockingOperation == DOCKOP_BEFORE_COLROW ) - { - if (( eDockedArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockedArea == DockingArea_DOCKINGAREA_LEFT )) - { - // Docking before/after means move track rectangle half column/row. - // As left and top are ordered 0...n instead of right and bottom - // which uses n...0, we have to use negative values for top/left. - nOffsetX *= -1; - nOffsetY *= -1; - } - } - else - { - if (( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) || - ( eDockedArea == DockingArea_DOCKINGAREA_RIGHT )) - { - // Docking before/after means move track rectangle half column/row. - // As left and top are ordered 0...n instead of right and bottom - // which uses n...0, we have to use negative values for top/left. - nOffsetX *= -1; - nOffsetY *= -1; - } - nRowCol++; - } - - if ( bHorizontalDockArea ) - rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; - else - rUIElement.m_aDockedData.m_aPos.X() = nRowCol; - - rTrackingRect.Move( nOffsetX, nOffsetY ); - rTrackingRect.SetSize( aTrackingRect.GetSize() ); - } - } - } - } - - // Docking outside of our docking window area => - // Users want to dock before/after first/last docked element or to an empty docking area - if ( bOpOutsideOfDockingArea ) - { - // set correct size for docking - implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); - rTrackingRect = aTrackingRect; - - if ( bHorizontalDockArea ) - { - sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 ))); - if (( nPosX + rTrackingRect.getWidth()) > aContainerWinSize.Width() ) - nPosX = std::min( nPosX, - std::max( sal_Int32( aContainerWinSize.Width() - rTrackingRect.getWidth() ), - sal_Int32( 0 ))); - - sal_Int32 nSize = std::min( aContainerWinSize.Width(), rTrackingRect.getWidth() ); - sal_Int32 nDockHeight = std::max( static_cast(aDockingAreaRect.getHeight()), sal_Int32( 0 )); - if ( nDockHeight == 0 ) - { - sal_Int32 nPosY( std::max( aDockingAreaRect.Top(), aDockingAreaRect.Bottom() )); - if ( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) - nPosY -= rTrackingRect.getHeight(); - rTrackingRect.SetPos( Point( nPosX, nPosY )); - rUIElement.m_aDockedData.m_aPos.Y() = 0; - } - else if ( rMousePos.Y() < ( aDockingAreaRect.Top() + ( nDockHeight / 2 ))) - { - rTrackingRect.SetPos( Point( nPosX, aDockingAreaRect.Top() - rTrackingRect.getHeight() )); - if ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) - rUIElement.m_aDockedData.m_aPos.Y() = 0; - else - rUIElement.m_aDockedData.m_aPos.Y() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; - rDockingOperation = DOCKOP_BEFORE_COLROW; - } - else - { - rTrackingRect.SetPos( Point( nPosX, aDockingAreaRect.Bottom() )); - if ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) - rUIElement.m_aDockedData.m_aPos.Y() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; - else - rUIElement.m_aDockedData.m_aPos.Y() = 0; - rDockingOperation = DOCKOP_AFTER_COLROW; - } - rTrackingRect.setWidth( nSize ); - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - nPosX = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( rTrackingRect.TopLeft() )).X(); - } - rUIElement.m_aDockedData.m_aPos.X() = nPosX; - } - else - { - sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), - sal_Int32( nMaxLeftRightDockAreaSize )); - - sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); - if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) - nPosY = std::min( nPosY, - std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), - sal_Int32( nTopDockingAreaSize ))); - - sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast(aTrackingRect.getHeight()) ); - sal_Int32 nDockWidth = std::max( static_cast(aDockingAreaRect.getWidth()), sal_Int32( 0 )); - if ( nDockWidth == 0 ) - { - sal_Int32 nPosX( std::max( aDockingAreaRect.Left(), aDockingAreaRect.Right() )); - if ( eDockedArea == DockingArea_DOCKINGAREA_RIGHT ) - nPosX -= rTrackingRect.getWidth(); - rTrackingRect.SetPos( Point( nPosX, nPosY )); - rUIElement.m_aDockedData.m_aPos.X() = 0; - } - else if ( rMousePos.X() < ( aDockingAreaRect.Left() + ( nDockWidth / 2 ))) - { - rTrackingRect.SetPos( Point( aDockingAreaRect.Left() - rTrackingRect.getWidth(), nPosY )); - if ( eDockedArea == DockingArea_DOCKINGAREA_LEFT ) - rUIElement.m_aDockedData.m_aPos.X() = 0; - else - rUIElement.m_aDockedData.m_aPos.X() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; - rDockingOperation = DOCKOP_BEFORE_COLROW; - } - else - { - rTrackingRect.SetPos( Point( aDockingAreaRect.Right(), nPosY )); - if ( eDockedArea == DockingArea_DOCKINGAREA_LEFT ) - rUIElement.m_aDockedData.m_aPos.X() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; - else - rUIElement.m_aDockedData.m_aPos.X() = 0; - rDockingOperation = DOCKOP_AFTER_COLROW; - } - rTrackingRect.setHeight( nSize ); - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - nPosY = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( rTrackingRect.TopLeft() )).Y(); - } - rUIElement.m_aDockedData.m_aPos.Y() = nPosY; - } - } -} - -void LayoutManager::implts_renumberRowColumnData( - ::com::sun::star::ui::DockingArea eDockingArea, - DockingOperation /*eDockingOperation*/, - const UIElement& rUIElement ) -{ - ReadGuard aReadLock( m_aLock ); - Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - aReadLock.unlock(); - - sal_Bool bHorzDockingArea(( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - sal_Int32 nRowCol( bHorzDockingArea ? rUIElement.m_aDockedData.m_aPos.Y() : - rUIElement.m_aDockedData.m_aPos.X() ); - - WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if (( pIter->m_aDockedData.m_nDockedArea == sal_Int16( eDockingArea )) && - ( pIter->m_aName != rUIElement.m_aName )) - { - // Don't change toolbars without a valid docking position! - if (( pIter->m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && - ( pIter->m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) - continue; - - sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? - pIter->m_aDockedData.m_aPos.Y() : pIter->m_aDockedData.m_aPos.X(); - if ( nWindowRowCol >= nRowCol ) - { - if ( bHorzDockingArea ) - pIter->m_aDockedData.m_aPos.Y() += 1; - else - pIter->m_aDockedData.m_aPos.X() += 1; - } - } - } - aWriteLock.unlock(); - - // We have to change the persistent window state part - if ( xPersistentWindowState.is() ) - { - try - { - Sequence< rtl::OUString > aWindowElements = xPersistentWindowState->getElementNames(); - for ( sal_Int32 i = 0; i < aWindowElements.getLength(); i++ ) - { - if ( rUIElement.m_aName != aWindowElements[i] ) - { - try - { - Sequence< PropertyValue > aPropValueSeq; - css::awt::Point aDockedPos; - DockingArea nDockedArea( DockingArea_DOCKINGAREA_DEFAULT ); - - xPersistentWindowState->getByName( aWindowElements[i] ) >>= aPropValueSeq; - for ( sal_Int32 j = 0; j < aPropValueSeq.getLength(); j++ ) - { - if ( aPropValueSeq[j].Name == m_aPropDockingArea ) - aPropValueSeq[j].Value >>= nDockedArea; - else if ( aPropValueSeq[j].Name == m_aPropDockPos ) - aPropValueSeq[j].Value >>= aDockedPos; - } - - // Don't change toolbars without a valid docking position! - if (( aDockedPos.X == SAL_MAX_INT32 ) && ( aDockedPos.Y == SAL_MAX_INT32 )) - continue; - - sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? aDockedPos.Y : aDockedPos.X; - if (( nDockedArea == eDockingArea ) && ( nWindowRowCol >= nRowCol )) - { - if ( bHorzDockingArea ) - aDockedPos.Y += 1; - else - aDockedPos.X += 1; - - Reference< XNameReplace > xReplace( xPersistentWindowState, UNO_QUERY ); - xReplace->replaceByName( aWindowElements[i], makeAny( aPropValueSeq )); - } - } - catch ( Exception& ) - { - } - } - } - } - catch ( Exception& ) - { - } - } -} - -::Size LayoutManager::implts_getTopBottomDockingAreaSizes() -{ - ::Size aSize; - Reference< css::awt::XWindow > xTopDockingAreaWindow; - Reference< css::awt::XWindow > xBottomDockingAreaWindow; - - ReadGuard aReadLock( m_aLock ); - xTopDockingAreaWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - xBottomDockingAreaWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; - aReadLock.unlock(); - - if ( xTopDockingAreaWindow.is() ) - aSize.Width() = xTopDockingAreaWindow->getPosSize().Height; - if ( xBottomDockingAreaWindow.is() ) - aSize.Height() = xBottomDockingAreaWindow->getPosSize().Height; - - return aSize; -} - Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString& aName ) { Reference< ::com::sun::star::ui::XUIElement > xUIElement; @@ -3064,28 +1091,6 @@ Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString return xUIElement; } -Reference< css::awt::XWindowPeer > LayoutManager::implts_createToolkitWindow( const Reference< css::awt::XWindowPeer >& rParent ) -{ - Reference< css::awt::XWindowPeer > xPeer; - css::uno::Reference< css::awt::XToolkit > xToolkit( m_xSMGR->createInstance( SERVICENAME_VCLTOOLKIT ), css::uno::UNO_QUERY ); - if ( xToolkit.is() ) - { - // describe window properties. - css::awt::WindowDescriptor aDescriptor; - aDescriptor.Type = css::awt::WindowClass_SIMPLE ; - aDescriptor.WindowServiceName = DECLARE_ASCII("dockingarea") ; - aDescriptor.ParentIndex = -1 ; - aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >( rParent, UNO_QUERY ) ; - aDescriptor.Bounds = css::awt::Rectangle(0,0,0,0) ; - aDescriptor.WindowAttributes = 0 ; - - // create a docking area window - xPeer = xToolkit->createWindow( aDescriptor ); - } - - return xPeer; -} - void LayoutManager::implts_setVisibleState( sal_Bool bShow ) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -3210,7 +1215,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) if ( bSetVisible ) { - implts_createNonContextSensitiveToolBars(); + m_pToolbarManager->implts_createNonContextSensitiveToolBars(); implts_doLayout_notify( sal_False ); } else @@ -3771,28 +1776,17 @@ throw ( RuntimeException ) if ( xWindow.is() && ( m_xFrame->getContainerWindow() != m_xContainerWindow || !xDockingAreaAcceptor.is() ) ) xWindow->removeWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] ); - - m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT].clear(); m_aDockingArea = css::awt::Rectangle(); + m_pToolbarManager->reset(); Window* pContainerWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pContainerWindow ) pContainerWindow->RemoveChildEventListener( LINK( this, LayoutManager, WindowEventListener ) ); - } - // Set new docking area acceptor and add ourself as window listener on the container window. - // Create our docking area windows which are parents for all docked windows. - css::uno::Reference< css::awt::XWindow > xTopDockWindow; - css::uno::Reference< css::awt::XWindow > xBottomDockWindow; - css::uno::Reference< css::awt::XWindow > xLeftDockWindow; - css::uno::Reference< css::awt::XWindow > xRightDockWindow; + // destroy panel manager + delete m_pPanelManager; + m_pPanelManager = NULL; + } Reference< ::com::sun::star::ui::XDockingAreaAcceptor > xOldDockingAreaAcceptor( m_xDockingAreaAcceptor ); m_xDockingAreaAcceptor = xDockingAreaAcceptor; @@ -3817,14 +1811,11 @@ throw ( RuntimeException ) } css::uno::Reference< css::awt::XWindowPeer > xParent( m_xContainerWindow, UNO_QUERY ); - xTopDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); - xBottomDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); - xLeftDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); - xRightDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] = xTopDockWindow; - m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] = xBottomDockWindow; - m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] = xLeftDockWindow; - m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] = xRightDockWindow; + m_pToolbarManager->setParentWindow( xParent ); + + // create new panel manager + m_pPanelManager = new PanelManager( m_xSMGR, m_xFrame ); + m_pPanelManager->createPanels(); } aWriteLock.unlock(); @@ -3833,15 +1824,6 @@ throw ( RuntimeException ) if ( xDockingAreaAcceptor.is() ) { vos::OGuard aGuard( Application::GetSolarMutex() ); - ::DockingAreaWindow* pWindow; - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xTopDockWindow ) ); - if( pWindow ) pWindow->SetAlign( WINDOWALIGN_TOP ); - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xBottomDockWindow ) ); - if( pWindow ) pWindow->SetAlign( WINDOWALIGN_BOTTOM ); - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xLeftDockWindow ) ); - if( pWindow ) pWindow->SetAlign( WINDOWALIGN_LEFT ); - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xRightDockWindow ) ); - if( pWindow ) pWindow->SetAlign( WINDOWALIGN_RIGHT ); // Add layout manager as listener to get notifications about toolbar button activties Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); @@ -3856,21 +1838,6 @@ throw ( RuntimeException ) if ( !oldDockingAreaWindows.empty() ) { - const sal_uInt32 nCount = oldDockingAreaWindows.size(); - for ( sal_uInt32 i = 0; i < nCount; ++i ) - { - if ( oldDockingAreaWindows[i].is() ) - { - try - { - oldDockingAreaWindows[i]->dispose(); - } - catch ( Exception& ) - { - } - } - } - // Reset docking area size for our old docking area acceptor css::awt::Rectangle aEmptyRect; xOldDockingAreaAcceptor->setDockingAreaSpace( aEmptyRect ); @@ -3879,11 +1846,7 @@ throw ( RuntimeException ) if ( xDockingAreaAcceptor.is() ) { if ( bAutomaticToolbars ) - { - implts_createAddonsToolBars(); // create addon toolbars - implts_createCustomToolBars(); // create custom toolbars - implts_createNonContextSensitiveToolBars(); - } + m_pToolbarManager->createToolbars(); implts_sortUIElements(); implts_doLayout( sal_True, sal_False ); } @@ -3988,6 +1951,12 @@ void LayoutManager::implts_reparentChildWindows() } } +uno::Reference< ui::XUIElement > LayoutManager::implts_createDockingWindow( const ::rtl::OUString& aElementName ) +{ + Reference< XUIElement > xUIElement = implts_createElement( aElementName ); + return xUIElement; +} + IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) { // To enable toolbar controllers to change their image when a sub-toolbar function @@ -4098,84 +2067,22 @@ throw (RuntimeException) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - sal_Bool bFound( sal_False ); - sal_Bool bNotify( sal_False ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< ::com::sun::star::ui::XUIElement > xUIElement; + bool bMustBeLayouted( false ); + bool bNotify( false ); - implts_findElement( aName, aElementType, aElementName, xUIElement ); - bFound = xUIElement.is(); - - if ( /*xFrame.is() && */m_xContainerWindow.is() && !implts_isPreviewModel( xModel ) ) // no bars on preview mode + if ( m_xContainerWindow.is() && !implts_isPreviewModel( xModel ) ) // no UI elements on preview frames { + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + + impl_parseResourceURL( aName, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) { - if ( !bFound ) + if ( m_pToolbarManager != NULL ) { - SvtCommandOptions aCmdOptions; - - xUIElement = implts_createElement( aName ); - sal_Bool bVisible( sal_False ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), UNO_QUERY ); - if ( xDockWindow.is() && xWindow.is() ) - { - try - { - xDockWindow->addDockableWindowListener( Reference< css::awt::XDockableWindowListener >( - static_cast< OWeakObject * >( this ), UNO_QUERY )); - xWindow->addWindowListener( Reference< css::awt::XWindowListener >( - static_cast< OWeakObject * >( this ), UNO_QUERY )); - xDockWindow->enableDocking( sal_True ); - } - catch ( Exception& ) - { - } - } - - UIElement& rElement = impl_findElement( aName ); - if ( rElement.m_aName.getLength() > 0 ) - { - // Reuse a local entry so we are able to use the latest - // UI changes for this document. - implts_setElementData( rElement, xDockWindow ); - rElement.m_xUIElement = xUIElement; - bVisible = rElement.m_bVisible; - } - else - { - // Create new UI element and try to read its state data - UIElement aNewToolbar( aName, aElementType, xUIElement ); - implts_readWindowStateData( aName, aNewToolbar ); - implts_setElementData( aNewToolbar, xDockWindow ); - implts_insertUIElement( aNewToolbar ); - bVisible = aNewToolbar.m_bVisible; - } - - // set toolbar menu style according to customize command state - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - ToolBox* pToolbar = (ToolBox *)pWindow; - USHORT nMenuType = pToolbar->GetMenuType(); - if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, m_aCustomizeCmd )) - pToolbar->SetMenuType( nMenuType & ~TOOLBOX_MENUTYPE_CUSTOMIZE ); - else - pToolbar->SetMenuType( nMenuType | TOOLBOX_MENUTYPE_CUSTOMIZE ); - } - } - aWriteLock.unlock(); - - implts_sortUIElements(); - - if ( bVisible ) - { - doLayout(); - bNotify = sal_True; - } + bNotify = m_pToolbarManager->createToolbar( aName ); + bMustBeLayouted = m_pToolbarManager->isLayoutDirty(); } } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" )) @@ -4250,13 +2157,24 @@ throw (RuntimeException) } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) { - aWriteLock.unlock(); + // Add layout manager as listener for docking and other window events + uno::Reference< uno::XInterface > xThis( static_cast< OWeakObject* >(this), css::uno::UNO_QUERY ); + uno::Reference< ui::XUIElement > xUIElement( implts_createDockingWindow( aName )); + + if ( xUIElement.is() ) + { + impl_addWindowListeners( xThis, xUIElement ); + m_pPanelManager->addDockingWindow( aName, xUIElement ); + } // The docking window is created by a factory method located in the sfx2 library. - CreateDockingWindow( xFrame, aElementName ); +// CreateDockingWindow( xFrame, aElementName ); } } + if ( bMustBeLayouted ) + implts_doLayout_notify( sal_True ); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( bNotify ) { @@ -4834,96 +2752,13 @@ throw (RuntimeException) sal_Bool SAL_CALL LayoutManager::dockWindow( const ::rtl::OUString& aName, DockingArea DockingArea, const css::awt::Point& Pos ) throw (RuntimeException) { - UIElement aUIElement; + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - if ( implts_findElement( aName, aUIElement ) && aUIElement.m_xUIElement.is() ) + if ( impl_parseResourceURL( aName, aElementType, aElementName )) { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow.is() ) - { - if ( DockingArea != DockingArea_DOCKINGAREA_DEFAULT ) - aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( DockingArea ); - - if (( Pos.X != SAL_MAX_INT32 ) && ( Pos.Y != SAL_MAX_INT32 )) - aUIElement.m_aDockedData.m_aPos = ::Point( Pos.X, Pos.Y ); - - if ( !xDockWindow->isFloating() ) - { - Window* pWindow( 0 ); - ToolBox* pToolBox( 0 ); - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - pToolBox = (ToolBox *)pWindow; - - // We have to set the alignment of the toolbox. It's possible that the toolbox is moved from a - // horizontal to a vertical docking area! - pToolBox->SetAlign( ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea )); - } - } - - if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) || - ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) - { - // Docking on its default position without a preset position - - // we have to find a good place for it. - ::Size aSize; - - vos::OGuard aGuard( Application::GetSolarMutex() ); - { - if ( pToolBox ) - aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) ); - else - aSize = pWindow->GetSizePixel(); - } - - ::Point aPixelPos; - ::Point aDockPos; - implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); - aUIElement.m_aDockedData.m_aPos = aDockPos; - } - } - - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aName ) - { - rUIElement.m_aDockedData.m_nDockedArea = aUIElement.m_aDockedData.m_nDockedArea; - rUIElement.m_aDockedData.m_aPos = aUIElement.m_aDockedData.m_aPos; - } - aWriteLock.unlock(); - - if ( xDockWindow->isFloating() ) - { - // Will call toggle floating mode which will do the rest! - xWindow->setVisible( sal_False ); - xDockWindow->setFloatingMode( sal_False ); - xWindow->setVisible( sal_True ); - } - else - { - implts_writeWindowStateData( aName, aUIElement ); - implts_sortUIElements(); - - if ( aUIElement.m_bVisible ) - doLayout(); - } - - return sal_True; - } - } - catch ( DisposedException& ) - { - } + if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + m_pToolbarManager->dockToolbar( aName, DockingArea, Pos ); } return sal_False; @@ -5569,28 +3404,14 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ aStatusBarSize = implts_getStatusBarSize(); aBorderSpace.Height -= aStatusBarSize.Height(); - implts_setDockingAreaWindowSizes( aBorderSpace ); + m_pToolbarManager->setDockingArea( aBorderSpace ); // Subtract status bar size from our container output size. Docking area windows // don't contain the status bar! aContainerSize = implts_getContainerWindowOutputSize(); aContainerSize.Height() -= aStatusBarSize.Height(); - // Retrieve row/column dependent data from all docked user-interface elements - for ( sal_Int32 i = 0; i < DOCKINGAREAS_COUNT; i++ ) - { - std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; - - implts_getDockingAreaElementInfos( (DockingArea)i, aRowColumnsWindowData ); - - sal_Int32 nOffset( 0 ); - const sal_uInt32 nCount = aRowColumnsWindowData.size(); - for ( sal_uInt32 j = 0; j < nCount; ++j ) - { - implts_calcWindowPosSizeOnSingleRowColumn( i, nOffset, aRowColumnsWindowData[j], aContainerSize ); - nOffset += aRowColumnsWindowData[j].nStaticSize; - } - } + m_pToolbarManager->doLayout(aContainerSize); // Position the status bar if ( aStatusBarSize.Height() > 0 ) @@ -5686,208 +3507,6 @@ throw (::com::sun::star::uno::RuntimeException) return m_bVisible; } -void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockingArea, - sal_Int32 nOffset, - SingleRowColumnWindowData& rRowColumnWindowData, - const ::Size& rContainerSize ) -{ - sal_Int32 nDiff( 0 ); - sal_Int32 nRCSpace( rRowColumnWindowData.nSpace ); - sal_Int32 nTopDockingAreaSize; - sal_Int32 nBottomDockingAreaSize; - sal_Int32 nContainerClientSize; - - if ( rRowColumnWindowData.aRowColumnWindows.empty() ) - return; - - if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - nContainerClientSize = rContainerSize.Width(); - nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize; - } - else - { - nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); - nBottomDockingAreaSize = implts_getTopBottomDockingAreaSizes().Height(); - nContainerClientSize = ( rContainerSize.Height() - nTopDockingAreaSize - nBottomDockingAreaSize ); - nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize; - } - - const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindowSizes.size(); - if (( nDiff < 0 ) && ( nRCSpace > 0 )) - { - // First we try to reduce the size of blank space before/behind docked windows - sal_Int32 i = nCount - 1; - while ( i >= 0 ) - { - sal_Int32 nSpace = rRowColumnWindowData.aRowColumnSpace[i]; - if ( nSpace >= -nDiff ) - { - - if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount ; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff; - } - else - { - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount ; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff; - } - nDiff = 0; - - break; - } - else if ( nSpace > 0 ) - { - if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].X -= nSpace; - } - else - { - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].Y -= nSpace; - } - nDiff += nSpace; - } - --i; - } - } - - // Check if we have to reduce further - if ( nDiff < 0 ) - { - // Now we have to reduce the size of certain docked windows - sal_Int32 i = sal_Int32( nCount - 1 ); - while ( i >= 0 ) - { - css::awt::Rectangle& rWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; - ::Size aMinSize; - - vos::OGuard aGuard( Application::GetSolarMutex() ); - { - Reference< css::awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - aMinSize = ((ToolBox *)pWindow)->CalcMinimumWindowSizePixel(); - } - - if (( aMinSize.Width() > 0 ) && ( aMinSize.Height() > 0 )) - { - if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - sal_Int32 nMaxReducation = ( rWinRect.Width - aMinSize.Width() ); - if ( nMaxReducation >= -nDiff ) - { - rWinRect.Width = rWinRect.Width + nDiff; - nDiff = 0; - } - else - { - rWinRect.Width = aMinSize.Width(); - nDiff += nMaxReducation; - } - - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff; - } - else - { - sal_Int32 nMaxReducation = ( rWinRect.Height - aMinSize.Height() ); - if ( nMaxReducation >= -nDiff ) - { - rWinRect.Height = rWinRect.Height + nDiff; - nDiff = 0; - } - else - { - rWinRect.Height = aMinSize.Height(); - nDiff += nMaxReducation; - } - - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff; - } - } - - if ( nDiff >= 0 ) - break; - - --i; - } - } - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - Window* pDockAreaWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[nDockingArea] ); - aReadLock.unlock(); - - sal_Int32 nCurrPos( 0 ); - sal_Int32 nStartOffset( 0 ); - - if ( nDockingArea == DockingArea_DOCKINGAREA_RIGHT ) - nStartOffset = pDockAreaWindow->GetSizePixel().Width() - rRowColumnWindowData.nStaticSize; - else if ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - nStartOffset = pDockAreaWindow->GetSizePixel().Height() - rRowColumnWindowData.nStaticSize; - - vos::OGuard aGuard( Application::GetSolarMutex() ); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - Reference< css::awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - Window* pOldParentWindow = pWindow->GetParent(); - - if ( pDockAreaWindow != pOldParentWindow ) - pWindow->SetParent( pDockAreaWindow ); - - css::awt::Rectangle aWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; - if ( nDockingArea == DockingArea_DOCKINGAREA_TOP ) - { - if ( aWinRect.X < nCurrPos ) - aWinRect.X = nCurrPos; - pWindow->SetPosSizePixel( ::Point( aWinRect.X, nOffset ), - ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); - nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; - } - else if ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - { - if ( aWinRect.X < nCurrPos ) - aWinRect.X = nCurrPos; - pWindow->SetPosSizePixel( ::Point( aWinRect.X, nStartOffset - nOffset ), - ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); - nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; - } - else if ( nDockingArea == DockingArea_DOCKINGAREA_LEFT ) - { - if ( aWinRect.Y < nCurrPos ) - aWinRect.Y = nCurrPos; - pWindow->SetPosSizePixel( ::Point( nOffset, aWinRect.Y ), - ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); - nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; - } - else if ( nDockingArea == DockingArea_DOCKINGAREA_RIGHT ) - { - if ( aWinRect.Y < nCurrPos ) - aWinRect.Y = nCurrPos; - pWindow->SetPosSizePixel( ::Point( nStartOffset - nOffset, aWinRect.Y ), - ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); - nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; - } - } -} - ::Size LayoutManager::implts_getStatusBarSize() { ReadGuard aReadLock( m_aLock ); @@ -5925,107 +3544,19 @@ css::awt::Rectangle LayoutManager::implts_calcDockingAreaSizes() ReadGuard aReadLock( m_aLock ); xContainerWindow = m_xContainerWindow; xDockingAreaAcceptor = m_xDockingAreaAcceptor; - UIElementVector aWindowVector( m_aUIElements ); aReadLock.unlock(); css::awt::Rectangle aBorderSpace; if ( xDockingAreaAcceptor.is() && xContainerWindow.is() ) - { - sal_Int32 nCurrRowColumn( 0 ); - sal_Int32 nCurrPos( 0 ); - sal_Int32 nCurrDockingArea( DockingArea_DOCKINGAREA_TOP ); - std::vector< sal_Int32 > aRowColumnSizes[DOCKINGAREAS_COUNT]; - UIElementVector::const_iterator pConstIter; + aBorderSpace = m_pToolbarManager->getDockingArea(); - aRowColumnSizes[nCurrDockingArea].clear(); - aRowColumnSizes[nCurrDockingArea].push_back( 0 ); - - for ( pConstIter = aWindowVector.begin(); pConstIter != aWindowVector.end(); pConstIter++ ) - { - Reference< XUIElement > xUIElement( pConstIter->m_xUIElement, UNO_QUERY ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xWindow.is() && xDockWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() && !xDockWindow->isFloating() ) - { - css::awt::Rectangle aPosSize = xWindow->getPosSize(); - if ( pConstIter->m_aDockedData.m_nDockedArea != nCurrDockingArea ) - { - nCurrDockingArea = pConstIter->m_aDockedData.m_nDockedArea; - nCurrRowColumn = 0; - nCurrPos = 0; - aRowColumnSizes[nCurrDockingArea].clear(); - aRowColumnSizes[nCurrDockingArea].push_back( 0 ); - } - - if ( pConstIter->m_aDockedData.m_nDockedArea == nCurrDockingArea ) - { - if (( pConstIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_TOP ) || - ( pConstIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - if ( pConstIter->m_aDockedData.m_aPos.Y() > nCurrPos ) - { - ++nCurrRowColumn; - nCurrPos = pConstIter->m_aDockedData.m_aPos.Y(); - aRowColumnSizes[nCurrDockingArea].push_back( 0 ); - } - - if ( aPosSize.Height > aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] ) - aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] = aPosSize.Height; - } - else - { - if ( pConstIter->m_aDockedData.m_aPos.X() > nCurrPos ) - { - ++nCurrRowColumn; - nCurrPos = pConstIter->m_aDockedData.m_aPos.X(); - aRowColumnSizes[nCurrDockingArea].push_back( 0 ); - } - - if ( aPosSize.Width > aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] ) - aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] = aPosSize.Width; - } - } - } - } - } - } - - // Sum up max heights from every row/column - if ( !aWindowVector.empty() ) - { - for ( sal_Int32 i = 0; i <= DockingArea_DOCKINGAREA_RIGHT; i++ ) - { - sal_Int32 nSize( 0 ); - const sal_uInt32 nCount = aRowColumnSizes[i].size(); - for ( sal_uInt32 j = 0; j < nCount; j++ ) - nSize += aRowColumnSizes[i][j]; - - if ( i == DockingArea_DOCKINGAREA_TOP ) - aBorderSpace.Y = nSize; - else if ( i == DockingArea_DOCKINGAREA_BOTTOM ) - aBorderSpace.Height = nSize; - else if ( i == DockingArea_DOCKINGAREA_LEFT ) - aBorderSpace.X = nSize; - else - aBorderSpace.Width = nSize; - } - } - - // We have to add the height of a possible status bar - aBorderSpace.Height += implts_getStatusBarSize().Height(); - } + // We have to add the height of a possible status bar + aBorderSpace.Height += implts_getStatusBarSize().Height(); return aBorderSpace; } -void LayoutManager::implts_setDockingAreaWindowSizes( const css::awt::Rectangle& rBorderSpace ) +void LayoutManager::implts_setDockingAreaWindowSizes( const css::awt::Rectangle& /*rBorderSpace*/ ) { Reference< css::awt::XWindow > xContainerWindow; @@ -6041,64 +3572,6 @@ void LayoutManager::implts_setDockingAreaWindowSizes( const css::awt::Rectangle& aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); ::Size aStatusBarSize = implts_getStatusBarSize(); - sal_Int32 nLeftRightDockingAreaHeight( aContainerClientSize.Height ); - if ( rBorderSpace.Y >= 0 ) - { - // Top docking area window - aReadLock.lock(); - Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] ); - aReadLock.unlock(); - - xDockAreaWindow->setPosSize( 0, 0, aContainerClientSize.Width, rBorderSpace.Y, css::awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); - nLeftRightDockingAreaHeight -= rBorderSpace.Y; - } - - if ( rBorderSpace.Height >= 0 ) - { - // Bottom docking area window - sal_Int32 nBottomPos = std::max( sal_Int32( aContainerClientSize.Height - rBorderSpace.Height - aStatusBarSize.Height() ), sal_Int32( 0 )); - sal_Int32 nHeight = ( nBottomPos == 0 ) ? 0 : rBorderSpace.Height; - - aReadLock.lock(); - Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] ); - aReadLock.unlock(); - - xDockAreaWindow->setPosSize( 0, nBottomPos, aContainerClientSize.Width, nHeight, css::awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); - nLeftRightDockingAreaHeight -= nHeight; - } - - nLeftRightDockingAreaHeight -= aStatusBarSize.Height(); - if ( rBorderSpace.X >= 0 || nLeftRightDockingAreaHeight > 0 ) - { - // Left docking area window - aReadLock.lock(); - Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] ); - aReadLock.unlock(); - - // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! - sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); - - xDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, css::awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); - } - if ( rBorderSpace.Width >= 0 || nLeftRightDockingAreaHeight > 0 ) - { - // Right docking area window - aReadLock.lock(); - Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] ); - aReadLock.unlock(); - - // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! - sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width )); - sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); - sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width; - - xDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, css::awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); - } - // Position the status bar if ( aStatusBarSize.Height() > 0 ) { @@ -6182,6 +3655,16 @@ sal_Bool LayoutManager::implts_resetMenuBar() return sal_False; } +void LayoutManager::implts_setMenuBarCloser(sal_Bool bCloserState) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bMenuBarCloser = bCloserState; + aWriteLock.unlock(); + + implts_updateMenuBarClose(); +} + sal_Int16 LayoutManager::implts_getCurrentSymbolsSize() { sal_Int16 eOptSymbolsSize( 0 ); @@ -6289,263 +3772,32 @@ IMPL_LINK( LayoutManager, SettingsChanged, void*, EMPTYARG ) //--------------------------------------------------------------------------------------------------------- void SAL_CALL LayoutManager::startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException) { - sal_Bool bWinFound( sal_False ); - UIElement aUIElement; + Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - ReadGuard aReadGuard( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - Reference< css::awt::XWindow2 > xWindow( e.Source, UNO_QUERY ); - aReadGuard.unlock(); - - Window* pContainerWindow( 0 ); - Window* pWindow( 0 ); - ::Point aMousePos; - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - aMousePos = pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y )); - } - - bWinFound = implts_findElement( e.Source, aUIElement ); - - if ( bWinFound && xWindow.is() ) - { - css::awt::Rectangle aRect; - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow->isFloating() ) - { - css::awt::Rectangle aPos = xWindow->getPosSize(); - css::awt::Size aSize = xWindow->getOutputSize(); - - aUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); - aUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); - - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - ToolBox* pToolBox = (ToolBox *)pWindow; - aUIElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); - } - } - } - - WriteGuard aWriteLock( m_aLock ); - m_bDockingInProgress = bWinFound; - m_aDockUIElement = aUIElement; - m_aDockUIElement.m_bUserActive = sal_True; - m_aStartDockMousePos = aMousePos; - aWriteLock.unlock(); -} - -::Rectangle LayoutManager::implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ) -{ - ::Rectangle aRect( rRect ); - - aRect.Left() -= nHotZoneOffset; - aRect.Top() -= nHotZoneOffset; - aRect.Right() += nHotZoneOffset; - aRect.Bottom() += nHotZoneOffset; - return aRect; + // Determine if we have a toolbar and forward request to toolbar manager + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + ToolBox* pToolBox = 0; + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + m_pToolbarManager->startDocking(e); } css::awt::DockingData SAL_CALL LayoutManager::docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException) { - const sal_Int32 MAGNETIC_DISTANCE_UNDOCK = 25; - const sal_Int32 MAGNETIC_DISTANCE_DOCK = 20; + Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - css::awt::DockingData aDockingData; - Reference< css::awt::XDockableWindow > xDockWindow( e.Source, UNO_QUERY ); - Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - Reference< css::awt::XWindow > xTopDockingWindow; - Reference< css::awt::XWindow > xLeftDockingWindow; - Reference< css::awt::XWindow > xRightDockingWindow; - Reference< css::awt::XWindow > xBottomDockingWindow; - Reference< css::awt::XWindow > xContainerWindow; - UIElement aUIDockingElement; - DockingOperation eDockingOperation( DOCKOP_ON_COLROW ); - ::Size aStatusBarSize; + // Determine if we have a toolbar and forward request to toolbar manager + css::awt::DockingData aDockingData; + // copy current tracking rectangle from docking event aDockingData.TrackingRectangle = e.TrackingRectangle; - sal_Bool bDockingInProgress; - { - ReadGuard aReadLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; - if ( bDockingInProgress ) - { - xContainerWindow = m_xContainerWindow; - xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - xRightDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; - xBottomDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; - aUIDockingElement = m_aDockUIElement; - aStatusBarSize = implts_getStatusBarSize(); - } - } - - if ( bDockingInProgress && - xDockWindow.is() && - xWindow.is() ) - { - try - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - sal_Int16 eDockingArea( -1 ); // none - sal_Int32 nMagneticZone( aUIDockingElement.m_bFloating ? MAGNETIC_DISTANCE_DOCK : MAGNETIC_DISTANCE_UNDOCK ); - css::awt::Rectangle aNewTrackingRect; - ::Rectangle aTrackingRect( e.TrackingRectangle.X, - e.TrackingRectangle.Y, - ( e.TrackingRectangle.X + e.TrackingRectangle.Width ), - ( e.TrackingRectangle.Y + e.TrackingRectangle.Height )); - - css::awt::Rectangle aTmpRect = xTopDockingWindow->getPosSize(); - ::Rectangle aTopDockRect( aTmpRect.X, aTmpRect.Y, aTmpRect.Width, aTmpRect.Height ); - ::Rectangle aHotZoneTopDockRect( implts_calcHotZoneRect( aTopDockRect, nMagneticZone )); - - aTmpRect = xBottomDockingWindow->getPosSize(); - ::Rectangle aBottomDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width), ( aTmpRect.Y + aTmpRect.Height )); - ::Rectangle aHotZoneBottomDockRect( implts_calcHotZoneRect( aBottomDockRect, nMagneticZone )); - - aTmpRect = xLeftDockingWindow->getPosSize(); - ::Rectangle aLeftDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); - ::Rectangle aHotZoneLeftDockRect( implts_calcHotZoneRect( aLeftDockRect, nMagneticZone )); - - aTmpRect = xRightDockingWindow->getPosSize(); - ::Rectangle aRightDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); - ::Rectangle aHotZoneRightDockRect( implts_calcHotZoneRect( aRightDockRect, nMagneticZone )); - - Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow ) ); - Window* pDockingAreaWindow( 0 ); - ::Point aMousePos( pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y ))); - - if ( aHotZoneTopDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_TOP; - else if ( aHotZoneBottomDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_BOTTOM; - else if ( aHotZoneLeftDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_LEFT; - else if ( aHotZoneRightDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_RIGHT; - - // Higher priority for movements inside the real docking area - if ( aTopDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_TOP; - else if ( aBottomDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_BOTTOM; - else if ( aLeftDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_LEFT; - else if ( aRightDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_RIGHT; - - // Determine if we have a toolbar and set alignment according to the docking area! - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - ToolBox* pToolBox = 0; - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pWindow; - - if ( eDockingArea != -1 ) - { - if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) - { - aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_TOP; - aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xTopDockingWindow ); - } - else if ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - { - aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_BOTTOM; - aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xBottomDockingWindow ); - } - else if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) - { - aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_LEFT; - aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xLeftDockingWindow ); - } - else if ( eDockingArea == DockingArea_DOCKINGAREA_RIGHT ) - { - aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_RIGHT; - aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xRightDockingWindow ); - } - - ::Point aOutputPos = pContainerWindow->ScreenToOutputPixel( aTrackingRect.TopLeft() ); - aTrackingRect.SetPos( aOutputPos ); - - ::Rectangle aNewDockingRect( aTrackingRect ); - implts_calcDockingPosSize( aUIDockingElement, eDockingOperation, aNewDockingRect, aMousePos ); - - ::Point aScreenPos = pContainerWindow->OutputToScreenPixel( aNewDockingRect.TopLeft() ); - aNewTrackingRect = css::awt::Rectangle( aScreenPos.X(), - aScreenPos.Y(), - aNewDockingRect.getWidth(), - aNewDockingRect.getHeight() ); - aDockingData.TrackingRectangle = aNewTrackingRect; - } - else if ( pToolBox && bDockingInProgress ) - { - sal_Bool bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); - ::Size aFloatSize = aUIDockingElement.m_aFloatingData.m_aSize; - if ( aFloatSize.Width() > 0 && aFloatSize.Height() > 0 ) - { - aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( - ::Point( e.MousePos.X, e.MousePos.Y )); - aDockingData.TrackingRectangle.Height = aFloatSize.Height(); - aDockingData.TrackingRectangle.Width = aFloatSize.Width(); - } - else - { - aFloatSize = pToolBox->CalcWindowSizePixel(); - if ( !bIsHorizontal ) - { - // Floating toolbars are always horizontal aligned! We have to swap - // width/height if we have a vertical aligned toolbar. - sal_Int32 nTemp = aFloatSize.Height(); - aFloatSize.Height() = aFloatSize.Width(); - aFloatSize.Width() = nTemp; - } - - aDockingData.TrackingRectangle.Height = aFloatSize.Height(); - aDockingData.TrackingRectangle.Width = aFloatSize.Width(); - - // For the first time we don't have any data about the floating size of a toolbar. - // We calculate it and store it for later use. - aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( - ::Point( e.MousePos.X, e.MousePos.Y )); - aUIDockingElement.m_aFloatingData.m_aSize = aFloatSize; - aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); - } - aDockingData.TrackingRectangle.X = e.MousePos.X; - aDockingData.TrackingRectangle.Y = e.MousePos.Y; - } - - aDockingData.bFloating = ( eDockingArea == -1 ); - - // Write current data to the member docking progress data - WriteGuard aWriteLock( m_aLock ); - m_aDockUIElement.m_bFloating = aDockingData.bFloating; - if ( !aDockingData.bFloating ) - { - m_aDockUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; - m_eDockOperation = eDockingOperation; - } - else - m_aDockUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; - aWriteLock.unlock(); - } - catch ( Exception& ) - { - } - } + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + ToolBox* pToolBox = 0; + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + aDockingData = m_pToolbarManager->docking(e); return aDockingData; } @@ -6553,287 +3805,49 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL LayoutManager::endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException) { - sal_Bool bDockingInProgress( sal_False ); - sal_Bool bStartDockFloated( sal_False ); - sal_Bool bFloating( sal_False ); - UIElement aUIDockingElement; + Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - WriteGuard aWriteLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; - aUIDockingElement = m_aDockUIElement; - bFloating = aUIDockingElement.m_bFloating; - - UIElement& rUIElement = impl_findElement( aUIDockingElement.m_aName ); - if ( rUIElement.m_aName == aUIDockingElement.m_aName ) + // Determine if we have a toolbar and forward request to toolbar manager + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + ToolBox* pToolBox = 0; + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { - if ( aUIDockingElement.m_bFloating ) - { - // Write last position into position data - Reference< css::awt::XWindow > xWindow( aUIDockingElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - rUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; - css::awt::Rectangle aTmpRect = xWindow->getPosSize(); - rUIElement.m_aFloatingData.m_aPos = ::Point( aTmpRect.X, aTmpRect.Y ); - // make changes also for our local data as we use it to make data persistent - aUIDockingElement.m_aFloatingData = rUIElement.m_aFloatingData; - } - else - { - rUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; - rUIElement.m_aFloatingData.m_aSize = aUIDockingElement.m_aFloatingData.m_aSize; - - if ( m_eDockOperation != DOCKOP_ON_COLROW ) - { - // we have to renumber our row/column data to insert a new row/column - implts_renumberRowColumnData( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, - m_eDockOperation, - aUIDockingElement ); - } - } - - bStartDockFloated = rUIElement.m_bFloating; - rUIElement.m_bFloating = m_aDockUIElement.m_bFloating; - rUIElement.m_bUserActive = sal_True; - } - - // reset member for next docking operation - m_aDockUIElement.m_xUIElement.clear(); - m_eDockOperation = DOCKOP_ON_COLROW; - aWriteLock.unlock(); - - implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); - - if ( bDockingInProgress ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( Reference< css::awt::XWindow >( e.Source, UNO_QUERY )); - ToolBox* pToolBox = 0; - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pWindow; - - if ( pToolBox ) - { - if( e.bFloating ) - { - if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) - pToolBox->SetAlign( WINDOWALIGN_TOP ); - else - pToolBox->SetAlign( WINDOWALIGN_LEFT ); - } - else - { - ::Size aSize; - - pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); - - // Docked toolbars have always one line - aSize = pToolBox->CalcWindowSizePixel( 1 ); - - // Lock layouting updates as our listener would be called due to SetSizePixel - pToolBox->SetOutputSizePixel( aSize ); - } - } - } - - aWriteLock.lock(); - m_bDockingInProgress = sal_False; - aWriteLock.unlock(); - - implts_sortUIElements(); - if ( !bStartDockFloated || !bFloating ) - { - // Optimization: Don't layout if we started floating and now floating again. - // This would not change anything for the docked user-interface elements. - doLayout(); + m_pToolbarManager->endDocking(e); + if ( m_pToolbarManager->isLayoutDirty()) + implts_doLayout_notify( sal_True ); } } sal_Bool SAL_CALL LayoutManager::prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException) { - sal_Bool bDockingInProgress( sal_False ); + Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - ReadGuard aReadLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; - aReadLock.unlock(); - - UIElement aUIDockingElement; - sal_Bool bWinFound( implts_findElement( e.Source, aUIDockingElement ) ); - Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - - if ( bWinFound && xWindow.is() ) - { - if ( !bDockingInProgress ) - { - css::awt::Rectangle aRect; - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow->isFloating() ) - { - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - if ( pWindow->GetType() == WINDOW_TOOLBOX ) - { - ToolBox* pToolBox = (ToolBox *)pWindow; - aUIDockingElement.m_aFloatingData.m_aPos = pToolBox->GetPosPixel(); - aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->GetOutputSizePixel(); - aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); - } - } - } - - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIDockingElement.m_aName ); - if ( rUIElement.m_aName == aUIDockingElement.m_aName ) - rUIElement = aUIDockingElement; - aWriteLock.unlock(); - } - } - } - - return sal_True; + // Determine if we have a toolbar and forward request to toolbar manager + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + ToolBox* pToolBox = 0; + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + return m_pToolbarManager->prepareToggleFloatingMode(e); + else + return sal_False; } void SAL_CALL LayoutManager::toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException) { - sal_Bool bDockingInProgress( sal_False ); - UIElement aUIDockingElement; - - ReadGuard aReadLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; - if ( bDockingInProgress ) - aUIDockingElement = m_aDockUIElement; - aReadLock.unlock(); - - Window* pWindow( 0 ); - ToolBox* pToolBox( 0 ); - Reference< css::awt::XWindow2 > xWindow; + Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); + // Determine if we have a toolbar and forward request to toolbar manager + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + ToolBox* pToolBox = 0; + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); - xWindow = Reference< css::awt::XWindow2 >( e.Source, UNO_QUERY ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pWindow; - } - - if ( !bDockingInProgress ) - { - sal_Bool bWinFound( implts_findElement( e.Source, aUIDockingElement ) ); - if ( bWinFound && xWindow.is() ) - { - aUIDockingElement.m_bFloating = !aUIDockingElement.m_bFloating; - aUIDockingElement.m_bUserActive = sal_True; - - WriteGuard aWriteLock( m_aLock ); - m_bDoLayout = sal_True; - aWriteLock.unlock(); - - if ( aUIDockingElement.m_bFloating ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pToolBox ) - { - pToolBox->SetLineCount( aUIDockingElement.m_aFloatingData.m_nLines ); - if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) - pToolBox->SetAlign( WINDOWALIGN_TOP ); - else - pToolBox->SetAlign( WINDOWALIGN_LEFT ); - } - - sal_Bool bUndefPos = ( aUIDockingElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || - aUIDockingElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); - sal_Bool bSetSize = ( aUIDockingElement.m_aFloatingData.m_aSize.Width() != 0 && - aUIDockingElement.m_aFloatingData.m_aSize.Height() != 0 ); - - if ( bUndefPos ) - aUIDockingElement.m_aFloatingData.m_aPos = implts_findNextCascadeFloatingPos(); - - if ( !bSetSize ) - { - if ( pToolBox ) - aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->CalcFloatingWindowSizePixel(); - else - aUIDockingElement.m_aFloatingData.m_aSize = pWindow->GetOutputSizePixel(); - } - - xWindow->setPosSize( aUIDockingElement.m_aFloatingData.m_aPos.X(), - aUIDockingElement.m_aFloatingData.m_aPos.Y(), - 0, 0, css::awt::PosSize::POS ); - xWindow->setOutputSize( AWTSize( aUIDockingElement.m_aFloatingData.m_aSize ) ); - } - else - { - if (( aUIDockingElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && - ( aUIDockingElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) - { - // Docking on its default position without a preset position - - // we have to find a good place for it. - ::Point aPixelPos; - ::Point aDockPos; - ::Size aSize; - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pToolBox ) - aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea ) ); - else - aSize = pWindow->GetSizePixel(); - } - - implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); - aUIDockingElement.m_aDockedData.m_aPos = aDockPos; - } - - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pToolBox ) - { - pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); - ::Size aSize = pToolBox->CalcWindowSizePixel( 1 ); - css::awt::Rectangle aRect = xWindow->getPosSize(); - xWindow->setPosSize( aRect.X, aRect.Y, 0, 0, css::awt::PosSize::POS ); - xWindow->setOutputSize( AWTSize( aSize ) ); - } - } - - aWriteLock.lock(); - m_bDoLayout = sal_False; - UIElement& rUIElement = LayoutManager::impl_findElement( aUIDockingElement.m_aName ); - if ( rUIElement.m_aName == aUIDockingElement.m_aName ) - rUIElement = aUIDockingElement; - aWriteLock.unlock(); - - implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); - - implts_sortUIElements(); - doLayout(); - } - } - else - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pToolBox ) - { - if ( aUIDockingElement.m_bFloating ) - { - if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) - pToolBox->SetAlign( WINDOWALIGN_TOP ); - else - pToolBox->SetAlign( WINDOWALIGN_LEFT ); - } - else - { - pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); - } - } + m_pToolbarManager->toggleFloatingMode(e); + if ( m_pToolbarManager->isLayoutDirty()) + implts_doLayout_notify( sal_True ); } } @@ -6880,7 +3894,6 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL LayoutManager::endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& ) throw (::com::sun::star::uno::RuntimeException) { - } //--------------------------------------------------------------------------------------------------------- @@ -7201,7 +4214,10 @@ throw( RuntimeException ) m_xInplaceMenuBar.clear(); m_xContainerWindow.clear(); m_xContainerTopWindow.clear(); - implts_destroyDockingAreaWindows(); + + // forward disposing call to toolbar manager + if ( m_pToolbarManager != NULL ) + m_pToolbarManager->disposing(rEvent); if ( m_xModuleCfgMgr.is() ) { @@ -7552,4 +4568,3 @@ com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CA } } // namespace framework - diff --git a/framework/source/layoutmanager/layoutmanager.cxx.bak b/framework/source/layoutmanager/layoutmanager.cxx.bak new file mode 100755 index 000000000000..82fc4e1a8d71 --- /dev/null +++ b/framework/source/layoutmanager/layoutmanager.cxx.bak @@ -0,0 +1,7388 @@ +/************************************************************************* + * + * 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: layoutmanager.cxx,v $ + * $Revision: 1.72 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +// ______________________________________________ +// using namespace + +using namespace ::com::sun::star; +using namespace com::sun::star::uno; +using namespace com::sun::star::beans; +using namespace com::sun::star::util; +using namespace com::sun::star::lang; +using namespace com::sun::star::container; +using namespace ::com::sun::star::ui; +using namespace com::sun::star::frame; +using namespace ::com::sun::star::frame; + +#define UIRESOURCE_PROTOCO_ASCII "private:" +#define UIRESOURCE_RESOURCE_ASCII "resource" +#define UIRESOURCE_URL_ASCII "private:resource" +#define UIRESOURCE_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( UIRESOURCE_URL_ASCII )) + +// ATTENTION! +// This value is directly copied from the sfx2 project. +// You have to change BOTH values, see sfx2/inc/sfx2/sfxsids.hrc (SID_DOCKWIN_START) +static const sal_Int32 DOCKWIN_ID_BASE = 9800; + +//_________________________________________________________________________________________________________________ +// Namespace +//_________________________________________________________________________________________________________________ +// + +namespace framework +{ + +struct UIElementVisibility +{ + rtl::OUString aName; + bool bVisible; +}; + +//***************************************************************************************************************** +// XInterface, XTypeProvider, XServiceInfo +//***************************************************************************************************************** +IMPLEMENT_FORWARD_XTYPEPROVIDER2( LayoutManager, LayoutManager_Base, LayoutManager_PBase ) +IMPLEMENT_FORWARD_XINTERFACE2( LayoutManager, LayoutManager_Base, LayoutManager_PBase ) + +DEFINE_XSERVICEINFO_MULTISERVICE ( LayoutManager , + ::cppu::OWeakObject , + SERVICENAME_LAYOUTMANAGER , + IMPLEMENTATIONNAME_LAYOUTMANAGER + ) + +DEFINE_INIT_SERVICE ( LayoutManager, {} ) + + +LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceManager ) + : LayoutManager_Base ( ) + , ThreadHelpBase ( &Application::GetSolarMutex() ) + , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) + , LayoutManager_PBase ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) + , m_xSMGR( xServiceManager ) + , m_xURLTransformer( xServiceManager->createInstance( SERVICENAME_URLTRANSFORMER ), UNO_QUERY ) + , m_xDisplayAccess( xServiceManager->createInstance( SERVICENAME_DISPLAYACCESS ), UNO_QUERY ) + , m_nLockCount( 0 ) + , m_bActive( sal_False ) + , m_bInplaceMenuSet( sal_False ) + , m_bDockingInProgress( sal_False ) + , m_bMenuVisible( sal_True ) + , m_bComponentAttached( sal_False ) + , m_bDoLayout( sal_False ) + , m_bVisible( sal_True ) + , m_bParentWindowVisible( sal_False ) + , m_bMustDoLayout( sal_True ) + , m_bAutomaticToolbars( sal_True ) + , m_bStoreWindowState( sal_False ) + , m_bHideCurrentUI( false ) + , m_bGlobalSettings( sal_False ) + , m_bPreserveContentSize( false ) + , m_eDockOperation( DOCKOP_ON_COLROW ) + , m_pInplaceMenuBar( NULL ) + , m_xModuleManager( Reference< XModuleManager >( + xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY )) + , m_xUIElementFactoryManager( Reference< ::com::sun::star::ui::XUIElementFactory >( + xServiceManager->createInstance( SERVICENAME_UIELEMENTFACTORYMANAGER ), UNO_QUERY )) + , m_bMenuBarCloser( sal_False ) + , m_xPersistentWindowStateSupplier( Reference< XNameAccess >( + xServiceManager->createInstance( SERVICENAME_WINDOWSTATECONFIGURATION ), UNO_QUERY )) + , m_pGlobalSettings( 0 ) + , m_aCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "custom_" )) + , m_aFullCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/custom_" )) + , m_aFullAddonTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )) + , m_aStatusBarAlias( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" )) + , m_aProgressBarAlias( RTL_CONSTASCII_USTRINGPARAM( "private:resource/progressbar/progressbar" )) + , m_aPropDocked( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKED )) + , m_aPropVisible( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_VISIBLE )) + , m_aPropDockingArea( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKINGAREA )) + , m_aPropDockPos( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKPOS )) + , m_aPropPos( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_POS )) + , m_aPropSize( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_SIZE )) + , m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_UINAME )) + , m_aPropStyle( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_STYLE )) + , m_aPropLocked( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_LOCKED )) + , m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )) + , m_pAddonOptions( 0 ) + , m_aListenerContainer( m_aLock.getShareableOslMutex() ) + , m_pPanelManager( 0 ) +{ + // Initialize statusbar member + m_aStatusBarElement.m_aType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "statusbar" )); + m_aStatusBarElement.m_aName = m_aStatusBarAlias; + + m_pMiscOptions = new SvtMiscOptions(); + + m_pMiscOptions->AddListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); + Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); + m_eSymbolsSize = m_pMiscOptions->GetSymbolsSize(); + m_eSymbolsStyle = m_pMiscOptions->GetCurrentSymbolsStyle(); + + m_aAsyncLayoutTimer.SetTimeout( 50 ); + m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) ); + + registerProperty( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, ::getCppuType( &m_bAutomaticToolbars ) ); + registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, css::beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, ::getCppuType( &m_bHideCurrentUI ) ); + registerProperty( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY, &m_nLockCount, getCppuType( &m_nLockCount ) ); + registerProperty( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, css::beans::PropertyAttribute::TRANSIENT, &m_bMenuBarCloser, ::getCppuType( &m_bMenuBarCloser ) ); + const sal_Bool bRefreshVisibility = sal_False; + registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, css::beans::PropertyAttribute::TRANSIENT, ::getCppuType( &bRefreshVisibility ), &bRefreshVisibility ); + registerProperty( LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, css::beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, ::getCppuType( &m_bPreserveContentSize ) ); +} + +LayoutManager::~LayoutManager() +{ + Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); + if ( m_pMiscOptions ) + { + m_pMiscOptions->RemoveListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); + delete m_pMiscOptions; + m_pMiscOptions = 0; + } + m_aAsyncLayoutTimer.Stop(); +} + +// Internal helper function +void LayoutManager::impl_clearUpMenuBar() +{ + implts_lock(); + + // Clear up VCL menu bar to prepare shutdown + if ( m_xContainerWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow ) + { + MenuBar* pSetMenuBar = 0; + if ( m_xInplaceMenuBar.is() ) + pSetMenuBar = (MenuBar *)m_pInplaceMenuBar->GetMenuBar(); + else + { + Reference< css::awt::XMenuBar > xMenuBar; + + Reference< XPropertySet > xPropSet( m_xMenuBar, UNO_QUERY ); + if ( xPropSet.is() ) + { + try + { + xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar; + } + catch ( com::sun::star::beans::UnknownPropertyException ) + { + } + catch ( com::sun::star::lang::WrappedTargetException ) + { + } + } + + VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); + if ( pAwtMenuBar ) + pSetMenuBar = (MenuBar*)pAwtMenuBar->GetMenu(); + } + + MenuBar* pTopMenuBar = ((SystemWindow *)pWindow)->GetMenuBar(); + if ( pSetMenuBar == pTopMenuBar ) + ((SystemWindow *)pWindow)->SetMenuBar( 0 ); + } + } + + // reset inplace menubar manager + m_pInplaceMenuBar = 0; + if ( m_xInplaceMenuBar.is() ) + { + m_xInplaceMenuBar->dispose(); + m_xInplaceMenuBar.clear(); + } + + Reference< XComponent > xComp( m_xMenuBar, UNO_QUERY ); + if ( xComp.is() ) + xComp->dispose(); + m_xMenuBar.clear(); + implts_unlock(); +} + +sal_Bool LayoutManager::impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ) +{ + URL aURL; + sal_Int32 nIndex = 0; + + aURL.Complete = aResourceURL; + m_xURLTransformer->parseStrict( aURL ); + + ::rtl::OUString aUIResource = aURL.Path.getToken( 0, (sal_Unicode)'/', nIndex ); + + if (( aURL.Protocol.equalsIgnoreAsciiCaseAscii( UIRESOURCE_PROTOCO_ASCII )) && + ( aUIResource.equalsIgnoreAsciiCaseAscii( UIRESOURCE_RESOURCE_ASCII ))) + { + aElementType = aURL.Path.getToken( 0, (sal_Unicode)'/', nIndex ); + aElementName = aURL.Path.getToken( 0, (sal_Unicode)'/', nIndex ); + return sal_True; + } + + return sal_False; +} + +void LayoutManager::implts_lock() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + ++m_nLockCount; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +sal_Bool LayoutManager::implts_unlock() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + --m_nLockCount; + if ( m_nLockCount < 0 ) + m_nLockCount = 0; + return ( m_nLockCount == 0 ); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +void LayoutManager::implts_reset( sal_Bool bAttached ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + Reference< XFrame > xFrame = m_xFrame; + Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< css::awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; + Reference< css::awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; + Reference< css::awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; + Reference< css::awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; + Reference< XUIConfiguration > xModuleCfgMgr( m_xModuleCfgMgr, UNO_QUERY ); + Reference< XUIConfiguration > xDocCfgMgr( m_xDocCfgMgr, UNO_QUERY ); + Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + Reference< XMultiServiceFactory > xServiceManager( m_xSMGR ); + Reference< XNameAccess > xPersistentWindowStateSupplier( m_xPersistentWindowStateSupplier ); + ::rtl::OUString aModuleIdentifier( m_aModuleIdentifier ); + sal_Bool bAutomaticToolbars( m_bAutomaticToolbars ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + implts_lock(); + + Reference< XModel > xModel; + if ( xFrame.is() ) + { + if ( bAttached ) + { + ::rtl::OUString aOldModuleIdentifier( aModuleIdentifier ); + try + { + aModuleIdentifier = m_xModuleManager->identify( Reference< XInterface >( xFrame, UNO_QUERY ) ); + } + catch( Exception& ) + { + } + + if ( aModuleIdentifier.getLength() && aOldModuleIdentifier != aModuleIdentifier ) + { + Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier; + if ( xServiceManager.is() ) + xModuleCfgSupplier = Reference< XModuleUIConfigurationManagerSupplier >( + xServiceManager->createInstance( SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ), UNO_QUERY ); + + if ( xModuleCfgMgr.is() ) + { + try + { + // Remove listener to old module ui configuration manager + xModuleCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + } + + try + { + // Add listener to new module ui configuration manager + xModuleCfgMgr = Reference< XUIConfiguration >( xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier ), UNO_QUERY ); + if ( xModuleCfgMgr.is() ) + xModuleCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + + try + { + // Retrieve persistent window state reference for our new module + if ( xPersistentWindowStateSupplier.is() ) + xPersistentWindowStateSupplier->getByName( aModuleIdentifier ) >>= xPersistentWindowState; + } + catch ( NoSuchElementException& ) + { + } + catch ( WrappedTargetException& ) + { + } + } + + xModel = impl_getModelFromFrame( xFrame ); + if ( xModel.is() ) + { + Reference< XUIConfigurationManagerSupplier > xUIConfigurationManagerSupplier( xModel, UNO_QUERY ); + if ( xUIConfigurationManagerSupplier.is() ) + { + if ( xDocCfgMgr.is() ) + { + try + { + // Remove listener to old ui configuration manager + xDocCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + } + + try + { + xDocCfgMgr = Reference< XUIConfiguration >( xUIConfigurationManagerSupplier->getUIConfigurationManager(), UNO_QUERY ); + if ( xDocCfgMgr.is() ) + xDocCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + } + } + } + else + { + // Remove configuration listeners before we can release our references + if ( xModuleCfgMgr.is() ) + { + try + { + xModuleCfgMgr->removeConfigurationListener( + Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + } + + if ( xDocCfgMgr.is() ) + { + try + { + xDocCfgMgr->removeConfigurationListener( + Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + } + + // Release references to our configuration managers as we currently don't have + // an attached module. + xModuleCfgMgr.clear(); + xDocCfgMgr.clear(); + xPersistentWindowState.clear(); + aModuleIdentifier = ::rtl::OUString(); + } + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_xModel = xModel; + m_aDockingArea = css::awt::Rectangle(); + m_bComponentAttached = bAttached; + m_aModuleIdentifier = aModuleIdentifier; + m_xModuleCfgMgr = Reference< XUIConfigurationManager >( xModuleCfgMgr, UNO_QUERY ); + m_xDocCfgMgr = Reference< XUIConfigurationManager >( xDocCfgMgr, UNO_QUERY ); + m_xPersistentWindowState = xPersistentWindowState; + m_aStatusBarElement.m_bStateRead = sal_False; // reset state to read data again! + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( bAttached ) + { + // reset docking area windows back to zero size + try + { + if ( xTopDockingWindow.is() ) + xTopDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); + if ( xLeftDockingWindow.is() ) + xLeftDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); + if ( xRightDockingWindow.is() ) + xRightDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); + if ( xBottomDockingWindow.is() ) + xBottomDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); + } + catch ( Exception& ) + { + } + + if ( bAutomaticToolbars ) + { + implts_createCustomToolBars(); + implts_createAddonsToolBars(); + implts_createNonContextSensitiveToolBars(); + } + implts_sortUIElements(); + } + else + implts_destroyElements(); + } + + implts_unlock(); +} + +sal_Bool LayoutManager::implts_isEmbeddedLayoutManager() const +{ + // check if this layout manager is currently using the embedded feature + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + Reference< XFrame > xFrame = m_xFrame; + Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + Reference< css::awt::XWindow > xFrameContainerWindow = xFrame->getContainerWindow(); + if ( xFrameContainerWindow == xContainerWindow ) + return sal_False; + else + return sal_True; +} + +void LayoutManager::implts_destroyElements() +{ + UIElementVector aUIElementVector; + + WriteGuard aWriteLock( m_aLock ); + aUIElementVector = m_aUIElements; + m_aUIElements.clear(); + aWriteLock.unlock(); + + UIElementVector::iterator pIter; + for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) + { + Reference< XComponent > xComponent( pIter->m_xUIElement, UNO_QUERY ); + if ( xComponent.is() ) + xComponent->dispose(); + } + + implts_destroyStatusBar(); + + aWriteLock.lock(); + impl_clearUpMenuBar(); + aWriteLock.unlock(); +} + +void LayoutManager::implts_destroyDockingAreaWindows() +{ + std::vector< Reference< css::awt::XWindow > > oldDockingAreaWindows; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] ); + oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] ); + oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] ); + oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] ); + + m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP].clear(); + m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM].clear(); + m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT].clear(); + m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT].clear(); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + const sal_uInt32 nCount = oldDockingAreaWindows.size(); + for ( sal_uInt32 i=0; i < nCount; i++ ) + { + if ( oldDockingAreaWindows[i].is() ) + { + try + { + oldDockingAreaWindows[i]->dispose(); + } + catch ( Exception& ) + { + } + } + } +} + +void LayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ) +{ + if ( aTbxResName.getLength() > 0 ) + { + createElement( aTbxResName ); + if ( aTitle ) + { + Reference< XUIElement > xUIElement = getElement( aTbxResName ); + if ( xUIElement.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + pWindow->SetText( aTitle ); + } + } + } +} + +void LayoutManager::implts_createCustomToolBars( + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aTbxSeqSeq ) +{ + const Sequence< PropertyValue >* pTbxSeq = aTbxSeqSeq.getConstArray(); + for ( sal_Int32 i = 0; i < aTbxSeqSeq.getLength(); i++ ) + { + const Sequence< PropertyValue >& rTbxSeq = pTbxSeq[i]; + ::rtl::OUString aTbxResName; + ::rtl::OUString aTbxTitle; + for ( sal_Int32 j = 0; j < rTbxSeq.getLength(); j++ ) + { + if ( rTbxSeq[j].Name.equalsAscii( "ResourceURL" )) + rTbxSeq[j].Value >>= aTbxResName; + else if ( rTbxSeq[j].Name.equalsAscii( "UIName" )) + rTbxSeq[j].Value >>= aTbxTitle; + } + + // Only create custom toolbars. Their name have to start with "custom_"! + if ( aTbxResName.getLength() > 0 && aTbxResName.indexOf( m_aCustomTbxPrefix ) != -1 ) + implts_createCustomToolBar( aTbxResName, aTbxTitle ); + } +} + +void LayoutManager::implts_createCustomToolBars() +{ + ReadGuard aReadLock( m_aLock ); + if ( !m_bComponentAttached ) + return; + + Reference< XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); + Reference< XFrame > xFrame( m_xFrame ); + Reference< XModel > xModel; + Reference< XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr, UNO_QUERY ); + Reference< XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr, UNO_QUERY ); + aReadLock.unlock(); + + if ( xFrame.is() ) + { + xModel = impl_getModelFromFrame( xFrame ); + if ( implts_isPreviewModel( xModel )) + return; // no custom toolbars for preview frame! + + Sequence< Sequence< PropertyValue > > aTbxSeq; + if ( xDocCfgMgr.is() ) + { + aTbxSeq = xDocCfgMgr->getUIElementsInfo( UIElementType::TOOLBAR ); + implts_createCustomToolBars( aTbxSeq ); // first create all document based toolbars + } + if ( xModuleCfgMgr.is() ) + { + aTbxSeq = xModuleCfgMgr->getUIElementsInfo( UIElementType::TOOLBAR ); + implts_createCustomToolBars( aTbxSeq ); // second create module based toolbars + } + } +} + +rtl::OUString LayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const +{ + String aAddonGenericTitle; + + aAddonGenericTitle = String( FwkResId( STR_TOOLBAR_TITLE_ADDON )); + const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); + + String aNumStr = rI18nHelper.GetNum( nNumber, 0, FALSE, FALSE ); + aAddonGenericTitle.SearchAndReplaceAscii( "%num%", aNumStr ); + + return rtl::OUString( aAddonGenericTitle ); +} + +void LayoutManager::implts_createAddonsToolBars() +{ + WriteGuard aWriteLock( m_aLock ); + if ( !m_bComponentAttached ) + return; + + Reference< XModel > xModel; + Reference< XFrame > xFrame( m_xFrame ); + if ( !xFrame.is() ) + return; + + if ( !m_pAddonOptions ) + m_pAddonOptions = new AddonsOptions; + + Reference< XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); + aWriteLock.unlock(); + + xModel = impl_getModelFromFrame( xFrame ); + if ( implts_isPreviewModel( xModel )) + return; // no addon toolbars for preview frame! + + UIElementVector aUIElementVector; + Sequence< Sequence< PropertyValue > > aAddonToolBarData; + Reference< XUIElement > xUIElement; + + sal_uInt32 nCount = m_pAddonOptions->GetAddonsToolBarCount(); + ::rtl::OUString aAddonsToolBarStaticName( m_aFullAddonTbxPrefix ); + ::rtl::OUString aElementType( RTL_CONSTASCII_USTRINGPARAM( "toolbar" )); + + Sequence< PropertyValue > aPropSeq( 2 ); + aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); + aPropSeq[0].Value <<= xFrame; + aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationData" )); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + ::rtl::OUString aAddonToolBarName( aAddonsToolBarStaticName + m_pAddonOptions->GetAddonsToolbarResourceName(i) ); + aAddonToolBarData = m_pAddonOptions->GetAddonsToolBarPart( i ); + aPropSeq[1].Value <<= aAddonToolBarData; + + aWriteLock.lock(); + UIElement aElement = impl_findElement( aAddonToolBarName ); + aWriteLock.unlock(); + + // #i79828 + // It's now possible that we are called more than once. Be sure to not create + // add-on toolbars more than once! + if ( aElement.m_xUIElement.is() ) + continue; + + try + { + xUIElement = xUIElementFactory->createUIElement( aAddonToolBarName, aPropSeq ); + if ( xUIElement.is() ) + { + Reference< css::awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), UNO_QUERY ); + if ( xDockWindow.is() ) + { + try + { + xDockWindow->addDockableWindowListener( Reference< css::awt::XDockableWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); + xDockWindow->enableDocking( sal_True ); + Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); + if ( xWindow.is() ) + xWindow->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + } + + ::rtl::OUString aGenericAddonTitle = implts_generateGenericAddonToolbarTitle( i+1 ); + + if ( aElement.m_aName.getLength() > 0 ) + { + // Reuse a local entry so we are able to use the latest + // UI changes for this document. + implts_setElementData( aElement, xDockWindow ); + aElement.m_xUIElement = xUIElement; + if ( aElement.m_aUIName.getLength() == 0 ) + { + aElement.m_aUIName = aGenericAddonTitle; + implts_writeWindowStateData( aElement.m_aName, aElement ); + } + } + else + { + // Create new UI element and try to read its state data + UIElement aNewToolbar( aAddonToolBarName, aElementType, xUIElement ); + aNewToolbar.m_bFloating = sal_True; + implts_readWindowStateData( aAddonToolBarName, aNewToolbar ); + implts_setElementData( aNewToolbar, xDockWindow ); + if ( aNewToolbar.m_aUIName.getLength() == 0 ) + { + aNewToolbar.m_aUIName = aGenericAddonTitle; + implts_writeWindowStateData( aNewToolbar.m_aName, aNewToolbar ); + } + implts_insertUIElement( aNewToolbar ); + } + + Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); + if ( xWindow.is() ) + { + // Set generic title for add-on toolbar + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow->GetText().Len() == 0 ) + pWindow->SetText( aGenericAddonTitle ); + if ( pWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolbar = (ToolBox *)pWindow; + pToolbar->SetMenuType(); + } + } + } + } + catch ( NoSuchElementException& ) + { + } + catch ( IllegalArgumentException& ) + { + } + } +} + +void LayoutManager::implts_createNonContextSensitiveToolBars() +{ + ReadGuard aReadLock( m_aLock ); + + if ( !m_xPersistentWindowState.is() || + !m_xFrame.is() || + !m_bComponentAttached ) + return; + + Reference< XFrame > xFrame( m_xFrame ); + + Reference< XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); + Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + aReadLock.unlock(); + + if ( implts_isPreviewModel( impl_getModelFromFrame( xFrame ))) + return; + + std::vector< rtl::OUString > aMakeVisibleToolbars; + + try + { + Sequence< rtl::OUString > aToolbarNames = xPersistentWindowState->getElementNames(); + + if ( aToolbarNames.getLength() > 0 ) + { + rtl::OUString aElementType; + rtl::OUString aElementName; + rtl::OUString aName; + + Reference< ::com::sun::star::ui::XUIElement > xUIElement; + aMakeVisibleToolbars.reserve(aToolbarNames.getLength()); + WriteGuard aWriteLock( m_aLock ); + + const rtl::OUString* pTbNames = aToolbarNames.getConstArray(); + for ( sal_Int32 i = 0; i < aToolbarNames.getLength(); i++ ) + { + aName = pTbNames[i]; + if ( impl_parseResourceURL( aName, aElementType, aElementName )) + { + // Check that we only create: + // - Toolbars (the statusbar is also member of the persistent window state) + // - Not custom toolbars, there are created with their own method (implts_createCustomToolbars) + if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && + aElementName.indexOf( m_aCustomTbxPrefix ) == -1 ) + { + UIElement aNewToolbar( aName, aElementType, xUIElement ); + bool bFound = implts_findElement( aName, aNewToolbar ); + if ( !bFound ) + implts_readWindowStateData( aName, aNewToolbar ); + + if ( aNewToolbar.m_bVisible && + !aNewToolbar.m_bContextSensitive ) + { + if ( !bFound ) + implts_insertUIElement( aNewToolbar ); + aMakeVisibleToolbars.push_back( aName ); + } + } + } + } + } + } + catch ( RuntimeException& e ) + { + throw e; + } + catch ( Exception& ) + { + } + + if ( !aMakeVisibleToolbars.empty() ) + { + implts_lock(); + ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &LayoutManager::requestElement, this,_1 )); + implts_unlock(); + } +} + +void LayoutManager::implts_toggleFloatingUIElementsVisibility( sal_Bool bActive ) +{ + WriteGuard aWriteLock( m_aLock ); + UIElementVector::iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_xUIElement.is() ) + { + Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); + if ( xDockWindow.is() && xWindow.is() ) + { + sal_Bool bVisible( sal_True ); + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + bVisible = pWindow->IsVisible(); + + if ( xDockWindow->isFloating() ) + { + if ( bActive ) + { + if ( !bVisible && pIter->m_bDeactiveHide ) + { + pIter->m_bDeactiveHide = sal_False; + // we need VCL here to pass special flags to Show() + if( pWindow ) + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + //xWindow->setVisible( sal_True ); + } + } + else + { + if ( bVisible ) + { + pIter->m_bDeactiveHide = sal_True; + xWindow->setVisible( sal_False ); + } + } + } + } + } + } +} + +sal_Bool LayoutManager::implts_findElement( const rtl::OUString& aName, rtl::OUString& aElementType, rtl::OUString& aElementName, Reference< XUIElement >& xUIElement ) +{ + if ( impl_parseResourceURL( aName, aElementType, aElementName )) + { + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + { + ReadGuard aReadLock( m_aLock ); + xUIElement = m_xMenuBar; + return sal_True; + } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || + ( m_aStatusBarElement.m_aName == aName )) + { + ReadGuard aReadLock( m_aLock ); + xUIElement = m_aStatusBarElement.m_xUIElement; + return sal_True; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) + { + ReadGuard aReadLock( m_aLock ); + xUIElement = m_aProgressBarElement.m_xUIElement; + return sal_True; + } + else + { + UIElementVector::const_iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName ) + { + xUIElement = pIter->m_xUIElement; + return sal_True; + } + } + } + } + + return sal_False; +} + +sal_Bool LayoutManager::implts_findElement( const Reference< XInterface >& xUIElement, UIElement& aElementData ) +{ + UIElementVector::const_iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_xUIElement.is() ) + { + Reference< XInterface > xIfac( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + if ( xIfac == xUIElement ) + { + aElementData = *pIter; + return sal_True; + } + } + } + + return sal_False; +} + +sal_Bool LayoutManager::implts_findElement( const rtl::OUString& aName, UIElement& aElementData ) +{ + UIElementVector::const_iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName ) + { + aElementData = *pIter; + return sal_True; + } + } + + return sal_False; +} + +UIElement& LayoutManager::impl_findElement( const rtl::OUString& aName ) +{ + static UIElement aEmptyElement; + + UIElementVector::iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName ) + return *pIter; + } + + return aEmptyElement; +} + +sal_Bool LayoutManager::implts_insertUIElement( const UIElement& rUIElement ) +{ + UIElement aTempData; + bool bFound = implts_findElement( rUIElement.m_aName, aTempData ); + +#ifdef DBG_UTIL + if ( bFound ) + { + char aBuffer[256]; + const sal_Int32 MAX_NAME_LENGTH = 128; + ::rtl::OString aName = ::rtl::OUStringToOString( rUIElement.m_aName, RTL_TEXTENCODING_ASCII_US ); + aName = aName.copy( ::std::min( MAX_NAME_LENGTH, aName.getLength() )); + sprintf( aBuffer, "Try to insert an already existing user interface element (%s) into the list\n", aName.getStr() ); + DBG_ASSERT( bFound, aBuffer ); + } +#endif + + bool bResult( false ); + if ( !bFound ) + { + WriteGuard aWriteLock( m_aLock ); + m_aUIElements.push_back( rUIElement ); + bResult = true; + } + return bResult; +} + +void LayoutManager::implts_writeNewStateData( const rtl::OUString aName, const Reference< css::awt::XWindow >& xWindow ) +{ + css::awt::Rectangle aPos; + css::awt::Size aSize; + sal_Bool bVisible( sal_False ); + sal_Bool bFloating( sal_True ); + + if ( xWindow.is() ) + { + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( xDockWindow.is() ) + bFloating = xDockWindow->isFloating(); + + Reference< css::awt::XWindow2 > xWindow2( xWindow, UNO_QUERY ); + if( xWindow2.is() ) + { + aPos = xWindow2->getPosSize(); + aSize = xWindow2->getOutputSize(); // always use output size for consistency + bVisible = xWindow2->isVisible(); + } + } + + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = impl_findElement( aName ); + if ( rUIElement.m_xUIElement.is() && xWindow.is() ) + { + rUIElement.m_bVisible = bVisible; + rUIElement.m_bFloating = bFloating; + if ( bFloating ) + { + rUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); + rUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); + } + } + + implts_writeWindowStateData( aName, rUIElement ); + + aWriteLock.unlock(); +} + +void LayoutManager::implts_refreshContextToolbarsVisibility() +{ + std::vector< UIElementVisibility > aToolbarVisibleVector; + + ReadGuard aReadLock( m_aLock ); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + if ( !m_bVisible || !m_bAutomaticToolbars ) + return; + + UIElementVisibility aUIElementVisible; + + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aType.equalsAsciiL( "toolbar", 7 )) + { + aUIElementVisible.aName = pIter->m_aName; + aUIElementVisible.bVisible = pIter->m_bVisible; + aToolbarVisibleVector.push_back( aUIElementVisible ); + } + } + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aReadLock.unlock(); + + UIElement aUIElement; + const sal_uInt32 nCount = aToolbarVisibleVector.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + UIElementVisibility& rToolbar = aToolbarVisibleVector[i]; + + sal_Bool bVisible = rToolbar.bVisible; + if ( implts_readWindowStateData( rToolbar.aName, aUIElement ) && + aUIElement.m_bVisible != bVisible ) + { + WriteGuard aWriteLock( m_aLock ); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + UIElement& rUIElement = impl_findElement( rToolbar.aName ); + + if ( rUIElement.m_aName == rToolbar.aName ) + rUIElement.m_bVisible = aUIElement.m_bVisible; + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aWriteLock.unlock(); + } + } +} + +sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ) +{ + sal_Bool bGetSettingsState( sal_False ); + + WriteGuard aWriteLock( m_aLock ); + Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + aWriteLock.unlock(); + + if ( xPersistentWindowState.is() ) + { + aWriteLock.lock(); + sal_Bool bGlobalSettings( m_bGlobalSettings ); + GlobalSettings* pGlobalSettings( 0 ); + if ( m_pGlobalSettings == 0 ) + { + m_pGlobalSettings = new GlobalSettings( m_xSMGR ); + bGetSettingsState = sal_True; + } + pGlobalSettings = m_pGlobalSettings; + aWriteLock.unlock(); + + try + { + Sequence< PropertyValue > aWindowState; + if ( xPersistentWindowState->getByName( aName ) >>= aWindowState ) + { + sal_Bool bValue( sal_False ); + for ( sal_Int32 n = 0; n < aWindowState.getLength(); n++ ) + { + if ( aWindowState[n].Name == m_aPropDocked ) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bFloating = !bValue; + } + else if ( aWindowState[n].Name == m_aPropVisible ) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bVisible = bValue; + } + else if ( aWindowState[n].Name == m_aPropDockingArea ) + { + ::com::sun::star::ui::DockingArea eDockingArea; + if ( aWindowState[n].Value >>= eDockingArea ) + rElementData.m_aDockedData.m_nDockedArea = sal_Int16( eDockingArea ); + } + else if ( aWindowState[n].Name == m_aPropDockPos ) + { + css::awt::Point aPoint; + if ( aWindowState[n].Value >>= aPoint ) + { + rElementData.m_aDockedData.m_aPos.X() = aPoint.X; + rElementData.m_aDockedData.m_aPos.Y() = aPoint.Y; + } + } + else if ( aWindowState[n].Name == m_aPropPos ) + { + css::awt::Point aPoint; + if ( aWindowState[n].Value >>= aPoint ) + { + rElementData.m_aFloatingData.m_aPos.X() = aPoint.X; + rElementData.m_aFloatingData.m_aPos.Y() = aPoint.Y; + } + } + else if ( aWindowState[n].Name == m_aPropSize ) + { + css::awt::Size aSize; + if ( aWindowState[n].Value >>= aSize ) + { + rElementData.m_aFloatingData.m_aSize.Width() = aSize.Width; + rElementData.m_aFloatingData.m_aSize.Height() = aSize.Height; + } + } + else if ( aWindowState[n].Name == m_aPropUIName ) + aWindowState[n].Value >>= rElementData.m_aUIName; + else if ( aWindowState[n].Name == m_aPropStyle ) + { + sal_Int32 nStyle = 0; + if ( aWindowState[n].Value >>= nStyle ) + rElementData.m_nStyle = sal_Int16( nStyle ); + } + else if ( aWindowState[n].Name == m_aPropLocked ) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_aDockedData.m_bLocked = bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXT )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bContextSensitive = bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_NOCLOSE )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bNoClose = bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXTACTIVE )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bContextActive = bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_SOFTCLOSE )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bSoftClose = bValue; + } + } + } + + // oversteer values with global settings + if ( pGlobalSettings && ( bGetSettingsState || bGlobalSettings )) + { + if ( pGlobalSettings->HasStatesInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR )) + { + WriteGuard aWriteLock2( m_aLock ); + m_bGlobalSettings = sal_True; + aWriteLock2.unlock(); + + css::uno::Any aValue; + sal_Bool bValue = sal_Bool(); + if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR, + GlobalSettings::STATEINFO_LOCKED, + aValue )) + aValue >>= rElementData.m_aDockedData.m_bLocked; + if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR, + GlobalSettings::STATEINFO_DOCKED, + aValue )) + { + if ( aValue >>= bValue ) + rElementData.m_bFloating = !bValue; + } + } + } + + return sal_True; + } + catch ( NoSuchElementException& ) + { + } + } + + return sal_False; +} + +void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, const UIElement& rElementData ) +{ + WriteGuard aWriteLock( m_aLock ); + Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + + // set flag to determine that we triggered the notification + m_bStoreWindowState = sal_True; + aWriteLock.unlock(); + + sal_Bool bPersistent( sal_False ); + Reference< XPropertySet > xPropSet( rElementData.m_xUIElement, UNO_QUERY ); + if ( xPropSet.is() ) + { + try + { + // Check persistent flag of the user interface element + xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" ))) >>= bPersistent; + } + catch ( com::sun::star::beans::UnknownPropertyException ) + { + // Non-configurable elements should at least store their dimension/position + bPersistent = sal_True; + } + catch ( com::sun::star::lang::WrappedTargetException ) + { + } + } + + if ( bPersistent && xPersistentWindowState.is() ) + { + try + { + Sequence< PropertyValue > aWindowState( 8 ); + + aWindowState[0].Name = m_aPropDocked; + aWindowState[0].Value = makeAny( sal_Bool( !rElementData.m_bFloating )); + aWindowState[1].Name = m_aPropVisible; + aWindowState[1].Value = makeAny( sal_Bool( rElementData.m_bVisible )); + + aWindowState[2].Name = m_aPropDockingArea; + aWindowState[2].Value = makeAny( static_cast< DockingArea >( rElementData.m_aDockedData.m_nDockedArea ) ); + + css::awt::Point aPos; + aPos.X = rElementData.m_aDockedData.m_aPos.X(); + aPos.Y = rElementData.m_aDockedData.m_aPos.Y(); + aWindowState[3].Name = m_aPropDockPos; + aWindowState[3].Value <<= aPos; + + aPos.X = rElementData.m_aFloatingData.m_aPos.X(); + aPos.Y = rElementData.m_aFloatingData.m_aPos.Y(); + aWindowState[4].Name = m_aPropPos; + aWindowState[4].Value <<= aPos; + + css::awt::Size aSize; + aSize.Width = rElementData.m_aFloatingData.m_aSize.Width(); + aSize.Height = rElementData.m_aFloatingData.m_aSize.Height(); + aWindowState[5].Name = m_aPropSize; + aWindowState[5].Value <<= aSize; + aWindowState[6].Name = m_aPropUIName; + aWindowState[6].Value = makeAny( rElementData.m_aUIName ); + aWindowState[7].Name = m_aPropLocked; + aWindowState[7].Value = makeAny( rElementData.m_aDockedData.m_bLocked ); + + if ( xPersistentWindowState->hasByName( aName )) + { + Reference< XNameReplace > xReplace( xPersistentWindowState, uno::UNO_QUERY ); + xReplace->replaceByName( aName, makeAny( aWindowState )); + } + else + { + Reference< XNameContainer > xInsert( xPersistentWindowState, uno::UNO_QUERY ); + xInsert->insertByName( aName, makeAny( aWindowState )); + } + } + catch ( Exception& ) + { + } + } + + // Reset flag + aWriteLock.lock(); + m_bStoreWindowState = sal_False; + aWriteLock.unlock(); +} + +void LayoutManager::implts_setElementData( UIElement& rElement, const Reference< css::awt::XDockableWindow >& rDockWindow ) +{ + ReadGuard aReadLock( m_aLock ); + sal_Bool bShowElement( rElement.m_bVisible && !rElement.m_bMasterHide && m_bParentWindowVisible ); + aReadLock.unlock(); + + Reference< css::awt::XDockableWindow > xDockWindow( rDockWindow ); + Reference< css::awt::XWindow2 > xWindow( xDockWindow, UNO_QUERY ); + + Window* pWindow( 0 ); + ToolBox* pToolBox( 0 ); + + if ( xDockWindow.is() && xWindow.is() ) + { + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + { + String aText = pWindow->GetText(); + if ( aText.Len() == 0 ) + pWindow->SetText( rElement.m_aUIName ); + if ( rElement.m_bNoClose ) + pWindow->SetStyle( pWindow->GetStyle() & ~WB_CLOSEABLE ); + if ( pWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pWindow; + } + if ( pToolBox ) + { + if (( rElement.m_nStyle < 0 ) || + ( rElement.m_nStyle > BUTTON_SYMBOLTEXT )) + rElement.m_nStyle = BUTTON_SYMBOL; + pToolBox->SetButtonType( (ButtonType)rElement.m_nStyle ); + if ( rElement.m_bNoClose ) + pToolBox->SetFloatStyle( pToolBox->GetFloatStyle() & ~WB_CLOSEABLE ); + } + } + + if ( rElement.m_bFloating ) + { + if ( pWindow ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + String aText = pWindow->GetText(); + if ( aText.Len() == 0 ) + pWindow->SetText( rElement.m_aUIName ); + } + + ::Point aPos( rElement.m_aFloatingData.m_aPos.X(), + rElement.m_aFloatingData.m_aPos.Y() ); + sal_Bool bWriteData( sal_False ); + sal_Bool bUndefPos = ( rElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || + rElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); + sal_Bool bSetSize = ( rElement.m_aFloatingData.m_aSize.Width() != 0 && + rElement.m_aFloatingData.m_aSize.Height() != 0 ); + xDockWindow->setFloatingMode( sal_True ); + if ( bUndefPos ) + { + aPos = implts_findNextCascadeFloatingPos(); + rElement.m_aFloatingData.m_aPos = aPos; // set new cascaded position + bWriteData = sal_True; + } + + if( bSetSize ) + xWindow->setOutputSize( AWTSize( rElement.m_aFloatingData.m_aSize ) ); + else + { + if( pToolBox ) + { + // set an optimal initial floating size + vos::OGuard aGuard( Application::GetSolarMutex() ); + ::Size aSize( pToolBox->CalcFloatingWindowSizePixel() ); + pToolBox->SetOutputSizePixel( aSize ); + } + } + + // #i60882# IMPORTANT: Set position after size as it is + // possible that we position some part of the toolbar + // outside of the desktop. A default constructed toolbar + // always has one line. Now VCL automatically + // position the toolbar back into the desktop. Therefore + // we resize the toolbar with the new (wrong) position. + // To fix this problem we have to set the size BEFORE the + // position. + xWindow->setPosSize( aPos.X(), aPos.Y(), 0, 0, + css::awt::PosSize::POS ); + + if ( bWriteData ) + implts_writeWindowStateData( rElement.m_aName, rElement ); + if ( bShowElement && pWindow ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + } + } + else + { + ::Point aDockPos; + ::Point aPixelPos; + sal_Bool bSetSize( sal_False ); + ::Size aSize; + + if ( pToolBox ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pToolBox->SetAlign( ImplConvertAlignment(rElement.m_aDockedData.m_nDockedArea ) ); + pToolBox->SetLineCount( 1 ); + if ( rElement.m_aDockedData.m_bLocked ) + xDockWindow->lock(); + aSize = pToolBox->CalcWindowSizePixel(); + bSetSize = sal_True; + + if (( rElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && + ( rElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + { + implts_findNextDockingPos( (DockingArea)rElement.m_aDockedData.m_nDockedArea, + aSize, + aDockPos, + aPixelPos ); + rElement.m_aDockedData.m_aPos = aDockPos; + } + } + + xWindow->setPosSize( aPixelPos.X(), + aPixelPos.Y(), + 0, 0, + css::awt::PosSize::POS ); + if( bSetSize ) + xWindow->setOutputSize( AWTSize( aSize) ); + + if ( bShowElement && pWindow ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow->Show( sal_True ); + } + } + } +} + +::Point LayoutManager::implts_findNextCascadeFloatingPos() +{ + const sal_Int32 nHotZoneX = 50; + const sal_Int32 nHotZoneY = 50; + const sal_Int32 nCascadeIndentX = 15; + const sal_Int32 nCascadeIndentY = 15; + + ReadGuard aReadLock( m_aLock ); + Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; + Reference< css::awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; + Reference< css::awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; + aReadLock.unlock(); + + ::Point aStartPos( nCascadeIndentX, nCascadeIndentY ); + ::Point aCurrPos( aStartPos ); + css::awt::Rectangle aRect; + + Window* pContainerWindow( 0 ); + if ( xContainerWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + if ( pContainerWindow ) + aStartPos = pContainerWindow->OutputToScreenPixel( aStartPos ); + } + + // Determine size of top and left docking area + css::awt::Rectangle aTopRect = xTopDockingWindow->getPosSize(); + css::awt::Rectangle aLeftRect = xLeftDockingWindow->getPosSize(); + + aStartPos.X() += aLeftRect.Width + nCascadeIndentX; + aStartPos.Y() += aTopRect.Height + nCascadeIndentY; + aCurrPos = aStartPos; + + // Try to find a cascaded position for the new floating window + UIElementVector::const_iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_xUIElement.is() ) + { + Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); + if ( xDockWindow.is() && xDockWindow->isFloating() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() ) + { + css::awt::Rectangle aFloatRect = xWindow->getPosSize(); + if ((( aFloatRect.X - nHotZoneX ) <= aCurrPos.X() ) && + ( aFloatRect.X >= aCurrPos.X() ) && + (( aFloatRect.Y - nHotZoneY ) <= aCurrPos.Y() ) && + ( aFloatRect.Y >= aCurrPos.Y() )) + { + aCurrPos.X() = aFloatRect.X + nCascadeIndentX; + aCurrPos.Y() = aFloatRect.Y + nCascadeIndentY; + } + } + } + } + } + + return aCurrPos; +} + +void LayoutManager::implts_findNextDockingPos( DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ) +{ + ReadGuard aReadLock( m_aLock ); + Reference< css::awt::XWindow > xDockingWindow = m_xDockAreaWindows[DockingArea]; + ::Size aDockingWinSize; + Window* pDockingWindow( 0 ); + aReadLock.unlock(); + + if (( DockingArea < DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea > DockingArea_DOCKINGAREA_RIGHT )) + DockingArea = DockingArea_DOCKINGAREA_TOP; + + { + // Retrieve output size from container Window + vos::OGuard aGuard( Application::GetSolarMutex() ); + pDockingWindow = VCLUnoHelper::GetWindow( xDockingWindow ); + if ( pDockingWindow ) + aDockingWinSize = pDockingWindow->GetOutputSizePixel(); + } + + sal_Int32 nFreeRowColPixelPos( 0 ); + sal_Int32 nMaxSpace( 0 ); + sal_Int32 nNeededSpace( 0 ); + sal_Int32 nTopDockingAreaSize( 0 ); + + if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + nMaxSpace = aDockingWinSize.Width(); + nNeededSpace = aUIElementSize.Width(); + } + else + { + nMaxSpace = aDockingWinSize.Height(); + nNeededSpace = aUIElementSize.Height(); + nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); + } + + std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; + + implts_getDockingAreaElementInfos( DockingArea, aRowColumnsWindowData ); + sal_Int32 nPixelPos( 0 ); + const sal_uInt32 nCount = aRowColumnsWindowData.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + SingleRowColumnWindowData& rRowColumnWindowData = aRowColumnsWindowData[i]; + + if (( DockingArea == DockingArea_DOCKINGAREA_BOTTOM ) || + ( DockingArea == DockingArea_DOCKINGAREA_RIGHT )) + nPixelPos += rRowColumnWindowData.nStaticSize; + + if ((( nMaxSpace - rRowColumnWindowData.nVarSize ) >= nNeededSpace ) || + ( rRowColumnWindowData.nSpace >= nNeededSpace )) + { + // Check current row where we can find the needed space + sal_Int32 nCurrPos( 0 ); + const sal_uInt32 nWindowSizesCount = rRowColumnWindowData.aRowColumnWindowSizes.size(); + for ( sal_uInt32 j = 0; j < nWindowSizesCount; j++ ) + { + css::awt::Rectangle rRect = rRowColumnWindowData.aRowColumnWindowSizes[j]; + sal_Int32& rSpace = rRowColumnWindowData.aRowColumnSpace[j]; + if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + if ( rSpace >= nNeededSpace ) + { + rVirtualPos = ::Point( nCurrPos, rRowColumnWindowData.nRowColumn ); + if ( DockingArea == DockingArea_DOCKINGAREA_TOP ) + rPixelPos = ::Point( nCurrPos, nPixelPos ); + else + rPixelPos = ::Point( nCurrPos, aDockingWinSize.Height() - nPixelPos ); + return; + } + nCurrPos = rRect.X + rRect.Width; + } + else + { + if ( rSpace >= nNeededSpace ) + { + rVirtualPos = ::Point( rRowColumnWindowData.nRowColumn, nCurrPos ); + if ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) + rPixelPos = ::Point( nPixelPos, nTopDockingAreaSize + nCurrPos ); + else + rPixelPos = ::Point( aDockingWinSize.Width() - nPixelPos , nTopDockingAreaSize + nCurrPos ); + return; + } + nCurrPos = rRect.Y + rRect.Height; + } + } + + if (( nCurrPos + nNeededSpace ) <= nMaxSpace ) + { + if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + rVirtualPos = ::Point( nCurrPos, rRowColumnWindowData.nRowColumn ); + if ( DockingArea == DockingArea_DOCKINGAREA_TOP ) + rPixelPos = ::Point( nCurrPos, nPixelPos ); + else + rPixelPos = ::Point( nCurrPos, aDockingWinSize.Height() - nPixelPos ); + return; + } + else + { + rVirtualPos = ::Point( rRowColumnWindowData.nRowColumn, nCurrPos ); + if ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) + rPixelPos = ::Point( nPixelPos, nTopDockingAreaSize + nCurrPos ); + else + rPixelPos = ::Point( aDockingWinSize.Width() - nPixelPos , nTopDockingAreaSize + nCurrPos ); + return; + } + } + } + + if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == DockingArea_DOCKINGAREA_LEFT )) + nPixelPos += rRowColumnWindowData.nStaticSize; + } + + sal_Int32 nNextFreeRowCol( 0 ); + sal_Int32 nRowColumnsCount = aRowColumnsWindowData.size(); + if ( nRowColumnsCount > 0 ) + nNextFreeRowCol = aRowColumnsWindowData[nRowColumnsCount-1].nRowColumn+1; + else + nNextFreeRowCol = 0; + + if ( nNextFreeRowCol == 0 ) + { + if ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM ) + nFreeRowColPixelPos = aDockingWinSize.Height() - aUIElementSize.Height(); + else if ( DockingArea == DockingArea_DOCKINGAREA_RIGHT ) + nFreeRowColPixelPos = aDockingWinSize.Width() - aUIElementSize.Width(); + } + + if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + rVirtualPos = ::Point( 0, nNextFreeRowCol ); + if ( DockingArea == DockingArea_DOCKINGAREA_TOP ) + rPixelPos = ::Point( 0, nFreeRowColPixelPos ); + else + rPixelPos = ::Point( 0, aDockingWinSize.Height() - nFreeRowColPixelPos ); + } + else + { + rVirtualPos = ::Point( nNextFreeRowCol, 0 ); + rPixelPos = ::Point( aDockingWinSize.Width() - nFreeRowColPixelPos, 0 ); + } +} + +::Size LayoutManager::implts_getContainerWindowOutputSize() +{ + ReadGuard aReadLock( m_aLock ); + Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; + ::Size aContainerWinSize; + Window* pContainerWindow( 0 ); + aReadLock.unlock(); + + // Retrieve output size from container Window + vos::OGuard aGuard( Application::GetSolarMutex() ); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + if ( pContainerWindow ) + return pContainerWindow->GetOutputSizePixel(); + else + return ::Size(); +} + +void LayoutManager::implts_sortUIElements() +{ + WriteGuard aWriteLock( m_aLock ); + UIElementVector::iterator pIterStart = m_aUIElements.begin(); + UIElementVector::iterator pIterEnd = m_aUIElements.end(); + + std::stable_sort( pIterStart, pIterEnd ); // first created element should first + + // We have to reset our temporary flags. + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + // why check, just set it to false + //if ( pIter->m_bUserActive ) + pIter->m_bUserActive = sal_False; + } + +#ifdef DBG_UTIL + implts_checkElementContainer(); +#endif + aWriteLock.unlock(); +} + +void LayoutManager::implts_getDockingAreaElementInfos( DockingArea eDockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ) +{ + std::vector< UIElement > aWindowVector; + + if (( eDockingArea < DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea > DockingArea_DOCKINGAREA_RIGHT )) + eDockingArea = DockingArea_DOCKINGAREA_TOP; + + Reference< css::awt::XWindow > xDockAreaWindow; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + aWindowVector.reserve(m_aUIElements.size()); + xDockAreaWindow = m_xDockAreaWindows[eDockingArea]; + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea && pIter->m_bVisible && !pIter->m_bFloating ) + { + Reference< XUIElement > xUIElement( pIter->m_xUIElement ); + if ( xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( xDockWindow.is() ) + { + // docked windows + aWindowVector.push_back( *pIter ); + } + } + } + } + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + rRowColumnsWindowData.clear(); + + // Collect data from windows that are on the same row/column + sal_Int32 j; + sal_Int32 nIndex( 0 ); + sal_Int32 nLastPos( 0 ); + sal_Int32 nCurrPos( -1 ); + sal_Int32 nLastRowColPixelPos( 0 ); + css::awt::Rectangle aDockAreaRect; + + if ( xDockAreaWindow.is() ) + aDockAreaRect = xDockAreaWindow->getPosSize(); + + if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) + nLastRowColPixelPos = 0; + else if ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) + nLastRowColPixelPos = aDockAreaRect.Height; + else if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) + nLastRowColPixelPos = 0; + else + nLastRowColPixelPos = aDockAreaRect.Width; + + const sal_uInt32 nCount = aWindowVector.size(); + for ( j = 0; j < sal_Int32( nCount); j++ ) + { + const UIElement& rElement = aWindowVector[j]; + Reference< css::awt::XWindow > xWindow; + Reference< XUIElement > xUIElement( rElement.m_xUIElement ); + css::awt::Rectangle aPosSize; + if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) ) + continue; + if (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + if ( nCurrPos == -1 ) + { + nCurrPos = rElement.m_aDockedData.m_aPos.Y(); + nLastPos = 0; + + SingleRowColumnWindowData aRowColumnWindowData; + aRowColumnWindowData.nRowColumn = nCurrPos; + rRowColumnsWindowData.push_back( aRowColumnWindowData ); + } + + sal_Int32 nSpace( 0 ); + if ( rElement.m_aDockedData.m_aPos.Y() != nCurrPos ) + { + if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) + nLastRowColPixelPos += rRowColumnsWindowData[nIndex].nStaticSize; + else + nLastRowColPixelPos -= rRowColumnsWindowData[nIndex].nStaticSize; + ++nIndex; + nLastPos = 0; + nCurrPos = rElement.m_aDockedData.m_aPos.Y(); + SingleRowColumnWindowData aRowColumnWindowData; + aRowColumnWindowData.nRowColumn = nCurrPos; + rRowColumnsWindowData.push_back( aRowColumnWindowData ); + } + + // Calc space before an element and store it + nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); + if ( rElement.m_aDockedData.m_aPos.X() >= nLastPos ) + { + rRowColumnsWindowData[nIndex].nSpace += nSpace; + nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width; + } + else + { + nSpace = 0; + nLastPos += aPosSize.Width; + } + rRowColumnsWindowData[nIndex].aRowColumnSpace.push_back( nSpace ); + + rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); + rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); + rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( + css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); + if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Height ) + rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Height; + if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) + rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, nLastRowColPixelPos, + aDockAreaRect.Width, aPosSize.Height ); + else + rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, ( nLastRowColPixelPos - aPosSize.Height ), + aDockAreaRect.Width, aPosSize.Height ); + rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Width + nSpace; + } + else + { + if ( nCurrPos == -1 ) + { + nCurrPos = rElement.m_aDockedData.m_aPos.X(); + nLastPos = 0; + + SingleRowColumnWindowData aRowColumnWindowData; + aRowColumnWindowData.nRowColumn = nCurrPos; + rRowColumnsWindowData.push_back( aRowColumnWindowData ); + } + + sal_Int32 nSpace( 0 ); + if ( rElement.m_aDockedData.m_aPos.X() != nCurrPos ) + { + if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) + nLastRowColPixelPos += rRowColumnsWindowData[nIndex].nStaticSize; + else + nLastRowColPixelPos -= rRowColumnsWindowData[nIndex].nStaticSize; + ++nIndex; + nLastPos = 0; + nCurrPos = rElement.m_aDockedData.m_aPos.X(); + SingleRowColumnWindowData aRowColumnWindowData; + aRowColumnWindowData.nRowColumn = nCurrPos; + rRowColumnsWindowData.push_back( aRowColumnWindowData ); + } + + // Calc space before an element and store it + nSpace = ( rElement.m_aDockedData.m_aPos.Y() - nLastPos ); + if ( rElement.m_aDockedData.m_aPos.Y() > nLastPos ) + { + rRowColumnsWindowData[nIndex].nSpace += nSpace; + nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; + } + else + { + nSpace = 0; + nLastPos += aPosSize.Height; + } + rRowColumnsWindowData[nIndex].aRowColumnSpace.push_back( nSpace ); + + rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); + rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); + rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( + css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); + if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Width ) + rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Width; + if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) + rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( nLastRowColPixelPos, 0, + aPosSize.Width, aDockAreaRect.Height ); + else + rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( ( nLastRowColPixelPos - aPosSize.Width ), 0, + aPosSize.Width, aDockAreaRect.Height ); + rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Height + nSpace; + } + } +} + +void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea eDockingArea, sal_Int32 nRowCol, SingleRowColumnWindowData& rRowColumnWindowData ) +{ + std::vector< UIElement > aWindowVector; + + if (( eDockingArea < DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea > DockingArea_DOCKINGAREA_RIGHT )) + eDockingArea = DockingArea_DOCKINGAREA_TOP; + + sal_Bool bHorzDockArea = (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + UIElementVector::iterator pIter; + UIElementVector::iterator pEnd = m_aUIElements.end(); + for ( pIter = m_aUIElements.begin(); pIter != pEnd; pIter++ ) + { + if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea ) + { + sal_Bool bSameRowCol = bHorzDockArea ? + ( pIter->m_aDockedData.m_aPos.Y() == nRowCol ) : + ( pIter->m_aDockedData.m_aPos.X() == nRowCol ); + Reference< XUIElement > xUIElement( pIter->m_xUIElement ); + + if ( bSameRowCol && xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); + if ( xWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( pWindow && pIter->m_bVisible && xDockWindow.is() && !pIter->m_bFloating ) + { + // docked windows + aWindowVector.push_back( *pIter ); + } + } + } + } + } + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + // Initialize structure + rRowColumnWindowData.aUIElementNames.clear(); + rRowColumnWindowData.aRowColumnWindows.clear(); + rRowColumnWindowData.aRowColumnWindowSizes.clear(); + rRowColumnWindowData.aRowColumnSpace.clear(); + rRowColumnWindowData.nVarSize = 0; + rRowColumnWindowData.nStaticSize = 0; + rRowColumnWindowData.nSpace = 0; + rRowColumnWindowData.nRowColumn = nRowCol; + + // Collect data from windows that are on the same row/column + sal_Int32 j; + sal_Int32 nLastPos( 0 ); + + const sal_uInt32 nCount = aWindowVector.size(); + for ( j = 0; j < sal_Int32( nCount); j++ ) + { + const UIElement& rElement = aWindowVector[j]; + Reference< css::awt::XWindow > xWindow; + Reference< XUIElement > xUIElement( rElement.m_xUIElement ); + css::awt::Rectangle aPosSize; + if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) ) + continue; + + sal_Int32 nSpace; + if (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); + + // Calc space before an element and store it + if ( rElement.m_aDockedData.m_aPos.X() > nLastPos ) + rRowColumnWindowData.nSpace += nSpace; + else + nSpace = 0; + + nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width; + + + rRowColumnWindowData.aRowColumnWindowSizes.push_back( + css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); + if ( rRowColumnWindowData.nStaticSize < aPosSize.Height ) + rRowColumnWindowData.nStaticSize = aPosSize.Height; + rRowColumnWindowData.nVarSize += aPosSize.Width; + } + else + { + // Calc space before an element and store it + nSpace = ( rElement.m_aDockedData.m_aPos.Y() - nLastPos ); + if ( rElement.m_aDockedData.m_aPos.Y() > nLastPos ) + rRowColumnWindowData.nSpace += nSpace; + else + nSpace = 0; + + nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; + + rRowColumnWindowData.aRowColumnWindowSizes.push_back( + css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); + if ( rRowColumnWindowData.nStaticSize < aPosSize.Width ) + rRowColumnWindowData.nStaticSize = aPosSize.Width; + rRowColumnWindowData.nVarSize += aPosSize.Height; + } + + rRowColumnWindowData.aUIElementNames.push_back( rElement.m_aName ); + rRowColumnWindowData.aRowColumnWindows.push_back( xWindow ); + rRowColumnWindowData.aRowColumnSpace.push_back( nSpace ); + rRowColumnWindowData.nVarSize += nSpace; + } +} + +::Rectangle LayoutManager::implts_determineFrontDockingRect( + DockingArea eDockingArea, + sal_Int32 nRowCol, + const ::Rectangle& rDockedElementRect, + const ::rtl::OUString& rMovedElementName, + const ::Rectangle& rMovedElementRect ) +{ + SingleRowColumnWindowData aRowColumnWindowData; + + sal_Bool bHorzDockArea = (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); + + implts_getDockingAreaElementInfoOnSingleRowCol( eDockingArea, nRowCol, aRowColumnWindowData ); + if ( aRowColumnWindowData.aRowColumnWindows.empty() ) + return rMovedElementRect; + else + { + sal_Int32 nSpace( 0 ); + ::Rectangle aFrontDockingRect( rMovedElementRect ); + const sal_uInt32 nCount = aRowColumnWindowData.aRowColumnWindows.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + if ( bHorzDockArea ) + { + if ( aRowColumnWindowData.aRowColumnWindowSizes[i].X >= rDockedElementRect.Left() ) + { + nSpace += aRowColumnWindowData.aRowColumnSpace[i]; + break; + } + else if ( aRowColumnWindowData.aUIElementNames[i] == rMovedElementName ) + nSpace += aRowColumnWindowData.aRowColumnWindowSizes[i].Width + + aRowColumnWindowData.aRowColumnSpace[i]; + else + nSpace = 0; + } + else + { + if ( aRowColumnWindowData.aRowColumnWindowSizes[i].Y >= rDockedElementRect.Top() ) + { + nSpace += aRowColumnWindowData.aRowColumnSpace[i]; + break; + } + else if ( aRowColumnWindowData.aUIElementNames[i] == rMovedElementName ) + nSpace += aRowColumnWindowData.aRowColumnWindowSizes[i].Height + + aRowColumnWindowData.aRowColumnSpace[i]; + else + nSpace = 0; + } + } + + if ( nSpace > 0 ) + { + sal_Int32 nMove = std::min( nSpace, static_cast(aFrontDockingRect.getWidth()) ); + if ( bHorzDockArea ) + aFrontDockingRect.Move( -nMove, 0 ); + else + aFrontDockingRect.Move( 0, -nMove ); + } + + return aFrontDockingRect; + } +} + +::Rectangle LayoutManager::implts_getWindowRectFromRowColumn( + ::com::sun::star::ui::DockingArea DockingArea, + const SingleRowColumnWindowData& rRowColumnWindowData, + const ::Point& rMousePos, + const rtl::OUString& rExcludeElementName ) +{ + ::Rectangle aWinRect; + + if (( DockingArea < DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea > DockingArea_DOCKINGAREA_RIGHT )) + DockingArea = DockingArea_DOCKINGAREA_TOP; + + if ( rRowColumnWindowData.aRowColumnWindows.empty() ) + return aWinRect; + else + { + ReadGuard aReadLock( m_aLock ); + Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; + Reference< css::awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[DockingArea]; + aReadLock.unlock(); + + // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect + vos::OGuard aGuard( Application::GetSolarMutex() ); + + // Retrieve output size from container Window + Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow )); + Window* pDockingAreaWindow( VCLUnoHelper::GetWindow( xDockingAreaWindow )); + if ( pDockingAreaWindow && pContainerWindow ) + { + const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindows.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + css::awt::Rectangle aWindowRect = rRowColumnWindowData.aRowColumnWindows[i]->getPosSize(); + ::Rectangle aRect( aWindowRect.X, aWindowRect.Y, aWindowRect.X+aWindowRect.Width, aWindowRect.Y+aWindowRect.Height ); + aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); + if ( aRect.IsInside( rMousePos )) + { + // Check if we have found the excluded element. If yes, we have to provide an empty rectangle. + // We prevent that a toolbar cannot be moved when the mouse pointer is inside its own rectangle! + if ( rExcludeElementName != rRowColumnWindowData.aUIElementNames[i] ) + return aRect; + else + break; + } + } + } + } + + return aWinRect; +} + +framework::LayoutManager::DockingOperation +LayoutManager::implts_determineDockingOperation( + ::com::sun::star::ui::DockingArea DockingArea, + const ::Rectangle& rRowColRect, + const Point& rMousePos ) +{ + const sal_Int32 nHorzVerticalRegionSize = 6; + const sal_Int32 nHorzVerticalMoveRegion = 4; + + if ( rRowColRect.IsInside( rMousePos )) + { + if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + sal_Int32 nRegion = rRowColRect.getHeight() / nHorzVerticalRegionSize; + sal_Int32 nPosY = rRowColRect.Top() + nRegion; + + if ( rMousePos.Y() < nPosY ) + return ( DockingArea == DockingArea_DOCKINGAREA_TOP ) ? DOCKOP_BEFORE_COLROW : DOCKOP_AFTER_COLROW; + else if ( rMousePos.Y() < ( nPosY + nRegion*nHorzVerticalMoveRegion )) + return DOCKOP_ON_COLROW; + else + return ( DockingArea == DockingArea_DOCKINGAREA_TOP ) ? DOCKOP_AFTER_COLROW : DOCKOP_BEFORE_COLROW; + } + else + { + sal_Int32 nRegion = rRowColRect.getWidth() / nHorzVerticalRegionSize; + sal_Int32 nPosX = rRowColRect.Left() + nRegion; + + if ( rMousePos.X() < nPosX ) + return ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) ? DOCKOP_BEFORE_COLROW : DOCKOP_AFTER_COLROW; + else if ( rMousePos.X() < ( nPosX + nRegion*nHorzVerticalMoveRegion )) + return DOCKOP_ON_COLROW; + else + return ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) ? DOCKOP_AFTER_COLROW : DOCKOP_BEFORE_COLROW; + } + } + else + return DOCKOP_ON_COLROW; +} + +::Rectangle LayoutManager::implts_calcTrackingAndElementRect( + ::com::sun::star::ui::DockingArea eDockingArea, + sal_Int32 nRowCol, + UIElement& rUIElement, + const ::Rectangle& rTrackingRect, + const ::Rectangle& rRowColumnRect, + const ::Size& rContainerWinSize ) +{ + sal_Bool bHorizontalDockArea( ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); + + sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); + sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); + + ::Size aStatusBarSize( implts_getStatusBarSize() ); + sal_Int32 nMaxLeftRightDockAreaSize = rContainerWinSize.Height() - + nTopDockingAreaSize - + nBottomDockingAreaSize - + aStatusBarSize.Height(); + + ::Rectangle aTrackingRect( rTrackingRect ); + if ( bHorizontalDockArea ) + { + sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 ))); + if (( nPosX + rTrackingRect.getWidth()) > rContainerWinSize.Width() ) + nPosX = std::min( nPosX, + std::max( sal_Int32( rContainerWinSize.Width() - rTrackingRect.getWidth() ), + sal_Int32( 0 ))); + + sal_Int32 nSize = std::min( rContainerWinSize.Width(), rTrackingRect.getWidth() ); + + aTrackingRect.SetPos( ::Point( nPosX, rRowColumnRect.Top() )); + aTrackingRect.setWidth( nSize ); + aTrackingRect.setHeight( rRowColumnRect.getHeight() ); + + // Set virtual position + rUIElement.m_aDockedData.m_aPos.X() = nPosX; + rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; + } + else + { + sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), + sal_Int32( nMaxLeftRightDockAreaSize )); + + sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); + if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) + nPosY = std::min( nPosY, + std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), + sal_Int32( nTopDockingAreaSize ))); + + sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast(aTrackingRect.getHeight()) ); + + aTrackingRect.SetPos( ::Point( rRowColumnRect.Left(), nPosY )); + aTrackingRect.setWidth( rRowColumnRect.getWidth() ); + aTrackingRect.setHeight( nSize ); + + ReadGuard aReadLock( m_aLock ); + Reference< css::awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[eDockingArea]; + Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; + aReadLock.unlock(); + + sal_Int32 nDockPosY( 0 ); + Window* pDockingAreaWindow( 0 ); + Window* pContainerWindow( 0 ); + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + nDockPosY = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( ::Point( 0, nPosY ))).Y(); + } + + // Set virtual position + rUIElement.m_aDockedData.m_aPos.X() = nRowCol; + rUIElement.m_aDockedData.m_aPos.Y() = nDockPosY; + } + + return aTrackingRect; +} + +void implts_setTrackingRect( DockingArea eDockingArea, const Point& rMousePos, ::Rectangle& rTrackingRect ) +{ + sal_Bool bHorizontalDockArea( ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); + + ::Point aPoint = rTrackingRect.TopLeft(); + if ( bHorizontalDockArea ) + aPoint.X() = rMousePos.X(); + else + aPoint.Y() = rMousePos.Y(); + rTrackingRect.SetPos( aPoint ); +} + +void LayoutManager::implts_calcDockingPosSize( + UIElement& rUIElement, + DockingOperation& rDockingOperation, + ::Rectangle& rTrackingRect, + const Point& rMousePos ) +{ + ReadGuard aReadLock( m_aLock ); + Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; + ::Size aContainerWinSize; + Window* pContainerWindow( 0 ); + aReadLock.unlock(); + + { + // Retrieve output size from container Window + vos::OGuard aGuard( Application::GetSolarMutex() ); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + aContainerWinSize = pContainerWindow->GetOutputSizePixel(); + } + + if ( !rUIElement.m_xUIElement.is() ) + { + rTrackingRect = ::Rectangle(); + return; + } + + Window* pDockWindow( 0 ); + Window* pDockingAreaWindow( 0 ); + ToolBox* pToolBox( 0 ); + Reference< css::awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XWindow > xDockingAreaWindow; + ::Rectangle aTrackingRect( rTrackingRect ); + ::com::sun::star::ui::DockingArea eDockedArea( (::com::sun::star::ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); + sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); + sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); + sal_Bool bHorizontalDockArea( ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) || + ( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM )); + ::Size aStatusBarSize( implts_getStatusBarSize() ); + sal_Int32 nMaxLeftRightDockAreaSize = aContainerWinSize.Height() - + nTopDockingAreaSize - + nBottomDockingAreaSize - + aStatusBarSize.Height(); + ::Rectangle aDockingAreaRect; + + aReadLock.lock(); + xDockingAreaWindow = m_xDockAreaWindows[eDockedArea]; + aReadLock.unlock(); + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); + pDockWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pDockWindow && pDockWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pDockWindow; + + aDockingAreaRect = ::Rectangle( pDockingAreaWindow->GetPosPixel(), pDockingAreaWindow->GetSizePixel() ); + if ( pToolBox ) + { + // docked toolbars always have one line + ::Size aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( sal_Int16( eDockedArea )) ); + aTrackingRect.SetSize( ::Size( aSize.Width(), aSize.Height() )); + } + } + + // default docking operation, dock on the given row/column + sal_Bool bOpOutsideOfDockingArea( !aDockingAreaRect.IsInside( rMousePos )); + std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; + + rDockingOperation = DOCKOP_ON_COLROW; + implts_getDockingAreaElementInfos( eDockedArea, aRowColumnsWindowData ); + + // determine current first row/column and last row/column + sal_Int32 nMaxRowCol( -1 ); + sal_Int32 nMinRowCol( SAL_MAX_INT32 ); + const sal_uInt32 nCount = aRowColumnsWindowData.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + if ( aRowColumnsWindowData[i].nRowColumn > nMaxRowCol ) + nMaxRowCol = aRowColumnsWindowData[i].nRowColumn; + if ( aRowColumnsWindowData[i].nRowColumn < nMinRowCol ) + nMinRowCol = aRowColumnsWindowData[i].nRowColumn; + } + + if ( !bOpOutsideOfDockingArea ) + { + // docking inside our docking area + sal_Int32 nIndex( -1 ); + sal_Int32 nRowCol( -1 ); + ::Rectangle aWindowRect; + ::Rectangle aRowColumnRect; + + const sal_uInt32 nWindowDataCount = aRowColumnsWindowData.size(); + for ( sal_uInt32 i = 0; i < nWindowDataCount; i++ ) + { + ::Rectangle aRect( aRowColumnsWindowData[i].aRowColumnRect.X, + aRowColumnsWindowData[i].aRowColumnRect.Y, + aRowColumnsWindowData[i].aRowColumnRect.X + aRowColumnsWindowData[i].aRowColumnRect.Width, + aRowColumnsWindowData[i].aRowColumnRect.Y + aRowColumnsWindowData[i].aRowColumnRect.Height ); + + { + // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect + vos::OGuard aGuard( Application::GetSolarMutex() ); + aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); + } + + sal_Bool bIsInsideRowCol( aRect.IsInside( rMousePos ) ); + if ( bIsInsideRowCol ) + { + nIndex = i; + nRowCol = aRowColumnsWindowData[i].nRowColumn; + rDockingOperation = implts_determineDockingOperation( eDockedArea, aRect, rMousePos ); + aWindowRect = implts_getWindowRectFromRowColumn( eDockedArea, aRowColumnsWindowData[i], rMousePos, rUIElement.m_aName ); + aRowColumnRect = aRect; + break; + } + } + + OSL_ENSURE( ( nIndex >= 0 ) && ( nRowCol >= 0 ), "Impossible case - no row/column found but mouse pointer is inside our docking area" ); + if (( nIndex >= 0 ) && ( nRowCol >= 0 )) + { + if ( rDockingOperation == DOCKOP_ON_COLROW ) + { + if ( !aWindowRect.IsEmpty()) + { + // Tracking rect is on a row/column and mouse is over a docked toolbar. + // Determine if the tracking rect must be located before/after the docked toolbar. + + ::Rectangle aUIElementRect( aWindowRect ); + sal_Int32 nMiddle( bHorizontalDockArea ? ( aWindowRect.Left() + aWindowRect.getWidth() / 2 ) : + ( aWindowRect.Top() + aWindowRect.getHeight() / 2 )); + sal_Bool bInsertBefore( bHorizontalDockArea ? ( rMousePos.X() < nMiddle ) : ( rMousePos.Y() < nMiddle )); + if ( bInsertBefore ) + { + if ( bHorizontalDockArea ) + { + sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( aContainerWinSize.Width() - aWindowRect.Left() ), + sal_Int32( aTrackingRect.getWidth() ))); + if ( nSize == 0 ) + nSize = aWindowRect.getWidth(); + + aUIElementRect.SetSize( ::Size( nSize, aWindowRect.getHeight() )); + aWindowRect = implts_determineFrontDockingRect( eDockedArea, nRowCol, aWindowRect,rUIElement.m_aName, aUIElementRect ); + + // Set virtual position + rUIElement.m_aDockedData.m_aPos.X() = aWindowRect.Left(); + rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; + } + else + { + sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( + nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Top() ), + sal_Int32( aTrackingRect.getHeight() ))); + if ( nSize == 0 ) + nSize = aWindowRect.getHeight(); + + aUIElementRect.SetSize( ::Size( aWindowRect.getWidth(), nSize )); + aWindowRect = implts_determineFrontDockingRect( eDockedArea, nRowCol, aWindowRect, rUIElement.m_aName, aUIElementRect ); + + // Set virtual position + sal_Int32 nPosY = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( aWindowRect.TopLeft() )).Y(); + rUIElement.m_aDockedData.m_aPos.X() = nRowCol; + rUIElement.m_aDockedData.m_aPos.Y() = nPosY; + } + + rTrackingRect = aWindowRect; + return; + } + else + { + if ( bHorizontalDockArea ) + { + sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32(( aContainerWinSize.Width() ) - aWindowRect.Right() ), + sal_Int32( aTrackingRect.getWidth() ))); + if ( nSize == 0 ) + { + aUIElementRect.SetPos( ::Point( aContainerWinSize.Width() - aTrackingRect.getWidth(), aWindowRect.Top() )); + aUIElementRect.SetSize( ::Size( aTrackingRect.getWidth(), aWindowRect.getHeight() )); + rUIElement.m_aDockedData.m_aPos.X() = aUIElementRect.Left(); + } + else + { + aUIElementRect.SetPos( ::Point( aWindowRect.Right(), aWindowRect.Top() )); + aUIElementRect.SetSize( ::Size( nSize, aWindowRect.getHeight() )); + rUIElement.m_aDockedData.m_aPos.X() = aWindowRect.Right(); + } + + // Set virtual position + rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; + } + else + { + sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Bottom() ), + sal_Int32( aTrackingRect.getHeight() ))); + aUIElementRect.SetPos( ::Point( aWindowRect.Left(), aWindowRect.Bottom() )); + aUIElementRect.SetSize( ::Size( aWindowRect.getWidth(), nSize )); + + // Set virtual position + sal_Int32 nPosY( 0 ); + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + nPosY = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( aWindowRect.BottomRight() )).Y(); + } + rUIElement.m_aDockedData.m_aPos.X() = nRowCol; + rUIElement.m_aDockedData.m_aPos.Y() = nPosY; + } + + rTrackingRect = aUIElementRect; + return; + } + } + else + { + implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); + rTrackingRect = implts_calcTrackingAndElementRect( + eDockedArea, nRowCol, rUIElement, + aTrackingRect, aRowColumnRect, aContainerWinSize ); + return; + } + } + else + { + if ((( nRowCol == nMinRowCol ) && ( rDockingOperation == DOCKOP_BEFORE_COLROW )) || + (( nRowCol == nMaxRowCol ) && ( rDockingOperation == DOCKOP_AFTER_COLROW ))) + bOpOutsideOfDockingArea = sal_True; + else + { + // handle docking before/after a row + implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); + rTrackingRect = implts_calcTrackingAndElementRect( + eDockedArea, nRowCol, rUIElement, + aTrackingRect, aRowColumnRect, aContainerWinSize ); + + sal_Int32 nOffsetX( 0 ); + sal_Int32 nOffsetY( 0 ); + if ( bHorizontalDockArea ) + nOffsetY = sal_Int32( floor( aRowColumnRect.getHeight() / 2 + 0.5 )); + else + nOffsetX = sal_Int32( floor( aRowColumnRect.getWidth() / 2 + 0.5 )); + + if ( rDockingOperation == DOCKOP_BEFORE_COLROW ) + { + if (( eDockedArea == DockingArea_DOCKINGAREA_TOP ) || + ( eDockedArea == DockingArea_DOCKINGAREA_LEFT )) + { + // Docking before/after means move track rectangle half column/row. + // As left and top are ordered 0...n instead of right and bottom + // which uses n...0, we have to use negative values for top/left. + nOffsetX *= -1; + nOffsetY *= -1; + } + } + else + { + if (( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) || + ( eDockedArea == DockingArea_DOCKINGAREA_RIGHT )) + { + // Docking before/after means move track rectangle half column/row. + // As left and top are ordered 0...n instead of right and bottom + // which uses n...0, we have to use negative values for top/left. + nOffsetX *= -1; + nOffsetY *= -1; + } + nRowCol++; + } + + if ( bHorizontalDockArea ) + rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; + else + rUIElement.m_aDockedData.m_aPos.X() = nRowCol; + + rTrackingRect.Move( nOffsetX, nOffsetY ); + rTrackingRect.SetSize( aTrackingRect.GetSize() ); + } + } + } + } + + // Docking outside of our docking window area => + // Users want to dock before/after first/last docked element or to an empty docking area + if ( bOpOutsideOfDockingArea ) + { + // set correct size for docking + implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); + rTrackingRect = aTrackingRect; + + if ( bHorizontalDockArea ) + { + sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 ))); + if (( nPosX + rTrackingRect.getWidth()) > aContainerWinSize.Width() ) + nPosX = std::min( nPosX, + std::max( sal_Int32( aContainerWinSize.Width() - rTrackingRect.getWidth() ), + sal_Int32( 0 ))); + + sal_Int32 nSize = std::min( aContainerWinSize.Width(), rTrackingRect.getWidth() ); + sal_Int32 nDockHeight = std::max( static_cast(aDockingAreaRect.getHeight()), sal_Int32( 0 )); + if ( nDockHeight == 0 ) + { + sal_Int32 nPosY( std::max( aDockingAreaRect.Top(), aDockingAreaRect.Bottom() )); + if ( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) + nPosY -= rTrackingRect.getHeight(); + rTrackingRect.SetPos( Point( nPosX, nPosY )); + rUIElement.m_aDockedData.m_aPos.Y() = 0; + } + else if ( rMousePos.Y() < ( aDockingAreaRect.Top() + ( nDockHeight / 2 ))) + { + rTrackingRect.SetPos( Point( nPosX, aDockingAreaRect.Top() - rTrackingRect.getHeight() )); + if ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) + rUIElement.m_aDockedData.m_aPos.Y() = 0; + else + rUIElement.m_aDockedData.m_aPos.Y() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; + rDockingOperation = DOCKOP_BEFORE_COLROW; + } + else + { + rTrackingRect.SetPos( Point( nPosX, aDockingAreaRect.Bottom() )); + if ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) + rUIElement.m_aDockedData.m_aPos.Y() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; + else + rUIElement.m_aDockedData.m_aPos.Y() = 0; + rDockingOperation = DOCKOP_AFTER_COLROW; + } + rTrackingRect.setWidth( nSize ); + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + nPosX = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( rTrackingRect.TopLeft() )).X(); + } + rUIElement.m_aDockedData.m_aPos.X() = nPosX; + } + else + { + sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), + sal_Int32( nMaxLeftRightDockAreaSize )); + + sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); + if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) + nPosY = std::min( nPosY, + std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), + sal_Int32( nTopDockingAreaSize ))); + + sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast(aTrackingRect.getHeight()) ); + sal_Int32 nDockWidth = std::max( static_cast(aDockingAreaRect.getWidth()), sal_Int32( 0 )); + if ( nDockWidth == 0 ) + { + sal_Int32 nPosX( std::max( aDockingAreaRect.Left(), aDockingAreaRect.Right() )); + if ( eDockedArea == DockingArea_DOCKINGAREA_RIGHT ) + nPosX -= rTrackingRect.getWidth(); + rTrackingRect.SetPos( Point( nPosX, nPosY )); + rUIElement.m_aDockedData.m_aPos.X() = 0; + } + else if ( rMousePos.X() < ( aDockingAreaRect.Left() + ( nDockWidth / 2 ))) + { + rTrackingRect.SetPos( Point( aDockingAreaRect.Left() - rTrackingRect.getWidth(), nPosY )); + if ( eDockedArea == DockingArea_DOCKINGAREA_LEFT ) + rUIElement.m_aDockedData.m_aPos.X() = 0; + else + rUIElement.m_aDockedData.m_aPos.X() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; + rDockingOperation = DOCKOP_BEFORE_COLROW; + } + else + { + rTrackingRect.SetPos( Point( aDockingAreaRect.Right(), nPosY )); + if ( eDockedArea == DockingArea_DOCKINGAREA_LEFT ) + rUIElement.m_aDockedData.m_aPos.X() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; + else + rUIElement.m_aDockedData.m_aPos.X() = 0; + rDockingOperation = DOCKOP_AFTER_COLROW; + } + rTrackingRect.setHeight( nSize ); + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + nPosY = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( rTrackingRect.TopLeft() )).Y(); + } + rUIElement.m_aDockedData.m_aPos.Y() = nPosY; + } + } +} + +void LayoutManager::implts_renumberRowColumnData( + ::com::sun::star::ui::DockingArea eDockingArea, + DockingOperation /*eDockingOperation*/, + const UIElement& rUIElement ) +{ + ReadGuard aReadLock( m_aLock ); + Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + aReadLock.unlock(); + + sal_Bool bHorzDockingArea(( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); + sal_Int32 nRowCol( bHorzDockingArea ? rUIElement.m_aDockedData.m_aPos.Y() : + rUIElement.m_aDockedData.m_aPos.X() ); + + WriteGuard aWriteLock( m_aLock ); + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if (( pIter->m_aDockedData.m_nDockedArea == sal_Int16( eDockingArea )) && + ( pIter->m_aName != rUIElement.m_aName )) + { + // Don't change toolbars without a valid docking position! + if (( pIter->m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && + ( pIter->m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + continue; + + sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? + pIter->m_aDockedData.m_aPos.Y() : pIter->m_aDockedData.m_aPos.X(); + if ( nWindowRowCol >= nRowCol ) + { + if ( bHorzDockingArea ) + pIter->m_aDockedData.m_aPos.Y() += 1; + else + pIter->m_aDockedData.m_aPos.X() += 1; + } + } + } + aWriteLock.unlock(); + + // We have to change the persistent window state part + if ( xPersistentWindowState.is() ) + { + try + { + Sequence< rtl::OUString > aWindowElements = xPersistentWindowState->getElementNames(); + for ( sal_Int32 i = 0; i < aWindowElements.getLength(); i++ ) + { + if ( rUIElement.m_aName != aWindowElements[i] ) + { + try + { + Sequence< PropertyValue > aPropValueSeq; + css::awt::Point aDockedPos; + DockingArea nDockedArea( DockingArea_DOCKINGAREA_DEFAULT ); + + xPersistentWindowState->getByName( aWindowElements[i] ) >>= aPropValueSeq; + for ( sal_Int32 j = 0; j < aPropValueSeq.getLength(); j++ ) + { + if ( aPropValueSeq[j].Name == m_aPropDockingArea ) + aPropValueSeq[j].Value >>= nDockedArea; + else if ( aPropValueSeq[j].Name == m_aPropDockPos ) + aPropValueSeq[j].Value >>= aDockedPos; + } + + // Don't change toolbars without a valid docking position! + if (( aDockedPos.X == SAL_MAX_INT32 ) && ( aDockedPos.Y == SAL_MAX_INT32 )) + continue; + + sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? aDockedPos.Y : aDockedPos.X; + if (( nDockedArea == eDockingArea ) && ( nWindowRowCol >= nRowCol )) + { + if ( bHorzDockingArea ) + aDockedPos.Y += 1; + else + aDockedPos.X += 1; + + Reference< XNameReplace > xReplace( xPersistentWindowState, UNO_QUERY ); + xReplace->replaceByName( aWindowElements[i], makeAny( aPropValueSeq )); + } + } + catch ( Exception& ) + { + } + } + } + } + catch ( Exception& ) + { + } + } +} + +::Size LayoutManager::implts_getTopBottomDockingAreaSizes() +{ + ::Size aSize; + Reference< css::awt::XWindow > xTopDockingAreaWindow; + Reference< css::awt::XWindow > xBottomDockingAreaWindow; + + ReadGuard aReadLock( m_aLock ); + xTopDockingAreaWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; + xBottomDockingAreaWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; + aReadLock.unlock(); + + if ( xTopDockingAreaWindow.is() ) + aSize.Width() = xTopDockingAreaWindow->getPosSize().Height; + if ( xBottomDockingAreaWindow.is() ) + aSize.Height() = xBottomDockingAreaWindow->getPosSize().Height; + + return aSize; +} + +Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString& aName ) +{ + Reference< ::com::sun::star::ui::XUIElement > xUIElement; + + ReadGuard aReadLock( m_aLock ); + Sequence< PropertyValue > aPropSeq( 2 ); + aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); + aPropSeq[0].Value <<= m_xFrame; + aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" )); + aPropSeq[1].Value <<= sal_True; + + try + { + xUIElement = m_xUIElementFactoryManager->createUIElement( aName, aPropSeq ); + } + catch ( NoSuchElementException& ) + { + } + catch ( IllegalArgumentException& ) + { + } + + return xUIElement; +} + +Reference< css::awt::XWindowPeer > LayoutManager::implts_createToolkitWindow( const Reference< css::awt::XWindowPeer >& rParent ) +{ + Reference< css::awt::XWindowPeer > xPeer; + css::uno::Reference< css::awt::XToolkit > xToolkit( m_xSMGR->createInstance( SERVICENAME_VCLTOOLKIT ), css::uno::UNO_QUERY ); + if ( xToolkit.is() ) + { + // describe window properties. + css::awt::WindowDescriptor aDescriptor; + aDescriptor.Type = css::awt::WindowClass_SIMPLE ; + aDescriptor.WindowServiceName = DECLARE_ASCII("dockingarea") ; + aDescriptor.ParentIndex = -1 ; + aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >( rParent, UNO_QUERY ) ; + aDescriptor.Bounds = css::awt::Rectangle(0,0,0,0) ; + aDescriptor.WindowAttributes = 0 ; + + // create a docking area window + xPeer = xToolkit->createWindow( aDescriptor ); + } + + return xPeer; +} + +void LayoutManager::implts_setVisibleState( sal_Bool bShow ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + pIter->m_bMasterHide = !bShow; + m_aStatusBarElement.m_bMasterHide = !bShow; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + implts_updateUIElementsVisibleState( bShow ); + //implts_doLayout( sal_False ); +} + +void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) +{ + // notify listeners + css::uno::Any a; + if ( bSetVisible ) + implts_notifyListeners( css::frame::LayoutManagerEvents::VISIBLE, a ); + else + implts_notifyListeners( css::frame::LayoutManagerEvents::INVISIBLE, a ); + std::vector< Reference< css::awt::XWindow > > aWinVector; + sal_Bool bOld; + + { + WriteGuard aWriteLock( m_aLock ); + m_bDoLayout = sal_True; + bOld = m_bDoLayout; + } + + ReadGuard aReadLock( m_aLock ); + aWinVector.reserve(m_aUIElements.size()); + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + if ( xWindow.is() ) + { + if ( bSetVisible ) + { + if ( pIter->m_bVisible && !pIter->m_bMasterHide ) + aWinVector.push_back( xWindow ); + } + else + aWinVector.push_back( xWindow ); + } + } + } + + aReadLock.unlock(); + + try + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + const sal_uInt32 nCount = aWinVector.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + Reference< css::awt::XWindow > xWindow( aWinVector[i] ); + if ( xWindow.is() ) + { + // we need VCL here to pass special flags to Show() + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if( pWindow ) + pWindow->Show( bSetVisible, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + } + } + } + catch ( DisposedException& ) + { + } + + // Hide/show menubar according to bSetVisible + aReadLock.lock(); + Reference< XUIElement > xMenuBar( m_xMenuBar, UNO_QUERY ); + Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< XComponent > xInplaceMenuBar( m_xInplaceMenuBar ); + MenuBarManager* pInplaceMenuBar( m_pInplaceMenuBar ); + aReadLock.unlock(); + + if (( xMenuBar.is() || xInplaceMenuBar.is() ) && xContainerWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + MenuBar* pMenuBar( 0 ); + if ( xInplaceMenuBar.is() ) + pMenuBar = (MenuBar *)pInplaceMenuBar->GetMenuBar(); + else + { + MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, xMenuBar.get() ); + pMenuBar = (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar(); + } + + Window* pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow ) + { + SystemWindow* pSysWindow = (SystemWindow *)pWindow; + if ( bSetVisible ) + pSysWindow->SetMenuBar( pMenuBar ); + else + pSysWindow->SetMenuBar( 0 ); + } + } + + // Hide/show the statusbar according to bSetVisible + if ( bSetVisible ) + implts_showStatusBar(); + else + implts_hideStatusBar(); + + if ( !bOld ) + { + WriteGuard aWriteLock( m_aLock ); + m_bDoLayout = sal_False; + } + + if ( bSetVisible ) + { + implts_createNonContextSensitiveToolBars(); + implts_doLayout_notify( sal_False ); + } + else + { + // Set docking area window size to zero + ReadGuard aReadLock2( m_aLock ); + Reference< css::awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; + Reference< css::awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; + Reference< css::awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; + Reference< css::awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; + aReadLock2.unlock(); + + try + { + if ( xTopDockingWindow.is() ) + xTopDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); + if ( xLeftDockingWindow.is() ) + xLeftDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); + if ( xRightDockingWindow.is() ) + xRightDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); + if ( xBottomDockingWindow.is() ) + xBottomDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); + + WriteGuard aWriteLock( m_aLock ); + m_aDockingArea = css::awt::Rectangle(); + m_bMustDoLayout = sal_True; + aWriteLock.unlock(); + } + catch ( Exception& ) + { + } + } +} + +void LayoutManager::implts_setCurrentUIVisibility( sal_Bool bShow ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( !bShow && pIter->m_bVisible && pIter->m_xUIElement.is() ) + pIter->m_bMasterHide = true; + else if ( bShow && pIter->m_bMasterHide ) + pIter->m_bMasterHide = false; + } + + if ( !bShow && m_aStatusBarElement.m_bVisible && m_aStatusBarElement.m_xUIElement.is() ) + m_aStatusBarElement.m_bMasterHide = true; + else if ( bShow && m_aStatusBarElement.m_bVisible ) + m_aStatusBarElement.m_bMasterHide = false; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + implts_updateUIElementsVisibleState( bShow ); +} + +void LayoutManager::implts_destroyStatusBar() +{ + Reference< XComponent > xCompStatusBar; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_aStatusBarElement.m_aName = rtl::OUString(); + xCompStatusBar = Reference< XComponent >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); + m_aStatusBarElement.m_xUIElement.clear(); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( xCompStatusBar.is() ) + xCompStatusBar->dispose(); + + implts_destroyProgressBar(); +} + +void LayoutManager::implts_createStatusBar( const rtl::OUString& aStatusBarName ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + if ( !m_aStatusBarElement.m_xUIElement.is() ) + { + implts_readStatusBarState( aStatusBarName ); + m_aStatusBarElement.m_aName = aStatusBarName; + m_aStatusBarElement.m_xUIElement = implts_createElement( aStatusBarName ); + } + + implts_createProgressBar(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +void LayoutManager::implts_readStatusBarState( const rtl::OUString& rStatusBarName ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + if ( !m_aStatusBarElement.m_bStateRead ) + { + // Read persistent data for status bar if not yet read! + if ( implts_readWindowStateData( rStatusBarName, m_aStatusBarElement )) + m_aStatusBarElement.m_bStateRead = sal_True; + } + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +void LayoutManager::implts_createProgressBar() +{ + Reference< XUIElement > xStatusBar; + Reference< XUIElement > xProgressBar; + Reference< XUIElement > xProgressBarBackup; + Reference< css::awt::XWindow > xContainerWindow; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); + xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); + xProgressBarBackup = m_xProgressBarBackup; + m_xProgressBarBackup.clear(); + xContainerWindow = m_xContainerWindow; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + sal_Bool bRecycled = xProgressBarBackup.is(); + ProgressBarWrapper* pWrapper = 0; + if ( bRecycled ) + pWrapper = (ProgressBarWrapper*)xProgressBarBackup.get(); + else if ( xProgressBar.is() ) + pWrapper = (ProgressBarWrapper*)xProgressBar.get(); + else + pWrapper = new ProgressBarWrapper(); + + if ( xStatusBar.is() ) + { + Reference< css::awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); + pWrapper->setStatusBar( xWindow ); + } + else + { + Reference< css::awt::XWindow > xStatusBarWindow = pWrapper->getStatusBar(); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pStatusBarWnd = VCLUnoHelper::GetWindow( xStatusBarWindow ); + if ( !pStatusBarWnd ) + { + Window* pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + if ( pWindow ) + { + StatusBar* pStatusBar = new StatusBar( pWindow, WinBits( WB_LEFT | WB_3DLOOK ) ); + Reference< css::awt::XWindow > xStatusBarWindow2( VCLUnoHelper::GetInterface( pStatusBar )); + pWrapper->setStatusBar( xStatusBarWindow2, sal_True ); + } + } + } + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aWriteLock.lock(); + m_aProgressBarElement.m_xUIElement = Reference< XUIElement >( + static_cast< cppu::OWeakObject* >( pWrapper ), UNO_QUERY ); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( bRecycled ) + implts_showProgressBar(); +} + +void LayoutManager::implts_backupProgressBarWrapper() +{ + // SAFE -> ---------------------------------- + WriteGuard aWriteLock(m_aLock); + + if (m_xProgressBarBackup.is()) + return; + + // safe a backup copy of the current progress! + // This copy will be used automaticly inside createProgressBar() which is called + // implictly from implts_doLayout() .-) + m_xProgressBarBackup = m_aProgressBarElement.m_xUIElement; + + // remove the relation between this old progress bar and our old status bar. + // Otherwhise we work on disposed items ... + // The internal used ProgressBarWrapper can handle a NULL reference. + if ( m_xProgressBarBackup.is() ) + { + ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)m_xProgressBarBackup.get(); + if ( pWrapper ) + pWrapper->setStatusBar( Reference< css::awt::XWindow >(), sal_False ); + } + + // prevent us from dispose() the m_aProgressBarElement.m_xUIElement inside implts_reset() + m_aProgressBarElement.m_xUIElement.clear(); + + aWriteLock.unlock(); + // <- SAFE ---------------------------------- +} + +void LayoutManager::implts_destroyProgressBar() +{ + // dont remove the progressbar in general + // We must reuse it if a new status bar is created later. + // Of course there exists one backup only. + // And further this backup will be released inside our dtor. + implts_backupProgressBarWrapper(); +} + +void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Size& rSize ) +{ + Reference< XUIElement > xStatusBar; + Reference< XUIElement > xProgressBar; + Reference< css::awt::XWindow > xContainerWindow; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); + xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); + xContainerWindow = m_xContainerWindow; + + Reference< css::awt::XWindow > xWindow; + if ( xStatusBar.is() ) + xWindow = Reference< css::awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); + else if ( xProgressBar.is() ) + { + ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); + if ( pWrapper ) + xWindow = pWrapper->getStatusBar(); + } + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( xWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pParentWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pParentWindow && ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR )) + { + Window* pOldParentWindow = pWindow->GetParent(); + if ( pParentWindow != pOldParentWindow ) + pWindow->SetParent( pParentWindow ); + ((StatusBar *)pWindow)->SetPosSizePixel( rPos, rSize ); + } + } +} + +sal_Bool LayoutManager::implts_showProgressBar() +{ + Reference< XUIElement > xStatusBar; + Reference< XUIElement > xProgressBar; + Reference< css::awt::XWindow > xWindow; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); + xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); + sal_Bool bVisible( m_bVisible ); + + m_aProgressBarElement.m_bVisible = sal_True; + if ( bVisible ) + { + if ( xStatusBar.is() && !m_aStatusBarElement.m_bMasterHide ) + { + xWindow = Reference< css::awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); + } + else if ( xProgressBar.is() ) + { + ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); + if ( pWrapper ) + xWindow = pWrapper->getStatusBar(); + } + } + aWriteLock.unlock(); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + { + if ( !pWindow->IsVisible() ) + { + pWindow->Show(); + implts_doLayout_notify( sal_False ); + } + return sal_True; + } + + return sal_False; +} + +sal_Bool LayoutManager::implts_hideProgressBar() +{ + Reference< XUIElement > xProgressBar; + Reference< css::awt::XWindow > xWindow; + sal_Bool bHideStatusBar( sal_False ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); + + sal_Bool bInternalStatusBar( sal_False ); + if ( xProgressBar.is() ) + { + Reference< css::awt::XWindow > xStatusBar; + ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); + if ( pWrapper ) + xWindow = pWrapper->getStatusBar(); + Reference< css::ui::XUIElement > xStatusBarElement = m_aStatusBarElement.m_xUIElement; + if ( xStatusBarElement.is() ) + xStatusBar = Reference< css::awt::XWindow >( xStatusBarElement->getRealInterface(), UNO_QUERY ); + bInternalStatusBar = xStatusBar != xWindow; + } + m_aProgressBarElement.m_bVisible = sal_False; + implts_readStatusBarState( m_aStatusBarAlias ); + bHideStatusBar = !m_aStatusBarElement.m_bVisible; + aWriteLock.unlock(); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() && + ( bHideStatusBar || bInternalStatusBar )) + { + pWindow->Hide(); + implts_doLayout_notify( sal_False ); + return sal_True; + } + + return sal_False; +} + +sal_Bool LayoutManager::implts_showStatusBar( sal_Bool bStoreState ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + Reference< css::ui::XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; + if ( bStoreState ) + m_aStatusBarElement.m_bVisible = sal_True; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( xStatusBar.is() ) + { + Reference< css::awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && !pWindow->IsVisible() ) + { + pWindow->Show(); + return sal_True; + } + } + + return sal_False; +} + +sal_Bool LayoutManager::implts_hideStatusBar( sal_Bool bStoreState ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + Reference< css::ui::XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; + if ( bStoreState ) + m_aStatusBarElement.m_bVisible = sal_False; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( xStatusBar.is() ) + { + Reference< css::awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() ) + { + pWindow->Hide(); + return sal_True; + } + } + + return sal_False; +} + +void LayoutManager::implts_setInplaceMenuBar( const Reference< XIndexAccess >& xMergedMenuBar ) +throw (::com::sun::star::uno::RuntimeException) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + if ( !m_bInplaceMenuSet ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + // Reset old inplace menubar! + m_pInplaceMenuBar = 0; + if ( m_xInplaceMenuBar.is() ) + m_xInplaceMenuBar->dispose(); + m_xInplaceMenuBar.clear(); + m_bInplaceMenuSet = sal_False; + + if ( m_xFrame.is() && + m_xContainerWindow.is() ) + { + rtl::OUString aModuleIdentifier; + Reference< XDispatchProvider > xDispatchProvider; + + MenuBar* pMenuBar = new MenuBar; + m_pInplaceMenuBar = new MenuBarManager( m_xSMGR, m_xFrame, m_xURLTransformer,xDispatchProvider, aModuleIdentifier, pMenuBar, sal_True, sal_True ); + m_pInplaceMenuBar->SetItemContainer( xMergedMenuBar ); + + Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow ) + { + SystemWindow* pSysWindow = (SystemWindow *)pWindow; + pSysWindow->SetMenuBar( pMenuBar ); + } + + m_bInplaceMenuSet = sal_True; + m_xInplaceMenuBar = Reference< XComponent >( (OWeakObject *)m_pInplaceMenuBar, UNO_QUERY ); + } + + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + implts_updateMenuBarClose(); + } + +} + +void LayoutManager::implts_resetInplaceMenuBar() +throw (::com::sun::star::uno::RuntimeException) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bInplaceMenuSet = sal_False; + + // if ( m_xMenuBar.is() && + if ( m_xContainerWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, m_xMenuBar.get() ); + Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow ) + { + SystemWindow* pSysWindow = (SystemWindow *)pWindow; + if ( pMenuBarWrapper ) + pSysWindow->SetMenuBar( (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar() ); + else + pSysWindow->SetMenuBar( 0 ); + } + } + + // Remove inplace menu bar + m_pInplaceMenuBar = 0; + if ( m_xInplaceMenuBar.is() ) + m_xInplaceMenuBar->dispose(); + m_xInplaceMenuBar.clear(); + + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +void SAL_CALL LayoutManager::attachFrame( const Reference< XFrame >& xFrame ) +throw (::com::sun::star::uno::RuntimeException) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_xFrame = xFrame; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + // if ( xFrame.is() ) + // xFrame->getContainerWindow()->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); +} + +void SAL_CALL LayoutManager::reset() +throw (RuntimeException) +{ + sal_Bool bComponentAttached( sal_False ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + bComponentAttached = m_bComponentAttached; + aReadLock.unlock(); + + implts_reset( sal_True ); +} + +void SAL_CALL LayoutManager::setInplaceMenuBar( sal_Int64 ) +throw (::com::sun::star::uno::RuntimeException) +{ + OSL_ENSURE( sal_False, "This method is obsolete and should not be used!\n" ); +} + +void SAL_CALL LayoutManager::resetInplaceMenuBar() +throw (::com::sun::star::uno::RuntimeException) +{ + OSL_ENSURE( sal_False, "This method is obsolete and should not be used!\n" ); +} + +//--------------------------------------------------------------------------------------------------------- +// XMenuBarMergingAcceptor +//--------------------------------------------------------------------------------------------------------- +sal_Bool SAL_CALL LayoutManager::setMergedMenuBar( + const Reference< XIndexAccess >& xMergedMenuBar ) +throw (::com::sun::star::uno::RuntimeException) +{ + implts_setInplaceMenuBar( xMergedMenuBar ); + + css::uno::Any a; + implts_notifyListeners( css::frame::LayoutManagerEvents::MERGEDMENUBAR, a ); + return sal_True; +} + +void SAL_CALL LayoutManager::removeMergedMenuBar() +throw (::com::sun::star::uno::RuntimeException) +{ + implts_resetInplaceMenuBar(); +} + +::com::sun::star::awt::Rectangle SAL_CALL LayoutManager::getCurrentDockingArea() +throw ( RuntimeException ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + return m_aDockingArea; +} + +Reference< XDockingAreaAcceptor > SAL_CALL LayoutManager::getDockingAreaAcceptor() +throw (::com::sun::star::uno::RuntimeException) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + return m_xDockingAreaAcceptor; +} + +void SAL_CALL LayoutManager::setDockingAreaAcceptor( const Reference< ::com::sun::star::ui::XDockingAreaAcceptor >& xDockingAreaAcceptor ) +throw ( RuntimeException ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + if (( m_xDockingAreaAcceptor == xDockingAreaAcceptor ) || + !m_xFrame.is() ) + return; + + // IMPORTANT: Be sure to stop layout timer if don't have a docking area acceptor! + if ( !xDockingAreaAcceptor.is() ) + m_aAsyncLayoutTimer.Stop(); + + sal_Bool bAutomaticToolbars( m_bAutomaticToolbars ); + std::vector< Reference< css::awt::XWindow > > oldDockingAreaWindows; + + if ( !xDockingAreaAcceptor.is() ) + m_aAsyncLayoutTimer.Stop(); + + // Remove listener from old docking area acceptor + if ( m_xDockingAreaAcceptor.is() ) + { + Reference< css::awt::XWindow > xWindow( m_xDockingAreaAcceptor->getContainerWindow() ); + if ( xWindow.is() && ( m_xFrame->getContainerWindow() != m_xContainerWindow || !xDockingAreaAcceptor.is() ) ) + xWindow->removeWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); + + oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] ); + oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] ); + oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] ); + oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] ); + + m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP].clear(); + m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM].clear(); + m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT].clear(); + m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT].clear(); + m_aDockingArea = css::awt::Rectangle(); + + Window* pContainerWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pContainerWindow ) + pContainerWindow->RemoveChildEventListener( LINK( this, LayoutManager, WindowEventListener ) ); + + // destroy panel manager + delete m_pPanelManager; + m_pPanelManager = NULL; + } + + // Set new docking area acceptor and add ourself as window listener on the container window. + // Create our docking area windows which are parents for all docked windows. + css::uno::Reference< css::awt::XWindow > xTopDockWindow; + css::uno::Reference< css::awt::XWindow > xBottomDockWindow; + css::uno::Reference< css::awt::XWindow > xLeftDockWindow; + css::uno::Reference< css::awt::XWindow > xRightDockWindow; + + Reference< ::com::sun::star::ui::XDockingAreaAcceptor > xOldDockingAreaAcceptor( m_xDockingAreaAcceptor ); + m_xDockingAreaAcceptor = xDockingAreaAcceptor; + if ( m_xDockingAreaAcceptor.is() ) + { + m_aDockingArea = css::awt::Rectangle(); + m_xContainerWindow = m_xDockingAreaAcceptor->getContainerWindow(); + m_xContainerTopWindow.set( m_xContainerWindow, UNO_QUERY ); + m_xContainerWindow->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + + // we always must keep a connection to the window of our frame for resize events + if ( m_xContainerWindow != m_xFrame->getContainerWindow() ) + m_xFrame->getContainerWindow()->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + + // #i37884# set initial visibility state - in the plugin case the container window is already shown + // and we get no notification anymore + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + if( pContainerWindow ) + m_bParentWindowVisible = pContainerWindow->IsVisible(); + } + + css::uno::Reference< css::awt::XWindowPeer > xParent( m_xContainerWindow, UNO_QUERY ); + xTopDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); + xBottomDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); + xLeftDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); + xRightDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); + m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] = xTopDockWindow; + m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] = xBottomDockWindow; + m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] = xLeftDockWindow; + m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] = xRightDockWindow; + + // create new panel manager + m_pPanelManager = new PanelManager( m_xSMGR, m_xFrame ); + m_pPanelManager->createPanels(); + } + + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( xDockingAreaAcceptor.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + ::DockingAreaWindow* pWindow; + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xTopDockWindow ) ); + if( pWindow ) pWindow->SetAlign( WINDOWALIGN_TOP ); + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xBottomDockWindow ) ); + if( pWindow ) pWindow->SetAlign( WINDOWALIGN_BOTTOM ); + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xLeftDockWindow ) ); + if( pWindow ) pWindow->SetAlign( WINDOWALIGN_LEFT ); + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xRightDockWindow ) ); + if( pWindow ) pWindow->SetAlign( WINDOWALIGN_RIGHT ); + + // Add layout manager as listener to get notifications about toolbar button activties + Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + if ( pContainerWindow ) + pContainerWindow->AddChildEventListener( LINK( this, LayoutManager, WindowEventListener ) ); + + // We have now a new container window, reparent all child windows! + implts_reparentChildWindows(); + } + else + implts_destroyElements(); // remove all elements + + if ( !oldDockingAreaWindows.empty() ) + { + const sal_uInt32 nCount = oldDockingAreaWindows.size(); + for ( sal_uInt32 i = 0; i < nCount; ++i ) + { + if ( oldDockingAreaWindows[i].is() ) + { + try + { + oldDockingAreaWindows[i]->dispose(); + } + catch ( Exception& ) + { + } + } + } + + // Reset docking area size for our old docking area acceptor + css::awt::Rectangle aEmptyRect; + xOldDockingAreaAcceptor->setDockingAreaSpace( aEmptyRect ); + } + + if ( xDockingAreaAcceptor.is() ) + { + if ( bAutomaticToolbars ) + { + implts_createAddonsToolBars(); // create addon toolbars + implts_createCustomToolBars(); // create custom toolbars + implts_createNonContextSensitiveToolBars(); + } + implts_sortUIElements(); + implts_doLayout( sal_True, sal_False ); + } +} + +void LayoutManager::implts_reparentChildWindows() +{ + UIElementVector aUIElementVector; + UIElement aStatusBarElement; + css::uno::Reference< css::awt::XWindow > xTopDockWindow; + css::uno::Reference< css::awt::XWindow > xBottomDockWindow; + css::uno::Reference< css::awt::XWindow > xLeftDockWindow; + css::uno::Reference< css::awt::XWindow > xRightDockWindow; + css::uno::Reference< css::awt::XWindow > xContainerWindow; + css::uno::Reference< css::awt::XWindow > xStatusBarWindow; + + WriteGuard aWriteLock( m_aLock ); + aUIElementVector = m_aUIElements; + xTopDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; + xBottomDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; + xLeftDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; + xRightDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; + xContainerWindow = m_xContainerWindow; + aStatusBarElement = m_aStatusBarElement; + aWriteLock.unlock(); + + if ( aStatusBarElement.m_xUIElement.is() ) + { + try + { + xStatusBarWindow = Reference< css::awt::XWindow >( + aStatusBarElement.m_xUIElement->getRealInterface(), + UNO_QUERY ); + } + catch ( RuntimeException& ) + { + throw; + } + catch ( Exception& ) + { + } + } + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + Window* pTopDockWindow = VCLUnoHelper::GetWindow( xTopDockWindow ); + Window* pBottomDockWindow = VCLUnoHelper::GetWindow( xBottomDockWindow ); + Window* pLeftDockWindow = VCLUnoHelper::GetWindow( xLeftDockWindow ); + Window* pRightDockWindow = VCLUnoHelper::GetWindow( xRightDockWindow ); + if ( pContainerWindow ) + { + UIElementVector::iterator pIter; + for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) + { + Reference< XUIElement > xUIElement( pIter->m_xUIElement ); + if ( xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow; + try + { + // We have to retreive the window reference with try/catch as it is + // possible that all elements has been disposed! + xWindow = Reference< css::awt::XWindow >( xUIElement->getRealInterface(), UNO_QUERY ); + } + catch ( RuntimeException& ) + { + throw; + } + catch ( Exception& ) + { + } + + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + { + // Reparent our child windows acording to their current state. + if ( pIter->m_bFloating ) + pWindow->SetParent( pContainerWindow ); + else + { + if ( pIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_TOP ) + pWindow->SetParent( pTopDockWindow ); + else if ( pIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) + pWindow->SetParent( pBottomDockWindow ); + else if ( pIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_LEFT ) + pWindow->SetParent( pLeftDockWindow ); + else + pWindow->SetParent( pRightDockWindow ); + } + } + } + } + + if ( xStatusBarWindow.is() ) + { + Window* pWindow = VCLUnoHelper::GetWindow( xStatusBarWindow ); + if ( pWindow ) + pWindow->SetParent( pContainerWindow ); + } + + implts_resetMenuBar(); + } +} + +uno::Reference< ui::XUIElement > LayoutManager::implts_createDockingWindow( const ::rtl::OUString& aElementName ) +{ + Reference< XUIElement > xUIElement = implts_createElement( aElementName ); + return xUIElement; +} + +IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) +{ + // To enable toolbar controllers to change their image when a sub-toolbar function + // is activated, we need this mechanism. We have NO connection between these toolbars + // anymore! + if ( pEvent && pEvent->ISA( VclWindowEvent )) + { + if ( pEvent->GetId() == VCLEVENT_TOOLBOX_SELECT ) + { + Window* pWindow( ((VclWindowEvent*)pEvent)->GetWindow() ); + ToolBox* pToolBox( 0 ); + rtl::OUString aToolbarName; + rtl::OUString aCommand; + + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + pToolBox = (ToolBox *)pWindow; + aToolbarName = pToolBox->GetSmartHelpId().GetStr(); + sal_Int32 i = aToolbarName.lastIndexOf( ':' ); + if (( aToolbarName.getLength() > 0 ) && + ( i > 0 ) && (( i+ 1 ) < aToolbarName.getLength() )) + { + // Remove ".HelpId:" protocol from toolbar name + aToolbarName = aToolbarName.copy( i+1 ); + + USHORT nId = pToolBox->GetCurItemId(); + if ( nId > 0 ) + aCommand = pToolBox->GetItemCommand( nId ); + } + } + + if (( aToolbarName.getLength() > 0 ) && ( aCommand.getLength() > 0 )) + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + std::vector< css::uno::Reference< css::ui::XUIFunctionListener > > aListenerArray; + UIElementVector::iterator pIter; + + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aType.equalsAscii( "toolbar" ) && + pIter->m_xUIElement.is() ) + { + css::uno::Reference< css::ui::XUIFunctionListener > xListener( pIter->m_xUIElement, UNO_QUERY ); + if ( xListener.is() ) + aListenerArray.push_back( xListener ); + } + } + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + const sal_uInt32 nCount = aListenerArray.size(); + for ( sal_uInt32 i = 0; i < nCount; ++i ) + { + try + { + aListenerArray[i]->functionExecute( aToolbarName, aCommand ); + } + catch ( RuntimeException& e ) + { + throw e; + } + catch ( Exception& ) {} + } + } + } + else if ( pEvent->GetId() == VCLEVENT_TOOLBOX_FORMATCHANGED ) + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + + Window* pWindow( ((VclWindowEvent*)pEvent)->GetWindow() ); + ToolBox* pToolBox( 0 ); + rtl::OUString aToolbarName; + + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + pToolBox = (ToolBox *)pWindow; + aToolbarName = pToolBox->GetSmartHelpId().GetStr(); + if (( aToolbarName.getLength() > 0 ) && ( m_nLockCount == 0 )) + m_aAsyncLayoutTimer.Start(); + } + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + } + + return 1; +} + +void SAL_CALL LayoutManager::createElement( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::createElement" ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + Reference< XFrame > xFrame = m_xFrame; + Reference< XURLTransformer > xURLTransformer = m_xURLTransformer; + sal_Bool bInPlaceMenu = m_bInplaceMenuSet; + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( !xFrame.is() ) + return; + + Reference< XModel > xModel( impl_getModelFromFrame( xFrame ) ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + sal_Bool bFound( sal_False ); + sal_Bool bNotify( sal_False ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + Reference< ::com::sun::star::ui::XUIElement > xUIElement; + + implts_findElement( aName, aElementType, aElementName, xUIElement ); + bFound = xUIElement.is(); + + if ( /*xFrame.is() && */m_xContainerWindow.is() && !implts_isPreviewModel( xModel ) ) // no bars on preview mode + { + if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + { + if ( !bFound ) + { + SvtCommandOptions aCmdOptions; + + xUIElement = implts_createElement( aName ); + sal_Bool bVisible( sal_False ); + if ( xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), UNO_QUERY ); + if ( xDockWindow.is() && xWindow.is() ) + { + try + { + xDockWindow->addDockableWindowListener( Reference< css::awt::XDockableWindowListener >( + static_cast< OWeakObject * >( this ), UNO_QUERY )); + xWindow->addWindowListener( Reference< css::awt::XWindowListener >( + static_cast< OWeakObject * >( this ), UNO_QUERY )); + xDockWindow->enableDocking( sal_True ); + } + catch ( Exception& ) + { + } + } + + UIElement& rElement = impl_findElement( aName ); + if ( rElement.m_aName.getLength() > 0 ) + { + // Reuse a local entry so we are able to use the latest + // UI changes for this document. + implts_setElementData( rElement, xDockWindow ); + rElement.m_xUIElement = xUIElement; + bVisible = rElement.m_bVisible; + } + else + { + // Create new UI element and try to read its state data + UIElement aNewToolbar( aName, aElementType, xUIElement ); + implts_readWindowStateData( aName, aNewToolbar ); + implts_setElementData( aNewToolbar, xDockWindow ); + implts_insertUIElement( aNewToolbar ); + bVisible = aNewToolbar.m_bVisible; + } + + // set toolbar menu style according to customize command state + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolbar = (ToolBox *)pWindow; + USHORT nMenuType = pToolbar->GetMenuType(); + if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, m_aCustomizeCmd )) + pToolbar->SetMenuType( nMenuType & ~TOOLBOX_MENUTYPE_CUSTOMIZE ); + else + pToolbar->SetMenuType( nMenuType | TOOLBOX_MENUTYPE_CUSTOMIZE ); + } + } + aWriteLock.unlock(); + + implts_sortUIElements(); + + if ( bVisible ) + { + doLayout(); + bNotify = sal_True; + } + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" )) + { + if ( aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ) && !bInPlaceMenu ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + // PB 2004-12-15 #i38743# don't create a menubar if frame isn't top + if ( !m_xMenuBar.is() && implts_isFrameOrWindowTop(xFrame) ) + m_xMenuBar = implts_createElement( aName ); + + if ( m_xMenuBar.is() && implts_isFrameOrWindowTop(xFrame) ) + { + Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow ) + { + SystemWindow* pSysWindow = (SystemWindow *)pWindow; + Reference< css::awt::XMenuBar > xMenuBar; + + Reference< XPropertySet > xPropSet( m_xMenuBar, UNO_QUERY ); + if ( xPropSet.is() ) + { + try + { + xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar; + } + catch ( com::sun::star::beans::UnknownPropertyException ) + { + } + catch ( com::sun::star::lang::WrappedTargetException ) + { + } + } + + if ( xMenuBar.is() ) + { + VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); + if ( pAwtMenuBar ) + { + MenuBar* pMenuBar = (MenuBar*)pAwtMenuBar->GetMenu(); + if ( pMenuBar ) + { + pSysWindow->SetMenuBar( pMenuBar ); + pMenuBar->SetDisplayable( m_bMenuVisible ); + if ( m_bMenuVisible ) + { + bNotify = sal_True; + } + implts_updateMenuBarClose(); + } + } + } + } + } + } + aWriteLock.unlock(); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && ( implts_isFrameOrWindowTop(xFrame) || implts_isEmbeddedLayoutManager() )) + { + implts_createStatusBar( aName ); + bNotify = sal_True; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) && + implts_isFrameOrWindowTop(xFrame) ) + { + implts_createProgressBar(); + bNotify = sal_True; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + aWriteLock.unlock(); + + aWriteLock.unlock(); + + // Add layout manager as listener for docking and other window events + Reference< css::uno::XInterface > xThis( static_cast< OWeakObject* >(this), css::uno::UNO_QUERY ); + xUIElement = implts_createDockingWindow( aName ); + if ( xUIElement.is() ) + { + impl_addWindowListeners( xThis, xUIElement ); + m_pPanelManager->addDockingWindow( aName, xUIElement ); + } + + // The docking window is created by a factory method located in the sfx2 library. +// CreateDockingWindow( xFrame, aElementName ); + } + } + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + if ( bNotify ) + { + // UI element is invisible - provide information to listeners + implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) ); + } +} + +void SAL_CALL LayoutManager::destroyElement( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::destroyElement" ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + sal_Bool bMustLayouted( sal_False ); + sal_Bool bMustBeDestroyed( sal_False ); + sal_Bool bMustBeSorted( sal_False ); + sal_Bool bNotify( sal_False ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + + Reference< XComponent > xComponent; + if ( impl_parseResourceURL( aName, aElementType, aElementName )) + { + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + { + if ( !m_bInplaceMenuSet ) + { + impl_clearUpMenuBar(); + m_xMenuBar.clear(); + bNotify = sal_True; + } + } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || + ( m_aStatusBarElement.m_aName == aName )) + { + aWriteLock.unlock(); + implts_destroyStatusBar(); + bMustLayouted = sal_True; + bNotify = sal_True; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) ) + { + aWriteLock.unlock(); + implts_createProgressBar(); + bMustLayouted = sal_True; + bNotify = sal_True; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + { + UIElementVector::iterator pIter; + + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName ) + { + xComponent.set( pIter->m_xUIElement, UNO_QUERY ); + Reference< XUIElement > xUIElement( pIter->m_xUIElement ); + if ( xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + + rtl::OUString aAddonTbResourceName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )); + if ( aName.indexOf( aAddonTbResourceName ) != 0 ) + { + try + { + if ( xWindow.is() ) + xWindow->removeWindowListener( Reference< css::awt::XWindowListener >( + static_cast< OWeakObject * >( this ), UNO_QUERY )); + } + catch( Exception& ) + { + } + + try + { + if ( xDockWindow.is() ) + xDockWindow->removeDockableWindowListener( Reference< css::awt::XDockableWindowListener >( + static_cast< OWeakObject * >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + + bMustBeDestroyed = sal_True; + } + else + { + pIter->m_bVisible = sal_False; + xWindow->setVisible( sal_False ); + bNotify = sal_True; + } + + if ( !xDockWindow->isFloating() ) + bMustLayouted = sal_True; + if ( bMustBeDestroyed ) + pIter->m_xUIElement.clear(); + + bMustBeSorted = sal_True; + } + + break; + } + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); + css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR ); + aWriteLock.unlock(); + + impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false ); + bMustLayouted = sal_False; + bNotify = sal_False; + } + } + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( bMustBeDestroyed ) + { + if ( xComponent.is() ) + xComponent->dispose(); + bNotify = sal_True; + } + + if ( bMustBeSorted ) + { + implts_sortUIElements(); + if ( bMustLayouted ) + doLayout(); + } + + if ( bNotify ) + { + // UI element is invisible - provide information to listeners + implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) ); + } +} + +::sal_Bool SAL_CALL LayoutManager::requestElement( const ::rtl::OUString& ResourceURL ) +throw (::com::sun::star::uno::RuntimeException) +{ + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::requestElement" ); + + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + UIElementVector::iterator pIter; + sal_Bool bResult( sal_False ); + sal_Bool bNotify( sal_False ); + + WriteGuard aWriteLock( m_aLock ); + if ( impl_parseResourceURL( ResourceURL, aElementType, aElementName )) + { + ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); + RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); + + if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || + ( m_aStatusBarElement.m_aName == ResourceURL )) + { + implts_readStatusBarState( ResourceURL ); + if ( m_aStatusBarElement.m_bVisible && !m_aStatusBarElement.m_bMasterHide ) + { + createElement( ResourceURL ); + + // There are some situation where we are not able to create an element. + // Therefore we have to check the reference before further action. + // See #i70019# + css::uno::Reference< css::ui::XUIElement > xUIElement( m_aStatusBarElement.m_xUIElement ); + if ( xUIElement.is() ) + { + // we need VCL here to pass special flags to Show() + vos::OGuard aGuard( Application::GetSolarMutex() ); + Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + { + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + doLayout(); + bResult = sal_True; + bNotify = sal_True; + } + } + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) ) + { + aWriteLock.unlock(); + implts_showProgressBar(); + doLayout(); + bResult = sal_True; + bNotify = sal_True; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + { + if ( m_bVisible ) + { + bool bFound( false ); + bool bShowElement( false ); + + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == ResourceURL ) + { + bFound = sal_True; + bShowElement = ( pIter->m_bVisible && !pIter->m_bMasterHide && m_bParentWindowVisible ); + + Reference< css::awt::XWindow2 > xContainerWindow( m_xContainerWindow, UNO_QUERY ); + if ( xContainerWindow.is() && pIter->m_bFloating ) + bShowElement = ( bShowElement && xContainerWindow->isActive() ); + + if ( pIter->m_xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + + if ( xDockWindow.is() && xDockWindow->isFloating() ) + bShowElement = ( bShowElement && xContainerWindow->isActive() ); + + if ( xDockWindow.is() && bShowElement ) + { + pIter->m_bVisible = sal_True; + aWriteLock.unlock(); + + // we need VCL here to pass special flags to Show() + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if( pWindow && !pWindow->IsReallyVisible() ) + { + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + implts_writeNewStateData( ResourceURL, xWindow ); + + if ( xDockWindow.is() && !xDockWindow->isFloating() ) + doLayout(); + bResult = sal_True; + bNotify = sal_True; + } + + bResult = sal_False; + } + } // if ( pIter->m_xUIElement.is() ) + break; + } + } + + // Create toolbar on demand when it's visible + if ( !bResult ) + { + Reference< ::com::sun::star::ui::XUIElement > xUIElement; + if ( !bFound ) + { + UIElement aNewToolbar( aElementName, aElementType, xUIElement ); + aNewToolbar.m_aName = ResourceURL; + implts_readWindowStateData( ResourceURL, aNewToolbar ); + implts_insertUIElement( aNewToolbar ); + aWriteLock.unlock(); + + implts_sortUIElements(); + if ( aNewToolbar.m_bVisible ) + createElement( ResourceURL ); + bResult = sal_True; + bNotify = sal_True; + } + else if ( bShowElement ) + { + aWriteLock.unlock(); + + createElement( ResourceURL ); + bResult = sal_True; + bNotify = sal_True; + } + } + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); + aWriteLock.unlock(); + + CreateDockingWindow( xFrame, aElementName ); + } + } + + if ( bNotify ) + { + // UI element is visible - provide information to listeners + implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( ResourceURL ) ); + } + + return bResult; +} + +Reference< XUIElement > SAL_CALL LayoutManager::getElement( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + Reference< XUIElement > xElement; + + implts_findElement( aName, aElementType, aElementName, xElement ); + return xElement; +} + +Sequence< Reference< ::com::sun::star::ui::XUIElement > > SAL_CALL LayoutManager::getElements() +throw (::com::sun::star::uno::RuntimeException) +{ + ReadGuard aReadLock( m_aLock ); + + sal_Bool bMenuBar( sal_False ); + sal_Bool bStatusBar( sal_False ); + sal_Int32 nSize = m_aUIElements.size(); + + if ( m_xMenuBar.is() ) + { + ++nSize; + bMenuBar = sal_True; + } + if ( m_aStatusBarElement.m_xUIElement.is() ) + { + ++nSize; + bStatusBar = sal_True; + } + + Sequence< Reference< ::com::sun::star::ui::XUIElement > > aSeq( nSize ); + + sal_Int32 nIndex = 0; + UIElementVector::const_iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_xUIElement.is() ) + aSeq[nIndex++] = pIter->m_xUIElement; + } + if ( bMenuBar ) + aSeq[nIndex++] = m_xMenuBar; + if ( bStatusBar ) + aSeq[nIndex++] = m_aStatusBarElement.m_xUIElement; + + // Resize sequence as we now know our correct size + aSeq.realloc( nIndex ); + + return aSeq; +} + +sal_Bool SAL_CALL LayoutManager::showElement( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::showElement" ); + + sal_Bool bResult( sal_False ); + sal_Bool bNotify( sal_False ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + + if ( impl_parseResourceURL( aName, aElementType, aElementName )) + { + ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); + RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); + + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + { + WriteGuard aWriteLock( m_aLock ); + m_bMenuVisible = sal_True; + aWriteLock.unlock(); + + bResult = implts_resetMenuBar(); + bNotify = bResult; + } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || + ( m_aStatusBarElement.m_aName == aName )) + { + WriteGuard aWriteLock( m_aLock ); + if ( m_aStatusBarElement.m_xUIElement.is() && + !m_aStatusBarElement.m_bMasterHide ) + { + if ( implts_showStatusBar( sal_True )) + { + implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); + doLayout(); + bResult = sal_True; + bNotify = sal_True; + } + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) + { + bNotify = bResult = implts_showProgressBar(); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + { + UIElementVector::iterator pIter; + + WriteGuard aWriteLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) + { + UIElement aUIElement = *pIter; + Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + + sal_Bool bShowElement( !pIter->m_bMasterHide && m_bParentWindowVisible ); + + pIter->m_bVisible = sal_True; + aWriteLock.unlock(); + + implts_writeWindowStateData( aUIElement.m_aName, aUIElement ); + implts_sortUIElements(); + + if ( xDockWindow.is() && bShowElement ) + { + // we need VCL here to pass special flags to Show() + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if( pWindow ) + { + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + bNotify = sal_True; + } + implts_writeNewStateData( aName, xWindow ); + + if ( xDockWindow.is() && !xDockWindow->isFloating() ) + doLayout(); + + bResult = sal_True; + } // if ( xDockWindow.is() && bShowElement ) + break; + } + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + ReadGuard aReadGuard( m_aLock ); + css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); + css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR ); + aReadGuard.unlock(); + + impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, true ); + } + } + + if ( bNotify ) + { + // UI element is visible - provide information to listeners + implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) ); + } + + return bResult; +} + +sal_Bool SAL_CALL LayoutManager::hideElement( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::hideElement" ); + + + sal_Bool bResult( sal_False ); + sal_Bool bNotify( sal_False ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + + if ( impl_parseResourceURL( aName, aElementType, aElementName )) + { + ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); + RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); + + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + { + WriteGuard aWriteLock( m_aLock ); + + if ( m_xContainerWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + m_bMenuVisible = sal_False; + if ( pWindow ) + { + MenuBar* pMenuBar = ((SystemWindow *)pWindow)->GetMenuBar(); + if ( pMenuBar ) + { + pMenuBar->SetDisplayable( sal_False ); + bResult = sal_True; + bNotify = sal_True; + } + } + } + } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || + ( m_aStatusBarElement.m_aName == aName )) + { + WriteGuard aWriteLock( m_aLock ); + if ( m_aStatusBarElement.m_xUIElement.is() && + !m_aStatusBarElement.m_bMasterHide ) + { + if ( implts_hideStatusBar( sal_True )) + { + implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); + doLayout(); + bNotify = sal_True; + bResult = sal_True; + } + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) + { + bResult = bNotify = implts_hideProgressBar(); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + { + UIElementVector::iterator pIter; + + WriteGuard aWriteLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + + if ( xDockWindow.is() ) + { + pIter->m_bVisible = sal_False; + aWriteLock.unlock(); + + xWindow->setVisible( sal_False ); + implts_writeNewStateData( aName, xWindow ); + + if ( xDockWindow.is() && !xDockWindow->isFloating() ) + doLayout(); + + bResult = sal_True; + bNotify = sal_True; + } // if ( xDockWindow.is() ) + break; + } + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + ReadGuard aReadGuard( m_aLock ); + css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); + css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR ); + aReadGuard.unlock(); + + impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false ); + } + } + + if ( bNotify ) + { + // UI element is visible - provide information to listeners + implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) ); + } + + return sal_False; +} + +sal_Bool SAL_CALL LayoutManager::dockWindow( const ::rtl::OUString& aName, DockingArea DockingArea, const css::awt::Point& Pos ) +throw (RuntimeException) +{ + UIElement aUIElement; + + if ( implts_findElement( aName, aUIElement ) && aUIElement.m_xUIElement.is() ) + { + try + { + Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( xDockWindow.is() ) + { + if ( DockingArea != DockingArea_DOCKINGAREA_DEFAULT ) + aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( DockingArea ); + + if (( Pos.X != SAL_MAX_INT32 ) && ( Pos.Y != SAL_MAX_INT32 )) + aUIElement.m_aDockedData.m_aPos = ::Point( Pos.X, Pos.Y ); + + if ( !xDockWindow->isFloating() ) + { + Window* pWindow( 0 ); + ToolBox* pToolBox( 0 ); + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + pToolBox = (ToolBox *)pWindow; + + // We have to set the alignment of the toolbox. It's possible that the toolbox is moved from a + // horizontal to a vertical docking area! + pToolBox->SetAlign( ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea )); + } + } + + if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) || + ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + { + // Docking on its default position without a preset position - + // we have to find a good place for it. + ::Size aSize; + + vos::OGuard aGuard( Application::GetSolarMutex() ); + { + if ( pToolBox ) + aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) ); + else + aSize = pWindow->GetSizePixel(); + } + + ::Point aPixelPos; + ::Point aDockPos; + implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea, + aSize, + aDockPos, + aPixelPos ); + aUIElement.m_aDockedData.m_aPos = aDockPos; + } + } + + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); + if ( rUIElement.m_aName == aName ) + { + rUIElement.m_aDockedData.m_nDockedArea = aUIElement.m_aDockedData.m_nDockedArea; + rUIElement.m_aDockedData.m_aPos = aUIElement.m_aDockedData.m_aPos; + } + aWriteLock.unlock(); + + if ( xDockWindow->isFloating() ) + { + // Will call toggle floating mode which will do the rest! + xWindow->setVisible( sal_False ); + xDockWindow->setFloatingMode( sal_False ); + xWindow->setVisible( sal_True ); + } + else + { + implts_writeWindowStateData( aName, aUIElement ); + implts_sortUIElements(); + + if ( aUIElement.m_bVisible ) + doLayout(); + } + + return sal_True; + } + } + catch ( DisposedException& ) + { + } + } + + return sal_False; +} + +::sal_Bool SAL_CALL LayoutManager::dockAllWindows( ::sal_Int16 nElementType ) throw (::com::sun::star::uno::RuntimeException) +{ + if ( nElementType == UIElementType::TOOLBAR ) + { + std::vector< rtl::OUString > aToolBarNameVector; + + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + + { + ReadGuard aReadLock( m_aLock ); + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aType.equalsAscii( "toolbar" ) && + pIter->m_xUIElement.is() && + pIter->m_bFloating && + pIter->m_bVisible ) + aToolBarNameVector.push_back( pIter->m_aName ); + } + } + + const sal_uInt32 nCount = aToolBarNameVector.size(); + for ( sal_uInt32 i = 0; i < nCount; ++i ) + { + ::com::sun::star::awt::Point aPoint; + aPoint.X = aPoint.Y = SAL_MAX_INT32; + dockWindow( aToolBarNameVector[i], DockingArea_DOCKINGAREA_DEFAULT, aPoint ); + } + } + + return sal_False; +} + +sal_Bool SAL_CALL LayoutManager::floatWindow( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + UIElement aUIElement; + + if ( implts_findElement( aName, aUIElement )) + { + if ( aUIElement.m_xUIElement.is() ) + { + try + { + Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( xWindow.is() && xDockWindow.is() ) + { + if ( !xDockWindow->isFloating() ) + { + xDockWindow->setFloatingMode( sal_True ); + return sal_True; + } + } + } + catch ( DisposedException& ) + { + } + } + } + + return sal_False; +} + +::sal_Bool SAL_CALL LayoutManager::lockWindow( const ::rtl::OUString& ResourceURL ) +throw (::com::sun::star::uno::RuntimeException) +{ + UIElement aUIElement; + + if ( implts_findElement( ResourceURL, aUIElement )) + { + if ( aUIElement.m_xUIElement.is() ) + { + try + { + Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && + pWindow->IsVisible() && + xDockWindow.is() && + !xDockWindow->isFloating() ) + { + aUIElement.m_aDockedData.m_bLocked = sal_True; + implts_writeWindowStateData( ResourceURL, aUIElement ); + xDockWindow->lock(); + + // Write back lock state + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); + if ( rUIElement.m_aName == aUIElement.m_aName ) + rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; + aWriteLock.unlock(); + + doLayout(); + return sal_True; + } + } + catch ( DisposedException& ) + { + } + } + } + + return sal_False; +} + +::sal_Bool SAL_CALL LayoutManager::unlockWindow( const ::rtl::OUString& ResourceURL ) +throw (::com::sun::star::uno::RuntimeException) +{ + UIElement aUIElement; + + if ( implts_findElement( ResourceURL, aUIElement )) + { + if ( aUIElement.m_xUIElement.is() ) + { + try + { + Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && + pWindow->IsVisible() && + xDockWindow.is() && + !xDockWindow->isFloating() ) + { + aUIElement.m_aDockedData.m_bLocked = sal_False; + implts_writeWindowStateData( ResourceURL, aUIElement ); + xDockWindow->unlock(); + + // Write back lock state + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); + if ( rUIElement.m_aName == aUIElement.m_aName ) + rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; + aWriteLock.unlock(); + + doLayout(); + return sal_True; + } + } + catch ( DisposedException& ) + { + } + } + } + + return sal_False; +} + +void SAL_CALL LayoutManager::setElementSize( const ::rtl::OUString& aName, const css::awt::Size& aSize ) +throw (RuntimeException) +{ + UIElement aUIElement; + + if ( implts_findElement( aName, aUIElement )) + { + if ( aUIElement.m_xUIElement.is() ) + { + try + { + Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + + if ( xWindow.is() && xWindow2.is() && xDockWindow.is() ) + { + if ( aUIElement.m_bFloating ) + { + xWindow2->setOutputSize( aSize ); + implts_writeNewStateData( aName, xWindow ); + } + } + } + catch ( DisposedException& ) + { + } + } + } +} + +void SAL_CALL LayoutManager::setElementPos( const ::rtl::OUString& aName, const css::awt::Point& aPos ) +throw (RuntimeException) +{ + UIElement aUIElement; + + if ( implts_findElement( aName, aUIElement ) && aUIElement.m_xUIElement.is() ) + { + try + { + Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + + if ( xWindow.is() && xDockWindow.is() ) + { + if ( aUIElement.m_bFloating ) + { + xWindow->setPosSize( aPos.X, aPos.Y, 0, 0, css::awt::PosSize::POS ); + implts_writeNewStateData( aName, xWindow ); + } + else + { + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); + if ( rUIElement.m_aName == aName ) + rUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); + aWriteLock.unlock(); + + aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); + implts_writeWindowStateData( aName, aUIElement ); + implts_sortUIElements(); + + if ( aUIElement.m_bVisible ) + doLayout(); + } + } + } + catch ( DisposedException& ) + { + } + } +} + +void SAL_CALL LayoutManager::setElementPosSize( const ::rtl::OUString& aName, const css::awt::Point& aPos, const css::awt::Size& aSize ) +throw (RuntimeException) +{ + UIElement aUIElement; + + if ( implts_findElement( aName, aUIElement )) + { + if ( aUIElement.m_xUIElement.is() ) + { + try + { + Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + + if ( xWindow.is() && xWindow2.is() && xDockWindow.is() ) + { + if ( aUIElement.m_bFloating ) + { + xWindow2->setPosSize( aPos.X, aPos.Y, 0, 0, css::awt::PosSize::POS ); + xWindow2->setOutputSize( aSize ); + implts_writeNewStateData( aName, xWindow ); + } + else + { + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); + if ( rUIElement.m_aName == aName ) + rUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); + aWriteLock.unlock(); + + aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); + implts_writeWindowStateData( aName, rUIElement ); + implts_sortUIElements(); + + if ( aUIElement.m_bVisible ) + doLayout(); + } + } + } + catch ( DisposedException& ) + { + } + } + } +} + +sal_Bool SAL_CALL LayoutManager::isElementVisible( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + + if ( impl_parseResourceURL( aName, aElementType, aElementName )) + { + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + { + ReadGuard aReadLock( m_aLock ); + if ( m_xContainerWindow.is() ) + { + aReadLock.unlock(); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow ) + { + MenuBar* pMenuBar = ((SystemWindow *)pWindow)->GetMenuBar(); + if ( pMenuBar && pMenuBar->IsDisplayable() ) + return sal_True; + } + else + { + aReadLock.lock(); + return m_bMenuVisible; + } + } + } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || + ( m_aStatusBarElement.m_aName == aName )) + { + if ( m_aStatusBarElement.m_xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( + m_aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + if ( xWindow.is() ) + { + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() ) + return sal_True; + else + return sal_False; + } + } + } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ))) + { + if ( m_aProgressBarElement.m_xUIElement.is() ) + return m_aProgressBarElement.m_bVisible; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + { + UIElementVector::const_iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + if ( xWindow.is() ) + { + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + return pWindow && pWindow->IsVisible(); + } + } + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + ReadGuard aReadGuard( m_aLock ); + css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); + aReadGuard.unlock(); + + return IsDockingWindowVisible( xFrame, aElementName ); + } + } + + return sal_False; +} + +sal_Bool SAL_CALL LayoutManager::isElementFloating( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + UIElementVector::const_iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) + { + Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + return xDockWindow.is() && xDockWindow->isFloating(); + } + } + + return sal_False; +} + +sal_Bool SAL_CALL LayoutManager::isElementDocked( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + UIElementVector::const_iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) + { + Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + return xDockWindow.is() && !xDockWindow->isFloating(); + } + } + + return sal_False; +} + +::sal_Bool SAL_CALL LayoutManager::isElementLocked( const ::rtl::OUString& ResourceURL ) +throw (::com::sun::star::uno::RuntimeException) +{ + UIElementVector::const_iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if (( pIter->m_aName == ResourceURL ) && ( pIter->m_xUIElement.is() )) + { + Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); + return xDockWindow.is() && !xDockWindow->isLocked(); + } + } + + return sal_False; +} + +css::awt::Size SAL_CALL LayoutManager::getElementSize( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + ReadGuard aReadLock( m_aLock ); + UIElement aElementData; + if ( implts_findElement( aName,aElementData ) && aElementData.m_xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( aElementData.m_xUIElement->getRealInterface(), UNO_QUERY ); + if ( xWindow.is() ) + { + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + { + ::Size aSize = pWindow->GetSizePixel(); + css::awt::Size aElementSize; + aElementSize.Width = aSize.Width(); + aElementSize.Height = aSize.Height(); + return aElementSize; + } // if ( pWindow ) + } + } + return css::awt::Size(); +} + +css::awt::Point SAL_CALL LayoutManager::getElementPos( const ::rtl::OUString& aName ) +throw (RuntimeException) +{ + ReadGuard aReadLock( m_aLock ); + UIElement aElementData; + if ( implts_findElement( aName,aElementData ) && aElementData.m_xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( aElementData.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( xDockWindow.is() ) + { + css::awt::Point aPos; + if ( aElementData.m_bFloating ) + { + css::awt::Rectangle aRect = xWindow->getPosSize(); + aPos.X = aRect.X; + aPos.Y = aRect.Y; + } + else + { + ::Point aVirtualPos = aElementData.m_aDockedData.m_aPos; + aPos.X = aVirtualPos.X(); + aPos.Y = aVirtualPos.Y(); + } + + return aPos; + } + } + + return css::awt::Point(); +} + +void SAL_CALL LayoutManager::lock() +throw (RuntimeException) +{ + implts_lock(); + + ReadGuard aReadLock( m_aLock ); + sal_Int32 nLockCount( m_nLockCount ); + aReadLock.unlock(); + + RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::lock lockCount=%d", nLockCount ); +#ifdef DBG_UTIL + ByteString aStr("LayoutManager::lock "); + aStr += ByteString::CreateFromInt32((long)this); + aStr += " - "; + aStr += ByteString::CreateFromInt32(nLockCount); + DBG_TRACE( aStr.GetBuffer() ); +#endif + + Any a( nLockCount ); + implts_notifyListeners( css::frame::LayoutManagerEvents::LOCK, a ); +} + +void SAL_CALL LayoutManager::unlock() +throw (RuntimeException) +{ + sal_Bool bDoLayout( implts_unlock() ); + + ReadGuard aReadLock( m_aLock ); + sal_Int32 nLockCount( m_nLockCount ); + aReadLock.unlock(); + + RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::unlock lockCount=%d", nLockCount ); +#ifdef DBG_UTIL + ByteString aStr("LayoutManager::unlock "); + aStr += ByteString::CreateFromInt32((long)this); + aStr += " - "; + aStr += ByteString::CreateFromInt32(nLockCount); + DBG_TRACE( aStr.GetBuffer() ); +#endif + // conform to documentation: unlock with lock count == 0 means force a layout + + WriteGuard aWriteLock( m_aLock ); + if ( bDoLayout ) + m_aAsyncLayoutTimer.Stop(); + aWriteLock.unlock(); + + Any a( nLockCount ); + implts_notifyListeners( css::frame::LayoutManagerEvents::UNLOCK, a ); + + if ( bDoLayout ) + implts_doLayout_notify( sal_True ); +} + +void SAL_CALL LayoutManager::doLayout() +throw (RuntimeException) +{ + implts_doLayout_notify( sal_True ); +} + +void LayoutManager::implts_doLayout_notify( sal_Bool bOuterResize ) +{ + sal_Bool bLayouted = implts_doLayout( sal_False, bOuterResize ); + if ( bLayouted ) + implts_notifyListeners( css::frame::LayoutManagerEvents::LAYOUT, Any() ); +} + +sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize ) +{ + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::implts_doLayout" ); + + sal_Bool bNoLock( sal_False ); + css::awt::Rectangle aCurrBorderSpace; + Reference< css::awt::XWindow > xContainerWindow; + Reference< css::awt::XTopWindow2 > xContainerTopWindow; + Reference< css::awt::XWindow > xComponentWindow; + Reference< XDockingAreaAcceptor > xDockingAreaAcceptor; + bool bPreserveContentSize( false ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + + sal_Bool bMustDoLayout( m_bMustDoLayout ); + if ( !m_bParentWindowVisible ) + return sal_False; + + bNoLock = ( m_nLockCount == 0 ); + xContainerWindow = m_xContainerWindow; + xContainerTopWindow = m_xContainerTopWindow; + xComponentWindow = m_xFrame->getComponentWindow(); + xDockingAreaAcceptor = m_xDockingAreaAcceptor; + aCurrBorderSpace = m_aDockingArea; + bPreserveContentSize = m_bPreserveContentSize; + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + sal_Bool bLayouted( sal_False ); + + if ( bNoLock && + xDockingAreaAcceptor.is() && + xContainerWindow.is() && + xComponentWindow.is() ) + { + bLayouted = sal_True; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteGuard( m_aLock ); + m_bDoLayout = sal_True; + aWriteGuard.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + css::awt::Rectangle aBorderSpace = implts_calcDockingAreaSizes(); + sal_Bool bGotRequestedBorderSpace( sal_True ); + sal_Bool bEqual = implts_compareRectangles( aBorderSpace, aCurrBorderSpace ); + + if ( !bEqual || bForceRequestBorderSpace || bMustDoLayout ) + { + // we always resize the content window (instead of the complete container window) if we're not set up + // to (attempt to) preserve the content window's size + if ( bOuterResize && !bPreserveContentSize ) + bOuterResize = sal_False; + + // maximized windows can resized their content window only, not their container window + if ( bOuterResize && xContainerTopWindow.is() && xContainerTopWindow->getIsMaximized() ) + bOuterResize = sal_False; + + // if the component window does not have a size (yet), then we can't use it to calc the container + // window size + css::awt::Rectangle aComponentRect = xComponentWindow->getPosSize(); + if ( bOuterResize && ( aComponentRect.Width == 0 ) && ( aComponentRect.Height == 0 ) ) + bOuterResize = sal_False; + + bGotRequestedBorderSpace = sal_False; + if ( bOuterResize ) + { + Reference< awt::XDevice > xDevice( xContainerWindow, uno::UNO_QUERY ); + awt::DeviceInfo aContainerInfo = xDevice->getInfo(); + + awt::Size aRequestedSize( aComponentRect.Width + aContainerInfo.LeftInset + aContainerInfo.RightInset + aBorderSpace.X + aBorderSpace.Width, + aComponentRect.Height + aContainerInfo.TopInset + aContainerInfo.BottomInset + aBorderSpace.Y + aBorderSpace.Height ); + awt::Point aComponentPos( aBorderSpace.X, aBorderSpace.Y ); + + bGotRequestedBorderSpace = implts_resizeContainerWindow( aRequestedSize, aComponentPos ); + } + + // if we did not do an container window resize, or it failed, then use the DockingAcceptor as usual + if ( !bGotRequestedBorderSpace ) + { + bGotRequestedBorderSpace = xDockingAreaAcceptor->requestDockingAreaSpace( aBorderSpace ); + if ( bGotRequestedBorderSpace ) + xDockingAreaAcceptor->setDockingAreaSpace( aBorderSpace ); + } + + if ( bGotRequestedBorderSpace ) + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aWriteGuard.lock(); + m_aDockingArea = aBorderSpace; + m_bMustDoLayout = sal_False; + aWriteGuard.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + } + + if ( bGotRequestedBorderSpace ) + { + ::Size aContainerSize; + ::Size aStatusBarSize; + + aStatusBarSize = implts_getStatusBarSize(); + aBorderSpace.Height -= aStatusBarSize.Height(); + implts_setDockingAreaWindowSizes( aBorderSpace ); + + // Subtract status bar size from our container output size. Docking area windows + // don't contain the status bar! + aContainerSize = implts_getContainerWindowOutputSize(); + aContainerSize.Height() -= aStatusBarSize.Height(); + + // Retrieve row/column dependent data from all docked user-interface elements + for ( sal_Int32 i = 0; i < DOCKINGAREAS_COUNT; i++ ) + { + std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; + + implts_getDockingAreaElementInfos( (DockingArea)i, aRowColumnsWindowData ); + + sal_Int32 nOffset( 0 ); + const sal_uInt32 nCount = aRowColumnsWindowData.size(); + for ( sal_uInt32 j = 0; j < nCount; ++j ) + { + implts_calcWindowPosSizeOnSingleRowColumn( i, nOffset, aRowColumnsWindowData[j], aContainerSize ); + nOffset += aRowColumnsWindowData[j].nStaticSize; + } + } + + // Position the status bar + if ( aStatusBarSize.Height() > 0 ) + { + implts_setStatusBarPosSize( ::Point( 0, std::max(( aContainerSize.Height() ), long( 0 ))), + ::Size( aContainerSize.Width(),aStatusBarSize.Height() )); + } + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aWriteGuard.lock(); + m_bDoLayout = sal_False; + aWriteGuard.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + } + + return bLayouted; +} + +sal_Bool LayoutManager::implts_compareRectangles( const css::awt::Rectangle& rRect1, + const css::awt::Rectangle& rRect2 ) +{ + return (( rRect1.X == rRect2.X ) && + ( rRect1.Y == rRect2.Y ) && + ( rRect1.Width == rRect2.Width ) && + ( rRect1.Height == rRect2.Height )); +} + +sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContainerSize, + const awt::Point& rComponentPos ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + Reference< awt::XWindow > xContainerWindow = m_xContainerWindow; + Reference< awt::XTopWindow2 > xContainerTopWindow = m_xContainerTopWindow; + Reference< awt::XWindow > xComponentWindow = m_xFrame->getComponentWindow(); + Reference< container::XIndexAccess > xDisplayAccess = m_xDisplayAccess; + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + // calculate the maximum size we have for the container window + awt::Rectangle aWorkArea; + try + { + sal_Int32 nDisplay = xContainerTopWindow->getDisplay(); + Reference< beans::XPropertySet > xDisplayInfo( xDisplayAccess->getByIndex( nDisplay ), UNO_QUERY_THROW ); + OSL_VERIFY( xDisplayInfo->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WorkArea" ) ) ) >>= aWorkArea ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + if ( ( aWorkArea.Width > 0 ) && ( aWorkArea.Height > 0 ) ) + { + if ( ( rContainerSize.Width > aWorkArea.Width ) + || ( rContainerSize.Height > aWorkArea.Height ) + ) + return sal_False; + // Strictly, this is not correct. If we have a multi-screen display (css.awt.DisplayAccess.MultiDisplay == true), + // the the "effective work area" would be much larger than the work area of a single display, since we could in theory + // position the container window across multiple screens. + // However, this should suffice as a heuristics here ... (nobody really wants to check whethere the different screens are + // stacked horizontally or vertically, whether their work areas can really be combined, or are separated by non-work-areas, + // and the like ... right?) + } + + // resize our container window + xContainerWindow->setPosSize( 0, 0, rContainerSize.Width, rContainerSize.Height, css::awt::PosSize::SIZE ); + // position the component window + xComponentWindow->setPosSize( rComponentPos.X, rComponentPos.Y, 0, 0, css::awt::PosSize::POS ); + return sal_True; +} + +void SAL_CALL LayoutManager::setVisible( sal_Bool bVisible ) +throw (::com::sun::star::uno::RuntimeException) +{ + sal_Bool bWasVisible( sal_True ); + + WriteGuard aWriteLock( m_aLock ); + bWasVisible = m_bVisible; + m_bVisible = bVisible; + aWriteLock.unlock(); + + if ( bWasVisible != bVisible ) + implts_setVisibleState( bVisible ); +} + +sal_Bool SAL_CALL LayoutManager::isVisible() +throw (::com::sun::star::uno::RuntimeException) +{ + ReadGuard aReadLock( m_aLock ); + return m_bVisible; +} + +void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockingArea, + sal_Int32 nOffset, + SingleRowColumnWindowData& rRowColumnWindowData, + const ::Size& rContainerSize ) +{ + sal_Int32 nDiff( 0 ); + sal_Int32 nRCSpace( rRowColumnWindowData.nSpace ); + sal_Int32 nTopDockingAreaSize; + sal_Int32 nBottomDockingAreaSize; + sal_Int32 nContainerClientSize; + + if ( rRowColumnWindowData.aRowColumnWindows.empty() ) + return; + + if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + nContainerClientSize = rContainerSize.Width(); + nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize; + } + else + { + nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); + nBottomDockingAreaSize = implts_getTopBottomDockingAreaSizes().Height(); + nContainerClientSize = ( rContainerSize.Height() - nTopDockingAreaSize - nBottomDockingAreaSize ); + nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize; + } + + const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindowSizes.size(); + if (( nDiff < 0 ) && ( nRCSpace > 0 )) + { + // First we try to reduce the size of blank space before/behind docked windows + sal_Int32 i = nCount - 1; + while ( i >= 0 ) + { + sal_Int32 nSpace = rRowColumnWindowData.aRowColumnSpace[i]; + if ( nSpace >= -nDiff ) + { + + if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount ; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff; + } + else + { + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount ; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff; + } + nDiff = 0; + + break; + } + else if ( nSpace > 0 ) + { + if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].X -= nSpace; + } + else + { + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].Y -= nSpace; + } + nDiff += nSpace; + } + --i; + } + } + + // Check if we have to reduce further + if ( nDiff < 0 ) + { + // Now we have to reduce the size of certain docked windows + sal_Int32 i = sal_Int32( nCount - 1 ); + while ( i >= 0 ) + { + css::awt::Rectangle& rWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; + ::Size aMinSize; + + vos::OGuard aGuard( Application::GetSolarMutex() ); + { + Reference< css::awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + aMinSize = ((ToolBox *)pWindow)->CalcMinimumWindowSizePixel(); + } + + if (( aMinSize.Width() > 0 ) && ( aMinSize.Height() > 0 )) + { + if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || + ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + sal_Int32 nMaxReducation = ( rWinRect.Width - aMinSize.Width() ); + if ( nMaxReducation >= -nDiff ) + { + rWinRect.Width = rWinRect.Width + nDiff; + nDiff = 0; + } + else + { + rWinRect.Width = aMinSize.Width(); + nDiff += nMaxReducation; + } + + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff; + } + else + { + sal_Int32 nMaxReducation = ( rWinRect.Height - aMinSize.Height() ); + if ( nMaxReducation >= -nDiff ) + { + rWinRect.Height = rWinRect.Height + nDiff; + nDiff = 0; + } + else + { + rWinRect.Height = aMinSize.Height(); + nDiff += nMaxReducation; + } + + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff; + } + } + + if ( nDiff >= 0 ) + break; + + --i; + } + } + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + Window* pDockAreaWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[nDockingArea] ); + aReadLock.unlock(); + + sal_Int32 nCurrPos( 0 ); + sal_Int32 nStartOffset( 0 ); + + if ( nDockingArea == DockingArea_DOCKINGAREA_RIGHT ) + nStartOffset = pDockAreaWindow->GetSizePixel().Width() - rRowColumnWindowData.nStaticSize; + else if ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) + nStartOffset = pDockAreaWindow->GetSizePixel().Height() - rRowColumnWindowData.nStaticSize; + + vos::OGuard aGuard( Application::GetSolarMutex() ); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + Reference< css::awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + Window* pOldParentWindow = pWindow->GetParent(); + + if ( pDockAreaWindow != pOldParentWindow ) + pWindow->SetParent( pDockAreaWindow ); + + css::awt::Rectangle aWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; + if ( nDockingArea == DockingArea_DOCKINGAREA_TOP ) + { + if ( aWinRect.X < nCurrPos ) + aWinRect.X = nCurrPos; + pWindow->SetPosSizePixel( ::Point( aWinRect.X, nOffset ), + ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); + nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; + } + else if ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) + { + if ( aWinRect.X < nCurrPos ) + aWinRect.X = nCurrPos; + pWindow->SetPosSizePixel( ::Point( aWinRect.X, nStartOffset - nOffset ), + ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); + nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; + } + else if ( nDockingArea == DockingArea_DOCKINGAREA_LEFT ) + { + if ( aWinRect.Y < nCurrPos ) + aWinRect.Y = nCurrPos; + pWindow->SetPosSizePixel( ::Point( nOffset, aWinRect.Y ), + ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); + nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; + } + else if ( nDockingArea == DockingArea_DOCKINGAREA_RIGHT ) + { + if ( aWinRect.Y < nCurrPos ) + aWinRect.Y = nCurrPos; + pWindow->SetPosSizePixel( ::Point( nStartOffset - nOffset, aWinRect.Y ), + ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); + nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; + } + } +} + +::Size LayoutManager::implts_getStatusBarSize() +{ + ReadGuard aReadLock( m_aLock ); + sal_Bool bStatusBarVisible( isElementVisible( m_aStatusBarAlias )); + sal_Bool bProgressBarVisible( isElementVisible( m_aProgressBarAlias )); + sal_Bool bVisible = m_bVisible; + Reference< XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; + Reference< XUIElement > xProgressBar = m_aProgressBarElement.m_xUIElement; + + Reference< css::awt::XWindow > xWindow; + if ( bStatusBarVisible && bVisible && xStatusBar.is() ) + xWindow = Reference< css::awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); + else if ( xProgressBar.is() && !xStatusBar.is() && bProgressBarVisible ) + { + ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); + if ( pWrapper ) + xWindow = pWrapper->getStatusBar(); + } + aReadLock.unlock(); + + if ( xWindow.is() ) + { + css::awt::Rectangle aPosSize = xWindow->getPosSize(); + return ::Size( aPosSize.Width, aPosSize.Height ); + } + else + return ::Size(); +} + +css::awt::Rectangle LayoutManager::implts_calcDockingAreaSizes() +{ + Reference< css::awt::XWindow > xContainerWindow; + Reference< XDockingAreaAcceptor > xDockingAreaAcceptor; + + ReadGuard aReadLock( m_aLock ); + xContainerWindow = m_xContainerWindow; + xDockingAreaAcceptor = m_xDockingAreaAcceptor; + UIElementVector aWindowVector( m_aUIElements ); + aReadLock.unlock(); + + css::awt::Rectangle aBorderSpace; + if ( xDockingAreaAcceptor.is() && xContainerWindow.is() ) + { + sal_Int32 nCurrRowColumn( 0 ); + sal_Int32 nCurrPos( 0 ); + sal_Int32 nCurrDockingArea( DockingArea_DOCKINGAREA_TOP ); + std::vector< sal_Int32 > aRowColumnSizes[DOCKINGAREAS_COUNT]; + UIElementVector::const_iterator pConstIter; + + aRowColumnSizes[nCurrDockingArea].clear(); + aRowColumnSizes[nCurrDockingArea].push_back( 0 ); + + for ( pConstIter = aWindowVector.begin(); pConstIter != aWindowVector.end(); pConstIter++ ) + { + Reference< XUIElement > xUIElement( pConstIter->m_xUIElement, UNO_QUERY ); + if ( xUIElement.is() ) + { + Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( xWindow.is() && xDockWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() && !xDockWindow->isFloating() ) + { + css::awt::Rectangle aPosSize = xWindow->getPosSize(); + if ( pConstIter->m_aDockedData.m_nDockedArea != nCurrDockingArea ) + { + nCurrDockingArea = pConstIter->m_aDockedData.m_nDockedArea; + nCurrRowColumn = 0; + nCurrPos = 0; + aRowColumnSizes[nCurrDockingArea].clear(); + aRowColumnSizes[nCurrDockingArea].push_back( 0 ); + } + + if ( pConstIter->m_aDockedData.m_nDockedArea == nCurrDockingArea ) + { + if (( pConstIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_TOP ) || + ( pConstIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_BOTTOM )) + { + if ( pConstIter->m_aDockedData.m_aPos.Y() > nCurrPos ) + { + ++nCurrRowColumn; + nCurrPos = pConstIter->m_aDockedData.m_aPos.Y(); + aRowColumnSizes[nCurrDockingArea].push_back( 0 ); + } + + if ( aPosSize.Height > aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] ) + aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] = aPosSize.Height; + } + else + { + if ( pConstIter->m_aDockedData.m_aPos.X() > nCurrPos ) + { + ++nCurrRowColumn; + nCurrPos = pConstIter->m_aDockedData.m_aPos.X(); + aRowColumnSizes[nCurrDockingArea].push_back( 0 ); + } + + if ( aPosSize.Width > aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] ) + aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] = aPosSize.Width; + } + } + } + } + } + } + + // Sum up max heights from every row/column + if ( !aWindowVector.empty() ) + { + for ( sal_Int32 i = 0; i <= DockingArea_DOCKINGAREA_RIGHT; i++ ) + { + sal_Int32 nSize( 0 ); + const sal_uInt32 nCount = aRowColumnSizes[i].size(); + for ( sal_uInt32 j = 0; j < nCount; j++ ) + nSize += aRowColumnSizes[i][j]; + + if ( i == DockingArea_DOCKINGAREA_TOP ) + aBorderSpace.Y = nSize; + else if ( i == DockingArea_DOCKINGAREA_BOTTOM ) + aBorderSpace.Height = nSize; + else if ( i == DockingArea_DOCKINGAREA_LEFT ) + aBorderSpace.X = nSize; + else + aBorderSpace.Width = nSize; + } + } + + // We have to add the height of a possible status bar + aBorderSpace.Height += implts_getStatusBarSize().Height(); + } + + return aBorderSpace; +} + +void LayoutManager::implts_setDockingAreaWindowSizes( const css::awt::Rectangle& rBorderSpace ) +{ + Reference< css::awt::XWindow > xContainerWindow; + + ReadGuard aReadLock( m_aLock ); + xContainerWindow = m_xContainerWindow; + aReadLock.unlock(); + + css::uno::Reference< css::awt::XDevice > xDevice( xContainerWindow, css::uno::UNO_QUERY ); + // Convert relativ size to output size. + css::awt::Rectangle aRectangle = xContainerWindow->getPosSize(); + css::awt::DeviceInfo aInfo = xDevice->getInfo(); + css::awt::Size aContainerClientSize = css::awt::Size( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , + aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); + ::Size aStatusBarSize = implts_getStatusBarSize(); + + sal_Int32 nLeftRightDockingAreaHeight( aContainerClientSize.Height ); + if ( rBorderSpace.Y >= 0 ) + { + // Top docking area window + aReadLock.lock(); + Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] ); + aReadLock.unlock(); + + xDockAreaWindow->setPosSize( 0, 0, aContainerClientSize.Width, rBorderSpace.Y, css::awt::PosSize::POSSIZE ); + xDockAreaWindow->setVisible( sal_True ); + nLeftRightDockingAreaHeight -= rBorderSpace.Y; + } + + if ( rBorderSpace.Height >= 0 ) + { + // Bottom docking area window + sal_Int32 nBottomPos = std::max( sal_Int32( aContainerClientSize.Height - rBorderSpace.Height - aStatusBarSize.Height() ), sal_Int32( 0 )); + sal_Int32 nHeight = ( nBottomPos == 0 ) ? 0 : rBorderSpace.Height; + + aReadLock.lock(); + Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] ); + aReadLock.unlock(); + + xDockAreaWindow->setPosSize( 0, nBottomPos, aContainerClientSize.Width, nHeight, css::awt::PosSize::POSSIZE ); + xDockAreaWindow->setVisible( sal_True ); + nLeftRightDockingAreaHeight -= nHeight; + } + + nLeftRightDockingAreaHeight -= aStatusBarSize.Height(); + if ( rBorderSpace.X >= 0 || nLeftRightDockingAreaHeight > 0 ) + { + // Left docking area window + aReadLock.lock(); + Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] ); + aReadLock.unlock(); + + // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! + sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); + + xDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, css::awt::PosSize::POSSIZE ); + xDockAreaWindow->setVisible( sal_True ); + } + if ( rBorderSpace.Width >= 0 || nLeftRightDockingAreaHeight > 0 ) + { + // Right docking area window + aReadLock.lock(); + Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] ); + aReadLock.unlock(); + + // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! + sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width )); + sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); + sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width; + + xDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, css::awt::PosSize::POSSIZE ); + xDockAreaWindow->setVisible( sal_True ); + } + + // Position the status bar + if ( aStatusBarSize.Height() > 0 ) + { + implts_setStatusBarPosSize( ::Point( 0, std::max(( aContainerClientSize.Height - aStatusBarSize.Height() ), long( 0 ))), + ::Size( aContainerClientSize.Width, aStatusBarSize.Height() )); + } +} + +//--------------------------------------------------------------------------------------------------------- +// XMenuCloser +//--------------------------------------------------------------------------------------------------------- +void LayoutManager::implts_updateMenuBarClose() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + sal_Bool bShowCloser = m_bMenuBarCloser; + Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + aWriteLock.unlock(); + + if ( xContainerWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + Window* pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow ) + { + SystemWindow* pSysWindow = (SystemWindow *)pWindow; + MenuBar* pMenuBar = pSysWindow->GetMenuBar(); + if ( pMenuBar ) + { + // TODO remove link on FALSE ?! + if ( bShowCloser ) + { + pMenuBar->ShowCloser( TRUE ); + pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); + } + else + { + pMenuBar->ShowCloser( FALSE ); + pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); + } + } + } + } +} + +sal_Bool LayoutManager::implts_resetMenuBar() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + sal_Bool bMenuVisible( m_bMenuVisible ); + Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + + MenuBar* pSetMenuBar = 0; + if ( m_xInplaceMenuBar.is() ) + pSetMenuBar = (MenuBar *)m_pInplaceMenuBar->GetMenuBar(); + else + { + MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, m_xMenuBar.get() ); + if ( pMenuBarWrapper ) + pSetMenuBar = (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar(); + } + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow && bMenuVisible && pSetMenuBar ) + { + ((SystemWindow *)pWindow)->SetMenuBar( pSetMenuBar ); + pSetMenuBar->SetDisplayable( sal_True ); + return sal_True; + } + + return sal_False; +} + +void LayoutManager::implts_setMenuBarCloser(sal_Bool bCloserState) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bMenuBarCloser = bCloserState; + aWriteLock.unlock(); + + implts_updateMenuBarClose(); +} + +sal_Int16 LayoutManager::implts_getCurrentSymbolsSize() +{ + sal_Int16 eOptSymbolsSize( 0 ); + + { + ReadGuard aReadLock( m_aLock ); + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( m_pMiscOptions ) + eOptSymbolsSize = m_pMiscOptions->GetCurrentSymbolsSize(); + } + + return eOptSymbolsSize; +} + +sal_Int16 LayoutManager::implts_getCurrentSymbolsStyle() +{ + sal_Int16 eOptSymbolsStyle( 0 ); + + { + ReadGuard aReadLock( m_aLock ); + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( m_pMiscOptions ) + eOptSymbolsStyle = m_pMiscOptions->GetCurrentSymbolsStyle(); + } + + return eOptSymbolsStyle; +} + +IMPL_LINK( LayoutManager, MenuBarClose, MenuBar *, EMPTYARG ) +{ + ReadGuard aReadLock( m_aLock ); + css::uno::Reference< css::frame::XDispatchProvider > xProvider(m_xFrame, css::uno::UNO_QUERY); + css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR; + aReadLock.unlock(); + + if (! xProvider.is()) + return 0; + + css::uno::Reference< css::frame::XDispatchHelper > xDispatcher( + xSMGR->createInstance(SERVICENAME_DISPATCHHELPER), css::uno::UNO_QUERY_THROW); + + xDispatcher->executeDispatch( + xProvider, + ::rtl::OUString::createFromAscii(".uno:CloseWin"), + ::rtl::OUString::createFromAscii("_self"), + 0, + css::uno::Sequence< css::beans::PropertyValue >()); + + return 0; +} + +IMPL_LINK( LayoutManager, OptionsChanged, void*, EMPTYARG ) +{ + sal_Int16 eSymbolsSize( implts_getCurrentSymbolsSize() ); + sal_Int16 eSymbolsStyle( implts_getCurrentSymbolsStyle() ); + + ReadGuard aReadLock( m_aLock ); + sal_Int16 eOldSymbolsSize = m_eSymbolsSize; + sal_Int16 eOldSymbolsStyle = m_eSymbolsStyle; + aReadLock.unlock(); + + if ( eSymbolsSize != eOldSymbolsSize || eSymbolsStyle != eOldSymbolsStyle ) + { + WriteGuard aWriteLock( m_aLock ); + m_eSymbolsSize = eSymbolsSize; + m_eSymbolsStyle = eSymbolsStyle; + aWriteLock.unlock(); + + std::vector< Reference< XUpdatable > > aToolBarVector; + + aReadLock.lock(); + { + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_xUIElement.is() ) + aToolBarVector.push_back( Reference< XUpdatable >( pIter->m_xUIElement, UNO_QUERY )); + } + } + aReadLock.unlock(); + + lock(); + { + std::vector< Reference< XUpdatable > >::iterator pIter; + for ( pIter = aToolBarVector.begin(); pIter != aToolBarVector.end(); pIter++ ) + { + if ( (*pIter).is() ) + (*pIter)->update(); + } + } + unlock(); + doLayout(); + } + + return 1; +} + +IMPL_LINK( LayoutManager, SettingsChanged, void*, EMPTYARG ) +{ + return 1; +} + +//--------------------------------------------------------------------------------------------------------- +// XDockableWindowListener +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL LayoutManager::startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException) +{ + sal_Bool bWinFound( sal_False ); + UIElement aUIElement; + + ReadGuard aReadGuard( m_aLock ); + Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< css::awt::XWindow2 > xWindow( e.Source, UNO_QUERY ); + aReadGuard.unlock(); + + Window* pContainerWindow( 0 ); + Window* pWindow( 0 ); + ::Point aMousePos; + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + aMousePos = pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y )); + } + + bWinFound = implts_findElement( e.Source, aUIElement ); + + if ( !bWinFound ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + PanelWindow* pPanelWindow = dynamic_cast(pWindow); + if ( pPanelWindow ) + m_pPanelManager->startDocking( e ); + } + else if ( xWindow.is() ) + { + css::awt::Rectangle aRect; + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( xDockWindow->isFloating() ) + { + css::awt::Rectangle aPos = xWindow->getPosSize(); + css::awt::Size aSize = xWindow->getOutputSize(); + + aUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); + aUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolBox = (ToolBox *)pWindow; + aUIElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); + aUIElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || + ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + } + } + } + + WriteGuard aWriteLock( m_aLock ); + m_bDockingInProgress = bWinFound; + m_aDockUIElement = aUIElement; + m_aDockUIElement.m_bUserActive = sal_True; + m_aStartDockMousePos = aMousePos; + aWriteLock.unlock(); +} + +::Rectangle LayoutManager::implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ) +{ + ::Rectangle aRect( rRect ); + + aRect.Left() -= nHotZoneOffset; + aRect.Top() -= nHotZoneOffset; + aRect.Right() += nHotZoneOffset; + aRect.Bottom() += nHotZoneOffset; + return aRect; +} + +css::awt::DockingData SAL_CALL LayoutManager::docking( const ::com::sun::star::awt::DockingEvent& e ) +throw (::com::sun::star::uno::RuntimeException) +{ + const sal_Int32 MAGNETIC_DISTANCE_UNDOCK = 25; + const sal_Int32 MAGNETIC_DISTANCE_DOCK = 20; + + css::awt::DockingData aDockingData; + Reference< css::awt::XDockableWindow > xDockWindow( e.Source, UNO_QUERY ); + Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); + Reference< css::awt::XWindow > xTopDockingWindow; + Reference< css::awt::XWindow > xLeftDockingWindow; + Reference< css::awt::XWindow > xRightDockingWindow; + Reference< css::awt::XWindow > xBottomDockingWindow; + Reference< css::awt::XWindow > xContainerWindow; + UIElement aUIDockingElement; + DockingOperation eDockingOperation( DOCKOP_ON_COLROW ); + ::Size aStatusBarSize; + + aDockingData.TrackingRectangle = e.TrackingRectangle; + sal_Bool bDockingInProgress; + + { + ReadGuard aReadLock( m_aLock ); + bDockingInProgress = m_bDockingInProgress; + if ( bDockingInProgress ) + { + xContainerWindow = m_xContainerWindow; + xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; + xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; + xRightDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; + xBottomDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; + aUIDockingElement = m_aDockUIElement; + aStatusBarSize = implts_getStatusBarSize(); + } + } + + if ( bDockingInProgress && + xDockWindow.is() && + xWindow.is() ) + { + try + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + sal_Int16 eDockingArea( -1 ); // none + sal_Int32 nMagneticZone( aUIDockingElement.m_bFloating ? MAGNETIC_DISTANCE_DOCK : MAGNETIC_DISTANCE_UNDOCK ); + css::awt::Rectangle aNewTrackingRect; + ::Rectangle aTrackingRect( e.TrackingRectangle.X, + e.TrackingRectangle.Y, + ( e.TrackingRectangle.X + e.TrackingRectangle.Width ), + ( e.TrackingRectangle.Y + e.TrackingRectangle.Height )); + + css::awt::Rectangle aTmpRect = xTopDockingWindow->getPosSize(); + ::Rectangle aTopDockRect( aTmpRect.X, aTmpRect.Y, aTmpRect.Width, aTmpRect.Height ); + ::Rectangle aHotZoneTopDockRect( implts_calcHotZoneRect( aTopDockRect, nMagneticZone )); + + aTmpRect = xBottomDockingWindow->getPosSize(); + ::Rectangle aBottomDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width), ( aTmpRect.Y + aTmpRect.Height )); + ::Rectangle aHotZoneBottomDockRect( implts_calcHotZoneRect( aBottomDockRect, nMagneticZone )); + + aTmpRect = xLeftDockingWindow->getPosSize(); + ::Rectangle aLeftDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); + ::Rectangle aHotZoneLeftDockRect( implts_calcHotZoneRect( aLeftDockRect, nMagneticZone )); + + aTmpRect = xRightDockingWindow->getPosSize(); + ::Rectangle aRightDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); + ::Rectangle aHotZoneRightDockRect( implts_calcHotZoneRect( aRightDockRect, nMagneticZone )); + + Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow ) ); + Window* pDockingAreaWindow( 0 ); + ::Point aMousePos( pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y ))); + + if ( aHotZoneTopDockRect.IsInside( aMousePos )) + eDockingArea = DockingArea_DOCKINGAREA_TOP; + else if ( aHotZoneBottomDockRect.IsInside( aMousePos )) + eDockingArea = DockingArea_DOCKINGAREA_BOTTOM; + else if ( aHotZoneLeftDockRect.IsInside( aMousePos )) + eDockingArea = DockingArea_DOCKINGAREA_LEFT; + else if ( aHotZoneRightDockRect.IsInside( aMousePos )) + eDockingArea = DockingArea_DOCKINGAREA_RIGHT; + + // Higher priority for movements inside the real docking area + if ( aTopDockRect.IsInside( aMousePos )) + eDockingArea = DockingArea_DOCKINGAREA_TOP; + else if ( aBottomDockRect.IsInside( aMousePos )) + eDockingArea = DockingArea_DOCKINGAREA_BOTTOM; + else if ( aLeftDockRect.IsInside( aMousePos )) + eDockingArea = DockingArea_DOCKINGAREA_LEFT; + else if ( aRightDockRect.IsInside( aMousePos )) + eDockingArea = DockingArea_DOCKINGAREA_RIGHT; + + // Determine if we have a toolbar and set alignment according to the docking area! + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + ToolBox* pToolBox = 0; + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pWindow; + + if ( eDockingArea != -1 ) + { + if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) + { + aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_TOP; + aUIDockingElement.m_bFloating = sal_False; + pDockingAreaWindow = VCLUnoHelper::GetWindow( xTopDockingWindow ); + } + else if ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) + { + aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_BOTTOM; + aUIDockingElement.m_bFloating = sal_False; + pDockingAreaWindow = VCLUnoHelper::GetWindow( xBottomDockingWindow ); + } + else if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) + { + aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_LEFT; + aUIDockingElement.m_bFloating = sal_False; + pDockingAreaWindow = VCLUnoHelper::GetWindow( xLeftDockingWindow ); + } + else if ( eDockingArea == DockingArea_DOCKINGAREA_RIGHT ) + { + aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_RIGHT; + aUIDockingElement.m_bFloating = sal_False; + pDockingAreaWindow = VCLUnoHelper::GetWindow( xRightDockingWindow ); + } + + ::Point aOutputPos = pContainerWindow->ScreenToOutputPixel( aTrackingRect.TopLeft() ); + aTrackingRect.SetPos( aOutputPos ); + + ::Rectangle aNewDockingRect( aTrackingRect ); + implts_calcDockingPosSize( aUIDockingElement, eDockingOperation, aNewDockingRect, aMousePos ); + + ::Point aScreenPos = pContainerWindow->OutputToScreenPixel( aNewDockingRect.TopLeft() ); + aNewTrackingRect = css::awt::Rectangle( aScreenPos.X(), + aScreenPos.Y(), + aNewDockingRect.getWidth(), + aNewDockingRect.getHeight() ); + aDockingData.TrackingRectangle = aNewTrackingRect; + } + else if ( pToolBox && bDockingInProgress ) + { + sal_Bool bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || + ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + ::Size aFloatSize = aUIDockingElement.m_aFloatingData.m_aSize; + if ( aFloatSize.Width() > 0 && aFloatSize.Height() > 0 ) + { + aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( + ::Point( e.MousePos.X, e.MousePos.Y )); + aDockingData.TrackingRectangle.Height = aFloatSize.Height(); + aDockingData.TrackingRectangle.Width = aFloatSize.Width(); + } + else + { + aFloatSize = pToolBox->CalcWindowSizePixel(); + if ( !bIsHorizontal ) + { + // Floating toolbars are always horizontal aligned! We have to swap + // width/height if we have a vertical aligned toolbar. + sal_Int32 nTemp = aFloatSize.Height(); + aFloatSize.Height() = aFloatSize.Width(); + aFloatSize.Width() = nTemp; + } + + aDockingData.TrackingRectangle.Height = aFloatSize.Height(); + aDockingData.TrackingRectangle.Width = aFloatSize.Width(); + + // For the first time we don't have any data about the floating size of a toolbar. + // We calculate it and store it for later use. + aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( + ::Point( e.MousePos.X, e.MousePos.Y )); + aUIDockingElement.m_aFloatingData.m_aSize = aFloatSize; + aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); + aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || + ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + } + aDockingData.TrackingRectangle.X = e.MousePos.X; + aDockingData.TrackingRectangle.Y = e.MousePos.Y; + } + + aDockingData.bFloating = ( eDockingArea == -1 ); + + // Write current data to the member docking progress data + WriteGuard aWriteLock( m_aLock ); + m_aDockUIElement.m_bFloating = aDockingData.bFloating; + if ( !aDockingData.bFloating ) + { + m_aDockUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; + m_eDockOperation = eDockingOperation; + } + else + m_aDockUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; + aWriteLock.unlock(); + } + catch ( Exception& ) + { + } + } + + return aDockingData; +} + +void SAL_CALL LayoutManager::endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) +throw (::com::sun::star::uno::RuntimeException) +{ + sal_Bool bDockingInProgress( sal_False ); + sal_Bool bStartDockFloated( sal_False ); + sal_Bool bFloating( sal_False ); + UIElement aUIDockingElement; + + WriteGuard aWriteLock( m_aLock ); + bDockingInProgress = m_bDockingInProgress; + aUIDockingElement = m_aDockUIElement; + bFloating = aUIDockingElement.m_bFloating; + + UIElement& rUIElement = impl_findElement( aUIDockingElement.m_aName ); + if ( rUIElement.m_aName == aUIDockingElement.m_aName ) + { + if ( aUIDockingElement.m_bFloating ) + { + // Write last position into position data + Reference< css::awt::XWindow > xWindow( aUIDockingElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + rUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; + css::awt::Rectangle aTmpRect = xWindow->getPosSize(); + rUIElement.m_aFloatingData.m_aPos = ::Point( aTmpRect.X, aTmpRect.Y ); + // make changes also for our local data as we use it to make data persistent + aUIDockingElement.m_aFloatingData = rUIElement.m_aFloatingData; + } + else + { + rUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; + rUIElement.m_aFloatingData.m_aSize = aUIDockingElement.m_aFloatingData.m_aSize; + + if ( m_eDockOperation != DOCKOP_ON_COLROW ) + { + // we have to renumber our row/column data to insert a new row/column + implts_renumberRowColumnData( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, + m_eDockOperation, + aUIDockingElement ); + } + } + + bStartDockFloated = rUIElement.m_bFloating; + rUIElement.m_bFloating = m_aDockUIElement.m_bFloating; + rUIElement.m_bUserActive = sal_True; + } + + // reset member for next docking operation + m_aDockUIElement.m_xUIElement.clear(); + m_eDockOperation = DOCKOP_ON_COLROW; + aWriteLock.unlock(); + + implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); + + if ( bDockingInProgress ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( Reference< css::awt::XWindow >( e.Source, UNO_QUERY )); + ToolBox* pToolBox = 0; + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pWindow; + + if ( pToolBox ) + { + if( e.bFloating ) + { + if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) + pToolBox->SetAlign( WINDOWALIGN_TOP ); + else + pToolBox->SetAlign( WINDOWALIGN_LEFT ); + } + else + { + ::Size aSize; + + pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); + + // Docked toolbars have always one line + aSize = pToolBox->CalcWindowSizePixel( 1 ); + + // Lock layouting updates as our listener would be called due to SetSizePixel + pToolBox->SetOutputSizePixel( aSize ); + } + } + } + + aWriteLock.lock(); + m_bDockingInProgress = sal_False; + aWriteLock.unlock(); + + implts_sortUIElements(); + if ( !bStartDockFloated || !bFloating ) + { + // Optimization: Don't layout if we started floating and now floating again. + // This would not change anything for the docked user-interface elements. + doLayout(); + } +} + +sal_Bool SAL_CALL LayoutManager::prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) +throw (::com::sun::star::uno::RuntimeException) +{ + sal_Bool bDockingInProgress( sal_False ); + + ReadGuard aReadLock( m_aLock ); + bDockingInProgress = m_bDockingInProgress; + aReadLock.unlock(); + + UIElement aUIDockingElement; + sal_Bool bWinFound( implts_findElement( e.Source, aUIDockingElement ) ); + Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); + + if ( bWinFound && xWindow.is() ) + { + if ( !bDockingInProgress ) + { + css::awt::Rectangle aRect; + Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( xDockWindow->isFloating() ) + { + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + { + if ( pWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolBox = (ToolBox *)pWindow; + aUIDockingElement.m_aFloatingData.m_aPos = pToolBox->GetPosPixel(); + aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->GetOutputSizePixel(); + aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); + aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || + ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + } + } + } + + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = LayoutManager::impl_findElement( aUIDockingElement.m_aName ); + if ( rUIElement.m_aName == aUIDockingElement.m_aName ) + rUIElement = aUIDockingElement; + aWriteLock.unlock(); + } + } + } + + return sal_True; +} + +void SAL_CALL LayoutManager::toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) +throw (::com::sun::star::uno::RuntimeException) +{ + sal_Bool bDockingInProgress( sal_False ); + UIElement aUIDockingElement; + + ReadGuard aReadLock( m_aLock ); + bDockingInProgress = m_bDockingInProgress; + if ( bDockingInProgress ) + aUIDockingElement = m_aDockUIElement; + aReadLock.unlock(); + + Window* pWindow( 0 ); + ToolBox* pToolBox( 0 ); + Reference< css::awt::XWindow2 > xWindow; + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + xWindow = Reference< css::awt::XWindow2 >( e.Source, UNO_QUERY ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pWindow; + } + + if ( !bDockingInProgress ) + { + sal_Bool bWinFound( implts_findElement( e.Source, aUIDockingElement ) ); + if ( bWinFound && xWindow.is() ) + { + aUIDockingElement.m_bFloating = !aUIDockingElement.m_bFloating; + aUIDockingElement.m_bUserActive = sal_True; + + WriteGuard aWriteLock( m_aLock ); + m_bDoLayout = sal_True; + aWriteLock.unlock(); + + if ( aUIDockingElement.m_bFloating ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( pToolBox ) + { + pToolBox->SetLineCount( aUIDockingElement.m_aFloatingData.m_nLines ); + if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) + pToolBox->SetAlign( WINDOWALIGN_TOP ); + else + pToolBox->SetAlign( WINDOWALIGN_LEFT ); + } + + sal_Bool bUndefPos = ( aUIDockingElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || + aUIDockingElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); + sal_Bool bSetSize = ( aUIDockingElement.m_aFloatingData.m_aSize.Width() != 0 && + aUIDockingElement.m_aFloatingData.m_aSize.Height() != 0 ); + + if ( bUndefPos ) + aUIDockingElement.m_aFloatingData.m_aPos = implts_findNextCascadeFloatingPos(); + + if ( !bSetSize ) + { + if ( pToolBox ) + aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->CalcFloatingWindowSizePixel(); + else + aUIDockingElement.m_aFloatingData.m_aSize = pWindow->GetOutputSizePixel(); + } + + xWindow->setPosSize( aUIDockingElement.m_aFloatingData.m_aPos.X(), + aUIDockingElement.m_aFloatingData.m_aPos.Y(), + 0, 0, css::awt::PosSize::POS ); + xWindow->setOutputSize( AWTSize( aUIDockingElement.m_aFloatingData.m_aSize ) ); + } + else + { + if (( aUIDockingElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && + ( aUIDockingElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + { + // Docking on its default position without a preset position - + // we have to find a good place for it. + ::Point aPixelPos; + ::Point aDockPos; + ::Size aSize; + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( pToolBox ) + aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea ) ); + else + aSize = pWindow->GetSizePixel(); + } + + implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, + aSize, + aDockPos, + aPixelPos ); + aUIDockingElement.m_aDockedData.m_aPos = aDockPos; + } + + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( pToolBox ) + { + pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); + ::Size aSize = pToolBox->CalcWindowSizePixel( 1 ); + css::awt::Rectangle aRect = xWindow->getPosSize(); + xWindow->setPosSize( aRect.X, aRect.Y, 0, 0, css::awt::PosSize::POS ); + xWindow->setOutputSize( AWTSize( aSize ) ); + } + } + + aWriteLock.lock(); + m_bDoLayout = sal_False; + UIElement& rUIElement = LayoutManager::impl_findElement( aUIDockingElement.m_aName ); + if ( rUIElement.m_aName == aUIDockingElement.m_aName ) + rUIElement = aUIDockingElement; + aWriteLock.unlock(); + + implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); + + implts_sortUIElements(); + doLayout(); + } + } + else + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( pToolBox ) + { + if ( aUIDockingElement.m_bFloating ) + { + if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) + pToolBox->SetAlign( WINDOWALIGN_TOP ); + else + pToolBox->SetAlign( WINDOWALIGN_LEFT ); + } + else + { + pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); + } + } + } +} + +void SAL_CALL LayoutManager::closed( const ::com::sun::star::lang::EventObject& e ) +throw (::com::sun::star::uno::RuntimeException) +{ + rtl::OUString aName; + UIElement aUIElement; + UIElementVector::iterator pIter; + + WriteGuard aWriteLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + Reference< XUIElement > xUIElement( pIter->m_xUIElement ); + if ( xUIElement.is() ) + { + Reference< XInterface > xIfac( xUIElement->getRealInterface(), UNO_QUERY ); + if ( xIfac == e.Source ) + { + aName = pIter->m_aName; + + // user closes a toolbar => + // context sensitive toolbar: only destroy toolbar and store state. + // context sensitive toolbar: make it invisible, store state and destroy it. + if ( !pIter->m_bContextSensitive ) + pIter->m_bVisible = sal_False; + + aUIElement = *pIter; + break; + } + } + } + aWriteLock.unlock(); + + + // destroy element + if ( aName.getLength() > 0 ) + { + implts_writeWindowStateData( aName, aUIElement ); + destroyElement( aName ); + } +} + +void SAL_CALL LayoutManager::endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& ) +throw (::com::sun::star::uno::RuntimeException) +{ + +} + +//--------------------------------------------------------------------------------------------------------- +// XLayoutManagerEventBroadcaster +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL LayoutManager::addLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& xListener ) +throw (::com::sun::star::uno::RuntimeException) +{ + m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XLayoutManagerListener >*)NULL ), xListener ); +} + +void SAL_CALL LayoutManager::removeLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& xListener ) +throw (::com::sun::star::uno::RuntimeException) +{ + m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XLayoutManagerListener >*)NULL ), xListener ); +} + +void LayoutManager::implts_notifyListeners( short nEvent, ::com::sun::star::uno::Any aInfoParam ) +{ + css::lang::EventObject aSource (static_cast< ::cppu::OWeakObject*>(this)); + ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::frame::XLayoutManagerListener >*) NULL ) ); + if (pContainer!=NULL) + { + ::cppu::OInterfaceIteratorHelper pIterator(*pContainer); + while (pIterator.hasMoreElements()) + { + try + { + ((css::frame::XLayoutManagerListener*)pIterator.next())->layoutEvent( aSource, nEvent, aInfoParam ); + } + catch( css::uno::RuntimeException& ) + { + pIterator.remove(); + } + } + } +} + +//--------------------------------------------------------------------------------------------------------- +// XWindowListener +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL LayoutManager::windowResized( const css::awt::WindowEvent& aEvent ) +throw( css::uno::RuntimeException ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + if ( !m_xDockingAreaAcceptor.is() ) + return; + + // Request to set docking area space again. + css::awt::Rectangle aDockingArea( m_aDockingArea ); + Reference< XDockingAreaAcceptor > xDockingAreaAcceptor( m_xDockingAreaAcceptor ); + Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + + Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); + if ( xIfac == aEvent.Source && m_bVisible ) + { + // We have to call our resize handler at least once synchronously, as some + // application modules need this. So we have to check if this is the first + // call after the async layout time expired. + m_bMustDoLayout = sal_True; + if ( !m_aAsyncLayoutTimer.IsActive() ) + { + const Link& aLink = m_aAsyncLayoutTimer.GetTimeoutHdl(); + if ( aLink.IsSet() ) + aLink.Call( &m_aAsyncLayoutTimer ); + } + if ( m_nLockCount == 0 ) + m_aAsyncLayoutTimer.Start(); + } + else if ( m_xFrame.is() && aEvent.Source == m_xFrame->getContainerWindow() ) + { + // the container window of my DockingAreaAcceptor is not the same as of my frame + // I still have to resize my frames' window as nobody else will do it + Reference< css::awt::XWindow > xComponentWindow( m_xFrame->getComponentWindow() ); + if( xComponentWindow.is() == sal_True ) + { + css::uno::Reference< css::awt::XDevice > xDevice( m_xFrame->getContainerWindow(), css::uno::UNO_QUERY ); + + // Convert relativ size to output size. + css::awt::Rectangle aRectangle = m_xFrame->getContainerWindow()->getPosSize(); + css::awt::DeviceInfo aInfo = xDevice->getInfo(); + css::awt::Size aSize ( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , + aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); + + // Resize our component window. + xComponentWindow->setPosSize( 0, 0, aSize.Width, aSize.Height, css::awt::PosSize::POSSIZE ); + } + } + else + { + // resize event for one of the UIElements + sal_Bool bLocked( m_bDockingInProgress ); + sal_Bool bDoLayout( m_bDoLayout ); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( !bLocked && !bDoLayout ) + { + // Do not do anything if we are in the middle of a docking process. This would interfere all other + // operations. We will store the new position and size in the docking handlers. + // Do not do anything if we are in the middle of our layouting process. We will adapt the position + // and size of the user interface elements. + UIElement aUIElement; + if ( implts_findElement( aEvent.Source, aUIElement )) + { + if ( aUIElement.m_bFloating ) + implts_writeNewStateData( aUIElement.m_aName, + Reference< css::awt::XWindow >( aEvent.Source, UNO_QUERY )); + else + doLayout(); + } + } + } +} + +void SAL_CALL LayoutManager::windowMoved( const css::awt::WindowEvent& ) throw( css::uno::RuntimeException ) +{ +} + +void SAL_CALL LayoutManager::windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + + // Request to set docking area space again. + Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + bool bParentWindowVisible( m_bParentWindowVisible ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); + if ( xIfac == aEvent.Source ) + { + bool bSetVisible = false; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bParentWindowVisible = true; + bSetVisible = ( m_bParentWindowVisible != bParentWindowVisible ); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( bSetVisible ) + { + implts_updateUIElementsVisibleState( sal_True ); + //implts_doLayout( sal_False ); + } + } +} + +void SAL_CALL LayoutManager::windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + + // Request to set docking area space again. + Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + bool bParentWindowVisible( m_bParentWindowVisible ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); + if ( xIfac == aEvent.Source ) + { + bool bSetInvisible = false; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bParentWindowVisible = false; + bSetInvisible = ( m_bParentWindowVisible != bParentWindowVisible ); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( bSetInvisible ) + implts_updateUIElementsVisibleState( sal_False ); + } +} + +IMPL_LINK( LayoutManager, AsyncLayoutHdl, Timer *, EMPTYARG ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + + // Request to set docking area space again. + m_aAsyncLayoutTimer.Stop(); + + if( !m_xContainerWindow.is() ) + return 0; + + css::awt::Rectangle aDockingArea( m_aDockingArea ); + ::Size aStatusBarSize( implts_getStatusBarSize() ); + + // Subtract status bar height + aDockingArea.Height -= aStatusBarSize.Height(); + aReadLock.unlock(); + + implts_setDockingAreaWindowSizes( aDockingArea ); + implts_doLayout( sal_True, sal_False ); + + return 0; +} + +#ifdef DBG_UTIL +void LayoutManager::implts_checkElementContainer() +{ +#ifdef DBG_UTIL + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + + BaseHash< sal_Int32 > aUIElementHash; + + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + aUIElementHash[pIter->m_aName]++; + + + BaseHash< sal_Int32 >::const_iterator pCheckIter = aUIElementHash.begin(); + for ( ; pCheckIter != aUIElementHash.end(); pCheckIter++ ) + { + if ( pCheckIter->second > 1 ) + { + ::rtl::OString aName = ::rtl::OUStringToOString( pCheckIter->first, RTL_TEXTENCODING_ASCII_US ); + DBG_ASSERT( "More than one element (%s) with the same name found!", aName.getStr() ); + } + } // for ( ; pCheckIter != aUIElementHash.end(); pCheckIter++ ) +#endif +} +#endif + +//--------------------------------------------------------------------------------------------------------- +// XFrameActionListener +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL LayoutManager::frameAction( const FrameActionEvent& aEvent ) +throw ( RuntimeException ) +{ + if (( aEvent.Action == FrameAction_COMPONENT_ATTACHED ) || + ( aEvent.Action == FrameAction_COMPONENT_REATTACHED )) + { + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_ATTACHED|REATTACHED)" ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bComponentAttached = sal_True; + m_bMustDoLayout = sal_True; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + implts_reset( sal_True ); + implts_doLayout( sal_True, sal_False ); + implts_doLayout( sal_True, sal_True ); + } + else if (( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ) || + ( aEvent.Action == FrameAction_FRAME_UI_DEACTIVATING )) + { + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (FRAME_UI_ACTIVATED|DEACTIVATING)" ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bActive = ( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + implts_toggleFloatingUIElementsVisibility( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ); +// doLayout(); + } + else if ( aEvent.Action == FrameAction_COMPONENT_DETACHING ) + { + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_DETACHING)" ); + + // SAFE AREA ----------------------------------------------------------------------------------------------- + WriteGuard aWriteLock( m_aLock ); + m_bComponentAttached = sal_False; + aWriteLock.unlock(); + // SAFE AREA ----------------------------------------------------------------------------------------------- + + implts_reset( sal_False ); + } +} + +// ______________________________________________ + +void SAL_CALL LayoutManager::disposing( const css::lang::EventObject& rEvent ) +throw( RuntimeException ) +{ + sal_Bool bDisposeAndClear( sal_False ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + if ( rEvent.Source == Reference< XInterface >( m_xFrame, UNO_QUERY )) + { + // Our frame gets disposed, release all our references that depends on a working + // frame reference. + Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); + if ( m_pMiscOptions ) + { + m_pMiscOptions->RemoveListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); + delete m_pMiscOptions; + m_pMiscOptions = 0; + } + + delete m_pAddonOptions; + m_pAddonOptions = 0; + + // destroy all elements, it's possible that dettaching is NOT called! + implts_destroyElements(); + + m_aUIElements.clear(); + impl_clearUpMenuBar(); + m_xMenuBar.clear(); + if ( m_xInplaceMenuBar.is() ) + { + m_pInplaceMenuBar = 0; + m_xInplaceMenuBar->dispose(); + } + m_xInplaceMenuBar.clear(); + m_xContainerWindow.clear(); + m_xContainerTopWindow.clear(); + implts_destroyDockingAreaWindows(); + + if ( m_xModuleCfgMgr.is() ) + { + try + { + Reference< XUIConfiguration > xModuleCfgMgr( m_xModuleCfgMgr, UNO_QUERY ); + xModuleCfgMgr->removeConfigurationListener( + Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + } + + if ( m_xDocCfgMgr.is() ) + { + try + { + Reference< XUIConfiguration > xDocCfgMgr( m_xDocCfgMgr, UNO_QUERY ); + xDocCfgMgr->removeConfigurationListener( + Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch ( Exception& ) + { + } + } + + m_xDocCfgMgr.clear(); + m_xModuleCfgMgr.clear(); + m_xFrame.clear(); + delete m_pGlobalSettings; + m_pGlobalSettings = 0; + m_xDockingAreaAcceptor = Reference< ::com::sun::star::ui::XDockingAreaAcceptor >(); + + bDisposeAndClear = sal_True; + } + else if ( rEvent.Source == Reference< XInterface >( m_xContainerWindow, UNO_QUERY )) + { + // Our container window gets disposed. Remove all user interface elements. + m_aUIElements.clear(); + impl_clearUpMenuBar(); + m_xMenuBar.clear(); + if ( m_xInplaceMenuBar.is() ) + { + m_pInplaceMenuBar = 0; + m_xInplaceMenuBar->dispose(); + } + m_xInplaceMenuBar.clear(); + m_xContainerWindow.clear(); + m_xContainerTopWindow.clear(); + } + else if ( rEvent.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY )) + { + m_xDocCfgMgr.clear(); + } + else if ( rEvent.Source == Reference< XInterface >( m_xModuleCfgMgr , UNO_QUERY )) + { + m_xModuleCfgMgr.clear(); + } + + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + // Send disposing to our listener when we have lost our frame. + if ( bDisposeAndClear ) + { + // Send message to all listener and forget her references. + css::uno::Reference< css::frame::XLayoutManager > xThis( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ); + css::lang::EventObject aEvent( xThis ); + m_aListenerContainer.disposeAndClear( aEvent ); + } +} + +void SAL_CALL LayoutManager::elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException) +{ + ReadGuard aReadLock( m_aLock ); + + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + Reference< XUIElement > xElement; + Reference< XFrame > xFrame( m_xFrame ); + + if ( m_xFrame.is() ) + { + implts_findElement( Event.ResourceURL, aElementType, aElementName, xElement ); + + Reference< XUIElementSettings > xElementSettings( xElement, UNO_QUERY ); + if ( xElementSettings.is() ) + { + ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); + Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); + if ( xPropSet.is() ) + { + if ( Event.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY )) + xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xDocCfgMgr )); + } + xElementSettings->updateSettings(); + } + else + { + if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && + ( aElementName.indexOf( m_aCustomTbxPrefix ) != -1 )) + { + // custom toolbar must be directly created, shown and layouted! + createElement( Event.ResourceURL ); + Reference< XUIElement > xUIElement = getElement( Event.ResourceURL ); + if ( xUIElement.is() ) + { + Reference< XUIConfigurationManager > xCfgMgr; + Reference< XPropertySet > xPropSet; + ::rtl::OUString aUIName; + + try + { + xCfgMgr = Reference< XUIConfigurationManager >( Event.Source, UNO_QUERY ); + xPropSet = Reference< XPropertySet >( xCfgMgr->getSettings( Event.ResourceURL, sal_False ), UNO_QUERY ); + + if ( xPropSet.is() ) + xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= aUIName; + } + catch ( com::sun::star::container::NoSuchElementException& ) + { + } + catch ( com::sun::star::beans::UnknownPropertyException& ) + { + } + catch ( com::sun::star::lang::WrappedTargetException& ) + { + } + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + pWindow->SetText( aUIName ); + } + + showElement( Event.ResourceURL ); + } + } + } + } +} + +void SAL_CALL LayoutManager::elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + Reference< XUIElement > xUIElement; + Reference< XFrame > xFrame( m_xFrame ); + + if ( m_xFrame.is() ) + { + implts_findElement( Event.ResourceURL, aElementType, aElementName, xUIElement ); + + Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); + if ( xElementSettings.is() ) + { + bool bNoSettings( false ); + ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); + Reference< XInterface > xElementCfgMgr; + Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); + + if ( xPropSet.is() ) + xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; + + if ( !xElementCfgMgr.is() ) + return; + + // Check if the same UI configuration manager has changed => check further + if ( Event.Source == xElementCfgMgr ) + { + // Same UI configuration manager where our element has its settings + if ( Event.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY )) + { + // document settings removed + if ( m_xModuleCfgMgr->hasSettings( Event.ResourceURL )) + { + xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xModuleCfgMgr )); + xElementSettings->updateSettings(); + return; + } + } + + bNoSettings = true; + } + + // No settings anymore, element must be destroyed + if ( m_xContainerWindow.is() && bNoSettings ) + { + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + { + Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow && !m_bInplaceMenuSet ) + ((SystemWindow *)pWindow)->SetMenuBar( 0 ); + + Reference< XComponent > xComp( m_xMenuBar, UNO_QUERY ); + if ( xComp.is() ) + xComp->dispose(); + m_xMenuBar.clear(); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + { + destroyElement( Event.ResourceURL ); + } + } + } + } +} + +void SAL_CALL LayoutManager::elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException) +{ + ReadGuard aReadLock( m_aLock ); + + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + Reference< XUIElement > xUIElement; + Reference< XFrame > xFrame( m_xFrame ); + + if ( m_xFrame.is() ) + { + implts_findElement( Event.ResourceURL, aElementType, aElementName, xUIElement ); + + Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); + if ( xElementSettings.is() ) + { + ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); + Reference< XInterface > xElementCfgMgr; + Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); + + if ( xPropSet.is() ) + xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; + + if ( !xElementCfgMgr.is() ) + return; + + // Check if the same UI configuration manager has changed => update settings + if ( Event.Source == xElementCfgMgr ) + { + xElementSettings->updateSettings(); + if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + doLayout(); + } + } + } +} + +//--------------------------------------------------------------------------------------------------------- +// OPropertySetHelper +//--------------------------------------------------------------------------------------------------------- +// XPropertySet helper +sal_Bool SAL_CALL LayoutManager::convertFastPropertyValue( Any& aConvertedValue , + Any& aOldValue , + sal_Int32 nHandle , + const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) +{ + return LayoutManager_PBase::convertFastPropertyValue( aConvertedValue, aOldValue, nHandle, aValue ); +} + +void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , + const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ) +{ + if ( nHandle != LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY ) + LayoutManager_PBase::setFastPropertyValue_NoBroadcast( nHandle, aValue ); + + switch( nHandle ) + { + case LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER: + implts_updateMenuBarClose(); + break; + + case LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY: + { + sal_Bool bValue = sal_Bool(); + if (( aValue >>= bValue ) && bValue ) + implts_refreshContextToolbarsVisibility(); + break; + } + + case LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI: + implts_setCurrentUIVisibility( !m_bHideCurrentUI ); + break; + } +} + +void SAL_CALL LayoutManager::getFastPropertyValue( com::sun::star::uno::Any& aValue , + sal_Int32 nHandle ) const +{ + LayoutManager_PBase::getFastPropertyValue( aValue, nHandle ); +} + +::cppu::IPropertyArrayHelper& SAL_CALL LayoutManager::getInfoHelper() +{ + // Optimize this method ! + // We initialize a static variable only one time. And we don't must use a mutex at every call! + // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! + static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; + + if( pInfoHelper == NULL ) + { + // Ready for multithreading + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + + // Control this pointer again, another instance can be faster then these! + if( pInfoHelper == NULL ) + { + // Define static member to give structure of properties to baseclass "OPropertySetHelper". + uno::Sequence< beans::Property > aProperties; + describeProperties( aProperties ); + static ::cppu::OPropertyArrayHelper aInfoHelper( aProperties, sal_True ); + pInfoHelper = &aInfoHelper; + } + } + + return(*pInfoHelper); +} + +com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL LayoutManager::getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException) +{ + // Optimize this method ! + // We initialize a static variable only one time. And we don't must use a mutex at every call! + // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! + static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >* pInfo = NULL; + + if( pInfo == NULL ) + { + // Ready for multithreading + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + // Control this pointer again, another instance can be faster then these! + if( pInfo == NULL ) + { + // Create structure of propertysetinfo for baseclass "OPropertySetHelper". + // (Use method "getInfoHelper()".) + static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + pInfo = &xInfo; + } + } + + return (*pInfo); +} + +} // namespace framework + diff --git a/framework/source/layoutmanager/makefile.mk b/framework/source/layoutmanager/makefile.mk index 70215a36578d..7ce19a71f2f9 100644 --- a/framework/source/layoutmanager/makefile.mk +++ b/framework/source/layoutmanager/makefile.mk @@ -2,10 +2,14 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.5 $ +# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -35,12 +39,15 @@ ENABLE_EXCEPTIONS= TRUE .INCLUDE : settings.mk -VISIBILITY_HIDDEN = TRUE - # --- Generate ----------------------------------------------------- SLOFILES= \ - $(SLO)$/layoutmanager.obj + $(SLO)$/panelmanager.obj \ + $(SLO)$/layoutmanager.obj \ + $(SLO)$/panel.obj \ + $(SLO)$/helpers.obj \ + $(SLO)$/uielement.obj \ + $(SLO)$/toolbarlayoutmanager.obj # --- Targets ------------------------------------------------------ diff --git a/framework/source/layoutmanager/panel.cxx b/framework/source/layoutmanager/panel.cxx new file mode 100755 index 000000000000..69f6ad0f51d9 --- /dev/null +++ b/framework/source/layoutmanager/panel.cxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include "panel.hxx" +#include "helpers.hxx" + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +using namespace ::com::sun::star; + +namespace framework +{ + +Panel::Panel( + const uno::Reference< lang::XMultiServiceFactory >& rSMGR, + const uno::Reference< awt::XWindow >& rParent, + PanelPosition nPanel ) : + m_xSMGR(rSMGR), m_nPanelPosition(nPanel) +{ + uno::Reference< awt::XWindowPeer > xWindowPeer( rParent, uno::UNO_QUERY ); + m_xPanelWindow = uno::Reference< awt::XWindow >( createToolkitWindow( rSMGR, xWindowPeer, "splitwindow" ), uno::UNO_QUERY ); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + SplitWindow* pSplitWindow = dynamic_cast< SplitWindow* >( VCLUnoHelper::GetWindow( m_xPanelWindow )); + + if ( pSplitWindow ) + { + // Set alignment + if (nPanel == PANEL_TOP) + pSplitWindow->SetAlign( WINDOWALIGN_TOP ); + else if (nPanel == PANEL_BOTTOM) + pSplitWindow->SetAlign( WINDOWALIGN_BOTTOM ); + else if (nPanel == PANEL_LEFT) + pSplitWindow->SetAlign( WINDOWALIGN_LEFT ); + else + pSplitWindow->SetAlign( WINDOWALIGN_RIGHT ); + } +} + +Panel::~Panel() +{ +} + +} // namespace framework diff --git a/framework/source/layoutmanager/panel.hxx b/framework/source/layoutmanager/panel.hxx new file mode 100755 index 000000000000..e183c97ed5da --- /dev/null +++ b/framework/source/layoutmanager/panel.hxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_PANEL_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_PANEL_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +namespace framework +{ + +enum PanelPosition +{ + PANEL_TOP, + PANEL_LEFT, + PANEL_RIGHT, + PANEL_BOTTOM, + PANEL_COUNT +}; + +class Panel +{ + public: + Panel( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMGR, + const css::uno::Reference< css::awt::XWindow >& rParent, + PanelPosition nPanel ); + virtual ~Panel(); + + private: + css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; + css::uno::Reference< css::awt::XWindow > m_xPanelWindow; + PanelPosition m_nPanelPosition; +}; + +} + +#endif // __FRAMEWORK_LAYOUTMANAGER_PANEL_HXX_ diff --git a/framework/source/layoutmanager/panelmanager.cxx b/framework/source/layoutmanager/panelmanager.cxx new file mode 100755 index 000000000000..3c82a4fd4f28 --- /dev/null +++ b/framework/source/layoutmanager/panelmanager.cxx @@ -0,0 +1,184 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include "panelmanager.hxx" +#include "services.h" +#include "services/modelwinservice.hxx" + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +using namespace ::com::sun::star; + +namespace framework +{ + +//_________________________________________________________________________________________________________________ +// non exported definitions +//_________________________________________________________________________________________________________________ + +//_________________________________________________________________________________________________________________ +// declarations +//_________________________________________________________________________________________________________________ + + +PanelManager::PanelManager( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMGR, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) : + m_xSMGR( rSMGR ), + m_xFrame( rFrame ) +{ + m_aPanels[PANEL_TOP] = 0; + m_aPanels[PANEL_BOTTOM] = 0; + m_aPanels[PANEL_LEFT] = 0; + m_aPanels[PANEL_RIGHT] = 0; +} + +PanelManager::~PanelManager() +{ +} + +//--------------------------------------------------------------------------------------------------------- +// Creation and layouting +//--------------------------------------------------------------------------------------------------------- +bool PanelManager::createPanels() +{ + if ( m_xFrame.is() ) + { + uno::Reference< awt::XWindow > xWindow; + vos::OGuard aGuard( Application::GetSolarMutex() ); + xWindow = m_xFrame->getContainerWindow(), uno::UNO_QUERY; + if ( xWindow.is() ) + { + // destroy old panel windows + delete m_aPanels[PANEL_TOP ]; + delete m_aPanels[PANEL_BOTTOM]; + delete m_aPanels[PANEL_LEFT ]; + delete m_aPanels[PANEL_RIGHT ]; + + m_aPanels[PANEL_TOP ] = new Panel( m_xSMGR, xWindow, PANEL_TOP ); + m_aPanels[PANEL_BOTTOM] = new Panel( m_xSMGR, xWindow, PANEL_BOTTOM ); + m_aPanels[PANEL_LEFT ] = new Panel( m_xSMGR, xWindow, PANEL_LEFT ); + m_aPanels[PANEL_RIGHT ] = new Panel( m_xSMGR, xWindow, PANEL_RIGHT ); + return true; + } + } + + return false; +} + +awt::Rectangle PanelManager::getPreferredSize() const +{ + return awt::Rectangle(); +} + +void PanelManager::layoutPanels( const awt::Rectangle /*newSize*/ ) +{ +} + +//--------------------------------------------------------------------------------------------------------- +// Panel functions +//--------------------------------------------------------------------------------------------------------- +UIElement* PanelManager::findDockingWindow( const ::rtl::OUString& /*rResourceName*/ ) +{ + return NULL; +} + +bool PanelManager::addDockingWindow( const ::rtl::OUString& /*rResourceName*/, const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& /*xUIElement*/ ) +{ + return false; +} + +bool PanelManager::destroyDockingWindow( const ::rtl::OUString& /*rResourceName*/ ) +{ + return false; +} + +//--------------------------------------------------------------------------------------------------------- +// XDockableWindowListener +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL PanelManager::startDocking( const awt::DockingEvent& ) +throw (uno::RuntimeException) +{ +} + +awt::DockingData SAL_CALL PanelManager::docking( const awt::DockingEvent& ) +throw (uno::RuntimeException) +{ + return awt::DockingData(); +} + +void SAL_CALL PanelManager::endDocking( const awt::EndDockingEvent& ) +throw (uno::RuntimeException) +{ +} + +sal_Bool SAL_CALL PanelManager::prepareToggleFloatingMode( const lang::EventObject& ) +throw (uno::RuntimeException) +{ + return false; +} + +void SAL_CALL PanelManager::toggleFloatingMode( const lang::EventObject& ) +throw (uno::RuntimeException) +{ +} + +void SAL_CALL PanelManager::closed( const lang::EventObject& ) +throw (uno::RuntimeException) +{ +} + +void SAL_CALL PanelManager::endPopupMode( const awt::EndPopupModeEvent& ) +throw (uno::RuntimeException) +{ +} + +} // namespace framework diff --git a/framework/source/layoutmanager/panelmanager.hxx b/framework/source/layoutmanager/panelmanager.hxx new file mode 100755 index 000000000000..fd3e892414fa --- /dev/null +++ b/framework/source/layoutmanager/panelmanager.hxx @@ -0,0 +1,109 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_PANELMANAGER_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_PANELMANAGER_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "panel.hxx" +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +namespace framework +{ + +class PanelManager : private ThreadHelpBase // Struct for right initalization of mutex member! Must be first of baseclasses. +{ + public: + PanelManager( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMGR, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + virtual ~PanelManager(); + + bool createPanels(); + ::com::sun::star::awt::Rectangle getPreferredSize() const; + void layoutPanels( const ::com::sun::star::awt::Rectangle newSize ); + + UIElement* findDockingWindow( const ::rtl::OUString& rResourceName ); + bool addDockingWindow( const ::rtl::OUString& rResourceName, const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement ); + bool destroyDockingWindow( const ::rtl::OUString& rResourceName ); + + //--------------------------------------------------------------------------------------------------------- + // XDockableWindowListener + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException); + + private: + Panel* m_aPanels[PANEL_COUNT]; + css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; + css::uno::Reference< css::frame::XFrame > m_xFrame; +}; + +} // namespace framework + +#endif // __FRAMEWORK_LAYOUTMANAGER_PANELMANAGER_HXX_ diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx new file mode 100755 index 000000000000..076a82b24ebd --- /dev/null +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -0,0 +1,3915 @@ +/************************************************************************* + * + * 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: layoutmanager.cxx,v $ + * $Revision: 1.72 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include + +using namespace ::com::sun::star; + +namespace framework +{ + +ToolbarLayoutManager::ToolbarLayoutManager( + const uno::Reference< lang::XMultiServiceFactory >& xSMGR, + const uno::Reference< ui::XUIElementFactory >& xUIElementFactory ) + : ThreadHelpBase( &Application::GetSolarMutex() ), + m_xSMGR( xSMGR ), + m_xUIElementFactoryManager( xUIElementFactory ), + m_eDockOperation( DOCKOP_ON_COLROW ), + m_pAddonOptions( 0 ), + m_pGlobalSettings( 0 ), + m_bComponentAttached( false ), + m_bMustLayout( false ), + m_bLayoutDirty( false ), + m_bStoreWindowState( false ), + m_bGlobalSettings( false ), + m_bDockingInProgress( false ), + m_aFullAddonTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )), + m_aCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "custom_" )), + m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )) +{ + m_xToolkit = uno::Reference< css::awt::XToolkit >( m_xSMGR->createInstance( SERVICENAME_VCLTOOLKIT ), uno::UNO_QUERY ); +} + +ToolbarLayoutManager::~ToolbarLayoutManager() +{ +} + +//--------------------------------------------------------------------------------------------------------- +// XInterface +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL ToolbarLayoutManager::acquire() throw() +{ + OWeakObject::acquire(); +} + +void SAL_CALL ToolbarLayoutManager::release() throw() +{ + OWeakObject::release(); +} + +uno::Any SAL_CALL ToolbarLayoutManager::queryInterface( const uno::Type & rType ) throw( uno::RuntimeException ) +{ + uno::Any a = + ::cppu::queryInterface( rType, + SAL_STATIC_CAST( ::com::sun::star::awt::XDockableWindowListener*, this ), + SAL_STATIC_CAST( ::com::sun::star::ui::XUIConfigurationListener*, this )); + + if ( a.hasValue() ) + return a; + + return OWeakObject::queryInterface( rType ); +} + +void SAL_CALL ToolbarLayoutManager::disposing( const lang::EventObject& aEvent ) throw( uno::RuntimeException ) +{ + if ( aEvent.Source == m_xFrame ) + { + // Reset all internal references + reset(); + implts_destroyDockingAreaWindows(); + } +} + +::com::sun::star::awt::Rectangle ToolbarLayoutManager::getDockingArea() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + Rectangle aNewDockingArea( m_aDockingArea ); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( isLayoutDirty() ) + aNewDockingArea = implts_calcDockingArea(); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aWriteLock.lock(); + m_aDockingArea = aNewDockingArea; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + return impl_convertRectangleToAWT( aNewDockingArea ); +} + +void ToolbarLayoutManager::setDockingArea( const awt::Rectangle& rDockingArea ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_aDockingArea = impl_convertAWTToRectangle( rDockingArea ); + m_bLayoutDirty = true; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + implts_setDockingAreaWindowSizes( rDockingArea ); +} + +void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangle& rBorderSpace ) +{ + uno::Reference< css::awt::XWindow2 > xContainerWindow; + + ReadGuard aReadLock( m_aLock ); + xContainerWindow = m_xContainerWindow; + Rectangle aDockOffsets = m_aDockingAreaOffsets; + aReadLock.unlock(); + + uno::Reference< awt::XDevice > xDevice( xContainerWindow, uno::UNO_QUERY ); + + // Convert relativ size to output size. + awt::Rectangle aRectangle = xContainerWindow->getPosSize(); + awt::DeviceInfo aInfo = xDevice->getInfo(); + awt::Size aContainerClientSize = awt::Size( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , + aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); + long aStatusBarHeight = aDockOffsets.GetHeight(); + + sal_Int32 nLeftRightDockingAreaHeight( aContainerClientSize.Height ); + if ( rBorderSpace.Y >= 0 ) + { + // Top docking area window + aReadLock.lock(); + uno::Reference< awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); + aReadLock.unlock(); + + xDockAreaWindow->setPosSize( 0, 0, aContainerClientSize.Width, rBorderSpace.Y, awt::PosSize::POSSIZE ); + xDockAreaWindow->setVisible( sal_True ); + nLeftRightDockingAreaHeight -= rBorderSpace.Y; + } + + if ( rBorderSpace.Height >= 0 ) + { + // Bottom docking area window + sal_Int32 nBottomPos = std::max( sal_Int32( aContainerClientSize.Height - rBorderSpace.Height - aStatusBarHeight ), sal_Int32( 0 )); + sal_Int32 nHeight = ( nBottomPos == 0 ) ? 0 : rBorderSpace.Height; + + aReadLock.lock(); + uno::Reference< awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); + aReadLock.unlock(); + + xDockAreaWindow->setPosSize( 0, nBottomPos, aContainerClientSize.Width, nHeight, awt::PosSize::POSSIZE ); + xDockAreaWindow->setVisible( sal_True ); + nLeftRightDockingAreaHeight -= nHeight; + } + + nLeftRightDockingAreaHeight -= aStatusBarHeight; + if ( rBorderSpace.X >= 0 || nLeftRightDockingAreaHeight > 0 ) + { + // Left docking area window + aReadLock.lock(); + uno::Reference< awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); + aReadLock.unlock(); + + // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! + sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); + + xDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, awt::PosSize::POSSIZE ); + xDockAreaWindow->setVisible( sal_True ); + } + if ( rBorderSpace.Width >= 0 || nLeftRightDockingAreaHeight > 0 ) + { + // Right docking area window + aReadLock.lock(); + uno::Reference< awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] ); + aReadLock.unlock(); + + // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! + sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width )); + sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); + sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width; + + xDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, awt::PosSize::POSSIZE ); + xDockAreaWindow->setVisible( sal_True ); + } +} + +bool ToolbarLayoutManager::isLayoutDirty() +{ + return m_bLayoutDirty; +} + +void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) +{ + // Retrieve row/column dependent data from all docked user-interface elements + for ( sal_Int32 i = 0; i < DOCKINGAREAS_COUNT; i++ ) + { + std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; + + implts_getDockingAreaElementInfos( (ui::DockingArea)i, aRowColumnsWindowData ); + + sal_Int32 nOffset( 0 ); + const sal_uInt32 nCount = aRowColumnsWindowData.size(); + for ( sal_uInt32 j = 0; j < nCount; ++j ) + { + implts_calcWindowPosSizeOnSingleRowColumn( i, nOffset, aRowColumnsWindowData[j], aContainerSize ); + nOffset += aRowColumnsWindowData[j].nStaticSize; + } + } +} + +bool ToolbarLayoutManager::implts_isParentWindowVisible() const +{ + bool bVisible( false ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + if ( m_xContainerWindow.is() ) + bVisible = m_xContainerWindow->isVisible(); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + return bVisible; +} + +Rectangle ToolbarLayoutManager::implts_calcDockingArea() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + UIElementVector aWindowVector( m_aUIElements ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + Rectangle aBorderSpace; + sal_Int32 nCurrRowColumn( 0 ); + sal_Int32 nCurrPos( 0 ); + sal_Int32 nCurrDockingArea( ui::DockingArea_DOCKINGAREA_TOP ); + std::vector< sal_Int32 > aRowColumnSizes[DOCKINGAREAS_COUNT]; + UIElementVector::const_iterator pConstIter; + + aRowColumnSizes[nCurrDockingArea].clear(); + aRowColumnSizes[nCurrDockingArea].push_back( 0 ); + + for ( pConstIter = aWindowVector.begin(); pConstIter != aWindowVector.end(); pConstIter++ ) + { + uno::Reference< ui::XUIElement > xUIElement( pConstIter->m_xUIElement, uno::UNO_QUERY ); + if ( xUIElement.is() ) + { + uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xWindow.is() && xDockWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() && !xDockWindow->isFloating() ) + { + awt::Rectangle aPosSize = xWindow->getPosSize(); + if ( pConstIter->m_aDockedData.m_nDockedArea != nCurrDockingArea ) + { + nCurrDockingArea = pConstIter->m_aDockedData.m_nDockedArea; + nCurrRowColumn = 0; + nCurrPos = 0; + aRowColumnSizes[nCurrDockingArea].clear(); + aRowColumnSizes[nCurrDockingArea].push_back( 0 ); + } + + if ( pConstIter->m_aDockedData.m_nDockedArea == nCurrDockingArea ) + { + if (( pConstIter->m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( pConstIter->m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + if ( pConstIter->m_aDockedData.m_aPos.Y() > nCurrPos ) + { + ++nCurrRowColumn; + nCurrPos = pConstIter->m_aDockedData.m_aPos.Y(); + aRowColumnSizes[nCurrDockingArea].push_back( 0 ); + } + + if ( aPosSize.Height > aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] ) + aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] = aPosSize.Height; + } + else + { + if ( pConstIter->m_aDockedData.m_aPos.X() > nCurrPos ) + { + ++nCurrRowColumn; + nCurrPos = pConstIter->m_aDockedData.m_aPos.X(); + aRowColumnSizes[nCurrDockingArea].push_back( 0 ); + } + + if ( aPosSize.Width > aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] ) + aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] = aPosSize.Width; + } + } + } + } + } + } + + // Sum up max heights from every row/column + if ( !aWindowVector.empty() ) + { + for ( sal_Int32 i = 0; i <= ui::DockingArea_DOCKINGAREA_RIGHT; i++ ) + { + sal_Int32 nSize( 0 ); + const sal_uInt32 nCount = aRowColumnSizes[i].size(); + for ( sal_uInt32 j = 0; j < nCount; j++ ) + nSize += aRowColumnSizes[i][j]; + + if ( i == ui::DockingArea_DOCKINGAREA_TOP ) + aBorderSpace.Top() = nSize; + else if ( i == ui::DockingArea_DOCKINGAREA_BOTTOM ) + aBorderSpace.Bottom() = nSize; + else if ( i == ui::DockingArea_DOCKINGAREA_LEFT ) + aBorderSpace.Left() = nSize; + else + aBorderSpace.Right() = nSize; + } + } + + return aBorderSpace; +} + +void ToolbarLayoutManager::reset() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr = m_xModuleCfgMgr; + uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr = m_xDocCfgMgr; + m_xModuleCfgMgr.clear(); + m_xDocCfgMgr.clear(); + m_bComponentAttached = false; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + destroyToolbars(); +} + +void ToolbarLayoutManager::attach( + const uno::Reference< frame::XFrame >& xFrame, + const uno::Reference< ui::XUIConfigurationManager >& xModuleCfgMgr, + const uno::Reference< ui::XUIConfigurationManager >& xDocCfgMgr, + const uno::Reference< container::XNameAccess >& xPersistentWindowState ) +{ + // reset toolbar manager if we lose our current frame + if ( m_xFrame.is() && m_xFrame != xFrame ) + reset(); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_xFrame = xFrame; + m_xModuleCfgMgr = xModuleCfgMgr; + m_xDocCfgMgr = xDocCfgMgr; + m_xPersistentWindowState = xPersistentWindowState; + m_bComponentAttached = true; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +void ToolbarLayoutManager::createToolbars() +{ + resetDockingArea(); + implts_createCustomToolBars(); + implts_createAddonsToolBars(); + implts_createNonContextSensitiveToolBars(); + implts_sortUIElements(); +} + +bool ToolbarLayoutManager::createToolbar( const ::rtl::OUString& rResourceURL ) +{ + bool bNotify( false ); + uno::Reference< ui::XUIElement > xUITempElement; + + implts_createElement( rResourceURL, bNotify, xUITempElement ); + return bNotify; +} + +bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) +{ + UIElementVector::iterator pIter; + uno::Reference< lang::XComponent > xComponent; + + bool bMustBeDestroyed( false ); + bool bMustBeSorted( false ); + bool bNotify( false ); + bool bMustLayouted( false ); + rtl::OUString aAddonTbResourceName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == rResourceURL ) + { + xComponent.set( pIter->m_xUIElement, uno::UNO_QUERY ); + uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); + if ( xUIElement.is() ) + { + uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + + if ( rResourceURL.indexOf( aAddonTbResourceName ) != 0 ) + { + try + { + if ( xWindow.is() ) + xWindow->removeWindowListener( uno::Reference< awt::XWindowListener >( + static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); + } + catch( uno::Exception& ) + { + } + + try + { + if ( xDockWindow.is() ) + xDockWindow->removeDockableWindowListener( uno::Reference< awt::XDockableWindowListener >( + static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); + } + catch ( uno::Exception& ) + { + } + + bMustBeDestroyed = true; + } + else + { + pIter->m_bVisible = sal_False; + xWindow->setVisible( sal_False ); + bNotify = true; + } + + if ( !xDockWindow->isFloating() ) + bMustLayouted = true; + if ( bMustBeDestroyed ) + pIter->m_xUIElement.clear(); + + bMustBeSorted = true; + } + break; + } + } + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( bMustBeDestroyed ) + { + if ( xComponent.is() ) + xComponent->dispose(); + bNotify = true; + } + + if ( bMustLayouted ) + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aWriteLock.lock(); + m_bLayoutDirty = true; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + + if ( bMustBeSorted ) + implts_sortUIElements(); + + return bNotify; +} + +void ToolbarLayoutManager::destroyToolbars() +{ + UIElementVector aUIElementVector; + + WriteGuard aWriteLock( m_aLock ); + aUIElementVector = m_aUIElements; + m_aUIElements.clear(); + aWriteLock.unlock(); + + UIElementVector::iterator pIter; + for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) + { + uno::Reference< lang::XComponent > xComponent( pIter->m_xUIElement, uno::UNO_QUERY ); + if ( xComponent.is() ) + xComponent->dispose(); + } +} + +void ToolbarLayoutManager::dockToolbar( + const ::rtl::OUString& /*rResourceURL*/, + ::com::sun::star::ui::DockingArea /*eDockingArea*/, + const ::com::sun::star::awt::Point& /*aPos*/ ) +{ +} + +void ToolbarLayoutManager::resetDockingArea() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + uno::Reference< awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; + uno::Reference< awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; + uno::Reference< awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; + uno::Reference< awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( xTopDockingWindow.is() ) + xTopDockingWindow->setPosSize( 0, 0, 0, 0, awt::PosSize::POSSIZE ); + if ( xLeftDockingWindow.is() ) + xLeftDockingWindow->setPosSize( 0, 0, 0, 0, awt::PosSize::POSSIZE ); + if ( xRightDockingWindow.is() ) + xRightDockingWindow->setPosSize( 0, 0, 0, 0, awt::PosSize::POSSIZE ); + if ( xBottomDockingWindow.is() ) + xBottomDockingWindow->setPosSize( 0, 0, 0, 0, awt::PosSize::POSSIZE ); +} + +void ToolbarLayoutManager::setParentWindow( + const uno::Reference< awt::XWindowPeer >& xParentWindow ) +{ + uno::Reference< awt::XWindow > xTopDockingWindow = uno::Reference< awt::XWindow >( implts_createToolkitWindow( m_xToolkit, xParentWindow ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xLeftDockingWindow = uno::Reference< awt::XWindow >( implts_createToolkitWindow( m_xToolkit, xParentWindow ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xRightDockingWindow = uno::Reference< awt::XWindow >( implts_createToolkitWindow( m_xToolkit, xParentWindow ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xBottomDockingWindow = uno::Reference< awt::XWindow >( implts_createToolkitWindow( m_xToolkit, xParentWindow ), uno::UNO_QUERY ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_xContainerWindow = uno::Reference< awt::XWindow2 >( xParentWindow, uno::UNO_QUERY ); + + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] = xTopDockingWindow; + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] = xLeftDockingWindow; + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] = xRightDockingWindow; + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] = xBottomDockingWindow; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + implts_reparentToolbars(); +} + +void ToolbarLayoutManager::setDockingAreaOffsets( const ::Rectangle aOffsets ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_aDockingAreaOffsets = aOffsets; + m_bLayoutDirty = true; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +rtl::OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const +{ + String aAddonGenericTitle; + + aAddonGenericTitle = String( FwkResId( STR_TOOLBAR_TITLE_ADDON )); + const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); + + String aNumStr = rI18nHelper.GetNum( nNumber, 0, FALSE, FALSE ); + aAddonGenericTitle.SearchAndReplaceAscii( "%num%", aNumStr ); + + return rtl::OUString( aAddonGenericTitle ); +} + +void ToolbarLayoutManager::implts_createAddonsToolBars() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + if ( !m_pAddonOptions ) + m_pAddonOptions = new AddonsOptions; + + uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + uno::Reference< frame::XModel > xModel( impl_getModelFromFrame( xFrame )); + if ( implts_isPreviewModel( xModel )) + return; // no addon toolbars for preview frame! + + UIElementVector aUIElementVector; + uno::Sequence< uno::Sequence< beans::PropertyValue > > aAddonToolBarData; + uno::Reference< ui::XUIElement > xUIElement; + + sal_uInt32 nCount = m_pAddonOptions->GetAddonsToolBarCount(); + ::rtl::OUString aAddonsToolBarStaticName( m_aFullAddonTbxPrefix ); + ::rtl::OUString aElementType( RTL_CONSTASCII_USTRINGPARAM( "toolbar" )); + + uno::Sequence< beans::PropertyValue > aPropSeq( 2 ); + aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); + aPropSeq[0].Value <<= xFrame; + aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationData" )); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + ::rtl::OUString aAddonToolBarName( aAddonsToolBarStaticName + m_pAddonOptions->GetAddonsToolbarResourceName(i) ); + aAddonToolBarData = m_pAddonOptions->GetAddonsToolBarPart( i ); + aPropSeq[1].Value <<= aAddonToolBarData; + + UIElement aElement = implts_findElement( aAddonToolBarName ); + + // #i79828 + // It's now possible that we are called more than once. Be sure to not create + // add-on toolbars more than once! + if ( aElement.m_xUIElement.is() ) + continue; + + try + { + xUIElement = xUIElementFactory->createUIElement( aAddonToolBarName, aPropSeq ); + if ( xUIElement.is() ) + { + uno::Reference< awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + if ( xDockWindow.is() ) + { + try + { + xDockWindow->addDockableWindowListener( uno::Reference< awt::XDockableWindowListener >( static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); + xDockWindow->enableDocking( sal_True ); + uno::Reference< awt::XWindow > xWindow( xDockWindow, uno::UNO_QUERY ); + if ( xWindow.is() ) + xWindow->addWindowListener( uno::Reference< awt::XWindowListener >( static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); + } + catch ( uno::Exception& ) + { + } + } + + ::rtl::OUString aGenericAddonTitle = implts_generateGenericAddonToolbarTitle( i+1 ); + + if ( aElement.m_aName.getLength() > 0 ) + { + // Reuse a local entry so we are able to use the latest + // UI changes for this document. + implts_setElementData( aElement, xDockWindow ); + aElement.m_xUIElement = xUIElement; + if ( aElement.m_aUIName.getLength() == 0 ) + { + aElement.m_aUIName = aGenericAddonTitle; + implts_writeWindowStateData( aElement.m_aName, aElement ); + } + } + else + { + // Create new UI element and try to read its state data + UIElement aNewToolbar( aAddonToolBarName, aElementType, xUIElement ); + aNewToolbar.m_bFloating = sal_True; + implts_readWindowStateData( aAddonToolBarName, aNewToolbar ); + implts_setElementData( aNewToolbar, xDockWindow ); + if ( aNewToolbar.m_aUIName.getLength() == 0 ) + { + aNewToolbar.m_aUIName = aGenericAddonTitle; + implts_writeWindowStateData( aNewToolbar.m_aName, aNewToolbar ); + } + implts_insertElement( aNewToolbar ); + } + + uno::Reference< awt::XWindow > xWindow( xDockWindow, uno::UNO_QUERY ); + if ( xWindow.is() ) + { + // Set generic title for add-on toolbar + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow->GetText().Len() == 0 ) + pWindow->SetText( aGenericAddonTitle ); + if ( pWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolbar = (ToolBox *)pWindow; + pToolbar->SetMenuType(); + } + } + } + } + catch ( container::NoSuchElementException& ) + { + } + catch ( lang::IllegalArgumentException& ) + { + } + } +} + +void ToolbarLayoutManager::implts_createCustomToolBars() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + if ( !m_bComponentAttached ) + return; + + uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + uno::Reference< frame::XModel > xModel; + uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr, uno::UNO_QUERY ); + uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr, uno::UNO_QUERY ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( xFrame.is() ) + { + xModel = impl_getModelFromFrame( xFrame ); + if ( implts_isPreviewModel( xModel )) + return; // no custom toolbars for preview frame! + + uno::Sequence< uno::Sequence< beans::PropertyValue > > aTbxSeq; + if ( xDocCfgMgr.is() ) + { + aTbxSeq = xDocCfgMgr->getUIElementsInfo( ui::UIElementType::TOOLBAR ); + implts_createCustomToolBars( aTbxSeq ); // first create all document based toolbars + } + if ( xModuleCfgMgr.is() ) + { + aTbxSeq = xModuleCfgMgr->getUIElementsInfo( ui::UIElementType::TOOLBAR ); + implts_createCustomToolBars( aTbxSeq ); // second create module based toolbars + } + } +} + +void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + + if ( !m_xPersistentWindowState.is() || + !m_xFrame.is() || + !m_bComponentAttached ) + return; + + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + + uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); + uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( implts_isPreviewModel( impl_getModelFromFrame( xFrame ))) + return; + + std::vector< rtl::OUString > aMakeVisibleToolbars; + + try + { + uno::Sequence< ::rtl::OUString > aToolbarNames = xPersistentWindowState->getElementNames(); + + if ( aToolbarNames.getLength() > 0 ) + { + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + ::rtl::OUString aName; + + uno::Reference< ui::XUIElement > xUIElement; + aMakeVisibleToolbars.reserve(aToolbarNames.getLength()); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + const rtl::OUString* pTbNames = aToolbarNames.getConstArray(); + for ( sal_Int32 i = 0; i < aToolbarNames.getLength(); i++ ) + { + aName = pTbNames[i]; + if ( impl_parseResourceURL( aName, aElementType, aElementName )) + { + // Check that we only create: + // - Toolbars (the statusbar is also member of the persistent window state) + // - Not custom toolbars, there are created with their own method (implts_createCustomToolbars) + if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && + aElementName.indexOf( m_aCustomTbxPrefix ) == -1 ) + { + UIElement aNewToolbar = implts_findElement( aName ); + bool bFound = ( aNewToolbar.m_aName == aName ); + if ( !bFound ) + implts_readWindowStateData( aName, aNewToolbar ); + + if ( aNewToolbar.m_bVisible && !aNewToolbar.m_bContextSensitive ) + { + if ( !bFound ) + implts_insertElement( aNewToolbar ); + aMakeVisibleToolbars.push_back( aName ); + } + } + } + } + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + } + catch ( uno::RuntimeException& e ) + { + throw e; + } + catch ( uno::Exception& ) + { + } + + if ( !aMakeVisibleToolbars.empty() ) + { +// implts_lock(); +// ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &LayoutManager::requestElement, this,_1 )); +// implts_unlock(); + } +} + +void ToolbarLayoutManager::implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aTbxSeqSeq ) +{ + const uno::Sequence< beans::PropertyValue >* pTbxSeq = aTbxSeqSeq.getConstArray(); + for ( sal_Int32 i = 0; i < aTbxSeqSeq.getLength(); i++ ) + { + const uno::Sequence< beans::PropertyValue >& rTbxSeq = pTbxSeq[i]; + ::rtl::OUString aTbxResName; + ::rtl::OUString aTbxTitle; + for ( sal_Int32 j = 0; j < rTbxSeq.getLength(); j++ ) + { + if ( rTbxSeq[j].Name.equalsAscii( "ResourceURL" )) + rTbxSeq[j].Value >>= aTbxResName; + else if ( rTbxSeq[j].Name.equalsAscii( "UIName" )) + rTbxSeq[j].Value >>= aTbxTitle; + } + + // Only create custom toolbars. Their name have to start with "custom_"! + if ( aTbxResName.getLength() > 0 && aTbxResName.indexOf( m_aCustomTbxPrefix ) != -1 ) + implts_createCustomToolBar( aTbxResName, aTbxTitle ); + } +} + +void ToolbarLayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ) +{ + if ( aTbxResName.getLength() > 0 ) + { + bool bNotify( false ); + uno::Reference< ui::XUIElement > xUIElement; + implts_createElement( aTbxResName, bNotify, xUIElement ); + + if ( aTitle && xUIElement.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + pWindow->SetText( aTitle ); + } + } +} + +void ToolbarLayoutManager::implts_reparentToolbars() +{ + UIElementVector aUIElementVector; + uno::Reference< awt::XWindow > xTopDockWindow; + uno::Reference< awt::XWindow > xBottomDockWindow; + uno::Reference< awt::XWindow > xLeftDockWindow; + uno::Reference< awt::XWindow > xRightDockWindow; + uno::Reference< awt::XWindow2 > xContainerWindow; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + aUIElementVector = m_aUIElements; + xTopDockWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; + xBottomDockWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; + xLeftDockWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; + xRightDockWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; + xContainerWindow = m_xContainerWindow; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + Window* pTopDockWindow = VCLUnoHelper::GetWindow( xTopDockWindow ); + Window* pBottomDockWindow = VCLUnoHelper::GetWindow( xBottomDockWindow ); + Window* pLeftDockWindow = VCLUnoHelper::GetWindow( xLeftDockWindow ); + Window* pRightDockWindow = VCLUnoHelper::GetWindow( xRightDockWindow ); + + if ( pContainerWindow ) + { + UIElementVector::iterator pIter; + for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) + { + uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); + if ( xUIElement.is() ) + { + uno::Reference< awt::XWindow > xWindow; + try + { + // We have to retreive the window reference with try/catch as it is + // possible that all elements have been disposed! + xWindow = uno::Reference< awt::XWindow >( xUIElement->getRealInterface(), uno::UNO_QUERY ); + } + catch ( uno::RuntimeException& ) + { + throw; + } + catch ( uno::Exception& ) + { + } + + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + { + // Reparent our child windows acording to their current state. + if ( pIter->m_bFloating ) + pWindow->SetParent( pContainerWindow ); + else + { + if ( pIter->m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) + pWindow->SetParent( pTopDockWindow ); + else if ( pIter->m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) + pWindow->SetParent( pBottomDockWindow ); + else if ( pIter->m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_LEFT ) + pWindow->SetParent( pLeftDockWindow ); + else + pWindow->SetParent( pRightDockWindow ); + } + } + } + } + } +} + +void ToolbarLayoutManager::implts_createElement( const ::rtl::OUString& aName, bool& bNotify, uno::Reference< ui::XUIElement >& rUIElement ) +{ + bNotify = false; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); + uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( !xFrame.is() || !xContainerWindow.is() ) + return; + + bool bFound( false ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + uno::Reference< ui::XUIElement > xUIElement; + + UIElement aToolbarElement = implts_findElement( aName ); + bFound = aToolbarElement.m_xUIElement.is(); + + if ( !bFound ) + { + uno::Sequence< beans::PropertyValue > aPropSeq( 2 ); + aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); + aPropSeq[0].Value <<= xFrame; + aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" )); + aPropSeq[1].Value <<= sal_True; + + xUIElement = xUIElementFactory->createUIElement( aName, aPropSeq ); + sal_Bool bVisible( sal_False ); + if ( xUIElement.is() ) + { + rUIElement = xUIElement; + + uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + if ( xDockWindow.is() && xWindow.is() ) + { + try + { + xDockWindow->addDockableWindowListener( uno::Reference< awt::XDockableWindowListener >( + static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); + xWindow->addWindowListener( uno::Reference< awt::XWindowListener >( + static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); + xDockWindow->enableDocking( sal_True ); + } + catch ( uno::Exception& ) + { + } + } + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + UIElement rElement = impl_findElement( aName ); + if ( rElement.m_aName.getLength() > 0 ) + { + // Reuse a local entry so we are able to use the latest + // UI changes for this document. + implts_setElementData( rElement, xDockWindow ); + rElement.m_xUIElement = xUIElement; + bVisible = rElement.m_bVisible; + } + else + { + // Create new UI element and try to read its state data + UIElement aNewToolbar( aName, aElementType, xUIElement ); + implts_readWindowStateData( aName, aNewToolbar ); + implts_setElementData( aNewToolbar, xDockWindow ); + implts_insertElement( aNewToolbar ); + bVisible = aNewToolbar.m_bVisible; + } + + // set toolbar menu style according to customize command state + SvtCommandOptions aCmdOptions; + + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolbar = (ToolBox *)pWindow; + USHORT nMenuType = pToolbar->GetMenuType(); + if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, m_aCustomizeCmd )) + pToolbar->SetMenuType( nMenuType & ~TOOLBOX_MENUTYPE_CUSTOMIZE ); + else + pToolbar->SetMenuType( nMenuType | TOOLBOX_MENUTYPE_CUSTOMIZE ); + } + + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + + implts_sortUIElements(); + + if ( bVisible ) + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bLayoutDirty = true; + bNotify = true; + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + } +} + +uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( const ::rtl::OUString& aName ) +{ + uno::Reference< ui::XUIElement > xUIElement; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + uno::Sequence< beans::PropertyValue > aPropSeq( 2 ); + aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); + aPropSeq[0].Value <<= m_xFrame; + aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" )); + aPropSeq[1].Value <<= sal_True; + + try + { + if ( m_xUIElementFactoryManager.is() ) + xUIElement = m_xUIElementFactoryManager->createUIElement( aName, aPropSeq ); + } + catch ( container::NoSuchElementException& ) + { + } + catch ( lang::IllegalArgumentException& ) + { + } + + return xUIElement; +} + +void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno::Reference< awt::XDockableWindow >& rDockWindow ) +{ + ReadGuard aReadLock( m_aLock ); + sal_Bool bShowElement( rElement.m_bVisible && !rElement.m_bMasterHide && implts_isParentWindowVisible() ); + aReadLock.unlock(); + + uno::Reference< awt::XDockableWindow > xDockWindow( rDockWindow ); + uno::Reference< awt::XWindow2 > xWindow( xDockWindow, uno::UNO_QUERY ); + + Window* pWindow( 0 ); + ToolBox* pToolBox( 0 ); + + if ( xDockWindow.is() && xWindow.is() ) + { + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + { + String aText = pWindow->GetText(); + if ( aText.Len() == 0 ) + pWindow->SetText( rElement.m_aUIName ); + if ( rElement.m_bNoClose ) + pWindow->SetStyle( pWindow->GetStyle() & ~WB_CLOSEABLE ); + if ( pWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pWindow; + } + if ( pToolBox ) + { + if (( rElement.m_nStyle < 0 ) || + ( rElement.m_nStyle > BUTTON_SYMBOLTEXT )) + rElement.m_nStyle = BUTTON_SYMBOL; + pToolBox->SetButtonType( (ButtonType)rElement.m_nStyle ); + if ( rElement.m_bNoClose ) + pToolBox->SetFloatStyle( pToolBox->GetFloatStyle() & ~WB_CLOSEABLE ); + } + } + + if ( rElement.m_bFloating ) + { + if ( pWindow ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + String aText = pWindow->GetText(); + if ( aText.Len() == 0 ) + pWindow->SetText( rElement.m_aUIName ); + } + + ::Point aPos( rElement.m_aFloatingData.m_aPos.X(), + rElement.m_aFloatingData.m_aPos.Y() ); + sal_Bool bWriteData( sal_False ); + sal_Bool bUndefPos = ( rElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || + rElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); + sal_Bool bSetSize = ( rElement.m_aFloatingData.m_aSize.Width() != 0 && + rElement.m_aFloatingData.m_aSize.Height() != 0 ); + xDockWindow->setFloatingMode( sal_True ); + if ( bUndefPos ) + { + aPos = implts_findNextCascadeFloatingPos(); + rElement.m_aFloatingData.m_aPos = aPos; // set new cascaded position + bWriteData = sal_True; + } + + if( bSetSize ) + xWindow->setOutputSize( AWTSize( rElement.m_aFloatingData.m_aSize ) ); + else + { + if( pToolBox ) + { + // set an optimal initial floating size + vos::OGuard aGuard( Application::GetSolarMutex() ); + ::Size aSize( pToolBox->CalcFloatingWindowSizePixel() ); + pToolBox->SetOutputSizePixel( aSize ); + } + } + + // #i60882# IMPORTANT: Set position after size as it is + // possible that we position some part of the toolbar + // outside of the desktop. A default constructed toolbar + // always has one line. Now VCL automatically + // position the toolbar back into the desktop. Therefore + // we resize the toolbar with the new (wrong) position. + // To fix this problem we have to set the size BEFORE the + // position. + xWindow->setPosSize( aPos.X(), aPos.Y(), 0, 0, + css::awt::PosSize::POS ); + + if ( bWriteData ) + implts_writeWindowStateData( rElement.m_aName, rElement ); + if ( bShowElement && pWindow ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + } + } + else + { + ::Point aDockPos; + ::Point aPixelPos; + sal_Bool bSetSize( sal_False ); + ::Size aSize; + + if ( pToolBox ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pToolBox->SetAlign( ImplConvertAlignment(rElement.m_aDockedData.m_nDockedArea ) ); + pToolBox->SetLineCount( 1 ); + if ( rElement.m_aDockedData.m_bLocked ) + xDockWindow->lock(); + aSize = pToolBox->CalcWindowSizePixel(); + bSetSize = sal_True; + + if (( rElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && + ( rElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + { + implts_findNextDockingPos( (ui::DockingArea)rElement.m_aDockedData.m_nDockedArea, + aSize, + aDockPos, + aPixelPos ); + rElement.m_aDockedData.m_aPos = aDockPos; + } + } + + xWindow->setPosSize( aPixelPos.X(), + aPixelPos.Y(), + 0, 0, + css::awt::PosSize::POS ); + if( bSetSize ) + xWindow->setOutputSize( AWTSize( aSize) ); + + if ( bShowElement && pWindow ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow->Show( sal_True ); + } + } + } +} + +void ToolbarLayoutManager::implts_destroyDockingAreaWindows() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + uno::Reference< awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; + uno::Reference< awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; + uno::Reference< awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; + uno::Reference< awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP].clear(); + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT].clear(); + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT].clear(); + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM].clear(); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + // destroy windows + xTopDockingWindow->dispose(); + xLeftDockingWindow->dispose(); + xRightDockingWindow->dispose(); + xBottomDockingWindow->dispose(); +} + +//--------------------------------------------------------------------------------------------------------- +// persistence methods +//--------------------------------------------------------------------------------------------------------- + +sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ) +{ + sal_Bool bGetSettingsState( sal_False ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( xPersistentWindowState.is() ) + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aWriteLock.lock(); + sal_Bool bGlobalSettings( m_bGlobalSettings ); + GlobalSettings* pGlobalSettings( 0 ); + if ( m_pGlobalSettings == 0 ) + { + m_pGlobalSettings = new GlobalSettings( m_xSMGR ); + bGetSettingsState = sal_True; + } + pGlobalSettings = m_pGlobalSettings; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + try + { + uno::Sequence< beans::PropertyValue > aWindowState; + if ( xPersistentWindowState->getByName( aName ) >>= aWindowState ) + { + sal_Bool bValue( sal_False ); + for ( sal_Int32 n = 0; n < aWindowState.getLength(); n++ ) + { + if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_DOCKED )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bFloating = !bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_VISIBLE )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bVisible = bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_DOCKINGAREA )) + { + ui::DockingArea eDockingArea; + if ( aWindowState[n].Value >>= eDockingArea ) + rElementData.m_aDockedData.m_nDockedArea = sal_Int16( eDockingArea ); + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_DOCKPOS )) + { + awt::Point aPoint; + if ( aWindowState[n].Value >>= aPoint ) + { + rElementData.m_aDockedData.m_aPos.X() = aPoint.X; + rElementData.m_aDockedData.m_aPos.Y() = aPoint.Y; + } + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_POS )) + { + awt::Point aPoint; + if ( aWindowState[n].Value >>= aPoint ) + { + rElementData.m_aFloatingData.m_aPos.X() = aPoint.X; + rElementData.m_aFloatingData.m_aPos.Y() = aPoint.Y; + } + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_SIZE )) + { + awt::Size aSize; + if ( aWindowState[n].Value >>= aSize ) + { + rElementData.m_aFloatingData.m_aSize.Width() = aSize.Width; + rElementData.m_aFloatingData.m_aSize.Height() = aSize.Height; + } + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_UINAME )) + aWindowState[n].Value >>= rElementData.m_aUIName; + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_STYLE )) + { + sal_Int32 nStyle = 0; + if ( aWindowState[n].Value >>= nStyle ) + rElementData.m_nStyle = sal_Int16( nStyle ); + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_LOCKED )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_aDockedData.m_bLocked = bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXT )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bContextSensitive = bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_NOCLOSE )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bNoClose = bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXTACTIVE )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bContextActive = bValue; + } + else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_SOFTCLOSE )) + { + if ( aWindowState[n].Value >>= bValue ) + rElementData.m_bSoftClose = bValue; + } + } + } + + // oversteer values with global settings + if ( pGlobalSettings && ( bGetSettingsState || bGlobalSettings )) + { + if ( pGlobalSettings->HasStatesInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR )) + { + WriteGuard aWriteLock2( m_aLock ); + m_bGlobalSettings = sal_True; + aWriteLock2.unlock(); + + css::uno::Any aValue; + sal_Bool bValue = sal_Bool(); + if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR, + GlobalSettings::STATEINFO_LOCKED, + aValue )) + aValue >>= rElementData.m_aDockedData.m_bLocked; + if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR, + GlobalSettings::STATEINFO_DOCKED, + aValue )) + { + if ( aValue >>= bValue ) + rElementData.m_bFloating = !bValue; + } + } + } + + return sal_True; + } + catch ( container::NoSuchElementException& ) + { + } + } + + return sal_False; +} + +void ToolbarLayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, const UIElement& rElementData ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + + // set flag to determine that we triggered the notification + m_bStoreWindowState = true; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + sal_Bool bPersistent( sal_False ); + uno::Reference< beans::XPropertySet > xPropSet( rElementData.m_xUIElement, uno::UNO_QUERY ); + if ( xPropSet.is() ) + { + try + { + // Check persistent flag of the user interface element + xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" ))) >>= bPersistent; + } + catch ( beans::UnknownPropertyException ) + { + // Non-configurable elements should at least store their dimension/position + bPersistent = sal_True; + } + catch ( lang::WrappedTargetException ) + { + } + } + + if ( bPersistent && xPersistentWindowState.is() ) + { + try + { + uno::Sequence< beans::PropertyValue > aWindowState( 8 ); + + aWindowState[0].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKED ); + aWindowState[0].Value = ::uno::makeAny( sal_Bool( !rElementData.m_bFloating )); + aWindowState[1].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_VISIBLE ); + aWindowState[1].Value = uno::makeAny( sal_Bool( rElementData.m_bVisible )); + + aWindowState[2].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKINGAREA ); + aWindowState[2].Value = uno::makeAny( static_cast< ui::DockingArea >( rElementData.m_aDockedData.m_nDockedArea ) ); + + awt::Point aPos; + aPos.X = rElementData.m_aDockedData.m_aPos.X(); + aPos.Y = rElementData.m_aDockedData.m_aPos.Y(); + aWindowState[3].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKPOS ); + aWindowState[3].Value <<= aPos; + + aPos.X = rElementData.m_aFloatingData.m_aPos.X(); + aPos.Y = rElementData.m_aFloatingData.m_aPos.Y(); + aWindowState[4].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_POS ); + aWindowState[4].Value <<= aPos; + + awt::Size aSize; + aSize.Width = rElementData.m_aFloatingData.m_aSize.Width(); + aSize.Height = rElementData.m_aFloatingData.m_aSize.Height(); + aWindowState[5].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_SIZE ); + aWindowState[5].Value <<= aSize; + aWindowState[6].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_UINAME ); + aWindowState[6].Value = uno::makeAny( rElementData.m_aUIName ); + aWindowState[7].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_LOCKED ); + aWindowState[7].Value = uno::makeAny( rElementData.m_aDockedData.m_bLocked ); + + if ( xPersistentWindowState->hasByName( aName )) + { + uno::Reference< container::XNameReplace > xReplace( xPersistentWindowState, uno::UNO_QUERY ); + xReplace->replaceByName( aName, uno::makeAny( aWindowState )); + } + else + { + uno::Reference< container::XNameContainer > xInsert( xPersistentWindowState, uno::UNO_QUERY ); + xInsert->insertByName( aName, uno::makeAny( aWindowState )); + } + } + catch ( uno::Exception& ) + { + } + } + + // Reset flag + aWriteLock.lock(); + m_bStoreWindowState = false; + aWriteLock.unlock(); +} + +/****************************************************************************** + LOOKUP PART FOR TOOLBARS +******************************************************************************/ + +UIElement& ToolbarLayoutManager::impl_findElement( + const rtl::OUString& aName ) +{ + static UIElement aEmptyElement; + UIElementVector::iterator pIter; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName ) + return *pIter; + } + + return aEmptyElement; + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +UIElement ToolbarLayoutManager::implts_findElement( + const rtl::OUString& aName ) +{ + UIElement aEmptyElement; + UIElementVector::iterator pIter; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName ) + return *pIter; + } + + return aEmptyElement; + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +UIElement ToolbarLayoutManager::implts_findElement( + const uno::Reference< uno::XInterface >& xToolbar ) +{ + UIElement aToolbar; + UIElementVector::const_iterator pIter; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_xUIElement.is() ) + { + uno::Reference< uno::XInterface > xIfac( pIter->m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + if ( xIfac == xToolbar ) + { + aToolbar = *pIter; + break; + } + } + } + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + return aToolbar; +} + +bool ToolbarLayoutManager::implts_insertElement( const UIElement& rUIElement ) +{ + UIElement aTempData; + bool bFound( false ); + bool bResult( false ); + + aTempData = implts_findElement( rUIElement.m_aName ); + if ( aTempData.m_aName == rUIElement.m_aName ) + bFound = true; + + if ( !bFound ) + { + WriteGuard aWriteLock( m_aLock ); + m_aUIElements.push_back( rUIElement ); + bResult = true; + } + + return bResult; +} + +void ToolbarLayoutManager::implts_setElement( const UIElement& rUIElement ) +{ + WriteGuard aWriteLock( m_aLock ); + UIElement& rData = impl_findElement( rUIElement.m_aName ); + if ( rData.m_aName == rUIElement.m_aName ) + rData = rUIElement; + else + m_aUIElements.push_back( rUIElement ); +} + +/****************************************************************************** + LAYOUT CODE PART FOR TOOLBARS +******************************************************************************/ + +::Point ToolbarLayoutManager::implts_findNextCascadeFloatingPos() +{ + const sal_Int32 nHotZoneX = 50; + const sal_Int32 nHotZoneY = 50; + const sal_Int32 nCascadeIndentX = 15; + const sal_Int32 nCascadeIndentY = 15; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + uno::Reference< awt::XWindow2 > xContainerWindow = m_xContainerWindow; + uno::Reference< awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; + uno::Reference< awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + ::Point aStartPos( nCascadeIndentX, nCascadeIndentY ); + ::Point aCurrPos( aStartPos ); + css::awt::Rectangle aRect; + + Window* pContainerWindow( 0 ); + if ( xContainerWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + if ( pContainerWindow ) + aStartPos = pContainerWindow->OutputToScreenPixel( aStartPos ); + } + + // Determine size of top and left docking area + css::awt::Rectangle aTopRect = xTopDockingWindow->getPosSize(); + css::awt::Rectangle aLeftRect = xLeftDockingWindow->getPosSize(); + + aStartPos.X() += aLeftRect.Width + nCascadeIndentX; + aStartPos.Y() += aTopRect.Height + nCascadeIndentY; + aCurrPos = aStartPos; + + // Try to find a cascaded position for the new floating window + UIElementVector::const_iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_xUIElement.is() ) + { + uno::Reference< awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xWindow( xDockWindow, uno::UNO_QUERY ); + if ( xDockWindow.is() && xDockWindow->isFloating() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() ) + { + css::awt::Rectangle aFloatRect = xWindow->getPosSize(); + if ((( aFloatRect.X - nHotZoneX ) <= aCurrPos.X() ) && + ( aFloatRect.X >= aCurrPos.X() ) && + (( aFloatRect.Y - nHotZoneY ) <= aCurrPos.Y() ) && + ( aFloatRect.Y >= aCurrPos.Y() )) + { + aCurrPos.X() = aFloatRect.X + nCascadeIndentX; + aCurrPos.Y() = aFloatRect.Y + nCascadeIndentY; + } + } + } + } + } + + return aCurrPos; +} + +void ToolbarLayoutManager::implts_sortUIElements() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + UIElementVector::iterator pIterStart = m_aUIElements.begin(); + UIElementVector::iterator pIterEnd = m_aUIElements.end(); + + std::stable_sort( pIterStart, pIterEnd ); // first created element should first + + // We have to reset our temporary flags. + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + pIter->m_bUserActive = sal_False; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +::Size ToolbarLayoutManager::implts_getTopBottomDockingAreaSizes() +{ + ::Size aSize; + uno::Reference< awt::XWindow > xTopDockingAreaWindow; + uno::Reference< awt::XWindow > xBottomDockingAreaWindow; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + xTopDockingAreaWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; + xBottomDockingAreaWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( xTopDockingAreaWindow.is() ) + aSize.Width() = xTopDockingAreaWindow->getPosSize().Height; + if ( xBottomDockingAreaWindow.is() ) + aSize.Height() = xBottomDockingAreaWindow->getPosSize().Height; + + return aSize; +} + +void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eDockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ) +{ + std::vector< UIElement > aWindowVector; + + if (( eDockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) + eDockingArea = ui::DockingArea_DOCKINGAREA_TOP; + + uno::Reference< awt::XWindow > xDockAreaWindow; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + aWindowVector.reserve(m_aUIElements.size()); + xDockAreaWindow = m_xDockAreaWindows[eDockingArea]; + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea && pIter->m_bVisible && !pIter->m_bFloating ) + { + uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); + if ( xUIElement.is() ) + { + uno::Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xDockWindow.is() ) + { + // docked windows + aWindowVector.push_back( *pIter ); + } + } + } + } + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + rRowColumnsWindowData.clear(); + + // Collect data from windows that are on the same row/column + sal_Int32 j; + sal_Int32 nIndex( 0 ); + sal_Int32 nLastPos( 0 ); + sal_Int32 nCurrPos( -1 ); + sal_Int32 nLastRowColPixelPos( 0 ); + awt::Rectangle aDockAreaRect; + + if ( xDockAreaWindow.is() ) + aDockAreaRect = xDockAreaWindow->getPosSize(); + + if ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) + nLastRowColPixelPos = 0; + else if ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) + nLastRowColPixelPos = aDockAreaRect.Height; + else if ( eDockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) + nLastRowColPixelPos = 0; + else + nLastRowColPixelPos = aDockAreaRect.Width; + + const sal_uInt32 nCount = aWindowVector.size(); + for ( j = 0; j < sal_Int32( nCount); j++ ) + { + const UIElement& rElement = aWindowVector[j]; + uno::Reference< awt::XWindow > xWindow; + uno::Reference< ui::XUIElement > xUIElement( rElement.m_xUIElement ); + awt::Rectangle aPosSize; + + if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) ) + continue; + if (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + if ( nCurrPos == -1 ) + { + nCurrPos = rElement.m_aDockedData.m_aPos.Y(); + nLastPos = 0; + + SingleRowColumnWindowData aRowColumnWindowData; + aRowColumnWindowData.nRowColumn = nCurrPos; + rRowColumnsWindowData.push_back( aRowColumnWindowData ); + } + + sal_Int32 nSpace( 0 ); + if ( rElement.m_aDockedData.m_aPos.Y() != nCurrPos ) + { + if ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) + nLastRowColPixelPos += rRowColumnsWindowData[nIndex].nStaticSize; + else + nLastRowColPixelPos -= rRowColumnsWindowData[nIndex].nStaticSize; + ++nIndex; + nLastPos = 0; + nCurrPos = rElement.m_aDockedData.m_aPos.Y(); + SingleRowColumnWindowData aRowColumnWindowData; + aRowColumnWindowData.nRowColumn = nCurrPos; + rRowColumnsWindowData.push_back( aRowColumnWindowData ); + } + + // Calc space before an element and store it + nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); + if ( rElement.m_aDockedData.m_aPos.X() >= nLastPos ) + { + rRowColumnsWindowData[nIndex].nSpace += nSpace; + nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width; + } + else + { + nSpace = 0; + nLastPos += aPosSize.Width; + } + rRowColumnsWindowData[nIndex].aRowColumnSpace.push_back( nSpace ); + + rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); + rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); + rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( + css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); + if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Height ) + rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Height; + if ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) + rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, nLastRowColPixelPos, + aDockAreaRect.Width, aPosSize.Height ); + else + rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, ( nLastRowColPixelPos - aPosSize.Height ), + aDockAreaRect.Width, aPosSize.Height ); + rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Width + nSpace; + } + else + { + if ( nCurrPos == -1 ) + { + nCurrPos = rElement.m_aDockedData.m_aPos.X(); + nLastPos = 0; + + SingleRowColumnWindowData aRowColumnWindowData; + aRowColumnWindowData.nRowColumn = nCurrPos; + rRowColumnsWindowData.push_back( aRowColumnWindowData ); + } + + sal_Int32 nSpace( 0 ); + if ( rElement.m_aDockedData.m_aPos.X() != nCurrPos ) + { + if ( eDockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) + nLastRowColPixelPos += rRowColumnsWindowData[nIndex].nStaticSize; + else + nLastRowColPixelPos -= rRowColumnsWindowData[nIndex].nStaticSize; + ++nIndex; + nLastPos = 0; + nCurrPos = rElement.m_aDockedData.m_aPos.X(); + SingleRowColumnWindowData aRowColumnWindowData; + aRowColumnWindowData.nRowColumn = nCurrPos; + rRowColumnsWindowData.push_back( aRowColumnWindowData ); + } + + // Calc space before an element and store it + nSpace = ( rElement.m_aDockedData.m_aPos.Y() - nLastPos ); + if ( rElement.m_aDockedData.m_aPos.Y() > nLastPos ) + { + rRowColumnsWindowData[nIndex].nSpace += nSpace; + nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; + } + else + { + nSpace = 0; + nLastPos += aPosSize.Height; + } + rRowColumnsWindowData[nIndex].aRowColumnSpace.push_back( nSpace ); + + rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); + rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); + rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( + css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); + if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Width ) + rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Width; + if ( eDockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) + rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( nLastRowColPixelPos, 0, + aPosSize.Width, aDockAreaRect.Height ); + else + rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( ( nLastRowColPixelPos - aPosSize.Width ), 0, + aPosSize.Width, aDockAreaRect.Height ); + rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Height + nSpace; + } + } +} + +void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::DockingArea eDockingArea, sal_Int32 nRowCol, SingleRowColumnWindowData& rRowColumnWindowData ) +{ + std::vector< UIElement > aWindowVector; + + if (( eDockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) + eDockingArea = ui::DockingArea_DOCKINGAREA_TOP; + + sal_Bool bHorzDockArea = (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + UIElementVector::iterator pIter; + UIElementVector::iterator pEnd = m_aUIElements.end(); + for ( pIter = m_aUIElements.begin(); pIter != pEnd; pIter++ ) + { + if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea ) + { + sal_Bool bSameRowCol = bHorzDockArea ? + ( pIter->m_aDockedData.m_aPos.Y() == nRowCol ) : + ( pIter->m_aDockedData.m_aPos.X() == nRowCol ); + uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); + + if ( bSameRowCol && xUIElement.is() ) + { + uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + if ( xWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( pWindow && pIter->m_bVisible && xDockWindow.is() && !pIter->m_bFloating ) + { + // docked windows + aWindowVector.push_back( *pIter ); + } + } + } + } + } + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + // Initialize structure + rRowColumnWindowData.aUIElementNames.clear(); + rRowColumnWindowData.aRowColumnWindows.clear(); + rRowColumnWindowData.aRowColumnWindowSizes.clear(); + rRowColumnWindowData.aRowColumnSpace.clear(); + rRowColumnWindowData.nVarSize = 0; + rRowColumnWindowData.nStaticSize = 0; + rRowColumnWindowData.nSpace = 0; + rRowColumnWindowData.nRowColumn = nRowCol; + + // Collect data from windows that are on the same row/column + sal_Int32 j; + sal_Int32 nLastPos( 0 ); + + const sal_uInt32 nCount = aWindowVector.size(); + for ( j = 0; j < sal_Int32( nCount); j++ ) + { + const UIElement& rElement = aWindowVector[j]; + uno::Reference< awt::XWindow > xWindow; + uno::Reference< ui::XUIElement > xUIElement( rElement.m_xUIElement ); + awt::Rectangle aPosSize; + if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) ) + continue; + + sal_Int32 nSpace; + if (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); + + // Calc space before an element and store it + if ( rElement.m_aDockedData.m_aPos.X() > nLastPos ) + rRowColumnWindowData.nSpace += nSpace; + else + nSpace = 0; + + nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width; + + + rRowColumnWindowData.aRowColumnWindowSizes.push_back( + css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); + if ( rRowColumnWindowData.nStaticSize < aPosSize.Height ) + rRowColumnWindowData.nStaticSize = aPosSize.Height; + rRowColumnWindowData.nVarSize += aPosSize.Width; + } + else + { + // Calc space before an element and store it + nSpace = ( rElement.m_aDockedData.m_aPos.Y() - nLastPos ); + if ( rElement.m_aDockedData.m_aPos.Y() > nLastPos ) + rRowColumnWindowData.nSpace += nSpace; + else + nSpace = 0; + + nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; + + rRowColumnWindowData.aRowColumnWindowSizes.push_back( + css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); + if ( rRowColumnWindowData.nStaticSize < aPosSize.Width ) + rRowColumnWindowData.nStaticSize = aPosSize.Width; + rRowColumnWindowData.nVarSize += aPosSize.Height; + } + + rRowColumnWindowData.aUIElementNames.push_back( rElement.m_aName ); + rRowColumnWindowData.aRowColumnWindows.push_back( xWindow ); + rRowColumnWindowData.aRowColumnSpace.push_back( nSpace ); + rRowColumnWindowData.nVarSize += nSpace; + } +} + +::Rectangle ToolbarLayoutManager::implts_getWindowRectFromRowColumn( + ui::DockingArea DockingArea, + const SingleRowColumnWindowData& rRowColumnWindowData, + const ::Point& rMousePos, + const rtl::OUString& rExcludeElementName ) +{ + ::Rectangle aWinRect; + + if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) + DockingArea = ui::DockingArea_DOCKINGAREA_TOP; + + if ( rRowColumnWindowData.aRowColumnWindows.empty() ) + return aWinRect; + else + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + uno::Reference< awt::XWindow2 > xContainerWindow = m_xContainerWindow; + uno::Reference< awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[DockingArea]; + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect + vos::OGuard aGuard( Application::GetSolarMutex() ); + + // Retrieve output size from container Window + Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow )); + Window* pDockingAreaWindow( VCLUnoHelper::GetWindow( xDockingAreaWindow )); + if ( pDockingAreaWindow && pContainerWindow ) + { + const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindows.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + awt::Rectangle aWindowRect = rRowColumnWindowData.aRowColumnWindows[i]->getPosSize(); + ::Rectangle aRect( aWindowRect.X, aWindowRect.Y, aWindowRect.X+aWindowRect.Width, aWindowRect.Y+aWindowRect.Height ); + aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); + if ( aRect.IsInside( rMousePos )) + { + // Check if we have found the excluded element. If yes, we have to provide an empty rectangle. + // We prevent that a toolbar cannot be moved when the mouse pointer is inside its own rectangle! + if ( rExcludeElementName != rRowColumnWindowData.aUIElementNames[i] ) + return aRect; + else + break; + } + } + } + } + + return aWinRect; +} + +::Rectangle ToolbarLayoutManager::implts_determineFrontDockingRect( + ui::DockingArea eDockingArea, + sal_Int32 nRowCol, + const ::Rectangle& rDockedElementRect, + const ::rtl::OUString& rMovedElementName, + const ::Rectangle& rMovedElementRect ) +{ + SingleRowColumnWindowData aRowColumnWindowData; + + sal_Bool bHorzDockArea = (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + + implts_getDockingAreaElementInfoOnSingleRowCol( eDockingArea, nRowCol, aRowColumnWindowData ); + if ( aRowColumnWindowData.aRowColumnWindows.empty() ) + return rMovedElementRect; + else + { + sal_Int32 nSpace( 0 ); + ::Rectangle aFrontDockingRect( rMovedElementRect ); + const sal_uInt32 nCount = aRowColumnWindowData.aRowColumnWindows.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + if ( bHorzDockArea ) + { + if ( aRowColumnWindowData.aRowColumnWindowSizes[i].X >= rDockedElementRect.Left() ) + { + nSpace += aRowColumnWindowData.aRowColumnSpace[i]; + break; + } + else if ( aRowColumnWindowData.aUIElementNames[i] == rMovedElementName ) + nSpace += aRowColumnWindowData.aRowColumnWindowSizes[i].Width + + aRowColumnWindowData.aRowColumnSpace[i]; + else + nSpace = 0; + } + else + { + if ( aRowColumnWindowData.aRowColumnWindowSizes[i].Y >= rDockedElementRect.Top() ) + { + nSpace += aRowColumnWindowData.aRowColumnSpace[i]; + break; + } + else if ( aRowColumnWindowData.aUIElementNames[i] == rMovedElementName ) + nSpace += aRowColumnWindowData.aRowColumnWindowSizes[i].Height + + aRowColumnWindowData.aRowColumnSpace[i]; + else + nSpace = 0; + } + } + + if ( nSpace > 0 ) + { + sal_Int32 nMove = std::min( nSpace, static_cast(aFrontDockingRect.getWidth()) ); + if ( bHorzDockArea ) + aFrontDockingRect.Move( -nMove, 0 ); + else + aFrontDockingRect.Move( 0, -nMove ); + } + + return aFrontDockingRect; + } +} + +void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + uno::Reference< awt::XWindow > xDockingWindow = m_xDockAreaWindows[DockingArea]; + ::Size aDockingWinSize; + Window* pDockingWindow( 0 ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) + DockingArea = ui::DockingArea_DOCKINGAREA_TOP; + + { + // Retrieve output size from container Window + vos::OGuard aGuard( Application::GetSolarMutex() ); + pDockingWindow = VCLUnoHelper::GetWindow( xDockingWindow ); + if ( pDockingWindow ) + aDockingWinSize = pDockingWindow->GetOutputSizePixel(); + } + + sal_Int32 nFreeRowColPixelPos( 0 ); + sal_Int32 nMaxSpace( 0 ); + sal_Int32 nNeededSpace( 0 ); + sal_Int32 nTopDockingAreaSize( 0 ); + + if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + nMaxSpace = aDockingWinSize.Width(); + nNeededSpace = aUIElementSize.Width(); + } + else + { + nMaxSpace = aDockingWinSize.Height(); + nNeededSpace = aUIElementSize.Height(); + nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); + } + + std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; + + implts_getDockingAreaElementInfos( DockingArea, aRowColumnsWindowData ); + sal_Int32 nPixelPos( 0 ); + const sal_uInt32 nCount = aRowColumnsWindowData.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + SingleRowColumnWindowData& rRowColumnWindowData = aRowColumnsWindowData[i]; + + if (( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) || + ( DockingArea == ui::DockingArea_DOCKINGAREA_RIGHT )) + nPixelPos += rRowColumnWindowData.nStaticSize; + + if ((( nMaxSpace - rRowColumnWindowData.nVarSize ) >= nNeededSpace ) || + ( rRowColumnWindowData.nSpace >= nNeededSpace )) + { + // Check current row where we can find the needed space + sal_Int32 nCurrPos( 0 ); + const sal_uInt32 nWindowSizesCount = rRowColumnWindowData.aRowColumnWindowSizes.size(); + for ( sal_uInt32 j = 0; j < nWindowSizesCount; j++ ) + { + css::awt::Rectangle rRect = rRowColumnWindowData.aRowColumnWindowSizes[j]; + sal_Int32& rSpace = rRowColumnWindowData.aRowColumnSpace[j]; + if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + if ( rSpace >= nNeededSpace ) + { + rVirtualPos = ::Point( nCurrPos, rRowColumnWindowData.nRowColumn ); + if ( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) + rPixelPos = ::Point( nCurrPos, nPixelPos ); + else + rPixelPos = ::Point( nCurrPos, aDockingWinSize.Height() - nPixelPos ); + return; + } + nCurrPos = rRect.X + rRect.Width; + } + else + { + if ( rSpace >= nNeededSpace ) + { + rVirtualPos = ::Point( rRowColumnWindowData.nRowColumn, nCurrPos ); + if ( DockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) + rPixelPos = ::Point( nPixelPos, nTopDockingAreaSize + nCurrPos ); + else + rPixelPos = ::Point( aDockingWinSize.Width() - nPixelPos , nTopDockingAreaSize + nCurrPos ); + return; + } + nCurrPos = rRect.Y + rRect.Height; + } + } + + if (( nCurrPos + nNeededSpace ) <= nMaxSpace ) + { + if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + rVirtualPos = ::Point( nCurrPos, rRowColumnWindowData.nRowColumn ); + if ( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) + rPixelPos = ::Point( nCurrPos, nPixelPos ); + else + rPixelPos = ::Point( nCurrPos, aDockingWinSize.Height() - nPixelPos ); + return; + } + else + { + rVirtualPos = ::Point( rRowColumnWindowData.nRowColumn, nCurrPos ); + if ( DockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) + rPixelPos = ::Point( nPixelPos, nTopDockingAreaSize + nCurrPos ); + else + rPixelPos = ::Point( aDockingWinSize.Width() - nPixelPos , nTopDockingAreaSize + nCurrPos ); + return; + } + } + } + + if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == ui::DockingArea_DOCKINGAREA_LEFT )) + nPixelPos += rRowColumnWindowData.nStaticSize; + } + + sal_Int32 nNextFreeRowCol( 0 ); + sal_Int32 nRowColumnsCount = aRowColumnsWindowData.size(); + if ( nRowColumnsCount > 0 ) + nNextFreeRowCol = aRowColumnsWindowData[nRowColumnsCount-1].nRowColumn+1; + else + nNextFreeRowCol = 0; + + if ( nNextFreeRowCol == 0 ) + { + if ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) + nFreeRowColPixelPos = aDockingWinSize.Height() - aUIElementSize.Height(); + else if ( DockingArea == ui::DockingArea_DOCKINGAREA_RIGHT ) + nFreeRowColPixelPos = aDockingWinSize.Width() - aUIElementSize.Width(); + } + + if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + rVirtualPos = ::Point( 0, nNextFreeRowCol ); + if ( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) + rPixelPos = ::Point( 0, nFreeRowColPixelPos ); + else + rPixelPos = ::Point( 0, aDockingWinSize.Height() - nFreeRowColPixelPos ); + } + else + { + rVirtualPos = ::Point( nNextFreeRowCol, 0 ); + rPixelPos = ::Point( aDockingWinSize.Width() - nFreeRowColPixelPos, 0 ); + } +} + +void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( + sal_Int32 nDockingArea, + sal_Int32 nOffset, + SingleRowColumnWindowData& rRowColumnWindowData, + const ::Size& rContainerSize ) +{ + sal_Int32 nDiff( 0 ); + sal_Int32 nRCSpace( rRowColumnWindowData.nSpace ); + sal_Int32 nTopDockingAreaSize; + sal_Int32 nBottomDockingAreaSize; + sal_Int32 nContainerClientSize; + + if ( rRowColumnWindowData.aRowColumnWindows.empty() ) + return; + + if (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + nContainerClientSize = rContainerSize.Width(); + nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize; + } + else + { + nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); + nBottomDockingAreaSize = implts_getTopBottomDockingAreaSizes().Height(); + nContainerClientSize = ( rContainerSize.Height() - nTopDockingAreaSize - nBottomDockingAreaSize ); + nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize; + } + + const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindowSizes.size(); + if (( nDiff < 0 ) && ( nRCSpace > 0 )) + { + // First we try to reduce the size of blank space before/behind docked windows + sal_Int32 i = nCount - 1; + while ( i >= 0 ) + { + sal_Int32 nSpace = rRowColumnWindowData.aRowColumnSpace[i]; + if ( nSpace >= -nDiff ) + { + + if (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount ; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff; + } + else + { + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount ; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff; + } + nDiff = 0; + + break; + } + else if ( nSpace > 0 ) + { + if (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].X -= nSpace; + } + else + { + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].Y -= nSpace; + } + nDiff += nSpace; + } + --i; + } + } + + // Check if we have to reduce further + if ( nDiff < 0 ) + { + // Now we have to reduce the size of certain docked windows + sal_Int32 i = sal_Int32( nCount - 1 ); + while ( i >= 0 ) + { + css::awt::Rectangle& rWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; + ::Size aMinSize; + + vos::OGuard aGuard( Application::GetSolarMutex() ); + { + uno::Reference< awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + aMinSize = ((ToolBox *)pWindow)->CalcMinimumWindowSizePixel(); + } + + if (( aMinSize.Width() > 0 ) && ( aMinSize.Height() > 0 )) + { + if (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + sal_Int32 nMaxReducation = ( rWinRect.Width - aMinSize.Width() ); + if ( nMaxReducation >= -nDiff ) + { + rWinRect.Width = rWinRect.Width + nDiff; + nDiff = 0; + } + else + { + rWinRect.Width = aMinSize.Width(); + nDiff += nMaxReducation; + } + + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff; + } + else + { + sal_Int32 nMaxReducation = ( rWinRect.Height - aMinSize.Height() ); + if ( nMaxReducation >= -nDiff ) + { + rWinRect.Height = rWinRect.Height + nDiff; + nDiff = 0; + } + else + { + rWinRect.Height = aMinSize.Height(); + nDiff += nMaxReducation; + } + + // Try to move this and all user elements behind with the calculated difference + for ( sal_uInt32 j = i; j < nCount; j++ ) + rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff; + } + } + + if ( nDiff >= 0 ) + break; + + --i; + } + } + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + Window* pDockAreaWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[nDockingArea] ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + sal_Int32 nCurrPos( 0 ); + sal_Int32 nStartOffset( 0 ); + + if ( nDockingArea == ui::DockingArea_DOCKINGAREA_RIGHT ) + nStartOffset = pDockAreaWindow->GetSizePixel().Width() - rRowColumnWindowData.nStaticSize; + else if ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) + nStartOffset = pDockAreaWindow->GetSizePixel().Height() - rRowColumnWindowData.nStaticSize; + + vos::OGuard aGuard( Application::GetSolarMutex() ); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + uno::Reference< awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + Window* pOldParentWindow = pWindow->GetParent(); + + if ( pDockAreaWindow != pOldParentWindow ) + pWindow->SetParent( pDockAreaWindow ); + + awt::Rectangle aWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; + if ( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) + { + if ( aWinRect.X < nCurrPos ) + aWinRect.X = nCurrPos; + pWindow->SetPosSizePixel( ::Point( aWinRect.X, nOffset ), + ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); + nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; + } + else if ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) + { + if ( aWinRect.X < nCurrPos ) + aWinRect.X = nCurrPos; + pWindow->SetPosSizePixel( ::Point( aWinRect.X, nStartOffset - nOffset ), + ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); + nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; + } + else if ( nDockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) + { + if ( aWinRect.Y < nCurrPos ) + aWinRect.Y = nCurrPos; + pWindow->SetPosSizePixel( ::Point( nOffset, aWinRect.Y ), + ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); + nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; + } + else if ( nDockingArea == ui::DockingArea_DOCKINGAREA_RIGHT ) + { + if ( aWinRect.Y < nCurrPos ) + aWinRect.Y = nCurrPos; + pWindow->SetPosSizePixel( ::Point( nStartOffset - nOffset, aWinRect.Y ), + ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); + nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; + } + } +} + +::Rectangle ToolbarLayoutManager::implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ) +{ + ::Rectangle aRect( rRect ); + + aRect.Left() -= nHotZoneOffset; + aRect.Top() -= nHotZoneOffset; + aRect.Right() += nHotZoneOffset; + aRect.Bottom() += nHotZoneOffset; + + return aRect; +} + +void ToolbarLayoutManager::implts_calcDockingPosSize( + UIElement& rUIElement, + DockingOperation& rDockingOperation, + ::Rectangle& rTrackingRect, + const Point& rMousePos ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); + ::Size aContainerWinSize; + Window* pContainerWindow( 0 ); + ::Rectangle aDockingAreaOffsets( m_aDockingAreaOffsets ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + { + // Retrieve output size from container Window + vos::OGuard aGuard( Application::GetSolarMutex() ); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + aContainerWinSize = pContainerWindow->GetOutputSizePixel(); + } + + if ( !rUIElement.m_xUIElement.is() ) + { + rTrackingRect = ::Rectangle(); + return; + } + + Window* pDockWindow( 0 ); + Window* pDockingAreaWindow( 0 ); + ToolBox* pToolBox( 0 ); + uno::Reference< awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xDockingAreaWindow; + ::Rectangle aTrackingRect( rTrackingRect ); + ::com::sun::star::ui::DockingArea eDockedArea( (::com::sun::star::ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); + sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); + sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); + sal_Bool bHorizontalDockArea(( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + sal_Int32 nMaxLeftRightDockAreaSize = aContainerWinSize.Height() - + nTopDockingAreaSize - + nBottomDockingAreaSize - + aDockingAreaOffsets.Top() - + aDockingAreaOffsets.Bottom(); + ::Rectangle aDockingAreaRect; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aReadLock.lock(); + xDockingAreaWindow = m_xDockAreaWindows[eDockedArea]; + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); + pDockWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pDockWindow && pDockWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pDockWindow; + + aDockingAreaRect = ::Rectangle( pDockingAreaWindow->GetPosPixel(), pDockingAreaWindow->GetSizePixel() ); + if ( pToolBox ) + { + // docked toolbars always have one line + ::Size aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( sal_Int16( eDockedArea )) ); + aTrackingRect.SetSize( ::Size( aSize.Width(), aSize.Height() )); + } + } + + // default docking operation, dock on the given row/column + sal_Bool bOpOutsideOfDockingArea( !aDockingAreaRect.IsInside( rMousePos )); + std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; + + rDockingOperation = DOCKOP_ON_COLROW; + implts_getDockingAreaElementInfos( eDockedArea, aRowColumnsWindowData ); + + // determine current first row/column and last row/column + sal_Int32 nMaxRowCol( -1 ); + sal_Int32 nMinRowCol( SAL_MAX_INT32 ); + const sal_uInt32 nCount = aRowColumnsWindowData.size(); + for ( sal_uInt32 i = 0; i < nCount; i++ ) + { + if ( aRowColumnsWindowData[i].nRowColumn > nMaxRowCol ) + nMaxRowCol = aRowColumnsWindowData[i].nRowColumn; + if ( aRowColumnsWindowData[i].nRowColumn < nMinRowCol ) + nMinRowCol = aRowColumnsWindowData[i].nRowColumn; + } + + if ( !bOpOutsideOfDockingArea ) + { + // docking inside our docking area + sal_Int32 nIndex( -1 ); + sal_Int32 nRowCol( -1 ); + ::Rectangle aWindowRect; + ::Rectangle aRowColumnRect; + + const sal_uInt32 nWindowDataCount = aRowColumnsWindowData.size(); + for ( sal_uInt32 i = 0; i < nWindowDataCount; i++ ) + { + ::Rectangle aRect( aRowColumnsWindowData[i].aRowColumnRect.X, + aRowColumnsWindowData[i].aRowColumnRect.Y, + aRowColumnsWindowData[i].aRowColumnRect.X + aRowColumnsWindowData[i].aRowColumnRect.Width, + aRowColumnsWindowData[i].aRowColumnRect.Y + aRowColumnsWindowData[i].aRowColumnRect.Height ); + + { + // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect + vos::OGuard aGuard( Application::GetSolarMutex() ); + aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); + } + + sal_Bool bIsInsideRowCol( aRect.IsInside( rMousePos ) ); + if ( bIsInsideRowCol ) + { + nIndex = i; + nRowCol = aRowColumnsWindowData[i].nRowColumn; + rDockingOperation = implts_determineDockingOperation( eDockedArea, aRect, rMousePos ); + aWindowRect = implts_getWindowRectFromRowColumn( eDockedArea, aRowColumnsWindowData[i], rMousePos, rUIElement.m_aName ); + aRowColumnRect = aRect; + break; + } + } + + OSL_ENSURE( ( nIndex >= 0 ) && ( nRowCol >= 0 ), "Impossible case - no row/column found but mouse pointer is inside our docking area" ); + if (( nIndex >= 0 ) && ( nRowCol >= 0 )) + { + if ( rDockingOperation == DOCKOP_ON_COLROW ) + { + if ( !aWindowRect.IsEmpty()) + { + // Tracking rect is on a row/column and mouse is over a docked toolbar. + // Determine if the tracking rect must be located before/after the docked toolbar. + + ::Rectangle aUIElementRect( aWindowRect ); + sal_Int32 nMiddle( bHorizontalDockArea ? ( aWindowRect.Left() + aWindowRect.getWidth() / 2 ) : + ( aWindowRect.Top() + aWindowRect.getHeight() / 2 )); + sal_Bool bInsertBefore( bHorizontalDockArea ? ( rMousePos.X() < nMiddle ) : ( rMousePos.Y() < nMiddle )); + if ( bInsertBefore ) + { + if ( bHorizontalDockArea ) + { + sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( aContainerWinSize.Width() - aWindowRect.Left() ), + sal_Int32( aTrackingRect.getWidth() ))); + if ( nSize == 0 ) + nSize = aWindowRect.getWidth(); + + aUIElementRect.SetSize( ::Size( nSize, aWindowRect.getHeight() )); + aWindowRect = implts_determineFrontDockingRect( eDockedArea, nRowCol, aWindowRect,rUIElement.m_aName, aUIElementRect ); + + // Set virtual position + rUIElement.m_aDockedData.m_aPos.X() = aWindowRect.Left(); + rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; + } + else + { + sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( + nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Top() ), + sal_Int32( aTrackingRect.getHeight() ))); + if ( nSize == 0 ) + nSize = aWindowRect.getHeight(); + + aUIElementRect.SetSize( ::Size( aWindowRect.getWidth(), nSize )); + aWindowRect = implts_determineFrontDockingRect( eDockedArea, nRowCol, aWindowRect, rUIElement.m_aName, aUIElementRect ); + + // Set virtual position + sal_Int32 nPosY = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( aWindowRect.TopLeft() )).Y(); + rUIElement.m_aDockedData.m_aPos.X() = nRowCol; + rUIElement.m_aDockedData.m_aPos.Y() = nPosY; + } + + rTrackingRect = aWindowRect; + return; + } + else + { + if ( bHorizontalDockArea ) + { + sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32(( aContainerWinSize.Width() ) - aWindowRect.Right() ), + sal_Int32( aTrackingRect.getWidth() ))); + if ( nSize == 0 ) + { + aUIElementRect.SetPos( ::Point( aContainerWinSize.Width() - aTrackingRect.getWidth(), aWindowRect.Top() )); + aUIElementRect.SetSize( ::Size( aTrackingRect.getWidth(), aWindowRect.getHeight() )); + rUIElement.m_aDockedData.m_aPos.X() = aUIElementRect.Left(); + } + else + { + aUIElementRect.SetPos( ::Point( aWindowRect.Right(), aWindowRect.Top() )); + aUIElementRect.SetSize( ::Size( nSize, aWindowRect.getHeight() )); + rUIElement.m_aDockedData.m_aPos.X() = aWindowRect.Right(); + } + + // Set virtual position + rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; + } + else + { + sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Bottom() ), + sal_Int32( aTrackingRect.getHeight() ))); + aUIElementRect.SetPos( ::Point( aWindowRect.Left(), aWindowRect.Bottom() )); + aUIElementRect.SetSize( ::Size( aWindowRect.getWidth(), nSize )); + + // Set virtual position + sal_Int32 nPosY( 0 ); + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + nPosY = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( aWindowRect.BottomRight() )).Y(); + } + rUIElement.m_aDockedData.m_aPos.X() = nRowCol; + rUIElement.m_aDockedData.m_aPos.Y() = nPosY; + } + + rTrackingRect = aUIElementRect; + return; + } + } + else + { + implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); + rTrackingRect = implts_calcTrackingAndElementRect( + eDockedArea, nRowCol, rUIElement, + aTrackingRect, aRowColumnRect, aContainerWinSize ); + return; + } + } + else + { + if ((( nRowCol == nMinRowCol ) && ( rDockingOperation == DOCKOP_BEFORE_COLROW )) || + (( nRowCol == nMaxRowCol ) && ( rDockingOperation == DOCKOP_AFTER_COLROW ))) + bOpOutsideOfDockingArea = sal_True; + else + { + // handle docking before/after a row + implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); + rTrackingRect = implts_calcTrackingAndElementRect( + eDockedArea, nRowCol, rUIElement, + aTrackingRect, aRowColumnRect, aContainerWinSize ); + + sal_Int32 nOffsetX( 0 ); + sal_Int32 nOffsetY( 0 ); + if ( bHorizontalDockArea ) + nOffsetY = sal_Int32( floor( aRowColumnRect.getHeight() / 2 + 0.5 )); + else + nOffsetX = sal_Int32( floor( aRowColumnRect.getWidth() / 2 + 0.5 )); + + if ( rDockingOperation == DOCKOP_BEFORE_COLROW ) + { + if (( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockedArea == ui::DockingArea_DOCKINGAREA_LEFT )) + { + // Docking before/after means move track rectangle half column/row. + // As left and top are ordered 0...n instead of right and bottom + // which uses n...0, we have to use negative values for top/left. + nOffsetX *= -1; + nOffsetY *= -1; + } + } + else + { + if (( eDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) || + ( eDockedArea == ui::DockingArea_DOCKINGAREA_RIGHT )) + { + // Docking before/after means move track rectangle half column/row. + // As left and top are ordered 0...n instead of right and bottom + // which uses n...0, we have to use negative values for top/left. + nOffsetX *= -1; + nOffsetY *= -1; + } + nRowCol++; + } + + if ( bHorizontalDockArea ) + rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; + else + rUIElement.m_aDockedData.m_aPos.X() = nRowCol; + + rTrackingRect.Move( nOffsetX, nOffsetY ); + rTrackingRect.SetSize( aTrackingRect.GetSize() ); + } + } + } + } + + // Docking outside of our docking window area => + // Users want to dock before/after first/last docked element or to an empty docking area + if ( bOpOutsideOfDockingArea ) + { + // set correct size for docking + implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); + rTrackingRect = aTrackingRect; + + if ( bHorizontalDockArea ) + { + sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 ))); + if (( nPosX + rTrackingRect.getWidth()) > aContainerWinSize.Width() ) + nPosX = std::min( nPosX, + std::max( sal_Int32( aContainerWinSize.Width() - rTrackingRect.getWidth() ), + sal_Int32( 0 ))); + + sal_Int32 nSize = std::min( aContainerWinSize.Width(), rTrackingRect.getWidth() ); + sal_Int32 nDockHeight = std::max( static_cast(aDockingAreaRect.getHeight()), sal_Int32( 0 )); + if ( nDockHeight == 0 ) + { + sal_Int32 nPosY( std::max( aDockingAreaRect.Top(), aDockingAreaRect.Bottom() )); + if ( eDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) + nPosY -= rTrackingRect.getHeight(); + rTrackingRect.SetPos( Point( nPosX, nPosY )); + rUIElement.m_aDockedData.m_aPos.Y() = 0; + } + else if ( rMousePos.Y() < ( aDockingAreaRect.Top() + ( nDockHeight / 2 ))) + { + rTrackingRect.SetPos( Point( nPosX, aDockingAreaRect.Top() - rTrackingRect.getHeight() )); + if ( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) + rUIElement.m_aDockedData.m_aPos.Y() = 0; + else + rUIElement.m_aDockedData.m_aPos.Y() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; + rDockingOperation = DOCKOP_BEFORE_COLROW; + } + else + { + rTrackingRect.SetPos( Point( nPosX, aDockingAreaRect.Bottom() )); + if ( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) + rUIElement.m_aDockedData.m_aPos.Y() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; + else + rUIElement.m_aDockedData.m_aPos.Y() = 0; + rDockingOperation = DOCKOP_AFTER_COLROW; + } + rTrackingRect.setWidth( nSize ); + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + nPosX = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( rTrackingRect.TopLeft() )).X(); + } + rUIElement.m_aDockedData.m_aPos.X() = nPosX; + } + else + { + sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), + sal_Int32( nMaxLeftRightDockAreaSize )); + + sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); + if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) + nPosY = std::min( nPosY, + std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), + sal_Int32( nTopDockingAreaSize ))); + + sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast(aTrackingRect.getHeight()) ); + sal_Int32 nDockWidth = std::max( static_cast(aDockingAreaRect.getWidth()), sal_Int32( 0 )); + if ( nDockWidth == 0 ) + { + sal_Int32 nPosX( std::max( aDockingAreaRect.Left(), aDockingAreaRect.Right() )); + if ( eDockedArea == ui::DockingArea_DOCKINGAREA_RIGHT ) + nPosX -= rTrackingRect.getWidth(); + rTrackingRect.SetPos( Point( nPosX, nPosY )); + rUIElement.m_aDockedData.m_aPos.X() = 0; + } + else if ( rMousePos.X() < ( aDockingAreaRect.Left() + ( nDockWidth / 2 ))) + { + rTrackingRect.SetPos( Point( aDockingAreaRect.Left() - rTrackingRect.getWidth(), nPosY )); + if ( eDockedArea == ui::DockingArea_DOCKINGAREA_LEFT ) + rUIElement.m_aDockedData.m_aPos.X() = 0; + else + rUIElement.m_aDockedData.m_aPos.X() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; + rDockingOperation = DOCKOP_BEFORE_COLROW; + } + else + { + rTrackingRect.SetPos( Point( aDockingAreaRect.Right(), nPosY )); + if ( eDockedArea == ui::DockingArea_DOCKINGAREA_LEFT ) + rUIElement.m_aDockedData.m_aPos.X() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; + else + rUIElement.m_aDockedData.m_aPos.X() = 0; + rDockingOperation = DOCKOP_AFTER_COLROW; + } + rTrackingRect.setHeight( nSize ); + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + nPosY = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( rTrackingRect.TopLeft() )).Y(); + } + rUIElement.m_aDockedData.m_aPos.Y() = nPosY; + } + } +} + +framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_determineDockingOperation( + ui::DockingArea DockingArea, + const ::Rectangle& rRowColRect, + const Point& rMousePos ) +{ + const sal_Int32 nHorzVerticalRegionSize = 6; + const sal_Int32 nHorzVerticalMoveRegion = 4; + + if ( rRowColRect.IsInside( rMousePos )) + { + if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + { + sal_Int32 nRegion = rRowColRect.getHeight() / nHorzVerticalRegionSize; + sal_Int32 nPosY = rRowColRect.Top() + nRegion; + + if ( rMousePos.Y() < nPosY ) + return ( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) ? DOCKOP_BEFORE_COLROW : DOCKOP_AFTER_COLROW; + else if ( rMousePos.Y() < ( nPosY + nRegion*nHorzVerticalMoveRegion )) + return DOCKOP_ON_COLROW; + else + return ( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) ? DOCKOP_AFTER_COLROW : DOCKOP_BEFORE_COLROW; + } + else + { + sal_Int32 nRegion = rRowColRect.getWidth() / nHorzVerticalRegionSize; + sal_Int32 nPosX = rRowColRect.Left() + nRegion; + + if ( rMousePos.X() < nPosX ) + return ( DockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) ? DOCKOP_BEFORE_COLROW : DOCKOP_AFTER_COLROW; + else if ( rMousePos.X() < ( nPosX + nRegion*nHorzVerticalMoveRegion )) + return DOCKOP_ON_COLROW; + else + return ( DockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) ? DOCKOP_AFTER_COLROW : DOCKOP_BEFORE_COLROW; + } + } + else + return DOCKOP_ON_COLROW; +} + +::Rectangle ToolbarLayoutManager::implts_calcTrackingAndElementRect( + ui::DockingArea eDockingArea, + sal_Int32 nRowCol, + UIElement& rUIElement, + const ::Rectangle& rTrackingRect, + const ::Rectangle& rRowColumnRect, + const ::Size& rContainerWinSize ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadGuard( m_aLock ); + ::Rectangle aDockingAreaOffsets( m_aDockingAreaOffsets ); + aReadGuard.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + sal_Bool bHorizontalDockArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + + sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); + sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); + + sal_Int32 nMaxLeftRightDockAreaSize = rContainerWinSize.Height() - + nTopDockingAreaSize - + nBottomDockingAreaSize - + aDockingAreaOffsets.Top() - + aDockingAreaOffsets.Bottom(); + + ::Rectangle aTrackingRect( rTrackingRect ); + if ( bHorizontalDockArea ) + { + sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 ))); + if (( nPosX + rTrackingRect.getWidth()) > rContainerWinSize.Width() ) + nPosX = std::min( nPosX, + std::max( sal_Int32( rContainerWinSize.Width() - rTrackingRect.getWidth() ), + sal_Int32( 0 ))); + + sal_Int32 nSize = std::min( rContainerWinSize.Width(), rTrackingRect.getWidth() ); + + aTrackingRect.SetPos( ::Point( nPosX, rRowColumnRect.Top() )); + aTrackingRect.setWidth( nSize ); + aTrackingRect.setHeight( rRowColumnRect.getHeight() ); + + // Set virtual position + rUIElement.m_aDockedData.m_aPos.X() = nPosX; + rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; + } + else + { + sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), + sal_Int32( nMaxLeftRightDockAreaSize )); + + sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); + if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) + nPosY = std::min( nPosY, + std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), + sal_Int32( nTopDockingAreaSize ))); + + sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast(aTrackingRect.getHeight()) ); + + aTrackingRect.SetPos( ::Point( rRowColumnRect.Left(), nPosY )); + aTrackingRect.setWidth( rRowColumnRect.getWidth() ); + aTrackingRect.setHeight( nSize ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aReadGuard.lock(); + uno::Reference< awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[eDockingArea]; + uno::Reference< awt::XWindow2 > xContainerWindow = m_xContainerWindow; + aReadGuard.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + sal_Int32 nDockPosY( 0 ); + Window* pDockingAreaWindow( 0 ); + Window* pContainerWindow( 0 ); + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + nDockPosY = pDockingAreaWindow->ScreenToOutputPixel( + pContainerWindow->OutputToScreenPixel( ::Point( 0, nPosY ))).Y(); + } + + // Set virtual position + rUIElement.m_aDockedData.m_aPos.X() = nRowCol; + rUIElement.m_aDockedData.m_aPos.Y() = nDockPosY; + } + + return aTrackingRect; +} + +void ToolbarLayoutManager::implts_setTrackingRect( ui::DockingArea eDockingArea, const ::Point& rMousePos, ::Rectangle& rTrackingRect ) +{ + sal_Bool bHorizontalDockArea( ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + + ::Point aPoint = rTrackingRect.TopLeft(); + if ( bHorizontalDockArea ) + aPoint.X() = rMousePos.X(); + else + aPoint.Y() = rMousePos.Y(); + + rTrackingRect.SetPos( aPoint ); +} + +void ToolbarLayoutManager::implts_renumberRowColumnData( + ui::DockingArea eDockingArea, + DockingOperation /*eDockingOperation*/, + const UIElement& rUIElement ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + sal_Bool bHorzDockingArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + sal_Int32 nRowCol( bHorzDockingArea ? rUIElement.m_aDockedData.m_aPos.Y() : + rUIElement.m_aDockedData.m_aPos.X() ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if (( pIter->m_aDockedData.m_nDockedArea == sal_Int16( eDockingArea )) && + ( pIter->m_aName != rUIElement.m_aName )) + { + // Don't change toolbars without a valid docking position! + if (( pIter->m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && + ( pIter->m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + continue; + + sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? + pIter->m_aDockedData.m_aPos.Y() : pIter->m_aDockedData.m_aPos.X(); + if ( nWindowRowCol >= nRowCol ) + { + if ( bHorzDockingArea ) + pIter->m_aDockedData.m_aPos.Y() += 1; + else + pIter->m_aDockedData.m_aPos.X() += 1; + } + } + } + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + // We have to change the persistent window state part + if ( xPersistentWindowState.is() ) + { + try + { + uno::Sequence< ::rtl::OUString > aWindowElements = xPersistentWindowState->getElementNames(); + for ( sal_Int32 i = 0; i < aWindowElements.getLength(); i++ ) + { + if ( rUIElement.m_aName != aWindowElements[i] ) + { + try + { + uno::Sequence< beans::PropertyValue > aPropValueSeq; + awt::Point aDockedPos; + ui::DockingArea nDockedArea( ui::DockingArea_DOCKINGAREA_DEFAULT ); + + xPersistentWindowState->getByName( aWindowElements[i] ) >>= aPropValueSeq; + for ( sal_Int32 j = 0; j < aPropValueSeq.getLength(); j++ ) + { + if ( aPropValueSeq[j].Name.equalsAscii( WINDOWSTATE_PROPERTY_DOCKINGAREA )) + aPropValueSeq[j].Value >>= nDockedArea; + else if ( aPropValueSeq[j].Name.equalsAscii( WINDOWSTATE_PROPERTY_DOCKPOS )) + aPropValueSeq[j].Value >>= aDockedPos; + } + + // Don't change toolbars without a valid docking position! + if (( aDockedPos.X == SAL_MAX_INT32 ) && ( aDockedPos.Y == SAL_MAX_INT32 )) + continue; + + sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? aDockedPos.Y : aDockedPos.X; + if (( nDockedArea == eDockingArea ) && ( nWindowRowCol >= nRowCol )) + { + if ( bHorzDockingArea ) + aDockedPos.Y += 1; + else + aDockedPos.X += 1; + + uno::Reference< container::XNameReplace > xReplace( xPersistentWindowState, uno::UNO_QUERY ); + xReplace->replaceByName( aWindowElements[i], makeAny( aPropValueSeq )); + } + } + catch ( uno::Exception& ) + { + } + } + } + } + catch ( uno::Exception& ) + { + } + } +} + +//--------------------------------------------------------------------------------------------------------- +// XDockableWindowListener +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL ToolbarLayoutManager::startDocking( + const awt::DockingEvent& e ) +throw (uno::RuntimeException) +{ + sal_Bool bWinFound( sal_False ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadGuard( m_aLock ); + uno::Reference< css::awt::XWindow2 > xContainerWindow( m_xContainerWindow ); + uno::Reference< css::awt::XWindow2 > xWindow( e.Source, uno::UNO_QUERY ); + aReadGuard.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + Window* pContainerWindow( 0 ); + Window* pWindow( 0 ); + ::Point aMousePos; + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + aMousePos = pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y )); + } + + UIElement aUIElement = implts_findElement( e.Source ); + + if ( aUIElement.m_xUIElement.is() && xWindow.is() ) + { + awt::Rectangle aRect; + uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xDockWindow->isFloating() ) + { + awt::Rectangle aPos = xWindow->getPosSize(); + awt::Size aSize = xWindow->getOutputSize(); + + aUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); + aUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolBox = (ToolBox *)pWindow; + aUIElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); + aUIElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || + ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + } + } + } + + WriteGuard aWriteLock( m_aLock ); + m_bDockingInProgress = bWinFound; + m_aDockUIElement = aUIElement; + m_aDockUIElement.m_bUserActive = sal_True; + m_aStartDockMousePos = aMousePos; + aWriteLock.unlock(); +} + +awt::DockingData SAL_CALL ToolbarLayoutManager::docking( + const awt::DockingEvent& e ) +throw (uno::RuntimeException) +{ + const sal_Int32 MAGNETIC_DISTANCE_UNDOCK = 25; + const sal_Int32 MAGNETIC_DISTANCE_DOCK = 20; + + awt::DockingData aDockingData; + uno::Reference< awt::XDockableWindow > xDockWindow( e.Source, uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xWindow( e.Source, uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xTopDockingWindow; + uno::Reference< awt::XWindow > xLeftDockingWindow; + uno::Reference< awt::XWindow > xRightDockingWindow; + uno::Reference< awt::XWindow > xBottomDockingWindow; + uno::Reference< awt::XWindow2 > xContainerWindow; + UIElement aUIDockingElement; + DockingOperation eDockingOperation( DOCKOP_ON_COLROW ); + + aDockingData.TrackingRectangle = e.TrackingRectangle; + sal_Bool bDockingInProgress; + + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + bDockingInProgress = m_bDockingInProgress; + if ( bDockingInProgress ) + { + xContainerWindow = m_xContainerWindow; + xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; + xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; + xRightDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; + xBottomDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; + aUIDockingElement = m_aDockUIElement; + } + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + + if ( bDockingInProgress && xDockWindow.is() && xWindow.is() ) + { + try + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + + sal_Int16 eDockingArea( -1 ); // none + sal_Int32 nMagneticZone( aUIDockingElement.m_bFloating ? MAGNETIC_DISTANCE_DOCK : MAGNETIC_DISTANCE_UNDOCK ); + awt::Rectangle aNewTrackingRect; + ::Rectangle aTrackingRect( e.TrackingRectangle.X, + e.TrackingRectangle.Y, + ( e.TrackingRectangle.X + e.TrackingRectangle.Width ), + ( e.TrackingRectangle.Y + e.TrackingRectangle.Height )); + + awt::Rectangle aTmpRect = xTopDockingWindow->getPosSize(); + ::Rectangle aTopDockRect( aTmpRect.X, aTmpRect.Y, aTmpRect.Width, aTmpRect.Height ); + ::Rectangle aHotZoneTopDockRect( implts_calcHotZoneRect( aTopDockRect, nMagneticZone )); + + aTmpRect = xBottomDockingWindow->getPosSize(); + ::Rectangle aBottomDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width), ( aTmpRect.Y + aTmpRect.Height )); + ::Rectangle aHotZoneBottomDockRect( implts_calcHotZoneRect( aBottomDockRect, nMagneticZone )); + + aTmpRect = xLeftDockingWindow->getPosSize(); + ::Rectangle aLeftDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); + ::Rectangle aHotZoneLeftDockRect( implts_calcHotZoneRect( aLeftDockRect, nMagneticZone )); + + aTmpRect = xRightDockingWindow->getPosSize(); + ::Rectangle aRightDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); + ::Rectangle aHotZoneRightDockRect( implts_calcHotZoneRect( aRightDockRect, nMagneticZone )); + + Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow ) ); + Window* pDockingAreaWindow( 0 ); + ::Point aMousePos( pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y ))); + + if ( aHotZoneTopDockRect.IsInside( aMousePos )) + eDockingArea = ui::DockingArea_DOCKINGAREA_TOP; + else if ( aHotZoneBottomDockRect.IsInside( aMousePos )) + eDockingArea = ui::DockingArea_DOCKINGAREA_BOTTOM; + else if ( aHotZoneLeftDockRect.IsInside( aMousePos )) + eDockingArea = ui::DockingArea_DOCKINGAREA_LEFT; + else if ( aHotZoneRightDockRect.IsInside( aMousePos )) + eDockingArea = ui::DockingArea_DOCKINGAREA_RIGHT; + + // Higher priority for movements inside the real docking area + if ( aTopDockRect.IsInside( aMousePos )) + eDockingArea = ui::DockingArea_DOCKINGAREA_TOP; + else if ( aBottomDockRect.IsInside( aMousePos )) + eDockingArea = ui::DockingArea_DOCKINGAREA_BOTTOM; + else if ( aLeftDockRect.IsInside( aMousePos )) + eDockingArea = ui::DockingArea_DOCKINGAREA_LEFT; + else if ( aRightDockRect.IsInside( aMousePos )) + eDockingArea = ui::DockingArea_DOCKINGAREA_RIGHT; + + // Determine if we have a toolbar and set alignment according to the docking area! + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + ToolBox* pToolBox = 0; + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pWindow; + + if ( eDockingArea != -1 ) + { + if ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) + { + aUIDockingElement.m_aDockedData.m_nDockedArea = ui::DockingArea_DOCKINGAREA_TOP; + aUIDockingElement.m_bFloating = sal_False; + pDockingAreaWindow = VCLUnoHelper::GetWindow( xTopDockingWindow ); + } + else if ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) + { + aUIDockingElement.m_aDockedData.m_nDockedArea = ui::DockingArea_DOCKINGAREA_BOTTOM; + aUIDockingElement.m_bFloating = sal_False; + pDockingAreaWindow = VCLUnoHelper::GetWindow( xBottomDockingWindow ); + } + else if ( eDockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) + { + aUIDockingElement.m_aDockedData.m_nDockedArea = ui::DockingArea_DOCKINGAREA_LEFT; + aUIDockingElement.m_bFloating = sal_False; + pDockingAreaWindow = VCLUnoHelper::GetWindow( xLeftDockingWindow ); + } + else if ( eDockingArea == ui::DockingArea_DOCKINGAREA_RIGHT ) + { + aUIDockingElement.m_aDockedData.m_nDockedArea = ui::DockingArea_DOCKINGAREA_RIGHT; + aUIDockingElement.m_bFloating = sal_False; + pDockingAreaWindow = VCLUnoHelper::GetWindow( xRightDockingWindow ); + } + + ::Point aOutputPos = pContainerWindow->ScreenToOutputPixel( aTrackingRect.TopLeft() ); + aTrackingRect.SetPos( aOutputPos ); + + ::Rectangle aNewDockingRect( aTrackingRect ); + implts_calcDockingPosSize( aUIDockingElement, eDockingOperation, aNewDockingRect, aMousePos ); + + ::Point aScreenPos = pContainerWindow->OutputToScreenPixel( aNewDockingRect.TopLeft() ); + aNewTrackingRect = css::awt::Rectangle( aScreenPos.X(), + aScreenPos.Y(), + aNewDockingRect.getWidth(), + aNewDockingRect.getHeight() ); + aDockingData.TrackingRectangle = aNewTrackingRect; + } + else if ( pToolBox && bDockingInProgress ) + { + sal_Bool bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || + ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + ::Size aFloatSize = aUIDockingElement.m_aFloatingData.m_aSize; + if ( aFloatSize.Width() > 0 && aFloatSize.Height() > 0 ) + { + aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( + ::Point( e.MousePos.X, e.MousePos.Y )); + aDockingData.TrackingRectangle.Height = aFloatSize.Height(); + aDockingData.TrackingRectangle.Width = aFloatSize.Width(); + } + else + { + aFloatSize = pToolBox->CalcWindowSizePixel(); + if ( !bIsHorizontal ) + { + // Floating toolbars are always horizontal aligned! We have to swap + // width/height if we have a vertical aligned toolbar. + sal_Int32 nTemp = aFloatSize.Height(); + aFloatSize.Height() = aFloatSize.Width(); + aFloatSize.Width() = nTemp; + } + + aDockingData.TrackingRectangle.Height = aFloatSize.Height(); + aDockingData.TrackingRectangle.Width = aFloatSize.Width(); + + // For the first time we don't have any data about the floating size of a toolbar. + // We calculate it and store it for later use. + aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( + ::Point( e.MousePos.X, e.MousePos.Y )); + aUIDockingElement.m_aFloatingData.m_aSize = aFloatSize; + aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); + aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || + ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + } + aDockingData.TrackingRectangle.X = e.MousePos.X; + aDockingData.TrackingRectangle.Y = e.MousePos.Y; + } + + aDockingData.bFloating = ( eDockingArea == -1 ); + + // Write current data to the member docking progress data + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_aDockUIElement.m_bFloating = aDockingData.bFloating; + if ( !aDockingData.bFloating ) + { + m_aDockUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; + m_eDockOperation = eDockingOperation; + } + else + m_aDockUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + catch ( uno::Exception& ) + { + } + } + + return aDockingData; +} + +void SAL_CALL ToolbarLayoutManager::endDocking( + const awt::EndDockingEvent& e ) +throw (uno::RuntimeException) +{ + bool bDockingInProgress( false ); + bool bStartDockFloated( false ); + bool bFloating( false ); + UIElement aUIDockingElement; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + bDockingInProgress = m_bDockingInProgress; + aUIDockingElement = m_aDockUIElement; + bFloating = aUIDockingElement.m_bFloating; + + UIElement& rUIElement = impl_findElement( aUIDockingElement.m_aName ); + if ( rUIElement.m_aName == aUIDockingElement.m_aName ) + { + if ( aUIDockingElement.m_bFloating ) + { + // Write last position into position data + uno::Reference< awt::XWindow > xWindow( aUIDockingElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + rUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; + awt::Rectangle aTmpRect = xWindow->getPosSize(); + rUIElement.m_aFloatingData.m_aPos = ::Point( aTmpRect.X, aTmpRect.Y ); + // make changes also for our local data as we use it to make data persistent + aUIDockingElement.m_aFloatingData = rUIElement.m_aFloatingData; + } + else + { + rUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; + rUIElement.m_aFloatingData.m_aSize = aUIDockingElement.m_aFloatingData.m_aSize; + + if ( m_eDockOperation != DOCKOP_ON_COLROW ) + { + // we have to renumber our row/column data to insert a new row/column + implts_renumberRowColumnData( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, + m_eDockOperation, + aUIDockingElement ); + } + } + + bStartDockFloated = rUIElement.m_bFloating; + rUIElement.m_bFloating = m_aDockUIElement.m_bFloating; + rUIElement.m_bUserActive = sal_True; + } + + // reset member for next docking operation + m_aDockUIElement.m_xUIElement.clear(); + m_eDockOperation = DOCKOP_ON_COLROW; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); + + if ( bDockingInProgress ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( uno::Reference< awt::XWindow >( e.Source, uno::UNO_QUERY )); + ToolBox* pToolBox = 0; + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pWindow; + + if ( pToolBox ) + { + if( e.bFloating ) + { + if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) + pToolBox->SetAlign( WINDOWALIGN_TOP ); + else + pToolBox->SetAlign( WINDOWALIGN_LEFT ); + } + else + { + ::Size aSize; + + pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); + + // Docked toolbars have always one line + aSize = pToolBox->CalcWindowSizePixel( 1 ); + + // Lock layouting updates as our listener would be called due to SetSizePixel + pToolBox->SetOutputSizePixel( aSize ); + } + } + } + + implts_sortUIElements(); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aWriteLock.lock(); + m_bDockingInProgress = sal_False; + m_bLayoutDirty = !bStartDockFloated || !bFloating; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ +} + +sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( + const lang::EventObject& e ) +throw (uno::RuntimeException) +{ + sal_Bool bDockingInProgress( sal_False ); + + ReadGuard aReadLock( m_aLock ); + bDockingInProgress = m_bDockingInProgress; + aReadLock.unlock(); + + UIElement aUIDockingElement = implts_findElement( e.Source ); + bool bWinFound( aUIDockingElement.m_aName.getLength() > 0 ); + uno::Reference< awt::XWindow > xWindow( e.Source, uno::UNO_QUERY ); + + if ( bWinFound && xWindow.is() ) + { + if ( !bDockingInProgress ) + { + awt::Rectangle aRect; + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xDockWindow->isFloating() ) + { + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) + { + if ( pWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolBox = (ToolBox *)pWindow; + aUIDockingElement.m_aFloatingData.m_aPos = pToolBox->GetPosPixel(); + aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->GetOutputSizePixel(); + aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); + aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || + ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + } + } + } + + UIElement aUIElement = implts_findElement( aUIDockingElement.m_aName ); + if ( aUIElement.m_aName == aUIDockingElement.m_aName ) + implts_setElement( aUIDockingElement ); + } + } + } + + return sal_True; +} + +void SAL_CALL ToolbarLayoutManager::toggleFloatingMode( + const lang::EventObject& e ) +throw (uno::RuntimeException) +{ + sal_Bool bDockingInProgress( sal_False ); + UIElement aUIDockingElement; + + ReadGuard aReadLock( m_aLock ); + bDockingInProgress = m_bDockingInProgress; + if ( bDockingInProgress ) + aUIDockingElement = m_aDockUIElement; + aReadLock.unlock(); + + Window* pWindow( 0 ); + ToolBox* pToolBox( 0 ); + uno::Reference< css::awt::XWindow2 > xWindow; + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + xWindow = uno::Reference< awt::XWindow2 >( e.Source, uno::UNO_QUERY ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + pToolBox = (ToolBox *)pWindow; + } + + if ( !bDockingInProgress ) + { + aUIDockingElement = implts_findElement( e.Source ); + bool bWinFound = ( aUIDockingElement.m_aName.getLength() > 0 ); + + if ( bWinFound && xWindow.is() ) + { + aUIDockingElement.m_bFloating = !aUIDockingElement.m_bFloating; + aUIDockingElement.m_bUserActive = sal_True; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bLayoutDirty = true; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( aUIDockingElement.m_bFloating ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( pToolBox ) + { + pToolBox->SetLineCount( aUIDockingElement.m_aFloatingData.m_nLines ); + if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) + pToolBox->SetAlign( WINDOWALIGN_TOP ); + else + pToolBox->SetAlign( WINDOWALIGN_LEFT ); + } + + sal_Bool bUndefPos = ( aUIDockingElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || + aUIDockingElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); + sal_Bool bSetSize = ( aUIDockingElement.m_aFloatingData.m_aSize.Width() != 0 && + aUIDockingElement.m_aFloatingData.m_aSize.Height() != 0 ); + + if ( bUndefPos ) + aUIDockingElement.m_aFloatingData.m_aPos = implts_findNextCascadeFloatingPos(); + + if ( !bSetSize ) + { + if ( pToolBox ) + aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->CalcFloatingWindowSizePixel(); + else + aUIDockingElement.m_aFloatingData.m_aSize = pWindow->GetOutputSizePixel(); + } + + xWindow->setPosSize( aUIDockingElement.m_aFloatingData.m_aPos.X(), + aUIDockingElement.m_aFloatingData.m_aPos.Y(), + 0, 0, css::awt::PosSize::POS ); + xWindow->setOutputSize( AWTSize( aUIDockingElement.m_aFloatingData.m_aSize ) ); + } + else + { + if (( aUIDockingElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && + ( aUIDockingElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + { + // Docking on its default position without a preset position - + // we have to find a good place for it. + ::Point aPixelPos; + ::Point aDockPos; + ::Size aSize; + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( pToolBox ) + aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea ) ); + else + aSize = pWindow->GetSizePixel(); + } + + implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, + aSize, + aDockPos, + aPixelPos ); + aUIDockingElement.m_aDockedData.m_aPos = aDockPos; + } + + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( pToolBox ) + { + pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); + ::Size aSize = pToolBox->CalcWindowSizePixel( 1 ); + css::awt::Rectangle aRect = xWindow->getPosSize(); + xWindow->setPosSize( aRect.X, aRect.Y, 0, 0, css::awt::PosSize::POS ); + xWindow->setOutputSize( AWTSize( aSize ) ); + } + } + + aWriteLock.lock(); + UIElement& rUIElement = impl_findElement( aUIDockingElement.m_aName ); + if ( rUIElement.m_aName == aUIDockingElement.m_aName ) + rUIElement = aUIDockingElement; + m_bLayoutDirty = true; + aWriteLock.unlock(); + + implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); + implts_sortUIElements(); + } + } + else + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( pToolBox ) + { + if ( aUIDockingElement.m_bFloating ) + { + if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) + pToolBox->SetAlign( WINDOWALIGN_TOP ); + else + pToolBox->SetAlign( WINDOWALIGN_LEFT ); + } + else + { + pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); + } + } + } +} + +void SAL_CALL ToolbarLayoutManager::closed( + const lang::EventObject& /*e*/ ) +throw (uno::RuntimeException) +{ +} + +void SAL_CALL ToolbarLayoutManager::endPopupMode( + const awt::EndPopupModeEvent& /*e*/ ) +throw (uno::RuntimeException) +{ +} + +//--------------------------------------------------------------------------------------------------------- +// XUIConfigurationListener +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL ToolbarLayoutManager::elementInserted( + const ui::ConfigurationEvent& /*Event*/ ) +throw (uno::RuntimeException) +{ +} + +void SAL_CALL ToolbarLayoutManager::elementRemoved( + const ui::ConfigurationEvent& /*Event*/ ) +throw (uno::RuntimeException) +{ +} + +void SAL_CALL ToolbarLayoutManager::elementReplaced( + const ui::ConfigurationEvent& /*Event*/ ) +throw (uno::RuntimeException) +{ +} + +//--------------------------------------------------------------------------------------------------------- +// XLayoutManager forwards +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL ToolbarLayoutManager::createElement( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ +} + +void SAL_CALL ToolbarLayoutManager::destroyElement( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ +} + +::sal_Bool SAL_CALL ToolbarLayoutManager::requestElement( const ::rtl::OUString& /*ResourceURL*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +uno::Reference< ui::XUIElement > SAL_CALL ToolbarLayoutManager::getElement( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ + return uno::Reference< ui::XUIElement >(); +} + +uno::Sequence< uno::Reference< ui::XUIElement > > SAL_CALL ToolbarLayoutManager::getElements() +throw (uno::RuntimeException) +{ + return uno::Sequence< uno::Reference< ui::XUIElement > >(); +} + +sal_Bool SAL_CALL ToolbarLayoutManager::showElement( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +sal_Bool SAL_CALL ToolbarLayoutManager::hideElement( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +sal_Bool SAL_CALL ToolbarLayoutManager::dockWindow( const ::rtl::OUString& /*aName*/, ui::DockingArea /*DockingArea*/, const awt::Point& /*Pos*/ ) +throw (uno::RuntimeException) +{ +/* + UIElement& rUIElement = impl_findElement( aUIElement.m_aName ); + + if ( rUIElement.m_xUIElement.is() ) + { + try + { + uno::Reference< awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xDockWindow.is() ) + { + if ( DockingArea != DockingArea_DOCKINGAREA_DEFAULT ) + aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( DockingArea ); + + if (( Pos.X != SAL_MAX_INT32 ) && ( Pos.Y != SAL_MAX_INT32 )) + aUIElement.m_aDockedData.m_aPos = ::Point( Pos.X, Pos.Y ); + + if ( !xDockWindow->isFloating() ) + { + Window* pWindow( 0 ); + ToolBox* pToolBox( 0 ); + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + pToolBox = (ToolBox *)pWindow; + + // We have to set the alignment of the toolbox. It's possible that the toolbox is moved from a + // horizontal to a vertical docking area! + pToolBox->SetAlign( ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea )); + } + } + + if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) || + ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + { + // Docking on its default position without a preset position - + // we have to find a good place for it. + ::Size aSize; + + vos::OGuard aGuard( Application::GetSolarMutex() ); + { + if ( pToolBox ) + aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) ); + else + aSize = pWindow->GetSizePixel(); + } + + ::Point aPixelPos; + ::Point aDockPos; + implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea, + aSize, + aDockPos, + aPixelPos ); + aUIElement.m_aDockedData.m_aPos = aDockPos; + } + } + + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); + if ( rUIElement.m_aName == aName ) + { + rUIElement.m_aDockedData.m_nDockedArea = aUIElement.m_aDockedData.m_nDockedArea; + rUIElement.m_aDockedData.m_aPos = aUIElement.m_aDockedData.m_aPos; + } + aWriteLock.unlock(); + + if ( xDockWindow->isFloating() ) + { + // Will call toggle floating mode which will do the rest! + xWindow->setVisible( sal_False ); + xDockWindow->setFloatingMode( sal_False ); + xWindow->setVisible( sal_True ); + } + else + { + implts_writeWindowStateData( aName, aUIElement ); + implts_sortUIElements(); + + if ( aUIElement.m_bVisible ) + { + m_bLayoutDirty = true; + } + } + + return sal_True; + } + } + catch ( uno::DisposedException& ) + { + } + } +*/ + return false; +} + +::sal_Bool SAL_CALL ToolbarLayoutManager::dockAllWindows( ::sal_Int16 /*nElementType*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +sal_Bool SAL_CALL ToolbarLayoutManager::floatWindow( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +::sal_Bool SAL_CALL ToolbarLayoutManager::lockWindow( const ::rtl::OUString& /*ResourceURL*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +::sal_Bool SAL_CALL ToolbarLayoutManager::unlockWindow( const ::rtl::OUString& /*ResourceURL*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +void SAL_CALL ToolbarLayoutManager::setElementSize( const ::rtl::OUString& /*aName*/, const awt::Size& /*aSize*/ ) +throw (uno::RuntimeException) +{ +} + +void SAL_CALL ToolbarLayoutManager::setElementPos( const ::rtl::OUString& /*aName*/, const awt::Point& /*aPos*/ ) +throw (uno::RuntimeException) +{ +} + +void SAL_CALL ToolbarLayoutManager::setElementPosSize( const ::rtl::OUString& /*aName*/, const awt::Point& /*aPos*/, const awt::Size& /*aSize*/ ) +throw (uno::RuntimeException) +{ +} + +sal_Bool SAL_CALL ToolbarLayoutManager::isElementVisible( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +sal_Bool SAL_CALL ToolbarLayoutManager::isElementFloating( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +sal_Bool SAL_CALL ToolbarLayoutManager::isElementDocked( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +::sal_Bool SAL_CALL ToolbarLayoutManager::isElementLocked( const ::rtl::OUString& /*ResourceURL*/ ) +throw (uno::RuntimeException) +{ + return false; +} + +awt::Size SAL_CALL ToolbarLayoutManager::getElementSize( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ + return awt::Size(); +} + +awt::Point SAL_CALL ToolbarLayoutManager::getElementPos( const ::rtl::OUString& /*aName*/ ) +throw (uno::RuntimeException) +{ + return awt::Point(); +} + +} // namespace framework diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx new file mode 100755 index 000000000000..95b27f69c9c9 --- /dev/null +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -0,0 +1,318 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_ + +/** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble + with solaris headers ... +*/ +#include + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include + + +namespace framework +{ + +class ToolbarLayoutManager : public ::cppu::WeakImplHelper2< ::com::sun::star::awt::XDockableWindowListener, + ::com::sun::star::ui::XUIConfigurationListener >, + private ThreadHelpBase // Struct for right initalization of mutex member! Must be first of baseclasses. +{ + public: + enum { DOCKINGAREAS_COUNT = 4 }; + + ToolbarLayoutManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMGR, + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElementFactory >& xUIElementFactory ); + virtual ~ToolbarLayoutManager(); + + void reset(); + void attach( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >& xModuleCfgMgr, + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >& xDocCfgMgr, + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xPersistentWindowState ); + + void setParentWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParentWindow ); + void setDockingAreaOffsets( const ::Rectangle aOffsets ); + + void resetDockingArea(); + + ::com::sun::star::awt::Rectangle getDockingArea(); + void setDockingArea( const ::com::sun::star::awt::Rectangle& rDockingArea ); + + bool isLayoutDirty(); + void doLayout(const ::Size& aContainerSize); + + void createToolbars(); + void destroyToolbars(); + + bool createToolbar( const ::rtl::OUString& rResourceURL ); + bool destroyToolbar( const ::rtl::OUString& rResourceURL ); + void implts_createNonContextSensitiveToolBars(); + + // docking API + void dockToolbar( const ::rtl::OUString& rResourceURL, ::com::sun::star::ui::DockingArea eDockingArea, const ::com::sun::star::awt::Point& aPos ); + + //--------------------------------------------------------------------------------------------------------- + // XInterface + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException ); + + //--------------------------------------------------------------------------------------------------------- + // XEventListener + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); + + //--------------------------------------------------------------------------------------------------------- + // XDockableWindowListener + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException); + + //--------------------------------------------------------------------------------------------------------- + // XUIConfigurationListener + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + //--------------------------------------------------------------------------------------------------------- + // XLayoutManager forwards + //--------------------------------------------------------------------------------------------------------- + void SAL_CALL createElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + void SAL_CALL destroyElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + ::sal_Bool SAL_CALL requestElement( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL getElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > > SAL_CALL getElements( ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL showElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL hideElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL dockWindow( const ::rtl::OUString& aName, ::com::sun::star::ui::DockingArea DockingArea, const ::com::sun::star::awt::Point& Pos ) throw (::com::sun::star::uno::RuntimeException); + ::sal_Bool SAL_CALL dockAllWindows( ::sal_Int16 nElementType ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL floatWindow( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + ::sal_Bool SAL_CALL lockWindow( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException); + ::sal_Bool SAL_CALL unlockWindow( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException); + void SAL_CALL setElementSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException); + void SAL_CALL setElementPos( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos ) throw (::com::sun::star::uno::RuntimeException); + void SAL_CALL setElementPosSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos, const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL isElementVisible( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL isElementFloating( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL isElementDocked( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + ::sal_Bool SAL_CALL isElementLocked( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException); + ::com::sun::star::awt::Size SAL_CALL getElementSize( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + ::com::sun::star::awt::Point SAL_CALL getElementPos( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + + private: + enum DockingOperation + { + DOCKOP_BEFORE_COLROW, + DOCKOP_ON_COLROW, + DOCKOP_AFTER_COLROW + }; + + typedef std::vector< UIElement > UIElementVector; + struct SingleRowColumnWindowData + { + SingleRowColumnWindowData() : nVarSize( 0 ), nStaticSize( 0 ), nSpace( 0 ) {} + + std::vector< rtl::OUString > aUIElementNames; + std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > aRowColumnWindows; + std::vector< ::com::sun::star::awt::Rectangle > aRowColumnWindowSizes; + std::vector< sal_Int32 > aRowColumnSpace; + ::com::sun::star::awt::Rectangle aRowColumnRect; + sal_Int32 nVarSize; + sal_Int32 nStaticSize; + sal_Int32 nSpace; + sal_Int32 nRowColumn; + }; + + //--------------------------------------------------------------------------------------------------------- + // internal helper methods + //--------------------------------------------------------------------------------------------------------- + bool implts_isParentWindowVisible() const; + ::Rectangle implts_calcDockingArea(); + void implts_sortUIElements(); + void implts_reparentToolbars(); + rtl::OUString implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const; + void implts_setElementData( UIElement& rUIElement, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDockableWindow >& rDockWindow ); + void implts_destroyDockingAreaWindows(); + + //--------------------------------------------------------------------------------------------------------- + // layout methods + //--------------------------------------------------------------------------------------------------------- + void implts_setDockingAreaWindowSizes( const ::com::sun::star::awt::Rectangle& rBorderSpace ); + ::Point implts_findNextCascadeFloatingPos(); + void implts_renumberRowColumnData( ::com::sun::star::ui::DockingArea eDockingArea, DockingOperation eDockingOperation, const UIElement& rUIElement ); + void implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockingArea, + sal_Int32 nOffset, + SingleRowColumnWindowData& rRowColumnWindowData, + const ::Size& rContainerSize ); + + //--------------------------------------------------------------------------------------------------------- + // lookup/container methods + //--------------------------------------------------------------------------------------------------------- + UIElement implts_findElement( const rtl::OUString& aName ); + UIElement implts_findElement( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xToolbar ); + UIElement& impl_findElement( const rtl::OUString& aName ); + bool implts_insertElement( const UIElement& rUIElement ); + void implts_setElement( const UIElement& rUIElement ); + ::Size implts_getTopBottomDockingAreaSizes(); + + //--------------------------------------------------------------------------------------------------------- + // internal docking methods + //--------------------------------------------------------------------------------------------------------- + ::Rectangle implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ); + void implts_calcDockingPosSize( UIElement& aUIElement, DockingOperation& eDockOperation, ::Rectangle& rTrackingRect, const Point& rMousePos ); + DockingOperation implts_determineDockingOperation( ::com::sun::star::ui::DockingArea DockingArea, const ::Rectangle& rRowColRect, const Point& rMousePos ); + ::Rectangle implts_getWindowRectFromRowColumn( ::com::sun::star::ui::DockingArea DockingArea, const SingleRowColumnWindowData& rRowColumnWindowData, const ::Point& rMousePos, const rtl::OUString& rExcludeElementName ); + ::Rectangle implts_determineFrontDockingRect( ::com::sun::star::ui::DockingArea eDockingArea, + sal_Int32 nRowCol, + const ::Rectangle& rDockedElementRect, + const ::rtl::OUString& rMovedElementName, + const ::Rectangle& rMovedElementRect ); + ::Rectangle implts_calcTrackingAndElementRect( ::com::sun::star::ui::DockingArea eDockingArea, + sal_Int32 nRowCol, + UIElement& rUIElement, + const ::Rectangle& rTrackingRect, + const ::Rectangle& rRowColumnRect, + const ::Size& rContainerWinSize ); + + void implts_getDockingAreaElementInfos( ::com::sun::star::ui::DockingArea DockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ); + void implts_getDockingAreaElementInfoOnSingleRowCol( ::com::sun::star::ui::DockingArea, sal_Int32 nRowCol, SingleRowColumnWindowData& rRowColumnWindowData ); + void implts_findNextDockingPos( ::com::sun::star::ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ); + void implts_setTrackingRect( ::com::sun::star::ui::DockingArea eDockingArea, const ::Point& rMousePos, ::Rectangle& rTrackingRect ); + + //--------------------------------------------------------------------------------------------------------- + // creation methods + //--------------------------------------------------------------------------------------------------------- + void implts_createAddonsToolBars(); + void implts_createCustomToolBars(); +// void implts_createNonContextSensitiveToolBars(); + void implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aCustomTbxSeq ); + void implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ); + void implts_createElement( const ::rtl::OUString& aName, bool& bNotify, ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement ); + css::uno::Reference< css::ui::XUIElement > implts_createElement( const ::rtl::OUString& aName ); + + //--------------------------------------------------------------------------------------------------------- + // persistence methods + //--------------------------------------------------------------------------------------------------------- + sal_Bool implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ); + void implts_writeWindowStateData( const rtl::OUString& aName, const UIElement& rElementData ); + + //--------------------------------------------------------------------------------------------------------- + // members + //--------------------------------------------------------------------------------------------------------- + css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; + css::uno::Reference< css::frame::XFrame > m_xFrame; + css::uno::Reference< css::awt::XWindow2 > m_xContainerWindow; + css::uno::Reference< css::awt::XWindow > m_xDockAreaWindows[DOCKINGAREAS_COUNT]; + css::uno::Reference< ::com::sun::star::ui::XUIElementFactory > m_xUIElementFactoryManager; + css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr; + css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr; + css::uno::Reference< ::com::sun::star::awt::XToolkit > m_xToolkit; + css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; + + UIElementVector m_aUIElements; + UIElement m_aDockUIElement; + Point m_aStartDockMousePos; + Rectangle m_aDockingArea; + Rectangle m_aDockingAreaOffsets; + DockingOperation m_eDockOperation; + + AddonsOptions* m_pAddonOptions; + GlobalSettings* m_pGlobalSettings; + + bool m_bComponentAttached; + bool m_bMustLayout; + bool m_bLayoutDirty; + bool m_bStoreWindowState; + bool m_bGlobalSettings; + bool m_bDockingInProgress; + + ::rtl::OUString m_aFullAddonTbxPrefix; + ::rtl::OUString m_aCustomTbxPrefix; + ::rtl::OUString m_aCustomizeCmd; +}; + +} // namespace framework + +#endif // __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_ diff --git a/framework/source/layoutmanager/uielement.cxx b/framework/source/layoutmanager/uielement.cxx new file mode 100755 index 000000000000..dda5aa352a08 --- /dev/null +++ b/framework/source/layoutmanager/uielement.cxx @@ -0,0 +1,156 @@ +/************************************************************************* + * + * 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: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +using namespace ::com::sun::star; + +namespace framework +{ + + bool UIElement::operator< ( const ::framework::UIElement& aUIElement ) const +{ + if ( !m_xUIElement.is() && aUIElement.m_xUIElement.is() ) + return false; + else if ( m_xUIElement.is() && !aUIElement.m_xUIElement.is() ) + return true; + else if ( !m_bVisible && aUIElement.m_bVisible ) + return false; + else if ( m_bVisible && !aUIElement.m_bVisible ) + return true; + else if ( !m_bFloating && aUIElement.m_bFloating ) + return true; + else if ( m_bFloating && !aUIElement.m_bFloating ) + return false; + else + { + if ( m_bFloating ) + { + bool bEqual = ( m_aFloatingData.m_aPos.Y() == aUIElement.m_aFloatingData.m_aPos.Y() ); + if ( bEqual ) + return ( m_aFloatingData.m_aPos.X() < aUIElement.m_aFloatingData.m_aPos.X() ); + else + return ( m_aFloatingData.m_aPos.Y() < aUIElement.m_aFloatingData.m_aPos.Y() ); + } + else + { + if ( m_aDockedData.m_nDockedArea < aUIElement.m_aDockedData.m_nDockedArea ) + return true; + else if ( m_aDockedData.m_nDockedArea > aUIElement.m_aDockedData.m_nDockedArea ) + return false; + else + { + if ( m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_TOP || + m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) + { + if ( !( m_aDockedData.m_aPos.Y() == aUIElement.m_aDockedData.m_aPos.Y() ) ) + return ( m_aDockedData.m_aPos.Y() < aUIElement.m_aDockedData.m_aPos.Y() ); + else + { + bool bEqual = ( m_aDockedData.m_aPos.X() == aUIElement.m_aDockedData.m_aPos.X() ); + if ( bEqual ) + { + if ( m_bUserActive && !aUIElement.m_bUserActive ) + return sal_True; + else if ( !m_bUserActive && aUIElement.m_bUserActive ) + return sal_False; + else + return sal_False; + } + else + return ( m_aDockedData.m_aPos.X() <= aUIElement.m_aDockedData.m_aPos.X() ); + } + } + else + { + if ( !( m_aDockedData.m_aPos.X() == aUIElement.m_aDockedData.m_aPos.X() ) ) + return ( m_aDockedData.m_aPos.X() < aUIElement.m_aDockedData.m_aPos.X() ); + else + { + bool bEqual = ( m_aDockedData.m_aPos.Y() == aUIElement.m_aDockedData.m_aPos.Y() ); + if ( bEqual ) + { + if ( m_bUserActive && !aUIElement.m_bUserActive ) + return sal_True; + else if ( !m_bUserActive && aUIElement.m_bUserActive ) + return sal_False; + else + return sal_False; + } + else + return ( m_aDockedData.m_aPos.Y() <= aUIElement.m_aDockedData.m_aPos.Y() ); + } + } + } + } + } +} + +UIElement& UIElement::operator= ( const UIElement& rUIElement ) +{ + m_aType = rUIElement.m_aType; + m_aName = rUIElement.m_aName; + m_aUIName = rUIElement.m_aUIName; + m_xUIElement = rUIElement.m_xUIElement; + m_bFloating = rUIElement.m_bFloating; + m_bVisible = rUIElement.m_bVisible; + m_bUserActive = rUIElement.m_bUserActive; + m_bCreateNewRowCol0 = rUIElement.m_bCreateNewRowCol0; + m_bDeactiveHide = rUIElement.m_bDeactiveHide; + m_bMasterHide = rUIElement.m_bMasterHide; + m_bContextSensitive = rUIElement.m_bContextSensitive; + m_bContextActive = rUIElement.m_bContextActive; + m_bNoClose = rUIElement.m_bNoClose; + m_bSoftClose = rUIElement.m_bSoftClose; + m_bStateRead = rUIElement.m_bStateRead; + m_nStyle = rUIElement.m_nStyle; + m_aDockedData = rUIElement.m_aDockedData; + m_aFloatingData = rUIElement.m_aFloatingData; + return *this; +} + +} // namespace framework diff --git a/framework/source/services/makefile.mk b/framework/source/services/makefile.mk index 2978d9aacf5e..eaeaae1f8a82 100644 --- a/framework/source/services/makefile.mk +++ b/framework/source/services/makefile.mk @@ -53,7 +53,8 @@ SLOFILES=\ $(SLO)$/sessionlistener.obj \ $(SLO)$/taskcreatorsrv.obj \ $(SLO)$/uriabbreviation.obj \ - $(SLO)$/tabwindowservice.obj + $(SLO)$/tabwindowservice.obj \ + $(SLO)$/modelwinservice.obj SRS1NAME=$(TARGET) SRC1FILES= fwk_services.src diff --git a/framework/source/services/modelwinservice.cxx b/framework/source/services/modelwinservice.cxx new file mode 100755 index 000000000000..d50fe7dcc653 --- /dev/null +++ b/framework/source/services/modelwinservice.cxx @@ -0,0 +1,279 @@ +/************************************************************************* + * + * 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: urltransformer.cxx,v $ + * $Revision: 1.17 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include "services.h" +#include "services/modelwinservice.hxx" + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include + +using namespace ::com::sun::star; + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +namespace framework{ + +//_________________________________________________________________________________________________________________ +// non exported definitions +//_________________________________________________________________________________________________________________ + +//_________________________________________________________________________________________________________________ +// declarations +//_________________________________________________________________________________________________________________ + +class Impl_ModelWinService +{ + public: + ~Impl_ModelWinService(); + + static Impl_ModelWinService* getSingleInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + + uno::Any getByName( const ::rtl::OUString& sName ) + throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ); + + uno::Sequence< ::rtl::OUString > getElementNames() + throw( uno::RuntimeException ); + + sal_Bool hasByName( const ::rtl::OUString& sName ) + throw( uno::RuntimeException ); + + uno::Type getElementType() + throw( css::uno::RuntimeException ); + + sal_Bool hasElements() + throw( css::uno::RuntimeException ); + + void registerModelForXWindow( const uno::Reference< awt::XWindow >& rWindow, const uno::Reference< awt::XControlModel >& rModel ); + + void deregisterModelForXWindow( const uno::Reference< awt::XWindow >& rWindow ); + + private: + typedef BaseHash< uno::WeakReference< awt::XControlModel > > ModelWinMap; + + Impl_ModelWinService(); + Impl_ModelWinService( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + + static Impl_ModelWinService* m_pModelWinService; + + ::com::sun::star::uno::WeakReference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; + ModelWinMap m_aModelMap; +}; + +Impl_ModelWinService* Impl_ModelWinService::m_pModelWinService = 0; + +Impl_ModelWinService* Impl_ModelWinService::getSingleInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager ) +{ + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + if ( !m_pModelWinService ) + m_pModelWinService = new Impl_ModelWinService( rServiceManager ); + return m_pModelWinService; +} + +Impl_ModelWinService::Impl_ModelWinService( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager ) : + m_xServiceManager( rServiceManager ) +{ +} + +Impl_ModelWinService::Impl_ModelWinService() +{ +} + +Impl_ModelWinService::~Impl_ModelWinService() +{ +} + +void Impl_ModelWinService::registerModelForXWindow( const uno::Reference< awt::XWindow >& rWindow, const uno::Reference< awt::XControlModel >& rModel ) +{ + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + + ::rtl::OUString sName = rtl::OUString::valueOf( reinterpret_cast< sal_Int64 >((void*)rWindow.get())); + ModelWinMap::iterator pIter = m_aModelMap.find( sName ); + if ( pIter != m_aModelMap.end() ) + pIter->second = rModel; + else + m_aModelMap[sName] = rModel; +} + +void Impl_ModelWinService::deregisterModelForXWindow( const uno::Reference< awt::XWindow >& /*rWindow*/ ) +{ +} + +uno::Any Impl_ModelWinService::getByName( const ::rtl::OUString& sName ) +throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) +{ + uno::Any aAny; + + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + ModelWinMap::iterator pIter = m_aModelMap.find( sName ); + if ( pIter != m_aModelMap.end()) + { + uno::Reference< awt::XControlModel > xModel( pIter->second ); + aAny = uno::makeAny(xModel); + } + + return aAny; +} + +uno::Sequence< ::rtl::OUString > Impl_ModelWinService::getElementNames() +throw( uno::RuntimeException ) +{ + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + uno::Sequence< ::rtl::OUString > aResult( m_aModelMap.size() ); + + sal_Int32 i = 0; + ModelWinMap::const_iterator pIter = m_aModelMap.begin(); + while ( pIter != m_aModelMap.end()) + aResult[i++] = pIter->first; + + return aResult; +} + +sal_Bool Impl_ModelWinService::hasByName( const ::rtl::OUString& sName ) +throw( uno::RuntimeException ) +{ + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + ModelWinMap::iterator pIter = m_aModelMap.find( sName ); + if ( pIter != m_aModelMap.end()) + return true; + else + return false; +} + +uno::Type Impl_ModelWinService::getElementType() +throw( css::uno::RuntimeException ) +{ + return ::getCppuType(( const uno::Reference< awt::XControlModel >*)NULL ); +} + +sal_Bool Impl_ModelWinService::hasElements() +throw( css::uno::RuntimeException ) +{ + osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; + return (m_aModelMap.size() > 0); +} + +//***************************************************************************************************************** +// css::uno::XInterface, XTypeProvider, XServiceInfo +//***************************************************************************************************************** + +DEFINE_XINTERFACE_4 ( ModelWinService , + OWeakObject , + DIRECT_INTERFACE(css::lang::XTypeProvider ), + DIRECT_INTERFACE(css::lang::XServiceInfo ), + DIRECT_INTERFACE(css::container::XNameAccess ), + DIRECT_INTERFACE(css::container::XElementAccess ) + ) + +DEFINE_XTYPEPROVIDER_4 ( ModelWinService , + css::lang::XTypeProvider , + css::lang::XServiceInfo , + css::container::XNameAccess , + css::container::XElementAccess + ) + +DEFINE_XSERVICEINFO_MULTISERVICE ( ModelWinService , + OWeakObject , + SERVICENAME_MODELWINSERVICE , + IMPLEMENTATIONNAME_MODELWINSERVICE + ) + +DEFINE_INIT_SERVICE ( ModelWinService, + { + } + ) + +//***************************************************************************************************************** +// constructor +//***************************************************************************************************************** +ModelWinService::ModelWinService(const uno::Reference< lang::XMultiServiceFactory >& rServiceManager ) : + m_xServiceManager( rServiceManager ) +{ +} + +ModelWinService::~ModelWinService() +{ +} + +void ModelWinService::registerModelForXWindow( const uno::Reference< awt::XWindow >& rWindow, const uno::Reference< awt::XControlModel >& rModel ) +{ + Impl_ModelWinService::getSingleInstance(m_xServiceManager)->registerModelForXWindow( rWindow, rModel ); +} + +void ModelWinService::deregisterModelForXWindow( const uno::Reference< awt::XWindow >& rWindow ) +{ + Impl_ModelWinService::getSingleInstance(m_xServiceManager)->deregisterModelForXWindow( rWindow ); +} + +uno::Any SAL_CALL ModelWinService::getByName( const ::rtl::OUString& sName ) +throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) +{ + return Impl_ModelWinService::getSingleInstance(m_xServiceManager)->getByName( sName ); +} + +uno::Sequence< ::rtl::OUString > SAL_CALL ModelWinService::getElementNames() +throw( uno::RuntimeException ) +{ + return Impl_ModelWinService::getSingleInstance(m_xServiceManager)->getElementNames( ); +} + +sal_Bool SAL_CALL ModelWinService::hasByName( const ::rtl::OUString& sName ) +throw( uno::RuntimeException ) +{ + return Impl_ModelWinService::getSingleInstance(m_xServiceManager)->hasByName( sName ); +} + +//--------------------------------------------------------------------------------------------------------- +// XElementAccess +//--------------------------------------------------------------------------------------------------------- +uno::Type SAL_CALL ModelWinService::getElementType() +throw( uno::RuntimeException ) +{ + return ::getCppuType( (const uno::Reference< awt::XControlModel > *)NULL ); +} + +sal_Bool SAL_CALL ModelWinService::hasElements() +throw( uno::RuntimeException ) +{ + return Impl_ModelWinService::getSingleInstance(m_xServiceManager)->hasElements(); +} + +} diff --git a/framework/source/uielement/makefile.mk b/framework/source/uielement/makefile.mk index da4ab3d34c74..620f32421aea 100644 --- a/framework/source/uielement/makefile.mk +++ b/framework/source/uielement/makefile.mk @@ -80,6 +80,8 @@ SLOFILES= \ $(SLO)$/toolbarsmenucontroller.obj \ $(SLO)$/toolbarwrapper.obj \ $(SLO)$/uicommanddescription.obj \ + $(SLO)$/panelwrapper.obj \ + $(SLO)$/panelwindow.obj # --- Targets ------------------------------------------------------ diff --git a/framework/source/uielement/panelwindow.cxx b/framework/source/uielement/panelwindow.cxx new file mode 100755 index 000000000000..c8729dbb028d --- /dev/null +++ b/framework/source/uielement/panelwindow.cxx @@ -0,0 +1,77 @@ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include + +namespace framework +{ + +PanelWindow::PanelWindow( Window* pParent, WinBits nWinBits ) : + DockingWindow( pParent, nWinBits ) +{ +} + +PanelWindow::~PanelWindow() +{ +} + +const ::rtl::OUString& PanelWindow::getResourceURL() const +{ + return m_aResourceURL; +} + +void PanelWindow::setResourceURL(const ::rtl::OUString& rResourceURL) +{ + m_aResourceURL = rResourceURL; +} + +Window* PanelWindow::getContentWindow() const +{ + return m_pContentWindow; +} + +void PanelWindow::setContentWindow( Window* pContentWindow ) +{ + m_pContentWindow = pContentWindow; + if ( m_pContentWindow != NULL ) + { + m_pContentWindow->SetParent(this); + m_pContentWindow->SetSizePixel( GetOutputSizePixel() ); + m_pContentWindow->Show(); + } +} + +void PanelWindow::Command( const CommandEvent& rCEvt ) +{ + if ( m_aCommandHandler.IsSet() ) + m_aCommandHandler.Call( (void *)( &rCEvt )); + DockingWindow::Command( rCEvt ); +} + +void PanelWindow::StateChanged( StateChangedType nType ) +{ + DockingWindow::StateChanged( nType ); + if ( m_aStateChangedHandler.IsSet() ) + m_aStateChangedHandler.Call( &nType ); +} + +void PanelWindow::DataChanged( const DataChangedEvent& rDCEvt ) +{ + DockingWindow::DataChanged( rDCEvt ); + if ( m_aDataChangedHandler.IsSet() ) + m_aDataChangedHandler.Call( (void*)&rDCEvt ); +} + +void PanelWindow::Resize() +{ + DockingWindow::Resize(); + if ( m_pContentWindow ) + m_pContentWindow->SetSizePixel( GetOutputSizePixel() ); +} + +} diff --git a/framework/source/uielement/panelwrapper.cxx b/framework/source/uielement/panelwrapper.cxx new file mode 100755 index 000000000000..91bc6fa9dac8 --- /dev/null +++ b/framework/source/uielement/panelwrapper.cxx @@ -0,0 +1,227 @@ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include + +using namespace com::sun::star; +using namespace com::sun::star::uno; +using namespace com::sun::star::beans; +using namespace com::sun::star::frame; +using namespace com::sun::star::lang; +using namespace com::sun::star::container; +using namespace com::sun::star::awt; +using namespace ::com::sun::star::ui; + +namespace framework +{ + +PanelWrapper::PanelWrapper( const Reference< XMultiServiceFactory >& xServiceManager ) : + UIElementWrapperBase( UIElementType::DOCKINGWINDOW ), + m_xServiceManager( xServiceManager ), + m_bNoClose(false) +{ +} + +PanelWrapper::~PanelWrapper() +{ +} + +// XInterface +void SAL_CALL PanelWrapper::acquire() throw() +{ + UIElementWrapperBase::acquire(); +} + +void SAL_CALL PanelWrapper::release() throw() +{ + UIElementWrapperBase::release(); +} + +uno::Any SAL_CALL PanelWrapper::queryInterface( const uno::Type & rType ) +throw( ::com::sun::star::uno::RuntimeException ) +{ + return UIElementWrapperBase::queryInterface( rType ); +} + +// XComponent +void SAL_CALL PanelWrapper::dispose() throw ( RuntimeException ) +{ + Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); + Reference< XMultiServiceFactory > xSMGR( m_xServiceManager ); + Reference< XWindow > xWindow; + + { + ResetableGuard aLock( m_aLock ); + if ( m_bDisposed ) + return; + xSMGR = m_xServiceManager; + } + + com::sun::star::lang::EventObject aEvent( xThis ); + m_aListenerContainer.disposeAndClear( aEvent ); + + rtl::OUString aModelWinService( SERVICENAME_MODELWINSERVICE ); + Reference< XNameAccess > xNameAccess( xSMGR->createInstance( aModelWinService ), UNO_QUERY ); + if ( xNameAccess.is() ) + { + ModelWinService* pService = dynamic_cast< ModelWinService* >( xNameAccess.get() ); + if ( pService != 0 ) + { + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + PanelWindow* pPanelWindow = dynamic_cast< PanelWindow* >( m_xPanelWindow.get() ); + if ( pPanelWindow != NULL ) + { + xWindow = VCLUnoHelper::GetInterface( pPanelWindow->getContentWindow() ); + pService->deregisterModelForXWindow( xWindow ); + } + } + } + + ResetableGuard aLock( m_aLock ); + m_xPanelWindow.clear(); + m_bDisposed = sal_True; +} + +// XInitialization +void SAL_CALL PanelWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) +{ + ResetableGuard aLock( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( !m_bInitialized ) + { + UIElementWrapperBase::initialize( aArguments ); + + sal_Bool bPopupMode( sal_False ); + Reference< XWindow > xContentWindow; + for ( sal_Int32 i = 0; i < aArguments.getLength(); i++ ) + { + PropertyValue aPropValue; + if ( aArguments[i] >>= aPropValue ) + { + if ( aPropValue.Name.equalsAsciiL( "PopupMode", 9 )) + aPropValue.Value >>= bPopupMode; + else if ( aPropValue.Name.equalsAsciiL( "ContentWindow", 13 )) + aPropValue.Value >>= xContentWindow; + } + } + + Reference< XFrame > xFrame( m_xWeakFrame ); + if ( xFrame.is() ) + { + PanelWindow* pPanelWindow(0); + Window* pContentWindow(0); + { + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); + pContentWindow = VCLUnoHelper::GetWindow( xContentWindow ); + if ( pWindow ) + { + ULONG nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + + pPanelWindow = new PanelWindow( pWindow, nStyles ); + m_xPanelWindow = VCLUnoHelper::GetInterface( pPanelWindow ); + pPanelWindow->setResourceURL( m_aResourceURL ); + pPanelWindow->setContentWindow( pContentWindow ); + } + } + + try + { + } + catch ( NoSuchElementException& ) + { + } + } + } +} + +// XEventListener +void SAL_CALL PanelWrapper::disposing( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException) +{ + // nothing todo +} + +// XUpdatable +void SAL_CALL PanelWrapper::update() throw (::com::sun::star::uno::RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); +} + +// XUIElement interface +Reference< XInterface > SAL_CALL PanelWrapper::getRealInterface( ) throw (::com::sun::star::uno::RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + return m_xPanelWindow; +} + +void SAL_CALL PanelWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ) +{ + ResetableGuard aLock( m_aLock ); + sal_Bool bNoClose( m_bNoClose ); + aLock.unlock(); + + UIElementWrapperBase::setFastPropertyValue_NoBroadcast( nHandle, aValue ); + + aLock.lock(); + + sal_Bool bNewNoClose( m_bNoClose ); + if ( m_xPanelWindow.is() && !m_bDisposed && ( bNewNoClose != bNoClose )) + { + PanelWindow* pPanelWindow = dynamic_cast< PanelWindow* >( VCLUnoHelper::GetWindow( m_xPanelWindow ) ); + if ( pPanelWindow ) + { + if ( bNewNoClose ) + { + pPanelWindow->SetStyle( pPanelWindow->GetStyle() & ~WB_CLOSEABLE ); + pPanelWindow->SetFloatStyle( pPanelWindow->GetFloatStyle() & ~WB_CLOSEABLE ); + } + else + { + pPanelWindow->SetStyle( pPanelWindow->GetStyle() | WB_CLOSEABLE ); + pPanelWindow->SetFloatStyle( pPanelWindow->GetFloatStyle() | WB_CLOSEABLE ); + } + } + } +} + +} // namespace framework diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index ed7e2e131550..553f9e10e6b8 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -337,8 +337,14 @@ SHL4OBJS= \ $(SLO)$/windowcommanddispatch.obj \ $(SLO)$/windowstateconfiguration.obj \ $(SLO)$/windowcontentfactorymanager.obj \ - $(SLO)$/startmoduledispatcher.obj - + $(SLO)$/startmoduledispatcher.obj \ + $(SLO)$/modelwinservice.obj \ + $(SLO)$/panelmanager.obj \ + $(SLO)$/panel.obj \ + $(SLO)$/helpers.obj \ + $(SLO)$/uielement.obj \ + $(SLO)$/toolbarlayoutmanager.obj + SHL4STDLIBS= \ $(FWILIB) \ $(FWELIB) \ From 95f3d4c562939999afe323aca72ac070b466e15f Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Sat, 26 Jun 2010 01:29:37 +0200 Subject: [PATCH 036/279] CWS gnumake2: module reorg --- ...get_res_fwe.mk => AllLangResTarget_fwe.mk} | 0 .../{prj/target_lib_fwe.mk => Library_fwe.mk} | 0 .../{prj/target_lib_fwi.mk => Library_fwi.mk} | 0 .../{prj/target_lib_fwk.mk => Library_fwk.mk} | 0 .../{prj/target_lib_fwl.mk => Library_fwl.mk} | 0 .../{prj/target_lib_fwm.mk => Library_fwm.mk} | 0 framework/Makefile | 9 +++-- ...odule_framework.mk => Module_framework.mk} | 38 +++++++------------ .../target_package_dtd.mk => Package_dtd.mk} | 0 .../target_package_inc.mk => Package_inc.mk} | 0 ...ackage_uiconfig.mk => Package_uiconfig.mk} | 0 ...ackage_unotypes.mk => Package_unotypes.mk} | 0 ...t_res_sfx2.mk => AllLangResTarget_sfx2.mk} | 0 ...target_lib_qstart.mk => Library_qstart.mk} | 0 .../target_lib_sfx2.mk => Library_sfx2.mk} | 0 sfx2/Makefile | 9 +++-- .../target_module_sfx2.mk => Module_sfx2.mk} | 18 +++------ .../target_package_inc.mk => Package_inc.mk} | 0 .../target_package_sdi.mk => Package_sdi.mk} | 0 .../{prj/target_lib_xo.mk => Library_xo.mk} | 0 .../{prj/target_lib_xof.mk => Library_xof.mk} | 0 xmloff/Makefile | 9 +++-- ...rget_module_xmloff.mk => Module_xmloff.mk} | 18 ++++----- .../target_package_dtd.mk => Package_dtd.mk} | 0 .../target_package_inc.mk => Package_inc.mk} | 0 25 files changed, 41 insertions(+), 60 deletions(-) rename framework/{prj/target_res_fwe.mk => AllLangResTarget_fwe.mk} (100%) rename framework/{prj/target_lib_fwe.mk => Library_fwe.mk} (100%) rename framework/{prj/target_lib_fwi.mk => Library_fwi.mk} (100%) rename framework/{prj/target_lib_fwk.mk => Library_fwk.mk} (100%) rename framework/{prj/target_lib_fwl.mk => Library_fwl.mk} (100%) rename framework/{prj/target_lib_fwm.mk => Library_fwm.mk} (100%) rename framework/{prj/target_module_framework.mk => Module_framework.mk} (59%) rename framework/{prj/target_package_dtd.mk => Package_dtd.mk} (100%) rename framework/{prj/target_package_inc.mk => Package_inc.mk} (100%) rename framework/{prj/target_package_uiconfig.mk => Package_uiconfig.mk} (100%) rename framework/{prj/target_package_unotypes.mk => Package_unotypes.mk} (100%) rename sfx2/{prj/target_res_sfx2.mk => AllLangResTarget_sfx2.mk} (100%) rename sfx2/{prj/target_lib_qstart.mk => Library_qstart.mk} (100%) rename sfx2/{prj/target_lib_sfx2.mk => Library_sfx2.mk} (100%) rename sfx2/{prj/target_module_sfx2.mk => Module_sfx2.mk} (79%) rename sfx2/{prj/target_package_inc.mk => Package_inc.mk} (100%) rename sfx2/{prj/target_package_sdi.mk => Package_sdi.mk} (100%) rename xmloff/{prj/target_lib_xo.mk => Library_xo.mk} (100%) rename xmloff/{prj/target_lib_xof.mk => Library_xof.mk} (100%) rename xmloff/{prj/target_module_xmloff.mk => Module_xmloff.mk} (78%) rename xmloff/{prj/target_package_dtd.mk => Package_dtd.mk} (100%) rename xmloff/{prj/target_package_inc.mk => Package_inc.mk} (100%) diff --git a/framework/prj/target_res_fwe.mk b/framework/AllLangResTarget_fwe.mk similarity index 100% rename from framework/prj/target_res_fwe.mk rename to framework/AllLangResTarget_fwe.mk diff --git a/framework/prj/target_lib_fwe.mk b/framework/Library_fwe.mk similarity index 100% rename from framework/prj/target_lib_fwe.mk rename to framework/Library_fwe.mk diff --git a/framework/prj/target_lib_fwi.mk b/framework/Library_fwi.mk similarity index 100% rename from framework/prj/target_lib_fwi.mk rename to framework/Library_fwi.mk diff --git a/framework/prj/target_lib_fwk.mk b/framework/Library_fwk.mk similarity index 100% rename from framework/prj/target_lib_fwk.mk rename to framework/Library_fwk.mk diff --git a/framework/prj/target_lib_fwl.mk b/framework/Library_fwl.mk similarity index 100% rename from framework/prj/target_lib_fwl.mk rename to framework/Library_fwl.mk diff --git a/framework/prj/target_lib_fwm.mk b/framework/Library_fwm.mk similarity index 100% rename from framework/prj/target_lib_fwm.mk rename to framework/Library_fwm.mk diff --git a/framework/Makefile b/framework/Makefile index 9ab4b8ba83f4..60d34122e271 100644 --- a/framework/Makefile +++ b/framework/Makefile @@ -25,12 +25,13 @@ # #************************************************************************* +ifeq ($(strip $(SOLARENV)),) +$(error No environment set) +endif + GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk - -gb_CURRENT_MODULE := $(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))) - -$(eval $(call gb_Module_make_global_targets,$(gb_CURRENT_MODULE))) +$(eval $(call gb_Module_make_global_targets)) # vim: set noet sw=4 ts=4: diff --git a/framework/prj/target_module_framework.mk b/framework/Module_framework.mk similarity index 59% rename from framework/prj/target_module_framework.mk rename to framework/Module_framework.mk index 86a30a0b3e45..28b2e087b60f 100644 --- a/framework/prj/target_module_framework.mk +++ b/framework/Module_framework.mk @@ -25,31 +25,19 @@ # #************************************************************************* -include $(foreach targetdef,\ - lib_fwe \ - lib_fwi \ - lib_fwk \ - lib_fwl \ - lib_fwm \ - package_dtd \ - package_inc \ - package_uiconfig \ - package_unotypes \ - res_fwe \ -,$(SRCDIR)/framework/prj/target_$(targetdef).mk) +$(eval $(call gb_Module_Module,framework)) - -$(eval $(call gb_Module_Module,framework,\ - $(call gb_AllLangResTarget_get_target,fwe) \ - $(call gb_Library_get_target,fwe) \ - $(call gb_Library_get_target,fwi) \ - $(call gb_Library_get_target,fwk) \ - $(call gb_Library_get_target,fwl) \ - $(call gb_Library_get_target,fwm) \ - $(call gb_Library_get_target,fwe) \ - $(call gb_Package_get_target,framework_dtd) \ - $(call gb_Package_get_target,framework_inc) \ - $(call gb_Package_get_target,framework_uiconfig) \ - $(call gb_Package_get_target,framework_unotypes) \ +$(eval $(call gb_Module_add_targets,framework,\ + AllLangResTarget_fwe \ + Library_fwe \ + Library_fwi \ + Library_fwk \ + Library_fwl \ + Library_fwm \ + Package_dtd \ + Package_inc \ + Package_uiconfig \ + Package_unotypes \ )) + # vim: set noet ts=4 sw=4: diff --git a/framework/prj/target_package_dtd.mk b/framework/Package_dtd.mk similarity index 100% rename from framework/prj/target_package_dtd.mk rename to framework/Package_dtd.mk diff --git a/framework/prj/target_package_inc.mk b/framework/Package_inc.mk similarity index 100% rename from framework/prj/target_package_inc.mk rename to framework/Package_inc.mk diff --git a/framework/prj/target_package_uiconfig.mk b/framework/Package_uiconfig.mk similarity index 100% rename from framework/prj/target_package_uiconfig.mk rename to framework/Package_uiconfig.mk diff --git a/framework/prj/target_package_unotypes.mk b/framework/Package_unotypes.mk similarity index 100% rename from framework/prj/target_package_unotypes.mk rename to framework/Package_unotypes.mk diff --git a/sfx2/prj/target_res_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk similarity index 100% rename from sfx2/prj/target_res_sfx2.mk rename to sfx2/AllLangResTarget_sfx2.mk diff --git a/sfx2/prj/target_lib_qstart.mk b/sfx2/Library_qstart.mk similarity index 100% rename from sfx2/prj/target_lib_qstart.mk rename to sfx2/Library_qstart.mk diff --git a/sfx2/prj/target_lib_sfx2.mk b/sfx2/Library_sfx2.mk similarity index 100% rename from sfx2/prj/target_lib_sfx2.mk rename to sfx2/Library_sfx2.mk diff --git a/sfx2/Makefile b/sfx2/Makefile index 9ab4b8ba83f4..60d34122e271 100644 --- a/sfx2/Makefile +++ b/sfx2/Makefile @@ -25,12 +25,13 @@ # #************************************************************************* +ifeq ($(strip $(SOLARENV)),) +$(error No environment set) +endif + GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk - -gb_CURRENT_MODULE := $(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))) - -$(eval $(call gb_Module_make_global_targets,$(gb_CURRENT_MODULE))) +$(eval $(call gb_Module_make_global_targets)) # vim: set noet sw=4 ts=4: diff --git a/sfx2/prj/target_module_sfx2.mk b/sfx2/Module_sfx2.mk similarity index 79% rename from sfx2/prj/target_module_sfx2.mk rename to sfx2/Module_sfx2.mk index 3ec4e606795f..087c87bed797 100644 --- a/sfx2/prj/target_module_sfx2.mk +++ b/sfx2/Module_sfx2.mk @@ -25,19 +25,13 @@ # #************************************************************************* -$(eval $(call gb_Module_Module,sfx2,\ - $(call gb_AllLangResTarget_get_target,sfx) \ - $(call gb_Library_get_target,sfx) \ - $(call gb_Package_get_target,sfx2_inc) \ - $(call gb_Package_get_target,sfx2_sdi) \ -)) -# $(call gb_Library_get_target,qstart) \ +$(eval $(call gb_Module_Module,sfx2)) -$(eval $(call gb_Module_read_includes,sfx2,\ - lib_sfx2 \ - package_inc \ - package_sdi \ - res_sfx2 \ +$(eval $(call gb_Module_add_targets,sfx2,\ + AllLangResTarget_sfx2 \ + Library_sfx2 \ + Package_inc \ + Package_sdi \ )) # lib_qstart \ diff --git a/sfx2/prj/target_package_inc.mk b/sfx2/Package_inc.mk similarity index 100% rename from sfx2/prj/target_package_inc.mk rename to sfx2/Package_inc.mk diff --git a/sfx2/prj/target_package_sdi.mk b/sfx2/Package_sdi.mk similarity index 100% rename from sfx2/prj/target_package_sdi.mk rename to sfx2/Package_sdi.mk diff --git a/xmloff/prj/target_lib_xo.mk b/xmloff/Library_xo.mk similarity index 100% rename from xmloff/prj/target_lib_xo.mk rename to xmloff/Library_xo.mk diff --git a/xmloff/prj/target_lib_xof.mk b/xmloff/Library_xof.mk similarity index 100% rename from xmloff/prj/target_lib_xof.mk rename to xmloff/Library_xof.mk diff --git a/xmloff/Makefile b/xmloff/Makefile index 9ab4b8ba83f4..60d34122e271 100644 --- a/xmloff/Makefile +++ b/xmloff/Makefile @@ -25,12 +25,13 @@ # #************************************************************************* +ifeq ($(strip $(SOLARENV)),) +$(error No environment set) +endif + GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk - -gb_CURRENT_MODULE := $(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))) - -$(eval $(call gb_Module_make_global_targets,$(gb_CURRENT_MODULE))) +$(eval $(call gb_Module_make_global_targets)) # vim: set noet sw=4 ts=4: diff --git a/xmloff/prj/target_module_xmloff.mk b/xmloff/Module_xmloff.mk similarity index 78% rename from xmloff/prj/target_module_xmloff.mk rename to xmloff/Module_xmloff.mk index 6a90531db467..eacc83068dad 100644 --- a/xmloff/prj/target_module_xmloff.mk +++ b/xmloff/Module_xmloff.mk @@ -25,20 +25,16 @@ # #************************************************************************* -$(eval $(call gb_Module_Module,xmloff,\ - $(call gb_Library_get_target,xo) \ - $(call gb_Library_get_target,xof) \ - $(call gb_Package_get_target,xmloff_dtd) \ - $(call gb_Package_get_target,xmloff_inc) \ -)) +$(eval $(call gb_Module_Module,xmloff)) -$(eval $(call gb_Module_read_includes,xmloff,\ - lib_xo \ - lib_xof \ - package_dtd \ - package_inc \ +$(eval $(call gb_Module_add_targets,xmloff,\ + Library_xo \ + Library_xof \ + Package_dtd \ + Package_inc \ )) #todo: map file #todo: xmlkywd.lib - built, but never used?! +# vim: set noet ts=4 sw=4: diff --git a/xmloff/prj/target_package_dtd.mk b/xmloff/Package_dtd.mk similarity index 100% rename from xmloff/prj/target_package_dtd.mk rename to xmloff/Package_dtd.mk diff --git a/xmloff/prj/target_package_inc.mk b/xmloff/Package_inc.mk similarity index 100% rename from xmloff/prj/target_package_inc.mk rename to xmloff/Package_inc.mk From aba206910970f804423bebb27a07c47004e9a127 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Sat, 26 Jun 2010 02:05:52 +0200 Subject: [PATCH 037/279] CWS gnumake2: reaching through verbosity and max processes --- framework/prj/makefile.mk | 35 ++++++++++++++++++++++++++++++++++- sfx2/prj/makefile.mk | 35 ++++++++++++++++++++++++++++++++++- xmloff/prj/makefile.mk | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 102 insertions(+), 3 deletions(-) diff --git a/framework/prj/makefile.mk b/framework/prj/makefile.mk index 2a0b99e72fd5..967bfea90d3c 100644 --- a/framework/prj/makefile.mk +++ b/framework/prj/makefile.mk @@ -1,2 +1,35 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +.IF $(VERBOSE) +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF + all: - cd .. && make -srj9 + @cd .. && make $(VERBOSEFLAG) -r -j$(MAXPROCESS) diff --git a/sfx2/prj/makefile.mk b/sfx2/prj/makefile.mk index 2a0b99e72fd5..967bfea90d3c 100644 --- a/sfx2/prj/makefile.mk +++ b/sfx2/prj/makefile.mk @@ -1,2 +1,35 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +.IF $(VERBOSE) +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF + all: - cd .. && make -srj9 + @cd .. && make $(VERBOSEFLAG) -r -j$(MAXPROCESS) diff --git a/xmloff/prj/makefile.mk b/xmloff/prj/makefile.mk index 2a0b99e72fd5..967bfea90d3c 100644 --- a/xmloff/prj/makefile.mk +++ b/xmloff/prj/makefile.mk @@ -1,2 +1,35 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +.IF $(VERBOSE) +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF + all: - cd .. && make -srj9 + @cd .. && make $(VERBOSEFLAG) -r -j$(MAXPROCESS) From dfc90a5e05629e4ca182e8edee5948a4edcab54d Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 28 Jun 2010 11:04:16 +0200 Subject: [PATCH 038/279] dockingwindows: #i122595# Remove getResourceURL call from PanelWrapper class --- framework/inc/uielement/panelwrapper.hxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/framework/inc/uielement/panelwrapper.hxx b/framework/inc/uielement/panelwrapper.hxx index c3f72140ad59..348fd679db9f 100755 --- a/framework/inc/uielement/panelwrapper.hxx +++ b/framework/inc/uielement/panelwrapper.hxx @@ -51,8 +51,6 @@ class PanelWrapper : public UIElementWrapperBase using cppu::OPropertySetHelper::disposing; virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); - ::rtl::OUString getResourceURL() { return m_aResourceURL; } - //------------------------------------------------------------------------------------------------------------- // protected methods //------------------------------------------------------------------------------------------------------------- From 547302257bf88a69e1e44060891687915ff1fe8d Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 7 Jul 2010 18:09:58 +0200 Subject: [PATCH 039/279] CWS gnumake2: fixing all module makefiles (copy from tools) --- sfx2/Makefile | 7 ++----- xmloff/Makefile | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sfx2/Makefile b/sfx2/Makefile index 60d34122e271..b198cc3d4c32 100644 --- a/sfx2/Makefile +++ b/sfx2/Makefile @@ -25,13 +25,10 @@ # #************************************************************************* -ifeq ($(strip $(SOLARENV)),) -$(error No environment set) -endif - +include $(dir $(firstword $(MAKEFILE_LIST)))/../SourcePath.mk GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk -$(eval $(call gb_Module_make_global_targets)) +$(eval $(call gb_Module_make_global_targets,$(foreach module,$(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))),$(CURRENTREPO)/$(module)/Module_$(module).mk))) # vim: set noet sw=4 ts=4: diff --git a/xmloff/Makefile b/xmloff/Makefile index 60d34122e271..b198cc3d4c32 100644 --- a/xmloff/Makefile +++ b/xmloff/Makefile @@ -25,13 +25,10 @@ # #************************************************************************* -ifeq ($(strip $(SOLARENV)),) -$(error No environment set) -endif - +include $(dir $(firstword $(MAKEFILE_LIST)))/../SourcePath.mk GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk -$(eval $(call gb_Module_make_global_targets)) +$(eval $(call gb_Module_make_global_targets,$(foreach module,$(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))),$(CURRENTREPO)/$(module)/Module_$(module).mk))) # vim: set noet sw=4 ts=4: From 6c520fd3411696ca2c46e9687d1cce33b34af935 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 8 Jul 2010 13:58:34 +0200 Subject: [PATCH 040/279] CWS gnumake2: using gnu make directly from build.pl --- framework/prj/build.lst | 34 +++------------------------------- framework/prj/gbuild.lst | 3 --- sfx2/prj/build.lst | 23 ++--------------------- sfx2/prj/gbuild.lst | 4 ---- xmloff/prj/build.lst | 16 ++-------------- xmloff/prj/gbuild.lst | 4 ---- 6 files changed, 7 insertions(+), 77 deletions(-) delete mode 100644 framework/prj/gbuild.lst delete mode 100644 sfx2/prj/gbuild.lst delete mode 100644 xmloff/prj/gbuild.lst diff --git a/framework/prj/build.lst b/framework/prj/build.lst index 12e597204710..3591f5b29a63 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,31 +1,3 @@ -fr framework : l10n svtools NULL -fr framework usr1 - all fr_mkout NULL -fr framework\inc nmake - all fr_inc NULL -fr framework\source\accelerators nmake - all fr_accelerators fr_threadhelp fr_inc NULL -fr framework\source\classes nmake - all fr_classes fr_threadhelp fr_constant fr_inc NULL -fr framework\source\constant nmake - all fr_constant fr_inc NULL -fr framework\source\dispatch nmake - all fr_dispatch fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\classes nmake - all fr_fweclasses fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\dispatch nmake - all fr_fwedispatch fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\helper nmake - all fr_fwehelper fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\interaction nmake - all fr_fweinteraction fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwe\xml nmake - all fr_fwexml fr_threadhelp fr_inc NULL -fr framework\source\fwi\classes nmake - all fr_fwiclasses fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwi\helper nmake - all fr_fwihelper fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwi\jobs nmake - all fr_fwijobs fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwi\threadhelp nmake - all fr_threadhelp fr_constant fr_inc NULL -fr framework\source\fwi\uielement nmake - all fr_fwiuielement fr_threadhelp fr_inc NULL -fr framework\source\helper nmake - all fr_helper fr_threadhelp fr_constant fr_inc NULL -fr framework\source\interaction nmake - all fr_interaction fr_threadhelp fr_constant fr_inc NULL -fr framework\source\jobs nmake - all fr_jobs fr_threadhelp fr_constant fr_inc NULL -fr framework\source\layoutmanager nmake - all fr_layoutmanager fr_threadhelp fr_inc NULL -fr framework\source\loadenv nmake - all fr_loadenv fr_threadhelp fr_constant fr_inc NULL -fr framework\source\recording nmake - all fr_recording fr_threadhelp fr_constant fr_inc NULL -fr framework\source\register nmake - all fr_register fr_threadhelp fr_constant fr_inc NULL -fr framework\source\services nmake - all fr_services fr_threadhelp fr_constant fr_inc NULL -fr framework\source\tabwin nmake - all fr_tabwin fr_threadhelp fr_inc NULL -fr framework\source\uiconfiguration nmake - all fr_uiconfiguration fr_threadhelp fr_inc NULL -fr framework\source\uielement nmake - all fr_uielement fr_threadhelp fr_inc NULL -fr framework\source\uifactory nmake - all fr_uifactory fr_threadhelp fr_inc NULL -fr framework\source\xml nmake - all fr_xml fr_threadhelp fr_inc NULL -fr framework\util nmake - all fr_util fr_constant fr_threadhelp fr_classes fr_loadenv fr_jobs fr_interaction fr_helper fr_dispatch fr_services fr_register fr_recording fr_layoutmanager fr_uielement fr_uifactory fr_xml fr_uiconfiguration fr_accelerators fr_tabwin fr_fweclasses fr_fwedispatch fr_fwehelper fr_fweinteraction fr_fwexml fr_fwiclasses fr_fwihelper fr_fwijobs fr_fwiuielement NULL +fr framework : l10n svtools NULL +fr framework usr1 - all fr_mkout NULL +fr framework\prj nmake - all fr_all NULL diff --git a/framework/prj/gbuild.lst b/framework/prj/gbuild.lst deleted file mode 100644 index 3591f5b29a63..000000000000 --- a/framework/prj/gbuild.lst +++ /dev/null @@ -1,3 +0,0 @@ -fr framework : l10n svtools NULL -fr framework usr1 - all fr_mkout NULL -fr framework\prj nmake - all fr_all NULL diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index 89e618e8fc12..7dc2a95cb994 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -1,23 +1,4 @@ sf sfx2 : l10n idl basic xmlscript framework shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL sf sfx2 usr1 - all sf_mkout NULL -sf sfx2\inc nmake - all sf_inc NULL -sf sfx2\prj get - all sf_prj NULL -sf sfx2\win\res get - all sf_wres NULL -sf sfx2\mac\res get - all sf_mres NULL -sf sfx2\source\inc get - all sf_sinc NULL -sf sfx2\sdi nmake - all sf_sdi NULL -sf sfx2\source\appl nmake - all sf_appl sf_sdi sf_inc NULL -sf sfx2\source\view nmake - all sf_view sf_sdi sf_inc NULL -sf sfx2\source\bastyp nmake - all sf_bast sf_sdi sf_inc NULL -sf sfx2\source\config nmake - all sf_cnfg sf_sdi sf_inc NULL -sf sfx2\source\control nmake - all sf_ctrl sf_sdi sf_inc NULL -sf sfx2\source\dialog nmake - all sf_dlg sf_sdi sf_inc NULL -sf sfx2\source\doc nmake - all sf_doc sf_sdi sf_inc NULL -sf sfx2\source\layout nmake - all sf_layout sf_sdi sf_inc NULL -sf sfx2\source\menu nmake - all sf_menu sf_sdi sf_inc NULL -sf sfx2\source\notify nmake - all sf_noti sf_sdi sf_inc NULL -sf sfx2\source\statbar nmake - all sf_sbar sf_sdi sf_inc NULL -sf sfx2\source\toolbox nmake - all sf_tbox sf_sdi sf_inc NULL -sf sfx2\source\inet nmake - all sf_inet sf_sdi sf_inc NULL -sf sfx2\source\explorer nmake - all sf_expl sf_sdi sf_inc NULL -sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL +sf sfx2\prj nmake - all sf_prj NULL + diff --git a/sfx2/prj/gbuild.lst b/sfx2/prj/gbuild.lst deleted file mode 100644 index 7dc2a95cb994..000000000000 --- a/sfx2/prj/gbuild.lst +++ /dev/null @@ -1,4 +0,0 @@ -sf sfx2 : l10n idl basic xmlscript framework shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL -sf sfx2 usr1 - all sf_mkout NULL -sf sfx2\prj nmake - all sf_prj NULL - diff --git a/xmloff/prj/build.lst b/xmloff/prj/build.lst index 8817d4590715..4dcebafb0386 100644 --- a/xmloff/prj/build.lst +++ b/xmloff/prj/build.lst @@ -1,16 +1,4 @@ xo xmloff : offapi svl vos NULL xo xmloff usr1 - all xo_mkout NULL -xo xmloff\prj get - all xo_prj NULL -xo xmloff\inc nmake - all xo_inc NULL -xo xmloff\source\core nmake - all xo_core xo_inc NULL -xo xmloff\source\meta nmake - all xo_meta xo_inc NULL -xo xmloff\source\style nmake - all xo_style xo_inc NULL -xo xmloff\source\text nmake - all xo_text xo_inc NULL -xo xmloff\source\draw nmake - all xo_draw xo_inc NULL -xo xmloff\source\chart nmake - all xo_chart xo_inc NULL -xo xmloff\source\forms nmake - all xo_forms xo_inc NULL -xo xmloff\source\script nmake - all xo_script xo_inc NULL -xo xmloff\source\transform nmake - all xo_transform xo_util xo_inc NULL -xo xmloff\source\xforms nmake - all xo_xforms xo_inc NULL -xo xmloff\source\table nmake - all xo_table xo_inc NULL -xo xmloff\util nmake - all xo_util xo_chart xo_core xo_draw xo_forms xo_meta xo_script xo_style xo_text xo_xforms xo_table NULL +xo xmloff\prj nmake - all xo_prj NULL + diff --git a/xmloff/prj/gbuild.lst b/xmloff/prj/gbuild.lst deleted file mode 100644 index 4dcebafb0386..000000000000 --- a/xmloff/prj/gbuild.lst +++ /dev/null @@ -1,4 +0,0 @@ -xo xmloff : offapi svl vos NULL -xo xmloff usr1 - all xo_mkout NULL -xo xmloff\prj nmake - all xo_prj NULL - From 03c937ee49c12ccae12c37105ddb9862e9aed312 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 8 Jul 2010 15:45:00 +0200 Subject: [PATCH 041/279] CWS gnumake2: also update framework module makefile --- framework/Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/framework/Makefile b/framework/Makefile index 60d34122e271..b198cc3d4c32 100644 --- a/framework/Makefile +++ b/framework/Makefile @@ -25,13 +25,10 @@ # #************************************************************************* -ifeq ($(strip $(SOLARENV)),) -$(error No environment set) -endif - +include $(dir $(firstword $(MAKEFILE_LIST)))/../SourcePath.mk GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk -$(eval $(call gb_Module_make_global_targets)) +$(eval $(call gb_Module_make_global_targets,$(foreach module,$(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))),$(CURRENTREPO)/$(module)/Module_$(module).mk))) # vim: set noet sw=4 ts=4: From e8ec11b41233376724acd0f58bf3f6439c0e21d8 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 8 Jul 2010 16:05:14 +0200 Subject: [PATCH 042/279] CWS gnumake2: hacking for qstart lib for now --- sfx2/Module_sfx2.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk index 087c87bed797..a9f0a2e57d4e 100644 --- a/sfx2/Module_sfx2.mk +++ b/sfx2/Module_sfx2.mk @@ -33,7 +33,13 @@ $(eval $(call gb_Module_add_targets,sfx2,\ Package_inc \ Package_sdi \ )) -# lib_qstart \ + + +# HACK to create a dummy quickstart lib +$(call gb_Module_get_target,sfx2) : $(call gb_Library_get_target,qstart_gtk) + +$(call gb_Library_get_target,qstart_gtk) : + touch $@ #todo: map file? #todo: source/appl ohne Optimierung? @@ -44,3 +50,5 @@ $(eval $(call gb_Module_add_targets,sfx2,\ #todo: ENABLE_LAYOUT #todo: quickstarter #todo: link against cocoa on Mac + +# vim: set noet sw=4 ts=4: From a3c66e78c137d6afd1293c722a730aa0ad2b1b57 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 16 Jul 2010 14:41:55 +0200 Subject: [PATCH 043/279] CWS gnumake2: vbahelper module deps --- vbahelper/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vbahelper/prj/build.lst b/vbahelper/prj/build.lst index 4ac57387c616..aafbb73c3b21 100644 --- a/vbahelper/prj/build.lst +++ b/vbahelper/prj/build.lst @@ -1,4 +1,4 @@ -vba vbahelper : offuh basic sfx2 svx cppuhelper vcl comphelper svtools tools sal NULL +vba vbahelper : oovbaapi offuh basic sfx2 svx filter cppuhelper vcl comphelper svtools tools sal NULL vba vbahelper usr1 - all vba_mkout NULL #vba vbahelper\inc nmake - all vba_inc NULL vba vbahelper\source\vbahelper nmake - all vba_vbahelper NULL From 17381ec4f0f9aa1b0283ff3096e15bac86413c4d Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Tue, 20 Jul 2010 16:48:23 +0200 Subject: [PATCH 044/279] CWS gnumake2: using GNUMAKE variable from configure --- framework/prj/makefile.mk | 2 +- sfx2/prj/makefile.mk | 2 +- xmloff/prj/makefile.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/prj/makefile.mk b/framework/prj/makefile.mk index 967bfea90d3c..8b00cb5a5818 100644 --- a/framework/prj/makefile.mk +++ b/framework/prj/makefile.mk @@ -32,4 +32,4 @@ VERBOSEFLAG := -s .ENDIF all: - @cd .. && make $(VERBOSEFLAG) -r -j$(MAXPROCESS) + @cd .. && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) diff --git a/sfx2/prj/makefile.mk b/sfx2/prj/makefile.mk index 967bfea90d3c..8b00cb5a5818 100644 --- a/sfx2/prj/makefile.mk +++ b/sfx2/prj/makefile.mk @@ -32,4 +32,4 @@ VERBOSEFLAG := -s .ENDIF all: - @cd .. && make $(VERBOSEFLAG) -r -j$(MAXPROCESS) + @cd .. && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) diff --git a/xmloff/prj/makefile.mk b/xmloff/prj/makefile.mk index 967bfea90d3c..8b00cb5a5818 100644 --- a/xmloff/prj/makefile.mk +++ b/xmloff/prj/makefile.mk @@ -32,4 +32,4 @@ VERBOSEFLAG := -s .ENDIF all: - @cd .. && make $(VERBOSEFLAG) -r -j$(MAXPROCESS) + @cd .. && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) From e401e6846b174c3f5deda3b3e19d89de2e4ac78a Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 23 Jul 2010 12:48:45 +0200 Subject: [PATCH 045/279] gnumake2: some more checks for module makefiles --- framework/Makefile | 10 +++++++++- framework/prj/makefile.mk | 9 +++++++-- sfx2/Makefile | 10 +++++++++- sfx2/prj/makefile.mk | 9 +++++++-- xmloff/Makefile | 10 +++++++++- xmloff/prj/makefile.mk | 9 +++++++-- 6 files changed, 48 insertions(+), 9 deletions(-) diff --git a/framework/Makefile b/framework/Makefile index b198cc3d4c32..3225bc97e12c 100644 --- a/framework/Makefile +++ b/framework/Makefile @@ -25,7 +25,15 @@ # #************************************************************************* -include $(dir $(firstword $(MAKEFILE_LIST)))/../SourcePath.mk +ifneq ($(MAKE_VERSION),3.81) +$(error You need at least GNU Make 3.81!) +endif + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../SourcePath.mk GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk diff --git a/framework/prj/makefile.mk b/framework/prj/makefile.mk index 8b00cb5a5818..3b1b54d4357f 100644 --- a/framework/prj/makefile.mk +++ b/framework/prj/makefile.mk @@ -25,11 +25,16 @@ # #************************************************************************* -.IF $(VERBOSE) +PRJ=.. +TARGET=prj + +.INCLUDE : settings.mk + +.IF "$(VERBOSE)"!="" VERBOSEFLAG := .ELSE VERBOSEFLAG := -s .ENDIF all: - @cd .. && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) diff --git a/sfx2/Makefile b/sfx2/Makefile index b198cc3d4c32..3225bc97e12c 100644 --- a/sfx2/Makefile +++ b/sfx2/Makefile @@ -25,7 +25,15 @@ # #************************************************************************* -include $(dir $(firstword $(MAKEFILE_LIST)))/../SourcePath.mk +ifneq ($(MAKE_VERSION),3.81) +$(error You need at least GNU Make 3.81!) +endif + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../SourcePath.mk GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk diff --git a/sfx2/prj/makefile.mk b/sfx2/prj/makefile.mk index 8b00cb5a5818..3b1b54d4357f 100644 --- a/sfx2/prj/makefile.mk +++ b/sfx2/prj/makefile.mk @@ -25,11 +25,16 @@ # #************************************************************************* -.IF $(VERBOSE) +PRJ=.. +TARGET=prj + +.INCLUDE : settings.mk + +.IF "$(VERBOSE)"!="" VERBOSEFLAG := .ELSE VERBOSEFLAG := -s .ENDIF all: - @cd .. && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) diff --git a/xmloff/Makefile b/xmloff/Makefile index b198cc3d4c32..3225bc97e12c 100644 --- a/xmloff/Makefile +++ b/xmloff/Makefile @@ -25,7 +25,15 @@ # #************************************************************************* -include $(dir $(firstword $(MAKEFILE_LIST)))/../SourcePath.mk +ifneq ($(MAKE_VERSION),3.81) +$(error You need at least GNU Make 3.81!) +endif + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../SourcePath.mk GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk diff --git a/xmloff/prj/makefile.mk b/xmloff/prj/makefile.mk index 8b00cb5a5818..3b1b54d4357f 100644 --- a/xmloff/prj/makefile.mk +++ b/xmloff/prj/makefile.mk @@ -25,11 +25,16 @@ # #************************************************************************* -.IF $(VERBOSE) +PRJ=.. +TARGET=prj + +.INCLUDE : settings.mk + +.IF "$(VERBOSE)"!="" VERBOSEFLAG := .ELSE VERBOSEFLAG := -s .ENDIF all: - @cd .. && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) From 75e6b316623c60396def0e010222ed896d46ecf1 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 23 Jul 2010 14:54:11 +0200 Subject: [PATCH 046/279] gnumake2: first try with gtk quickstarter, reenabling pch on sfx2 as it should work now after resync to DEV300_m84 --- sfx2/Library_qstart.mk | 71 +++++++++++++++++++++++++----------------- sfx2/Library_sfx2.mk | 2 +- sfx2/Module_sfx2.mk | 7 +++-- 3 files changed, 48 insertions(+), 32 deletions(-) diff --git a/sfx2/Library_qstart.mk b/sfx2/Library_qstart.mk index 2da2ada42db3..94c5d83b594d 100644 --- a/sfx2/Library_qstart.mk +++ b/sfx2/Library_qstart.mk @@ -25,56 +25,71 @@ # #************************************************************************* -#ifeq ($(OS),UNX) -$(eval $(call gb_Library_Library,qstart)) +ifeq ($(OS),LINUX) +ifeq ($(ENABLE_SYSTRAY_GTK),TRUE) -$(eval $(call gb_Library_set_include,qstart,\ +$(eval $(call gb_Library_Library,qstart_gtk)) + +$(eval $(call gb_Library_set_include,qstart_gtk,\ $$(INCLUDE) \ -I$(SRCDIR)/sfx2/inc \ -I$(SRCDIR)/sfx2/inc/sfx2 \ -I$(SRCDIR)/sfx2/inc/pch \ -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ + $(filter -I%,$(GTK_CFLAGS)) \ )) -#WTF: this nice code is currently found in the makefile.mk (unix part only) -# PKGCONFIG_MODULES=gtk+-2.0 -# .IF "$(PKGCONFIG_ROOT)"!="" -# PKG_CONFIG=$(PKGCONFIG_ROOT)/bin/pkg-config -# PKG_CONFIG_PATH:=$(PKGCONFIG_ROOT)/lib/pkgconfig -# .EXPORT : PKG_CONFIG_PATH -# PKGCONFIG_PREFIX=--define-variable=prefix=$(PKGCONFIG_ROOT) -# .ELSE -# PKG_CONFIG*=pkg-config -# .ENDIF -# PKGCONFIG_CFLAGS:=$(shell @$(PKG_CONFIG) $(PKGCONFIG_PREFIX) --cflags $(PKGCONFIG_MODULES)) -# PKGCONFIG_LIBS:=$(shell @$(PKG_CONFIG) $(PKGCONFIG_PREFIX) --libs $(PKGCONFIG_MODULES)) -# CFLAGS+=$(PKGCONFIG_CFLAGS - -ifeq ($(ENABLE_SYSTRAY_GTK),TRUE) -$(eval $(call gb_Library_set_defs,qstart,\ +$(eval $(call gb_Library_set_defs,qstart_gtk,\ $$(DEFS) \ - -DDLL_NAME=libsfx$(DLLPOSTFIX)$(DLLPOST) \ + -DDLL_NAME=$(notdir $(call gb_Library_get_target,sfx2)) \ -DENABLE_QUICKSTART_APPLET \ )) -endif -#todo: add libs -$(eval $(call gb_Library_add_linked_libs,qstart,\ +$(eval $(call gb_Library_set_cflags,qstart_gtk,\ + $$(CFLAGS) \ + $(filter-out -I%,$(GTK_CFLAGS)) \ +)) + +$(eval $(call gb_Library_set_ldflags,qstart_gtk,\ + $$(LDFLAGS) \ + $(GTK_LIBS) \ +)) + +$(eval $(call gb_Library_add_linked_libs,qstart_gtk,\ + comphelper \ + cppu \ + cppuhelper \ + eggtray \ + fwe \ + i18nisolang1 \ + sal \ + sax \ + sb \ + sot \ + stl \ + svl \ + svt \ + tk \ + tl \ + ucbhelper \ + utl \ + vcl \ + vos3 \ + xml2 \ sfx \ )) -$(eval $(call gb_Library_add_linked_system_libs,qstart,\ +$(eval $(call gb_Library_add_linked_system_libs,qstart_gtk,\ icuuc \ dl \ m \ pthread \ )) -ifeq ($(ENABLE_SYSTRAY_GTK),TRUE) -$(eval $(call gb_Library_add_exception_objects,qstart,\ - sfx2/source/appl/shutdowniconunx.ob \ +$(eval $(call gb_Library_add_exception_objects,qstart_gtk,\ + sfx2/source/appl/shutdowniconunx \ )) -endif endif +endif diff --git a/sfx2/Library_sfx2.mk b/sfx2/Library_sfx2.mk index 238360da3dd4..aa6bce6e569a 100644 --- a/sfx2/Library_sfx2.mk +++ b/sfx2/Library_sfx2.mk @@ -32,7 +32,7 @@ $(eval $(call gb_Library_add_package_headers,sfx,\ sfx2_sdi \ )) -#$(eval $(call gb_Library_add_precompiled_header,sfx,$(SRCDIR)/sfx2/inc/pch/precompiled_sfx2)) +$(eval $(call gb_Library_add_precompiled_header,sfx,$(SRCDIR)/sfx2/inc/pch/precompiled_sfx2)) $(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk index a9f0a2e57d4e..6ff0e06474f5 100644 --- a/sfx2/Module_sfx2.mk +++ b/sfx2/Module_sfx2.mk @@ -30,16 +30,17 @@ $(eval $(call gb_Module_Module,sfx2)) $(eval $(call gb_Module_add_targets,sfx2,\ AllLangResTarget_sfx2 \ Library_sfx2 \ + Library_qstart \ Package_inc \ Package_sdi \ )) # HACK to create a dummy quickstart lib -$(call gb_Module_get_target,sfx2) : $(call gb_Library_get_target,qstart_gtk) +#$(call gb_Module_get_target,sfx2) : $(call gb_Library_get_target,qstart_gtk) -$(call gb_Library_get_target,qstart_gtk) : - touch $@ +#$(call gb_Library_get_target,qstart_gtk) : +# touch $@ #todo: map file? #todo: source/appl ohne Optimierung? From e0a383ba68b64b3459fcac20cd45f1b8ab28087d Mon Sep 17 00:00:00 2001 From: os Date: Wed, 28 Jul 2010 14:04:43 +0200 Subject: [PATCH 047/279] #i85003# show disabled style name field for built-in styles (from simonaw) --- sfx2/inc/sfx2/mgetempl.hxx | 5 +++++ sfx2/source/dialog/mgetempl.cxx | 12 +++++++++++- sfx2/source/dialog/mgetempl.hrc | 1 + sfx2/source/dialog/mgetempl.src | 8 ++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/sfx2/inc/sfx2/mgetempl.hxx b/sfx2/inc/sfx2/mgetempl.hxx index ba6a9b844b7a..a63f665c1071 100644 --- a/sfx2/inc/sfx2/mgetempl.hxx +++ b/sfx2/inc/sfx2/mgetempl.hxx @@ -37,6 +37,9 @@ #include +#include +#include + /* erwartet: SID_TEMPLATE_NAME : In: StringItem, Name der Vorlage SID_TEMPLATE_FAMILY : In: Familie der Vorlage @@ -54,6 +57,8 @@ class SfxManageStyleSheetPage : public SfxTabPage { FixedText aNameFt; Edit aNameEd; + ExtMultiLineEdit aNameMLE; + CheckBox aAutoCB; FixedText aFollowFt; diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 1f5472cf2052..1666916b0c0b 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -65,6 +65,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem aNameFt ( this, SfxResId( FT_NAME ) ), aNameEd ( this, SfxResId( ED_NAME ) ), + aNameMLE ( this, SfxResId( MLE_NAME ) ), aAutoCB ( this, SfxResId( CB_AUTO ) ), aFollowFt ( this, SfxResId( FT_NEXT ) ), @@ -147,8 +148,17 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem } aNameEd.SetText(pStyle->GetName()); - if ( !pStyle->IsUserDefined() ) + // Set the field read-only if it is NOT an user-defined style + // but allow selecting and copying + if ( !pStyle->IsUserDefined() ) { aNameEd.SetReadOnly(); + aNameEd.Hide(); + + aNameMLE.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); + aNameMLE.SetText( pStyle->GetName() ); + aNameMLE.EnableCursor( FALSE ); + aNameMLE.Show(); + } if ( pStyle->HasFollowSupport() && pPool ) { diff --git a/sfx2/source/dialog/mgetempl.hrc b/sfx2/source/dialog/mgetempl.hrc index e998baba939d..a34700846f9c 100644 --- a/sfx2/source/dialog/mgetempl.hrc +++ b/sfx2/source/dialog/mgetempl.hrc @@ -25,6 +25,7 @@ * ************************************************************************/ #define ED_NAME 2 +#define MLE_NAME 13 #define LB_NEXT 4 #define FT_BASE 5 #define LB_BASE 6 diff --git a/sfx2/source/dialog/mgetempl.src b/sfx2/source/dialog/mgetempl.src index f07d0873e454..712ec5ccc4be 100644 --- a/sfx2/source/dialog/mgetempl.src +++ b/sfx2/source/dialog/mgetempl.src @@ -48,6 +48,14 @@ TabPage TP_MANAGE_STYLES Pos = MAP_APPFONT ( 70 , 6 ) ; Size = MAP_APPFONT ( 184 , 12 ) ; }; + MultiLineEdit MLE_NAME + { + Pos = MAP_APPFONT ( 70 , 8 ) ; + Size = MAP_APPFONT ( 80 , 12 ) ; + Border = FALSE; + ReadOnly = TRUE; + Hide = TRUE; + }; CheckBox CB_AUTO { Pos = MAP_APPFONT ( 164 , 8 ) ; From e0eb738dda01478f0e38d2b4519453531cd2b406 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 29 Jul 2010 08:48:43 +0200 Subject: [PATCH 048/279] #i100037# command names added, duplicate DeleteNote/DeleteComment removed --- .../data/org/openoffice/Office/UI/GenericCommands.xcu | 7 ++++++- .../data/org/openoffice/Office/UI/WriterCommands.xcu | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 70448e5bbf89..f210869f7d26 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -5206,7 +5206,12 @@ Delete All Comments by This Author - + + + Reply Comment + + + Delete Comment diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 4fa236666b6b..465c6b37c0cd 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -166,6 +166,16 @@ ~Protect Records... + + + Reject Change + + + + + Accept Change + + ~Links From 157106b79770cdc0989207acc9600bb3ec3ababd Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 29 Jul 2010 13:19:07 +0200 Subject: [PATCH 049/279] gnumake2: windows build fixes for resync --- framework/Library_fwe.mk | 1 - framework/source/uielement/toolbarmanager.cxx | 2 +- sfx2/Library_sfx2.mk | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk index 718e9c38ea22..a8bcd7d40bf4 100644 --- a/framework/Library_fwe.mk +++ b/framework/Library_fwe.mk @@ -90,7 +90,6 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\ framework/source/fwe/xml/statusbardocumenthandler \ framework/source/fwe/xml/toolboxconfiguration \ framework/source/fwe/xml/toolboxdocumenthandler \ - framework/source/fwe/xml/toolboxlayoutdocumenthandler \ framework/source/fwe/xml/xmlnamespaces \ )) diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index a7b1f18e9c15..f68d2d9e5517 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -52,7 +52,7 @@ #endif #include #include -#include +#include //_________________________________________________________________________________________________________________ // interface includes diff --git a/sfx2/Library_sfx2.mk b/sfx2/Library_sfx2.mk index 238360da3dd4..40a2064c59f9 100644 --- a/sfx2/Library_sfx2.mk +++ b/sfx2/Library_sfx2.mk @@ -277,6 +277,9 @@ $(eval $(call gb_Library_add_linked_libs,sfx,\ )) endif ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_exception_objects,sfx,\ + sfx2/source/doc/syspathw32 \ +)) $(eval $(call gb_Library_add_linked_libs,sfx,\ advapi32 \ gdi32 \ From 71fbd7b1fc7fd9c9dd3a78f091cfea523eb44068 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 30 Jul 2010 11:38:32 +0200 Subject: [PATCH 050/279] cws tlmath01: #i972# applied first community patch --- sfx2/inc/sfx2/ipclient.hxx | 1 + sfx2/source/view/ipclient.cxx | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sfx2/inc/sfx2/ipclient.hxx b/sfx2/inc/sfx2/ipclient.hxx index e0708f1f061d..960c6629b8d2 100644 --- a/sfx2/inc/sfx2/ipclient.hxx +++ b/sfx2/inc/sfx2/ipclient.hxx @@ -101,6 +101,7 @@ public: // used in Writer // Rectangle PixelObjVisAreaToLogic( const Rectangle & rObjRect ) const; // Rectangle LogicObjAreaToPixel( const Rectangle & rRect ) const; + virtual void FormatChanged(); // object format was changed (used for StarMath formulas aligning) }; #endif diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 328d88d8b2b9..997cb584f83d 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -220,6 +220,7 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const document::EventObject& a if ( m_pClient && aEvent.EventName.equalsAscii("OnVisAreaChanged") && m_nAspect != embed::Aspects::MSOLE_ICON ) { + m_pClient->FormatChanged(); // for Writer when format of the object is changed with the area m_pClient->ViewChanged(); m_pClient->Invalidate(); } @@ -1082,6 +1083,11 @@ void SfxInPlaceClient::MakeVisible() // dummy implementation } +void SfxInPlaceClient::FormatChanged() +{ + // dummy implementation +} + void SfxInPlaceClient::DeactivateObject() { if ( GetObject().is() ) From 1850928377cc9f385003d137fd1a87eb8426de55 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 4 Aug 2010 13:22:45 +0200 Subject: [PATCH 051/279] gnumake2: fixes for pch in framework --- .../helper/dockingareadefaultacceptor.cxx | 18 +++--- framework/source/helper/ocomponentaccess.cxx | 44 +++++++-------- .../source/helper/ocomponentenumeration.cxx | 4 +- framework/source/helper/oframes.cxx | 56 +++++++++---------- 4 files changed, 61 insertions(+), 61 deletions(-) mode change 100644 => 100755 framework/source/helper/dockingareadefaultacceptor.cxx mode change 100644 => 100755 framework/source/helper/ocomponentaccess.cxx mode change 100644 => 100755 framework/source/helper/ocomponentenumeration.cxx mode change 100644 => 100755 framework/source/helper/oframes.cxx diff --git a/framework/source/helper/dockingareadefaultacceptor.cxx b/framework/source/helper/dockingareadefaultacceptor.cxx old mode 100644 new mode 100755 index 91cfc451fadd..2b199c03ba83 --- a/framework/source/helper/dockingareadefaultacceptor.cxx +++ b/framework/source/helper/dockingareadefaultacceptor.cxx @@ -76,7 +76,7 @@ using namespace ::rtl ; //***************************************************************************************************************** // constructor //***************************************************************************************************************** -DockingAreaDefaultAcceptor::DockingAreaDefaultAcceptor( const Reference< XFrame >& xOwner ) +DockingAreaDefaultAcceptor::DockingAreaDefaultAcceptor( const css::uno::Reference< XFrame >& xOwner ) // Init baseclasses first : ThreadHelpBase ( &Application::GetSolarMutex() ) // Init member @@ -100,8 +100,8 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL DockingAreaDefaultAcceptor::ge ResetableGuard aGuard( m_aLock ); // Try to "lock" the frame for access to taskscontainer. - Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY ); - Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() ); + css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() ); return xContainerWindow; } @@ -112,13 +112,13 @@ sal_Bool SAL_CALL DockingAreaDefaultAcceptor::requestDockingAreaSpace( const css ResetableGuard aGuard( m_aLock ); // Try to "lock" the frame for access to taskscontainer. - Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY ); aGuard.unlock(); if ( xFrame.is() == sal_True ) { - Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() ); - Reference< css::awt::XWindow > xComponentWindow( xFrame->getComponentWindow() ); + css::uno::Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() ); + css::uno::Reference< css::awt::XWindow > xComponentWindow( xFrame->getComponentWindow() ); if (( xContainerWindow.is() == sal_True ) && ( xComponentWindow.is() == sal_True ) ) @@ -152,11 +152,11 @@ void SAL_CALL DockingAreaDefaultAcceptor::setDockingAreaSpace( const css::awt::R ResetableGuard aGuard( m_aLock ); // Try to "lock" the frame for access to taskscontainer. - Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY ); if ( xFrame.is() == sal_True ) { - Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() ); - Reference< css::awt::XWindow > xComponentWindow( xFrame->getComponentWindow() ); + css::uno::Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() ); + css::uno::Reference< css::awt::XWindow > xComponentWindow( xFrame->getComponentWindow() ); if (( xContainerWindow.is() == sal_True ) && ( xComponentWindow.is() == sal_True ) ) diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx old mode 100644 new mode 100755 index ce25ac0796fc..4e64a38d6ca3 --- a/framework/source/helper/ocomponentaccess.cxx +++ b/framework/source/helper/ocomponentaccess.cxx @@ -77,7 +77,7 @@ using namespace ::rtl ; //***************************************************************************************************************** // constructor //***************************************************************************************************************** -OComponentAccess::OComponentAccess( const Reference< XDesktop >& xOwner ) +OComponentAccess::OComponentAccess( const css::uno::Reference< XDesktop >& xOwner ) // Init baseclasses first : ThreadHelpBase ( &Application::GetSolarMutex() ) // Init member @@ -97,27 +97,27 @@ OComponentAccess::~OComponentAccess() //***************************************************************************************************************** // XEnumerationAccess //***************************************************************************************************************** -Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration() throw( RuntimeException ) +css::uno::Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration() throw( RuntimeException ) { // Ready for multithreading ResetableGuard aGuard( m_aLock ); // Set default return value, if method failed. // If no desktop exist and there is no task container - return an empty enumeration! - Reference< XEnumeration > xReturn = Reference< XEnumeration >(); + css::uno::Reference< XEnumeration > xReturn = css::uno::Reference< XEnumeration >(); // Try to "lock" the desktop for access to task container. - Reference< XInterface > xLock = m_xOwner.get(); + css::uno::Reference< XInterface > xLock = m_xOwner.get(); if ( xLock.is() == sal_True ) { // Desktop exist => pointer to task container must be valid. // Initialize a new enumeration ... if some tasks and his components exist! // (OTasksEnumeration will make an assert, if we initialize the new instance without valid values!) - Sequence< Reference< XComponent > > seqComponents; - impl_collectAllChildComponents( Reference< XFramesSupplier >( xLock, UNO_QUERY ), seqComponents ); + Sequence< css::uno::Reference< XComponent > > seqComponents; + impl_collectAllChildComponents( css::uno::Reference< XFramesSupplier >( xLock, UNO_QUERY ), seqComponents ); OComponentEnumeration* pEnumeration = new OComponentEnumeration( seqComponents ); - xReturn = Reference< XEnumeration >( (OWeakObject*)pEnumeration, UNO_QUERY ); + xReturn = css::uno::Reference< XEnumeration >( (OWeakObject*)pEnumeration, UNO_QUERY ); } // Return result of this operation. @@ -131,7 +131,7 @@ Type SAL_CALL OComponentAccess::getElementType() throw( RuntimeException ) { // Elements in list an enumeration are components! // Return the uno-type of XComponent. - return ::getCppuType((const Reference< XComponent >*)NULL); + return ::getCppuType((const css::uno::Reference< XComponent >*)NULL); } //***************************************************************************************************************** @@ -146,7 +146,7 @@ sal_Bool SAL_CALL OComponentAccess::hasElements() throw( RuntimeException ) sal_Bool bReturn = sal_False; // Try to "lock" the desktop for access to task container. - Reference< XFramesSupplier > xLock( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< XFramesSupplier > xLock( m_xOwner.get(), UNO_QUERY ); if ( xLock.is() == sal_True ) { // Ask container of owner for existing elements. @@ -160,8 +160,8 @@ sal_Bool SAL_CALL OComponentAccess::hasElements() throw( RuntimeException ) //***************************************************************************************************************** // private method //***************************************************************************************************************** -void OComponentAccess::impl_collectAllChildComponents( const Reference< XFramesSupplier >& xNode , - Sequence< Reference< XComponent > >& seqComponents ) +void OComponentAccess::impl_collectAllChildComponents( const css::uno::Reference< XFramesSupplier >& xNode , + Sequence< css::uno::Reference< XComponent > >& seqComponents ) { // If valid node was given ... if( xNode.is() == sal_True ) @@ -173,13 +173,13 @@ void OComponentAccess::impl_collectAllChildComponents( const Reference< XFram sal_Int32 nComponentCount = seqComponents.getLength(); - const Reference< XFrames > xContainer = xNode->getFrames(); - const Sequence< Reference< XFrame > > seqFrames = xContainer->queryFrames( FrameSearchFlag::CHILDREN ); + const css::uno::Reference< XFrames > xContainer = xNode->getFrames(); + const Sequence< css::uno::Reference< XFrame > > seqFrames = xContainer->queryFrames( FrameSearchFlag::CHILDREN ); const sal_Int32 nFrameCount = seqFrames.getLength(); for( sal_Int32 nFrame=0; nFrame xComponent = impl_getFrameComponent( seqFrames[nFrame] ); + css::uno::Reference< XComponent > xComponent = impl_getFrameComponent( seqFrames[nFrame] ); if( xComponent.is() == sal_True ) { nComponentCount++; @@ -194,30 +194,30 @@ void OComponentAccess::impl_collectAllChildComponents( const Reference< XFram //***************************************************************************************************************** // private method //***************************************************************************************************************** -Reference< XComponent > OComponentAccess::impl_getFrameComponent( const Reference< XFrame >& xFrame ) const +css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( const css::uno::Reference< XFrame >& xFrame ) const { // Set default return value, if method failed. - Reference< XComponent > xComponent = Reference< XComponent >(); + css::uno::Reference< XComponent > xComponent = css::uno::Reference< XComponent >(); // Does no controller exists? - Reference< XController > xController = xFrame->getController(); + css::uno::Reference< XController > xController = xFrame->getController(); if ( xController.is() == sal_False ) { // Controller not exist - use the VCL-component. - xComponent = Reference< XComponent >( xFrame->getComponentWindow(), UNO_QUERY ); + xComponent = css::uno::Reference< XComponent >( xFrame->getComponentWindow(), UNO_QUERY ); } else { // Does no model exists? - Reference< XModel > xModel( xController->getModel(), UNO_QUERY ); + css::uno::Reference< XModel > xModel( xController->getModel(), UNO_QUERY ); if ( xModel.is() == sal_True ) { // Model exist - use the model as component. - xComponent = Reference< XComponent >( xModel, UNO_QUERY ); + xComponent = css::uno::Reference< XComponent >( xModel, UNO_QUERY ); } else { // Model not exist - use the controller as component. - xComponent = Reference< XComponent >( xController, UNO_QUERY ); + xComponent = css::uno::Reference< XComponent >( xController, UNO_QUERY ); } } @@ -241,7 +241,7 @@ Reference< XComponent > OComponentAccess::impl_getFrameComponent( const Referenc #ifdef ENABLE_ASSERTIONS //***************************************************************************************************************** -sal_Bool OComponentAccess::impldbg_checkParameter_OComponentAccessCtor( const Reference< XDesktop >& xOwner ) +sal_Bool OComponentAccess::impldbg_checkParameter_OComponentAccessCtor( const css::uno::Reference< XDesktop >& xOwner ) { // Set default return value. sal_Bool bOK = sal_True; diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx old mode 100644 new mode 100755 index 68237179d70d..9df43625a5a8 --- a/framework/source/helper/ocomponentenumeration.cxx +++ b/framework/source/helper/ocomponentenumeration.cxx @@ -74,7 +74,7 @@ using namespace ::rtl ; //***************************************************************************************************************** // constructor //***************************************************************************************************************** -OComponentEnumeration::OComponentEnumeration( const Sequence< Reference< XComponent > >& seqComponents ) +OComponentEnumeration::OComponentEnumeration( const Sequence< css::uno::Reference< XComponent > >& seqComponents ) // Init baseclasses first // Attention: // Don't change order of initialization! @@ -200,7 +200,7 @@ void OComponentEnumeration::impl_resetObject() //***************************************************************************************************************** // An empty list is allowed ... hasMoreElements() will return false then! -sal_Bool OComponentEnumeration::impldbg_checkParameter_OComponentEnumerationCtor( const Sequence< Reference< XComponent > >& seqComponents ) +sal_Bool OComponentEnumeration::impldbg_checkParameter_OComponentEnumerationCtor( const Sequence< css::uno::Reference< XComponent > >& seqComponents ) { // Set default return value. sal_Bool bOK = sal_True; diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx old mode 100644 new mode 100755 index 62f4b30de749..3034f7438cf6 --- a/framework/source/helper/oframes.cxx +++ b/framework/source/helper/oframes.cxx @@ -79,8 +79,8 @@ using namespace ::vos ; //***************************************************************************************************************** // constructor //***************************************************************************************************************** -OFrames::OFrames( const Reference< XMultiServiceFactory >& xFactory , - const Reference< XFrame >& xOwner , +OFrames::OFrames( const css::uno::Reference< XMultiServiceFactory >& xFactory , + const css::uno::Reference< XFrame >& xOwner , FrameContainer* pFrameContainer ) // Init baseclasses first : ThreadHelpBase ( &Application::GetSolarMutex() ) @@ -107,7 +107,7 @@ OFrames::~OFrames() //***************************************************************************************************************** // XFrames //***************************************************************************************************************** -void SAL_CALL OFrames::append( const Reference< XFrame >& xFrame ) throw( RuntimeException ) +void SAL_CALL OFrames::append( const css::uno::Reference< XFrame >& xFrame ) throw( RuntimeException ) { // Ready for multithreading ResetableGuard aGuard( m_aLock ); @@ -118,7 +118,7 @@ void SAL_CALL OFrames::append( const Reference< XFrame >& xFrame ) throw( Runtim // Do the follow only, if owner instance valid! // Lock owner for follow operations - make a "hard reference"! - Reference< XFramesSupplier > xOwner( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< XFramesSupplier > xOwner( m_xOwner.get(), UNO_QUERY ); if ( xOwner.is() == sal_True ) { // Append frame to the end of the container ... @@ -133,7 +133,7 @@ void SAL_CALL OFrames::append( const Reference< XFrame >& xFrame ) throw( Runtim //***************************************************************************************************************** // XFrames //***************************************************************************************************************** -void SAL_CALL OFrames::remove( const Reference< XFrame >& xFrame ) throw( RuntimeException ) +void SAL_CALL OFrames::remove( const css::uno::Reference< XFrame >& xFrame ) throw( RuntimeException ) { // Ready for multithreading ResetableGuard aGuard( m_aLock ); @@ -144,7 +144,7 @@ void SAL_CALL OFrames::remove( const Reference< XFrame >& xFrame ) throw( Runtim // Do the follow only, if owner instance valid! // Lock owner for follow operations - make a "hard reference"! - Reference< XFramesSupplier > xOwner( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< XFramesSupplier > xOwner( m_xOwner.get(), UNO_QUERY ); if ( xOwner.is() == sal_True ) { // Search frame and remove it from container ... @@ -160,7 +160,7 @@ void SAL_CALL OFrames::remove( const Reference< XFrame >& xFrame ) throw( Runtim //***************************************************************************************************************** // XFrames //***************************************************************************************************************** -Sequence< Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int32 nSearchFlags ) throw( RuntimeException ) +Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int32 nSearchFlags ) throw( RuntimeException ) { // Ready for multithreading ResetableGuard aGuard( m_aLock ); @@ -170,11 +170,11 @@ Sequence< Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int32 nSearch LOG_ASSERT( impldbg_checkParameter_queryFrames( nSearchFlags ), "OFrames::queryFrames()\nInvalid parameter detected!\n" ) // Set default return value. (empty sequence) - Sequence< Reference< XFrame > > seqFrames; + Sequence< css::uno::Reference< XFrame > > seqFrames; // Do the follow only, if owner instance valid. // Lock owner for follow operations - make a "hard reference"! - Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY ); if ( xOwner.is() == sal_True ) { // Work only, if search was not started here ...! @@ -203,10 +203,10 @@ Sequence< Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int32 nSearch // Add parent to list ... if any exist! if( nSearchFlags & FrameSearchFlag::PARENT ) { - Reference< XFrame > xParent( xOwner->getCreator(), UNO_QUERY ); + css::uno::Reference< XFrame > xParent( xOwner->getCreator(), UNO_QUERY ); if( xParent.is() == sal_True ) { - Sequence< Reference< XFrame > > seqParent( 1 ); + Sequence< css::uno::Reference< XFrame > > seqParent( 1 ); seqParent[0] = xParent; impl_appendSequence( seqFrames, seqParent ); } @@ -216,7 +216,7 @@ Sequence< Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int32 nSearch // Add owner to list if SELF is searched. if( nSearchFlags & FrameSearchFlag::SELF ) { - Sequence< Reference< XFrame > > seqSelf( 1 ); + Sequence< css::uno::Reference< XFrame > > seqSelf( 1 ); seqSelf[0] = xOwner; impl_appendSequence( seqFrames, seqSelf ); } @@ -229,7 +229,7 @@ Sequence< Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int32 nSearch // Protect this instance against recursive calls from parents. m_bRecursiveSearchProtection = sal_True; // Ask parent of my owner for frames and append results to return list. - Reference< XFramesSupplier > xParent( xOwner->getCreator(), UNO_QUERY ); + css::uno::Reference< XFramesSupplier > xParent( xOwner->getCreator(), UNO_QUERY ); // If a parent exist ... if ( xParent.is() == sal_True ) { @@ -254,7 +254,7 @@ Sequence< Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int32 nSearch { // We don't must control this conversion. // We have done this at append()! - Reference< XFramesSupplier > xItem( (*m_pFrameContainer)[nIndex], UNO_QUERY ); + css::uno::Reference< XFramesSupplier > xItem( (*m_pFrameContainer)[nIndex], UNO_QUERY ); impl_appendSequence( seqFrames, xItem->getFrames()->queryFrames( nChildSearchFlags ) ); } } @@ -280,7 +280,7 @@ sal_Int32 SAL_CALL OFrames::getCount() throw( RuntimeException ) // Do the follow only, if owner instance valid. // Lock owner for follow operations - make a "hard reference"! - Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY ); if ( xOwner.is() == sal_True ) { // Set CURRENT size of container for return. @@ -311,7 +311,7 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex ) throw( IndexOutOfBoundsExce // Do the follow only, if owner instance valid. // Lock owner for follow operations - make a "hard reference"! - Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY ); if ( xOwner.is() == sal_True ) { // Get element form container. @@ -329,7 +329,7 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex ) throw( IndexOutOfBoundsExce Type SAL_CALL OFrames::getElementType() throw( RuntimeException ) { // This "container" support XFrame-interfaces only! - return ::getCppuType( (const Reference< XFrame >*)NULL ); + return ::getCppuType( (const css::uno::Reference< XFrame >*)NULL ); } //***************************************************************************************************************** @@ -344,7 +344,7 @@ sal_Bool SAL_CALL OFrames::hasElements() throw( RuntimeException ) sal_Bool bHasElements = sal_False; // Do the follow only, if owner instance valid. // Lock owner for follow operations - make a "hard reference"! - Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY ); + css::uno::Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY ); if ( xOwner.is() == sal_True ) { // If some elements exist ... @@ -378,18 +378,18 @@ void OFrames::impl_resetObject() //***************************************************************************************************************** // private method //***************************************************************************************************************** -void OFrames::impl_appendSequence( Sequence< Reference< XFrame > >& seqDestination , - const Sequence< Reference< XFrame > >& seqSource ) +void OFrames::impl_appendSequence( Sequence< css::uno::Reference< XFrame > >& seqDestination , + const Sequence< css::uno::Reference< XFrame > >& seqSource ) { // Get some informations about the sequences. sal_Int32 nSourceCount = seqSource.getLength(); sal_Int32 nDestinationCount = seqDestination.getLength(); - const Reference< XFrame >* pSourceAccess = seqSource.getConstArray(); - Reference< XFrame >* pDestinationAccess = seqDestination.getArray(); + const css::uno::Reference< XFrame >* pSourceAccess = seqSource.getConstArray(); + css::uno::Reference< XFrame >* pDestinationAccess = seqDestination.getArray(); // Get memory for result list. - Sequence< Reference< XFrame > > seqResult ( nSourceCount + nDestinationCount ); - Reference< XFrame >* pResultAccess = seqResult.getArray(); + Sequence< css::uno::Reference< XFrame > > seqResult ( nSourceCount + nDestinationCount ); + css::uno::Reference< XFrame >* pResultAccess = seqResult.getArray(); sal_Int32 nResultPosition = 0; // Copy all items from first sequence. @@ -434,8 +434,8 @@ void OFrames::impl_appendSequence( Sequence< Reference< XFrame > >& // An instance of this class can only work with valid initialization. // We share the mutex with ouer owner class, need a valid factory to instanciate new services and // use the access to ouer owner for some operations. -sal_Bool OFrames::impldbg_checkParameter_OFramesCtor( const Reference< XMultiServiceFactory >& xFactory , - const Reference< XFrame >& xOwner , +sal_Bool OFrames::impldbg_checkParameter_OFramesCtor( const css::uno::Reference< XMultiServiceFactory >& xFactory , + const css::uno::Reference< XFrame >& xOwner , FrameContainer* pFrameContainer ) { // Set default return value. @@ -458,7 +458,7 @@ sal_Bool OFrames::impldbg_checkParameter_OFramesCtor( const Reference< XMult //***************************************************************************************************************** // Its only allowed to add valid references to container. // AND - alle frames must support XFrames-interface! -sal_Bool OFrames::impldbg_checkParameter_append( const Reference< XFrame >& xFrame ) +sal_Bool OFrames::impldbg_checkParameter_append( const css::uno::Reference< XFrame >& xFrame ) { // Set default return value. sal_Bool bOK = sal_True; @@ -477,7 +477,7 @@ sal_Bool OFrames::impldbg_checkParameter_append( const Reference< XFrame >& xFra //***************************************************************************************************************** // Its only allowed to add valid references to container... // ... => You can only delete valid references! -sal_Bool OFrames::impldbg_checkParameter_remove( const Reference< XFrame >& xFrame ) +sal_Bool OFrames::impldbg_checkParameter_remove( const css::uno::Reference< XFrame >& xFrame ) { // Set default return value. sal_Bool bOK = sal_True; From 983a7032177ecb7b67cf6b5e14c97e03f106bf23 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 4 Aug 2010 13:24:30 +0200 Subject: [PATCH 052/279] gnumake2: fixes for pch in sfx2, fixes for qstart lib --- sfx2/Library_qstart.mk | 5 +---- sfx2/Module_sfx2.mk | 14 +++++++------- sfx2/source/appl/appbaslib.cxx | 3 +++ sfx2/source/doc/sfxacldetect.cxx | 4 ++++ sfx2/source/doc/syspathw32.cxx | 4 ++++ 5 files changed, 19 insertions(+), 11 deletions(-) mode change 100644 => 100755 sfx2/Library_qstart.mk mode change 100644 => 100755 sfx2/Module_sfx2.mk mode change 100644 => 100755 sfx2/source/appl/appbaslib.cxx mode change 100644 => 100755 sfx2/source/doc/syspathw32.cxx diff --git a/sfx2/Library_qstart.mk b/sfx2/Library_qstart.mk old mode 100644 new mode 100755 index 94c5d83b594d..e6a6bc900201 --- a/sfx2/Library_qstart.mk +++ b/sfx2/Library_qstart.mk @@ -25,8 +25,6 @@ # #************************************************************************* -ifeq ($(OS),LINUX) -ifeq ($(ENABLE_SYSTRAY_GTK),TRUE) $(eval $(call gb_Library_Library,qstart_gtk)) @@ -91,5 +89,4 @@ $(eval $(call gb_Library_add_exception_objects,qstart_gtk,\ sfx2/source/appl/shutdowniconunx \ )) -endif -endif +# vim: set noet sw=4 ts=4: diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk old mode 100644 new mode 100755 index 6ff0e06474f5..b0c026c3732d --- a/sfx2/Module_sfx2.mk +++ b/sfx2/Module_sfx2.mk @@ -30,17 +30,17 @@ $(eval $(call gb_Module_Module,sfx2)) $(eval $(call gb_Module_add_targets,sfx2,\ AllLangResTarget_sfx2 \ Library_sfx2 \ - Library_qstart \ Package_inc \ Package_sdi \ )) - -# HACK to create a dummy quickstart lib -#$(call gb_Module_get_target,sfx2) : $(call gb_Library_get_target,qstart_gtk) - -#$(call gb_Library_get_target,qstart_gtk) : -# touch $@ +ifeq ($(OS),LINUX) +ifeq ($(ENABLE_SYSTRAY_GTK),TRUE) +$(eval $(call gb_Module_add_targets,sfx2,\ + Library_qstart \ +)) +endif +endif #todo: map file? #todo: source/appl ohne Optimierung? diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx old mode 100644 new mode 100755 index 96c998b2674d..7f4e8cedb637 --- a/sfx2/source/appl/appbaslib.cxx +++ b/sfx2/source/appl/appbaslib.cxx @@ -25,6 +25,9 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + #include "appbaslib.hxx" #include diff --git a/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx index de6528794e20..ded9d3000fc8 100755 --- a/sfx2/source/doc/sfxacldetect.cxx +++ b/sfx2/source/doc/sfxacldetect.cxx @@ -25,6 +25,10 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + + #ifdef WNT // necessary to include system headers without warnings diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx old mode 100644 new mode 100755 index 73bd84f5249a..1bba3f3e9cf3 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -28,6 +28,10 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + + #ifdef WNT #ifdef _MSC_VER #pragma warning(disable:4917) From 9bf72cb920cd80ca9f0038f7962e7dd5aa41feb1 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Tue, 17 Aug 2010 12:37:58 +0200 Subject: [PATCH 053/279] mib19: #163249# Changed SbiSymPool search order to avoid hiding parameters named like the sub --- basic/source/comp/symtbl.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index d6b3dbb878fc..9df91a5748b9 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -206,9 +206,10 @@ void SbiSymPool::Add( SbiSymDef* pDef ) SbiSymDef* SbiSymPool::Find( const String& rName ) const { - for( USHORT i = 0; i < aData.Count(); i++ ) + USHORT nCount = aData.Count(); + for( USHORT i = 0; i < nCount; i++ ) { - SbiSymDef* p = aData.GetObject( i ); + SbiSymDef* p = aData.GetObject( nCount - i - 1 ); if( ( !p->nProcId || ( p->nProcId == nProcId ) ) && ( p->aName.EqualsIgnoreCaseAscii( rName ) ) ) return p; From b5da1139783f3d8944386b1e59a0bda78b263a22 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Tue, 17 Aug 2010 13:03:11 +0200 Subject: [PATCH 054/279] mib19: #163242# Avoid multiple initialization of class and object modules --- basic/source/classes/sb.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 056c2ea38c4c..6022bbcd056e 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1143,7 +1143,7 @@ void StarBASIC::DeInitAllModules( void ) for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) { SbModule* pModule = (SbModule*)pModules->Get( nMod ); - if( pModule->pImage ) + if( pModule->pImage && !pModule->isProxyModule() && !pModule->ISA(SbObjModule) && !pModule->ISA(SbUserFormModule) ) pModule->pImage->bInit = false; } From dbb762b75014756552a44099bfc1a8ae38740e62 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 18 Aug 2010 16:23:55 +0200 Subject: [PATCH 055/279] fwk149: #i112582# Fix FocusSet/FocusGet events for complex ComboBox control --- .../uielement/comboboxtoolbarcontroller.cxx | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 058005ffdc40..d17ffcb78f9d 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -261,19 +261,30 @@ void ComboboxToolbarController::LoseFocus() long ComboboxToolbarController::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_KEYINPUT ) + switch ( rNEvt.GetType() ) { - const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); - if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN ) - { - // Call execute only with non-empty text - if ( m_pComboBox->GetText().Len() > 0 ) - execute( rKeyCode.GetModifier() ); - return 1; - } + case EVENT_KEYINPUT : + { + const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); + const KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); + if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN ) + { + // Call execute only with non-empty text + if ( m_pComboBox->GetText().Len() > 0 ) + execute( rKeyCode.GetModifier() ); + return 1; + } + } + break; + case EVENT_GETFOCUS : + notifyFocusGet(); + break; + case EVENT_LOSEFOCUS : + notifyFocusLost(); + break; + default : + break; } - return 0; } From 5d8ada69d05e780ae943fe357b20f890f50526d6 Mon Sep 17 00:00:00 2001 From: "Michael E. Bohn" Date: Thu, 19 Aug 2010 00:33:36 +0200 Subject: [PATCH 056/279] mib19: #163374# Fix for vbproject inizialistion --- vbahelper/source/vbahelper/vbadocumentbase.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index 65f7f4bcfbeb..a3798e0369ed 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -213,7 +213,7 @@ VbaDocumentBase::getVBProject() throw (uno::RuntimeException) { uno::Sequence< uno::Any > aArgs( 2 ); aArgs[ 0 ] <<= uno::Reference< XHelperInterface >( this ); - aArgs[ 1 ] <<= mxModel; + aArgs[ 1 ] <<= getModel(); uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< uno::XInterface > xVBProjects = xServiceManager->createInstanceWithArgumentsAndContext( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBProject" ) ), aArgs, mxContext ); From 9be8a2f3cf03bb3d74ae098a44732017fddb7fcf Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Thu, 19 Aug 2010 09:18:38 +0200 Subject: [PATCH 057/279] chart49: #i113722# duplicate chart creation - OSingleFactoryHelper::createInstanceWithArgumentsAndContext leak --- embeddedobj/source/commonembedding/persistence.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 0312d28315a6..d7ab39f33ecc 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -229,11 +229,11 @@ static uno::Reference< util::XCloseable > CreateDocument( const uno::Reference< } catch( const uno::Exception& ) { - // some of our embedded object implementations (in particular chart) do neither support - // the EmbeddedObject, nor the EmbeddedScriptSupport argument. Also, they do not support - // XInitialization, which means the default factory from cppuhelper will throw an + // if an embedded object implementation does not support XInitialization, + // the default factory from cppuhelper will throw an // IllegalArgumentException when we try to create the instance with arguments. // Okay, so we fall back to creating the instance without any arguments. + OSL_ASSERT("Consider implementing interface XInitialization to avoid duplicate construction"); xDocument = _rxFactory->createInstance( _rDocumentServiceName ); } From 8834a4391c31502aabe137834ed852aa6b620287 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Thu, 19 Aug 2010 14:22:48 +0200 Subject: [PATCH 058/279] mib19: #163327# Implemented RTL function CallByName --- basic/source/inc/runtime.hxx | 2 + basic/source/runtime/methods1.cxx | 120 ++++++++++++++++++++++++++++++ basic/source/runtime/rtlproto.hxx | 1 + basic/source/runtime/stdobj.cxx | 4 + 4 files changed, 127 insertions(+) mode change 100644 => 100755 basic/source/runtime/methods1.cxx diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 6ca69209a752..8859739cccd3 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -276,6 +276,8 @@ struct RefSaveItem class SbiRuntime { + friend void SbRtl_CallByName( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); + typedef void( SbiRuntime::*pStep0 )(); typedef void( SbiRuntime::*pStep1 )( UINT32 nOp1 ); typedef void( SbiRuntime::*pStep2 )( UINT32 nOp1, UINT32 nOp2 ); diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx old mode 100644 new mode 100755 index 62e9c388f5c5..9785f845125d --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -120,6 +120,126 @@ static Reference< XCalendar > getLocaleCalendar( void ) return xCalendar; } +RTLFUNC(CallByName) +{ + (void)pBasic; + (void)bWrite; + + const INT16 vbGet = 2; + const INT16 vbLet = 4; + const INT16 vbMethod = 1; + const INT16 vbSet = 8; + + // At least 3 parameter needed plus function itself -> 4 + USHORT nParCount = rPar.Count(); + if ( nParCount < 4 ) + { + StarBASIC::Error( SbERR_BAD_ARGUMENT ); + return; + } + + // 1. parameter is object + SbxBase* pObjVar = (SbxObject*)rPar.Get(1)->GetObject(); + SbxObject* pObj = NULL; + if( pObjVar ) + pObj = PTR_CAST(SbxObject,pObjVar); + if( !pObj && pObjVar && pObjVar->ISA(SbxVariable) ) + { + SbxBase* pObjVarObj = ((SbxVariable*)pObjVar)->GetObject(); + pObj = PTR_CAST(SbxObject,pObjVarObj); + } + if( !pObj ) + { + StarBASIC::Error( SbERR_BAD_PARAMETER ); + return; + } + + // 2. parameter is ProcedureName + String aNameStr = rPar.Get(2)->GetString(); + + // 3. parameter is CallType + INT16 nCallType = rPar.Get(3)->GetInteger(); + + //SbxObject* pFindObj = NULL; + SbxVariable* pFindVar = pObj->Find( aNameStr, SbxCLASS_DONTCARE ); + if( pFindVar == NULL ) + { + StarBASIC::Error( SbERR_PROC_UNDEFINED ); + return; + } + + switch( nCallType ) + { + case vbGet: + { + SbxValues aVals; + aVals.eType = SbxVARIANT; + pFindVar->Get( aVals ); + + SbxVariableRef refVar = rPar.Get(0); + refVar->Put( aVals ); + } + break; + case vbLet: + case vbSet: + { + if ( nParCount != 5 ) + { + StarBASIC::Error( SbERR_BAD_ARGUMENT ); + return; + } + SbxVariableRef pValVar = rPar.Get(4); + if( nCallType == vbLet ) + { + SbxValues aVals; + aVals.eType = SbxVARIANT; + pValVar->Get( aVals ); + pFindVar->Put( aVals ); + } + else + { + SbxVariableRef rFindVar = pFindVar; + SbiInstance* pInst = pINST; + SbiRuntime* pRT = pInst ? pInst->pRun : NULL; + if( pRT != NULL ) + pRT->StepSET_Impl( pValVar, rFindVar, false ); + } + } + break; + case vbMethod: + { + SbMethod* pMeth = PTR_CAST(SbMethod,pFindVar); + if( pMeth == NULL ) + { + StarBASIC::Error( SbERR_PROC_UNDEFINED ); + return; + } + + // Setup parameters + SbxArrayRef xArray; + sal_Int32 nMethParamCount = nParCount - 4; + if( nMethParamCount > 0 ) + { + xArray = new SbxArray; + for( sal_Int32 i = 0 ; i < nMethParamCount ; i++ ) + { + SbxVariable* pPar = rPar.Get( i + 4 ); + xArray->Put( pPar, sal::static_int_cast< USHORT >(i+1) ); + } + } + + // Call method + SbxVariableRef refVar = rPar.Get(0); + if( xArray.Is() ) + pMeth->SetParameters( xArray ); + pMeth->Call( refVar ); + pMeth->SetParameters( NULL ); + } + break; + default: + StarBASIC::Error( SbERR_PROC_UNDEFINED ); + } +} RTLFUNC(CBool) // JSM { diff --git a/basic/source/runtime/rtlproto.hxx b/basic/source/runtime/rtlproto.hxx index 5437654f69a0..a05db9d8974d 100644 --- a/basic/source/runtime/rtlproto.hxx +++ b/basic/source/runtime/rtlproto.hxx @@ -271,6 +271,7 @@ extern RTLFUNC(AboutStarBasic); extern RTLFUNC(LoadPicture); extern RTLFUNC(SavePicture); +extern RTLFUNC(CallByName); extern RTLFUNC(CBool); // JSM extern RTLFUNC(CByte); // JSM extern RTLFUNC(CCur); // JSM diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index 4455901bfeba..c7ca576c6576 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -94,6 +94,10 @@ static Methods aMethods[] = { { "Blue", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Blue),0 }, { "RGB-Value", SbxLONG, 0,NULL,0 }, +{ "CallByName", SbxVARIANT, 3 | _FUNCTION, RTLNAME(CallByName),0 }, + { "Object", SbxOBJECT, 0,NULL,0 }, + { "ProcedureName",SbxSTRING, 0,NULL,0 }, + { "CallType", SbxINTEGER, 0,NULL,0 }, { "CBool", SbxBOOL, 1 | _FUNCTION, RTLNAME(CBool),0 }, { "expression", SbxVARIANT, 0,NULL,0 }, { "CByte", SbxBYTE, 1 | _FUNCTION, RTLNAME(CByte),0 }, From c8a732ca766d1367d95a856a2401654211c8736f Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Thu, 19 Aug 2010 14:39:47 +0200 Subject: [PATCH 059/279] mib19: #163327# Removed warning --- basic/source/runtime/methods1.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 9785f845125d..a59a7d25b54a 100755 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -217,14 +217,14 @@ RTLFUNC(CallByName) // Setup parameters SbxArrayRef xArray; - sal_Int32 nMethParamCount = nParCount - 4; + USHORT nMethParamCount = nParCount - 4; if( nMethParamCount > 0 ) { xArray = new SbxArray; - for( sal_Int32 i = 0 ; i < nMethParamCount ; i++ ) + for( USHORT i = 0 ; i < nMethParamCount ; i++ ) { SbxVariable* pPar = rPar.Get( i + 4 ); - xArray->Put( pPar, sal::static_int_cast< USHORT >(i+1) ); + xArray->Put( pPar, i + 1 ); } } From 7e01ecf1f79c467b3d16bfd165e4dbd5cbda6b7c Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Thu, 19 Aug 2010 17:14:58 +0200 Subject: [PATCH 060/279] mib19: #163242# Removed redundant code --- basic/source/classes/sb.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 6022bbcd056e..1e77892aab67 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1143,7 +1143,7 @@ void StarBASIC::DeInitAllModules( void ) for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) { SbModule* pModule = (SbModule*)pModules->Get( nMod ); - if( pModule->pImage && !pModule->isProxyModule() && !pModule->ISA(SbObjModule) && !pModule->ISA(SbUserFormModule) ) + if( pModule->pImage && !pModule->isProxyModule() && !pModule->ISA(SbObjModule) ) pModule->pImage->bInit = false; } From 3734c81ee187c52f22b26bcc11bff38daf103c71 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 20 Aug 2010 14:19:04 +0200 Subject: [PATCH 061/279] fwk149: #i102518# Make recovery dialog accessible for typical NetBook screen res (1024x600) --- svx/source/dialog/docrecovery.hrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svx/source/dialog/docrecovery.hrc b/svx/source/dialog/docrecovery.hrc index 18148131f6aa..acf1a1631c6b 100644 --- a/svx/source/dialog/docrecovery.hrc +++ b/svx/source/dialog/docrecovery.hrc @@ -36,7 +36,7 @@ // TabDialog #define TABDLG_WIDTH 290 -#define TABDLG_HEIGHT 278 +#define TABDLG_HEIGHT 238 // TabPage CrashSave @@ -52,7 +52,7 @@ #define SAVE_WIDTH 290 -#define SAVE_HEIGHT 278 +#define SAVE_HEIGHT 238 #define SAVE_TITLEWINHEIGHT 36 #define SAVE_DESCRHEIGHT 48 #define SAVE_COL0 (RSC_SP_DLG_INNERBORDER_LEFT) From dc459575467d9c444fd328dade90c0d2240795ff Mon Sep 17 00:00:00 2001 From: "Michael E. Bohn" Date: Mon, 23 Aug 2010 01:15:52 +0200 Subject: [PATCH 062/279] mib19: #163399# changes so that functions use right documentname to find the right docshell. --- .../source/vbahelper/vbaapplicationbase.cxx | 49 +------------------ .../source/vbahelper/vbadocumentbase.cxx | 3 +- 2 files changed, 3 insertions(+), 49 deletions(-) diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 326c150edade..7c0aff2d6885 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -295,54 +295,7 @@ VbaApplicationBase::getVersion() throw (uno::RuntimeException) void SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 ) throw (uno::RuntimeException) { - ::rtl::OUString sSeparator = ::rtl::OUString::createFromAscii("/"); - ::rtl::OUString sMacroSeparator = ::rtl::OUString::createFromAscii("!"); - ::rtl::OUString sMacro_only_Name; - sal_Int32 Position_MacroSeparator = MacroName.indexOf(sMacroSeparator); - - uno::Reference< frame::XModel > aMacroDocumentModel; - if (-1 != Position_MacroSeparator) - { - uno::Reference< container::XEnumerationAccess > xComponentEnumAccess; - uno::Reference< lang::XMultiComponentFactory > xServiceManager = mxContext->getServiceManager(); - try - { - uno::Reference< frame::XDesktop > xDesktop (xServiceManager->createInstanceWithContext( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )),mxContext ), uno::UNO_QUERY_THROW ); - xComponentEnumAccess = xDesktop->getComponents(); - } - catch(uno::Exception&) - { - } - - //rem look for the name of the document in the cmpoonents collection - uno::Reference < container::XEnumeration > xEnum = xComponentEnumAccess->createEnumeration(); - - // iterate through the collection by name - while (xEnum->hasMoreElements()) - { - // get the next element as a UNO Any - uno::Any aComponentHelper = xEnum->nextElement(); - uno::Reference xDocModel( aComponentHelper, uno::UNO_QUERY_THROW ); - - // get the name of the sheet from its XNamed interface - ::rtl::OUString aName = xDocModel->getURL(); - - - if (aName.match(MacroName.copy(0,Position_MacroSeparator-1),aName.lastIndexOf(sSeparator)+1)) - { - aMacroDocumentModel = xDocModel; - sMacro_only_Name = MacroName.copy(Position_MacroSeparator+1); - } - } - } - else - { - aMacroDocumentModel = getCurrentDocument(); - sMacro_only_Name = MacroName.copy(0); - } - - - VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( aMacroDocumentModel ), sMacro_only_Name ); + VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( getCurrentDocument() ), MacroName ); if( aMacroInfo.IsResolved() ) { // handle the arguments diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index a3798e0369ed..6023be1fd9d2 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -74,7 +74,8 @@ VbaDocumentBase::getName() throw (uno::RuntimeException) uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW ); xProps->getPropertyValue(sTitle ) >>= sName; sal_Int32 pos = 0; - sName = sName.getToken(0,' ',pos); + sName = sName.getToken(0,'-',pos); + sName = sName.trim(); } return sName; } From d67208c7d51dba05e5e242686a30525eb977e771 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Mon, 23 Aug 2010 10:54:49 +0200 Subject: [PATCH 063/279] mib19: #163377# Support procedure properties for UserForm modules --- basic/inc/basic/sbmod.hxx | 1 + basic/inc/basic/sbobjmod.hxx | 4 ++ basic/source/classes/sb.cxx | 88 +---------------------------- basic/source/classes/sbxmod.cxx | 99 +++++++++++++++++++++++++++++++++ 4 files changed, 105 insertions(+), 87 deletions(-) mode change 100644 => 100755 basic/source/classes/sbxmod.cxx diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index abb482f7bfe5..863335926cb6 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -92,6 +92,7 @@ protected: virtual BOOL LoadCompleted(); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); + void handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint ); virtual ~SbModule(); public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2); diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx index 9ff46d1931f3..2e142245dae7 100644 --- a/basic/inc/basic/sbobjmod.hxx +++ b/basic/inc/basic/sbobjmod.hxx @@ -56,6 +56,10 @@ public: TYPEINFO(); SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible ); virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); + + virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, + const SfxHint& rHint, const TypeId& rHintType ); + using SbxValue::GetObject; SbxVariable* GetObject(); void SetUnoObject( const com::sun::star::uno::Any& aObj )throw ( com::sun::star::uno::RuntimeException ) ; diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 1e77892aab67..f509647e08a1 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -611,93 +611,7 @@ SbClassModuleObject::~SbClassModuleObject() void SbClassModuleObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) { - bool bDone = false; - - const SbxHint* pHint = PTR_CAST(SbxHint,&rHint); - if( pHint ) - { - SbxVariable* pVar = pHint->GetVar(); - SbProcedureProperty* pProcProperty = PTR_CAST( SbProcedureProperty, pVar ); - if( pProcProperty ) - { - bDone = true; - - if( pHint->GetId() == SBX_HINT_DATAWANTED ) - { - String aProcName; - aProcName.AppendAscii( "Property Get " ); - aProcName += pProcProperty->GetName(); - - SbxVariable* pMeth = Find( aProcName, SbxCLASS_METHOD ); - if( pMeth ) - { - SbxValues aVals; - aVals.eType = SbxVARIANT; - - SbxArray* pArg = pVar->GetParameters(); - USHORT nVarParCount = (pArg != NULL) ? pArg->Count() : 0; - if( nVarParCount > 1 ) - { - SbxArrayRef xMethParameters = new SbxArray; - xMethParameters->Put( pMeth, 0 ); // Method as parameter 0 - for( USHORT i = 1 ; i < nVarParCount ; ++i ) - { - SbxVariable* pPar = pArg->Get( i ); - xMethParameters->Put( pPar, i ); - } - - pMeth->SetParameters( xMethParameters ); - pMeth->Get( aVals ); - pMeth->SetParameters( NULL ); - } - else - { - pMeth->Get( aVals ); - } - - pVar->Put( aVals ); - } - } - else if( pHint->GetId() == SBX_HINT_DATACHANGED ) - { - SbxVariable* pMeth = NULL; - - bool bSet = pProcProperty->isSet(); - if( bSet ) - { - pProcProperty->setSet( false ); - - String aProcName; - aProcName.AppendAscii( "Property Set " ); - aProcName += pProcProperty->GetName(); - pMeth = Find( aProcName, SbxCLASS_METHOD ); - } - if( !pMeth ) // Let - { - String aProcName; - aProcName.AppendAscii( "Property Let " ); - aProcName += pProcProperty->GetName(); - pMeth = Find( aProcName, SbxCLASS_METHOD ); - } - - if( pMeth ) - { - // Setup parameters - SbxArrayRef xArray = new SbxArray; - xArray->Put( pMeth, 0 ); // Method as parameter 0 - xArray->Put( pVar, 1 ); - pMeth->SetParameters( xArray ); - - SbxValues aVals; - pMeth->Get( aVals ); - pMeth->SetParameters( NULL ); - } - } - } - } - - if( !bDone ) - SbModule::SFX_NOTIFY( rBC, rBCType, rHint, rHintType ); + handleProcedureProperties( rBC, rHint ); } SbxVariable* SbClassModuleObject::Find( const XubString& rName, SbxClassType t ) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx old mode 100644 new mode 100755 index 8b1069bbeab3..bdbdde57cc1b --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1746,6 +1746,98 @@ BOOL SbModule::LoadCompleted() return TRUE; } +void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint ) +{ + bool bDone = false; + + const SbxHint* pHint = PTR_CAST(SbxHint,&rHint); + if( pHint ) + { + SbxVariable* pVar = pHint->GetVar(); + SbProcedureProperty* pProcProperty = PTR_CAST( SbProcedureProperty, pVar ); + if( pProcProperty ) + { + bDone = true; + + if( pHint->GetId() == SBX_HINT_DATAWANTED ) + { + String aProcName; + aProcName.AppendAscii( "Property Get " ); + aProcName += pProcProperty->GetName(); + + SbxVariable* pMeth = Find( aProcName, SbxCLASS_METHOD ); + if( pMeth ) + { + SbxValues aVals; + aVals.eType = SbxVARIANT; + + SbxArray* pArg = pVar->GetParameters(); + USHORT nVarParCount = (pArg != NULL) ? pArg->Count() : 0; + if( nVarParCount > 1 ) + { + SbxArrayRef xMethParameters = new SbxArray; + xMethParameters->Put( pMeth, 0 ); // Method as parameter 0 + for( USHORT i = 1 ; i < nVarParCount ; ++i ) + { + SbxVariable* pPar = pArg->Get( i ); + xMethParameters->Put( pPar, i ); + } + + pMeth->SetParameters( xMethParameters ); + pMeth->Get( aVals ); + pMeth->SetParameters( NULL ); + } + else + { + pMeth->Get( aVals ); + } + + pVar->Put( aVals ); + } + } + else if( pHint->GetId() == SBX_HINT_DATACHANGED ) + { + SbxVariable* pMeth = NULL; + + bool bSet = pProcProperty->isSet(); + if( bSet ) + { + pProcProperty->setSet( false ); + + String aProcName; + aProcName.AppendAscii( "Property Set " ); + aProcName += pProcProperty->GetName(); + pMeth = Find( aProcName, SbxCLASS_METHOD ); + } + if( !pMeth ) // Let + { + String aProcName; + aProcName.AppendAscii( "Property Let " ); + aProcName += pProcProperty->GetName(); + pMeth = Find( aProcName, SbxCLASS_METHOD ); + } + + if( pMeth ) + { + // Setup parameters + SbxArrayRef xArray = new SbxArray; + xArray->Put( pMeth, 0 ); // Method as parameter 0 + xArray->Put( pVar, 1 ); + pMeth->SetParameters( xArray ); + + SbxValues aVals; + pMeth->Get( aVals ); + pMeth->SetParameters( NULL ); + } + } + } + } + + if( !bDone ) + SbModule::Notify( rBC, rHint ); +} + + ///////////////////////////////////////////////////////////////////////// // Implementation SbJScriptModule (Basic-Modul fuer JavaScript-Sourcen) SbJScriptModule::SbJScriptModule( const String& rName ) @@ -2012,6 +2104,13 @@ SbObjModule::Find( const XubString& rName, SbxClassType t ) return pVar; } +void SbObjModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, + const SfxHint& rHint, const TypeId& rHintType ) +{ + SbModule::handleProcedureProperties( rBC, rHint ); +} + + typedef ::cppu::WeakImplHelper2< awt::XTopWindowListener, awt::XWindowListener > FormObjEventListener_BASE; class FormObjEventListenerImpl : public FormObjEventListener_BASE From fadc14f47bd7f355523357ff961ac3eaf47f34ba Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Mon, 23 Aug 2010 11:16:00 +0200 Subject: [PATCH 064/279] mib19: #163377# Enhanced trace functionality --- basic/source/classes/sbxmod.cxx | 4 + basic/source/comp/sbcomp.cxx | 238 ++++++++++++++++++++++++++++-- basic/source/inc/sbtrace.hxx | 4 +- basic/source/runtime/methods1.cxx | 6 + basic/source/runtime/rtlproto.hxx | 5 + basic/source/runtime/stdobj.cxx | 4 + 6 files changed, 249 insertions(+), 12 deletions(-) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index bdbdde57cc1b..9bc512adaab5 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1188,6 +1188,10 @@ USHORT SbModule::Run( SbMethod* pMeth ) SendHint( GetParent(), SBX_HINT_BASICSTOP, pMeth ); GlobalRunDeInit(); + +#ifdef DBG_TRACE_BASIC + dbg_DeInitTrace(); +#endif } } else diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index 5b7e5c70591d..27f68ed069ee 100755 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -42,11 +42,145 @@ #include -// Trace Settings -static const char* GpTraceFileName = "d:\\zBasic.Asm\\BasicTrace.txt"; -static const bool GbIncludePCodes = false; -static const int GnIndentPerCallLevel = 4; -static const int GnIndentForPCode = 2; +// Trace ini file (set NULL to ignore) +static char GpTraceIniFile[] = "d:\\zBasic.Asm\\BasicTrace.ini"; +//static char* GpTraceIniFile = NULL; + + +// Trace Settings, used if no ini file / not found in ini file +static char GpTraceFileNameDefault[] = "d:\\zBasic.Asm\\BasicTrace.txt"; +static char* GpTraceFileName = GpTraceFileNameDefault; + +// GbTraceOn: +// true = tracing is active, false = tracing is disabled, default = true +// Set to false initially if you want to activate tracing on demand with +// TraceCommand( "TraceOn" ), see below +static bool GbTraceOn = true; + +// GbIncludePCodes: +// true = PCodes are written to trace, default = false, correspondents +// with TraceCommand( "PCodeOn" / "PCodeOff" ), see below +static bool GbIncludePCodes = false; + +static int GnIndentPerCallLevel = 4; +static int GnIndentForPCode = 2; + +/* + With trace enabled the runtime function TraceCommand + can be used to influence the trace functionality + from within the running Basic macro. + + Format: TraceCommand( command as String [, param as Variant] ) + + Supported commands (command is NOT case sensitive): + TraceCommand "TraceOn" sets GbTraceOn = true + TraceCommand "TraceOff" sets GbTraceOn = false + + TraceCommand "PCodeOn" sets GbIncludePCodes = true + TraceCommand "PCodeOff" sets GbIncludePCodes = false + + TraceCommand "Print", aVal writes aVal into the trace file as + long as it can be converted to string +*/ + +static void lcl_skipWhites( char*& rpc ) +{ + while( *rpc == ' ' || *rpc == '\t' ) + ++rpc; +} + +inline void lcl_findNextLine( char*& rpc, char* pe ) +{ + // Find line end + while( rpc < pe && *rpc != 13 && *rpc != 10 ) + ++rpc; + + // Read all + while( rpc < pe && (*rpc == 13 || *rpc == 10) ) + ++rpc; +} + +inline bool lcl_isAlpha( char c ) +{ + bool bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + return bRet; +} + +static void lcl_ReadIniFile( const char* pIniFileName ) +{ + const int BUF_SIZE = 1000; + static sal_Char TraceFileNameBuffer[BUF_SIZE]; + sal_Char Buffer[BUF_SIZE]; + sal_Char VarNameBuffer[BUF_SIZE]; + sal_Char ValBuffer[BUF_SIZE]; + + FILE* pFile = fopen( pIniFileName ,"rb" ); + if( pFile == NULL ) + return; + + size_t nRead = fread( Buffer, 1, BUF_SIZE, pFile ); + + // Scan + char* pc = Buffer; + char* pe = Buffer + nRead; + while( pc < pe ) + { + lcl_skipWhites( pc ); if( pc == pe ) break; + + // Read variable + char* pVarStart = pc; + while( pc < pe && lcl_isAlpha( *pc ) ) + ++pc; + int nVarLen = pc - pVarStart; + if( nVarLen == 0 ) + { + lcl_findNextLine( pc, pe ); + continue; + } + strncpy( VarNameBuffer, pVarStart, nVarLen ); + VarNameBuffer[nVarLen] = '\0'; + + // Check = + lcl_skipWhites( pc ); if( pc == pe ) break; + if( *pc != '=' ) + continue; + ++pc; + lcl_skipWhites( pc ); if( pc == pe ) break; + + // Read value + char* pValStart = pc; + while( pc < pe && *pc != 13 && *pc != 10 ) + ++pc; + int nValLen = pc - pValStart; + if( nValLen == 0 ) + { + lcl_findNextLine( pc, pe ); + continue; + } + strncpy( ValBuffer, pValStart, nValLen ); + ValBuffer[nValLen] = '\0'; + + // Match variables + if( strcmp( VarNameBuffer, "GpTraceFileName") == 0 ) + { + strcpy( TraceFileNameBuffer, ValBuffer ); + GpTraceFileName = TraceFileNameBuffer; + } + else + if( strcmp( VarNameBuffer, "GbTraceOn") == 0 ) + GbTraceOn = (strcmp( ValBuffer, "true" ) == 0); + else + if( strcmp( VarNameBuffer, "GbIncludePCodes") == 0 ) + GbIncludePCodes = (strcmp( ValBuffer, "true" ) == 0); + else + if( strcmp( VarNameBuffer, "GnIndentPerCallLevel") == 0 ) + GnIndentPerCallLevel = strtol( ValBuffer, NULL, 10 ); + else + if( strcmp( VarNameBuffer, "GnIndentForPCode") == 0 ) + GnIndentForPCode = strtol( ValBuffer, NULL, 10 ); + } + fclose( pFile ); +} struct TraceTextData { @@ -122,7 +256,7 @@ static rtl::OString lcl_toOStringSkipLeadingWhites( const String& aStr ) return aORetStr; } -String dumpMethodParameters( SbMethod* pMethod ) +String lcl_dumpMethodParameters( SbMethod* pMethod ) { String aStr; if( pMethod == NULL ) @@ -166,16 +300,36 @@ String dumpMethodParameters( SbMethod* pMethod ) return aStr; } + // Public functions + +static bool GbSavTraceOn = false; void dbg_InitTrace( void ) { + if( GpTraceIniFile != NULL ) + lcl_ReadIniFile( GpTraceIniFile ); + FILE* pFile = fopen( GpTraceFileName, "w" ); if( pFile != NULL ) fclose( pFile ); + GbSavTraceOn = GbTraceOn; + if( !GbTraceOn ) + lcl_lineOut( GpTraceFileName, "### Program started with trace off ###" ); } +void dbg_DeInitTrace( void ) +{ + GbTraceOn = GbSavTraceOn; +} + +static INT32 GnLastCallLvl = 0; + void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl ) { + if( !GbTraceOn ) + return; + GnLastCallLvl = nCallLvl; + SbModule* pTraceMod = pModule; if( pTraceMod->ISA(SbClassModuleObject) ) { @@ -206,14 +360,11 @@ void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl ) { const char* pModuleNameStr = OUStringToOString( rtl::OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr(); char Buffer[200]; - sprintf( Buffer, "TRACE ERROR: No info for PC = %d in module \"%s\"", nPC, pModuleNameStr ); + sprintf( Buffer, "TRACE ERROR: No info for PC = %d in module \"%s\"", (int)nPC, pModuleNameStr ); lcl_lineOut( GpTraceFileName, Buffer ); return; } - //nCallLvl--; - //if( nCallLvl < 0 ) - // nCallLvl = 0; int nIndent = nCallLvl * GnIndentPerCallLevel; const TraceTextData& rTraceTextData = itInner->second; @@ -234,6 +385,10 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, { static const char* pSeparator = "' ================================================================================"; + if( !GbTraceOn ) + return; + GnLastCallLvl = nCallLvl; + SbModule* pTraceMod = pModule; SbClassModuleObject* pClassModuleObj = NULL; if( pTraceMod->ISA(SbClassModuleObject) ) @@ -281,7 +436,7 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, aStr.AppendAscii( "]" ); } if( !bLeave ) - aStr += dumpMethodParameters( pMethod ); + aStr += lcl_dumpMethodParameters( pMethod ); lcl_lineOut( GpTraceFileName, OUStringToOString( rtl::OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr(), lcl_getSpaces( nIndent ) ); if( !bLeave ) @@ -293,6 +448,10 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, INT32 nCallLvl ) { + if( !GbTraceOn ) + return; + GnLastCallLvl = nCallLvl; + rtl::OString aOTraceErrMsg = OUStringToOString( rtl::OUString( aTraceErrMsg ), RTL_TEXTENCODING_ASCII_US ); char Buffer[200]; @@ -329,6 +488,63 @@ void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC, (*pInnerMap)[nPC] = aData; } +void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +{ + (void)pBasic; + (void)bWrite; + + if ( rPar.Count() < 2 ) + { + StarBASIC::Error( SbERR_BAD_ARGUMENT ); + return; + } + + String aCommand = rPar.Get(1)->GetString(); + + if( aCommand.EqualsIgnoreCaseAscii( "TraceOn" ) ) + GbTraceOn = true; + else + if( aCommand.EqualsIgnoreCaseAscii( "TraceOff" ) ) + GbTraceOn = false; + else + if( aCommand.EqualsIgnoreCaseAscii( "PCodeOn" ) ) + GbIncludePCodes = true; + else + if( aCommand.EqualsIgnoreCaseAscii( "PCodeOff" ) ) + GbIncludePCodes = false; + else + if( aCommand.EqualsIgnoreCaseAscii( "Print" ) ) + { + if ( rPar.Count() < 3 ) + { + StarBASIC::Error( SbERR_BAD_ARGUMENT ); + return; + } + + SbxError eOld = SbxBase::GetError(); + if( eOld != SbxERR_OK ) + SbxBase::ResetError(); + + String aValStr = rPar.Get(2)->GetString(); + SbxError eErr = SbxBase::GetError(); + if( eErr != SbxERR_OK ) + { + aValStr = String( RTL_CONSTASCII_USTRINGPARAM( "" ) ); + SbxBase::ResetError(); + } + + char Buffer[500]; + const char* pValStr = OUStringToOString( rtl::OUString( aValStr ), RTL_TEXTENCODING_ASCII_US ).getStr(); + + sprintf( Buffer, "### TRACE_PRINT: %s ###", pValStr ); + int nIndent = GnLastCallLvl * GnIndentPerCallLevel; + lcl_lineOut( GpTraceFileName, Buffer, lcl_getSpaces( nIndent ) ); + + if( eOld != SbxERR_OK ) + SbxBase::SetError( eOld ); + } +} + #endif diff --git a/basic/source/inc/sbtrace.hxx b/basic/source/inc/sbtrace.hxx index e8a482c2f6e9..50e344fb63d2 100755 --- a/basic/source/inc/sbtrace.hxx +++ b/basic/source/inc/sbtrace.hxx @@ -28,15 +28,17 @@ #ifndef _SBTRACE_HXX #define _SBTRACE_HXX -// #define DBG_TRACE_BASIC +//#define DBG_TRACE_BASIC #ifdef DBG_TRACE_BASIC void dbg_InitTrace( void ); +void dbg_DeInitTrace( void ); void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl ); void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, bool bLeave = false ); void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, INT32 nCallLvl ); void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC, const String& aTraceStr_STMNT, const String& aTraceStr_PCode ); +void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); #endif #endif diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index a59a7d25b54a..68f4dbe76c5f 100755 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1666,6 +1666,12 @@ RTLFUNC(GetDefaultContext) RTL_Impl_GetDefaultContext( pBasic, rPar, bWrite ); } +#ifdef DBG_TRACE_BASIC +RTLFUNC(TraceCommand) +{ + RTL_Impl_TraceCommand( pBasic, rPar, bWrite ); +} +#endif RTLFUNC(Join) { diff --git a/basic/source/runtime/rtlproto.hxx b/basic/source/runtime/rtlproto.hxx index a05db9d8974d..ba7af48c8472 100644 --- a/basic/source/runtime/rtlproto.hxx +++ b/basic/source/runtime/rtlproto.hxx @@ -26,6 +26,7 @@ ************************************************************************/ #include +#include "sbtrace.hxx" #define RTLFUNC( name ) void SbRtl_##name( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) #define RTLNAME( name ) &SbRtl_##name @@ -346,5 +347,9 @@ extern RTLFUNC(CDec); extern RTLFUNC(Partition); // Fong +#ifdef DBG_TRACE_BASIC +extern RTLFUNC(TraceCommand); +#endif + extern double Now_Impl(); extern void Wait_Impl( bool bDurationBased, SbxArray& rPar ); diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index c7ca576c6576..39f92afdea4a 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -535,6 +535,10 @@ static Methods aMethods[] = { { "TimeValue", SbxDATE, 1 | _FUNCTION, RTLNAME(TimeValue),0 }, { "String", SbxSTRING, 0,NULL,0 }, { "TOGGLE", SbxINTEGER, _CPROP, RTLNAME(TOGGLE),0 }, +#ifdef DBG_TRACE_BASIC +{ "TraceCommand", SbxNULL, 1 | _FUNCTION, RTLNAME(TraceCommand),0 }, + { "Command", SbxSTRING, 0,NULL,0 }, +#endif { "Trim", SbxSTRING, 1 | _FUNCTION, RTLNAME(Trim),0 }, { "String", SbxSTRING, 0,NULL,0 }, { "True", SbxBOOL, _CPROP, RTLNAME(True),0 }, From df970ca6a70349f6e887661fe6164a1c857c5cdb Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 23 Aug 2010 13:53:47 +0200 Subject: [PATCH 065/279] mib19: improved event handling: do not supreppress global events, when Application.EnableEvents symbol set to false --- .../inc/vbahelper/vbaeventshelperbase.hxx | 4 --- .../source/vbahelper/vbaeventshelperbase.cxx | 29 +++++++++---------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx index 89d355db71f9..b637b742b26c 100755 --- a/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx +++ b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx @@ -105,10 +105,6 @@ protected: }; typedef ::std::deque< EventQueueEntry > EventQueue; - /** Derived classes return whether event processing is enabled. Throws if - the instance is in an invalid state. */ - virtual bool implEventsEnabled() throw (css::uno::RuntimeException) = 0; - /** Derived classes do additional prpeparations and return whether the event handler has to be called. */ virtual bool implPrepareEvent( diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx index 16a8671df601..840008e6b979 100755 --- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx +++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx @@ -74,10 +74,6 @@ void SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, const un EventQueue aEventQueue; aEventQueue.push_back( EventQueueEntry( nEventId, rArgs ) ); - /* bEnabled will track if event processing is enabled. Every event handler - may disable handling of other events. */ - bool bEnabled = true; - /* bCancel will contain the current Cancel value. It is possible that multiple events will try to modify the Cancel value. Every event handler receives the Cancel value of the previous event handler. */ @@ -87,10 +83,10 @@ void SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, const un executed successfully. */ bool bSuccess = false; - /* Loop as long as there are more events to be processed, and as event - handling is still enabled. Derived classes may add new events to be - processed in the virtual implPrepareEvent() function. */ - while( bEnabled && !aEventQueue.empty() ) + /* Loop as long as there are more events to be processed. Derived classes + may add new events to be processed in the virtual implPrepareEvent() + function. */ + while( !aEventQueue.empty() ) { /* Check that all class members are available, and that we are not disposed (this may have happened at any time during execution of @@ -103,14 +99,14 @@ void SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, const un uno::Sequence< uno::Any > aEventArgs = aEventQueue.front().maArgs; aEventQueue.pop_front(); - // let derived classes decide whether event processing is still enabled - bEnabled = implEventsEnabled(); - // let derived classes prepare the event, they may add new events for next iteration - if( bEnabled && implPrepareEvent( aEventQueue, rInfo, aEventArgs ) ) + /* Let derived classes prepare the event, they may add new events for + next iteration. If false is returned, the event handler must not be + called. */ + bool bEventSuccess = false; + if( implPrepareEvent( aEventQueue, rInfo, aEventArgs ) ) { // search the event handler macro in the document ::rtl::OUString aMacroPath = getEventHandlerPath( rInfo, aEventArgs ); - bool bEventSuccess = false; if( aMacroPath.getLength() > 0 ) { // build the argument list @@ -139,11 +135,11 @@ void SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, const un bCancel = nNewCancel != 0; } } - // post processing (also, if event handler does not exist, or on error - implPostProcessEvent( aEventQueue, rInfo, bEventSuccess, bCancel ); // global success, if at least one event handler succeeded bSuccess |= bEventSuccess; } + // post processing (also, if event handler does not exist, or disabled, or on error + implPostProcessEvent( aEventQueue, rInfo, bEventSuccess, bCancel ); } // if event handlers want to cancel the event, do so regardless of any errors @@ -200,7 +196,8 @@ const VbaEventsHelperBase::EventHandlerInfo& VbaEventsHelperBase::getEventHandle append( sal_Unicode( '.' ) ).append( rInfo.maMacroName ).makeStringAndClear(); break; } - return resolveVBAMacro( mpShell, aMacroName ).ResolvedMacro(); + VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( mpShell, aMacroName, false ); + return aMacroInfo.IsResolved() ? aMacroInfo.ResolvedMacro() : ::rtl::OUString(); } void VbaEventsHelperBase::stopListening() From 3a174f37ece7030171f7ca4907bccfaf065ccf5c Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 23 Aug 2010 15:23:52 +0200 Subject: [PATCH 066/279] mib19: #163105# center UserForm on window on opening --- vbahelper/source/msforms/vbauserform.cxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index a1333e0a655b..ae0ecce0a955 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -64,9 +65,25 @@ ScVbaUserForm::Show( ) throw (uno::RuntimeException) { OSL_TRACE("ScVbaUserForm::Show( )"); short aRet = 0; - mbDispose = true; + mbDispose = true; + if ( m_xDialog.is() ) + { + // try to center dialog on model window + if( m_xModel.is() ) try + { + uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_SET_THROW ); + uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_SET_THROW ); + uno::Reference< awt::XWindow > xWindow( xFrame->getContainerWindow(), uno::UNO_SET_THROW ); + awt::Rectangle aPosSize = xWindow->getPosSize(); // already in pixel + setLeft( (aPosSize.Width - getWidth()) / 2.0 ); + setTop( (aPosSize.Height - getHeight()) / 2.0 ); + } + catch( uno::Exception& ) + { + } aRet = m_xDialog->execute(); + } OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet); if ( mbDispose ) { From bd215a796f9ff124bd291571e49526b6a54df247 Mon Sep 17 00:00:00 2001 From: "Michael E. Bohn" Date: Tue, 24 Aug 2010 13:14:28 +0200 Subject: [PATCH 067/279] mib19 #163409# set the macro exeution mode during workbooks.add --- vbahelper/source/vbahelper/vbadocumentsbase.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index 2d4175b90939..f7af3a43d977 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -215,7 +215,13 @@ VbaDocumentsBase::VbaDocumentsBase( const uno::Reference< XHelperInterface >& xP uno::Any SAL_CALL VbaDocumentsBase::Add() throw (uno::RuntimeException) { - uno::Reference< lang::XMultiComponentFactory > xSMgr( + uno::Sequence< beans::PropertyValue > aArgs( 1 ); + beans::PropertyValue aArg; + aArg.Name = ::rtl::OUString::createFromAscii("MacroExecutionMode"); + aArg.Value = uno::Any(com::sun::star::document::MacroExecMode::USE_CONFIG); + aArgs[ 0 ] = aArg; + + uno::Reference< lang::XMultiComponentFactory > xSMgr( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); uno::Reference< frame::XComponentLoader > xLoader( @@ -231,8 +237,7 @@ VbaDocumentsBase::Add() throw (uno::RuntimeException) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); uno::Reference< lang::XComponent > xComponent = xLoader->loadComponentFromURL( sURL , - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0, - uno::Sequence< beans::PropertyValue >(0) ); + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0, aArgs ); return uno::makeAny( xComponent ); } From 586a71afdb0bed549f59eeb9b8b1fbf7290c8f0d Mon Sep 17 00:00:00 2001 From: "Michael E. Bohn" Date: Tue, 24 Aug 2010 13:23:34 +0200 Subject: [PATCH 068/279] mib19: #163415# macroname is trimmed before searching for it. --- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 7c0aff2d6885..7fdfa75795ef 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -295,7 +295,7 @@ VbaApplicationBase::getVersion() throw (uno::RuntimeException) void SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 ) throw (uno::RuntimeException) { - VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( getCurrentDocument() ), MacroName ); + VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( getCurrentDocument() ), MacroName.trim() ); if( aMacroInfo.IsResolved() ) { // handle the arguments From 9bb5061f104d4b78bc6da341153338a9974a47aa Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Tue, 24 Aug 2010 13:40:40 +0200 Subject: [PATCH 069/279] mib19: #163402# StarBASIC::ClearAllModuleVars(): Don't delete vars in proxy and object modules --- basic/source/classes/sbxmod.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 9bc512adaab5..2b3849169fd9 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1349,7 +1349,7 @@ void StarBASIC::ClearAllModuleVars( void ) { SbModule* pModule = (SbModule*)pModules->Get( nMod ); // Nur initialisieren, wenn der Startcode schon ausgefuehrt wurde - if( pModule->pImage && pModule->pImage->bInit ) + if( pModule->pImage && pModule->pImage->bInit && !pModule->isProxyModule() && !pModule->ISA(SbObjModule) ) pModule->ClearPrivateVars(); } From ecbc03af8f88162df1b42836586fd77edbc52d1d Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 24 Aug 2010 13:48:11 +0200 Subject: [PATCH 070/279] #i114085# - Dialog must be centered, removed absolaute position. --- uui/source/sslwarndlg.src | 1 - 1 file changed, 1 deletion(-) diff --git a/uui/source/sslwarndlg.src b/uui/source/sslwarndlg.src index acae9453a971..b9986f9271d5 100644 --- a/uui/source/sslwarndlg.src +++ b/uui/source/sslwarndlg.src @@ -41,7 +41,6 @@ ModalDialog DLG_UUI_SSLWARN Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; - Pos = MAP_APPFONT( 221, 158 ); Size = MAP_APPFONT( DLG_WIDTH, DLG_HEIGHT ); Text [ en-US ] = "Security Warning: "; From d2ab8942a1b6ab8507dbf4c8b3042991558eb44c Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 24 Aug 2010 15:50:24 +0200 Subject: [PATCH 071/279] mib19: #163216# handle the case when the model is already disposed --- .../source/vbahelper/vbadocumentbase.cxx | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index 6023be1fd9d2..ad7ea62cd613 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -28,6 +28,8 @@ #include "vbahelper/vbadocumentbase.hxx" #include "vbahelper/helperdecl.hxx" +#include +#include #include #include #include @@ -36,6 +38,7 @@ #include //Michael E. Bohn #include +#include #include #include #include @@ -182,7 +185,22 @@ void VbaDocumentBase::setSaved( sal_Bool bSave ) throw (uno::RuntimeException) { uno::Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY_THROW ); - xModifiable->setModified( !bSave ); + try + { + xModifiable->setModified( !bSave ); + } + catch ( lang::DisposedException& ) + { + // impossibility to set the modified state on disposed document should not trigger an error + } + catch ( beans::PropertyVetoException& ) + { + uno::Any aCaught( ::cppu::getCaughtException() ); + throw lang::WrappedTargetRuntimeException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't change modified state of model!" ) ), + uno::Reference< uno::XInterface >(), + aCaught ); + } } sal_Bool From abe51dda06c3d42c6384a5085023b49ff488baf7 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Tue, 24 Aug 2010 16:58:41 +0200 Subject: [PATCH 072/279] mib19: #163410# Special handling for go to in VBA mode --- basic/source/comp/scanner.cxx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index dd68f20893f5..26c6af53cc56 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -224,6 +224,30 @@ BOOL SbiScanner::NextSym() for ( ; (BasicSimpleCharClass::isAlphaNumeric( *pLine, bCompatible ) || ( *pLine == '_' ) ); pLine++ ) nCol++; aSym = aLine.copy( n, nCol - n ); + + // Special handling for "go to" + if( bCompatible && *pLine && aSym.EqualsIgnoreCaseAscii( "go" ) ) + { + const sal_Unicode* pTestLine = pLine; + short nTestCol = nCol; + while( *pTestLine && (( *pTestLine == ' ' ) || ( *pTestLine == '\t' )) ) + { + pTestLine++; + nTestCol++; + } + + if( *pTestLine && *(pTestLine + 1) ) + { + String aTestSym = aLine.copy( nTestCol, 2 ); + if( aTestSym.EqualsIgnoreCaseAscii( "to" ) ) + { + aSym = String::CreateFromAscii( "goto" ); + pLine = pTestLine + 2; + nCol = nTestCol + 2; + } + } + } + // Abschliessendes '_' durch Space ersetzen, wenn Zeilenende folgt // (sonst falsche Zeilenfortsetzung) if( !bUsedForHilite && !*pLine && *(pLine-1) == '_' ) From 4511a7182915815f7db626731e7b13e189f5ee94 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 25 Aug 2010 14:32:45 +0200 Subject: [PATCH 073/279] dba34a: #i112571# spare superfluous enterState call (which caused an assertion to fire) --- desktop/source/migration/wizard.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx index 81a789a613b9..5cc90577aaff 100644 --- a/desktop/source/migration/wizard.cxx +++ b/desktop/source/migration/wizard.cxx @@ -209,7 +209,6 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep m_aDefaultPath = defineWizardPagesDependingFromContext(); activatePath(m_aDefaultPath, sal_True); - enterState(STATE_WELCOME); ActivatePage(); // set text of finish putton: From ac37cd4e475a3e6b9e7da6e237f3db0f2bff4122 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Thu, 26 Aug 2010 14:15:19 +0200 Subject: [PATCH 074/279] mib19: #163428# VBA symbol Worksheet.Visible supports xlSheetVeryHidden now --- oovbaapi/ooo/vba/excel/XWorksheet.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oovbaapi/ooo/vba/excel/XWorksheet.idl b/oovbaapi/ooo/vba/excel/XWorksheet.idl index 3eb8337798d6..b36497599deb 100644 --- a/oovbaapi/ooo/vba/excel/XWorksheet.idl +++ b/oovbaapi/ooo/vba/excel/XWorksheet.idl @@ -60,7 +60,7 @@ interface XWorksheet interface ::com::sun::star::script::XInvocation; interface ::com::sun::star::container::XNamed; - [attribute] boolean Visible; + [attribute] long Visible; [attribute, readonly] long StandardHeight; [attribute, readonly] long StandardWidth; [attribute, readonly] boolean ProtectionMode; From af733eacab845b986a0ba235fb5a52b9a0e80be1 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Thu, 26 Aug 2010 17:02:31 +0200 Subject: [PATCH 075/279] mib19: #163363# SbiRuntime::CheckArray(): Set error for null objects with parameters set --- basic/source/runtime/step2.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 587b0ae7a590..0afc12f61911 100755 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -589,6 +589,12 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) pCol->CollItem( pPar ); } } + else if( bVBAEnabled ) // !pObj + { + SbxArray* pPar = pElem->GetParameters(); + if( pPar != NULL ) + Error( SbERR_NO_OBJECT ); + } } } From 6e9b786ff6a7f2efca0b8ff4db9215202878a8ca Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 26 Aug 2010 19:24:07 +0200 Subject: [PATCH 076/279] mib19: #i163287# handle the dialog size in the way VBA does it --- vbahelper/inc/vbahelper/vbahelper.hxx | 7 +- vbahelper/source/vbahelper/vbahelper.cxx | 322 ++++++++--------------- 2 files changed, 115 insertions(+), 214 deletions(-) diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx index ccabb9114f2d..4c4a9f5d7204 100644 --- a/vbahelper/inc/vbahelper/vbahelper.hxx +++ b/vbahelper/inc/vbahelper/vbahelper.hxx @@ -194,11 +194,8 @@ public: #define VBA_WIDTH "Width" class VBAHELPER_DLLPUBLIC UserFormGeometryHelper : public AbstractGeometryAttributes { - css::uno::Reference< css::awt::XUnitConversion > mxControlUnits; - css::uno::Reference< css::beans::XPropertySet > mxModel; - - sal_Int32 ConvertLogicToPixel( sal_Int32 nValue, sal_Bool bIsPoint, sal_Bool bIsX, sal_Int16 nSourceUnit ); - sal_Int32 ConvertPixelToLogic( sal_Int32 nValue, sal_Bool bIsPoint, sal_Bool bIsX, sal_Int16 nTargetUnit ); + css::uno::Reference< css::awt::XWindow > mxWindow; + sal_Bool mbDialog; public: UserFormGeometryHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::awt::XControl >& xControl ); diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 14f4e3ff1363..fa80e8dc9234 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -39,6 +39,9 @@ #include #include #include +#include +#include +#include #include @@ -989,277 +992,178 @@ sal_Bool setPropertyValue( uno::Sequence< beans::PropertyValue >& aProp, const r // ====UserFormGeomentryHelper==== //--------------------------------------------- UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComponentContext >& /*xContext*/, const uno::Reference< awt::XControl >& xControl ) +: mbDialog( uno::Reference< awt::XDialog >( xControl, uno::UNO_QUERY ).is() ) { if ( !xControl.is() ) - throw uno::RuntimeException(); + throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No control is provided!" ) ), + uno::Reference< uno::XInterface >() ); - mxControlUnits.set( xControl->getPeer(), uno::UNO_QUERY_THROW ); - mxModel.set( xControl->getModel(), uno::UNO_QUERY_THROW ); + mxWindow.set( xControl->getPeer(), uno::UNO_QUERY_THROW ); } -//--------------------------------------------- -sal_Int32 UserFormGeometryHelper::ConvertPixelToLogic( sal_Int32 nValue, sal_Bool bIsPoint, sal_Bool bIsX, sal_Int16 nTargetUnit ) -{ - sal_Int32 nResult = 0; - if ( bIsPoint ) - { - // conversion for a point - awt::Point aPixelPoint( 0, 0 ); - ( bIsX ? aPixelPoint.X : aPixelPoint.Y ) = nValue; - awt::Point aTargetPoint( 0, 0 ); - aTargetPoint = mxControlUnits->convertPointToLogic( aPixelPoint, nTargetUnit ); - - nResult = bIsX ? aTargetPoint.X : aTargetPoint.Y; - } - else - { - // conversion for a size - awt::Size aPixelSize( 0, 0 ); - ( bIsX ? aPixelSize.Width : aPixelSize.Height ) = nValue; - awt::Size aTargetSize( 0, 0 ); - aTargetSize = mxControlUnits->convertSizeToLogic( aPixelSize, nTargetUnit ); - - nResult = bIsX ? aTargetSize.Width : aTargetSize.Height; - } - - return nResult; -} - -//--------------------------------------------- -sal_Int32 UserFormGeometryHelper::ConvertLogicToPixel( sal_Int32 nValue, sal_Bool bIsPoint, sal_Bool bIsX, sal_Int16 nSourceUnit ) -{ - sal_Int32 nResult = 0; - if ( bIsPoint ) - { - // conversion for a point - awt::Point aSourcePoint( 0, 0 ); - ( bIsX ? aSourcePoint.X : aSourcePoint.Y ) = nValue; - - awt::Point aPixelPoint( 0, 0 ); - aPixelPoint = mxControlUnits->convertPointToPixel( aSourcePoint, nSourceUnit ); - - nResult = bIsX ? aPixelPoint.X : aPixelPoint.Y; - } - else - { - // conversion for a size - awt::Size aSourceSize( 0, 0 ); - ( bIsX ? aSourceSize.Width : aSourceSize.Height ) = nValue; - - awt::Size aPixelSize( 0, 0 ); - aPixelSize = mxControlUnits->convertSizeToPixel( aSourceSize, nSourceUnit ); - - nResult = bIsX ? aPixelSize.Width : aPixelSize.Height; - } - - return nResult; -} //--------------------------------------------- double UserFormGeometryHelper::getLeft() { - double nResult = 0; - - try + if ( mbDialog ) { - sal_Int32 nLeft = 0; - mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ) ) >>= nLeft; - nResult = ConvertLogicToPixel( nLeft, - sal_True, // Point - sal_True, // X - util::MeasureUnit::APPFONT ); - } - catch ( uno::RuntimeException& ) - { - throw; - } - catch ( uno::Exception& e ) - { - throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not get position X!" ) ), - uno::Reference< uno::XInterface >(), - uno::makeAny( e ) ); + const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); + if ( pWindow ) + { + // get the size with decoration + Rectangle aResult = pWindow->GetWindowExtentsRelative( NULL ); + return aResult.getX(); + } } - return nResult; + return mxWindow->getPosSize().X; } //--------------------------------------------- void UserFormGeometryHelper::setLeft( double nLeft ) { - try + sal_Int64 nNewLeft = nLeft; + if ( mbDialog ) { - mxModel->setPropertyValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ), - uno::makeAny( ConvertPixelToLogic( nLeft, - sal_True, // Point - sal_True, // X - util::MeasureUnit::APPFONT ) ) ); - } - catch ( uno::RuntimeException& ) - { - throw; - } - catch ( uno::Exception& e ) - { - throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not set position X!" ) ), - uno::Reference< uno::XInterface >(), - uno::makeAny( e ) ); + const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); + if ( pWindow ) + { + // set the size with decoration + Rectangle aRDecor = pWindow->GetWindowExtentsRelative( NULL ); + if ( !aRDecor.IsEmpty() ) + { + sal_Int64 nDecor = aRDecor.getX(); + sal_Int64 nUnDecor = mxWindow->getPosSize().X; + nNewLeft = nLeft + nUnDecor - nDecor; + } + } } + + mxWindow->setPosSize( nNewLeft, 0, 0, 0, awt::PosSize::X ); } //--------------------------------------------- double UserFormGeometryHelper::getTop() { - double nResult = 0; - - try + if ( mbDialog ) { - sal_Int32 nTop = 0; - mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ) ) >>= nTop; - nResult = ConvertLogicToPixel( nTop, - sal_True, // Point - sal_False, // Y - util::MeasureUnit::APPFONT ); - } - catch ( uno::RuntimeException& ) - { - throw; - } - catch ( uno::Exception& e ) - { - throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not get position Y!" ) ), - uno::Reference< uno::XInterface >(), - uno::makeAny( e ) ); + const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); + if ( pWindow ) + { + // get the size with decoration + Rectangle aResult = pWindow->GetWindowExtentsRelative( NULL ); + return aResult.getY(); + } } - return nResult; + return mxWindow->getPosSize().Y; } //--------------------------------------------- void UserFormGeometryHelper::setTop( double nTop ) { - try + sal_Int64 nNewTop = nTop; + if ( mbDialog ) { - mxModel->setPropertyValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ), - uno::makeAny( ConvertPixelToLogic( nTop, - sal_True, // Point - sal_False, // Y - util::MeasureUnit::APPFONT ) ) ); - } - catch ( uno::RuntimeException& ) - { - throw; - } - catch ( uno::Exception& e ) - { - throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not set position X!" ) ), - uno::Reference< uno::XInterface >(), - uno::makeAny( e ) ); + const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); + if ( pWindow ) + { + // set the size with decoration + Rectangle aRDecor = pWindow->GetWindowExtentsRelative( NULL ); + if ( !aRDecor.IsEmpty() ) + { + sal_Int64 nDecor = aRDecor.getY(); + sal_Int64 nUnDecor = mxWindow->getPosSize().Y; + nNewTop = nTop + nUnDecor - nDecor; + } + } } + + mxWindow->setPosSize( 0, nNewTop, 0, 0, awt::PosSize::Y ); } //--------------------------------------------- double UserFormGeometryHelper::getWidth() { - double nResult = 0; - - try + if ( mbDialog ) { - sal_Int32 nWidth = 0; - mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_WIDTH ) ) ) >>= nWidth; - nResult = ConvertLogicToPixel( nWidth, - sal_False, // Size - sal_True, // X - util::MeasureUnit::APPFONT ); - } - catch ( uno::RuntimeException& ) - { - throw; - } - catch ( uno::Exception& e ) - { - throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not get width!" ) ), - uno::Reference< uno::XInterface >(), - uno::makeAny( e ) ); + const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); + if ( pWindow ) + { + // get the size with decoration + Rectangle aResult = pWindow->GetWindowExtentsRelative( NULL ); + return aResult.getWidth(); + } } - return nResult; + return mxWindow->getPosSize().Width; } //--------------------------------------------- -void UserFormGeometryHelper::setWidth( double nWidth) +void UserFormGeometryHelper::setWidth( double nWidth ) { - try + sal_Int64 nNewWidth = nWidth; + + if ( mbDialog ) { - mxModel->setPropertyValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_WIDTH ) ), - uno::makeAny( ConvertPixelToLogic( nWidth, - sal_False, // Size - sal_True, // X - util::MeasureUnit::APPFONT ) ) ); - } - catch ( uno::RuntimeException& ) - { - throw; - } - catch ( uno::Exception& e ) - { - throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not set width!" ) ), - uno::Reference< uno::XInterface >(), - uno::makeAny( e ) ); + const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); + if ( pWindow ) + { + // set the size with decoration + Rectangle aRDecor = pWindow->GetWindowExtentsRelative( NULL ); + if ( !aRDecor.IsEmpty() ) + { + sal_Int64 nDecor = aRDecor.getWidth(); + sal_Int64 nUnDecor = mxWindow->getPosSize().Width; + if ( nWidth < nDecor - nUnDecor ) + nUnDecor = nDecor - nWidth; // avoid negative size + nNewWidth = nWidth + nUnDecor - nDecor; + } + } } + + mxWindow->setPosSize( 0, 0, nNewWidth, 0, awt::PosSize::WIDTH ); } //--------------------------------------------- double UserFormGeometryHelper::getHeight() { - double nResult = 0; - - try + if ( mbDialog ) { - sal_Int32 nHeight = 0; - mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_HEIGHT ) ) ) >>= nHeight; - nResult = ConvertLogicToPixel( nHeight, - sal_False, // Size - sal_False, // Y - util::MeasureUnit::APPFONT ); - } - catch ( uno::RuntimeException& ) - { - throw; - } - catch ( uno::Exception& e ) - { - throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not get height!" ) ), - uno::Reference< uno::XInterface >(), - uno::makeAny( e ) ); + const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); + if ( pWindow ) + { + // get the size with decoration + Rectangle aResult = pWindow->GetWindowExtentsRelative( NULL ); + return aResult.getHeight(); + } } - return nResult; + return mxWindow->getPosSize().Height; } //--------------------------------------------- void UserFormGeometryHelper::setHeight( double nHeight ) { - try + sal_Int64 nNewHeight = nHeight; + if ( mbDialog ) { - mxModel->setPropertyValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_HEIGHT ) ), - uno::makeAny( ConvertPixelToLogic( nHeight, - sal_False, // Size - sal_False, // Y - util::MeasureUnit::APPFONT ) ) ); - } - catch ( uno::RuntimeException& ) - { - throw; - } - catch ( uno::Exception& e ) - { - throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not set height!" ) ), - uno::Reference< uno::XInterface >(), - uno::makeAny( e ) ); + const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); + if ( pWindow ) + { + // set the size with decoration + Rectangle aRDecor = pWindow->GetWindowExtentsRelative( NULL ); + if ( !aRDecor.IsEmpty() ) + { + sal_Int64 nDecor = aRDecor.getHeight(); + sal_Int64 nUnDecor = mxWindow->getPosSize().Height; + if ( nHeight < nDecor - nUnDecor ) + nUnDecor = nDecor - nHeight; // avoid negative size + nNewHeight = nHeight + nUnDecor - nDecor; + } + } } + + mxWindow->setPosSize( 0, 0, 0, nNewHeight, awt::PosSize::HEIGHT ); } // ============ From b621eb7eb88e6aa186fc09c8b755b39bacc61e68 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 27 Aug 2010 12:09:05 +0200 Subject: [PATCH 077/279] dba34a: added diagnostics --- svx/source/xml/xmlgrhlp.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index bda709dc4abd..45ecf71b5aff 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -707,8 +707,8 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s else { const String aGraphicObjectId( aPictureStreamName ); - const GraphicObject aGrfObject( ByteString( aGraphicObjectId, RTL_TEXTENCODING_ASCII_US ) ); - + const ByteString aAsciiObjectID( aGraphicObjectId, RTL_TEXTENCODING_ASCII_US ); + const GraphicObject aGrfObject( aAsciiObjectID ); if( aGrfObject.GetType() != GRAPHIC_NONE ) { String aStreamName( aGraphicObjectId ); @@ -782,6 +782,15 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s rURLPair.second = sPictures; rURLPair.second += aStreamName; } +#if OSL_DEBUG_LEVEL > 0 + else + { + ByteString sMessage = "graphic object with ID '"; + sMessage += aAsciiObjectID; + sMessage += "' has an unknown type"; + OSL_ENSURE( false, sMessage.GetBuffer() ); + } +#endif } maURLSet.insert( aURLString ); From 99523481ef58307f6d0cd849a712905e619f584c Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 27 Aug 2010 15:51:26 +0200 Subject: [PATCH 078/279] mib19: #i163287# fix the dialog position handling, change position after the dialog has been started --- vbahelper/source/msforms/vbauserform.cxx | 2 +- vbahelper/source/vbahelper/vbahelper.cxx | 60 +----------------------- 2 files changed, 3 insertions(+), 59 deletions(-) diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index ae0ecce0a955..027c6a7384bc 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -69,6 +69,7 @@ ScVbaUserForm::Show( ) throw (uno::RuntimeException) if ( m_xDialog.is() ) { + aRet = m_xDialog->execute(); // try to center dialog on model window if( m_xModel.is() ) try { @@ -82,7 +83,6 @@ ScVbaUserForm::Show( ) throw (uno::RuntimeException) catch( uno::Exception& ) { } - aRet = m_xDialog->execute(); } OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet); if ( mbDispose ) diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index fa80e8dc9234..cfac3642c60b 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -1004,81 +1004,25 @@ UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComp //--------------------------------------------- double UserFormGeometryHelper::getLeft() { - if ( mbDialog ) - { - const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); - if ( pWindow ) - { - // get the size with decoration - Rectangle aResult = pWindow->GetWindowExtentsRelative( NULL ); - return aResult.getX(); - } - } - return mxWindow->getPosSize().X; } //--------------------------------------------- void UserFormGeometryHelper::setLeft( double nLeft ) { - sal_Int64 nNewLeft = nLeft; - if ( mbDialog ) - { - const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); - if ( pWindow ) - { - // set the size with decoration - Rectangle aRDecor = pWindow->GetWindowExtentsRelative( NULL ); - if ( !aRDecor.IsEmpty() ) - { - sal_Int64 nDecor = aRDecor.getX(); - sal_Int64 nUnDecor = mxWindow->getPosSize().X; - nNewLeft = nLeft + nUnDecor - nDecor; - } - } - } - - mxWindow->setPosSize( nNewLeft, 0, 0, 0, awt::PosSize::X ); + mxWindow->setPosSize( nLeft, 0, 0, 0, awt::PosSize::X ); } //--------------------------------------------- double UserFormGeometryHelper::getTop() { - if ( mbDialog ) - { - const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); - if ( pWindow ) - { - // get the size with decoration - Rectangle aResult = pWindow->GetWindowExtentsRelative( NULL ); - return aResult.getY(); - } - } - return mxWindow->getPosSize().Y; } //--------------------------------------------- void UserFormGeometryHelper::setTop( double nTop ) { - sal_Int64 nNewTop = nTop; - if ( mbDialog ) - { - const Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ); - if ( pWindow ) - { - // set the size with decoration - Rectangle aRDecor = pWindow->GetWindowExtentsRelative( NULL ); - if ( !aRDecor.IsEmpty() ) - { - sal_Int64 nDecor = aRDecor.getY(); - sal_Int64 nUnDecor = mxWindow->getPosSize().Y; - nNewTop = nTop + nUnDecor - nDecor; - } - } - } - - mxWindow->setPosSize( 0, nNewTop, 0, 0, awt::PosSize::Y ); + mxWindow->setPosSize( 0, nTop, 0, 0, awt::PosSize::Y ); } //--------------------------------------------- From 16505c2b5c4e08144a3dbdd9fb27b90369ad162a Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 27 Aug 2010 16:16:02 +0200 Subject: [PATCH 079/279] mib19: #i163287# workaround setPosSize() problem of toolkit --- vbahelper/source/vbahelper/vbahelper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index cfac3642c60b..65974738c3f4 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -1010,7 +1010,7 @@ double UserFormGeometryHelper::getLeft() //--------------------------------------------- void UserFormGeometryHelper::setLeft( double nLeft ) { - mxWindow->setPosSize( nLeft, 0, 0, 0, awt::PosSize::X ); + mxWindow->setPosSize( nLeft, mxWindow->getPosSize().Y, 0, 0, awt::PosSize::POS ); } //--------------------------------------------- @@ -1022,7 +1022,7 @@ double UserFormGeometryHelper::getTop() //--------------------------------------------- void UserFormGeometryHelper::setTop( double nTop ) { - mxWindow->setPosSize( 0, nTop, 0, 0, awt::PosSize::Y ); + mxWindow->setPosSize( mxWindow->getPosSize().X, nTop, 0, 0, awt::PosSize::POS ); } //--------------------------------------------- From 8ce1ba3a7c2205322f826b455a805d7eebe7a150 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 27 Aug 2010 17:52:51 +0200 Subject: [PATCH 080/279] dba34a: #i111295# getFormattedValue: don't treat non-numeric columns with numeric formats --- .../source/commontools/formattedcolumnvalue.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx index 3707b7fdb65d..d63c83524389 100644 --- a/connectivity/source/commontools/formattedcolumnvalue.cxx +++ b/connectivity/source/commontools/formattedcolumnvalue.cxx @@ -326,9 +326,16 @@ namespace dbtools ::rtl::OUString sStringValue; if ( m_pData->m_xColumn.is() ) { - sStringValue = DBTypeConversion::getValue( - m_pData->m_xColumn, m_pData->m_xFormatter, m_pData->m_aNullDate, m_pData->m_nFormatKey, m_pData->m_nKeyType - ); + if ( m_pData->m_bNumericField ) + { + sStringValue = DBTypeConversion::getValue( + m_pData->m_xColumn, m_pData->m_xFormatter, m_pData->m_aNullDate, m_pData->m_nFormatKey, m_pData->m_nKeyType + ); + } + else + { + sStringValue = m_pData->m_xColumn->getString(); + } } return sStringValue; } From c211b684d02ef787f38a1e419bc0c9ed10244ef8 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 30 Aug 2010 09:41:48 +0200 Subject: [PATCH 081/279] mib19: #163217# let the document be correctly closed --- .../source/vbahelper/vbadocumentbase.cxx | 66 ++++++++++++++----- 1 file changed, 50 insertions(+), 16 deletions(-) diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index ad7ea62cd613..894a9f55eed2 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include //Michael E. Bohn @@ -131,23 +132,56 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg, else xModifiable->setModified( false ); - uno::Reference< util::XCloseable > xCloseable( getModel(), uno::UNO_QUERY ); - - if( xCloseable.is() ) - // use close(boolean DeliverOwnership) - - // The boolean parameter DeliverOwnership tells objects vetoing the close process that they may - // assume ownership if they object the closure by throwing a CloseVetoException - // Here we give up ownership. To be on the safe side, catch possible veto exception anyway. - xCloseable->close(sal_True); - // If close is not supported by this model - try to dispose it. - // But if the model disagree with a reset request for the modify state - // we shouldn't do so. Otherwhise some strange things can happen. - else + // first try to close the document using UI dispatch functionality + sal_Bool bUIClose = sal_False; + try { - uno::Reference< lang::XComponent > xDisposable ( getModel(), uno::UNO_QUERY ); - if ( xDisposable.is() ) - xDisposable->dispose(); + uno::Reference< frame::XController > xController( getModel()->getCurrentController(), uno::UNO_SET_THROW ); + uno::Reference< frame::XDispatchProvider > xDispatchProvider( xController->getFrame(), uno::UNO_QUERY_THROW ); + + uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW ); + uno::Reference< util::XURLTransformer > xURLTransformer( + xServiceManager->createInstanceWithContext( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ) ), + mxContext ), + uno::UNO_QUERY_THROW ); + + util::URL aURL; + aURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CloseDoc" ) ); + xURLTransformer->parseStrict( aURL ); + + uno::Reference< css::frame::XDispatch > xDispatch( + xDispatchProvider->queryDispatch( aURL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_self" ) ), 0 ), + uno::UNO_SET_THROW ); + xDispatch->dispatch( aURL, uno::Sequence< beans::PropertyValue >() ); + bUIClose = sal_True; + } + catch( uno::Exception& ) + { + } + + if ( !bUIClose ) + { + // if it is not possible to use UI dispatch, try to close the model directly + uno::Reference< util::XCloseable > xCloseable( getModel(), uno::UNO_QUERY ); + if( xCloseable.is() ) + { + // use close(boolean DeliverOwnership) + + // The boolean parameter DeliverOwnership tells objects vetoing the close process that they may + // assume ownership if they object the closure by throwing a CloseVetoException + // Here we give up ownership. To be on the safe side, catch possible veto exception anyway. + xCloseable->close(sal_True); + } + else + { + // If close is not supported by this model - try to dispose it. + // But if the model disagree with a reset request for the modify state + // we shouldn't do so. Otherwhise some strange things can happen. + uno::Reference< lang::XComponent > xDisposable ( getModel(), uno::UNO_QUERY ); + if ( xDisposable.is() ) + xDisposable->dispose(); + } } } From e20d0e3eb6dbd05da364c8ec3b71ff4f118dbf48 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 30 Aug 2010 09:45:08 +0200 Subject: [PATCH 082/279] mib19: #163217# let the basic listeners stop listening on termination, patch from AB --- basic/inc/basic/sbobjmod.hxx | 4 + basic/inc/basic/sbxvar.hxx | 5 +- basic/source/classes/sb.cxx | 4 + basic/source/classes/sbunoobj.cxx | 161 +++++++++++++++++++++++++++++- basic/source/classes/sbxmod.cxx | 5 + basic/source/runtime/step0.cxx | 2 +- basic/source/sbx/sbxvar.cxx | 27 ++++- 7 files changed, 200 insertions(+), 8 deletions(-) diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx index 2e142245dae7..a8e650e43d87 100644 --- a/basic/inc/basic/sbobjmod.hxx +++ b/basic/inc/basic/sbobjmod.hxx @@ -52,6 +52,10 @@ class SbObjModule : public SbModule { SbObjModule( const SbObjModule& ); SbObjModule(); + +protected: + virtual ~SbObjModule(); + public: TYPEINFO(); SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible ); diff --git a/basic/inc/basic/sbxvar.hxx b/basic/inc/basic/sbxvar.hxx index 0cddcbdf8d17..1ba1b5d1edfa 100644 --- a/basic/inc/basic/sbxvar.hxx +++ b/basic/inc/basic/sbxvar.hxx @@ -439,6 +439,7 @@ SV_DECL_REF(SbxInfo) class SfxBroadcaster; class SbxVariableImpl; +class StarBASIC; class SbxVariable : public SbxValue { @@ -499,7 +500,9 @@ public: const String& GetDeclareClassName( void ); void SetDeclareClassName( const String& ); - void SetComListener( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xComListener ); + void SetComListener( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xComListener, + StarBASIC* pParentBasic ); + void ClearComListener( void ); static USHORT MakeHashCode( const String& rName ); }; diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index f509647e08a1..fbbf132c07d3 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -761,6 +761,8 @@ void StarBASIC::SetModified( BOOL b ) SbxBase::SetModified( b ); } +void disposeComVariablesForBasic( StarBASIC* pBasic ); + StarBASIC::~StarBASIC() { if( !--GetSbData()->nInst ) @@ -803,6 +805,8 @@ StarBASIC::~StarBASIC() } xUnoListeners = NULL; } + + disposeComVariablesForBasic( this ); } // Override new() operator, so that everyone can create a new instance diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index c9123b06341b..53a7c5c18930 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -36,9 +36,11 @@ #include #include +#include #include #include #include +#include #include #include @@ -4170,14 +4172,26 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) //========================================================================== -typedef WeakImplHelper1< XInvocation > ModuleInvocationProxyHelper; +namespace { +class OMutexBasis +{ +protected: + // this mutex is necessary for OInterfaceContainerHelper + ::osl::Mutex m_aMutex; +}; +}; -class ModuleInvocationProxy : public ModuleInvocationProxyHelper +typedef WeakImplHelper2< XInvocation, XComponent > ModuleInvocationProxyHelper; + +class ModuleInvocationProxy : public OMutexBasis, + public ModuleInvocationProxyHelper { ::rtl::OUString m_aPrefix; SbxObjectRef m_xScopeObj; bool m_bProxyIsClassModuleObject; + ::cppu::OInterfaceContainerHelper m_aListeners; + public: ModuleInvocationProxy( const ::rtl::OUString& aPrefix, SbxObjectRef xScopeObj ); ~ModuleInvocationProxy() @@ -4197,11 +4211,17 @@ public: Sequence< sal_Int16 >& rOutParamIndex, Sequence< Any >& rOutParam ) throw( CannotConvertException, InvocationTargetException ); + + // XComponent + virtual void SAL_CALL dispose() throw(RuntimeException); + virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException); + virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException); }; ModuleInvocationProxy::ModuleInvocationProxy( const ::rtl::OUString& aPrefix, SbxObjectRef xScopeObj ) : m_aPrefix( aPrefix + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_") ) ) , m_xScopeObj( xScopeObj ) + , m_aListeners( m_aMutex ) { m_bProxyIsClassModuleObject = xScopeObj.Is() ? xScopeObj->ISA(SbClassModuleObject) : false; } @@ -4298,13 +4318,14 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction, NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() ); Any aRet; - if( !m_xScopeObj.Is() ) + SbxObjectRef xScopeObj = m_xScopeObj; + if( !xScopeObj.Is() ) return aRet; ::rtl::OUString aFunctionName = m_aPrefix; aFunctionName += rFunction; - SbxVariable* p = m_xScopeObj->Find( aFunctionName, SbxCLASS_METHOD ); + SbxVariable* p = xScopeObj->Find( aFunctionName, SbxCLASS_METHOD ); SbMethod* pMeth = p != NULL ? PTR_CAST(SbMethod,p) : NULL; if( pMeth == NULL ) { @@ -4341,6 +4362,30 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction, return aRet; } +void SAL_CALL ModuleInvocationProxy::dispose() + throw(RuntimeException) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + + EventObject aEvent( (XComponent*)this ); + m_aListeners.disposeAndClear( aEvent ); + + m_xScopeObj = NULL; +} + +void SAL_CALL ModuleInvocationProxy::addEventListener( const Reference< XEventListener >& xListener ) + throw (RuntimeException) +{ + m_aListeners.addInterface( xListener ); +} + +void SAL_CALL ModuleInvocationProxy::removeEventListener( const Reference< XEventListener >& xListener ) + throw (RuntimeException) +{ + m_aListeners.removeInterface( xListener ); +} + + Reference< XInterface > createComListener( const Any& aControlAny, const ::rtl::OUString& aVBAType, const ::rtl::OUString& aPrefix, SbxObjectRef xScopeObj ) { @@ -4370,6 +4415,97 @@ Reference< XInterface > createComListener( const Any& aControlAny, const ::rtl:: return xRet; } +typedef std::vector< WeakReference< XComponent > > ComponentRefVector; + +struct StarBasicDisposeItem +{ + StarBASIC* m_pBasic; + SbxArrayRef m_pRegisteredVariables; + ComponentRefVector m_vComImplementsObjects; + + StarBasicDisposeItem( StarBASIC* pBasic ) + : m_pBasic( pBasic ) + { + m_pRegisteredVariables = new SbxArray(); + } +}; + +typedef std::vector< StarBasicDisposeItem* > DisposeItemVector; + +static DisposeItemVector GaDisposeItemVector; + +DisposeItemVector::iterator lcl_findItemForBasic( StarBASIC* pBasic ) +{ + DisposeItemVector::iterator it; + for( it = GaDisposeItemVector.begin() ; it != GaDisposeItemVector.end() ; ++it ) + { + StarBasicDisposeItem* pItem = *it; + if( pItem->m_pBasic == pBasic ) + return it; + } + return GaDisposeItemVector.end(); +} + +StarBasicDisposeItem* lcl_getOrCreateItemForBasic( StarBASIC* pBasic ) +{ + DisposeItemVector::iterator it = lcl_findItemForBasic( pBasic ); + StarBasicDisposeItem* pItem = (it != GaDisposeItemVector.end()) ? *it : NULL; + if( pItem == NULL ) + { + pItem = new StarBasicDisposeItem( pBasic ); + GaDisposeItemVector.push_back( pItem ); + } + return pItem; +} + +void lcl_registerComponentToBeDisposedForBasic + ( Reference< XComponent > xComponent, StarBASIC* pBasic ) +{ + StarBasicDisposeItem* pItem = lcl_getOrCreateItemForBasic( pBasic ); + pItem->m_vComImplementsObjects.push_back( xComponent ); +} + +void registerComListenerVariableForBasic( SbxVariable* pVar, StarBASIC* pBasic ) +{ + StarBasicDisposeItem* pItem = lcl_getOrCreateItemForBasic( pBasic ); + SbxArray* pArray = pItem->m_pRegisteredVariables; + pArray->Put( pVar, pArray->Count() ); +} + +void disposeComVariablesForBasic( StarBASIC* pBasic ) +{ + DisposeItemVector::iterator it = lcl_findItemForBasic( pBasic ); + if( it != GaDisposeItemVector.end() ) + { + StarBasicDisposeItem* pItem = *it; + + SbxArray* pArray = pItem->m_pRegisteredVariables; + USHORT nCount = pArray->Count(); + for( USHORT i = 0 ; i < nCount ; ++i ) + { + SbxVariable* pVar = pArray->Get( i ); + pVar->ClearComListener(); + } + + ComponentRefVector& rv = pItem->m_vComImplementsObjects; + ComponentRefVector::iterator itCRV; + for( itCRV = rv.begin() ; itCRV != rv.end() ; ++itCRV ) + { + try + { + Reference< XComponent > xComponent( (*itCRV).get(), UNO_QUERY_THROW ); + xComponent->dispose(); + } + catch( Exception& ) + {} + } + + delete pItem; + GaDisposeItemVector.erase( it ); + } +} + + // Handle module implements mechanism for OLE types bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pProxyClassModuleObject ) { @@ -4423,6 +4559,23 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP if( bSuccess ) { + Reference< XComponent > xComponent( xProxy, UNO_QUERY ); + if( xComponent.is() ) + { + StarBASIC* pParentBasic = NULL; + SbxObject* pCurObject = this; + do + { + SbxObject* pParent = pCurObject->GetParent(); + pParentBasic = PTR_CAST(StarBASIC,pParent); + pCurObject = pParent; + } + while( pParentBasic == NULL && pCurObject != NULL ); + + OSL_ASSERT( pParentBasic != NULL ); + lcl_registerComponentToBeDisposedForBasic( xComponent, pParentBasic ); + } + o_rRetAny <<= xRet; break; } diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 2b3849169fd9..46a1488844c1 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -2072,6 +2072,11 @@ SbObjModule::SbObjModule( const String& rName, const com::sun::star::script::Mod else if ( mInfo.ModuleObject.is() ) SetUnoObject( uno::makeAny( mInfo.ModuleObject ) ); } + +SbObjModule::~SbObjModule() +{ +} + void SbObjModule::SetUnoObject( const uno::Any& aObj ) throw ( uno::RuntimeException ) { diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 06a8bb19af00..797896bf32ef 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -548,7 +548,7 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b xComListener = createComListener( aControlAny, aVBAType, aPrefix, xScopeObj ); refVal->SetDeclareClassName( aDeclareClassName ); - refVal->SetComListener( xComListener ); // Hold reference + refVal->SetComListener( xComListener, &rBasic ); // Hold reference } *refVar = *refVal; diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 58e3c1ae92c2..45342a015194 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -59,13 +59,17 @@ class SbxVariableImpl friend class SbxVariable; String m_aDeclareClassName; Reference< XInterface > m_xComListener; + StarBASIC* m_pComListenerParentBasic; SbxVariableImpl( void ) + : m_pComListenerParentBasic( NULL ) {} SbxVariableImpl( const SbxVariableImpl& r ) : m_aDeclareClassName( r.m_aDeclareClassName ) , m_xComListener( r.m_xComListener ) - {} + , m_pComListenerParentBasic( r.m_pComListenerParentBasic ) + { + } }; @@ -84,12 +88,18 @@ SbxVariable::SbxVariable() : SbxValue() #endif } +void registerComListenerVariableForBasic( SbxVariable* pVar, StarBASIC* pBasic ); + SbxVariable::SbxVariable( const SbxVariable& r ) : SvRefBase( r ), SbxValue( r ), mpPar( r.mpPar ), pInfo( r.pInfo ) { mpSbxVariableImpl = NULL; if( r.mpSbxVariableImpl != NULL ) + { mpSbxVariableImpl = new SbxVariableImpl( *r.mpSbxVariableImpl ); + if( mpSbxVariableImpl->m_xComListener.is() ) + registerComListenerVariableForBasic( this, mpSbxVariableImpl->m_pComListenerParentBasic ); + } pCst = NULL; if( r.CanRead() ) { @@ -315,7 +325,11 @@ SbxVariable& SbxVariable::operator=( const SbxVariable& r ) SbxValue::operator=( r ); delete mpSbxVariableImpl; if( r.mpSbxVariableImpl != NULL ) + { mpSbxVariableImpl = new SbxVariableImpl( *r.mpSbxVariableImpl ); + if( mpSbxVariableImpl->m_xComListener.is() ) + registerComListenerVariableForBasic( this, mpSbxVariableImpl->m_pComListenerParentBasic ); + } else mpSbxVariableImpl = NULL; return *this; @@ -396,10 +410,19 @@ void SbxVariable::SetDeclareClassName( const String& rDeclareClassName ) pImpl->m_aDeclareClassName = rDeclareClassName; } -void SbxVariable::SetComListener( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xComListener ) +void SbxVariable::SetComListener( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xComListener, + StarBASIC* pParentBasic ) { SbxVariableImpl* pImpl = getImpl(); pImpl->m_xComListener = xComListener; + pImpl->m_pComListenerParentBasic = pParentBasic; + registerComListenerVariableForBasic( this, pParentBasic ); +} + +void SbxVariable::ClearComListener( void ) +{ + SbxVariableImpl* pImpl = getImpl(); + pImpl->m_xComListener.clear(); } From 9e0ef7ed32b5d2e1cdb64e82f329d348ac769fbd Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 30 Aug 2010 13:55:39 +0200 Subject: [PATCH 083/279] mib19: #163217# let the form be disposed at the end --- basic/source/classes/sbunoobj.cxx | 4 ++-- basic/source/classes/sbxmod.cxx | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 53a7c5c18930..260ef23ca85c 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4458,7 +4458,7 @@ StarBasicDisposeItem* lcl_getOrCreateItemForBasic( StarBASIC* pBasic ) return pItem; } -void lcl_registerComponentToBeDisposedForBasic +void registerComponentToBeDisposedForBasic ( Reference< XComponent > xComponent, StarBASIC* pBasic ) { StarBasicDisposeItem* pItem = lcl_getOrCreateItemForBasic( pBasic ); @@ -4573,7 +4573,7 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP while( pParentBasic == NULL && pCurObject != NULL ); OSL_ASSERT( pParentBasic != NULL ); - lcl_registerComponentToBeDisposedForBasic( xComponent, pParentBasic ); + registerComponentToBeDisposedForBasic( xComponent, pParentBasic ); } o_rRetAny <<= xRet; diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 46a1488844c1..6a2380acedcd 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -2494,6 +2494,8 @@ void SbUserFormModule::Unload() } //liuchen +void registerComponentToBeDisposedForBasic( Reference< XComponent > xComponent, StarBASIC* pBasic ); + void SbUserFormModule::InitObject() { try @@ -2525,6 +2527,25 @@ void SbUserFormModule::InitObject() aArgs[ 3 ] <<= rtl::OUString( GetParent()->GetName() ); pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.UserForm")), aArgs ) ) ); uno::Reference< lang::XComponent > xComponent( aArgs[ 1 ], uno::UNO_QUERY_THROW ); + + // the dialog must be disposed at the end! + if( xComponent.is() ) + { + StarBASIC* pParentBasic = NULL; + SbxObject* pCurObject = this; + do + { + SbxObject* pParent = pCurObject->GetParent(); + pParentBasic = PTR_CAST(StarBASIC,pParent); + pCurObject = pParent; + } + while( pParentBasic == NULL && pCurObject != NULL ); + + OSL_ASSERT( pParentBasic != NULL ); + registerComponentToBeDisposedForBasic( xComponent, pParentBasic ); + } + + // remove old listener if it exists if ( m_DialogListener.get() ) m_DialogListener->removeListener(); From c14df458b4b7da8da38e9be28db9122ee8765ad2 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 30 Aug 2010 14:34:00 +0200 Subject: [PATCH 084/279] mib19: #163429# switch off form design mode in new documents created with VBA symbol Workbooks.Add --- svx/source/form/fmview.cxx | 4 +--- vbahelper/source/vbahelper/vbadocumentsbase.cxx | 17 ++++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index 22681d511b82..d3e8c848b940 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -139,9 +139,7 @@ void FmFormView::Init() const SfxPoolItem *pItem=0; if ( pObjShell->GetMedium()->GetItemSet()->GetItemState( SID_COMPONENTDATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - Sequence< PropertyValue > aSeq; - ( ((SfxUnoAnyItem*)pItem)->GetValue() ) >>= aSeq; - ::comphelper::NamedValueCollection aComponentData( aSeq ); + ::comphelper::NamedValueCollection aComponentData( ((SfxUnoAnyItem*)pItem)->GetValue() ); bInitDesignMode = aComponentData.getOrDefault( "ApplyFormDesignMode", bInitDesignMode ); } } diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index f7af3a43d977..e01809d5fbc3 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -25,6 +25,7 @@ * ************************************************************************/ #include +#include #include #include #include @@ -215,12 +216,6 @@ VbaDocumentsBase::VbaDocumentsBase( const uno::Reference< XHelperInterface >& xP uno::Any SAL_CALL VbaDocumentsBase::Add() throw (uno::RuntimeException) { - uno::Sequence< beans::PropertyValue > aArgs( 1 ); - beans::PropertyValue aArg; - aArg.Name = ::rtl::OUString::createFromAscii("MacroExecutionMode"); - aArg.Value = uno::Any(com::sun::star::document::MacroExecMode::USE_CONFIG); - aArgs[ 0 ] = aArg; - uno::Reference< lang::XMultiComponentFactory > xSMgr( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); @@ -235,9 +230,17 @@ VbaDocumentsBase::Add() throw (uno::RuntimeException) sURL = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("private:factory/scalc") ); else throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + + // prepare the media descriptor + ::comphelper::MediaDescriptor aMediaDesc; + aMediaDesc[ ::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE() ] <<= document::MacroExecMode::USE_CONFIG; + aMediaDesc.setComponentDataEntry( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ApplyFormDesignMode" ) ), uno::Any( false ) ); + + // craete the new document uno::Reference< lang::XComponent > xComponent = xLoader->loadComponentFromURL( sURL , - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0, aArgs ); + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0, + aMediaDesc.getAsConstPropertyValueList() ); return uno::makeAny( xComponent ); } From c30f688a8723093f4efc5075eb96350269b2b0bf Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 30 Aug 2010 16:48:36 +0200 Subject: [PATCH 085/279] mib19: #i163287# workaround setPosSize() problem of toolkit --- vbahelper/source/msforms/vbacontrol.cxx | 1 - vbahelper/source/msforms/vbauserform.cxx | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index 82b68bbd5be7..ed9f83a7c647 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -227,7 +227,6 @@ void SAL_CALL ScVbaControl::setLeft( double _left ) throw (uno::RuntimeException) { mpGeometryHelper->setLeft( _left ); - } double SAL_CALL diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index 027c6a7384bc..e10c3a373f94 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -28,6 +28,7 @@ #include "vbauserform.hxx" #include #include +#include #include #include #include @@ -69,7 +70,6 @@ ScVbaUserForm::Show( ) throw (uno::RuntimeException) if ( m_xDialog.is() ) { - aRet = m_xDialog->execute(); // try to center dialog on model window if( m_xModel.is() ) try { @@ -77,12 +77,16 @@ ScVbaUserForm::Show( ) throw (uno::RuntimeException) uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_SET_THROW ); uno::Reference< awt::XWindow > xWindow( xFrame->getContainerWindow(), uno::UNO_SET_THROW ); awt::Rectangle aPosSize = xWindow->getPosSize(); // already in pixel - setLeft( (aPosSize.Width - getWidth()) / 2.0 ); - setTop( (aPosSize.Height - getHeight()) / 2.0 ); + + uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW ); + uno::Reference< awt::XWindow > xControlWindow( xControl->getPeer(), uno::UNO_QUERY_THROW ); + xControlWindow->setPosSize( (aPosSize.Width - getWidth()) / 2.0, (aPosSize.Height - getHeight()) / 2.0, 0, 0, awt::PosSize::POS ); } catch( uno::Exception& ) { } + + aRet = m_xDialog->execute(); } OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet); if ( mbDispose ) From e48aad10ecbb86128929ef19f690eb50f8660d36 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Tue, 31 Aug 2010 11:13:07 +0200 Subject: [PATCH 086/279] mib19: WaE --- vbahelper/source/vbahelper/vbaeventshelperbase.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx index 840008e6b979..b88086cd6d1d 100755 --- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx +++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx @@ -197,7 +197,7 @@ const VbaEventsHelperBase::EventHandlerInfo& VbaEventsHelperBase::getEventHandle break; } VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( mpShell, aMacroName, false ); - return aMacroInfo.IsResolved() ? aMacroInfo.ResolvedMacro() : ::rtl::OUString(); + return aMacroInfo.IsResolved() ? ::rtl::OUString( aMacroInfo.ResolvedMacro() ) : ::rtl::OUString(); } void VbaEventsHelperBase::stopListening() From f0bede727c3a29f01f5c2e3492a84ccc7971cb2f Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Tue, 31 Aug 2010 11:37:48 +0200 Subject: [PATCH 087/279] mib19: WaE --- basic/source/classes/sbunoobj.cxx | 8 ++++---- basic/source/classes/sbxmod.cxx | 6 +++--- basic/source/runtime/step2.cxx | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 260ef23ca85c..935d6022749a 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4179,7 +4179,7 @@ protected: // this mutex is necessary for OInterfaceContainerHelper ::osl::Mutex m_aMutex; }; -}; +} // namespace typedef WeakImplHelper2< XInvocation, XComponent > ModuleInvocationProxyHelper; @@ -4566,9 +4566,9 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP SbxObject* pCurObject = this; do { - SbxObject* pParent = pCurObject->GetParent(); - pParentBasic = PTR_CAST(StarBASIC,pParent); - pCurObject = pParent; + SbxObject* pObjParent = pCurObject->GetParent(); + pParentBasic = PTR_CAST( StarBASIC, pObjParent ); + pCurObject = pObjParent; } while( pParentBasic == NULL && pCurObject != NULL ); diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 6a2380acedcd..c324e3db1f50 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -2535,9 +2535,9 @@ void SbUserFormModule::InitObject() SbxObject* pCurObject = this; do { - SbxObject* pParent = pCurObject->GetParent(); - pParentBasic = PTR_CAST(StarBASIC,pParent); - pCurObject = pParent; + SbxObject* pObjParent = pCurObject->GetParent(); + pParentBasic = PTR_CAST( StarBASIC, pObjParent ); + pCurObject = pObjParent; } while( pParentBasic == NULL && pCurObject != NULL ); diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 0afc12f61911..9acbcb3ed6ab 100755 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -591,8 +591,8 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) } else if( bVBAEnabled ) // !pObj { - SbxArray* pPar = pElem->GetParameters(); - if( pPar != NULL ) + SbxArray* pParam = pElem->GetParameters(); + if( pParam != NULL ) Error( SbERR_NO_OBJECT ); } } From 67e181bee06b98fa96aa7a37f3f6240c9f8b90f6 Mon Sep 17 00:00:00 2001 From: "Michael E. Bohn" Date: Wed, 1 Sep 2010 04:12:05 +0200 Subject: [PATCH 088/279] mib19: #163494# removed the exlamation mark at the begin of the macro name in application.run --- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 7fdfa75795ef..b676571780be 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -295,6 +295,13 @@ VbaApplicationBase::getVersion() throw (uno::RuntimeException) void SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 ) throw (uno::RuntimeException) { + ::rtl::OUString aMacroName; + if (0 == MacroName.trim().indexOf('!')) + { + aMacroName = MacroName.trim().copy(1); + }else{ + aMacroName = MacroName; + } VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( getCurrentDocument() ), MacroName.trim() ); if( aMacroInfo.IsResolved() ) { From 0e48d15a6f12f103312926a7831b94783b8c0999 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Wed, 1 Sep 2010 08:03:53 +0200 Subject: [PATCH 089/279] mib19: #163416# Support default property also for already executed functions --- basic/source/runtime/step2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 9acbcb3ed6ab..58713ba1438f 100755 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -489,7 +489,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) pPar->Put( NULL, 0 ); } // Index-Access bei UnoObjekten beruecksichtigen - else if( pElem->GetType() == SbxOBJECT && !pElem->ISA(SbxMethod) ) + else if( pElem->GetType() == SbxOBJECT && (!pElem->ISA(SbxMethod) || !pElem->IsBroadcaster()) ) { pPar = pElem->GetParameters(); if ( pPar ) From b715d7737259726449d3fcf6c5e727bde3fbaeb0 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Wed, 1 Sep 2010 09:26:49 +0200 Subject: [PATCH 090/279] mib19: #163494# slight correction --- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index b676571780be..8b0a52682ac0 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -295,14 +295,10 @@ VbaApplicationBase::getVersion() throw (uno::RuntimeException) void SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 ) throw (uno::RuntimeException) { - ::rtl::OUString aMacroName; - if (0 == MacroName.trim().indexOf('!')) - { - aMacroName = MacroName.trim().copy(1); - }else{ - aMacroName = MacroName; - } - VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( getCurrentDocument() ), MacroName.trim() ); + ::rtl::OUString aMacroName = MacroName.trim(); + if (0 == aMacroName.indexOf('!')) + aMacroName = aMacroName.copy(1).trim(); + VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( getCurrentDocument() ), aMacroName ); if( aMacroInfo.IsResolved() ) { // handle the arguments From 060fad2232894bcd6a74b7daad294fd400513e09 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Wed, 1 Sep 2010 09:30:31 +0200 Subject: [PATCH 091/279] mib19: clean up parameter names in VBA IDLs --- oovbaapi/ooo/vba/XApplicationBase.idl | 6 +-- oovbaapi/ooo/vba/XVBAAppService.idl | 72 ------------------------- oovbaapi/ooo/vba/XVBADocService.idl | 72 ------------------------- oovbaapi/ooo/vba/excel/SheetObject.idl | 2 +- oovbaapi/ooo/vba/excel/SheetObjects.idl | 6 +-- oovbaapi/ooo/vba/excel/XApplication.idl | 10 ++-- oovbaapi/ooo/vba/excel/XFormat.idl | 2 +- oovbaapi/ooo/vba/excel/XGlobals.idl | 14 ++--- oovbaapi/ooo/vba/excel/XHyperlinks.idl | 10 ++-- oovbaapi/ooo/vba/excel/XRange.idl | 6 +-- oovbaapi/ooo/vba/excel/XWindow.idl | 2 +- oovbaapi/ooo/vba/excel/XWorkbook.idl | 10 ++-- oovbaapi/ooo/vba/excel/XWorksheet.idl | 30 +++++------ oovbaapi/ooo/vba/word/XApplication.idl | 8 +-- oovbaapi/ooo/vba/word/XDocument.idl | 20 +++---- oovbaapi/ooo/vba/word/XGlobals.idl | 8 +-- oovbaapi/ooo/vba/word/XSelection.idl | 4 +- oovbaapi/ooo/vba/word/XTable.idl | 2 +- oovbaapi/ooo/vba/word/XTemplate.idl | 2 +- oovbaapi/ooo/vba/word/XWindow.idl | 2 +- 20 files changed, 72 insertions(+), 216 deletions(-) delete mode 100755 oovbaapi/ooo/vba/XVBAAppService.idl delete mode 100755 oovbaapi/ooo/vba/XVBADocService.idl mode change 100755 => 100644 oovbaapi/ooo/vba/excel/SheetObject.idl mode change 100755 => 100644 oovbaapi/ooo/vba/excel/SheetObjects.idl mode change 100755 => 100644 oovbaapi/ooo/vba/excel/XHyperlinks.idl diff --git a/oovbaapi/ooo/vba/XApplicationBase.idl b/oovbaapi/ooo/vba/XApplicationBase.idl index d9d32e02f2ce..1291276ae643 100644 --- a/oovbaapi/ooo/vba/XApplicationBase.idl +++ b/oovbaapi/ooo/vba/XApplicationBase.idl @@ -49,9 +49,9 @@ interface XApplicationBase void Quit(); - any CommandBars( [in] any aIndex ); - void Run([in] string MacroName, [in] /*Optional*/ any varg1, [in] /*Optional*/ any varg2, [in] /*Optional*/ any varg3, [in] /*Optional*/ any varg4, [in] /*Optional*/ any varg5, [in] /*Optional*/ any varg6, [in] /*Optional*/ any varg7, [in] /*Optional*/ any varg8, [in] /*Optional*/ any varg9, [in] /*Optional*/ any varg10, [in] /*Optional*/ any varg11, [in] /*Optional*/ any varg12, [in] /*Optional*/ any varg13, [in] /*Optional*/ any varg14, [in] /*Optional*/ any varg15, [in] /*Optional*/ any varg16, [in] /*Optional*/ any varg17, [in] /*Optional*/ any varg18, [in] /*Optional*/ any varg19, [in] /*Optional*/ any varg20, [in] /*Optional*/ any varg21, [in] /*Optional*/ any varg22, [in] /*Optional*/ any varg23, [in] /*Optional*/ any varg24, [in] /*Optional*/ any varg25, [in] /*Optional*/ any varg26, [in] /*Optional*/ any varg27, [in] /*Optional*/ any varg28, [in] /*Optional*/ any varg29, [in] /*Optional*/ any varg30); - void OnTime( [in] any aEarliestTime, [in] string aFunction, [in] any aLatestTime, [in] any aSchedule ); + any CommandBars( [in] any Index ); + void Run( [in] string Macro, [in] /*Optional*/ any Arg1, [in] /*Optional*/ any Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30); + void OnTime( [in] any EarliestTime, [in] string Procedure, [in] any LatestTime, [in] any Schedule ); float CentimetersToPoints([in] float Centimeters ); void Undo(); }; diff --git a/oovbaapi/ooo/vba/XVBAAppService.idl b/oovbaapi/ooo/vba/XVBAAppService.idl deleted file mode 100755 index 1c4a0920fbf8..000000000000 --- a/oovbaapi/ooo/vba/XVBAAppService.idl +++ /dev/null @@ -1,72 +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: XWorkbook.idl,v $ - * $Revision: 1.4 $ - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __ooo_vba_appservice_idl__ -#define __ooo_vba_appservice_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include -#endif - -#ifndef __com_sun_star_uno_XComponentContext_idl__ -#include -#endif - -#ifndef __com_sun_star_frame_XModel_idl__ -#include -#endif - -#ifndef __com_sun_star_script_XLibraryContainer_idl__ -#include -#endif - -//============================================================================= - -module ooo { module vba { - -//============================================================================= - - -interface XHelperInterface; -interface XComponentContext; -interface XModel; - -interface XVBAAppService -{ - interface ::com::sun::star::uno::XInterface; - - any getVBE([in] XHelperInterface xParent, [in] ::com::sun::star::uno::XComponentContext xContext, [in] ::com::sun::star::frame::XModel xModel); - any getVBProjects([in] XHelperInterface xParent, [in] ::com::sun::star::uno::XComponentContext xContext, [in] ::com::sun::star::frame::XModel xModel, [in] ::com::sun::star::script::XLibraryContainer xMacroLibraryContainer, [in] com::sun::star::script::XLibraryContainer xDialogLibraryContainer); - - -}; - - }; }; - -#endif diff --git a/oovbaapi/ooo/vba/XVBADocService.idl b/oovbaapi/ooo/vba/XVBADocService.idl deleted file mode 100755 index 6500f028934b..000000000000 --- a/oovbaapi/ooo/vba/XVBADocService.idl +++ /dev/null @@ -1,72 +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: XVBADocService.idl,v $ - * $Revision: 1.4 $ - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __ooo_vba_socservice_idl__ -#define __ooo_vba_appservice_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include -#endif - -#ifndef __com_sun_star_uno_XComponentContext_idl__ -#include -#endif - -#ifndef __com_sun_star_frame_XModel_idl__ -#include -#endif - -#ifndef __com_sun_star_script_XLibraryContainer_idl__ -#include -#endif - -//============================================================================= - -module ooo { module vba { - -//============================================================================= - - -interface XHelperInterface; -interface XComponentContext; -interface XModel; - -interface XVBADocService -{ - interface ::com::sun::star::uno::XInterface; - - - any getVBProject([in] XHelperInterface xParent, [in] ::com::sun::star::uno::XComponentContext xContext, [in] ::com::sun::star::frame::XModel xModel, [in] ::com::sun::star::script::XLibraryContainer xMacroLibraryContainer, [in] com::sun::star::script::XLibraryContainer xDialogLibraryContainer); - - -}; - - }; }; - -#endif diff --git a/oovbaapi/ooo/vba/excel/SheetObject.idl b/oovbaapi/ooo/vba/excel/SheetObject.idl old mode 100755 new mode 100644 index e4037e69b84d..25488470a134 --- a/oovbaapi/ooo/vba/excel/SheetObject.idl +++ b/oovbaapi/ooo/vba/excel/SheetObject.idl @@ -111,7 +111,7 @@ interface XButton : com::sun::star::uno::XInterface [attribute] long Orientation; /** Access to text and text formatting of the button caption. */ - XCharacters Characters( [in] any aStart, [in] any aLength ); + XCharacters Characters( [in] any Start, [in] any Length ); }; //============================================================================= diff --git a/oovbaapi/ooo/vba/excel/SheetObjects.idl b/oovbaapi/ooo/vba/excel/SheetObjects.idl old mode 100755 new mode 100644 index 0339059e1231..5947c52ff4a0 --- a/oovbaapi/ooo/vba/excel/SheetObjects.idl +++ b/oovbaapi/ooo/vba/excel/SheetObjects.idl @@ -81,7 +81,7 @@ interface XGraphicObjects : com::sun::star::uno::XInterface @return The created graphic object. */ - any Add( [in] any fLeft, [in] any fTop, [in] any fWidth, [in] any fHeight ); + any Add( [in] any Left, [in] any Top, [in] any Width, [in] any Height ); }; //============================================================================= @@ -109,7 +109,7 @@ interface XLineObjects : com::sun::star::uno::XInterface @return The created line object. */ - any Add( [in] any fX1, [in] any fY1, [in] any fX2, [in] any fY2 ); + any Add( [in] any X1, [in] any Y1, [in] any X2, [in] any Y2 ); }; //============================================================================= @@ -131,7 +131,7 @@ interface XDrawings : com::sun::star::uno::XInterface @return The created polygon object. */ - any Add( [in] any fX1, [in] any fY1, [in] any fX2, [in] any fY2, [in] any bClosed ); + any Add( [in] any X1, [in] any Y1, [in] any X2, [in] any Y2, [in] any Closed ); }; //============================================================================= diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl b/oovbaapi/ooo/vba/excel/XApplication.idl index 6f513ae64577..5ec821dbe8bb 100644 --- a/oovbaapi/ooo/vba/excel/XApplication.idl +++ b/oovbaapi/ooo/vba/excel/XApplication.idl @@ -73,10 +73,10 @@ interface XApplication string LibraryPath() raises(com::sun::star::script::BasicErrorException); string TemplatesPath() raises(com::sun::star::script::BasicErrorException); string PathSeparator() raises(com::sun::star::script::BasicErrorException); - //any CommandBars( [in] any aIndex ); - any Workbooks( [in] any aIndex ); - any Worksheets( [in] any aIndex ); - any Windows( [in] any aIndex ); + //any CommandBars( [in] any Index ); + any Workbooks( [in] any Index ); + any Worksheets( [in] any Index ); + any Windows( [in] any Index ); any WorksheetFunction(); any Evaluate( [in] string Name ); any Dialogs( [in] any DialogIndex ); @@ -92,7 +92,7 @@ interface XApplication raises(com::sun::star::script::BasicErrorException); void Volatile([in] any Volatile); void DoEvents(); - any Caller( [in] any aIndex ); + any Caller( [in] any Index ); }; }; }; }; diff --git a/oovbaapi/ooo/vba/excel/XFormat.idl b/oovbaapi/ooo/vba/excel/XFormat.idl index 13ac9f177576..65837ce2ffd9 100644 --- a/oovbaapi/ooo/vba/excel/XFormat.idl +++ b/oovbaapi/ooo/vba/excel/XFormat.idl @@ -46,7 +46,7 @@ interface XFormat interface ::ooo::vba::XHelperInterface; // void Clear( ) raises ( com::sun::star::script::BasicErrorException ); - any Borders( [in] any item ) + any Borders( [in] any Item ) raises(com::sun::star::script::BasicErrorException); XFont Font() diff --git a/oovbaapi/ooo/vba/excel/XGlobals.idl b/oovbaapi/ooo/vba/excel/XGlobals.idl index d79196b00927..4c40f8fe087a 100644 --- a/oovbaapi/ooo/vba/excel/XGlobals.idl +++ b/oovbaapi/ooo/vba/excel/XGlobals.idl @@ -65,18 +65,18 @@ interface XGlobals: com::sun::star::uno::XInterface void Calculate() raises(com::sun::star::script::BasicErrorException); XRange Cells([in] any RowIndex, [in] any ColumnIndex); - XRange Columns([in] any aIndex); - any CommandBars( [in] any aIndex ); + XRange Columns([in] any Index); + any CommandBars( [in] any Index ); any Evaluate( [in] string Name ); XRange Intersect([in] XRange Arg1, [in] XRange Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30) raises(com::sun::star::script::BasicErrorException); - any WorkSheets( [in] any aIndex ); - any WorkBooks( [in] any aIndex ); + any WorkSheets( [in] any Index ); + any WorkBooks( [in] any Index ); any WorksheetFunction(); - any Windows( [in] any aIndex ); - any Sheets( [in] any aIndex ); + any Windows( [in] any Index ); + any Sheets( [in] any Index ); any Range( [in] any Cell1, [in] any Cell2 ); - XRange Rows([in] any aIndex); + XRange Rows([in] any Index); any Names( [in] any Index ); XRange Union([in] XRange Arg1, [in] XRange Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30) raises(com::sun::star::script::BasicErrorException); diff --git a/oovbaapi/ooo/vba/excel/XHyperlinks.idl b/oovbaapi/ooo/vba/excel/XHyperlinks.idl old mode 100755 new mode 100644 index dbaab84568e8..58ecf81df744 --- a/oovbaapi/ooo/vba/excel/XHyperlinks.idl +++ b/oovbaapi/ooo/vba/excel/XHyperlinks.idl @@ -47,11 +47,11 @@ interface XHyperlinks // ------------------------------------------------------------------------ XHyperlink Add( - [in] any aAnchor, - [in] any aAddress, - [in] any aSubAddress, - [in] any aScreenTip, - [in] any aTextToDisplay ); + [in] any Anchor, + [in] any Address, + [in] any SubAddress, + [in] any ScreenTip, + [in] any TextToDisplay ); // ------------------------------------------------------------------------ diff --git a/oovbaapi/ooo/vba/excel/XRange.idl b/oovbaapi/ooo/vba/excel/XRange.idl index 3820911f2c96..7e6aba65d34e 100644 --- a/oovbaapi/ooo/vba/excel/XRange.idl +++ b/oovbaapi/ooo/vba/excel/XRange.idl @@ -113,7 +113,7 @@ interface XRange void FillRight(); void FillUp(); void FillDown(); - XRange Item([in] any row, [in] any column) raises(com::sun::star::script::BasicErrorException); + XRange Item([in] any RowIndex, [in] any ColumnIndex) raises(com::sun::star::script::BasicErrorException); XRange Offset([in] any RowOffset, [in] any ColumnOffset); XRange CurrentRegion(); XRange CurrentArray(); @@ -146,7 +146,7 @@ interface XRange XCharacters characters([in] any Start, [in] any Length); void Delete( [in] any Shift ); - any Areas( [in] any item ); + any Areas( [in] any Item ); any BorderAround( [in] any LineStyle, [in] any Weight, [in] any ColorIndex, [in] any Color ); void AutoFilter([in ] any Field, [in] any Criteria1, [in] any Operator, [in] any Criteria2, [in] any VisibleDropDown); void Insert([in] any Shift, [in] any CopyOrigin); @@ -165,7 +165,7 @@ interface XRange void RemoveSubtotal() raises ( com::sun::star::script::BasicErrorException ); void Subtotal( [in] long GroupBy, [in] long Function, [in] /*Optional*/ sequence TotalList, [in] /*Optional*/ any Replace, [in] /*Optional*/ any PageBreaks, [in] any SummaryBelowData ) raises ( com::sun::star::script::BasicErrorException ); XRange MergeArea( ) raises ( com::sun::star::script::BasicErrorException ); - any Hyperlinks( [in] any aIndex ); + any Hyperlinks( [in] any Index ); }; //============================================================================= diff --git a/oovbaapi/ooo/vba/excel/XWindow.idl b/oovbaapi/ooo/vba/excel/XWindow.idl index dde7818ebda7..e22fa9b9e538 100644 --- a/oovbaapi/ooo/vba/excel/XWindow.idl +++ b/oovbaapi/ooo/vba/excel/XWindow.idl @@ -60,7 +60,7 @@ interface XWindow : com::sun::star::uno::XInterface [attribute, readonly] XRange VisibleRange; [attribute] any WindowState; [attribute] any Zoom; - any SelectedSheets( [in] any aIndex ); + any SelectedSheets( [in] any Index ); void SmallScroll( [in] any Down, [in] any Up, [in] any ToRight, [in] any ToLeft ); void LargeScroll( [in] any Down, [in] any Up, [in] any ToRight, [in] any ToLeft ); void ScrollWorkbookTabs( [in] any Sheets, [in] any Position ); diff --git a/oovbaapi/ooo/vba/excel/XWorkbook.idl b/oovbaapi/ooo/vba/excel/XWorkbook.idl index 0c42c6526035..5407dc6d23bd 100644 --- a/oovbaapi/ooo/vba/excel/XWorkbook.idl +++ b/oovbaapi/ooo/vba/excel/XWorkbook.idl @@ -52,14 +52,14 @@ interface XWorkbook : com::sun::star::uno::XInterface [attribute, readonly] string CodeName; [attribute] boolean PrecisionAsDisplayed; - any Worksheets([in] any sheet); - any Styles([in] any Index ); - any Sheets([in] any sheet); - any Windows([in] any index ); + any Worksheets( [in] any Index ); + any Styles( [in] any Index ); + any Sheets( [in] any Index ); + any Windows( [in] any Index ); void ResetColors() raises (com::sun::star::script::BasicErrorException); void Activate(); any Names( [in] any Index ); - any Colors([in] any Index) raises (com::sun::star::script::BasicErrorException); + any Colors( [in] any Index ) raises (com::sun::star::script::BasicErrorException); long FileFormat() raises (com::sun::star::script::BasicErrorException); void SaveCopyAs( [in] string Filename ); }; diff --git a/oovbaapi/ooo/vba/excel/XWorksheet.idl b/oovbaapi/ooo/vba/excel/XWorksheet.idl index b36497599deb..6492a1a573df 100644 --- a/oovbaapi/ooo/vba/excel/XWorksheet.idl +++ b/oovbaapi/ooo/vba/excel/XWorksheet.idl @@ -101,26 +101,26 @@ interface XWorksheet /* The following form control related symbols do not refer to ActiveX form controls embedded in the sheet, but to the old-style drawing controls of Excel. This is an Excel-only feature. */ - any Buttons( [in] any aIndex ); - any CheckBoxes( [in] any aIndex ); - any DropDowns( [in] any aIndex ); - any GroupBoxes( [in] any aIndex ); - any Labels( [in] any aIndex ); - any ListBoxes( [in] any aIndex ); - any OptionButtons( [in] any aIndex ); - any ScrollBars( [in] any aIndex ); - any Spinners( [in] any aIndex ); + any Buttons( [in] any Index ); + any CheckBoxes( [in] any Index ); + any DropDowns( [in] any Index ); + any GroupBoxes( [in] any Index ); + any Labels( [in] any Index ); + any ListBoxes( [in] any Index ); + any OptionButtons( [in] any Index ); + any ScrollBars( [in] any Index ); + any Spinners( [in] any Index ); // FIXME: should prolly inherit from Range somehow... - XRange Cells([in] any RowIndex, [in] any ColumnIndex); - XRange Rows([in] any aIndex); - XRange Columns([in] any aIndex); - any Hyperlinks( [in] any aIndex ); + XRange Cells( [in] any RowIndex, [in] any ColumnIndex ); + XRange Rows( [in] any Index ); + XRange Columns( [in] any Index ); + any Hyperlinks( [in] any Index ); any Names( [in] any Index ); - any Evaluate( [in] string Name); + any Evaluate( [in] string Name ); - void setEnableCalculation([in] boolean EnableCalculation) raises(com::sun::star::script::BasicErrorException); + void setEnableCalculation( [in] boolean EnableCalculation ) raises(com::sun::star::script::BasicErrorException); boolean getEnableCalculation() raises(com::sun::star::script::BasicErrorException); void PrintOut( [in] any From, [in] any To, [in] any Copies, [in] any Preview, [in] any ActivePrinter, [in] any PrintToFile, [in] any Collate, [in] any PrToFileName, [in] any IgnorePrintAreas ); }; diff --git a/oovbaapi/ooo/vba/word/XApplication.idl b/oovbaapi/ooo/vba/word/XApplication.idl index 228401c986e6..542f2efc2a56 100644 --- a/oovbaapi/ooo/vba/word/XApplication.idl +++ b/oovbaapi/ooo/vba/word/XApplication.idl @@ -53,10 +53,10 @@ interface XApplication : com::sun::star::uno::XInterface [attribute] boolean DisplayAutoCompleteTips; [attribute] long EnableCancelKey; - any CommandBars( [in] any aIndex ); - any Documents( [in] any aIndex ); - any Addins( [in] any aIndex ); - any Dialogs( [in] any aIndex ); + any CommandBars( [in] any Index ); + any Documents( [in] any Index ); + any Addins( [in] any Index ); + any Dialogs( [in] any Index ); float CentimetersToPoints([in] float Centimeters ); }; diff --git a/oovbaapi/ooo/vba/word/XDocument.idl b/oovbaapi/ooo/vba/word/XDocument.idl index 0f124e2701d1..b11e627871a8 100644 --- a/oovbaapi/ooo/vba/word/XDocument.idl +++ b/oovbaapi/ooo/vba/word/XDocument.idl @@ -51,16 +51,16 @@ interface XDocument : com::sun::star::script::XInvocation [attribute] any AttachedTemplate; XRange Range( [in] any Start, [in] any End ); - any BuiltInDocumentProperties( [in] any index ); - any CustomDocumentProperties( [in] any index ); - any Bookmarks( [in] any aIndex ); - any Variables( [in] any aIndex ); - any Paragraphs( [in] any aIndex ); - any Styles( [in] any aIndex ); - any Tables( [in] any aIndex ); - any Fields( [in] any aIndex ); - any Shapes([in] any Index); - any Sections([in] any Index); + any BuiltInDocumentProperties( [in] any Index ); + any CustomDocumentProperties( [in] any Index ); + any Bookmarks( [in] any Index ); + any Variables( [in] any Index ); + any Paragraphs( [in] any Index ); + any Styles( [in] any Index ); + any Tables( [in] any Index ); + any Fields( [in] any Index ); + any Shapes( [in] any Index ); + any Sections( [in] any Index ); void Activate(); any PageSetup(); }; diff --git a/oovbaapi/ooo/vba/word/XGlobals.idl b/oovbaapi/ooo/vba/word/XGlobals.idl index 4d92ca378b05..b139819db40e 100644 --- a/oovbaapi/ooo/vba/word/XGlobals.idl +++ b/oovbaapi/ooo/vba/word/XGlobals.idl @@ -45,10 +45,10 @@ interface XGlobals : com::sun::star::uno::XInterface [attribute, readonly] ooo::vba::word::XSystem System; [attribute, readonly] ooo::vba::word::XOptions Options; [attribute, readonly] ooo::vba::word::XSelection Selection; - any CommandBars( [in] any aIndex ); - any Documents( [in] any aIndex ); - any Addins( [in] any aIndex ); - any Dialogs( [in] any aIndex ); + any CommandBars( [in] any Index ); + any Documents( [in] any Index ); + any Addins( [in] any Index ); + any Dialogs( [in] any Index ); float CentimetersToPoints([in] float Centimeters ); }; diff --git a/oovbaapi/ooo/vba/word/XSelection.idl b/oovbaapi/ooo/vba/word/XSelection.idl index daea47bcc625..71fe8f8a5121 100644 --- a/oovbaapi/ooo/vba/word/XSelection.idl +++ b/oovbaapi/ooo/vba/word/XSelection.idl @@ -59,8 +59,8 @@ interface XSelection [attribute] long Start; [attribute] long End; - any Tables( [in] any aIndex ); - any Fields( [in] any aIndex ); + any Tables( [in] any Index ); + any Fields( [in] any Index ); void TypeText( [in] string Text ); void HomeKey( [in] any Unit, [in] any Extend ); void EndKey( [in] any Unit, [in] any Extend ); diff --git a/oovbaapi/ooo/vba/word/XTable.idl b/oovbaapi/ooo/vba/word/XTable.idl index ab985cbb6599..26b125a2c88c 100644 --- a/oovbaapi/ooo/vba/word/XTable.idl +++ b/oovbaapi/ooo/vba/word/XTable.idl @@ -68,7 +68,7 @@ interface XTable XRange ConvertToText([in] any Separator, [in] any NestedTables) raises(com::sun::star::script::BasicErrorException); */ - any Borders( [in] any aIndex ); + any Borders( [in] any Index ); }; diff --git a/oovbaapi/ooo/vba/word/XTemplate.idl b/oovbaapi/ooo/vba/word/XTemplate.idl index b0fda20e45a1..390037719f1e 100644 --- a/oovbaapi/ooo/vba/word/XTemplate.idl +++ b/oovbaapi/ooo/vba/word/XTemplate.idl @@ -43,7 +43,7 @@ interface XTemplate [attribute, readonly] string Name; - any AutoTextEntries( [in] any aIndex ); + any AutoTextEntries( [in] any Index ); }; }; }; }; diff --git a/oovbaapi/ooo/vba/word/XWindow.idl b/oovbaapi/ooo/vba/word/XWindow.idl index e8dfdbdcc653..10d650d6dd6a 100644 --- a/oovbaapi/ooo/vba/word/XWindow.idl +++ b/oovbaapi/ooo/vba/word/XWindow.idl @@ -46,7 +46,7 @@ interface XWindow : com::sun::star::uno::XInterface [attribute] any View; void Activate(); void Close([in] any SaveChanges, [in] any RouteDocument); - any Panes( [in] any aIndex ); // this is a fake api for it seems not support in Write + any Panes( [in] any Index ); // this is a fake api for it seems not support in Write any ActivePane(); // this is a fake api for it seems not support in Write }; From ea2b13e9854aec115fe235b011f55708b948b24f Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 1 Sep 2010 14:32:36 +0200 Subject: [PATCH 092/279] mib19: #163432# on document close the control might be already removed during the call --- vbahelper/source/msforms/vbauserform.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index e10c3a373f94..16bc97babd7d 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -201,11 +201,14 @@ ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::Un uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW ); uno::Reference< awt::XControlContainer > xContainer( m_xDialog, uno::UNO_QUERY_THROW ); uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName ); - ScVbaControlFactory aFac( mxContext, xControl, m_xModel ); - uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( xDialogControl->getModel() ) ); - ScVbaControl* pControl = dynamic_cast< ScVbaControl* >( xVBAControl.get() ); - pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) ); - aResult = uno::makeAny( xVBAControl ); + if ( xControl.is() ) + { + ScVbaControlFactory aFac( mxContext, xControl, m_xModel ); + uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( xDialogControl->getModel() ) ); + ScVbaControl* pControl = dynamic_cast< ScVbaControl* >( xVBAControl.get() ); + pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) ); + aResult = uno::makeAny( xVBAControl ); + } } return aResult; From 2ba44d0e0381bde8b5922bf02b7c586e916cb0cb Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Thu, 2 Sep 2010 08:51:10 +0200 Subject: [PATCH 093/279] mib19: #163214# Special handling for native COM objects in SbxValue::TheRealValue --- basic/source/classes/sbunoobj.cxx | 42 +++++++++++++++++++++++++++---- basic/source/inc/sbunoobj.hxx | 5 +++- basic/source/sbx/sbxvalue.cxx | 10 ++++++-- 3 files changed, 49 insertions(+), 8 deletions(-) mode change 100644 => 100755 basic/source/sbx/sbxvalue.cxx diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 935d6022749a..5227f78566c6 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2273,7 +2273,7 @@ Reference< XInvocation > createDynamicInvocationFor( const Any& aAny ); SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ ) : SbxObject( aName_ ) , bNeedIntrospection( TRUE ) - , bIgnoreNativeCOMObjectMembers( FALSE ) + , bNativeCOMObject( FALSE ) { static Reference< XIntrospection > xIntrospection; @@ -2324,7 +2324,7 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ ) // hiding of equally named COM symbols, e.g. XInvocation::getValue Reference< oleautomation::XAutomationObject > xAutomationObject( aUnoObj_, UNO_QUERY ); if( xAutomationObject.is() ) - bIgnoreNativeCOMObjectMembers = TRUE; + bNativeCOMObject = TRUE; } maTmpUnoObj = aUnoObj_; @@ -2568,7 +2568,7 @@ SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t ) if( !pRes ) { ::rtl::OUString aUName( rName ); - if( mxUnoAccess.is() && !bIgnoreNativeCOMObjectMembers ) + if( mxUnoAccess.is() && !bNativeCOMObject ) { if( mxExactName.is() ) { @@ -2728,11 +2728,11 @@ void SbUnoObject::implCreateAll( void ) // Instrospection besorgen Reference< XIntrospectionAccess > xAccess = mxUnoAccess; - if( !xAccess.is() || bIgnoreNativeCOMObjectMembers ) + if( !xAccess.is() || bNativeCOMObject ) { if( mxInvocation.is() ) xAccess = mxInvocation->getIntrospection(); - else if( bIgnoreNativeCOMObjectMembers ) + else if( bNativeCOMObject ) return; } if( !xAccess.is() ) @@ -4585,3 +4585,35 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP return bSuccess; } + +// Due to an incorrect behavior IE returns an object instead of a string +// in some scenarios. Calling toString at the object may correct this. +// Helper function used in sbxvalue.cxx +bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal ) +{ + bool bSuccess = false; + + SbUnoObject* pUnoObj = NULL; + if( pObj != NULL && (pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)pObj)) != NULL ) + { + // Only for native COM objects + if( pUnoObj->isNativeCOMObject() ) + { + // For now assume success in any case + bSuccess = true; + pVal->PutString( String() ); + + // TODO: Try to find and execute "toString" + //SbxVariableRef pMeth = pObj->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "toString" ) ), SbxCLASS_METHOD ); + //bSuccess = pMeth.Is(); + //if( bSuccess ) + //{ + // SbxValues aRes; + // pMeth->Get( aRes ); + // pVal->Put( aRes ); + //} + } + } + return bSuccess; +} + diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index 78afa9783ca8..d576db0ddab8 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -52,7 +52,7 @@ class SbUnoObject: public SbxObject ::com::sun::star::uno::Reference< ::com::sun::star::beans::XExactName > mxExactName; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XExactName > mxExactNameInvocation; BOOL bNeedIntrospection; - BOOL bIgnoreNativeCOMObjectMembers; + BOOL bNativeCOMObject; ::com::sun::star::uno::Any maTmpUnoObj; // Only to save obj for doIntrospection! // Hilfs-Methode zum Anlegen der dbg_-Properties @@ -84,6 +84,9 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > getInvocation( void ) { return mxInvocation; } void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ); + + bool isNativeCOMObject( void ) + { return bNativeCOMObject; } }; SV_DECL_IMPL_REF(SbUnoObject); diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx old mode 100644 new mode 100755 index 4ea4836b701b..a5e80e8921c6 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -436,6 +436,8 @@ SbxValue* SbxValue::TheRealValue() const } // #55226 Zusaetzliche Info transportieren +bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal ); // sbunoobj.cxx + SbxValue* SbxValue::TheRealValue( BOOL bObjInObjError ) const { SbxValue* p = (SbxValue*) this; @@ -461,8 +463,12 @@ SbxValue* SbxValue::TheRealValue( BOOL bObjInObjError ) const ((SbxValue*) pObj)->aData.eType == SbxOBJECT && ((SbxValue*) pObj)->aData.pObj == pObj ) { - SetError( SbxERR_BAD_PROP_VALUE ); - p = NULL; + bool bSuccess = handleToStringForCOMObjects( pObj, p ); + if( !bSuccess ) + { + SetError( SbxERR_BAD_PROP_VALUE ); + p = NULL; + } } else if( pDflt ) p = pDflt; From 492878bbb84c5012b9d8ad42ce414018a70adfbe Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Thu, 2 Sep 2010 09:04:11 +0200 Subject: [PATCH 094/279] mib19: #163515# Protect StarBASIC::InitAllModules with solar mutex and change handling --- basic/inc/basic/sbmod.hxx | 3 ++- basic/source/classes/sb.cxx | 26 +++++++++++++------------- basic/source/runtime/runtime.cxx | 5 +++-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index 863335926cb6..d9f3fd0cde24 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -44,6 +44,7 @@ class SbProcedureProperty; class SbIfaceMapperMethod; class SbClassModuleObject; +class ModuleInitDependencyMap; struct ClassModuleRunInitItem; struct SbClassData; class SbModuleImpl; @@ -72,7 +73,7 @@ protected: SbxObjectRef pDocObject; // an impl object ( used by Document Modules ) bool bIsProxyModule; - static void implProcessModuleRunInit( ClassModuleRunInitItem& rItem ); + static void implProcessModuleRunInit( ModuleInitDependencyMap& rMap, ClassModuleRunInitItem& rItem ); void StartDefinitions(); SbMethod* GetMethod( const String&, SbxDataType ); SbProperty* GetProperty( const String&, SbxDataType ); diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index fbbf132c07d3..3a9e892ada42 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -954,15 +954,15 @@ struct ClassModuleRunInitItem {} }; -typedef std::hash_map< ::rtl::OUString, ClassModuleRunInitItem, - ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleInitDependencyMap; +// Derive from has_map type instead of typedef +// to allow forward declaration in sbmod.hxx +class ModuleInitDependencyMap : public + std::hash_map< ::rtl::OUString, ClassModuleRunInitItem, + ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > +{}; -static ModuleInitDependencyMap* GpMIDMap = NULL; - -void SbModule::implProcessModuleRunInit( ClassModuleRunInitItem& rItem ) +void SbModule::implProcessModuleRunInit( ModuleInitDependencyMap& rMap, ClassModuleRunInitItem& rItem ) { - ModuleInitDependencyMap& rMIDMap = *GpMIDMap; - rItem.m_bProcessing = true; //bool bAnyDependencies = true; @@ -977,8 +977,8 @@ void SbModule::implProcessModuleRunInit( ClassModuleRunInitItem& rItem ) String& rStr = *it; // Is required type a class module? - ModuleInitDependencyMap::iterator itFind = rMIDMap.find( rStr ); - if( itFind != rMIDMap.end() ) + ModuleInitDependencyMap::iterator itFind = rMap.find( rStr ); + if( itFind != rMap.end() ) { ClassModuleRunInitItem& rParentItem = itFind->second; if( rParentItem.m_bProcessing ) @@ -989,7 +989,7 @@ void SbModule::implProcessModuleRunInit( ClassModuleRunInitItem& rItem ) } if( !rParentItem.m_bRunInitDone ) - implProcessModuleRunInit( rParentItem ); + implProcessModuleRunInit( rMap, rParentItem ); } } } @@ -1003,6 +1003,8 @@ void SbModule::implProcessModuleRunInit( ClassModuleRunInitItem& rItem ) // Run Init-Code of all modules (including inserted libraries) void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) { + NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() ); + // Init own modules for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) { @@ -1017,7 +1019,6 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) // Consider required types to init in right order. Class modules // that are required by other modules have to be initialized first. ModuleInitDependencyMap aMIDMap; - GpMIDMap = &aMIDMap; for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) { SbModule* pModule = (SbModule*)pModules->Get( nMod ); @@ -1030,9 +1031,8 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) for( it = aMIDMap.begin() ; it != aMIDMap.end(); ++it ) { ClassModuleRunInitItem& rItem = it->second; - SbModule::implProcessModuleRunInit( rItem ); + SbModule::implProcessModuleRunInit( aMIDMap, rItem ); } - GpMIDMap = NULL; // Call RunInit on standard modules for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 1bb6fb82e113..06d0fab1e59a 100755 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -890,11 +890,12 @@ void SbiRuntime::Error( SbError _errCode, const String& _details ) { if ( _errCode ) { - OSL_ENSURE( pInst->pRun == this, "SbiRuntime::Error: can't propagate the error message details!" ); + // Not correct for class module usage, remove for now + //OSL_ENSURE( pInst->pRun == this, "SbiRuntime::Error: can't propagate the error message details!" ); if ( pInst->pRun == this ) { pInst->Error( _errCode, _details ); - OSL_POSTCOND( nError == _errCode, "SbiRuntime::Error: the instance is expecte to propagate the error code back to me!" ); + //OSL_POSTCOND( nError == _errCode, "SbiRuntime::Error: the instance is expecte to propagate the error code back to me!" ); } else { From a3b8ba9084333aa7d6ca304dc9a51d089831b6eb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 2 Sep 2010 13:38:53 +0200 Subject: [PATCH 095/279] dba34a: #i111379# don't throw exceptions in the header, move this to the CXX --- sfx2/inc/sfx2/sfxbasemodel.hxx | 7 ++----- sfx2/source/doc/sfxbasemodel.cxx | 13 ++++++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx index 578dd1fd33bb..00ee49a18004 100644 --- a/sfx2/inc/sfx2/sfxbasemodel.hxx +++ b/sfx2/inc/sfx2/sfxbasemodel.hxx @@ -1484,8 +1484,8 @@ public: */ SAL_DLLPRIVATE sal_Bool impl_isDisposed() const ; - sal_Bool IsDisposed() const ; sal_Bool IsInitialized() const; + void MethodEntryCheck( const bool i_mustBeInitialized ) const; ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData() throw (::com::sun::star::uno::RuntimeException); void SAL_CALL setViewData( const ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess >& aData ) throw (::com::sun::star::uno::RuntimeException); @@ -1573,10 +1573,7 @@ public: SfxModelGuard( SfxBaseModel& i_rModel, const AllowedModelState i_eState = E_FULLY_ALIVE ) :m_aGuard( Application::GetSolarMutex() ) { - if ( i_rModel.IsDisposed() ) - throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(), *&i_rModel ); - if ( ( i_eState != E_INITIALIZING ) && !i_rModel.IsInitialized() ) - throw ::com::sun::star::lang::NotInitializedException( ::rtl::OUString(), *&i_rModel ); + i_rModel.MethodEntryCheck( i_eState != E_INITIALIZING ); } ~SfxModelGuard() { diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 7ef9fe0d2f19..929fc02ca8d5 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2598,11 +2598,6 @@ SfxObjectShell* SfxBaseModel::impl_getObjectShell() const // public impl. //________________________________________________________________________________________________________ -sal_Bool SfxBaseModel::IsDisposed() const -{ - return ( m_pData == NULL ) ; -} - sal_Bool SfxBaseModel::IsInitialized() const { if ( !m_pData || !m_pData->m_pObjectShell ) @@ -2614,6 +2609,14 @@ sal_Bool SfxBaseModel::IsInitialized() const return m_pData->m_pObjectShell->GetMedium() != NULL; } +void SfxBaseModel::MethodEntryCheck( const bool i_mustBeInitialized ) const +{ + if ( impl_isDisposed() ) + throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(), *const_cast< SfxBaseModel* >( this ) ); + if ( i_mustBeInitialized && !IsInitialized() ) + throw ::com::sun::star::lang::NotInitializedException( ::rtl::OUString(), *const_cast< SfxBaseModel* >( this ) ); +} + sal_Bool SfxBaseModel::impl_isDisposed() const { return ( m_pData == NULL ) ; From e02ccd1ae444b8bd21e963adc9f368c462fc3609 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Thu, 2 Sep 2010 15:13:41 +0200 Subject: [PATCH 096/279] gnumake2: move make 3.81 check into configure --- framework/Makefile | 4 ---- sfx2/Makefile | 4 ---- xmloff/Makefile | 4 ---- 3 files changed, 12 deletions(-) diff --git a/framework/Makefile b/framework/Makefile index 3225bc97e12c..c19100ee9a5b 100644 --- a/framework/Makefile +++ b/framework/Makefile @@ -25,10 +25,6 @@ # #************************************************************************* -ifneq ($(MAKE_VERSION),3.81) -$(error You need at least GNU Make 3.81!) -endif - ifeq ($(strip $(SOLARENV)),) $(error No environment set!) endif diff --git a/sfx2/Makefile b/sfx2/Makefile index 3225bc97e12c..c19100ee9a5b 100644 --- a/sfx2/Makefile +++ b/sfx2/Makefile @@ -25,10 +25,6 @@ # #************************************************************************* -ifneq ($(MAKE_VERSION),3.81) -$(error You need at least GNU Make 3.81!) -endif - ifeq ($(strip $(SOLARENV)),) $(error No environment set!) endif diff --git a/xmloff/Makefile b/xmloff/Makefile index 3225bc97e12c..c19100ee9a5b 100644 --- a/xmloff/Makefile +++ b/xmloff/Makefile @@ -25,10 +25,6 @@ # #************************************************************************* -ifneq ($(MAKE_VERSION),3.81) -$(error You need at least GNU Make 3.81!) -endif - ifeq ($(strip $(SOLARENV)),) $(error No environment set!) endif From 1ceeac4ca836372279a0eea26e32959dce327ebf Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 2 Sep 2010 18:58:54 +0200 Subject: [PATCH 097/279] pl08: #i114277# enhance SfxPasswordDialog --- sfx2/inc/sfx2/passwd.hxx | 22 +++-- sfx2/source/dialog/passwd.cxx | 179 +++++++++++++++++++++------------- sfx2/source/dialog/passwd.hrc | 5 +- sfx2/source/dialog/passwd.src | 30 +++++- 4 files changed, 157 insertions(+), 79 deletions(-) diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx index 4f4a04834257..19053aa96f97 100644 --- a/sfx2/inc/sfx2/passwd.hxx +++ b/sfx2/inc/sfx2/passwd.hxx @@ -39,29 +39,35 @@ // defines --------------------------------------------------------------- -#define SHOWEXTRAS_NONE ((USHORT)0x0000) -#define SHOWEXTRAS_USER ((USHORT)0x0001) -#define SHOWEXTRAS_CONFIRM ((USHORT)0x0002) -#define SHOWEXTRAS_ALL ((USHORT)(SHOWEXTRAS_USER | SHOWEXTRAS_CONFIRM)) +#define SHOWEXTRAS_NONE ((USHORT)0x0000) +#define SHOWEXTRAS_USER ((USHORT)0x0001) +#define SHOWEXTRAS_CONFIRM ((USHORT)0x0002) +#define SHOWEXTRAS_PASSWORD2 ((USHORT)0x0004) +#define SHOWEXTRAS_CONFIRM2 ((USHORT)0x0008) +#define SHOWEXTRAS_ALL ((USHORT)(SHOWEXTRAS_USER | SHOWEXTRAS_CONFIRM)) // class SfxPasswordDialog ----------------------------------------------- class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog { private: + FixedLine maPasswordBox; FixedText maUserFT; Edit maUserED; FixedText maPasswordFT; Edit maPasswordED; FixedText maConfirmFT; Edit maConfirmED; - FixedLine maPasswordBox; + FixedLine maPassword2Box; + FixedText maPassword2FT; + Edit maPassword2ED; + FixedText maConfirm2FT; + Edit maConfirm2ED; OKButton maOKBtn; CancelButton maCancelBtn; HelpButton maHelpBtn; - String maConfirmStr; USHORT mnMinLen; USHORT mnExtras; @@ -76,6 +82,10 @@ public: String GetPassword() const { return maPasswordED.GetText(); } String GetConfirm() const { return maConfirmED.GetText(); } + String GetPassword2() const { return maPassword2ED.GetText(); } + String GetConfirm2() const { return maConfirm2ED.GetText(); } + void SetGroup2Text( const String& i_rText ) { maPassword2Box.SetText( i_rText ); } + void SetMinLen( USHORT Len ); void SetMaxLen( USHORT Len ); void SetEditHelpId( ULONG nId ) { maPasswordED.SetHelpId( nId ); } diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index e7cc73ca04bf..52c6acedd4ea 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -41,14 +41,15 @@ #include "passwd.hrc" #include "vcl/sound.hxx" +#include "vcl/arrange.hxx" // ----------------------------------------------------------------------- -IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) +IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, pEdit ) { - if( mbAsciiOnly ) + if( mbAsciiOnly && (pEdit == &maPasswordED || pEdit == &maPassword2ED) ) { - rtl::OUString aTest( maPasswordED.GetText() ); + rtl::OUString aTest( pEdit->GetText() ); const sal_Unicode* pTest = aTest.getStr(); sal_Int32 nLen = aTest.getLength(); rtl::OUStringBuffer aFilter( nLen ); @@ -64,12 +65,15 @@ IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) if( bReset ) { Sound::Beep( SOUND_ERROR ); - maPasswordED.SetSelection( Selection( 0, nLen ) ); - maPasswordED.ReplaceSelected( aFilter.makeStringAndClear() ); + pEdit->SetSelection( Selection( 0, nLen ) ); + pEdit->ReplaceSelected( aFilter.makeStringAndClear() ); } } - maOKBtn.Enable( maPasswordED.GetText().Len() >= mnMinLen ); + bool bEnable = maPasswordED.GetText().Len() >= mnMinLen; + if( maPassword2ED.IsVisible() ) + bEnable = (bEnable && (maPassword2ED.GetText().Len() >= mnMinLen)); + maOKBtn.Enable( bEnable ); return 0; } IMPL_LINK_INLINE_END( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) @@ -78,8 +82,11 @@ IMPL_LINK_INLINE_END( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) IMPL_LINK( SfxPasswordDialog, OKHdl, OKButton *, EMPTYARG ) { - if ( ( ( mnExtras & SHOWEXTRAS_CONFIRM ) == SHOWEXTRAS_CONFIRM ) && - ( GetConfirm() != GetPassword() ) ) + bool bConfirmFailed = ( ( mnExtras & SHOWEXTRAS_CONFIRM ) == SHOWEXTRAS_CONFIRM ) && + ( GetConfirm() != GetPassword() ); + if( ( mnExtras & SHOWEXTRAS_CONFIRM2 ) == SHOWEXTRAS_CONFIRM2 && ( GetConfirm2() != GetPassword2() ) ) + bConfirmFailed = true; + if ( bConfirmFailed ) { ErrorBox aBox( this, SfxResId( MSG_ERROR_WRONG_CONFIRM ) ); aBox.Execute(); @@ -97,27 +104,83 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText ModalDialog( pParent, SfxResId ( DLG_PASSWD ) ), + maPasswordBox ( this, SfxResId( GB_PASSWD_PASSWORD ) ), maUserFT ( this, SfxResId( FT_PASSWD_USER ) ), maUserED ( this, SfxResId( ED_PASSWD_USER ) ), maPasswordFT ( this, SfxResId( FT_PASSWD_PASSWORD ) ), maPasswordED ( this, SfxResId( ED_PASSWD_PASSWORD ) ), maConfirmFT ( this, SfxResId( FT_PASSWD_CONFIRM ) ), maConfirmED ( this, SfxResId( ED_PASSWD_CONFIRM ) ), - maPasswordBox ( this, SfxResId( GB_PASSWD_PASSWORD ) ), + maPassword2Box ( this, 0 ), + maPassword2FT ( this, SfxResId( FT_PASSWD_PASSWORD2 ) ), + maPassword2ED ( this, SfxResId( ED_PASSWD_PASSWORD2 ) ), + maConfirm2FT ( this, SfxResId( FT_PASSWD_CONFIRM2 ) ), + maConfirm2ED ( this, SfxResId( ED_PASSWD_CONFIRM2 ) ), maOKBtn ( this, SfxResId( BTN_PASSWD_OK ) ), maCancelBtn ( this, SfxResId( BTN_PASSWD_CANCEL ) ), maHelpBtn ( this, SfxResId( BTN_PASSWD_HELP ) ), - maConfirmStr ( SfxResId( STR_PASSWD_CONFIRM ) ), - mnMinLen ( 5 ), + mnMinLen ( 1 ), mnExtras ( 0 ), mbAsciiOnly ( false ) { FreeResource(); + // setup layout + boost::shared_ptr xLayout = + boost::dynamic_pointer_cast( getLayout() ); + xLayout->setOuterBorder( 0 ); + + // get edit size, should be used as minimum + Size aEditSize( maUserED.GetSizePixel() ); + + // add labelcolumn for the labeled edit fields + boost::shared_ptr xEdits( new vcl::LabelColumn( xLayout.get() ) ); + size_t nChildIndex = xLayout->addChild( xEdits ); + xLayout->setBorders( nChildIndex, -2, -2, -2, 0 ); + + // add group box + xEdits->addWindow( &maPasswordBox ); + + // add user line + xEdits->addRow( &maUserFT, &maUserED, -2, aEditSize ); + + // add password line + xEdits->addRow( &maPasswordFT, &maPasswordED, -2, aEditSize ); + + // add confirm line + xEdits->addRow( &maConfirmFT, &maConfirmED, -2, aEditSize ); + + // add second group box + xEdits->addWindow( &maPassword2Box ); + + // add second password line + xEdits->addRow( &maPassword2FT, &maPassword2ED, -2, aEditSize ); + + // add second confirm line + xEdits->addRow( &maConfirm2FT, &maConfirm2ED, -2, aEditSize ); + + // add a FixedLine + FixedLine* pLine = new FixedLine( this, 0 ); + pLine->Show(); + addWindow( pLine, true ); + xLayout->addWindow( pLine ); + + // add button column + Size aBtnSize( maCancelBtn.GetSizePixel() ); + boost::shared_ptr xButtons( new vcl::RowOrColumn( xLayout.get(), false ) ); + nChildIndex = xLayout->addChild( xButtons ); + xLayout->setBorders( nChildIndex, -2, 0, -2, -2 ); + + size_t nBtnIndex = xButtons->addWindow( &maHelpBtn, 0, aBtnSize ); + xButtons->addChild( new vcl::Spacer( xButtons.get() ) ); + nBtnIndex = xButtons->addWindow( &maOKBtn, 0, aBtnSize ); + nBtnIndex = xButtons->addWindow( &maCancelBtn, 0, aBtnSize ); + Link aLink = LINK( this, SfxPasswordDialog, EditModifyHdl ); maPasswordED.SetModifyHdl( aLink ); + maPassword2ED.SetModifyHdl( aLink ); aLink = LINK( this, SfxPasswordDialog, OKHdl ); maOKBtn.SetClickHdl( aLink ); @@ -146,65 +209,45 @@ void SfxPasswordDialog::SetMaxLen( USHORT nLen ) short SfxPasswordDialog::Execute() { - if ( mnExtras < SHOWEXTRAS_ALL ) + maUserFT.Hide(); + maUserED.Hide(); + maConfirmFT.Hide(); + maConfirmED.Hide(); + maPasswordFT.Hide(); + maPassword2Box.Hide(); + maPassword2FT.Hide(); + maPassword2ED.Hide(); + maPassword2FT.Hide(); + maConfirm2FT.Hide(); + maConfirm2ED.Hide(); + + if( mnExtras != SHOWEXTRAS_NONE ) + maPasswordFT.Show(); + if( (mnExtras & SHOWEXTRAS_USER ) ) { - Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT ); - Size a6Size = LogicToPixel( Size( 6, 6 ), MAP_APPFONT ); - long nMinHeight = maHelpBtn.GetPosPixel().Y() + - maHelpBtn.GetSizePixel().Height() + a6Size.Height(); - USHORT nRowHided = 1; - - if ( SHOWEXTRAS_NONE == mnExtras ) - { - maUserFT.Hide(); - maUserED.Hide(); - maConfirmFT.Hide(); - maConfirmED.Hide(); - maPasswordFT.Hide(); - - Point aPos = maUserFT.GetPosPixel(); - long nEnd = maUserED.GetPosPixel().X() + maUserED.GetSizePixel().Width(); - maPasswordED.SetPosPixel( aPos ); - Size aSize = maPasswordED.GetSizePixel(); - aSize.Width() = nEnd - aPos.X(); - maPasswordED.SetSizePixel( aSize ); - - nRowHided = 2; - } - else if ( SHOWEXTRAS_USER == mnExtras ) - { - maConfirmFT.Hide(); - maConfirmED.Hide(); - } - else if ( SHOWEXTRAS_CONFIRM == mnExtras ) - { - maUserFT.Hide(); - maUserED.Hide(); - - Point aPwdPos1 = maPasswordFT.GetPosPixel(); - Point aPwdPos2 = maPasswordED.GetPosPixel(); - - Point aPos = maUserFT.GetPosPixel(); - maPasswordFT.SetPosPixel( aPos ); - aPos = maUserED.GetPosPixel(); - maPasswordED.SetPosPixel( aPos ); - - maConfirmFT.SetPosPixel( aPwdPos1 ); - maConfirmED.SetPosPixel( aPwdPos2 ); - } - - Size aBoxSize = maPasswordBox.GetSizePixel(); - aBoxSize.Height() -= ( nRowHided * maUserED.GetSizePixel().Height() ); - aBoxSize.Height() -= ( nRowHided * a3Size.Height() ); - maPasswordBox.SetSizePixel( aBoxSize ); - - long nDlgHeight = maPasswordBox.GetPosPixel().Y() + aBoxSize.Height() + a6Size.Height(); - if ( nDlgHeight < nMinHeight ) - nDlgHeight = nMinHeight; - Size aDlgSize = GetOutputSizePixel(); - aDlgSize.Height() = nDlgHeight; - SetOutputSizePixel( aDlgSize ); + maUserFT.Show(); + maUserED.Show(); } + if( (mnExtras & SHOWEXTRAS_CONFIRM ) ) + { + maConfirmFT.Show(); + maConfirmED.Show(); + } + if( (mnExtras & SHOWEXTRAS_PASSWORD2) ) + { + maPassword2Box.Show(); + maPassword2FT.Show(); + maPassword2ED.Show(); + } + if( (mnExtras & SHOWEXTRAS_CONFIRM2 ) ) + { + maConfirm2FT.Show(); + maConfirm2ED.Show(); + } + + boost::shared_ptr xLayout = + boost::dynamic_pointer_cast( getLayout() ); + SetSizePixel( xLayout->getOptimalSize( WINDOWSIZE_PREFERRED ) ); return ModalDialog::Execute(); } diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc index 5be0446fd752..5c9b07c7a130 100644 --- a/sfx2/source/dialog/passwd.hrc +++ b/sfx2/source/dialog/passwd.hrc @@ -41,7 +41,10 @@ #define BTN_PASSWD_CANCEL 21 #define BTN_PASSWD_HELP 22 -#define STR_PASSWD_CONFIRM 30 +#define FT_PASSWD_PASSWORD2 25 +#define ED_PASSWD_PASSWORD2 26 +#define FT_PASSWD_CONFIRM2 27 +#define ED_PASSWD_CONFIRM2 28 #endif diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src index fc58ecfda219..37d23ca48b01 100644 --- a/sfx2/source/dialog/passwd.src +++ b/sfx2/source/dialog/passwd.src @@ -83,6 +83,32 @@ ModalDialog DLG_PASSWD Size = MAP_APPFONT( 132, 8 ); Text [ en-US ] = "Password" ; }; + FixedText FT_PASSWD_PASSWORD2 + { + Pos = MAP_APPFONT( 12, 30 ); + Size = MAP_APPFONT( 42, 10 ); + Text [ en-US ] = "P~assword"; + }; + Edit ED_PASSWD_PASSWORD2 + { + Border = TRUE; + PassWord = TRUE; + Pos = MAP_APPFONT( 57, 29 ); + Size = MAP_APPFONT( 75, 12 ); + }; + FixedText FT_PASSWD_CONFIRM2 + { + Pos = MAP_APPFONT( 12, 45 ); + Size = MAP_APPFONT( 42, 10 ); + Text [ en-US ] = "Confir~m"; + }; + Edit ED_PASSWD_CONFIRM2 + { + Border = TRUE; + PassWord = TRUE; + Pos = MAP_APPFONT( 57, 44 ); + Size = MAP_APPFONT( 75, 12 ); + }; OKButton BTN_PASSWD_OK { Disable = TRUE; @@ -100,10 +126,6 @@ ModalDialog DLG_PASSWD Pos = MAP_APPFONT( 144, 43 ); Size = MAP_APPFONT( 50, 14 ); }; - String STR_PASSWD_CONFIRM - { - Text [ en-US ] = "Confirm password" ; - }; }; // ********************************************************************** EOF From 6802fcb9599b37cafa78d244e3387a2263de06d5 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Fri, 3 Sep 2010 08:13:50 +0200 Subject: [PATCH 098/279] mib19: #163497# Named parameter support for default properties --- basic/source/runtime/step2.cxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 58713ba1438f..dd511a2dfe10 100755 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -407,6 +407,34 @@ void SbiRuntime::SetupArgs( SbxVariable* p, UINT32 nOp1 ) } } } + else if( bVBAEnabled && p->GetType() == SbxOBJECT && (!p->ISA(SbxMethod) || !p->IsBroadcaster()) ) + { + // Check for default method with named parameters + SbxBaseRef pObj = (SbxBase*)p->GetObject(); + if( pObj && pObj->ISA(SbUnoObject) ) + { + SbUnoObject* pUnoObj = (SbUnoObject*)(SbxBase*)pObj; + Any aAny = pUnoObj->getUnoAny(); + + if( aAny.getValueType().getTypeClass() == TypeClass_INTERFACE ) + { + Reference< XInterface > x = *(Reference< XInterface >*)aAny.getValue(); + Reference< XDefaultMethod > xDfltMethod( x, UNO_QUERY ); + + rtl::OUString sDefaultMethod; + if ( xDfltMethod.is() ) + sDefaultMethod = xDfltMethod->getDefaultMethodName(); + if ( sDefaultMethod.getLength() ) + { + SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD ); + if( meth != NULL ) + pInfo = meth->GetInfo(); + if( pInfo ) + bError_ = false; + } + } + } + } if( bError_ ) Error( SbERR_NO_NAMED_ARGS ); } From 42b0162ab9ec29c3e284d399c8a9f17a9956c94b Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 3 Sep 2010 13:52:32 +0200 Subject: [PATCH 099/279] mib19: #164517# support COM collections in 'for each' --- basic/source/runtime/comenumwrapper.cxx | 80 +++++++++++++++++++++++++ basic/source/runtime/comenumwrapper.hxx | 54 +++++++++++++++++ basic/source/runtime/makefile.mk | 1 + basic/source/runtime/runtime.cxx | 18 ++++++ 4 files changed, 153 insertions(+) create mode 100644 basic/source/runtime/comenumwrapper.cxx create mode 100644 basic/source/runtime/comenumwrapper.hxx diff --git a/basic/source/runtime/comenumwrapper.cxx b/basic/source/runtime/comenumwrapper.cxx new file mode 100644 index 000000000000..cbf0507f1b26 --- /dev/null +++ b/basic/source/runtime/comenumwrapper.cxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "comenumwrapper.hxx" + +using namespace ::com::sun::star; + +::sal_Bool SAL_CALL ComEnumerationWrapper::hasMoreElements() + throw ( uno::RuntimeException ) +{ + sal_Bool bResult = sal_False; + + try + { + if ( m_xInvocation.is() ) + { + sal_Int32 nLength = 0; + bResult = + ( ( m_xInvocation->getValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "length" ) ) ) >>= nLength ) + && nLength > m_nCurInd ); + } + } + catch( uno::Exception& ) + {} + + return bResult; +} + +uno::Any SAL_CALL ComEnumerationWrapper::nextElement() + throw ( container::NoSuchElementException, + lang::WrappedTargetException, + uno::RuntimeException ) +{ + try + { + if ( m_xInvocation.is() ) + { + uno::Sequence< sal_Int16 > aNamedParamIndex; + uno::Sequence< uno::Any > aNamedParam; + uno::Sequence< uno::Any > aArgs( 1 ); + + aArgs[0] <<= m_nCurInd++; + + return m_xInvocation->invoke( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "item" ) ), + aArgs, + aNamedParamIndex, + aNamedParam ); + } + } + catch( uno::Exception& ) + {} + + throw container::NoSuchElementException(); +} + + diff --git a/basic/source/runtime/comenumwrapper.hxx b/basic/source/runtime/comenumwrapper.hxx new file mode 100644 index 000000000000..b2464d686f67 --- /dev/null +++ b/basic/source/runtime/comenumwrapper.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _COMENUMWRAPPER_HXX +#define _COMENUMWRAPPER_HXX + +#include +#include + +#include + +class ComEnumerationWrapper : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XEnumeration > +{ + ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > m_xInvocation; + sal_Int32 m_nCurInd; + +public: + ComEnumerationWrapper( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation >& xInvocation ) + : m_xInvocation( xInvocation ) + , m_nCurInd( 0 ) + { + } + + // container::XEnumeration + virtual ::sal_Bool SAL_CALL hasMoreElements() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement() throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); +}; + +#endif // _COMENUMWRAPPER_HXX + diff --git a/basic/source/runtime/makefile.mk b/basic/source/runtime/makefile.mk index f2ed11196b28..8ca052aaae1a 100644 --- a/basic/source/runtime/makefile.mk +++ b/basic/source/runtime/makefile.mk @@ -41,6 +41,7 @@ ENABLE_EXCEPTIONS = TRUE SLOFILES= \ $(SLO)$/basrdll.obj \ + $(SLO)$/comenumwrapper.obj \ $(SLO)$/inputbox.obj \ $(SLO)$/runtime.obj \ $(SLO)$/step0.obj \ diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 06d0fab1e59a..62aa639e4c7e 100755 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -45,6 +45,7 @@ #include "sbunoobj.hxx" #include "errobject.hxx" #include "sbtrace.hxx" +#include "comenumwrapper.hxx" using namespace ::com::sun::star; @@ -1177,6 +1178,23 @@ void SbiRuntime::PushForEach() p->xEnumeration = xEnumerationAccess->createEnumeration(); p->eForType = FOR_EACH_XENUMERATION; } + else if ( isVBAEnabled() && pUnoObj->isNativeCOMObject() ) + { + uno::Reference< script::XInvocation > xInvocation; + if ( ( aAny >>= xInvocation ) && xInvocation.is() ) + { + try + { + p->xEnumeration = new ComEnumerationWrapper( xInvocation ); + p->eForType = FOR_EACH_XENUMERATION; + } + catch( uno::Exception& ) + {} + } + + if ( !p->xEnumeration.is() ) + bError_ = true; + } else { bError_ = true; From 2111d3ed1a9eac5e0055cf6fcfa8ff2426cf3b58 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 3 Sep 2010 17:53:47 +0200 Subject: [PATCH 100/279] dba34a: removed SvLBox'es (and friends) Set/GetWindowBits. They were used in parallel to Window's Set/GetStyle, with WB_* values which overlapped with existing (generic) WB_* bits. Since this overlapping has been removed, there's no need to have both Style and WindowBits at those classes. Should remove some source of confusion and error (and, well, perhaps introduce some new errors :) ). --- formula/source/ui/dlg/structpg.cxx | 2 +- sfx2/source/appl/newhelp.cxx | 2 +- sfx2/source/dialog/templdlg.cxx | 4 ++-- sfx2/source/dialog/versdlg.cxx | 2 +- svx/source/dialog/simptabl.cxx | 1 - svx/source/form/datanavi.cxx | 2 +- .../textconversiondlgs/chinese_dictionarydialog.cxx | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx index 3c7da5a3f8b0..3f86b4ba21eb 100644 --- a/formula/source/ui/dlg/structpg.cxx +++ b/formula/source/ui/dlg/structpg.cxx @@ -112,7 +112,7 @@ StructPage::StructPage(Window* pParent): maImgErrorHC ( ModuleRes( BMP_STR_ERROR_H ) ), pSelectedToken ( NULL ) { - aTlbStruct.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN| + aTlbStruct.SetStyle(aTlbStruct.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN| WB_HASBUTTONS|WB_HSCROLL|WB_NOINITIALSELECTION); aTlbStruct.SetNodeDefaultImages(); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 597509cf34bd..761da1369caa 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -300,7 +300,7 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId ) aDocumentImage = Image( SfxResId( IMG_HELP_CONTENT_DOC_HC ) ); } - SetWindowBits( WB_HIDESELECTION | WB_HSCROLL ); + SetStyle( GetStyle() | WB_HIDESELECTION | WB_HSCROLL ); SetEntryHeight( 16 ); SetSelectionMode( SINGLE_SELECTION ); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 9edeb05b43ac..e3edcecfb386 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -780,7 +780,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx { aFmtLb.SetHelpId( HID_TEMPLATE_FMT ); aFilterLb.SetHelpId( HID_TEMPLATE_FILTER ); - aFmtLb.SetWindowBits( WB_SORT | WB_HIDESELECTION ); + aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT | WB_HIDESELECTION ); Font aFont = aFmtLb.GetFont(); aFont.SetWeight( WEIGHT_NORMAL ); aFmtLb.SetFont( aFont ); @@ -823,7 +823,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod bBindingUpdate ( TRUE ) { - aFmtLb.SetWindowBits( WB_SORT ); + aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT ); } //------------------------------------------------------------------------- diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index beb43c192810..8e440de0757c 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -239,7 +239,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, BOOL bIsSaveVersion aVersionBox.SetDoubleClickHdl( LINK( this, SfxVersionDialog, DClickHdl_Impl ) ); aVersionBox.GrabFocus(); - aVersionBox.SetWindowBits( WB_HSCROLL | WB_CLIPCHILDREN ); + aVersionBox.SetStyle( aVersionBox.GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN ); aVersionBox.SetSelectionMode( SINGLE_SELECTION ); aVersionBox.SetTabs( &nTabs_Impl[0], MAP_APPFONT ); aVersionBox.Resize(); // OS: Hack fuer richtige Selektion diff --git a/svx/source/dialog/simptabl.cxx b/svx/source/dialog/simptabl.cxx index ab5533513000..0545161e858d 100644 --- a/svx/source/dialog/simptabl.cxx +++ b/svx/source/dialog/simptabl.cxx @@ -152,7 +152,6 @@ SvxSimpleTable::SvxSimpleTable( Window* pParent,const ResId& rResId): InitHeaderBar( &aHeaderBar ); aHeaderBar.Show(); - SetWindowBits(WB_CLIPCHILDREN | WB_HSCROLL); SvHeaderTabListBox::Show(); } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 8ce3d6e7ba7c..9412c715b2b5 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -352,7 +352,7 @@ namespace svxform WinBits nBits = WB_BORDER | WB_TABSTOP | WB_HIDESELECTION | WB_NOINITIALSELECTION; if ( DGTInstance == m_eGroup || DGTSubmission == m_eGroup ) nBits |= WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT; - m_aItemList.SetWindowBits( m_aItemList.GetStyle() | nBits ); + m_aItemList.SetStyle( m_aItemList.GetStyle() | nBits ); m_aItemList.Show(); ItemSelectHdl( &m_aItemList ); } diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index dda324cb98d1..4b9e68650180 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -116,7 +116,7 @@ String DictionaryList::makeTabString( const DictionaryEntry& rEntry ) const void DictionaryList::initDictionaryControl( const Reference< linguistic2::XConversionDictionary>& xDictionary , ListBox* pPropertyTypeNameListBox ) { - SetWindowBits( WB_VSCROLL ); + SetStyle( WB_VSCROLL | WB_TABSTOP ); SetSelectionMode( SINGLE_SELECTION ); SetBorderStyle( WINDOW_BORDER_MONO ); SetHighlightRange(); From d773e25dddb89d45b46e6c47a7028e4d7057fc93 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Mon, 6 Sep 2010 08:22:40 +0200 Subject: [PATCH 101/279] mib19: #164517# Add precompiled_basic.hxx --- basic/source/runtime/comenumwrapper.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/basic/source/runtime/comenumwrapper.cxx b/basic/source/runtime/comenumwrapper.cxx index cbf0507f1b26..ba3def41838f 100644 --- a/basic/source/runtime/comenumwrapper.cxx +++ b/basic/source/runtime/comenumwrapper.cxx @@ -25,6 +25,7 @@ * ************************************************************************/ +#include "precompiled_basic.hxx" #include "comenumwrapper.hxx" using namespace ::com::sun::star; From 4823a826bb220d6eed0d18561089ce4f36fb369a Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Mon, 6 Sep 2010 14:57:23 +0200 Subject: [PATCH 102/279] mib19: #163528# Trace: Don't try to display objects as string --- basic/source/comp/sbcomp.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index 27f68ed069ee..089a48a4d889 100755 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -283,9 +283,10 @@ String lcl_dumpMethodParameters( SbMethod* pMethod ) aStr += pParam->aName; } aStr += '='; - if( pVar->GetType() & SbxARRAY ) + SbxDataType eType = pVar->GetType(); + if( eType & SbxARRAY ) aStr += String( RTL_CONSTASCII_USTRINGPARAM( "..." ) ); - else + else if( eType != SbxOBJECT ) aStr += pVar->GetString(); if ( nParam < ( pParams->Count() - 1 ) ) aStr += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) ); From edcda911555753034afb2175a0c1a8b09f0e8210 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 7 Sep 2010 17:59:48 +0200 Subject: [PATCH 103/279] mib19: #163433# let Application::Run find the correct document --- basic/inc/basic/sbstar.hxx | 4 +++ basic/source/classes/eventatt.cxx | 50 +------------------------------ basic/source/classes/sb.cxx | 49 ++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 49 deletions(-) diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index a234dc206ec7..227ca4d080c1 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -38,6 +38,7 @@ #include #include #include +#include class SbModule; // completed module class SbiInstance; // runtime instance @@ -207,6 +208,9 @@ public: bool GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut ); void QuitAndExitApplication(); BOOL IsQuitApplication() { return bQuit; }; + + static ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > + GetModelFromBasic( SbxObject* pBasic ); }; #ifndef __SB_SBSTARBASICREF_HXX diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 791e9fe5a8c1..796aedf5d76e 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -88,54 +88,6 @@ using namespace ::cppu; using namespace ::osl; - -Reference< frame::XModel > getModelFromBasic( SbxObject* pBasic ) -{ - OSL_PRECOND( pBasic != NULL, "getModelFromBasic: illegal call!" ); - if ( !pBasic ) - return NULL; - - // look for the ThisComponent variable, first in the parent (which - // might be the document's Basic), then in the parent's parent (which might be - // the application Basic) - const ::rtl::OUString sThisComponent( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ); - SbxVariable* pThisComponent = NULL; - - SbxObject* pLookup = pBasic->GetParent(); - while ( pLookup && !pThisComponent ) - { - pThisComponent = pLookup->Find( sThisComponent, SbxCLASS_OBJECT ); - pLookup = pLookup->GetParent(); - } - if ( !pThisComponent ) - { - OSL_TRACE("Failed to get ThisComponent"); - // the application Basic, at the latest, should have this variable - return NULL; - } - - Any aThisComponent( sbxToUnoValue( pThisComponent ) ); - Reference< frame::XModel > xModel( aThisComponent, UNO_QUERY ); - if ( !xModel.is() ) - { - // it's no XModel. Okay, ThisComponent nowadays is allowed to be a controller. - Reference< frame::XController > xController( aThisComponent, UNO_QUERY ); - if ( xController.is() ) - xModel = xController->getModel(); - } - - if ( !xModel.is() ) - return NULL; - -#if OSL_DEBUG_LEVEL > 0 - OSL_TRACE("Have model ThisComponent points to url %s", - ::rtl::OUStringToOString( xModel->getURL(), - RTL_TEXTENCODING_ASCII_US ).pData->buffer ); -#endif - - return xModel; -} - void SFURL_firing_impl( const ScriptEvent& aScriptEvent, Any* pRet, const Reference< frame::XModel >& xModel ) { OSL_TRACE("SFURL_firing_impl() processing script url %s", @@ -569,7 +521,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) bool bDocDialog = false; StarBASIC* pFoundBasic = NULL; OSL_TRACE("About to try get a hold of ThisComponent"); - Reference< frame::XModel > xModel = getModelFromBasic( pINST->GetBasic() ) ; + Reference< frame::XModel > xModel = StarBASIC::GetModelFromBasic( pINST->GetBasic() ) ; aDlgLibAny = implFindDialogLibForDialogBasic( aAnyISP, pINST->GetBasic(), pFoundBasic ); // If we found the dialog then it belongs to the Search basic if ( !pFoundBasic ) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 3a9e892ada42..81b1991a215a 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -71,6 +71,7 @@ TYPEINIT1(StarBASIC,SbxObject) #define RTLNAME "@SBRTL" // i#i68894# +using namespace ::com::sun::star; using com::sun::star::uno::Reference; using com::sun::star::uno::Any; using com::sun::star::uno::UNO_QUERY; @@ -1767,6 +1768,54 @@ bool StarBASIC::GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::u return bRes; } +Reference< frame::XModel > StarBASIC::GetModelFromBasic( SbxObject* pBasic ) +{ + OSL_PRECOND( pBasic != NULL, "getModelFromBasic: illegal call!" ); + if ( !pBasic ) + return NULL; + + // look for the ThisComponent variable, first in the parent (which + // might be the document's Basic), then in the parent's parent (which might be + // the application Basic) + const ::rtl::OUString sThisComponent( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ); + SbxVariable* pThisComponent = NULL; + + SbxObject* pLookup = pBasic->GetParent(); + while ( pLookup && !pThisComponent ) + { + pThisComponent = pLookup->Find( sThisComponent, SbxCLASS_OBJECT ); + pLookup = pLookup->GetParent(); + } + if ( !pThisComponent ) + { + OSL_TRACE("Failed to get ThisComponent"); + // the application Basic, at the latest, should have this variable + return NULL; + } + + Any aThisComponent( sbxToUnoValue( pThisComponent ) ); + Reference< frame::XModel > xModel( aThisComponent, UNO_QUERY ); + if ( !xModel.is() ) + { + // it's no XModel. Okay, ThisComponent nowadays is allowed to be a controller. + Reference< frame::XController > xController( aThisComponent, UNO_QUERY ); + if ( xController.is() ) + xModel = xController->getModel(); + } + + if ( !xModel.is() ) + return NULL; + +#if OSL_DEBUG_LEVEL > 0 + OSL_TRACE("Have model ThisComponent points to url %s", + ::rtl::OUStringToOString( xModel->getURL(), + RTL_TEXTENCODING_ASCII_US ).pData->buffer ); +#endif + + return xModel; +} + + //======================================================================== // #118116 Implementation Collection object From d4aca024ba8ff204cebe7e917064d8b204a3795b Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 7 Sep 2010 18:00:19 +0200 Subject: [PATCH 104/279] mib19: #163433# let Application::Run find the correct document --- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 8b0a52682ac0..cf6d655ff353 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -298,7 +298,20 @@ void SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const u ::rtl::OUString aMacroName = MacroName.trim(); if (0 == aMacroName.indexOf('!')) aMacroName = aMacroName.copy(1).trim(); - VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( getCurrentDocument() ), aMacroName ); + + uno::Reference< frame::XModel > xModel; + SbMethod* pMeth = StarBASIC::GetActiveMethod(); + if ( pMeth ) + { + SbModule* pMod = dynamic_cast< SbModule* >( pMeth->GetParent() ); + if ( pMod ) + xModel = StarBASIC::GetModelFromBasic( pMod ); + } + + if ( !xModel.is() ) + xModel = getCurrentDocument(); + + VBAMacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( xModel ), aMacroName ); if( aMacroInfo.IsResolved() ) { // handle the arguments From b5e8ee7b05c4703cb8bc3b6f6556c8497b51d660 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Wed, 8 Sep 2010 16:34:55 +0200 Subject: [PATCH 105/279] mib19: #163573# NativeObjectWrapper implementation (deactivated) --- basic/source/classes/sbunoobj.cxx | 63 +++++++++++++++++++++++++++++++ basic/source/classes/sbxmod.cxx | 2 + basic/source/inc/sbunoobj.hxx | 3 ++ 3 files changed, 68 insertions(+) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 5227f78566c6..09fdb7dc70bf 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -47,6 +47,7 @@ #include #include +#include #include #include @@ -514,6 +515,44 @@ static void implHandleAnyException( const Any& _rCaughtException ) } } + +// NativeObjectWrapper handling +struct ObjectItem +{ + SbxObjectRef m_xNativeObj; + + ObjectItem( void ) + {} + ObjectItem( SbxObject* pNativeObj ) + : m_xNativeObj( pNativeObj ) + {} +}; +static std::vector< ObjectItem > GaNativeObjectWrapperVector; + +void clearNativeObjectWrapperVector( void ) +{ + GaNativeObjectWrapperVector.clear(); +} + +sal_uInt32 lcl_registerNativeObjectWrapper( SbxObject* pNativeObj ) +{ + sal_uInt32 nIndex = GaNativeObjectWrapperVector.size(); + GaNativeObjectWrapperVector.push_back( ObjectItem( pNativeObj ) ); + return nIndex; +} + +SbxObject* lcl_getNativeObject( sal_uInt32 nIndex ) +{ + SbxObjectRef xRetObj; + if( nIndex < GaNativeObjectWrapperVector.size() ) + { + ObjectItem& rItem = GaNativeObjectWrapperVector[ nIndex ]; + xRetObj = rItem.m_xNativeObj; + } + return xRetObj; +} + + // Von Uno nach Sbx wandeln SbxDataType unoToSbxType( TypeClass eType ) { @@ -700,6 +739,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) if( eTypeClass == TypeClass_STRUCT ) { ArrayWrapper aWrap; + //NativeObjectWrapper aNativeObjectWrapper; if ( (aValue >>= aWrap) ) { SbxDimArray* pArray = NULL; @@ -719,6 +759,15 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) pVar->PutEmpty(); break; } + //else if ( (aValue >>= aNativeObjectWrapper) ) + //{ + // sal_uInt32 nIndex; + // if( (aNativeObjectWrapper.ObjectId >>= nIndex) ) + // { + // SbxObject* pObj = lcl_getNativeObject( nIndex ); + // pVar->PutObject( pObj ); + // } + //} else { SbiInstance* pInst = pINST; @@ -1095,6 +1144,20 @@ Any sbxToUnoValueImpl( SbxVariable* pVar, bool bBlockConversionToSmallestType = if( pClassModule->createCOMWrapperForIface( aRetAny, pClassModuleObj ) ) return aRetAny; } + //if( !xObj->ISA(SbUnoObject) ) + //{ + // // Create NativeObjectWrapper to identify object in case of callbacks + // SbxObject* pObj = PTR_CAST(SbxObject,pVar->GetObject()); + // if( pObj != NULL ) + // { + // NativeObjectWrapper aNativeObjectWrapper; + // sal_uInt32 nIndex = lcl_registerNativeObjectWrapper( pObj ); + // aNativeObjectWrapper.ObjectId <<= nIndex; + // Any aRetAny; + // aRetAny <<= aNativeObjectWrapper; + // return aRetAny; + // } + //} } } diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index c324e3db1f50..daeb1707b974 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1180,6 +1180,8 @@ USHORT SbModule::Run( SbMethod* pMeth ) // beim Programm-Ende freigeben, damit nichts gehalten wird. ClearUnoObjectsInRTL_Impl( xBasic ); + clearNativeObjectWrapperVector(); + DBG_ASSERT(pINST->nCallLvl==0,"BASIC-Call-Level > 0"); delete pINST, pINST = NULL, bDelInst = FALSE; diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index d576db0ddab8..8fc4d06a2796 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -296,6 +296,9 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); +void disposeComVariablesForBasic( StarBASIC* pBasic ); +void clearNativeObjectWrapperVector( void ); + //======================================================================== // #118116 Collection object From a1d731b2d6e742071c65ad57f69d3e58ebd75c56 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 8 Sep 2010 18:59:42 +0200 Subject: [PATCH 106/279] mib19: gcc compiler warning --- basic/source/classes/sb.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 81b1991a215a..8d5a21b4e98e 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1793,12 +1793,12 @@ Reference< frame::XModel > StarBASIC::GetModelFromBasic( SbxObject* pBasic ) return NULL; } - Any aThisComponent( sbxToUnoValue( pThisComponent ) ); - Reference< frame::XModel > xModel( aThisComponent, UNO_QUERY ); + Any aThisComponentAny( sbxToUnoValue( pThisComponent ) ); + Reference< frame::XModel > xModel( aThisComponentAny, UNO_QUERY ); if ( !xModel.is() ) { // it's no XModel. Okay, ThisComponent nowadays is allowed to be a controller. - Reference< frame::XController > xController( aThisComponent, UNO_QUERY ); + Reference< frame::XController > xController( aThisComponentAny, UNO_QUERY ); if ( xController.is() ) xModel = xController->getModel(); } From d3ad5e48cac0e7c2c0e2d9be32b81582c3de4271 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Thu, 9 Sep 2010 12:45:01 +0200 Subject: [PATCH 107/279] mib19: #163576# Automatically reinstantiate objects declared with Dim As New --- basic/inc/basic/sbxdef.hxx | 3 + basic/source/classes/sb.cxx | 3 - basic/source/comp/dim.cxx | 3 + basic/source/inc/runtime.hxx | 2 +- basic/source/runtime/step0.cxx | 113 +++++++++++++++++++++++++++++++++ basic/source/runtime/step2.cxx | 36 ++++++----- basic/source/sbx/sbxobj.cxx | 3 + basic/source/sbx/sbxvar.cxx | 4 ++ 8 files changed, 146 insertions(+), 21 deletions(-) diff --git a/basic/inc/basic/sbxdef.hxx b/basic/inc/basic/sbxdef.hxx index 89322be776f9..b85b3552c79e 100644 --- a/basic/inc/basic/sbxdef.hxx +++ b/basic/inc/basic/sbxdef.hxx @@ -106,6 +106,7 @@ enum SbxDataType { }; const UINT32 SBX_TYPE_WITH_EVENTS_FLAG = 0x10000; +const UINT32 SBX_TYPE_DIM_AS_NEW_FLAG = 0x20000; const UINT32 SBX_FIXED_LEN_STRING_FLAG = 0x10000; // same value as above as no conflict possible #endif @@ -317,6 +318,8 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion #define SBX_REFERENCE 0x4000 // Parameter is Reference (DLL-call) #define SBX_NO_MODIFY 0x8000 // SetModified is suppressed #define SBX_WITH_EVENTS 0x0080 // Same value as unused SBX_HIDDEN +#define SBX_DIM_AS_NEW 0x0800 // Same value as SBX_GBLSEARCH, cannot conflict as one + // is used for objects, the other for variables only // Broadcaster-IDs: #define SBX_HINT_DYING SFX_HINT_DYING diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 8d5a21b4e98e..c3c2facffbd2 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -565,7 +565,6 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) if( pObj != NULL ) { String aObjClass = pObj->GetClassName(); - (void)aObjClass; SbClassModuleObject* pClassModuleObj = PTR_CAST(SbClassModuleObject,pObjBase); if( pClassModuleObj != NULL ) @@ -762,8 +761,6 @@ void StarBASIC::SetModified( BOOL b ) SbxBase::SetModified( b ); } -void disposeComVariablesForBasic( StarBASIC* pBasic ); - StarBASIC::~StarBASIC() { if( !--GetSbData()->nInst ) diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index 59d77e3f3757..4d188ec1ca8a 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -375,6 +375,9 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) if( pDef->IsWithEvents() ) nOpnd2 |= SBX_TYPE_WITH_EVENTS_FLAG; + if( bCompatible && pDef->IsNew() ) + nOpnd2 |= SBX_TYPE_DIM_AS_NEW_FLAG; + short nFixedStringLength = pDef->GetFixedStringLength(); if( nFixedStringLength >= 0 ) nOpnd2 |= (SBX_FIXED_LEN_STRING_FLAG + (UINT32(nFixedStringLength) << 17)); // len = all bits above 0x10000 diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 8859739cccd3..356e07c9e55c 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -436,7 +436,7 @@ class SbiRuntime void StepDCREATE_REDIMP(UINT32,UINT32), StepDCREATE_IMPL(UINT32,UINT32); void StepFIND_CM( UINT32, UINT32 ); void StepFIND_STATIC( UINT32, UINT32 ); - void implCreateFixedString( SbxVariable* pStrVar, UINT32 nOp2 ); + void implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, UINT32 nOp2 ); public: void SetVBAEnabled( bool bEnabled ); USHORT GetImageFlag( USHORT n ) const; diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 797896bf32ef..d8ad1c1fe620 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -47,6 +47,7 @@ Reference< XInterface > createComListener( const Any& aControlAny, const ::rtl:: const ::rtl::OUString& aPrefix, SbxObjectRef xScopeObj ); #include +#include SbxVariable* getDefaultProp( SbxVariable* pRef ); @@ -425,9 +426,53 @@ void SbiRuntime::StepPUT() } +// VBA Dim As New behavior handling, save init object information +struct DimAsNewRecoverItem +{ + String m_aObjClass; + String m_aObjName; + SbxObject* m_pObjParent; + SbModule* m_pClassModule; + + DimAsNewRecoverItem( void ) + : m_pObjParent( NULL ) + , m_pClassModule( NULL ) + {} + + DimAsNewRecoverItem( const String& rObjClass, const String& rObjName, + SbxObject* pObjParent, SbModule* pClassModule ) + : m_aObjClass( rObjClass ) + , m_aObjName( rObjName ) + , m_pObjParent( pObjParent ) + , m_pClassModule( pClassModule ) + {} + +}; + + +struct SbxVariablePtrHash +{ + size_t operator()( SbxVariable* pVar ) const + { return (size_t)pVar; } +}; + +typedef std::hash_map< SbxVariable*, DimAsNewRecoverItem, SbxVariablePtrHash > DimAsNewRecoverHash; + +static DimAsNewRecoverHash GaDimAsNewRecoverHash; + +void removeDimAsNewRecoverItem( SbxVariable* pVar ) +{ + DimAsNewRecoverHash::iterator it = GaDimAsNewRecoverHash.find( pVar ); + if( it != GaDimAsNewRecoverHash.end() ) + GaDimAsNewRecoverHash.erase( it ); +} + + // Speichern Objektvariable // Nicht-Objekt-Variable fuehren zu Fehlern +static const char pCollectionStr[] = "Collection"; + void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, bool bHandleDefaultProp ) { // #67733 Typen mit Array-Flag sind auch ok @@ -530,6 +575,12 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b } } + // Handle Dim As New + BOOL bDimAsNew = bVBAEnabled && refVar->IsSet( SBX_DIM_AS_NEW ); + SbxBaseRef xPrevVarObj; + if( bDimAsNew ) + xPrevVarObj = refVar->GetObject(); + // Handle withevents BOOL bWithEvents = refVar->IsSet( SBX_WITH_EVENTS ); if ( bWithEvents ) @@ -558,6 +609,68 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b *refVar = *refVal; } + if ( bDimAsNew ) + { + if( !refVar->ISA(SbxObject) ) + { + SbxBase* pValObjBase = refVal->GetObject(); + if( pValObjBase == NULL ) + { + if( xPrevVarObj.Is() ) + { + // Object is overwritten with NULL, instantiate init object + DimAsNewRecoverHash::iterator it = GaDimAsNewRecoverHash.find( refVar ); + if( it != GaDimAsNewRecoverHash.end() ) + { + const DimAsNewRecoverItem& rItem = it->second; + if( rItem.m_pClassModule != NULL ) + { + SbClassModuleObject* pNewObj = new SbClassModuleObject( rItem.m_pClassModule ); + pNewObj->SetName( rItem.m_aObjName ); + pNewObj->SetParent( rItem.m_pObjParent ); + refVar->PutObject( pNewObj ); + } + else if( rItem.m_aObjClass.EqualsIgnoreCaseAscii( pCollectionStr ) ) + { + BasicCollection* pNewCollection = new BasicCollection( String( RTL_CONSTASCII_USTRINGPARAM(pCollectionStr) ) ); + pNewCollection->SetName( rItem.m_aObjName ); + pNewCollection->SetParent( rItem.m_pObjParent ); + refVar->PutObject( pNewCollection ); + } + } + } + } + else + { + // Does old value exist? + bool bFirstInit = !xPrevVarObj.Is(); + if( bFirstInit ) + { + // Store information to instantiate object later + SbxObject* pValObj = PTR_CAST(SbxObject,pValObjBase); + if( pValObj != NULL ) + { + String aObjClass = pValObj->GetClassName(); + + SbClassModuleObject* pClassModuleObj = PTR_CAST(SbClassModuleObject,pValObjBase); + if( pClassModuleObj != NULL ) + { + SbModule* pClassModule = pClassModuleObj->getClassModule(); + GaDimAsNewRecoverHash[refVar] = + DimAsNewRecoverItem( aObjClass, pValObj->GetName(), pValObj->GetParent(), pClassModule ); + } + else if( aObjClass.EqualsIgnoreCaseAscii( "Collection" ) ) + { + GaDimAsNewRecoverHash[refVar] = + DimAsNewRecoverItem( aObjClass, pValObj->GetName(), pValObj->GetParent(), NULL ); + } + } + } + } + } + } + + // lhs is a property who's value is currently (Empty e.g. no broadcast yet) // in this case if there is a default prop involved the value of the // default property may infact be void so the type will also be SbxEMPTY diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index dd511a2dfe10..ebc494305f81 100755 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -1119,12 +1119,24 @@ void SbiRuntime::StepTCREATE( UINT32 nOp1, UINT32 nOp2 ) PushVar( pNew ); } -void SbiRuntime::implCreateFixedString( SbxVariable* pStrVar, UINT32 nOp2 ) +void SbiRuntime::implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, UINT32 nOp2 ) { - USHORT nCount = static_cast( nOp2 >> 17 ); // len = all bits above 0x10000 - String aStr; - aStr.Fill( nCount, 0 ); - pStrVar->PutString( aStr ); + bool bWithEvents = ((t & 0xff) == SbxOBJECT && (nOp2 & SBX_TYPE_WITH_EVENTS_FLAG) != 0); + if( bWithEvents ) + pVar->SetFlag( SBX_WITH_EVENTS ); + + bool bDimAsNew = ((nOp2 & SBX_TYPE_DIM_AS_NEW_FLAG) != 0); + if( bDimAsNew ) + pVar->SetFlag( SBX_DIM_AS_NEW ); + + bool bFixedString = ((t & 0xff) == SbxSTRING && (nOp2 & SBX_FIXED_LEN_STRING_FLAG) != 0); + if( bFixedString ) + { + USHORT nCount = static_cast( nOp2 >> 17 ); // len = all bits above 0x10000 + String aStr; + aStr.Fill( nCount, 0 ); + pVar->PutString( aStr ); + } } // Einrichten einer lokalen Variablen (+StringID+Typ) @@ -1139,12 +1151,7 @@ void SbiRuntime::StepLOCAL( UINT32 nOp1, UINT32 nOp2 ) SbxDataType t = (SbxDataType)(nOp2 & 0xffff); SbxVariable* p = new SbxVariable( t ); p->SetName( aName ); - bool bWithEvents = ((t & 0xff) == SbxOBJECT && (nOp2 & SBX_TYPE_WITH_EVENTS_FLAG) != 0); - if( bWithEvents ) - p->SetFlag( SBX_WITH_EVENTS ); - bool bFixedString = ((t & 0xff) == SbxSTRING && (nOp2 & SBX_FIXED_LEN_STRING_FLAG) != 0); - if( bFixedString ) - implCreateFixedString( p, nOp2 ); + implHandleSbxFlags( p, t, nOp2 ); refLocals->Put( p, refLocals->Count() ); } } @@ -1171,12 +1178,7 @@ void SbiRuntime::StepPUBLIC_Impl( UINT32 nOp1, UINT32 nOp2, bool bUsedForClassMo // AB: 2.7.1996: HACK wegen 'Referenz kann nicht gesichert werden' pProp->SetFlag( SBX_NO_MODIFY); - bool bWithEvents = ((t & 0xff) == SbxOBJECT && (nOp2 & SBX_TYPE_WITH_EVENTS_FLAG) != 0); - if( bWithEvents ) - pProp->SetFlag( SBX_WITH_EVENTS ); - bool bFixedString = ((t & 0xff) == SbxSTRING && (nOp2 & SBX_FIXED_LEN_STRING_FLAG) != 0); - if( bFixedString ) - implCreateFixedString( p, nOp2 ); + implHandleSbxFlags( pProp, t, nOp2 ); } } diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index b2b67fe3774f..6628973b29e8 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -112,6 +112,9 @@ SbxObject::~SbxObject() CheckParentsOnDelete( this, pProps ); CheckParentsOnDelete( this, pMethods ); CheckParentsOnDelete( this, pObjs ); + + // avoid handling in ~SbxVariable as SBX_DIM_AS_NEW == SBX_GBLSEARCH + ResetFlag( SBX_DIM_AS_NEW ); } SbxDataType SbxObject::GetType() const diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 45342a015194..12a6d29672a9 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -136,6 +136,8 @@ SbxVariable::SbxVariable( SbxDataType t, void* p ) : SbxValue( t, p ) #endif } +void removeDimAsNewRecoverItem( SbxVariable* pVar ); + SbxVariable::~SbxVariable() { #ifdef DBG_UTIL @@ -146,6 +148,8 @@ SbxVariable::~SbxVariable() maName.AssignAscii( aCellsStr, sizeof( aCellsStr )-1 ); GetSbxData_Impl()->aVars.Remove( this ); #endif + if( IsSet( SBX_DIM_AS_NEW )) + removeDimAsNewRecoverItem( this ); delete mpSbxVariableImpl; delete pCst; } From a52cf2d300782298b39977331bb7bc015daedd7c Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Thu, 9 Sep 2010 15:53:39 +0200 Subject: [PATCH 108/279] mib19: #163573# Fix NativeObjectWrapper implementation + VbaDocumentBase::getFullName() --- basic/source/classes/sbunoobj.cxx | 51 ++++++++++--------- .../source/vbahelper/vbadocumentbase.cxx | 4 +- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 09fdb7dc70bf..8f610ae6b15f 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -739,7 +739,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) if( eTypeClass == TypeClass_STRUCT ) { ArrayWrapper aWrap; - //NativeObjectWrapper aNativeObjectWrapper; + NativeObjectWrapper aNativeObjectWrapper; if ( (aValue >>= aWrap) ) { SbxDimArray* pArray = NULL; @@ -759,15 +759,18 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) pVar->PutEmpty(); break; } - //else if ( (aValue >>= aNativeObjectWrapper) ) - //{ - // sal_uInt32 nIndex; - // if( (aNativeObjectWrapper.ObjectId >>= nIndex) ) - // { - // SbxObject* pObj = lcl_getNativeObject( nIndex ); - // pVar->PutObject( pObj ); - // } - //} + else if ( (aValue >>= aNativeObjectWrapper) ) + { + sal_uInt32 nIndex; + if( (aNativeObjectWrapper.ObjectId >>= nIndex) ) + { + SbxObject* pObj = lcl_getNativeObject( nIndex ); + pVar->PutObject( pObj ); + } + else + pVar->PutEmpty(); + break; + } else { SbiInstance* pInst = pINST; @@ -1144,20 +1147,20 @@ Any sbxToUnoValueImpl( SbxVariable* pVar, bool bBlockConversionToSmallestType = if( pClassModule->createCOMWrapperForIface( aRetAny, pClassModuleObj ) ) return aRetAny; } - //if( !xObj->ISA(SbUnoObject) ) - //{ - // // Create NativeObjectWrapper to identify object in case of callbacks - // SbxObject* pObj = PTR_CAST(SbxObject,pVar->GetObject()); - // if( pObj != NULL ) - // { - // NativeObjectWrapper aNativeObjectWrapper; - // sal_uInt32 nIndex = lcl_registerNativeObjectWrapper( pObj ); - // aNativeObjectWrapper.ObjectId <<= nIndex; - // Any aRetAny; - // aRetAny <<= aNativeObjectWrapper; - // return aRetAny; - // } - //} + if( !xObj->ISA(SbUnoObject) ) + { + // Create NativeObjectWrapper to identify object in case of callbacks + SbxObject* pObj = PTR_CAST(SbxObject,pVar->GetObject()); + if( pObj != NULL ) + { + NativeObjectWrapper aNativeObjectWrapper; + sal_uInt32 nIndex = lcl_registerNativeObjectWrapper( pObj ); + aNativeObjectWrapper.ObjectId <<= nIndex; + Any aRetAny; + aRetAny <<= aNativeObjectWrapper; + return aRetAny; + } + } } } diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index 894a9f55eed2..0df38b003556 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -97,8 +97,8 @@ VbaDocumentBase::getPath() throw (uno::RuntimeException) ::rtl::OUString VbaDocumentBase::getFullName() throw (uno::RuntimeException) { - rtl::OUString sPath; - ::osl::File::getSystemPathFromFileURL( getModel()->getURL(), sPath ); + rtl::OUString sPath = getName(); + //::osl::File::getSystemPathFromFileURL( getModel()->getURL(), sPath ); return sPath; } From 8e29a77b5d78f67ce281e0538eea3edaea918faf Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 10 Sep 2010 11:56:44 +0200 Subject: [PATCH 109/279] mib19: #163577# get rid of remaining objects on StarBasic destruction --- basic/source/classes/sb.cxx | 1 + basic/source/classes/sbunoobj.cxx | 41 +++++++++++++++++++++++++++++++ basic/source/inc/sbunoobj.hxx | 2 ++ 3 files changed, 44 insertions(+) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index c3c2facffbd2..1b82325392b6 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -804,6 +804,7 @@ StarBASIC::~StarBASIC() xUnoListeners = NULL; } + clearUnoMethodsForBasic( this ); disposeComVariablesForBasic( this ); } diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 8f610ae6b15f..e952fff3e64b 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2514,6 +2514,47 @@ void SbUnoObject::doIntrospection( void ) // #67781 Start einer Liste aller SbUnoMethod-Instanzen static SbUnoMethod* pFirst = NULL; +void clearUnoMethodsForBasic( StarBASIC* pBasic ) +{ + SbUnoMethod* pMeth = pFirst; + while( pMeth ) + { + SbxObject* pObject = dynamic_cast< SbxObject* >( pMeth->GetParent() ); + if ( pObject ) + { + StarBASIC* pModBasic = dynamic_cast< StarBASIC* >( pObject->GetParent() ); + if ( pModBasic == pBasic ) + { + // for now the solution is to remove the method from the list and to clear it, + // but in case the element should be correctly transfered to another StarBASIC, + // we should either set module parent to NULL without clearing it, or even + // set the new StarBASIC as the parent of the module + // pObject->SetParent( NULL ); + + if( pMeth == pFirst ) + pFirst = pMeth->pNext; + else if( pMeth->pPrev ) + pMeth->pPrev->pNext = pMeth->pNext; + if( pMeth->pNext ) + pMeth->pNext->pPrev = pMeth->pPrev; + + pMeth->pPrev = NULL; + pMeth->pNext = NULL; + + pMeth->SbxValue::Clear(); + pObject->SbxValue::Clear(); + + // start from the beginning after object clearing, the cycle will end since the method is removed each time + pMeth = pFirst; + } + else + pMeth = pMeth->pNext; + } + else + pMeth = pMeth->pNext; + } +} + void clearUnoMethods( void ) { SbUnoMethod* pMeth = pFirst; diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index 8fc4d06a2796..135c2fd97b54 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -93,11 +93,13 @@ SV_DECL_IMPL_REF(SbUnoObject); // #67781 Rueckgabewerte der Uno-Methoden loeschen void clearUnoMethods( void ); +void clearUnoMethodsForBasic( StarBASIC* pBasic ); class SbUnoMethod : public SbxMethod { friend class SbUnoObject; friend void clearUnoMethods( void ); + friend void clearUnoMethodsForBasic( StarBASIC* pBasic ); ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlMethod > m_xUnoMethod; ::com::sun::star::uno::Sequence< ::com::sun::star::reflection::ParamInfo >* pParamInfoSeq; From 583cd12ea421871fe521af2f3d9951963ae6a366 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 10 Sep 2010 16:33:00 +0200 Subject: [PATCH 110/279] mib19: #163583# do not reschedule in callbacks --- basic/source/classes/sbunoobj.cxx | 16 ++++++++++++++++ basic/source/runtime/methods1.cxx | 1 + 2 files changed, 17 insertions(+) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index e952fff3e64b..45bcc5469ae6 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4432,6 +4432,19 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction, ::rtl::OUString aFunctionName = m_aPrefix; aFunctionName += rFunction; + sal_Bool bSetRescheduleBack = sal_False; + sal_Bool bOldReschedule = sal_True; + SbiInstance* pInst = pINST; + if( pInst && pInst->IsCompatibility() ) + { + bOldReschedule = pInst->IsReschedule(); + if ( bOldReschedule ) + { + pInst->EnableReschedule( sal_False ); + bSetRescheduleBack = sal_True; + } + } + SbxVariable* p = xScopeObj->Find( aFunctionName, SbxCLASS_METHOD ); SbMethod* pMeth = p != NULL ? PTR_CAST(SbMethod,p) : NULL; if( pMeth == NULL ) @@ -4464,6 +4477,9 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction, aRet = sbxToUnoValue( xValue ); pMeth->SetParameters( NULL ); + if( bSetRescheduleBack ) + pInst->EnableReschedule( bOldReschedule ); + // TODO: OutParameter? return aRet; diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 68f4dbe76c5f..9d8da0b7026f 100755 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -655,6 +655,7 @@ RTLFUNC(DoEvents) //aTimer.Start(); //while ( aTimer.IsActive() ) // Application::Reschedule(); + Application::Reschedule( true ); } RTLFUNC(GetGUIVersion) From 7e801dd20924783ebe7f40920169179ea3b1a709 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 13 Sep 2010 17:47:04 +0200 Subject: [PATCH 111/279] mib19: #163557# cleanup VBA XDocuments implementation, trigger Workbook_Open event when creating a new Excel workbook via Workbooks.Add --- oovbaapi/ooo/vba/excel/XWorkbooks.idl | 2 +- vbahelper/inc/vbahelper/vbadocumentsbase.hxx | 8 ++++---- vbahelper/source/vbahelper/vbadocumentsbase.cxx | 9 +++------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/oovbaapi/ooo/vba/excel/XWorkbooks.idl b/oovbaapi/ooo/vba/excel/XWorkbooks.idl index 7c94ca1eac18..de7b031e3c0a 100644 --- a/oovbaapi/ooo/vba/excel/XWorkbooks.idl +++ b/oovbaapi/ooo/vba/excel/XWorkbooks.idl @@ -44,7 +44,7 @@ module ooo { module vba { module excel { interface XWorkbooks : com::sun::star::uno::XInterface { - any Add(); + any Add([in] any Template); any Open([in] string Filename, [in] any UpdateLinks, [in] any ReadOnly, [in] any Format, [in] any Password, [in] any WriteResPassword, [in] any IgnoreReadOnlyRecommended, [in] any Origin, [in] any Delimiter, [in] any Editable, [in] any Notify, [in] any Converter, [in] any AddToMru); void Close(); diff --git a/vbahelper/inc/vbahelper/vbadocumentsbase.hxx b/vbahelper/inc/vbahelper/vbadocumentsbase.hxx index 36bc0a4963ee..8e4554b74b3d 100644 --- a/vbahelper/inc/vbahelper/vbadocumentsbase.hxx +++ b/vbahelper/inc/vbahelper/vbadocumentsbase.hxx @@ -57,10 +57,10 @@ public: // VbaDocumentsBase_BASE virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) = 0; - // XDocumentsBase - virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException); - virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException); +protected: + css::uno::Any createDocument() throw (css::uno::RuntimeException); + void closeDocuments() throw (css::uno::RuntimeException); + css::uno::Any openDocument( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException); }; #endif /* SC_VBA_WORKBOOKS_HXX */ diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index e01809d5fbc3..f2b70ab231c7 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -213,8 +213,7 @@ VbaDocumentsBase::VbaDocumentsBase( const uno::Reference< XHelperInterface >& xP { } -uno::Any SAL_CALL -VbaDocumentsBase::Add() throw (uno::RuntimeException) +uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException) { uno::Reference< lang::XMultiComponentFactory > xSMgr( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); @@ -244,8 +243,7 @@ VbaDocumentsBase::Add() throw (uno::RuntimeException) return uno::makeAny( xComponent ); } -void -VbaDocumentsBase::Close() throw (uno::RuntimeException) +void VbaDocumentsBase::closeDocuments() throw (uno::RuntimeException) { // #FIXME this *MUST* be wrong documents::close surely closes ALL documents // in the collection, use of getCurrentDocument here is totally wrong @@ -259,8 +257,7 @@ VbaDocumentsBase::Close() throw (uno::RuntimeException) } // #TODO# #FIXME# can any of the unused params below be used? -uno::Any -VbaDocumentsBase::Open( const rtl::OUString& rFileName, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) +uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) { // we need to detect if this is a URL, if not then assume its a file path rtl::OUString aURL; From 595a30253a722d55217c9573573bc3289da271fb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 13 Sep 2010 19:00:18 +0200 Subject: [PATCH 112/279] dba34a: #i114403# don't access non-existing values --- svx/source/fmcomp/gridcell.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index bb8afd502d43..76c700ae4221 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2953,13 +2953,13 @@ sal_Bool DbFilterField::commitControl() case ::com::sun::star::form::FormComponentType::CHECKBOX: return sal_True; case ::com::sun::star::form::FormComponentType::LISTBOX: + aText.Erase(); if (static_cast(m_pWindow)->GetSelectEntryCount()) { sal_Int16 nPos = (sal_Int16)static_cast(m_pWindow)->GetSelectEntryPos(); - aText = (const sal_Unicode*)m_aValueList.getConstArray()[nPos]; + if ( ( nPos >= 0 ) && ( nPos < m_aValueList.getLength() ) ) + aText = (const sal_Unicode*)m_aValueList.getConstArray()[nPos]; } - else - aText.Erase(); if (m_aText != aText) { From 60a9e05910a3083130b88a61cd36745af5e1128d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 14 Sep 2010 11:02:43 +0200 Subject: [PATCH 113/279] dba34a: #i113403# reset m_documentBasicManager to NULL when it dies --- scripting/source/basprov/basscript.cxx | 22 ++++++++++++++++++++++ scripting/source/basprov/basscript.hxx | 6 +++++- scripting/source/basprov/makefile.mk | 1 + 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx index c6de155e3ed0..24bba1e7bff6 100644 --- a/scripting/source/basprov/basscript.cxx +++ b/scripting/source/basprov/basscript.cxx @@ -80,11 +80,33 @@ namespace basprov ,m_documentBasicManager( &documentBasicManager ) ,m_xDocumentScriptContext( documentScriptContext ) { + StartListening( *m_documentBasicManager ); } // ----------------------------------------------------------------------------- BasicScriptImpl::~BasicScriptImpl() { + if ( m_documentBasicManager ) + EndListening( *m_documentBasicManager ); + } + + // ----------------------------------------------------------------------------- + // SfxListener + // ----------------------------------------------------------------------------- + void BasicScriptImpl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) + { + if ( &rBC != m_documentBasicManager ) + { + OSL_ENSURE( false, "BasicScriptImpl::Notify: where does this come from?" ); + // not interested in + return; + } + const SfxSimpleHint* pSimpleHint = PTR_CAST( SfxSimpleHint, &rHint ); + if ( pSimpleHint && ( pSimpleHint->GetId() == SFX_HINT_DYING ) ) + { + m_documentBasicManager = NULL; + EndListening( rBC ); // prevent multiple notifications + } } // ----------------------------------------------------------------------------- diff --git a/scripting/source/basprov/basscript.hxx b/scripting/source/basprov/basscript.hxx index 4a3d6f1ab61d..772a9166cde3 100644 --- a/scripting/source/basprov/basscript.hxx +++ b/scripting/source/basprov/basscript.hxx @@ -32,6 +32,7 @@ #include #include #include +#include class BasicManager; @@ -49,7 +50,7 @@ namespace basprov ::com::sun::star::script::provider::XScript > BasicScriptImpl_BASE; - class BasicScriptImpl : public BasicScriptImpl_BASE + class BasicScriptImpl : public BasicScriptImpl_BASE, public SfxListener { private: SbMethodRef m_xMethod; @@ -80,6 +81,9 @@ namespace basprov ::com::sun::star::script::provider::ScriptFrameworkErrorException, ::com::sun::star::reflection::InvocationTargetException, ::com::sun::star::uno::RuntimeException ); + + // SfxListener + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); }; //......................................................................... diff --git a/scripting/source/basprov/makefile.mk b/scripting/source/basprov/makefile.mk index 5001e5db288e..0340419e2a69 100644 --- a/scripting/source/basprov/makefile.mk +++ b/scripting/source/basprov/makefile.mk @@ -58,6 +58,7 @@ SHL1STDLIBS= \ $(SFX2LIB) \ $(BASICLIB) \ $(VCLLIB) \ + $(SVLLIB) \ $(TOOLSLIB) \ $(UCBHELPERLIB) \ $(COMPHELPERLIB) \ From 76411d92fb19d601efa1cf641eac6bacc2dceb1b Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Tue, 14 Sep 2010 15:23:33 +0200 Subject: [PATCH 114/279] mib19: #163529# unlock model controllers on end of VBA macro execution --- basic/source/classes/sbxmod.cxx | 36 +++++++++++++-------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index daeb1707b974..3204e7681088 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -500,33 +500,26 @@ IMPL_LINK( AsyncQuitHandler, OnAsyncQuit, void*, /*pNull*/ ) return 0L; } -#if 0 -bool UnlockControllerHack( StarBASIC* pBasic ) +bool VBAUnlockControllers( StarBASIC* pBasic ) { bool bRes = false; if ( pBasic && pBasic->IsDocBasic() ) { - uno::Any aUnoVar; - ::rtl::OUString sVarName( ::rtl::OUString::createFromAscii( "ThisComponent" ) ); - SbUnoObject* pGlobs = dynamic_cast( pBasic->Find( sVarName, SbxCLASS_DONTCARE ) ); - if ( pGlobs ) - aUnoVar = pGlobs->getUnoAny(); - uno::Reference< frame::XModel > xModel( aUnoVar, uno::UNO_QUERY); - if ( xModel.is() ) + SbUnoObject* pGlobs = dynamic_cast< SbUnoObject* >( pBasic->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ), SbxCLASS_DONTCARE ) ); + if ( pGlobs ) try { - try - { + uno::Reference< frame::XModel > xModel( pGlobs->getUnoAny(), uno::UNO_QUERY_THROW ); + if ( xModel->hasControllersLocked() ) xModel->unlockControllers(); - bRes = true; - } - catch( uno::Exception& ) - { - } + bRes = true; + } + catch( uno::Exception& ) + { } } return bRes; } -#endif + ///////////////////////////////////////////////////////////////////////////// // Ein BASIC-Modul hat EXTSEARCH gesetzt, damit die im Modul enthaltenen @@ -1191,6 +1184,10 @@ USHORT SbModule::Run( SbMethod* pMeth ) GlobalRunDeInit(); + // VBA always ensures screenupdating is enabled after completing + if ( mbVBACompat ) + VBAUnlockControllers( PTR_CAST( StarBASIC, GetParent() ) ); + #ifdef DBG_TRACE_BASIC dbg_DeInitTrace(); #endif @@ -1205,12 +1202,7 @@ USHORT SbModule::Run( SbMethod* pMeth ) StarBASIC::FatalError( SbERR_STACK_OVERFLOW ); } - // VBA always ensure screenupdating is enabled after completing StarBASIC* pBasic = PTR_CAST(StarBASIC,GetParent()); -#if 0 - if ( pBasic && pBasic->IsDocBasic() && !pINST ) - UnlockControllerHack( pBasic ); -#endif if( bDelInst ) { // #57841 Uno-Objekte, die in RTL-Funktionen gehalten werden, From ebd83dda874d9607368c9b7f0d4529e73ea69ccb Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Wed, 15 Sep 2010 08:45:40 +0200 Subject: [PATCH 115/279] mib19: #163637# Don't clear other modules vars when compiling sheet module --- basic/source/comp/sbcomp.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index 089a48a4d889..c8fe782487e3 100755 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -32,6 +32,7 @@ #include "sbcomp.hxx" #include "image.hxx" #include "sbtrace.hxx" +#include //========================================================================== @@ -648,7 +649,8 @@ BOOL SbModule::Compile() BOOL bRet = IsCompiled(); if( bRet ) { - pBasic->ClearAllModuleVars(); + if( !this->ISA(SbObjModule) ) + pBasic->ClearAllModuleVars(); RemoveVars(); // remove 'this' Modules variables // clear all method statics for( USHORT i = 0; i < pMethods->Count(); i++ ) From a5f2eef02c6adca78824aebedb31964cde862bf4 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 15 Sep 2010 10:19:21 +0200 Subject: [PATCH 116/279] dba34a: #i107809# drop support for old Mozilla profile format, support new-style SeaMonkey profiles --- .../drivers/mozab/bootstrap/MNSFolders.cxx | 26 +--- .../drivers/mozab/bootstrap/MNSFolders.hxx | 3 - .../mozab/bootstrap/MNSProfileDiscover.cxx | 118 +----------------- .../mozab/bootstrap/MNSProfileDiscover.hxx | 3 - connectivity/source/drivers/mozab/mozab.xcu | 2 +- connectivity/source/drivers/mozab/mozab2.xcu | 2 +- 6 files changed, 8 insertions(+), 146 deletions(-) diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx index a5d3211fecab..90ba51c29d4d 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx @@ -51,14 +51,6 @@ using namespace ::com::sun::star::mozilla; namespace { - #if defined(XP_MAC) || defined(XP_MACOSX) || defined(MACOSX) - #define APP_REGISTRY_NAME "Application Registry" - #elif defined(XP_WIN) || defined(XP_OS2) - #define APP_REGISTRY_NAME "registry.dat" - #else - #define APP_REGISTRY_NAME "appreg" - #endif - // ------------------------------------------------------------------- static ::rtl::OUString lcl_getUserDataDirectory() { @@ -73,15 +65,15 @@ namespace static const char* DefaultProductDir[3][3] = { #if defined(XP_WIN) - { "Mozilla/", NULL, NULL }, + { "Mozilla/SeaMonkey/", NULL, NULL }, { "Mozilla/Firefox/", NULL, NULL }, { "Thunderbird/", "Mozilla/Thunderbird/", NULL } #elif(MACOSX) - { "../Mozilla/", NULL, NULL }, + { "../Mozilla/SeaMonkey/", NULL, NULL }, { "Firefox/", NULL, NULL }, { "../Thunderbird/", NULL, NULL } #else - { ".mozilla/", NULL, NULL }, + { ".mozilla/seamonkey/", NULL, NULL }, { ".mozilla/firefox/", NULL, NULL }, { ".thunderbird/", ".mozilla-thunderbird/", ".mozilla/thunderbird/" } #endif @@ -115,7 +107,7 @@ namespace else { ::rtl::OUString sProductDirCandidate; - const char* pProfileRegistry = ( _product == MozillaProductType_Mozilla ) ? APP_REGISTRY_NAME : "profiles.ini"; + const char* pProfileRegistry = "profiles.ini"; // check all possible candidates for ( size_t i=0; i<3; ++i ) @@ -159,13 +151,3 @@ namespace return lcl_guessProfileRoot( product ); } -#ifndef MINIMAL_PROFILEDISCOVER -// ----------------------------------------------------------------------- -::rtl::OUString getRegistryFileName(MozillaProductType product) -{ - if (product == MozillaProductType_Default) - return ::rtl::OUString(); - - return getRegistryDir(product) + ::rtl::OUString::createFromAscii(APP_REGISTRY_NAME); -} -#endif diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx index d69a5e3435bf..c12894d30684 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx @@ -38,9 +38,6 @@ #include ::rtl::OUString getRegistryDir(::com::sun::star::mozilla::MozillaProductType product); -#ifndef MINIMAL_PROFILEDISCOVER -::rtl::OUString getRegistryFileName(::com::sun::star::mozilla::MozillaProductType product); -#endif #endif diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index aa20fb04a089..a9cd5c62fe0b 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -144,11 +144,8 @@ namespace connectivity sal_Int32 ProfileAccess::LoadProductsInfo() { -#ifndef MINIMAL_PROFILEDISCOVER - //load mozilla profiles to m_ProductProfileList - LoadMozillaProfiles(); -#endif - sal_Int32 count=static_cast(m_ProductProfileList[MozillaProductType_Mozilla].mProfileList.size()); + //load SeaMonkey 2 profiles to m_ProductProfileList + sal_Int32 count = LoadXPToolkitProfiles(MozillaProductType_Mozilla); //load thunderbird profiles to m_ProductProfileList count += LoadXPToolkitProfiles(MozillaProductType_Thunderbird); @@ -158,117 +155,6 @@ namespace connectivity count += LoadXPToolkitProfiles(MozillaProductType_Firefox); return count; } -#ifndef MINIMAL_PROFILEDISCOVER - nsresult ProfileAccess::LoadMozillaProfiles() - { - sal_Int32 index=MozillaProductType_Mozilla; - ProductStruct &m_Product = m_ProductProfileList[index]; - nsresult rv = NS_OK; - - //step 1 : get mozilla registry file - nsCOMPtr localFile; - ::rtl::OUString regDir( getRegistryFileName( MozillaProductType_Mozilla ) ); - // PRUnichar != sal_Unicode in mingw - nsAutoString registryDir(reinterpret_cast_mingw_only(regDir.getStr())); - rv = NS_NewLocalFile(registryDir, PR_TRUE, - getter_AddRefs(localFile)); - NS_ENSURE_SUCCESS(rv,rv); - PRBool bExist; - rv = localFile->Exists(&bExist); - NS_ENSURE_SUCCESS(rv,rv); - if (!bExist) - return rv; - nsCOMPtr registry(do_CreateInstance(NS_REGISTRY_CONTRACTID, &rv)); - NS_ENSURE_SUCCESS(rv,rv); - //step 2: open mozilla registry file - rv = registry->Open(localFile); - NS_ENSURE_SUCCESS(rv,rv); - - nsCOMPtr enumKeys; - nsRegistryKey profilesTreeKey; - - //step 3:Enumerator it - rv = registry->GetKey(nsIRegistry::Common, - // PRUnichar != sal_Unicode in mingw - reinterpret_cast_mingw_only(szProfileSubtreeString.getStr()), - &profilesTreeKey); - if (NS_FAILED(rv)) return rv; - - nsXPIDLString tmpCurrentProfile; - - // Get the current profile - rv = registry->GetString(profilesTreeKey, - // PRUnichar != sal_Unicode in mingw - reinterpret_cast_mingw_only(szCurrentProfileString.getStr()), - getter_Copies(tmpCurrentProfile)); - - if (tmpCurrentProfile) - { - // PRUnichar != sal_Unicode in mingw - m_Product.setCurrentProfile ( reinterpret_cast_mingw_only(NS_STATIC_CAST(const PRUnichar*, tmpCurrentProfile))); - } - - - rv = registry->EnumerateSubtrees( profilesTreeKey, getter_AddRefs(enumKeys)); - NS_ENSURE_SUCCESS(rv,rv); - - rv = enumKeys->First(); - NS_ENSURE_SUCCESS(rv,rv); - - while (NS_OK != enumKeys->IsDone()) - { - nsCOMPtr base; - - rv = enumKeys->CurrentItem( getter_AddRefs(base) ); - NS_ENSURE_SUCCESS(rv,rv); - rv = enumKeys->Next(); - NS_ENSURE_SUCCESS(rv,rv); - - // Get specific interface. - nsCOMPtr node; - nsIID nodeIID = NS_IREGISTRYNODE_IID; - - rv = base->QueryInterface( nodeIID, getter_AddRefs(node)); - if (NS_FAILED(rv)) continue; - - // Get node name. - nsXPIDLString profile; - rv = node->GetName(getter_Copies(profile)); - if (NS_FAILED(rv)) continue; - - nsRegistryKey profKey; - rv = node->GetKey(&profKey); - if (NS_FAILED(rv)) continue; - - - nsCOMPtr tempLocal; - - nsXPIDLString regData; - rv = registry->GetString(profKey, - // PRUnichar != sal_Unicode in mingw - reinterpret_cast_mingw_only(szDirectoryString.getStr()), - getter_Copies(regData)); - if (NS_FAILED(rv)) continue; - -#if defined(XP_MAC) || defined(XP_MACOSX) || defined(MACOSX) - rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(tempLocal)); - if (NS_SUCCEEDED(rv)) - rv = tempLocal->SetPersistentDescriptor(NS_LossyConvertUCS2toASCII(regData)); -#else - rv = NS_NewLocalFile(regData, PR_TRUE, getter_AddRefs(tempLocal)); -#endif - //Add found profile to profile lists - if (NS_SUCCEEDED(rv) && tempLocal) - { - // PRUnichar != sal_Unicode in mingw - ProfileStruct* profileItem = new ProfileStruct(MozillaProductType_Mozilla,reinterpret_cast_mingw_only(NS_STATIC_CAST(const PRUnichar*, profile)),tempLocal); - m_Product.mProfileList[profileItem->getProfileName()] = profileItem; - } - - } - return rv; - } -#endif //Thunderbird and firefox profiles are saved in profiles.ini sal_Int32 ProfileAccess::LoadXPToolkitProfiles(MozillaProductType product) { diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx index 9358cd65e650..6c88f04b1cf8 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx @@ -116,9 +116,6 @@ namespace connectivity protected: ProductStruct m_ProductProfileList[4]; sal_Int32 LoadProductsInfo(); -#ifndef MINIMAL_PROFILEDISCOVER - nsresult LoadMozillaProfiles(); -#endif sal_Int32 LoadXPToolkitProfiles(MozillaProductType product); #ifndef MINIMAL_PROFILEDISCOVER //used by isProfileLocked diff --git a/connectivity/source/drivers/mozab/mozab.xcu b/connectivity/source/drivers/mozab/mozab.xcu index c92209e09e5a..fa732d6257ae 100755 --- a/connectivity/source/drivers/mozab/mozab.xcu +++ b/connectivity/source/drivers/mozab/mozab.xcu @@ -62,7 +62,7 @@ com.sun.star.comp.sdbc.MozabDriver - Mozilla Address Book + SeaMonkey Address Book diff --git a/connectivity/source/drivers/mozab/mozab2.xcu b/connectivity/source/drivers/mozab/mozab2.xcu index e7c24143f5a1..d1a620dc73d0 100755 --- a/connectivity/source/drivers/mozab/mozab2.xcu +++ b/connectivity/source/drivers/mozab/mozab2.xcu @@ -32,7 +32,7 @@ com.sun.star.comp.sdbc.MozabDriver - Mozilla Address Book + SeaMonkey Address Book From ea2e5380f2e137dd7300f678517fc7daa68beed8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 15 Sep 2010 13:20:02 +0200 Subject: [PATCH 117/279] dba34a: #i114492# properly calculate the composed filter, placing enough brackets around the single terms ... --- .../inc/connectivity/filtermanager.hxx | 7 ++- .../source/commontools/filtermanager.cxx | 60 ++++++++----------- 2 files changed, 28 insertions(+), 39 deletions(-) diff --git a/connectivity/inc/connectivity/filtermanager.hxx b/connectivity/inc/connectivity/filtermanager.hxx index 71494de67b38..c9d1e95cfac4 100644 --- a/connectivity/inc/connectivity/filtermanager.hxx +++ b/connectivity/inc/connectivity/filtermanager.hxx @@ -33,7 +33,8 @@ #include #include /** === end UNO includes === **/ -#include + +#include #include #include "connectivity/dbtoolsdllapi.hxx" @@ -111,10 +112,10 @@ namespace dbtools /** appends one filter component to the statement in our composer */ - void appendFilterComponent( ::rtl::OUString& /* [inout] */ _rAppendTo, const ::rtl::OUString& _rComponent ) const; + void appendFilterComponent( ::rtl::OUStringBuffer& io_appendTo, const ::rtl::OUString& i_component ) const; /// checks whether there is only one (or even no) non-empty filter component - bool isThereAtMostOneComponent( ::rtl::OUString& _rOnlyComponent ) const; + bool isThereAtMostOneComponent( ::rtl::OUStringBuffer& o_singleComponent ) const; /// returns the index of the first filter component which should be considered when building the composed filter inline sal_Int32 getFirstApplicableFilterIndex() const diff --git a/connectivity/source/commontools/filtermanager.cxx b/connectivity/source/commontools/filtermanager.cxx index bab2ec4ed144..6b9ac603a722 100644 --- a/connectivity/source/commontools/filtermanager.cxx +++ b/connectivity/source/commontools/filtermanager.cxx @@ -35,6 +35,8 @@ #include "TConnection.hxx" #include #include "connectivity/dbtools.hxx" +#include +#include //........................................................................ namespace dbtools @@ -92,7 +94,7 @@ namespace dbtools } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FilterManager::setFilterComponent: setting the filter failed!" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -113,44 +115,30 @@ namespace dbtools } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FilterManager::setApplyPublicFilter: setting the filter failed!" ); + DBG_UNHANDLED_EXCEPTION(); } } //-------------------------------------------------------------------- - namespace + void FilterManager::appendFilterComponent( ::rtl::OUStringBuffer& io_appendTo, const ::rtl::OUString& i_component ) const { - void lcl_ensureBracketed( ::rtl::OUString& /* [inout] */ _rExpression ) + if ( io_appendTo.getLength() > 0 ) { - OSL_ENSURE( _rExpression.getLength(), "lcl_ensureBracketed: expression is empty!" ); - if ( _rExpression.getLength() ) - { - if ( ( _rExpression.getStr()[0] != '(' ) || ( _rExpression.getStr()[ _rExpression.getLength() - 1 ] != ')' ) ) - { - ::rtl::OUString sComposed( RTL_CONSTASCII_USTRINGPARAM( "(" ) ); - sComposed += _rExpression; - sComposed += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" ) ); - _rExpression = sComposed; - } - } + io_appendTo.insert( 0, sal_Unicode( '(' ) ); + io_appendTo.insert( 1, sal_Unicode( ' ' ) ); + io_appendTo.appendAscii( " ) AND " ); } - } - //-------------------------------------------------------------------- - void FilterManager::appendFilterComponent( ::rtl::OUString& /* [inout] */ _rAppendTo, const ::rtl::OUString& _rComponent ) const - { - if ( _rAppendTo.getLength() ) - _rAppendTo += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " AND " ) ); - ::rtl::OUString sComponent( _rComponent ); - lcl_ensureBracketed( sComponent ); - _rAppendTo += sComponent; + io_appendTo.appendAscii( "( " ); + io_appendTo.append( i_component ); + io_appendTo.appendAscii( " )" ); } //-------------------------------------------------------------------- - bool FilterManager::isThereAtMostOneComponent( ::rtl::OUString& _rOnlyComponent ) const + bool FilterManager::isThereAtMostOneComponent( ::rtl::OUStringBuffer& o_singleComponent ) const { sal_Int32 nOnlyNonEmpty = -1; - sal_Int32 i; + sal_Int32 i; for ( i = getFirstApplicableFilterIndex(); i < FC_COMPONENT_COUNT; ++i ) { if ( m_aFilterComponents[ i ].getLength() ) @@ -164,14 +152,14 @@ namespace dbtools } if ( nOnlyNonEmpty == -1 ) { - _rOnlyComponent = ::rtl::OUString(); + o_singleComponent.makeStringAndClear(); return true; } if ( i == FC_COMPONENT_COUNT ) { // we found only one non-empty filter component - _rOnlyComponent = m_aFilterComponents[ nOnlyNonEmpty ]; + o_singleComponent = m_aFilterComponents[ nOnlyNonEmpty ]; return true; } return false; @@ -180,17 +168,17 @@ namespace dbtools //-------------------------------------------------------------------- ::rtl::OUString FilterManager::getComposedFilter( ) const { - ::rtl::OUString sComposedFilter; + ::rtl::OUStringBuffer aComposedFilter; // if we have only one non-empty component, then there's no need to compose anything - if ( isThereAtMostOneComponent( sComposedFilter ) ) - return sComposedFilter; + if ( !isThereAtMostOneComponent( aComposedFilter ) ) + { + // append the single components + for ( sal_Int32 i = getFirstApplicableFilterIndex(); i < FC_COMPONENT_COUNT; ++i ) + appendFilterComponent( aComposedFilter, m_aFilterComponents[ i ] ); + } - // append the single components - for ( sal_Int32 i = getFirstApplicableFilterIndex(); i < FC_COMPONENT_COUNT; ++i ) - appendFilterComponent( sComposedFilter, m_aFilterComponents[ i ] ); - - return sComposedFilter; + return aComposedFilter.makeStringAndClear(); } //........................................................................ From d09dd8986436f17717443823ef18bd8552fdf408 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 15 Sep 2010 13:55:34 +0200 Subject: [PATCH 118/279] dba34a: export/import min-/max-/default-/value for date/time as XML-Schema conformant strings --- xmloff/inc/xmloff/xmltoken.hxx | 3 + xmloff/prj/build.lst | 3 +- xmloff/source/core/xmltoken.cxx | 3 + xmloff/source/forms/controlelement.cxx | 2 + xmloff/source/forms/controlelement.hxx | 2 + xmloff/source/forms/elementexport.cxx | 125 +++++- xmloff/source/forms/elementexport.hxx | 7 + xmloff/source/forms/elementimport.cxx | 420 ++++++++++++------ xmloff/source/forms/elementimport.hxx | 33 +- xmloff/source/forms/form_handler_factory.hxx | 50 +++ .../forms/handler/form_handler_factory.cxx | 90 ++++ xmloff/source/forms/handler/makefile.mk | 55 +++ .../forms/handler/property_handler_base.cxx | 61 +++ .../forms/handler/property_handler_base.hxx | 64 +++ .../source/forms/handler/vcl_date_handler.cxx | 114 +++++ .../source/forms/handler/vcl_date_handler.hxx | 55 +++ .../source/forms/handler/vcl_time_handler.cxx | 115 +++++ .../source/forms/handler/vcl_time_handler.hxx | 55 +++ xmloff/source/forms/makefile.mk | 2 + xmloff/source/forms/property_description.hxx | 140 ++++++ xmloff/source/forms/property_group.hxx | 47 ++ xmloff/source/forms/property_handler.hxx | 84 ++++ xmloff/source/forms/property_ids.hxx | 56 +++ xmloff/source/forms/property_meta_data.cxx | 264 +++++++++++ xmloff/source/forms/property_meta_data.hxx | 65 +++ xmloff/source/forms/propertyexport.cxx | 27 +- xmloff/source/forms/propertyexport.hxx | 19 +- xmloff/source/forms/propertyimport.cxx | 7 +- xmloff/source/forms/propertyimport.hxx | 2 +- xmloff/source/forms/valueproperties.cxx | 36 +- xmloff/util/makefile.mk | 1 + 31 files changed, 1817 insertions(+), 190 deletions(-) create mode 100755 xmloff/source/forms/form_handler_factory.hxx create mode 100755 xmloff/source/forms/handler/form_handler_factory.cxx create mode 100755 xmloff/source/forms/handler/makefile.mk create mode 100755 xmloff/source/forms/handler/property_handler_base.cxx create mode 100755 xmloff/source/forms/handler/property_handler_base.hxx create mode 100755 xmloff/source/forms/handler/vcl_date_handler.cxx create mode 100755 xmloff/source/forms/handler/vcl_date_handler.hxx create mode 100755 xmloff/source/forms/handler/vcl_time_handler.cxx create mode 100755 xmloff/source/forms/handler/vcl_time_handler.hxx create mode 100755 xmloff/source/forms/property_description.hxx create mode 100755 xmloff/source/forms/property_group.hxx create mode 100755 xmloff/source/forms/property_handler.hxx create mode 100755 xmloff/source/forms/property_ids.hxx create mode 100755 xmloff/source/forms/property_meta_data.cxx create mode 100755 xmloff/source/forms/property_meta_data.hxx diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index f4843d54ace1..3d2ef2d1898e 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3110,6 +3110,9 @@ namespace xmloff { namespace token { XML_DIAGONAL_BL_TR_WIDTHS, XML_DIAGONAL_TL_BR_WIDTHS, + XML_MIN_VALUE, + XML_MAX_VALUE, + XML_TOKEN_END }; diff --git a/xmloff/prj/build.lst b/xmloff/prj/build.lst index 7b68ed08ff82..8d60a0f0541b 100644 --- a/xmloff/prj/build.lst +++ b/xmloff/prj/build.lst @@ -9,9 +9,10 @@ xo xmloff\source\text nmake - all xo_text xo_inc NULL xo xmloff\source\draw nmake - all xo_draw xo_inc NULL xo xmloff\source\chart nmake - all xo_chart xo_inc NULL xo xmloff\source\forms nmake - all xo_forms xo_inc NULL +xo xmloff\source\forms\handler nmake - all xo_forms_handler xo_inc NULL xo xmloff\source\script nmake - all xo_script xo_inc NULL xo xmloff\source\transform nmake - all xo_transform xo_util xo_inc NULL xo xmloff\source\xforms nmake - all xo_xforms xo_inc NULL xo xmloff\source\table nmake - all xo_table xo_inc NULL -xo xmloff\util nmake - all xo_util xo_chart xo_core xo_draw xo_forms xo_meta xo_script xo_style xo_text xo_xforms xo_table NULL +xo xmloff\util nmake - all xo_util xo_chart xo_core xo_draw xo_forms xo_forms_handler xo_meta xo_script xo_style xo_text xo_xforms xo_table NULL xo xmloff\qa\unoapi nmake - all xo_qa_unoapi NULL diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index a3d4a0c48d02..b9b4cc8737b0 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3110,6 +3110,9 @@ namespace xmloff { namespace token { TOKEN( "diagonal-bl-tr-widths", XML_DIAGONAL_BL_TR_WIDTHS ), TOKEN( "diagonal-tl-br-widths", XML_DIAGONAL_TL_BR_WIDTHS ), + TOKEN( "min-value", XML_MIN_VALUE ), + TOKEN( "max-value", XML_MAX_VALUE ), + #if OSL_DEBUG_LEVEL > 0 { 0, NULL, NULL, XML_TOKEN_END } #else diff --git a/xmloff/source/forms/controlelement.cxx b/xmloff/source/forms/controlelement.cxx index 84a74fe44a8b..748cf68c23ed 100644 --- a/xmloff/source/forms/controlelement.cxx +++ b/xmloff/source/forms/controlelement.cxx @@ -59,6 +59,8 @@ namespace xmloff case HIDDEN: return "hidden"; case GRID: return "grid"; case VALUERANGE: return "value-range"; + case TIME: return "time"; + case DATE: return "date"; default: return "generic-control"; } diff --git a/xmloff/source/forms/controlelement.hxx b/xmloff/source/forms/controlelement.hxx index 1816710fb4dc..d226f218f426 100644 --- a/xmloff/source/forms/controlelement.hxx +++ b/xmloff/source/forms/controlelement.hxx @@ -63,6 +63,8 @@ namespace xmloff GRID, VALUERANGE, GENERIC_CONTROL, + TIME, + DATE, UNKNOWN // must be the last element }; diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 115b06c4c2ad..a4cbaa61edec 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -36,6 +36,7 @@ #include "formcellbinding.hxx" #include "formcellbinding.hxx" #include "xformsexport.hxx" +#include "property_meta_data.hxx" /** === begin UNO includes === **/ #include @@ -321,6 +322,9 @@ namespace xmloff #endif } + // "new-style" properties ... + exportGenericHandlerAttributes(); + // common control attributes exportCommonControlAttributes(); @@ -473,6 +477,84 @@ namespace xmloff } } + //--------------------------------------------------------------------- + void OControlExport::exportGenericHandlerAttributes() + { + const Sequence< Property > aProperties = m_xPropertyInfo->getProperties(); + for ( const Property* prop = aProperties.getConstArray(); + prop != aProperties.getConstArray() + aProperties.getLength(); + ++prop + ) + { + try + { + // see if this property can already be handled with an IPropertyHandler (which, on the long + // term, should be the case for most, if not all, properties) + const PropertyDescription* propDescription = metadata::getPropertyDescription( prop->Name ); + if ( propDescription == NULL ) + continue; + + // let the factory provide the concrete handler. Note that caching, if desired, is the task + // of the factory + PPropertyHandler handler = (*propDescription->factory)( propDescription->propertyId ); + ENSURE_OR_CONTINUE( handler.get() != NULL, + "OControlExport::exportGenericHandlerAttributes: invalid property handler provided by the factory!" ); + + ::rtl::OUString attributeValue; + if ( propDescription->propertyGroup == NO_GROUP ) + { + // that's a property which has a direct mapping to an attribute + if ( !shouldExportProperty( prop->Name ) ) + // TODO: in the future, we surely need a more sophisticated approach to this, involving the property + // handler, or the property description + { + exportedProperty( prop->Name ); + continue; + } + + const Any propValue = m_xProps->getPropertyValue( prop->Name ); + attributeValue = handler->getAttributeValue( propValue ); + } + else + { + // that's a property which is part of a group of properties, whose values, in their entity, comprise + // a single attribute value + + // retrieve the descriptions of all other properties which add to the attribute value + PropertyDescriptionList descriptions; + metadata::getPropertyGroup( propDescription->propertyGroup, descriptions ); + + // retrieve the values for all those properties + PropertyValues aValues; + for ( PropertyDescriptionList::iterator prop = descriptions.begin(); + prop != descriptions.end(); + ++prop + ) + { + // TODO: XMultiPropertySet? + const Any propValue = m_xProps->getPropertyValue( (*prop)->propertyName ); + aValues[ (*prop)->propertyId ] = propValue; + } + + // let the handler translate into an XML attribute value + attributeValue = handler->getAttributeValue( aValues ); + } + + AddAttribute( + propDescription->attribute.namespacePrefix, + token::GetXMLToken( propDescription->attribute.attributeToken ), + attributeValue + ); + + exportedProperty( prop->Name ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + } + //--------------------------------------------------------------------- void OControlExport::exportCommonControlAttributes() { @@ -1380,21 +1462,35 @@ namespace xmloff m_nClassId = FormComponentType::CONTROL; DBG_CHECK_PROPERTY( PROPERTY_CLASSID, sal_Int16 ); m_xProps->getPropertyValue(PROPERTY_CLASSID) >>= m_nClassId; + bool knownType = false; switch (m_nClassId) { case FormComponentType::DATEFIELD: + m_eType = DATE; + knownType = true; + // NO BREAK case FormComponentType::TIMEFIELD: + if ( !knownType ) + { + m_eType = TIME; + knownType = true; + } + m_nIncludeSpecial |= SCA_VALIDATION; + // NO BREAK case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: case FormComponentType::PATTERNFIELD: - m_eType = FORMATTED_TEXT; + if ( !knownType ) + { + m_eType = FORMATTED_TEXT; + knownType = true; + } // NO BREAK case FormComponentType::TEXTFIELD: { // it's some kind of edit. To know which type we need further investigation - if (FORMATTED_TEXT != m_eType) - { // not coming from the previous cases which had a class id .ne. TEXTFIELD - + if ( !knownType ) + { // check if it's a formatted field if (m_xPropertyInfo->hasPropertyByName(PROPERTY_FORMATKEY)) { @@ -1430,14 +1526,21 @@ namespace xmloff m_eType = TEXT; } } + knownType = true; } - // attributes which are common to all the four types: + // attributes which are common to all the types: // common attributes m_nIncludeCommon = - CCA_NAME | CCA_SERVICE_NAME | CCA_DISABLED | CCA_VALUE | + CCA_NAME | CCA_SERVICE_NAME | CCA_DISABLED | CCA_PRINTABLE | CCA_TAB_INDEX | CCA_TAB_STOP | CCA_TITLE; + if ( ( m_nClassId != FormComponentType::DATEFIELD ) + && ( m_nClassId != FormComponentType::TIMEFIELD ) + ) + // date and time field values are handled differently nowadays + m_nIncludeCommon |= CCA_VALUE; + // database attributes m_nIncludeDatabase = DA_DATA_FIELD | DA_INPUT_REQUIRED; @@ -1461,8 +1564,7 @@ namespace xmloff // max and min values and validation: if (FORMATTED_TEXT == m_eType) { // in general all controls represented as formatted-text have these props - if (FormComponentType::PATTERNFIELD != m_nClassId) - // but the PatternField does not have value limits + if ( FormComponentType::PATTERNFIELD != m_nClassId ) // except the PatternField m_nIncludeSpecial |= SCA_MAX_VALUE | SCA_MIN_VALUE; if (FormComponentType::TEXTFIELD != m_nClassId) @@ -1471,8 +1573,13 @@ namespace xmloff } // if it's not a password field or rich text control, the CurrentValue needs to be stored, too - if ( PASSWORD != m_eType ) + if ( ( PASSWORD != m_eType ) + && ( DATE != m_eType ) + && ( TIME != m_eType ) + ) + { m_nIncludeCommon |= CCA_CURRENT_VALUE; + } } break; diff --git a/xmloff/source/forms/elementexport.hxx b/xmloff/source/forms/elementexport.hxx index d9504271ac04..a8981f0a1fea 100644 --- a/xmloff/source/forms/elementexport.hxx +++ b/xmloff/source/forms/elementexport.hxx @@ -161,6 +161,13 @@ namespace xmloff */ void exportSubTags() throw (::com::sun::star::uno::Exception); + /** adds the attributes which are handled via generic IPropertyHandlers + +

In the future, this really should be *all* attribiutes, instead of this shitload of + hand-crafted code we have currently ...

+ */ + void exportGenericHandlerAttributes(); + /** adds common control attributes to the XMLExport context given

The attribute list of the context is not cleared initially, this is the responsibility of the caller.

diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index b946c4a20941..3eb5be233f9a 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -28,22 +28,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include #include "elementimport.hxx" -#include -#include -#include +#include "xmloff/xmlimp.hxx" +#include "xmloff/nmspmap.hxx" +#include "xmloff/xmluconv.hxx" #include "strings.hxx" #include "callbacks.hxx" #include "attriblistmerge.hxx" #include "xmlnmspe.hxx" #include "eventimport.hxx" -#include +#include "xmloff/txtstyli.hxx" #include "formenums.hxx" -#include +#include "xmloff/xmltoken.hxx" #include "gridcolumnproptranslator.hxx" -#include -#include +#include "property_description.hxx" +#include "property_meta_data.hxx" /** === begin UNO includes === **/ #include @@ -54,9 +53,13 @@ #include #include /** === end UNO includes === **/ + #include +#include #include #include +#include +#include #include #include @@ -166,18 +169,42 @@ namespace xmloff { } + //--------------------------------------------------------------------- + ::rtl::OUString OElementImport::determineDefaultServiceName() const + { + return ::rtl::OUString(); + } + //--------------------------------------------------------------------- void OElementImport::StartElement(const Reference< sax::XAttributeList >& _rxAttrList) { ENTER_LOG_CONTEXT( "xmloff::OElementImport - importing one element" ); - // call the base class. This should give us enough information (especially the service name) - // to create our UNO element - OPropertyImport::StartElement(_rxAttrList); - // create the element + const SvXMLNamespaceMap& rMap = m_rContext.getGlobalContext().GetNamespaceMap(); + const ::rtl::OUString sImplNameAttribute = rMap.GetQNameByKey( XML_NAMESPACE_FORM, GetXMLToken( XML_CONTROL_IMPLEMENTATION ) ); + const ::rtl::OUString sControlImplementation = _rxAttrList->getValueByName( sImplNameAttribute ); + + // retrieve the service name + if ( sControlImplementation.getLength() > 0 ) + { + ::rtl::OUString sOOoImplementationName; + const sal_uInt16 nImplPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sControlImplementation, &sOOoImplementationName ); + m_sServiceName = ( nImplPrefix == XML_NAMESPACE_OOO ) ? sOOoImplementationName : sControlImplementation; + } + + if ( !m_sServiceName.getLength() ) + determineDefaultServiceName(); + + // create the object *now*. This allows setting properties in the various handleAttribute methods. + // (Though currently not all code is migrated to this pattern, most attributes are still handled + // by remembering the value (via implPushBackPropertyValue), and setting the correct property value + // later (in OControlImport::StartElement).) m_xElement = createElement(); - if ( !m_xInfo.is() && m_xElement.is() ) + if ( m_xElement.is() ) m_xInfo = m_xElement->getPropertySetInfo(); + + // call the base class + OPropertyImport::StartElement( _rxAttrList ); } //--------------------------------------------------------------------- @@ -352,7 +379,7 @@ namespace xmloff m_xInfo = m_xElement->getPropertySetInfo(); } - // determine the type of the value (source forthe following conversion) + // determine the type of the value (source for the following conversion) TypeClass eValueTypeClass = aPropValues->Value.getValueTypeClass(); const sal_Bool bValueIsSequence = TypeClass_SEQUENCE == eValueTypeClass; if ( bValueIsSequence ) @@ -361,7 +388,7 @@ namespace xmloff eValueTypeClass = aSimpleType.getTypeClass(); } - // determine the type of the property (target forthe following conversion) + // determine the type of the property (target for the following conversion) const Property aProperty( m_xInfo->getPropertyByName( aPropValues->Name ) ); TypeClass ePropTypeClass = aProperty.Type.getTypeClass(); const sal_Bool bPropIsSequence = TypeClass_SEQUENCE == ePropTypeClass; @@ -484,38 +511,109 @@ namespace xmloff } //--------------------------------------------------------------------- - void OElementImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + PropertyGroups::const_iterator OElementImport::impl_matchPropertyGroup( const PropertyGroups& i_propertyGroups ) const { - if (!m_sServiceName.getLength() && - token::IsXMLToken( _rLocalName, token::XML_CONTROL_IMPLEMENTATION)) - { // it's the service name + ENSURE_OR_RETURN( m_xInfo.is(), "OElementImport::impl_matchPropertyGroup: no property set info!", i_propertyGroups.end() ); - ::rtl::OUString sImplName; - const sal_uInt16 nImplPrefix = - GetImport().GetNamespaceMap().GetKeyByAttrName( _rValue, - &sImplName ); - m_sServiceName = XML_NAMESPACE_OOO==nImplPrefix ? sImplName - :_rValue; - } - else + for ( PropertyGroups::const_iterator group = i_propertyGroups.begin(); + group != i_propertyGroups.end(); + ++group + ) { - if (!m_sName.getLength() && - token::IsXMLToken( _rLocalName, token::XML_NAME)) + bool missingProp = false; + for ( PropertyDescriptionList::const_iterator prop = group->begin(); + prop != group->end(); + ++prop + ) + { + if ( !m_xInfo->hasPropertyByName( (*prop)->propertyName ) ) + { + missingProp = true; + break; + } + } + + if ( missingProp ) + // try next group + continue; + + return group; + } + + OSL_ENSURE( false, "OElementImport::impl_matchPropertyGroup: no group matched!" ); + return i_propertyGroups.end(); + } + + //--------------------------------------------------------------------- + bool OElementImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + { + if ( token::IsXMLToken( _rLocalName, token::XML_CONTROL_IMPLEMENTATION ) ) + // ignore this, it has already been handled in OElementImport::StartElement + return true; + + if ( token::IsXMLToken( _rLocalName, token::XML_NAME ) ) + { + if ( !m_sName.getLength() ) // remember the name for later use in EndElement m_sName = _rValue; - - // maybe it's the style attribute? - if ( token::IsXMLToken( _rLocalName, token::XML_TEXT_STYLE_NAME ) ) - { - const SvXMLStyleContext* pStyleContext = m_rContext.getStyleElement( _rValue ); - OSL_ENSURE( pStyleContext, "OPropertyImport::handleAttribute: do not know the style!" ); - // remember the element for later usage. - m_pStyleElement = PTR_CAST( XMLTextStyleContext, pStyleContext ); - } - else - // let the base class handle it - OPropertyImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + return true; } + + // maybe it's the style attribute? + if ( token::IsXMLToken( _rLocalName, token::XML_TEXT_STYLE_NAME ) ) + { + const SvXMLStyleContext* pStyleContext = m_rContext.getStyleElement( _rValue ); + OSL_ENSURE( pStyleContext, "OElementImport::handleAttribute: do not know the style!" ); + // remember the element for later usage. + m_pStyleElement = PTR_CAST( XMLTextStyleContext, pStyleContext ); + return true; + } + + // the generic approach (which I hope all props will be migrated to, on the medium term): property handlers + const AttributeDescription attribute( metadata::getAttributeDescription( _nNamespaceKey, _rLocalName ) ); + if ( attribute.attributeToken != XML_TOKEN_INVALID ) + { + PropertyGroups propertyGroups; + metadata::getPropertyGroupList( attribute, propertyGroups ); + const PropertyGroups::const_iterator pos = impl_matchPropertyGroup( propertyGroups ); + if ( pos == propertyGroups.end() ) + return OPropertyImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + + do + { + const PropertyDescriptionList& rProperties( *pos ); + const PropertyDescription* first = *rProperties.begin(); + ENSURE_OR_BREAK( first != NULL, "OElementImport::handleAttribute: invalid property description!" ); + const PPropertyHandler handler = (*first->factory)( first->propertyId ); + ENSURE_OR_BREAK( handler.get() != NULL, "OElementImport::handleAttribute: invalid property handler!" ); + + PropertyValues aValues; + for ( PropertyDescriptionList::const_iterator propDesc = rProperties.begin(); + propDesc != rProperties.end(); + ++propDesc + ) + { + aValues[ (*propDesc)->propertyId ] = Any(); + } + if ( handler->getPropertyValues( _rValue, aValues ) ) + { + for ( PropertyDescriptionList::const_iterator propDesc = rProperties.begin(); + propDesc != rProperties.end(); + ++propDesc + ) + { + implPushBackPropertyValue( (*propDesc)->propertyName, aValues[ (*propDesc)->propertyId ] ); + } + } + } + while ( false ); + + // handled + return true; + } + + // let the base class handle it + return OPropertyImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //--------------------------------------------------------------------- @@ -553,7 +651,7 @@ namespace xmloff { ::rtl::OUString sLocalAttrName = ::rtl::OUString::createFromAscii(_pAttributeName); if ( !encounteredAttribute( sLocalAttrName ) ) - handleAttribute( XML_NAMESPACE_FORM, sLocalAttrName, ::rtl::OUString::createFromAscii( _pAttributeDefault ) ); + OSL_VERIFY( handleAttribute( XML_NAMESPACE_FORM, sLocalAttrName, ::rtl::OUString::createFromAscii( _pAttributeDefault ) ) ); } } @@ -576,6 +674,36 @@ namespace xmloff { } + //--------------------------------------------------------------------- + ::rtl::OUString OControlImport::determineDefaultServiceName() const + { + const sal_Char* pServiceName = NULL; + switch ( m_eElementType ) + { + case OControlElement::TEXT: + case OControlElement::TEXT_AREA: + case OControlElement::PASSWORD: pServiceName = "com.sun.star.form.component.TextField"; break; + case OControlElement::FILE: pServiceName = "com.sun.star.form.component.FileControl"; break; + case OControlElement::FORMATTED_TEXT: pServiceName = "com.sun.star.form.component.FormattedField"; break; + case OControlElement::FIXED_TEXT: pServiceName = "com.sun.star.form.component.FixedText"; break; + case OControlElement::COMBOBOX: pServiceName = "com.sun.star.form.component.ComboBox"; break; + case OControlElement::LISTBOX: pServiceName = "com.sun.star.form.component.ListBox"; break; + case OControlElement::BUTTON: pServiceName = "com.sun.star.form.component.CommandButton"; break; + case OControlElement::IMAGE: pServiceName = "com.sun.star.form.component.ImageButton"; break; + case OControlElement::CHECKBOX: pServiceName = "com.sun.star.form.component.CheckBox"; break; + case OControlElement::RADIO: pServiceName = "com.sun.star.form.component.RadioButton"; break; + case OControlElement::FRAME: pServiceName = "com.sun.star.form.component.GroupBox"; break; + case OControlElement::IMAGE_FRAME: pServiceName = "com.sun.star.form.component.DatabaseImageControl"; break; + case OControlElement::HIDDEN: pServiceName = "com.sun.star.form.component.HiddenControl"; break; + case OControlElement::GRID: pServiceName = "com.sun.star.form.component.GridControl"; break; + case OControlElement::TIME: pServiceName = "com.sun.star.form.component.DateField"; break; + case OControlElement::DATE: pServiceName = "com.sun.star.form.component.TimeField"; break; + } + if ( pServiceName != NULL ) + return ::rtl::OUString::createFromAscii( pServiceName ); + return ::rtl::OUString(); + } + //--------------------------------------------------------------------- void OControlImport::addOuterAttributes(const Reference< sax::XAttributeList >& _rxOuterAttribs) { @@ -584,7 +712,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const sal_Char* pLinkedCellAttributeName = OAttributeMetaData::getBindingAttributeName(BA_LINKED_CELL); @@ -601,66 +729,84 @@ namespace xmloff m_sControlId = _rValue; } } + return true; } - else if ( _rLocalName.equalsAscii( pLinkedCellAttributeName ) ) + + if ( _rLocalName.equalsAscii( pLinkedCellAttributeName ) ) { // it's the address of a spreadsheet cell m_sBoundCellAddress = _rValue; + return true; } - else if ( _nNamespaceKey == XML_NAMESPACE_XFORMS && IsXMLToken( _rLocalName, XML_BIND ) ) + + if ( _nNamespaceKey == XML_NAMESPACE_XFORMS && IsXMLToken( _rLocalName, XML_BIND ) ) { m_sBindingID = _rValue; + return true; } - else if ( _nNamespaceKey == XML_NAMESPACE_FORM && IsXMLToken( _rLocalName, XML_XFORMS_LIST_SOURCE ) ) + + if ( _nNamespaceKey == XML_NAMESPACE_FORM && IsXMLToken( _rLocalName, XML_XFORMS_LIST_SOURCE ) ) { m_sListBindingID = _rValue; + return true; } - else if ( (_nNamespaceKey == XML_NAMESPACE_FORM && IsXMLToken( _rLocalName, XML_XFORMS_SUBMISSION ) ) || - ( _nNamespaceKey == XML_NAMESPACE_XFORMS && IsXMLToken( _rLocalName, XML_SUBMISSION ) ) ) + + if ( ( ( _nNamespaceKey == XML_NAMESPACE_FORM ) + && IsXMLToken( _rLocalName, XML_XFORMS_SUBMISSION ) + ) + || ( ( _nNamespaceKey == XML_NAMESPACE_XFORMS ) + && IsXMLToken( _rLocalName, XML_SUBMISSION ) + ) + ) { m_sSubmissionID = _rValue; + return true; } - else + + if ( OElementImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ) ) + return true; + + static const sal_Char* pValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_VALUE); + static const sal_Char* pCurrentValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_CURRENT_VALUE); + static const sal_Char* pMinValueAttributeName = OAttributeMetaData::getSpecialAttributeName(SCA_MIN_VALUE); + static const sal_Char* pMaxValueAttributeName = OAttributeMetaData::getSpecialAttributeName(SCA_MAX_VALUE); + static const sal_Char* pRepeatDelayAttributeName = OAttributeMetaData::getSpecialAttributeName( SCA_REPEAT_DELAY ); + + sal_Int32 nHandle = -1; + if ( _rLocalName.equalsAscii( pValueAttributeName ) ) + nHandle = PROPID_VALUE; + else if ( _rLocalName.equalsAscii( pCurrentValueAttributeName ) ) + nHandle = PROPID_CURRENT_VALUE; + else if ( _rLocalName.equalsAscii( pMinValueAttributeName ) ) + nHandle = PROPID_MIN_VALUE; + else if ( _rLocalName.equalsAscii( pMaxValueAttributeName ) ) + nHandle = PROPID_MAX_VALUE; + if ( nHandle != -1 ) { - static const sal_Char* pValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_VALUE); - static const sal_Char* pCurrentValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_CURRENT_VALUE); - static const sal_Char* pMinValueAttributeName = OAttributeMetaData::getSpecialAttributeName(SCA_MIN_VALUE); - static const sal_Char* pMaxValueAttributeName = OAttributeMetaData::getSpecialAttributeName(SCA_MAX_VALUE); - static const sal_Char* pRepeatDelayAttributeName = OAttributeMetaData::getSpecialAttributeName( SCA_REPEAT_DELAY ); - - sal_Int32 nHandle = -1; - if ( _rLocalName.equalsAscii( pValueAttributeName ) ) - nHandle = PROPID_VALUE; - else if ( _rLocalName.equalsAscii( pCurrentValueAttributeName ) ) - nHandle = PROPID_CURRENT_VALUE; - else if ( _rLocalName.equalsAscii( pMinValueAttributeName ) ) - nHandle = PROPID_MIN_VALUE; - else if ( _rLocalName.equalsAscii( pMaxValueAttributeName ) ) - nHandle = PROPID_MAX_VALUE; - if ( nHandle != -1 ) - { - // for the moment, simply remember the name and the value - PropertyValue aProp; - aProp.Name = _rLocalName; - aProp.Handle = nHandle; - aProp.Value <<= _rValue; - m_aValueProperties.push_back(aProp); - } - else if ( _rLocalName.equalsAscii( pRepeatDelayAttributeName ) ) - { - ::Time aTime; - sal_Int32 nFractions = 0; - if ( SvXMLUnitConverter::convertTimeDuration( _rValue, aTime, &nFractions ) ) - { - PropertyValue aProp; - aProp.Name = PROPERTY_REPEAT_DELAY; - aProp.Value <<= (sal_Int32)( ( ( aTime.GetMSFromTime() / 1000 ) * 1000 ) + nFractions ); - - implPushBackPropertyValue(aProp); - } - } - else - OElementImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + // for the moment, simply remember the name and the value + PropertyValue aProp; + aProp.Name = _rLocalName; + aProp.Handle = nHandle; + aProp.Value <<= _rValue; + m_aValueProperties.push_back(aProp); + return true; } + + if ( _rLocalName.equalsAscii( pRepeatDelayAttributeName ) ) + { + ::Time aTime; + sal_Int32 nFractions = 0; + if ( SvXMLUnitConverter::convertTimeDuration( _rValue, aTime, &nFractions ) ) + { + PropertyValue aProp; + aProp.Name = PROPERTY_REPEAT_DELAY; + aProp.Value <<= (sal_Int32)( ( ( aTime.GetMSFromTime() / 1000 ) * 1000 ) + nFractions ); + + implPushBackPropertyValue(aProp); + } + return true; + } + + return false; } //--------------------------------------------------------------------- @@ -980,7 +1126,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OImagePositionImport::handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, + bool OImagePositionImport::handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ) { if ( _rLocalName == GetXMLToken( XML_IMAGE_POSITION ) ) @@ -990,16 +1136,19 @@ namespace xmloff _rValue, OEnumMapper::getEnumMap( OEnumMapper::epImagePosition ) ) >>= m_nImagePosition ); m_bHaveImagePosition = sal_True; + return true; } - else if ( _rLocalName == GetXMLToken( XML_IMAGE_ALIGN ) ) + + if ( _rLocalName == GetXMLToken( XML_IMAGE_ALIGN ) ) { OSL_VERIFY( PropertyConversion::convertString( m_rContext.getGlobalContext(), ::getCppuType( &m_nImageAlign ), _rValue, OEnumMapper::getEnumMap( OEnumMapper::epImageAlign ) ) >>= m_nImageAlign ); + return true; } - else - OControlImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); + + return OControlImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //--------------------------------------------------------------------- @@ -1047,14 +1196,16 @@ namespace xmloff } //--------------------------------------------------------------------- - void OReferredControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, + bool OReferredControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const ::rtl::OUString s_sReferenceAttributeName = ::rtl::OUString::createFromAscii(OAttributeMetaData::getCommonControlAttributeName(CCA_FOR)); if (_rLocalName == s_sReferenceAttributeName) + { m_sReferringControls = _rValue; - else - OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + return true; + } + return OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //===================================================================== @@ -1068,7 +1219,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OPasswordImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OPasswordImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const ::rtl::OUString s_sEchoCharAttributeName = ::rtl::OUString::createFromAscii(OAttributeMetaData::getSpecialAttributeName(SCA_ECHO_CHAR)); if (_rLocalName == s_sEchoCharAttributeName) @@ -1083,9 +1234,9 @@ namespace xmloff else aEchoChar.Value <<= (sal_Int16)0; implPushBackPropertyValue(aEchoChar); + return true; } - else - OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + return OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //===================================================================== @@ -1099,7 +1250,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void ORadioImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool ORadioImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { // need special handling for the State & CurrentState properties: // they're stored as booleans, but expected to be int16 properties @@ -1122,9 +1273,9 @@ namespace xmloff implPushBackPropertyValue(aNewValue); } + return true; } - else - OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); + return OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //===================================================================== @@ -1138,7 +1289,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OURLReferenceImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OURLReferenceImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const sal_Char* s_pTargetLocationAttributeName = OAttributeMetaData::getCommonControlAttributeName( CCA_TARGET_LOCATION ); static const sal_Char* s_pImageDataAttributeName = OAttributeMetaData::getCommonControlAttributeName( CCA_IMAGE_DATA ); @@ -1157,18 +1308,18 @@ namespace xmloff if ( bMakeAbsolute && ( _rValue.getLength() > 0 ) ) { // make a global URL out of the local one - ::rtl::OUString sAdjustedValue; - // only resolve image related url - // we don't want say form url targets to be resolved - // using ResolveGraphicObjectURL - if ( 0 == _rLocalName.compareToAscii( s_pImageDataAttributeName ) ) - sAdjustedValue = m_rContext.getGlobalContext().ResolveGraphicObjectURL( _rValue, FALSE ); - else - sAdjustedValue = m_rContext.getGlobalContext().GetAbsoluteReference( _rValue ); - OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, sAdjustedValue ); + ::rtl::OUString sAdjustedValue; + // only resolve image related url + // we don't want say form url targets to be resolved + // using ResolveGraphicObjectURL + if ( 0 == _rLocalName.compareToAscii( s_pImageDataAttributeName ) ) + sAdjustedValue = m_rContext.getGlobalContext().ResolveGraphicObjectURL( _rValue, FALSE ); + else + sAdjustedValue = m_rContext.getGlobalContext().GetAbsoluteReference( _rValue ); + return OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, sAdjustedValue ); } - else - OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); + + return OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //===================================================================== @@ -1205,14 +1356,14 @@ namespace xmloff } //--------------------------------------------------------------------- - void OValueRangeImport::handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ) + bool OValueRangeImport::handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ) { if ( _rLocalName.equalsAscii( OAttributeMetaData::getSpecialAttributeName( SCA_STEP_SIZE ) ) ) { GetImport().GetMM100UnitConverter().convertNumber( m_nStepSizeValue, _rValue ); + return true; } - else - OControlImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); + return OControlImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //--------------------------------------------------------------------- @@ -1535,7 +1686,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OListAndComboImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OListAndComboImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const sal_Char* pListSourceAttributeName = OAttributeMetaData::getDatabaseAttributeName(DA_LIST_SOURCE); if ( _rLocalName.equalsAscii(pListSourceAttributeName) ) @@ -1560,12 +1711,16 @@ namespace xmloff } implPushBackPropertyValue( aListSource ); + return true; } - else if ( _rLocalName.equalsAscii( OAttributeMetaData::getBindingAttributeName( BA_LIST_CELL_RANGE ) ) ) + + if ( _rLocalName.equalsAscii( OAttributeMetaData::getBindingAttributeName( BA_LIST_CELL_RANGE ) ) ) { m_sCellListSource = _rValue; + return true; } - else if ( _rLocalName.equalsAscii( OAttributeMetaData::getBindingAttributeName( BA_LIST_LINKING_TYPE ) ) ) + + if ( _rLocalName.equalsAscii( OAttributeMetaData::getBindingAttributeName( BA_LIST_LINKING_TYPE ) ) ) { sal_Int16 nLinkageType = 0; PropertyConversion::convertString( @@ -1576,9 +1731,10 @@ namespace xmloff ) >>= nLinkageType; m_bLinkWithIndexes = ( nLinkageType != 0 ); + return true; } - else - OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + + return OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //--------------------------------------------------------------------- @@ -1776,7 +1932,9 @@ namespace xmloff || (OControlElement::FORMATTED_TEXT == _eType) || (OControlElement::CHECKBOX == _eType) || (OControlElement::LISTBOX == _eType) - || (OControlElement::COMBOBOX == _eType), + || (OControlElement::COMBOBOX == _eType) + || (OControlElement::TIME == _eType) + || (OControlElement::DATE == _eType), "OColumnWrapperImport::implCreateChildContext: invalid or unrecognized sub element!"); switch (_eType) @@ -1871,19 +2029,25 @@ namespace xmloff } //--------------------------------------------------------------------- - void OFormImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OFormImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { // handle the master/details field attributes (they're way too special to let the OPropertyImport handle them) static const ::rtl::OUString s_sMasterFieldsAttributeName = ::rtl::OUString::createFromAscii(OAttributeMetaData::getFormAttributeName(faMasterFields)); static const ::rtl::OUString s_sDetailFieldsAttributeName = ::rtl::OUString::createFromAscii(OAttributeMetaData::getFormAttributeName(faDetailFiels)); - if (s_sMasterFieldsAttributeName == _rLocalName) + if ( s_sMasterFieldsAttributeName == _rLocalName ) + { implTranslateStringListProperty(PROPERTY_MASTERFIELDS, _rValue); - else if (s_sDetailFieldsAttributeName == _rLocalName) - implTranslateStringListProperty(PROPERTY_DETAILFIELDS, _rValue); + return true; + } - else - OFormImport_Base::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + if ( s_sDetailFieldsAttributeName == _rLocalName ) + { + implTranslateStringListProperty(PROPERTY_DETAILFIELDS, _rValue); + return true; + } + + return OFormImport_Base::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //--------------------------------------------------------------------- diff --git a/xmloff/source/forms/elementimport.hxx b/xmloff/source/forms/elementimport.hxx index 97eb2ec950d3..f48f031854de 100644 --- a/xmloff/source/forms/elementimport.hxx +++ b/xmloff/source/forms/elementimport.hxx @@ -31,6 +31,9 @@ #include "propertyimport.hxx" #include "controlelement.hxx" #include "valueproperties.hxx" +#include "eventimport.hxx" +#include "logging.hxx" +#include "property_description.hxx" /** === begin UNO includes === **/ #include @@ -39,9 +42,8 @@ #include #include /** === end UNO includes === **/ + #include -#include "eventimport.hxx" -#include "logging.hxx" class XMLTextStyleContext; //......................................................................... @@ -132,7 +134,7 @@ namespace xmloff virtual void EndElement(); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); @@ -165,6 +167,10 @@ namespace xmloff /** sets the style properties which have been read for the element (if any) */ void implSetStyleProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ); + + PropertyGroups::const_iterator impl_matchPropertyGroup( const PropertyGroups& i_propertyGroups ) const; + + virtual ::rtl::OUString determineDefaultServiceName() const; }; //===================================================================== @@ -225,7 +231,7 @@ namespace xmloff virtual void EndElement(); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); @@ -239,6 +245,8 @@ namespace xmloff const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >& _rxPropInfo, ::com::sun::star::beans::PropertyValue& /* [in/out] */ _rPropValue); + virtual ::rtl::OUString determineDefaultServiceName() const; + /** registers the given cell address as value binding address for our element

The default implementation simply calls registerCellValueBinding at our import @@ -265,7 +273,6 @@ namespace xmloff // OElementImport overridables virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createElement(); - }; // TODO: @@ -295,7 +302,7 @@ namespace xmloff const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttrList); // OPropertyImport overridables - virtual void handleAttribute( sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ); @@ -321,7 +328,7 @@ namespace xmloff const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttrList); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); }; @@ -339,7 +346,7 @@ namespace xmloff ); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); }; @@ -358,7 +365,7 @@ namespace xmloff protected: // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); }; @@ -380,7 +387,7 @@ namespace xmloff protected: // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); }; @@ -430,7 +437,7 @@ namespace xmloff const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttrList ); // OPropertyImport overridables - virtual void handleAttribute( sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ); }; @@ -516,7 +523,7 @@ namespace xmloff virtual void EndElement(); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); @@ -715,7 +722,7 @@ namespace xmloff sal_uInt16 _nPrefix, const ::rtl::OUString& _rLocalName); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); diff --git a/xmloff/source/forms/form_handler_factory.hxx b/xmloff/source/forms/form_handler_factory.hxx new file mode 100755 index 000000000000..62bf94f74aa8 --- /dev/null +++ b/xmloff/source/forms/form_handler_factory.hxx @@ -0,0 +1,50 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_FORM_HANDLER_FACTORY_HXX +#define XMLOFF_FORM_HANDLER_FACTORY_HXX + +#include "property_handler.hxx" + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= FormHandlerFactory + //================================================================================================================== + class FormHandlerFactory + { + public: + static PPropertyHandler getFormPropertyHandler( const PropertyId i_propertyId ); + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_FORM_HANDLER_FACTORY_HXX diff --git a/xmloff/source/forms/handler/form_handler_factory.cxx b/xmloff/source/forms/handler/form_handler_factory.cxx new file mode 100755 index 000000000000..ccf829d4201f --- /dev/null +++ b/xmloff/source/forms/handler/form_handler_factory.cxx @@ -0,0 +1,90 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_xmloff.hxx" + +#include "form_handler_factory.hxx" +#include "vcl_date_handler.hxx" +#include "vcl_time_handler.hxx" + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + namespace + { + static PPropertyHandler s_pVCLDateHandler = NULL; + static PPropertyHandler s_pVCLTimeHandler = NULL; + } + + //================================================================================================================== + //= FormHandlerFactory + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + PPropertyHandler FormHandlerFactory::getFormPropertyHandler( const PropertyId i_propertyId ) + { + PPropertyHandler pHandler( NULL ); + + switch ( i_propertyId ) + { + case PID_DATE_MIN: + case PID_DATE_MAX: + case PID_DEFAULT_DATE: + case PID_DATE: + if ( s_pVCLDateHandler.get() == NULL ) + { + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if ( s_pVCLDateHandler == NULL ) + s_pVCLDateHandler = new VCLDateHandler(); + } + pHandler = s_pVCLDateHandler; + break; + + case PID_TIME_MIN: + case PID_TIME_MAX: + case PID_DEFAULT_TIME: + case PID_TIME: + if ( s_pVCLTimeHandler.get() == NULL ) + { + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if ( s_pVCLTimeHandler == NULL ) + s_pVCLTimeHandler = new VCLTimeHandler(); + } + pHandler = s_pVCLTimeHandler; + break; + + default: + OSL_ENSURE( false, "FormHandlerFactory::getFormPropertyHandler: unknown property ID!" ); + break; + } + + return pHandler; + } + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... diff --git a/xmloff/source/forms/handler/makefile.mk b/xmloff/source/forms/handler/makefile.mk new file mode 100755 index 000000000000..574537ffd474 --- /dev/null +++ b/xmloff/source/forms/handler/makefile.mk @@ -0,0 +1,55 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=../../.. + +PRJNAME=xmloff +TARGET=form_handlers + +INCEXT=.. + +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE: $(PRJ)/util/makefile.pmk + +# --- Files -------------------------------------------------------- + +SLOFILES = \ + $(SLO)/form_handler_factory.obj \ + $(SLO)/property_handler_base.obj \ + $(SLO)/vcl_date_handler.obj \ + $(SLO)/vcl_time_handler.obj + +# --- Tagets ------------------------------------------------------- + +.INCLUDE : target.mk + +test: + echo $(INCLUDE) \ No newline at end of file diff --git a/xmloff/source/forms/handler/property_handler_base.cxx b/xmloff/source/forms/handler/property_handler_base.cxx new file mode 100755 index 000000000000..d599e0e259fe --- /dev/null +++ b/xmloff/source/forms/handler/property_handler_base.cxx @@ -0,0 +1,61 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_xmloff.hxx" + +#include "property_handler_base.hxx" + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= PropertyHandlerBase + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + PropertyHandlerBase::~PropertyHandlerBase() + { + } + + //------------------------------------------------------------------------------------------------------------------ + oslInterlockedCount SAL_CALL PropertyHandlerBase::acquire() + { + return osl_incrementInterlockedCount( &m_refCount ); + } + + //------------------------------------------------------------------------------------------------------------------ + oslInterlockedCount SAL_CALL PropertyHandlerBase::release() + { + oslInterlockedCount decremented = osl_decrementInterlockedCount( &m_refCount ); + if ( 0 == decremented ) + delete this; + return decremented; + } + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... diff --git a/xmloff/source/forms/handler/property_handler_base.hxx b/xmloff/source/forms/handler/property_handler_base.hxx new file mode 100755 index 000000000000..10adceaa52aa --- /dev/null +++ b/xmloff/source/forms/handler/property_handler_base.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_HANDLER_BASE_HXX +#define XMLOFF_PROPERTY_HANDLER_BASE_HXX + +#include "property_handler.hxx" + +#include + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= PropertyHandlerBase + //================================================================================================================== + class PropertyHandlerBase : public IPropertyHandler + { + protected: + PropertyHandlerBase() + :m_refCount( 0 ) + { + } + + virtual ~PropertyHandlerBase(); + + // IReference + virtual oslInterlockedCount SAL_CALL acquire(); + virtual oslInterlockedCount SAL_CALL release(); + + private: + oslInterlockedCount m_refCount; + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_HANDLER_BASE_HXX diff --git a/xmloff/source/forms/handler/vcl_date_handler.cxx b/xmloff/source/forms/handler/vcl_date_handler.cxx new file mode 100755 index 000000000000..a8404ed04e05 --- /dev/null +++ b/xmloff/source/forms/handler/vcl_date_handler.cxx @@ -0,0 +1,114 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_xmloff.hxx" + +#include "vcl_date_handler.hxx" +#include "xmloff/xmluconv.hxx" + +#include + +#include +#include + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::util::DateTime; + + //================================================================================================================== + //= VCLDateHandler + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + VCLDateHandler::VCLDateHandler() + { + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString VCLDateHandler::getAttributeValue( const PropertyValues& /*i_propertyValues*/ ) const + { + OSL_ENSURE( false, "VCLDateHandler::getAttributeValue: unexpected call!" ); + return ::rtl::OUString(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString VCLDateHandler::getAttributeValue( const Any& i_propertyValue ) const + { + sal_Int32 nVCLDate(0); + OSL_VERIFY( i_propertyValue >>= nVCLDate ); + ::Date aVCLDate( nVCLDate ); + + DateTime aDateTime; // default-inited to 0 + aDateTime.Day = aVCLDate.GetDay(); + aDateTime.Month = aVCLDate.GetMonth(); + aDateTime.Year = aVCLDate.GetYear(); + + ::rtl::OUStringBuffer aBuffer; + SvXMLUnitConverter::convertDateTime( aBuffer, aDateTime, sal_False ); + return aBuffer.makeStringAndClear(); + } + + //------------------------------------------------------------------------------------------------------------------ + bool VCLDateHandler::getPropertyValues( const ::rtl::OUString i_attributeValue, PropertyValues& o_propertyValues ) const + { + sal_Int32 nVCLDate(0); + + DateTime aDateTime; + if ( SvXMLUnitConverter::convertDateTime( aDateTime, i_attributeValue ) ) + { + ::Date aVCLDate( aDateTime.Day, aDateTime.Month, aDateTime.Year ); + nVCLDate = aVCLDate.GetDate(); + } + else + { + // compatibility format, before we wrote those values in XML-schema compatible form + if ( !SvXMLUnitConverter::convertNumber( nVCLDate, i_attributeValue ) ) + { + OSL_ENSURE( false, "VCLDateHandler::getPropertyValues: unknown date format (no XML-schema date, no legacy integer)!" ); + return false; + } + } + + const Any aPropertyValue( makeAny( nVCLDate ) ); + + OSL_ENSURE( o_propertyValues.size() == 1, "VCLDateHandler::getPropertyValues: date strings represent exactly one property - not more, not less!" ); + for ( PropertyValues::iterator prop = o_propertyValues.begin(); + prop != o_propertyValues.end(); + ++prop + ) + { + prop->second = aPropertyValue; + } + return true; + } + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... diff --git a/xmloff/source/forms/handler/vcl_date_handler.hxx b/xmloff/source/forms/handler/vcl_date_handler.hxx new file mode 100755 index 000000000000..44a7f7395ceb --- /dev/null +++ b/xmloff/source/forms/handler/vcl_date_handler.hxx @@ -0,0 +1,55 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_VCL_DATE_HANDLER_HXX +#define XMLOFF_VCL_DATE_HANDLER_HXX + +#include "property_handler_base.hxx" + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= VCLDateHandler + //================================================================================================================== + class VCLDateHandler : public PropertyHandlerBase + { + public: + VCLDateHandler(); + + // IPropertyHandler + virtual ::rtl::OUString getAttributeValue( const PropertyValues& i_propertyValues ) const; + virtual ::rtl::OUString getAttributeValue( const ::com::sun::star::uno::Any& i_propertyValue ) const; + virtual bool getPropertyValues( const ::rtl::OUString i_attributeValue, PropertyValues& o_propertyValues ) const; + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_VCL_DATE_HANDLER_HXX diff --git a/xmloff/source/forms/handler/vcl_time_handler.cxx b/xmloff/source/forms/handler/vcl_time_handler.cxx new file mode 100755 index 000000000000..98ea739d04a4 --- /dev/null +++ b/xmloff/source/forms/handler/vcl_time_handler.cxx @@ -0,0 +1,115 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_xmloff.hxx" + +#include "vcl_time_handler.hxx" +#include "xmloff/xmluconv.hxx" + +#include + +#include +#include + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::util::DateTime; + + //================================================================================================================== + //= VCLTimeHandler + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + VCLTimeHandler::VCLTimeHandler() + { + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString VCLTimeHandler::getAttributeValue( const PropertyValues& /*i_propertyValues*/ ) const + { + OSL_ENSURE( false, "VCLTimeHandler::getAttributeValue: unexpected call!" ); + return ::rtl::OUString(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString VCLTimeHandler::getAttributeValue( const Any& i_propertyValue ) const + { + sal_Int32 nVCLTime(0); + OSL_VERIFY( i_propertyValue >>= nVCLTime ); + ::Time aVCLTime( nVCLTime ); + + DateTime aDateTime; // default-inited to 0 + aDateTime.Hours = aVCLTime.GetHour(); + aDateTime.Minutes = aVCLTime.GetMin(); + aDateTime.Seconds = aVCLTime.GetSec(); + aDateTime.HundredthSeconds = aVCLTime.Get100Sec(); + + ::rtl::OUStringBuffer aBuffer; + SvXMLUnitConverter::convertTime( aBuffer, aDateTime ); + return aBuffer.makeStringAndClear(); + } + + //------------------------------------------------------------------------------------------------------------------ + bool VCLTimeHandler::getPropertyValues( const ::rtl::OUString i_attributeValue, PropertyValues& o_propertyValues ) const + { + sal_Int32 nVCLTime(0); + + DateTime aDateTime; + if ( SvXMLUnitConverter::convertTime( aDateTime, i_attributeValue ) ) + { + ::Time aVCLTime( aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.HundredthSeconds ); + nVCLTime = aVCLTime.GetTime(); + } + else + { + // compatibility format, before we wrote those values in XML-schema compatible form + if ( !SvXMLUnitConverter::convertNumber( nVCLTime, i_attributeValue ) ) + { + OSL_ENSURE( false, "VCLTimeHandler::getPropertyValues: unknown time format (no XML-schema time, no legacy integer)!" ); + return false; + } + } + + const Any aPropertyValue( makeAny( nVCLTime ) ); + + OSL_ENSURE( o_propertyValues.size() == 1, "VCLTimeHandler::getPropertyValues: time strings represent exactly one property - not more, not less!" ); + for ( PropertyValues::iterator prop = o_propertyValues.begin(); + prop != o_propertyValues.end(); + ++prop + ) + { + prop->second = aPropertyValue; + } + return true; + } + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... diff --git a/xmloff/source/forms/handler/vcl_time_handler.hxx b/xmloff/source/forms/handler/vcl_time_handler.hxx new file mode 100755 index 000000000000..7ed6f0aa5730 --- /dev/null +++ b/xmloff/source/forms/handler/vcl_time_handler.hxx @@ -0,0 +1,55 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_VCL_TIME_HANDLER_HXX +#define XMLOFF_VCL_TIME_HANDLER_HXX + +#include "property_handler_base.hxx" + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= VCLTimeHandler + //================================================================================================================== + class VCLTimeHandler : public PropertyHandlerBase + { + public: + VCLTimeHandler(); + + // IPropertyHandler + virtual ::rtl::OUString getAttributeValue( const PropertyValues& i_propertyValues ) const; + virtual ::rtl::OUString getAttributeValue( const ::com::sun::star::uno::Any& i_propertyValue ) const; + virtual bool getPropertyValues( const ::rtl::OUString i_attributeValue, PropertyValues& o_propertyValues ) const; + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_VCL_TIME_HANDLER_HXX diff --git a/xmloff/source/forms/makefile.mk b/xmloff/source/forms/makefile.mk index 8c46a4fbf3c9..fa2a6ea7d235 100644 --- a/xmloff/source/forms/makefile.mk +++ b/xmloff/source/forms/makefile.mk @@ -64,6 +64,8 @@ SLOFILES = \ $(SLO)$/logging.obj \ $(SLO)$/formcellbinding.obj \ $(SLO)$/gridcolumnproptranslator.obj \ + \ + $(SLO)/property_meta_data.obj # --- Tagets ------------------------------------------------------- diff --git a/xmloff/source/forms/property_description.hxx b/xmloff/source/forms/property_description.hxx new file mode 100755 index 000000000000..8e9aa9cb616e --- /dev/null +++ b/xmloff/source/forms/property_description.hxx @@ -0,0 +1,140 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_DESCRIPTION_HXX +#define XMLOFF_PROPERTY_DESCRIPTION_HXX + +#include "property_handler.hxx" +#include "property_group.hxx" + +#include "xmloff/xmltoken.hxx" + +#include +#include + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= PropertyDescription + //================================================================================================================== + struct AttributeDescription + { + sal_uInt16 namespacePrefix; // usually XML_NAMESPACE_FORM + ::xmloff::token::XMLTokenEnum attributeToken; + + AttributeDescription() + :namespacePrefix( 0 ) + ,attributeToken( ::xmloff::token::XML_TOKEN_INVALID ) + { + } + + AttributeDescription( + const sal_uInt16 i_namespacePrefix, + const ::xmloff::token::XMLTokenEnum i_attributeToken + ) + :namespacePrefix( i_namespacePrefix ) + ,attributeToken( i_attributeToken ) + { + } + }; + + //.................................................................................................................. + inline bool operator==( const AttributeDescription& i_lhs, const AttributeDescription& i_rhs ) + { + return ( i_lhs.namespacePrefix == i_rhs.namespacePrefix ) + && ( i_lhs.attributeToken == i_rhs.attributeToken ); + } + + //================================================================================================================== + //= PropertyDescription + //================================================================================================================== + struct PropertyDescription + { + /// is the name of the property + const ::rtl::OUString propertyName; + /** denotes the attribute which represents the property. Note that multiple properties might comprise a single + attribute value. + */ + const AttributeDescription attribute; + /// is the factory for creating a handler for reading and writing the property + const PropertyHandlerFactory factory; + /// the unique ID of the property. The property meta data table must not contain two entries with the same property ID + const PropertyId propertyId; + /** the group which the property belongs to. Multiple properties belonging to the same group will, all together, + define the attribute value to be written into the ODF file. + + Consequently, properties which have the same |propertyGroup| value must also have the same |attribute| + and the same |factory| value, with the only exception being NO_GROUP properties. + + Note that the other direction is not given: It is perfectly legitimate to map the same attribute to different + (disjunct) property groups. + */ + const PropertyGroup propertyGroup; + + PropertyDescription() + :propertyName() + ,attribute() + ,factory( NULL ) + ,propertyId( PID_INVALID ) + ,propertyGroup( NO_GROUP ) + { + } + + PropertyDescription( + const ::rtl::OUString& i_propertyName, + const sal_uInt16 i_namespacePrefix, + const ::xmloff::token::XMLTokenEnum i_attributeToken, + const PropertyHandlerFactory i_factory, + const PropertyId i_propertyId, + const PropertyGroup i_propertyGroup + ) + :propertyName( i_propertyName ) + ,attribute( i_namespacePrefix, i_attributeToken ) + ,factory( i_factory ) + ,propertyId( i_propertyId ) + ,propertyGroup( i_propertyGroup ) + { + } + }; + + //================================================================================================================== + //= PropertyDescriptionList + //================================================================================================================== + typedef ::std::vector< const PropertyDescription* > PropertyDescriptionList; + + //================================================================================================================== + //= PropertyGroups + //================================================================================================================== + typedef ::std::list< PropertyDescriptionList > PropertyGroups; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_DESCRIPTION_HXX diff --git a/xmloff/source/forms/property_group.hxx b/xmloff/source/forms/property_group.hxx new file mode 100755 index 000000000000..bca354f14e92 --- /dev/null +++ b/xmloff/source/forms/property_group.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_GROUP_HXX +#define XMLOFF_PROPERTY_GROUP_HXX + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= PropertyGroup + //================================================================================================================== + enum PropertyGroup + { + NO_GROUP + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_GROUP_HXX diff --git a/xmloff/source/forms/property_handler.hxx b/xmloff/source/forms/property_handler.hxx new file mode 100755 index 000000000000..247b4f17f798 --- /dev/null +++ b/xmloff/source/forms/property_handler.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_HANDLER_HXX +#define XMLOFF_PROPERTY_HANDLER_HXX + +#include "property_ids.hxx" + +#include + +#include + +#include +#include + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + typedef ::std::map< PropertyId, ::com::sun::star::uno::Any > PropertyValues; + + //================================================================================================================== + //= IPropertyHandler + //================================================================================================================== + class IPropertyHandler : public ::rtl::IReference + { + public: + /** retrieves the XML attribute value for the given property values + */ + virtual ::rtl::OUString + getAttributeValue( const PropertyValues& i_propertyValues ) const = 0; + + /** is a convenience method for XML attributes whose value comprises of only one UNO API property + */ + virtual ::rtl::OUString + getAttributeValue( const ::com::sun::star::uno::Any& i_propertyValue ) const = 0; + + /** retrieves the values of the properties controlled by an XML attributed, described by a given attribute value + */ + virtual bool + getPropertyValues( const ::rtl::OUString i_attributeValue, PropertyValues& o_propertyValues ) const = 0; + + virtual ~IPropertyHandler() { } + }; + + //================================================================================================================== + //= PPropertyHandler + //================================================================================================================== + typedef ::rtl::Reference< IPropertyHandler > PPropertyHandler; + + //================================================================================================================== + //= PropertyHandlerFactory + //================================================================================================================== + typedef PPropertyHandler (*PropertyHandlerFactory)( const PropertyId i_propertyId ); + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_HANDLER_HXX diff --git a/xmloff/source/forms/property_ids.hxx b/xmloff/source/forms/property_ids.hxx new file mode 100755 index 000000000000..31004f2d9ff2 --- /dev/null +++ b/xmloff/source/forms/property_ids.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_IDS_HXX +#define XMLOFF_PROPERTY_IDS_HXX + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= PropertyId + //================================================================================================================== + enum PropertyId + { + PID_DATE_MIN, + PID_DATE_MAX, + PID_DEFAULT_DATE, + PID_DATE, + PID_TIME_MIN, + PID_TIME_MAX, + PID_DEFAULT_TIME, + PID_TIME, + + PID_INVALID + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_IDS_HXX diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx new file mode 100755 index 000000000000..a907112dbe58 --- /dev/null +++ b/xmloff/source/forms/property_meta_data.cxx @@ -0,0 +1,264 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_xmloff.hxx" + +#include "property_description.hxx" +#include "form_handler_factory.hxx" +#include "strings.hxx" +#include "xmloff/xmltoken.hxx" +#include "xmlnmspe.hxx" + +#include +#include + +#include + +//...................................................................................................................... +namespace xmloff { namespace metadata +{ +//...................................................................................................................... + + using namespace ::xmloff::token; + +#define FORM_SINGLE_PROPERTY( id, att ) \ + PropertyDescription( PROPERTY_##id, XML_NAMESPACE_FORM, att, &FormHandlerFactory::getFormPropertyHandler, PID_##id, NO_GROUP ) + + //================================================================================================================== + //= property meta data + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + static const PropertyDescription s_propertyMetaData[] = + { + FORM_SINGLE_PROPERTY( DATE_MIN, XML_MIN_VALUE ), + FORM_SINGLE_PROPERTY( DATE_MAX, XML_MAX_VALUE ), + FORM_SINGLE_PROPERTY( DEFAULT_DATE, XML_VALUE ), + FORM_SINGLE_PROPERTY( DATE, XML_CURRENT_VALUE ), + FORM_SINGLE_PROPERTY( TIME_MIN, XML_MIN_VALUE ), + FORM_SINGLE_PROPERTY( TIME_MAX, XML_MAX_VALUE ), + FORM_SINGLE_PROPERTY( DEFAULT_TIME, XML_VALUE ), + FORM_SINGLE_PROPERTY( TIME, XML_CURRENT_VALUE ), + + PropertyDescription() + }; + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + // TODO: instead of having all of the below static, it should be some per-instance data. This way, the + // approach used here would scale much better. + // That is, if you have multiple "meta data instances", which manage a small, but closed set of properties, + // then looking looking through those multiple instances would probably be faster than searching within + // one big instance, since in this case, every instance can quickly decide whether it is responsible + // for some attribute or property, and otherwise delegate to the next instance. + + //.............................................................................................................. + typedef ::std::hash_map< ::rtl::OUString, const PropertyDescription*, ::rtl::OUStringHash > DescriptionsByName; + + //.............................................................................................................. + const DescriptionsByName& lcl_getPropertyDescriptions() + { + DBG_TESTSOLARMUTEX(); + static DescriptionsByName s_propertyDescriptionsByName; + if ( s_propertyDescriptionsByName.empty() ) + { + const PropertyDescription* desc = s_propertyMetaData; + while ( desc->propertyName.getLength() != 0 ) + { + s_propertyDescriptionsByName[ desc->propertyName ] = desc; + ++desc; + } + } + return s_propertyDescriptionsByName; + } + + //.............................................................................................................. + typedef ::std::map< PropertyGroup, PropertyDescriptionList > IndexedPropertyGroups; + + //.............................................................................................................. + const IndexedPropertyGroups& lcl_getIndexedPropertyGroups() + { + DBG_TESTSOLARMUTEX(); + static IndexedPropertyGroups s_indexedPropertyGroups; + if ( s_indexedPropertyGroups.empty() ) + { + const PropertyDescription* desc = s_propertyMetaData; + while ( desc->propertyName.getLength() != 0 ) + { + if ( desc->propertyGroup != NO_GROUP ) + s_indexedPropertyGroups[ desc->propertyGroup ].push_back( desc ); + ++desc; + } + } + return s_indexedPropertyGroups; + } + + //.............................................................................................................. + typedef ::std::hash_map< ::rtl::OUString, XMLTokenEnum, ::rtl::OUStringHash > ReverseTokenLookup; + + //.............................................................................................................. + const ReverseTokenLookup& getReverseTokenLookup() + { + DBG_TESTSOLARMUTEX(); + static ReverseTokenLookup s_reverseTokenLookup; + if ( s_reverseTokenLookup.empty() ) + { + const PropertyDescription* desc = s_propertyMetaData; + while ( desc->propertyName.getLength() != 0 ) + { + s_reverseTokenLookup[ token::GetXMLToken( desc->attribute.attributeToken ) ] = desc->attribute.attributeToken; + ++desc; + } + } + return s_reverseTokenLookup; + } + + //.............................................................................................................. + struct AttributeHash : public ::std::unary_function< AttributeDescription, size_t > + { + size_t operator()( const AttributeDescription& i_attribute ) const + { + return size_t( i_attribute.attributeToken * 100 ) + size_t( i_attribute.namespacePrefix ); + } + }; + + //.............................................................................................................. + typedef ::std::hash_multimap< AttributeDescription, PropertyGroup, AttributeHash > AttributeGroups; + + //.............................................................................................................. + const AttributeGroups& lcl_getAttributeGroups() + { + DBG_TESTSOLARMUTEX(); + static AttributeGroups s_attributeGroups; + if ( s_attributeGroups.empty() ) + { + const PropertyDescription* desc = s_propertyMetaData; + while ( desc->propertyName.getLength() != 0 ) + { + if ( desc->propertyGroup != NO_GROUP ) + s_attributeGroups.insert( AttributeGroups::value_type( desc->attribute, desc->propertyGroup ) ); + ++desc; + } + } + return s_attributeGroups; + } + + //.............................................................................................................. + typedef ::std::hash_map< AttributeDescription, PropertyGroups, AttributeHash > AttributesWithoutGroup; + + //.............................................................................................................. + const AttributesWithoutGroup& lcl_getAttributesWithoutGroups() + { + DBG_TESTSOLARMUTEX(); + static AttributesWithoutGroup s_attributesWithoutGroup; + if ( s_attributesWithoutGroup.empty() ) + { + const PropertyDescription* desc = s_propertyMetaData; + while ( desc->propertyName.getLength() != 0 ) + { + if ( desc->propertyGroup == NO_GROUP ) + { + PropertyDescriptionList singleElementList; + singleElementList.push_back( desc ); + + s_attributesWithoutGroup[ desc->attribute ].push_back( singleElementList ); + } + ++desc; + } + } + return s_attributesWithoutGroup; + } + } + + //------------------------------------------------------------------------------------------------------------------ + const PropertyDescription* getPropertyDescription( const ::rtl::OUString& i_propertyName ) + { + const DescriptionsByName& rAllDescriptions( lcl_getPropertyDescriptions() ); + DescriptionsByName::const_iterator pos = rAllDescriptions.find( i_propertyName ); + if ( pos != rAllDescriptions.end() ) + return pos->second; + return NULL; + } + + //------------------------------------------------------------------------------------------------------------------ + void getPropertyGroup( const PropertyGroup i_propertyGroup, PropertyDescriptionList& o_propertyDescriptions ) + { + OSL_ENSURE( i_propertyGroup != NO_GROUP, "xmloff::metadata::getPropertyGroup: illegal group!" ); + + const IndexedPropertyGroups& rPropertyGroups( lcl_getIndexedPropertyGroups() ); + const IndexedPropertyGroups::const_iterator pos = rPropertyGroups.find( i_propertyGroup ); + if ( pos != rPropertyGroups.end() ) + o_propertyDescriptions = pos->second; + } + + //------------------------------------------------------------------------------------------------------------------ + void getPropertyGroupList( const AttributeDescription& i_attribute, PropertyGroups& o_propertyGroups ) + { + const AttributeGroups& rAttributeGroups = lcl_getAttributeGroups(); + + ::std::pair< AttributeGroups::const_iterator, AttributeGroups::const_iterator > + range = rAttributeGroups.equal_range( i_attribute ); + + if ( range.first == range.second ) + { + // the attribute is not used for any non-trivial group, which means it is mapped directly to + // a single property + const AttributesWithoutGroup& attributesWithoutGroups( lcl_getAttributesWithoutGroups() ); + const AttributesWithoutGroup::const_iterator pos = attributesWithoutGroups.find( i_attribute ); + if ( pos != attributesWithoutGroups.end() ) + o_propertyGroups = pos->second; + } + else + { + const IndexedPropertyGroups& rPropertyGroups = lcl_getIndexedPropertyGroups(); + for ( AttributeGroups::const_iterator group = range.first; group != range.second; ++group ) + { + const PropertyGroup propGroup = group->second; + const IndexedPropertyGroups::const_iterator groupPos = rPropertyGroups.find( propGroup ); + ENSURE_OR_CONTINUE( groupPos != rPropertyGroups.end(), "getPropertyGroupList: inconsistency!" ); + o_propertyGroups.push_back( groupPos->second ); + } + } + } + + //------------------------------------------------------------------------------------------------------------------ + AttributeDescription getAttributeDescription( const sal_uInt16 i_namespacePrefix, const ::rtl::OUString& i_attributeName ) + { + AttributeDescription attribute; + + const ReverseTokenLookup& rTokenLookup( getReverseTokenLookup() ); + const ReverseTokenLookup::const_iterator pos = rTokenLookup.find( i_attributeName ); + if ( pos != rTokenLookup.end() ) + { + attribute.namespacePrefix = i_namespacePrefix; + attribute.attributeToken = pos->second; + } + return attribute; + } + +//...................................................................................................................... +} } // namespace xmloff::metadata +//...................................................................................................................... diff --git a/xmloff/source/forms/property_meta_data.hxx b/xmloff/source/forms/property_meta_data.hxx new file mode 100755 index 000000000000..f246a7bfd745 --- /dev/null +++ b/xmloff/source/forms/property_meta_data.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_META_DATA_HXX +#define XMLOFF_PROPERTY_META_DATA_HXX + +#include "property_description.hxx" + +//...................................................................................................................... +namespace xmloff { namespace metadata +{ +//...................................................................................................................... + + const PropertyDescription* getPropertyDescription( const ::rtl::OUString& i_propertyName ); + + /** retries the descriptions of all properties which add to the given XML attribute + +

Effectively, the complete property map is search for all entries which have the given + namespace/attribute values.

+ */ + void getPropertyGroup( + const PropertyGroup i_propertyGroup, + PropertyDescriptionList& o_propertyDescriptions + ); + + /** retrieves all known property groups which are mapped to the given attribute + */ + void getPropertyGroupList( + const AttributeDescription& i_attribute, + PropertyGroups& o_propertyGroups + ); + + /** retrieves the attribute descriptor for the attribute given by namespace prefix and attribute name + */ + AttributeDescription + getAttributeDescription( const sal_uInt16 i_namespacePrefix, const ::rtl::OUString& i_attributeName ); + +//...................................................................................................................... +} } // namespace xmloff::metadata +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_META_DATA_HXX diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 2a485566cf9d..7d84e5a60a1f 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -72,6 +71,8 @@ namespace xmloff OPropertyExport::OPropertyExport(IFormsExportContext& _rContext, const Reference< XPropertySet >& _rxProps) :m_rContext(_rContext) ,m_xProps(_rxProps) + ,m_xPropertyInfo( m_xProps->getPropertySetInfo() ) + ,m_xPropertyState( _rxProps, UNO_QUERY ) { // caching ::rtl::OUStringBuffer aBuffer; @@ -80,13 +81,24 @@ namespace xmloff m_rContext.getGlobalContext().GetMM100UnitConverter().convertBool(aBuffer, sal_False); m_sValueFalse = aBuffer.makeStringAndClear(); - m_xPropertyInfo = m_xProps->getPropertySetInfo(); OSL_ENSURE(m_xPropertyInfo.is(), "OPropertyExport::OPropertyExport: need an XPropertySetInfo!"); // collect the properties which need to be exported examinePersistence(); } + //--------------------------------------------------------------------- + bool OPropertyExport::shouldExportProperty( const ::rtl::OUString& i_propertyName ) const + { + // if the property state is DEFAULT, it does not need to be written - at least + // if it's a built-in property, and not a dynamically-added one. + bool bIsDefaultValue = m_xPropertyState.is() + && ( PropertyState_DEFAULT_VALUE == m_xPropertyState->getPropertyState( i_propertyName ) ); + bool bIsDynamicProperty = m_xPropertyInfo.is() + && ( ( m_xPropertyInfo->getPropertyByName( i_propertyName ).Attributes & PropertyAttribute::REMOVEABLE ) != 0 ); + return ( !bIsDefaultValue || bIsDynamicProperty ); + } + //--------------------------------------------------------------------- void OPropertyExport::exportRemainingProperties() { @@ -95,9 +107,6 @@ namespace xmloff try { - Reference< XPropertyState > xPropertyState( m_xProps, UNO_QUERY ); - Reference< XPropertySetInfo > xPSI( m_xProps->getPropertySetInfo() ); - Any aValue; ::rtl::OUString sValue; @@ -112,13 +121,7 @@ namespace xmloff #if OSL_DEBUG_LEVEL > 0 const ::rtl::OUString sPropertyName = *aProperty; (void)sPropertyName; #endif - // if the property state is DEFAULT, it does not need to be written - at least - // if it's a built-in property, and not a dynamically-added one. - bool bIsDefaultValue = xPropertyState.is() - && ( PropertyState_DEFAULT_VALUE == xPropertyState->getPropertyState( *aProperty ) ); - bool bIsDynamicProperty = xPSI.is() - && ( ( xPSI->getPropertyByName( *aProperty ).Attributes & PropertyAttribute::REMOVEABLE ) != 0 ); - if ( bIsDefaultValue && !bIsDynamicProperty ) + if ( !shouldExportProperty( *aProperty ) ) continue; // now that we have the first sub-tag we need the form:properties element diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index ab17912e4df4..3ddfd8d4cabd 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -31,6 +31,7 @@ #include "formattributes.hxx" #include #include +#include #include #include #include "callbacks.hxx" @@ -74,10 +75,12 @@ namespace xmloff protected: IFormsExportContext& m_rContext; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > - m_xProps; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > - m_xPropertyInfo; + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > + m_xProps; + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + m_xPropertyInfo; + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState > + m_xPropertyState; // caching ::rtl::OUString m_sValueTrue; @@ -308,6 +311,14 @@ namespace xmloff const sal_Unicode _aQuoteCharacter = '"', const sal_Unicode _aListSeparator = ','); + /** determines whether the given property is to be exported + +

Currently, the method simply checks whether the property's state is not PropertyState.DEFAULT, + or whether the property is a dynamic property (i.e. added via an XPropertyContainer). + So, take care when using the method - the heuristics is not applicable for all properties.

+ */ + bool shouldExportProperty( const ::rtl::OUString& i_propertyName ) const; + /** tries to convert an arbitrary Any into an string

If the type contained in the Any is not supported, the returned string will be empty. In the diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 45fa2f5b4744..9d8e7be994f3 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -349,7 +349,7 @@ _rChars } //--------------------------------------------------------------------- -void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) +bool OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { const OAttribute2Property::AttributeAssignment* pProperty = m_rContext.getAttributeMap().getAttributeTranslation(_rLocalName); if (pProperty) @@ -361,9 +361,10 @@ void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl // convert the value string into the target type aNewValue.Value = PropertyConversion::convertString(m_rContext.getGlobalContext(), pProperty->aPropertyType, _rValue, pProperty->pEnumMap, pProperty->bInverseSemantics); implPushBackPropertyValue( aNewValue ); + return true; } #if OSL_DEBUG_LEVEL > 0 - else if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for + if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for { ::rtl::OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" ); sMessage += ::rtl::OString( " Attribute name: " ); @@ -371,7 +372,9 @@ void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl sMessage += ::rtl::OString( "\n value: " ); sMessage += ::rtl::OString( _rValue.getStr(), _rValue.getLength(), osl_getThreadTextEncoding() ); OSL_ENSURE( sal_False, sMessage.getStr() ); + return false; } + return true; #endif } diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx index 30bc8bb1d617..d46c0068f090 100644 --- a/xmloff/source/forms/propertyimport.hxx +++ b/xmloff/source/forms/propertyimport.hxx @@ -119,7 +119,7 @@ namespace xmloff @param _rValue attribute value */ - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx index 1c44db963944..8bf9ae7bcd57 100644 --- a/xmloff/source/forms/valueproperties.cxx +++ b/xmloff/source/forms/valueproperties.cxx @@ -65,16 +65,6 @@ namespace xmloff } break; - case FormComponentType::DATEFIELD: - _rpCurrentValuePropertyName = PROPERTY_DATE; - _rpValuePropertyName = PROPERTY_DEFAULT_DATE; - break; - - case FormComponentType::TIMEFIELD: - _rpCurrentValuePropertyName = PROPERTY_TIME; - _rpValuePropertyName = PROPERTY_DEFAULT_TIME; - break; - case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: _rpCurrentValuePropertyName = PROPERTY_VALUE; @@ -108,6 +98,10 @@ namespace xmloff _rpCurrentValuePropertyName = PROPERTY_SPINVALUE; _rpValuePropertyName = PROPERTY_DEFAULT_SPINVALUE; break; + + default: + OSL_ENSURE( false, "OValuePropertiesMetaData::getValuePropertyNames: unsupported component type!" ); + break; } } @@ -119,16 +113,6 @@ namespace xmloff _rpMinValuePropertyName = _rpMaxValuePropertyName = NULL; switch (_nFormComponentType) { - case FormComponentType::DATEFIELD: - _rpMinValuePropertyName = PROPERTY_DATE_MIN; - _rpMaxValuePropertyName = PROPERTY_DATE_MAX; - break; - - case FormComponentType::TIMEFIELD: - _rpMinValuePropertyName = PROPERTY_TIME_MIN; - _rpMaxValuePropertyName = PROPERTY_TIME_MAX; - break; - case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: _rpMinValuePropertyName = PROPERTY_VALUE_MIN; @@ -149,6 +133,10 @@ namespace xmloff _rpMinValuePropertyName = PROPERTY_SPINVALUE_MIN; _rpMaxValuePropertyName = PROPERTY_SPINVALUE_MAX; break; + + default: + OSL_ENSURE( false, "OValuePropertiesMetaData::getValueLimitPropertyNames: unsupported component type!" ); + break; } } @@ -175,7 +163,15 @@ namespace xmloff break; case FormComponentType::DATEFIELD: + _rpValuePropertyName = PROPERTY_DATE; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_DATE; + break; + case FormComponentType::TIMEFIELD: + _rpValuePropertyName = PROPERTY_TIME; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TIME; + break; + case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: case FormComponentType::PATTERNFIELD: diff --git a/xmloff/util/makefile.mk b/xmloff/util/makefile.mk index b8745b6b8fff..da8a2ca91f13 100644 --- a/xmloff/util/makefile.mk +++ b/xmloff/util/makefile.mk @@ -48,6 +48,7 @@ LIB1FILES= \ $(SLB)$/draw.lib \ $(SLB)$/chart.lib \ $(SLB)$/forms.lib \ + $(SLB)$/form_handlers.lib \ $(SLB)$/xforms.lib \ $(SLB)$/table.lib From 3810e697af86a7e044d5ae305a172bfec23ab166 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 15 Sep 2010 13:55:35 +0200 Subject: [PATCH 119/279] dba34a: #i110304# when converting a string to a css.util.DateTime, don't go the way via a float, as it causes rounding errors --- xmloff/source/core/xmluconv.cxx | 86 +++++++++++++++------------------ 1 file changed, 40 insertions(+), 46 deletions(-) diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 28abf2edbcbd..4a748f99ec54 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -874,32 +874,27 @@ void SvXMLUnitConverter::convertTime( ::rtl::OUStringBuffer& rBuffer, } /** convert ISO Time String to double; negative durations allowed */ -sal_Bool SvXMLUnitConverter::convertTime( double& fTime, - const ::rtl::OUString& rString) +static bool lcl_convertTime( const ::rtl::OUString& rString, sal_Int32& o_rDays, sal_Int32& o_rHours, sal_Int32& o_rMins, + sal_Int32& o_rSecs, sal_Bool& o_rIsNegativeTime, double& o_rFractionalSecs ) { rtl::OUString aTrimmed = rString.trim().toAsciiUpperCase(); const sal_Unicode* pStr = aTrimmed.getStr(); // negative time duration? - sal_Bool bIsNegativeDuration = sal_False; if ( sal_Unicode('-') == (*pStr) ) { - bIsNegativeDuration = sal_True; + o_rIsNegativeTime = sal_True; pStr++; } if ( *(pStr++) != sal_Unicode('P') ) // duration must start with "P" - return sal_False; + return false; - rtl::OUString sDoubleStr; - sal_Bool bSuccess = sal_True; + ::rtl::OUString sDoubleStr; + sal_Bool bSuccess = true; sal_Bool bDone = sal_False; sal_Bool bTimePart = sal_False; sal_Bool bIsFraction = sal_False; - sal_Int32 nDays = 0; - sal_Int32 nHours = 0; - sal_Int32 nMins = 0; - sal_Int32 nSecs = 0; sal_Int32 nTemp = 0; while ( bSuccess && !bDone ) @@ -910,7 +905,7 @@ sal_Bool SvXMLUnitConverter::convertTime( double& fTime, else if ( sal_Unicode('0') <= c && sal_Unicode('9') >= c ) { if ( nTemp >= SAL_MAX_INT32 / 10 ) - bSuccess = sal_False; + bSuccess = false; else { if ( !bIsFraction ) @@ -928,17 +923,17 @@ sal_Bool SvXMLUnitConverter::convertTime( double& fTime, { if ( c == sal_Unicode('H') ) { - nHours = nTemp; + o_rHours = nTemp; nTemp = 0; } else if ( c == sal_Unicode('M') ) { - nMins = nTemp; + o_rMins = nTemp; nTemp = 0; } else if ( (c == sal_Unicode(',')) || (c == sal_Unicode('.')) ) { - nSecs = nTemp; + o_rSecs = nTemp; nTemp = 0; bIsFraction = sal_True; sDoubleStr = OUString(RTL_CONSTASCII_USTRINGPARAM("0.")); @@ -947,13 +942,13 @@ sal_Bool SvXMLUnitConverter::convertTime( double& fTime, { if ( !bIsFraction ) { - nSecs = nTemp; + o_rSecs = nTemp; nTemp = 0; sDoubleStr = OUString(RTL_CONSTASCII_USTRINGPARAM("0.0")); } } else - bSuccess = sal_False; // invalid character + bSuccess = false; // invalid character } else { @@ -961,7 +956,7 @@ sal_Bool SvXMLUnitConverter::convertTime( double& fTime, bTimePart = sal_True; else if ( c == sal_Unicode('D') ) { - nDays = nTemp; + o_rDays = nTemp; nTemp = 0; } else if ( c == sal_Unicode('Y') || c == sal_Unicode('M') ) @@ -969,14 +964,28 @@ sal_Bool SvXMLUnitConverter::convertTime( double& fTime, //! how many days is a year or month? DBG_ERROR("years or months in duration: not implemented"); - bSuccess = sal_False; + bSuccess = false; } else - bSuccess = sal_False; // invalid character + bSuccess = false; // invalid character } } if ( bSuccess ) + o_rFractionalSecs = sDoubleStr.toDouble(); + return bSuccess; +} + +sal_Bool SvXMLUnitConverter::convertTime( double& fTime, + const ::rtl::OUString& rString) +{ + sal_Int32 nDays = 0; + sal_Int32 nHours = 0; + sal_Int32 nMins = 0; + sal_Int32 nSecs = 0; + sal_Bool bIsNegativeDuration = sal_False; + double fFractionalSecs = 0.0; + if ( lcl_convertTime( rString, nDays, nHours, nMins, nSecs, bIsNegativeDuration, fFractionalSecs ) ) { if ( nDays ) nHours += nDays * 24; // add the days to the hours part @@ -985,12 +994,11 @@ sal_Bool SvXMLUnitConverter::convertTime( double& fTime, double fMin = nMins; double fSec = nSecs; double fSec100 = 0.0; - double fFraction = sDoubleStr.toDouble(); fTempTime = fHour / 24; fTempTime += fMin / (24 * 60); fTempTime += fSec / (24 * 60 * 60); fTempTime += fSec100 / (24 * 60 * 60 * 60); - fTempTime += fFraction / (24 * 60 * 60); + fTempTime += fFractionalSecs / (24 * 60 * 60); // negative duration? if ( bIsNegativeDuration ) @@ -999,8 +1007,9 @@ sal_Bool SvXMLUnitConverter::convertTime( double& fTime, } fTime = fTempTime; + return sal_True; } - return bSuccess; + return sal_False; } /** convert util::DateTime to ISO Time String */ @@ -1022,33 +1031,18 @@ void SvXMLUnitConverter::convertTime( ::rtl::OUStringBuffer& rBuffer, sal_Bool SvXMLUnitConverter::convertTime( ::com::sun::star::util::DateTime& rDateTime, const ::rtl::OUString& rString ) { - double fCalculatedTime = 0.0; - if( convertTime( fCalculatedTime, rString ) ) + sal_Int32 nDays = 0, nHours = 0, nMins = 0, nSecs = 0; + sal_Bool bIsNegativeDuration = sal_False; + double fFractionalSecs = 0.0; + if ( lcl_convertTime( rString, nDays, nHours, nMins, nSecs, bIsNegativeDuration, fFractionalSecs ) ) { - // #101357# declare as volatile to prevent optimization - // (gcc 3.0.1 Linux) - volatile double fTempTime = fCalculatedTime; - fTempTime *= 24; - double fHoursValue = ::rtl::math::approxFloor (fTempTime); - fTempTime -= fHoursValue; - fTempTime *= 60; - double fMinsValue = ::rtl::math::approxFloor (fTempTime); - fTempTime -= fMinsValue; - fTempTime *= 60; - double fSecsValue = ::rtl::math::approxFloor (fTempTime); - fTempTime -= fSecsValue; - double f100SecsValue = 0.0; - - if( fTempTime > 0.00001 ) - f100SecsValue = fTempTime; - rDateTime.Year = 0; rDateTime.Month = 0; rDateTime.Day = 0; - rDateTime.Hours = static_cast < sal_uInt16 > ( fHoursValue ); - rDateTime.Minutes = static_cast < sal_uInt16 > ( fMinsValue ); - rDateTime.Seconds = static_cast < sal_uInt16 > ( fSecsValue ); - rDateTime.HundredthSeconds = static_cast < sal_uInt16 > ( f100SecsValue * 100.0 ); + rDateTime.Hours = static_cast < sal_uInt16 > ( nHours ); + rDateTime.Minutes = static_cast < sal_uInt16 > ( nMins ); + rDateTime.Seconds = static_cast < sal_uInt16 > ( nSecs ); + rDateTime.HundredthSeconds = static_cast < sal_uInt16 > ( fFractionalSecs * 100.0 ); return sal_True; } From 6ec6e8a3ec36f4c4f459d0e1652ebde558986283 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Wed, 15 Sep 2010 14:11:13 +0200 Subject: [PATCH 120/279] mib19: #163640# do not fire selection change events when changing/insertintg/deleting sheets --- .../inc/vbahelper/vbaeventshelperbase.hxx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx index b637b742b26c..659837535ace 100755 --- a/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx +++ b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx @@ -58,6 +58,17 @@ public: // XEventListener virtual void SAL_CALL disposing( const css::lang::EventObject& aSource ) throw (css::uno::RuntimeException); + // little helpers --------------------------------------------------------- + + /** Throws, if the passed sequence does not contain a value at the specified index. */ + static inline void checkArgument( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException) + { if( (nIndex < 0) || (nIndex >= rArgs.getLength()) ) throw css::lang::IllegalArgumentException(); } + + /** Throws, if the passed sequence does not contain a value of a specific at the specified index. */ + template< typename Type > + static inline void checkArgumentType( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException) + { checkArgument( rArgs, nIndex ); if( !rArgs[ nIndex ].has< Type >() ) throw css::lang::IllegalArgumentException(); } + protected: // ------------------------------------------------------------------------ @@ -73,7 +84,7 @@ protected: /** Registers a supported event handler. - @param nEventId Event identifier from com.sun.star.script.vba.EventIdentifier. + @param nEventId Event identifier from com.sun.star.script.vba.VBAEventId. @param pcMacroName Name of the associated VBA event handler macro. @param eType Document event or global event. @param nCancelIndex 0-based index of Cancel parameter, or -1. @@ -85,15 +96,6 @@ protected: sal_Int32 nCancelIndex = -1, const css::uno::Any& rUserData = css::uno::Any() ); - /** Throws, if the passed sequence does not contain a value at the specified index. */ - static inline void checkArgument( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException) - { if( rArgs.getLength() <= nIndex ) throw css::lang::IllegalArgumentException(); } - - /** Throws, if the passed sequence does not contain a value of a specific at the specified index. */ - template< typename Type > - static inline void checkArgumentType( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException) - { if( (rArgs.getLength() <= nIndex) || !rArgs[ nIndex ].has< Type >() ) throw css::lang::IllegalArgumentException(); } - // ------------------------------------------------------------------------ struct EventQueueEntry From d6c63e5fccd3e39f79526eaf990de361aff1e9a3 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Wed, 15 Sep 2010 15:16:10 +0200 Subject: [PATCH 121/279] mib19: #163556# use correct way to create the VBA Globals object --- basic/source/uno/scriptcont.cxx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index f7091d1c1a0b..fa20add4f1fd 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -315,20 +315,22 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement { setVBACompatibilityMode( sal_True ); - Any aGlobs; - Sequence< Any > aArgs(1); - Reference xModel( mxOwnerDocument ); - aArgs[ 0 ] <<= xModel; - - BasicManager* pBasicMgr = getBasicManager(); - if( pBasicMgr ) + /* Force creation of the VBA Globals object. Each application will + create an instance of its own implementation and store it in + its Basic manager. Implementations will do all necessary + additional initialization, such as registering the global + "This***Doc" UNO constant, starting the document events + processor etc. + */ + try + { + Reference< frame::XModel > xModel( mxOwnerDocument ); // weak-ref -> ref + Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW ); + xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) ); + } + catch( Exception& ) { - aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs ); - pBasicMgr->SetGlobalUNOConstant( "VBAGlobals", aGlobs ); } - pBasicMgr = BasicManagerRepository::getApplicationBasicManager( sal_False ); - if( pBasicMgr ) - pBasicMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[0] ); } script::ModuleInfo aModInfo; From 99181c8c15e0aae7e1f434e895cfcfc2285a6166 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 16 Sep 2010 09:02:54 +0200 Subject: [PATCH 122/279] dba34a: silence GCC warning --- xmloff/source/forms/elementimport.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 3eb5be233f9a..ed11b57d9c54 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -698,6 +698,7 @@ namespace xmloff case OControlElement::GRID: pServiceName = "com.sun.star.form.component.GridControl"; break; case OControlElement::TIME: pServiceName = "com.sun.star.form.component.DateField"; break; case OControlElement::DATE: pServiceName = "com.sun.star.form.component.TimeField"; break; + default: break; } if ( pServiceName != NULL ) return ::rtl::OUString::createFromAscii( pServiceName ); From 6631aae54e580f52e745ac2ccc07c06c385606bb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 16 Sep 2010 09:27:49 +0200 Subject: [PATCH 123/279] dba34a: yet another GCC warning silenced --- xmloff/source/forms/elementexport.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index a4cbaa61edec..149965631b27 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -526,14 +526,14 @@ namespace xmloff // retrieve the values for all those properties PropertyValues aValues; - for ( PropertyDescriptionList::iterator prop = descriptions.begin(); - prop != descriptions.end(); - ++prop + for ( PropertyDescriptionList::iterator desc = descriptions.begin(); + desc != descriptions.end(); + ++desc ) { // TODO: XMultiPropertySet? - const Any propValue = m_xProps->getPropertyValue( (*prop)->propertyName ); - aValues[ (*prop)->propertyId ] = propValue; + const Any propValue = m_xProps->getPropertyValue( (*desc)->propertyName ); + aValues[ (*desc)->propertyId ] = propValue; } // let the handler translate into an XML attribute value From e0f0548d591fff66923fa9e8dee8e331a2cfc8f0 Mon Sep 17 00:00:00 2001 From: "Michael E. Bohn" Date: Fri, 17 Sep 2010 01:45:17 +0200 Subject: [PATCH 124/279] mib19: #163532# fix for enabling and disabling custom menue entries via vba. --- .../source/vbahelper/vbacommandbarcontrol.cxx | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx index 3f9c7ddeae89..afcb9041b80f 100644 --- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx @@ -96,6 +96,7 @@ ScVbaCommandBarControl::getVisible() throw (uno::RuntimeException) if( aValue.hasValue() ) aValue >>= bVisible; return bVisible; + } void SAL_CALL ScVbaCommandBarControl::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException) @@ -106,12 +107,16 @@ ScVbaCommandBarControl::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeExc setPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("IsVisible"), uno::makeAny( _visible ) ); ApplyChange(); } + } ::sal_Bool SAL_CALL ScVbaCommandBarControl::getEnabled() throw (uno::RuntimeException) { sal_Bool bEnabled = sal_True; + rtl::OUString aCommandURLappendix = rtl::OUString::createFromAscii("___"); + rtl::OUString aCommandURL ; + if( m_xParentMenu.is() ) { // currently only the menu in the MenuBat support Enable/Disable @@ -121,7 +126,14 @@ ScVbaCommandBarControl::getEnabled() throw (uno::RuntimeException) else { // emulated with Visible - bEnabled = getVisible(); + //bEnabled = getVisible(); + uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("CommandURL") ); + if (aValue >>= aCommandURL){ + if (0 == aCommandURL.indexOf(aCommandURLappendix)){ + bEnabled = sal_False; + } + } + } return bEnabled; } @@ -129,6 +141,9 @@ ScVbaCommandBarControl::getEnabled() throw (uno::RuntimeException) void SAL_CALL ScVbaCommandBarControl::setEnabled( sal_Bool _enabled ) throw (uno::RuntimeException) { + rtl::OUString aCommandURL ; + rtl::OUString aCommandURLappendix = rtl::OUString::createFromAscii("___"); + rtl::OUStringBuffer aCommandURLSringBuffer; if( m_xParentMenu.is() ) { // currently only the menu in the MenuBat support Enable/Disable @@ -136,8 +151,20 @@ ScVbaCommandBarControl::setEnabled( sal_Bool _enabled ) throw (uno::RuntimeExcep } else { + uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("CommandURL") ); + if (aValue >>= aCommandURL){ + if (0 == aCommandURL.indexOf(aCommandURLappendix)){ + aCommandURL = aCommandURL.copy(3); + } + if (false == _enabled){ + aCommandURLSringBuffer = aCommandURLappendix; + } + aCommandURLSringBuffer.append(aCommandURL); + setPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("CommandURL"), uno::makeAny( aCommandURLSringBuffer.makeStringAndClear()) ); + ApplyChange(); + } // emulated with Visible - setVisible( _enabled ); + //setVisible( _enabled ); } } From 6f8d8311daae52da8e92f9d735efe1eac6c5aa8b Mon Sep 17 00:00:00 2001 From: "Michael E. Bohn" Date: Fri, 17 Sep 2010 02:08:24 +0200 Subject: [PATCH 125/279] mib19: #163501# fix for showing and hiding custom menu entries via vba. --- vbahelper/source/vbahelper/vbacommandbarcontrol.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx index afcb9041b80f..56b89c27bb5b 100644 --- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx @@ -91,23 +91,24 @@ ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (u ::sal_Bool SAL_CALL ScVbaCommandBarControl::getVisible() throw (uno::RuntimeException) { - sal_Bool bVisible = sal_True; + /*sal_Bool bVisible = sal_True; uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("IsVisible") ); if( aValue.hasValue() ) aValue >>= bVisible; - return bVisible; + return bVisible;*/ + return getEnabled(); } void SAL_CALL ScVbaCommandBarControl::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException) { - uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("IsVisible") ); + /*uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("IsVisible") ); if( aValue.hasValue() ) { setPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("IsVisible"), uno::makeAny( _visible ) ); ApplyChange(); - } - + }*/ + setEnabled( _visible); } ::sal_Bool SAL_CALL From 432c3c2d8c170c6249b452b9beec57561e90a4f5 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Sep 2010 08:38:54 +0200 Subject: [PATCH 126/279] dba34a: #i114403# fixed the form-based filter for list boxes --- svx/source/form/formcontroller.cxx | 112 +++++++++++++++++------------ svx/source/inc/formcontroller.hxx | 3 +- 2 files changed, 70 insertions(+), 45 deletions(-) diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index b8292785b457..b2c79c9cd9bc 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -80,6 +81,7 @@ #include #include #include +#include #include #include #include @@ -208,6 +210,7 @@ namespace svxform namespace FocusChangeReason = ::com::sun::star::awt::FocusChangeReason; namespace RowChangeAction = ::com::sun::star::sdb::RowChangeAction; namespace FormFeature = ::com::sun::star::form::runtime::FormFeature; + namespace DataType = ::com::sun::star::sdbc::DataType; //============================================================================== // ColumnInfo @@ -583,6 +586,7 @@ FormController::FormController(const Reference< XMultiServiceFactory > & _rxORB ,m_bAttachEvents(sal_True) ,m_bDetachEvents(sal_True) ,m_bAttemptedHandlerCreation( false ) + ,m_bSuspendFilterTextListening( false ) { DBG_CTOR( FormController, NULL ); @@ -782,6 +786,9 @@ namespace // ----------------------------------------------------------------------------- void FormController::impl_setTextOnAllFilter_throw() { + m_bSuspendFilterTextListening = true; + ::comphelper::FlagGuard aResetFlag( m_bSuspendFilterTextListening ); + // reset the text for all controls ::std::for_each( m_aFilterComponents.begin(), m_aFilterComponents.end(), ResetComponentText() ); @@ -868,10 +875,23 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons if ( condition != rRow.begin() ) aFilter.appendAscii( " AND " ); - ::rtl::OUString sFilterValue( condition->second ); + sal_Int32 nDataType = DataType::OTHER; + OSL_VERIFY( xField->getPropertyValue( FM_PROP_FIELDTYPE ) >>= nDataType ); + const bool isTextColumn = ( ( nDataType == DataType::CHAR ) + || ( nDataType == DataType::VARCHAR ) + || ( nDataType == DataType::LONGVARCHAR ) + ); + + ::rtl::OUStringBuffer aPredicateValue; + if ( isTextColumn ) + aPredicateValue.append( sal_Unicode( '\'' ) ); + aPredicateValue.append( condition->second ); + if ( isTextColumn ) + aPredicateValue.append( sal_Unicode( '\'' ) ); ::rtl::OUString sErrorMsg, sCriteria; - ::rtl::Reference< ISQLParseNode > xParseNode = predicateTree( sErrorMsg, sFilterValue, xFormatter, xField ); + const ::rtl::Reference< ISQLParseNode > xParseNode = + predicateTree( sErrorMsg, aPredicateValue.makeStringAndClear(), xFormatter, xField ); OSL_ENSURE( xParseNode.is(), "FormController::getFastPropertyValue: could not parse the field value predicate!" ); if ( xParseNode.is() ) { @@ -1494,50 +1514,54 @@ void SAL_CALL FormController::textChanged(const TextEvent& e) throw( RuntimeExce // SYNCHRONIZED --> ::osl::ClearableMutexGuard aGuard( m_aMutex ); OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" ); - if (m_bFiltering) + if ( !m_bFiltering ) { - Reference< XTextComponent > xText(e.Source,UNO_QUERY); - ::rtl::OUString aText = xText->getText(); - - if ( m_aFilterRows.empty() ) - appendEmptyDisjunctiveTerm(); - - // Suchen der aktuellen Row - if ( ( (size_t)m_nCurrentFilterPosition >= m_aFilterRows.size() ) || ( m_nCurrentFilterPosition < 0 ) ) - { - OSL_ENSURE( false, "FormController::textChanged: m_nCurrentFilterPosition is wrong!" ); - return; - } - - FmFilterRow& rRow = m_aFilterRows[ m_nCurrentFilterPosition ]; - - // do we have a new filter - if (aText.getLength()) - rRow[xText] = aText; - else - { - // do we have the control in the row - FmFilterRow::iterator iter = rRow.find(xText); - // erase the entry out of the row - if (iter != rRow.end()) - rRow.erase(iter); - } - - // multiplex the event to our FilterControllerListeners - FilterEvent aEvent; - aEvent.Source = *this; - aEvent.FilterComponent = ::std::find( m_aFilterComponents.begin(), m_aFilterComponents.end(), xText ) - m_aFilterComponents.begin(); - aEvent.DisjunctiveTerm = getActiveTerm(); - aEvent.PredicateExpression = aText; - - aGuard.clear(); - // <-- SYNCHRONIZED - - // notify the changed filter expression - m_aFilterListeners.notifyEach( &XFilterControllerListener::predicateExpressionChanged, aEvent ); - } - else impl_onModify(); + return; + } + + if ( m_bSuspendFilterTextListening ) + return; + + Reference< XTextComponent > xText(e.Source,UNO_QUERY); + ::rtl::OUString aText = xText->getText(); + + if ( m_aFilterRows.empty() ) + appendEmptyDisjunctiveTerm(); + + // Suchen der aktuellen Row + if ( ( (size_t)m_nCurrentFilterPosition >= m_aFilterRows.size() ) || ( m_nCurrentFilterPosition < 0 ) ) + { + OSL_ENSURE( false, "FormController::textChanged: m_nCurrentFilterPosition is wrong!" ); + return; + } + + FmFilterRow& rRow = m_aFilterRows[ m_nCurrentFilterPosition ]; + + // do we have a new filter + if (aText.getLength()) + rRow[xText] = aText; + else + { + // do we have the control in the row + FmFilterRow::iterator iter = rRow.find(xText); + // erase the entry out of the row + if (iter != rRow.end()) + rRow.erase(iter); + } + + // multiplex the event to our FilterControllerListeners + FilterEvent aEvent; + aEvent.Source = *this; + aEvent.FilterComponent = ::std::find( m_aFilterComponents.begin(), m_aFilterComponents.end(), xText ) - m_aFilterComponents.begin(); + aEvent.DisjunctiveTerm = getActiveTerm(); + aEvent.PredicateExpression = aText; + + aGuard.clear(); + // <-- SYNCHRONIZED + + // notify the changed filter expression + m_aFilterListeners.notifyEach( &XFilterControllerListener::predicateExpressionChanged, aEvent ); } // XItemListener diff --git a/svx/source/inc/formcontroller.hxx b/svx/source/inc/formcontroller.hxx index 82a3516584f7..b0f42a0e97ea 100644 --- a/svx/source/inc/formcontroller.hxx +++ b/svx/source/inc/formcontroller.hxx @@ -214,7 +214,8 @@ namespace svxform sal_Bool m_bFiltering : 1; sal_Bool m_bAttachEvents : 1; sal_Bool m_bDetachEvents : 1; - sal_Bool m_bAttemptedHandlerCreation : 1; + bool m_bAttemptedHandlerCreation : 1; + bool m_bSuspendFilterTextListening; // no bit field, passed around as reference // as we want to intercept dispatches of _all_ controls we're responsible for, and an object implementing // the ::com::sun::star::frame::XDispatchProviderInterceptor interface can intercept only _one_ objects dispatches, we need a helper class From 39d31f1c3b54d7581b0f825ab3693873235d0486 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 17 Sep 2010 09:40:01 +0200 Subject: [PATCH 127/279] mib19: #163559# allow to call IDispatch methods/properties that are not available through ITypeInfo --- basic/source/classes/sbunoobj.cxx | 60 +++++++++++++++++++++---------- basic/source/inc/sbunoobj.hxx | 8 +++-- 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 45bcc5469ae6..e4969cf2c3c5 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -2291,26 +2292,36 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, } else if( bInvocation && mxInvocation.is() ) { - Sequence< INT16 > OutParamIndex; - Sequence< Any > OutParam; - Any aRetAny = mxInvocation->invoke( pMeth->GetName(), args, OutParamIndex, OutParam ); + Reference< XDirectInvocation > xDirectInvoke; + if ( pMeth->needsDirectInvocation() ) + xDirectInvoke.set( mxInvocation, UNO_QUERY ); + + Any aRetAny; + if ( xDirectInvoke.is() ) + aRetAny = xDirectInvoke->directInvoke( pMeth->GetName(), args ); + else + { + Sequence< INT16 > OutParamIndex; + Sequence< Any > OutParam; + aRetAny = mxInvocation->invoke( pMeth->GetName(), args, OutParamIndex, OutParam ); + + const INT16* pIndices = OutParamIndex.getConstArray(); + UINT32 nLen = OutParamIndex.getLength(); + if( nLen ) + { + const Any* pNewValues = OutParam.getConstArray(); + for( UINT32 j = 0 ; j < nLen ; j++ ) + { + INT16 iTarget = pIndices[ j ]; + if( iTarget >= (INT16)nParamCount ) + break; + unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pNewValues[ j ] ); + } + } + } // Wert von Uno nach Sbx uebernehmen unoToSbxValue( pVar, aRetAny ); - - const INT16* pIndices = OutParamIndex.getConstArray(); - UINT32 nLen = OutParamIndex.getLength(); - if( nLen ) - { - const Any* pNewValues = OutParam.getConstArray(); - for( UINT32 j = 0 ; j < nLen ; j++ ) - { - INT16 iTarget = pIndices[ j ]; - if( iTarget >= (INT16)nParamCount ) - break; - unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pNewValues[ j ] ); - } - } } // #55460, Parameter hier weghauen, da das in unoToSbxValue() @@ -2571,10 +2582,12 @@ SbUnoMethod::SbUnoMethod const String& aName_, SbxDataType eSbxType, Reference< XIdlMethod > xUnoMethod_, - bool bInvocation + bool bInvocation, + bool bDirect ) : SbxMethod( aName_, eSbxType ) , mbInvocation( bInvocation ) + , mbDirectInvocation( bDirect ) { m_xUnoMethod = xUnoMethod_; pParamInfoSeq = NULL; @@ -2776,6 +2789,17 @@ SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t ) QuickInsert( (SbxVariable*)xMethRef ); pRes = xMethRef; } + else + { + Reference< XDirectInvocation > xDirectInvoke( mxInvocation, UNO_QUERY ); + if ( xDirectInvoke.is() && xDirectInvoke->hasMember( aUName ) ) + { + SbxVariableRef xMethRef = new SbUnoMethod( aUName, SbxVARIANT, xDummyMethod, true, true ); + QuickInsert( (SbxVariable*)xMethRef ); + pRes = xMethRef; + } + + } } catch( RuntimeException& e ) { diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index 135c2fd97b54..051ceedfbc78 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -108,13 +108,15 @@ class SbUnoMethod : public SbxMethod SbUnoMethod* pPrev; SbUnoMethod* pNext; - bool mbInvocation; // Method is based on invocation + bool mbInvocation; // Method is based on invocation + bool mbDirectInvocation; // Method should be used with XDirectInvocation interface public: TYPEINFO(); SbUnoMethod( const String& aName_, SbxDataType eSbxType, ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlMethod > xUnoMethod_, - bool bInvocation ); + bool bInvocation, + bool bDirect = false ); virtual ~SbUnoMethod(); virtual SbxInfo* GetInfo(); @@ -122,6 +124,8 @@ public: bool isInvocationBased( void ) { return mbInvocation; } + bool needsDirectInvocation( void ) + { return mbDirectInvocation; } }; From a5367f29d591fe522b3e7b05d17eecf010543805 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 17 Sep 2010 13:50:56 +0200 Subject: [PATCH 128/279] mib19: #163566# do not ask for calc styles that do not exist, removes NoSuchElementExceptions on calc startup --- svx/source/tbxctrls/tbcontrl.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 5c99e84e6a47..9500094d910e 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1800,8 +1800,7 @@ struct SvxStyleToolBoxControl::Impl static const sal_Char* aCalcStyles[] = { "Default", - "Heading 1", - "Heading 2", + "Heading1", "Result", "Result2" }; @@ -1813,12 +1812,15 @@ struct SvxStyleToolBoxControl::Impl { try { - Reference< beans::XPropertySet > xStyle; - xCellStyles->getByName( rtl::OUString::createFromAscii( aCalcStyles[nStyle] )) >>= xStyle; - ::rtl::OUString sName; - xStyle->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")))>>= sName; - if( sName.getLength() ) - aDefaultStyles.push_back(sName); + const rtl::OUString sStyleName( rtl::OUString::createFromAscii( aCalcStyles[nStyle] ) ); + if( xCellStyles->hasByName( sStyleName ) ) + { + Reference< beans::XPropertySet > xStyle( xCellStyles->getByName( sStyleName), UNO_QUERY_THROW ); + ::rtl::OUString sName; + xStyle->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName"))) >>= sName; + if( sName.getLength() ) + aDefaultStyles.push_back(sName); + } } catch( const uno::Exception& ) {} From b5146e34196527bce91ea4059480cd921d4d7ee3 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Fri, 17 Sep 2010 14:52:48 +0200 Subject: [PATCH 129/279] mib19: #163649# Change operator precedence for NOT in VBA mode --- basic/source/comp/exprtree.cxx | 31 +++++++++++++++++++++++++++++-- basic/source/inc/expr.hxx | 1 + 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index 7a4ea5965558..69f9ea553529 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -578,10 +578,20 @@ SbiExprNode* SbiExpression::Unary() { case MINUS: eTok = NEG; - case NOT: pParser->Next(); pNd = new SbiExprNode( pParser, Unary(), eTok, NULL ); break; + case NOT: + if( pParser->IsVBASupportOn() ) + { + pNd = Operand(); + } + else + { + pParser->Next(); + pNd = new SbiExprNode( pParser, Unary(), eTok, NULL ); + } + break; case PLUS: pParser->Next(); pNd = Unary(); @@ -725,9 +735,26 @@ SbiExprNode* SbiExpression::Comp() return pNd; } +SbiExprNode* SbiExpression::VBA_Not() +{ + SbiExprNode* pNd = NULL; + + SbiToken eTok = pParser->Peek(); + if( eTok == NOT ) + { + pParser->Next(); + pNd = new SbiExprNode( pParser, VBA_Not(), eTok, NULL ); + } + else + { + pNd = Comp(); + } + return pNd; +} + SbiExprNode* SbiExpression::Like() { - SbiExprNode* pNd = Comp(); + SbiExprNode* pNd = pParser->IsVBASupportOn() ? VBA_Not() : Comp(); if( m_eMode != EXPRMODE_EMPTY_PAREN ) { short nCount = 0; diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx index 851d0d6f1fe5..3795321f0578 100644 --- a/basic/source/inc/expr.hxx +++ b/basic/source/inc/expr.hxx @@ -188,6 +188,7 @@ protected: SbiExprNode* AddSub(); SbiExprNode* Cat(); SbiExprNode* Like(); + SbiExprNode* VBA_Not(); SbiExprNode* Comp(); SbiExprNode* Boolean(); public: From 38c55bb601d6036601509b7e1b9fe7a8187ec8d2 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 17 Sep 2010 15:20:48 +0200 Subject: [PATCH 130/279] mib19: #163567# Use toString method when necessary --- basic/source/classes/sbunoobj.cxx | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index e4969cf2c3c5..b64bc94315ee 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4746,19 +4746,14 @@ bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal ) // Only for native COM objects if( pUnoObj->isNativeCOMObject() ) { - // For now assume success in any case - bSuccess = true; - pVal->PutString( String() ); - - // TODO: Try to find and execute "toString" - //SbxVariableRef pMeth = pObj->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "toString" ) ), SbxCLASS_METHOD ); - //bSuccess = pMeth.Is(); - //if( bSuccess ) - //{ - // SbxValues aRes; - // pMeth->Get( aRes ); - // pVal->Put( aRes ); - //} + SbxVariableRef pMeth = pObj->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "toString" ) ), SbxCLASS_METHOD ); + if ( pMeth.Is() ) + { + SbxValues aRes; + pMeth->Get( aRes ); + pVal->Put( aRes ); + bSuccess = true; + } } } return bSuccess; From 8e74a57b6cf49cf5296ecc21a111d0119d7cac83 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Fri, 17 Sep 2010 15:28:21 +0200 Subject: [PATCH 131/279] mib19: #163556# preserve VBA compatibility in ODF roundtrip --- .../source/basmgr/basicmanagerrepository.cxx | 56 ++++++++++++------- basic/source/uno/namecont.cxx | 17 +++--- basic/source/uno/scriptcont.cxx | 33 +++++------ sfx2/source/doc/objxtor.cxx | 26 ++++++++- 4 files changed, 82 insertions(+), 50 deletions(-) mode change 100755 => 100644 sfx2/source/doc/objxtor.cxx diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index f6a16ffa80c0..a5a1d4c8ca12 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -139,9 +139,17 @@ namespace basic impl_getLocationForModel( const Reference< XModel >& _rxDocumentModel ); /** creates a new BasicManager instance for the given model + + @param _out_rpBasicManager + reference to the pointer variable that will hold the new + BasicManager. + + @param _rxDocumentModel + the model whose BasicManager will be created. Must not be . */ - BasicManagerPointer - impl_createManagerForModel( const Reference< XModel >& _rxDocumentModel ); + void impl_createManagerForModel( + BasicManagerPointer& _out_rpBasicManager, + const Reference< XModel >& _rxDocumentModel ); /** creates the application-wide BasicManager */ @@ -244,9 +252,17 @@ namespace basic { ::osl::MutexGuard aGuard( m_aMutex ); + /* #163556# (DR) - This function may be called recursively while + constructing the Basic manager and loading the Basic storage. By + passing the map entry received from impl_getLocationForModel() to + the function impl_createManagerForModel(), the new Basic manager + will be put immediately into the map of existing Basic managers, + thus a recursive call of this function will find and return it + without creating another instance. + */ BasicManagerPointer& pBasicManager = impl_getLocationForModel( _rxDocumentModel ); if ( pBasicManager == NULL ) - pBasicManager = impl_createManagerForModel( _rxDocumentModel ); + impl_createManagerForModel( pBasicManager, _rxDocumentModel ); return pBasicManager; } @@ -408,21 +424,21 @@ namespace basic } //-------------------------------------------------------------------- - BasicManagerPointer ImplRepository::impl_createManagerForModel( const Reference< XModel >& _rxDocumentModel ) + void ImplRepository::impl_createManagerForModel( BasicManagerPointer& _out_rpBasicManager, const Reference< XModel >& _rxDocumentModel ) { StarBASIC* pAppBasic = impl_getDefaultAppBasicLibrary(); - BasicManager* pBasicManager( NULL ); + _out_rpBasicManager = 0; Reference< XStorage > xStorage; if ( !impl_getDocumentStorage_nothrow( _rxDocumentModel, xStorage ) ) // the document is not able to provide the storage it is based on. - return pBasicManager; + return; Reference< XPersistentLibraryContainer > xBasicLibs; Reference< XPersistentLibraryContainer > xDialogLibs; if ( !impl_getDocumentLibraryContainers_nothrow( _rxDocumentModel, xBasicLibs, xDialogLibs ) ) // the document does not have BasicLibraries and DialogLibraries - return pBasicManager; + return; if ( xStorage.is() ) { @@ -433,24 +449,24 @@ namespace basic // Storage and BaseURL are only needed by binary documents! SotStorageRef xDummyStor = new SotStorage( ::rtl::OUString() ); - pBasicManager = new BasicManager( *xDummyStor, String() /* TODO/LATER: xStorage */, + _out_rpBasicManager = new BasicManager( *xDummyStor, String() /* TODO/LATER: xStorage */, pAppBasic, &aAppBasicDir, TRUE ); - if ( pBasicManager->HasErrors() ) + if ( _out_rpBasicManager->HasErrors() ) { // handle errors - BasicError* pErr = pBasicManager->GetFirstError(); + BasicError* pErr = _out_rpBasicManager->GetFirstError(); while ( pErr ) { // show message to user if ( ERRCODE_BUTTON_CANCEL == ErrorHandler::HandleError( pErr->GetErrorId() ) ) { // user wants to break loading of BASIC-manager - BasicManagerCleaner::deleteBasicManager( pBasicManager ); + BasicManagerCleaner::deleteBasicManager( _out_rpBasicManager ); xStorage.clear(); break; } - pErr = pBasicManager->GetNextError(); + pErr = _out_rpBasicManager->GetNextError(); } } } @@ -461,14 +477,14 @@ namespace basic // create new BASIC-manager StarBASIC* pBasic = new StarBASIC( pAppBasic ); pBasic->SetFlag( SBX_EXTSEARCH ); - pBasicManager = new BasicManager( pBasic, NULL, TRUE ); + _out_rpBasicManager = new BasicManager( pBasic, NULL, TRUE ); } // knit the containers with the BasicManager LibraryContainerInfo aInfo( xBasicLibs, xDialogLibs, dynamic_cast< OldBasicPassword* >( xBasicLibs.get() ) ); OSL_ENSURE( aInfo.mpOldBasicPassword, "ImplRepository::impl_createManagerForModel: wrong BasicLibraries implementation!" ); - pBasicManager->SetLibraryContainerInfo( aInfo ); - //pBasicCont->setBasicManager( pBasicManager ); + _out_rpBasicManager->SetLibraryContainerInfo( aInfo ); + //pBasicCont->setBasicManager( _out_rpBasicManager ); // that's not needed anymore today. The containers will retrieve their associated // BasicManager from the BasicManagerRepository, when needed. @@ -476,13 +492,13 @@ namespace basic impl_initDocLibraryContainers_nothrow( xBasicLibs, xDialogLibs ); // damit auch Dialoge etc. 'qualifiziert' angesprochen werden k"onnen - pBasicManager->GetLib(0)->SetParent( pAppBasic ); + _out_rpBasicManager->GetLib(0)->SetParent( pAppBasic ); // global properties in the document's Basic - pBasicManager->SetGlobalUNOConstant( "ThisComponent", makeAny( _rxDocumentModel ) ); + _out_rpBasicManager->SetGlobalUNOConstant( "ThisComponent", makeAny( _rxDocumentModel ) ); // notify - impl_notifyCreationListeners( _rxDocumentModel, *pBasicManager ); + impl_notifyCreationListeners( _rxDocumentModel, *_out_rpBasicManager ); // register as listener for this model being disposed/closed Reference< XComponent > xDocumentComponent( _rxDocumentModel, UNO_QUERY ); @@ -490,9 +506,7 @@ namespace basic startComponentListening( xDocumentComponent ); // register as listener for the BasicManager being destroyed - StartListening( *pBasicManager ); - - return pBasicManager; + StartListening( *_out_rpBasicManager ); } //-------------------------------------------------------------------- diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index c31aed1f8ef7..57fce665f976 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -2815,19 +2815,20 @@ OUString SAL_CALL SfxLibraryContainer::getOriginalLibraryLinkURL( const OUString void SAL_CALL SfxLibraryContainer::setVBACompatibilityMode( ::sal_Bool _vbacompatmodeon ) throw (RuntimeException) { - BasicManager* pBasMgr = getBasicManager(); - if( pBasMgr ) + /* The member variable mbVBACompat must be set first, the following call + to getBasicManager() may call getVBACompatibilityMode() which returns + this value. */ + mbVBACompat = _vbacompatmodeon; + if( BasicManager* pBasMgr = getBasicManager() ) { // get the standard library - String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) ); - if ( pBasMgr->GetName().Len() ) - aLibName = pBasMgr->GetName(); + String aLibName = pBasMgr->GetName(); + if ( aLibName.Len() == 0 ) + aLibName = String( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) ); - StarBASIC* pBasic = pBasMgr->GetLib( aLibName ); - if( pBasic ) + if( StarBASIC* pBasic = pBasMgr->GetLib( aLibName ) ) pBasic->SetVBAEnabled( _vbacompatmodeon ); } - mbVBACompat = _vbacompatmodeon; } // Methods XServiceInfo diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index fa20add4f1fd..0b4649cd9690 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -311,26 +311,21 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement // aMod.aName ignored if( aMod.aModuleType.getLength() > 0 ) { - if( !getVBACompatibilityMode() ) + /* If in VBA compatibility mode, force creation of the VBA Globals + object. Each application will create an instance of its own + implementation and store it in its Basic manager. Implementations + will do all necessary additional initialization, such as + registering the global "This***Doc" UNO constant, starting the + document events processor etc. + */ + if( getVBACompatibilityMode() ) try + { + Reference< frame::XModel > xModel( mxOwnerDocument ); // weak-ref -> ref + Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW ); + xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) ); + } + catch( Exception& ) { - setVBACompatibilityMode( sal_True ); - - /* Force creation of the VBA Globals object. Each application will - create an instance of its own implementation and store it in - its Basic manager. Implementations will do all necessary - additional initialization, such as registering the global - "This***Doc" UNO constant, starting the document events - processor etc. - */ - try - { - Reference< frame::XModel > xModel( mxOwnerDocument ); // weak-ref -> ref - Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW ); - xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) ); - } - catch( Exception& ) - { - } } script::ModuleInfo aModInfo; diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx old mode 100755 new mode 100644 index b7567b89f02f..79f7af734ddb --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -805,11 +805,33 @@ void SfxObjectShell::InitBasicManager_Impl() */ { - DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicManager->isValid(), "Lokaler BasicManager bereits vorhanden"); - pImp->bBasicInitialized = TRUE; + /* #163556# (DR) - Handling of recursive calls while creating the Bacic + manager. + It is possible that (while creating the Basic manager) the code that + imports the Basic storage wants to access the Basic manager again. + Especially in VBA compatibility mode, there is code that wants to + access the "VBA Globals" object which is stored as global UNO constant + in the Basic manager. + + To achieve correct handling of the recursive calls of this function + from lcl_getBasicManagerForDocument(), the implementation of the + function BasicManagerRepository::getDocumentBasicManager() has been + changed to return the Basic manager currently under construction, when + called repeatedly. + + The variable pImp->bBasicInitialized will be set to TRUE after + construction now, to ensure that the recursive call of the function + lcl_getBasicManagerForDocument() will be routed into this function too. + + Calling BasicManagerHolder::reset() twice is not a big problem, as it + does not take ownership but stores only the raw pointer. Owner of all + Basic managers is the global BasicManagerRepository instance. + */ + DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicManager->isValid(), "Lokaler BasicManager bereits vorhanden"); pImp->pBasicManager->reset( BasicManagerRepository::getDocumentBasicManager( GetModel() ) ); DBG_ASSERT( pImp->pBasicManager->isValid(), "SfxObjectShell::InitBasicManager_Impl: did not get a BasicManager!" ); + pImp->bBasicInitialized = TRUE; } //-------------------------------------------------------------------- From 0fb4b8faca8f7615795a8340cc175497b0168bf3 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Fri, 17 Sep 2010 17:00:15 +0200 Subject: [PATCH 132/279] mib19: #163556# be sure to always create the VBAGlobals object --- basic/source/uno/namecont.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 57fce665f976..f44846972710 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -2828,6 +2828,23 @@ void SAL_CALL SfxLibraryContainer::setVBACompatibilityMode( ::sal_Bool _vbacompa if( StarBASIC* pBasic = pBasMgr->GetLib( aLibName ) ) pBasic->SetVBAEnabled( _vbacompatmodeon ); + + /* If in VBA compatibility mode, force creation of the VBA Globals + object. Each application will create an instance of its own + implementation and store it in its Basic manager. Implementations + will do all necessary additional initialization, such as + registering the global "This***Doc" UNO constant, starting the + document events processor etc. + */ + if( mbVBACompat ) try + { + Reference< frame::XModel > xModel( mxOwnerDocument ); // weak-ref -> ref + Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW ); + xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) ); + } + catch( Exception& ) + { + } } } From 35887970d4b5bfdf623d6aada1966c1af6042de1 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 17 Sep 2010 17:48:04 +0200 Subject: [PATCH 133/279] mib19: #163566# do not throw exceptions of label is not available --- framework/source/helper/mischelper.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/framework/source/helper/mischelper.cxx b/framework/source/helper/mischelper.cxx index deb5aa023c1b..0f835abdfeac 100644 --- a/framework/source/helper/mischelper.cxx +++ b/framework/source/helper/mischelper.cxx @@ -127,14 +127,17 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues { rtl::OUString aStr; Sequence< PropertyValue > aPropSeq; - if ( _xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq ) + if( _xUICommandLabels->hasByName( aCmdURL ) ) { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + if ( _xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq ) { - if ( aPropSeq[i].Name.equalsAscii( _pName/*"Label"*/ )) + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - aPropSeq[i].Value >>= aStr; - break; + if ( aPropSeq[i].Name.equalsAscii( _pName/*"Label"*/ )) + { + aPropSeq[i].Value >>= aStr; + break; + } } } } From 89ee63a7ea77a8f0626e1b198269dba3e3b3d85c Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 17 Sep 2010 17:48:37 +0200 Subject: [PATCH 134/279] mib19: #163566# do not throw exceptions if window is not available --- framework/source/layoutmanager/layoutmanager.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index f72759891acb..9dd19599ff50 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -1394,7 +1394,7 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, try { Sequence< PropertyValue > aWindowState; - if ( xPersistentWindowState->getByName( aName ) >>= aWindowState ) + if ( xPersistentWindowState->hasByName( aName ) && (xPersistentWindowState->getByName( aName ) >>= aWindowState) ) { sal_Bool bValue( sal_False ); for ( sal_Int32 n = 0; n < aWindowState.getLength(); n++ ) From 9988d9e42d124ab8faed24a63fd6ad1e7d2e3ee9 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 17 Sep 2010 17:49:45 +0200 Subject: [PATCH 135/279] mib19: #163566# do not throw exceptions if path settings is not available --- framework/source/services/pathsettings.cxx | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index 5227cb9f302c..8a0040dd0e92 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -243,21 +243,24 @@ void PathSettings::impl_readAll() OUStringList PathSettings::impl_readOldFormat(const ::rtl::OUString& sPath) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::impl_readOldFormat" ); - css::uno::Reference< css::container::XNameAccess > xCfg = fa_getCfgOld(); - css::uno::Any aVal = xCfg->getByName(sPath); + css::uno::Reference< css::container::XNameAccess > xCfg( fa_getCfgOld() ); + OUStringList aPathVal; - ::rtl::OUString sStringVal; - css::uno::Sequence< ::rtl::OUString > lStringListVal; - OUStringList aPathVal; + if( xCfg->hasByName(sPath) ) + { + css::uno::Any aVal( xCfg->getByName(sPath) ); - if (aVal >>= sStringVal) - { - aPathVal.push_back(sStringVal); - } - else - if (aVal >>= lStringListVal) - { - aPathVal << lStringListVal; + ::rtl::OUString sStringVal; + css::uno::Sequence< ::rtl::OUString > lStringListVal; + + if (aVal >>= sStringVal) + { + aPathVal.push_back(sStringVal); + } + else if (aVal >>= lStringListVal) + { + aPathVal << lStringListVal; + } } return aPathVal; From 21aab0e9c0c36c35c1120307e4bc072d1b7725e0 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 17 Sep 2010 17:54:10 +0200 Subject: [PATCH 136/279] mib19: #163566# do not throw exceptions in hasByName function --- .../moduleuiconfigurationmanager.cxx | 5 ++-- .../windowstateconfiguration.cxx | 29 ++++++++++--------- .../source/uielement/uicommanddescription.cxx | 29 ++++++++++++------- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 193bd63b5ad5..77e58df602ff 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -723,8 +723,9 @@ void ModuleUIConfigurationManager::impl_Initialize() Reference< XStorage > xElementTypeStorage; try { - Any a = xNameAccess->getByName( OUString::createFromAscii( UIELEMENTTYPENAMES[i] )); - a >>= xElementTypeStorage; + const OUString sName( OUString::createFromAscii( UIELEMENTTYPENAMES[i] ) ); + if( xNameAccess->hasByName( sName ) ) + xNameAccess->getByName( sName ) >>= xElementTypeStorage; } catch ( com::sun::star::container::NoSuchElementException& ) { diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 4ac316b73ab0..83cdc1015a32 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -364,16 +364,20 @@ throw ( RuntimeException ) sal_Bool SAL_CALL ConfigurationAccess_WindowState::hasByName( const ::rtl::OUString& rResourceURL ) throw (::com::sun::star::uno::RuntimeException) { - try - { - getByName( rResourceURL ); - } - catch ( NoSuchElementException& ) - { - return sal_False; - } + // SAFE + ResetableGuard aLock( m_aLock ); - return sal_True; + ResourceURLToInfoCache::const_iterator pIter = m_aResourceURLToInfoCache.find( rResourceURL ); + if ( pIter != m_aResourceURLToInfoCache.end() ) + return sal_True; + else + { + Any a( impl_getWindowStateFromResourceURL( rResourceURL ) ); + if ( a == Any() ) + return sal_False; + else + return sal_True; + } } // XElementAccess @@ -1044,12 +1048,11 @@ Any ConfigurationAccess_WindowState::impl_getWindowStateFromResourceURL( const r try { // Try to ask our configuration access - if ( m_xConfigAccess.is() ) + if ( m_xConfigAccess.is() && m_xConfigAccess->hasByName( rResourceURL ) ) { - Reference< XNameAccess > xNameAccess; - Any a( m_xConfigAccess->getByName( rResourceURL )); - if ( a >>= xNameAccess ) + Reference< XNameAccess > xNameAccess( m_xConfigAccess->getByName( rResourceURL ), UNO_QUERY ); + if ( xNameAccess.is() ) return impl_insertCacheAndReturnSequence( rResourceURL, xNameAccess ); } } diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 0d50aa4c36d4..39b91a771228 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -144,6 +144,8 @@ class ConfigurationAccess_UICommand : // Order is neccessary for right initializ virtual void SAL_CALL disposing( const EventObject& aEvent ) throw(RuntimeException); protected: + virtual ::com::sun::star::uno::Any SAL_CALL getByNameImpl( const ::rtl::OUString& aName ); + struct CmdToInfoMap { CmdToInfoMap() : bPopup( false ), @@ -253,9 +255,9 @@ ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand() xContainer->removeContainerListener( this ); } + // XNameAccess -Any SAL_CALL ConfigurationAccess_UICommand::getByName( const ::rtl::OUString& rCommandURL ) -throw ( NoSuchElementException, WrappedTargetException, RuntimeException) +Any SAL_CALL ConfigurationAccess_UICommand::getByNameImpl( const ::rtl::OUString& rCommandURL ) { static sal_Int32 nRequests = 0; @@ -280,21 +282,26 @@ throw ( NoSuchElementException, WrappedTargetException, RuntimeException) else if ( rCommandURL.equalsIgnoreAsciiCaseAscii( UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDMIRRORIMAGELIST )) return makeAny( m_aCommandMirrorImageList ); else - throw NoSuchElementException(); + return Any(); } else { // SAFE ++nRequests; - Any a = getInfoFromCommand( rCommandURL ); - - if ( !a.hasValue() ) - throw NoSuchElementException(); - - return a; + return getInfoFromCommand( rCommandURL ); } } +Any SAL_CALL ConfigurationAccess_UICommand::getByName( const ::rtl::OUString& rCommandURL ) +throw ( NoSuchElementException, WrappedTargetException, RuntimeException) +{ + Any aRet( getByNameImpl( rCommandURL ) ); + if( !aRet.hasValue() ) + throw NoSuchElementException(); + + return aRet; +} + Sequence< ::rtl::OUString > SAL_CALL ConfigurationAccess_UICommand::getElementNames() throw ( RuntimeException ) { @@ -304,7 +311,7 @@ throw ( RuntimeException ) sal_Bool SAL_CALL ConfigurationAccess_UICommand::hasByName( const ::rtl::OUString& rCommandURL ) throw (::com::sun::star::uno::RuntimeException) { - return getByName( rCommandURL ).hasValue(); + return getByNameImpl( rCommandURL ).hasValue(); } // XElementAccess @@ -470,7 +477,7 @@ Any ConfigurationAccess_UICommand::getInfoFromCommand( const rtl::OUString& rCom { // First try to ask our global commands configuration access. It also caches maybe // we find the entry in its cache first. - if ( m_xGenericUICommands.is() ) + if ( m_xGenericUICommands.is() && m_xGenericUICommands->hasByName( rCommandURL ) ) { try { From 36d96fd76fa6843b42655a78db872c8c83ac69e9 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Mon, 20 Sep 2010 09:48:40 +0200 Subject: [PATCH 137/279] mib19: #163651# Fixed initialize handling for form modules --- basic/inc/basic/sbobjmod.hxx | 7 ++++++- basic/source/classes/sb.cxx | 13 ++++++++++++- basic/source/classes/sbxmod.cxx | 4 ++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx index a8e650e43d87..49fefb79309e 100644 --- a/basic/inc/basic/sbobjmod.hxx +++ b/basic/inc/basic/sbobjmod.hxx @@ -89,7 +89,7 @@ public: SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat ); virtual ~SbUserFormModule(); virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); - void ResetApiObj(); + void ResetApiObj( bool bTriggerTerminateEvent = true ); void Unload(); void Load(); void triggerMethod( const String& ); @@ -101,6 +101,11 @@ public: void triggerLayoutEvent(); void triggerResizeEvent(); + bool getInitState( void ) + { return mbInit; } + void setInitState( bool bInit ) + { mbInit = bInit; } + class SbUserFormModuleInstance* CreateInstance(); }; diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 1b82325392b6..00a198f19a72 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -347,7 +347,18 @@ SbxObject* SbFormFactory::CreateObject( const String& rClassName ) { if( SbUserFormModule* pFormModule = PTR_CAST( SbUserFormModule, pVar->GetObject() ) ) { - pFormModule->Load(); + bool bInitState = pFormModule->getInitState(); + if( bInitState ) + { + // Not the first instantiate, reset + bool bTriggerTerminateEvent = false; + pFormModule->ResetApiObj( bTriggerTerminateEvent ); + pFormModule->setInitState( false ); + } + else + { + pFormModule->Load(); + } return pFormModule->CreateInstance(); } } diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 3204e7681088..1e40fd8d5e2d 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -2301,9 +2301,9 @@ SbUserFormModule::~SbUserFormModule() { } -void SbUserFormModule::ResetApiObj() +void SbUserFormModule::ResetApiObj( bool bTriggerTerminateEvent ) { - if ( m_xDialog.is() ) // probably someone close the dialog window + if ( bTriggerTerminateEvent && m_xDialog.is() ) // probably someone close the dialog window { triggerTerminateEvent(); } From 565f5bb8037c43c31c381a4e8e1fdb5f9d793209 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Mon, 20 Sep 2010 09:51:43 +0200 Subject: [PATCH 138/279] mib19: #163566# Move UNO factory to the end of the factory chain --- basic/source/classes/sb.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 00a198f19a72..507a8ff39001 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -747,8 +747,6 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) { pSBFAC = new SbiFactory; AddFactory( pSBFAC ); - pUNOFAC = new SbUnoFactory; - AddFactory( pUNOFAC ); pTYPEFAC = new SbTypeFactory; AddFactory( pTYPEFAC ); pCLASSFAC = new SbClassFactory; @@ -757,6 +755,8 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) AddFactory( pOLEFAC ); pFORMFAC = new SbFormFactory; AddFactory( pFORMFAC ); + pUNOFAC = new SbUnoFactory; + AddFactory( pUNOFAC ); } pRtl = new SbiStdObject( String( RTL_CONSTASCII_USTRINGPARAM(RTLNAME) ), this ); // Search via StarBasic is always global From 57d315f4c34f8538c4bdfd0e20c354d984c20f28 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 20 Sep 2010 11:35:13 +0200 Subject: [PATCH 139/279] dba34a: #i108357# complement existing PrePaint with new PostPaint --- svx/inc/svx/sdrpagewindow.hxx | 1 + svx/inc/svx/svdpagv.hxx | 3 +++ svx/inc/svx/svdpntv.hxx | 3 +++ svx/source/svdraw/sdrpagewindow.cxx | 4 ++++ svx/source/svdraw/svdpagv.cxx | 15 +++++++++++++++ svx/source/svdraw/svdpntv.cxx | 8 ++++++++ 6 files changed, 34 insertions(+) mode change 100755 => 100644 svx/source/svdraw/svdpntv.cxx diff --git a/svx/inc/svx/sdrpagewindow.hxx b/svx/inc/svx/sdrpagewindow.hxx index a3e50fadc599..29c08d6335e3 100644 --- a/svx/inc/svx/sdrpagewindow.hxx +++ b/svx/inc/svx/sdrpagewindow.hxx @@ -117,6 +117,7 @@ public: void PrepareRedraw(const Region& rReg); void RedrawAll(sdr::contact::ViewObjectContactRedirector* pRedirector) const; void RedrawLayer(const SdrLayerID* pId, sdr::contact::ViewObjectContactRedirector* pRedirector) const; + void PostPaint(); // Invalidate call, used from ObjectContact(OfPageView) in InvalidatePartOfView(...) void InvalidatePageWindow(const basegfx::B2DRange& rRange); diff --git a/svx/inc/svx/svdpagv.hxx b/svx/inc/svx/svdpagv.hxx index 4ad30c2958f3..cd7b8a6de81e 100644 --- a/svx/inc/svx/svdpagv.hxx +++ b/svx/inc/svx/svdpagv.hxx @@ -184,6 +184,9 @@ public: // PrePaint call forwarded from app windows void PrePaint(); + // PostPaint call forwarded from app windows + void PostPaint(); + // rReg bezieht sich auf's OutDev, nicht auf die Page void CompleteRedraw(SdrPaintWindow& rPaintWindow, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L) const; diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx index bd6c7ea554cc..69f32ad327e5 100644 --- a/svx/inc/svx/svdpntv.hxx +++ b/svx/inc/svx/svdpntv.hxx @@ -375,6 +375,9 @@ public: // PrePaint call forwarded from app windows void PrePaint(); + // PostPaint call forwarded from app windows + void PostPaint(); + //////////////////////////////////////////////////////////////////////////////////////////////////// // used internally for Draw/Impress/sch/chart2 virtual void CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0); diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 85513fb3b926..6c9c72930603 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -192,6 +192,10 @@ void SdrPageWindow::PrePaint() } } +void SdrPageWindow::PostPaint() +{ +} + void SdrPageWindow::PrepareRedraw(const Region& rReg) { // evtl. give OC the chance to do ProcessDisplay preparations diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 03e3dc31a94f..0ccfd1e01346 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -358,6 +358,21 @@ void SdrPageView::PrePaint() } } +void SdrPageView::PostPaint() +{ + const sal_uInt32 nCount(PageWindowCount()); + + for(sal_uInt32 a(0); a < nCount; a++) + { + SdrPageWindow* pCandidate = GetPageWindow(a); + + if(pCandidate) + { + pCandidate->PostPaint(); + } + } +} + void SdrPageView::CompleteRedraw(SdrPaintWindow& rPaintWindow, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector) const { if(GetPage()) diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx old mode 100755 new mode 100644 index 998c687608fc..feaf859c3b21 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -733,6 +733,14 @@ void SdrPaintView::PrePaint() } } +void SdrPaintView::PostPaint() +{ + if(mpPageView) + { + mpPageView->PostPaint(); + } +} + //////////////////////////////////////////////////////////////////////////////////////////////////// // #define SVX_REPAINT_TIMER_TEST From 3d77782659155d151806d32324597efe4e3def80 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 20 Sep 2010 13:42:55 +0200 Subject: [PATCH 140/279] mib19: WaE --- basic/source/classes/sbunoobj.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index b64bc94315ee..8ae51f8b701b 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -762,7 +762,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) } else if ( (aValue >>= aNativeObjectWrapper) ) { - sal_uInt32 nIndex; + sal_uInt32 nIndex = 0; if( (aNativeObjectWrapper.ObjectId >>= nIndex) ) { SbxObject* pObj = lcl_getNativeObject( nIndex ); From 632728ee413f98aad0ab700ae55c981fd587aeee Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 20 Sep 2010 15:03:23 +0200 Subject: [PATCH 141/279] mib19: #163691# use the same instance of the VBACodeNameProvider when loading document modules --- basic/source/inc/scriptcont.hxx | 1 + basic/source/uno/scriptcont.cxx | 27 +++++++++++---------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx index 091fbc24cdbe..d788a73da0fc 100644 --- a/basic/source/inc/scriptcont.hxx +++ b/basic/source/inc/scriptcont.hxx @@ -43,6 +43,7 @@ namespace basic class SfxScriptLibraryContainer : public SfxLibraryContainer, public OldBasicPassword { ::rtl::OUString maScriptLanguage; + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxCodeNameAccess; // Methods to distinguish between deffirent library types virtual SfxLibrary* SAL_CALL implCreateLibrary( const ::rtl::OUString& aName ); diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 0b4649cd9690..9118f6d0d1ee 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -80,10 +80,9 @@ using namespace com::sun::star::script; using namespace com::sun::star::xml::sax; using namespace com::sun::star; using namespace cppu; -using namespace rtl; using namespace osl; -using com::sun::star::uno::Reference; +using ::rtl::OUString; //============================================================================ // Implementation class SfxScriptLibraryContainer @@ -350,25 +349,21 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement RTL_CONSTASCII_STRINGPARAM("document") )) { aModInfo.ModuleType = ModuleType::DOCUMENT; - Reference xModel( mxOwnerDocument ); - Reference< XMultiServiceFactory> xSF( xModel, UNO_QUERY); - Reference< container::XNameAccess > xVBACodeNameAccess; - if( xSF.is() ) + + // #163691# use the same codename access instance for all document modules + if( !mxCodeNameAccess.is() ) try { - try - { - xVBACodeNameAccess.set( xSF->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ooo.vba.VBAObjectModuleObjectProvider"))), - UNO_QUERY ); - } - catch(uno::Exception&) {} + Reference xModel( mxOwnerDocument ); + Reference< XMultiServiceFactory> xSF( xModel, UNO_QUERY_THROW ); + mxCodeNameAccess.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider" ) ) ), UNO_QUERY ); } - if( xVBACodeNameAccess.is() ) + catch( Exception& ) {} + + if( mxCodeNameAccess.is() ) { try { - aModInfo.ModuleObject.set( xVBACodeNameAccess->getByName( aElementName), uno::UNO_QUERY ); + aModInfo.ModuleObject.set( mxCodeNameAccess->getByName( aElementName), uno::UNO_QUERY ); } catch(uno::Exception&) { From ba28593e334b42d828b953213faa97ee20d1b08f Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Mon, 20 Sep 2010 16:05:13 +0200 Subject: [PATCH 142/279] #i114622# - Workaround for buggy Oracle Beehive server response for lockdiscovery property. --- ucb/source/ucp/webdav/LockSequence.cxx | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index cd5f12708d58..98e61954032f 100644 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.cxx @@ -35,6 +35,8 @@ using namespace webdav_ucp; using namespace com::sun::star; +#define BEEHIVE_BUGS_WORKAROUND + ////////////////////////////////////////////////////////////////////////// struct LockSequenceParseContext @@ -128,7 +130,11 @@ extern "C" int LockSequence_startelement_callback( extern "C" int LockSequence_chardata_callback( void *userdata, int state, +#ifdef BEEHIVE_BUGS_WORKAROUND + const char *buf1, +#else const char *buf, +#endif size_t len ) { LockSequenceParseContext * pCtx @@ -136,6 +142,15 @@ extern "C" int LockSequence_chardata_callback( if ( !pCtx->pLock ) pCtx->pLock = new ucb::Lock; +#ifdef BEEHIVE_BUGS_WORKAROUND + // Beehive sends XML values containing trailing newlines. + if ( buf1[ len - 1 ] == 0x0a ) + len--; + + char * buf = new char[ len + 1 ](); + strncpy( buf, buf1, len ); +#endif + switch ( state ) { case STATE_DEPTH: @@ -203,12 +218,8 @@ extern "C" int LockSequence_chardata_callback( // @@@ // } else - { - pCtx->pLock->Timeout = sal_Int64( -1 ); - pCtx->hasTimeout = true; OSL_ENSURE( sal_False, "LockSequence_chardata_callback - Unknown timeout!" ); - } break; case STATE_HREF: @@ -223,6 +234,11 @@ extern "C" int LockSequence_chardata_callback( } } + +#ifdef BEEHIVE_BUGS_WORKAROUND + delete [] buf; +#endif + return 0; // zero to continue, non-zero to abort parsing } From 9db83275b83efc4ce0228891a30418f133b01c06 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Tue, 21 Sep 2010 08:58:34 +0200 Subject: [PATCH 143/279] mib19: #163689# On deletion of doc basic clear dependencies in other basic instances --- basic/inc/basic/sbmod.hxx | 3 ++ basic/inc/basic/sbstar.hxx | 2 ++ basic/source/classes/sb.cxx | 50 +++++++++++++++++++++++++++++ basic/source/classes/sbxmod.cxx | 56 ++++++++++++++++++++++++++++++++- 4 files changed, 110 insertions(+), 1 deletion(-) diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index d9f3fd0cde24..fc58817270f2 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -61,6 +61,8 @@ class SbModule : public SbxObject SbModuleImpl* mpSbModuleImpl; // Impl data std::vector< String > mModuleVariableNames; + void implClearIfVarDependsOnDeletedBasic( SbxVariable* pVar, StarBASIC* pDeletedBasic ); + protected: com::sun::star::uno::Reference< com::sun::star::script::XInvocation > mxWrapper; ::rtl::OUString aOUSource; @@ -83,6 +85,7 @@ protected: USHORT Run( SbMethod* ); void RunInit(); void ClearPrivateVars(); + void ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic ); void GlobalRunInit( BOOL bBasicStart ); // for all modules void GlobalRunDeInit( void ); const BYTE* FindNextStmnt( const BYTE*, USHORT&, USHORT& ) const; diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index 227ca4d080c1..0d348c6ef141 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -79,6 +79,8 @@ class StarBASIC : public SbxObject SbxObjectRef pVBAGlobals; SbxObject* getVBAGlobals( ); + void implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic ); + protected: BOOL CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen ); private: diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 507a8ff39001..9ac8dbc91266 100755 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -734,6 +734,9 @@ SbModule* SbClassFactory::FindClass( const String& rClassName ) return pMod; } +typedef std::vector< StarBASIC* > DocBasicVector; +static DocBasicVector GaDocBasics; + StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASIC") ) ), bDocBasic( bIsDocBasic ) { @@ -763,6 +766,9 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) SetFlag( SBX_GBLSEARCH ); pVBAGlobals = NULL; bQuit = FALSE; + + if( bDocBasic ) + GaDocBasics.push_back( this ); } // #51727 Override SetModified so that the modified state @@ -802,6 +808,29 @@ StarBASIC::~StarBASIC() } #endif } + else if( bDocBasic ) + { + SbxError eOld = SbxBase::GetError(); + + DocBasicVector::iterator it; + for( it = GaDocBasics.begin() ; it != GaDocBasics.end() ; ++it ) + { + if( *it == this ) + { + GaDocBasics.erase( it ); + break; + } + } + for( it = GaDocBasics.begin() ; it != GaDocBasics.end() ; ++it ) + { + StarBASIC* pBasic = *it; + pBasic->implClearDependingVarsOnDelete( this ); + } + + SbxBase::ResetError(); + if( eOld != SbxERR_OK ) + SbxBase::SetError( eOld ); + } // #100326 Set Parent NULL in registered listeners if( xUnoListeners.Is() ) @@ -835,6 +864,27 @@ void StarBASIC::operator delete( void* p ) ::operator delete( p ); } +void StarBASIC::implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic ) +{ + if( this != pDeletedBasic ) + { + for( USHORT i = 0; i < pModules->Count(); i++ ) + { + SbModule* p = (SbModule*)pModules->Get( i ); + p->ClearVarsDependingOnDeletedBasic( pDeletedBasic ); + } + } + + for( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ ) + { + SbxVariable* pVar = pObjs->Get( nObj ); + StarBASIC* pBasic = PTR_CAST(StarBASIC,pVar); + if( pBasic && pBasic != pDeletedBasic ) + pBasic->implClearDependingVarsOnDelete( pDeletedBasic ); + } +} + + /************************************************************************** * * Creation/Managment of modules diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 1e40fd8d5e2d..4ed40baf408a 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1334,6 +1334,61 @@ void SbModule::ClearPrivateVars() } } +void SbModule::implClearIfVarDependsOnDeletedBasic( SbxVariable* pVar, StarBASIC* pDeletedBasic ) +{ + if( pVar->SbxValue::GetType() != SbxOBJECT || pVar->ISA( SbProcedureProperty ) ) + return; + + SbxObject* pObj = PTR_CAST(SbxObject,pVar->GetObject()); + if( pObj != NULL ) + { + SbxObject* p = pObj; + + SbModule* pMod = PTR_CAST( SbModule, p ); + if( pMod != NULL ) + pMod->ClearVarsDependingOnDeletedBasic( pDeletedBasic ); + + while( (p = p->GetParent()) != NULL ) + { + StarBASIC* pBasic = PTR_CAST( StarBASIC, p ); + if( pBasic != NULL && pBasic == pDeletedBasic ) + { + pVar->SbxValue::Clear(); + break; + } + } + } +} + +void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic ) +{ + (void)pDeletedBasic; + + for( USHORT i = 0 ; i < pProps->Count() ; i++ ) + { + SbProperty* p = PTR_CAST(SbProperty,pProps->Get( i ) ); + if( p ) + { + if( p->GetType() & SbxARRAY ) + { + SbxArray* pArray = PTR_CAST(SbxArray,p->GetObject()); + if( pArray ) + { + for( USHORT j = 0 ; j < pArray->Count() ; j++ ) + { + SbxVariable* pVar = PTR_CAST(SbxVariable,pArray->Get( j )); + implClearIfVarDependsOnDeletedBasic( pVar, pDeletedBasic ); + } + } + } + else + { + implClearIfVarDependsOnDeletedBasic( p, pDeletedBasic ); + } + } + } +} + // Zunaechst in dieses Modul, um 358-faehig zu bleiben // (Branch in sb.cxx vermeiden) void StarBASIC::ClearAllModuleVars( void ) @@ -2494,7 +2549,6 @@ void SbUserFormModule::InitObject() { try { - String aHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) ); SbUnoObject* pGlobs = (SbUnoObject*)GetParent()->Find( aHook, SbxCLASS_DONTCARE ); if ( m_xModel.is() && pGlobs ) From f22b78ad8acc72e8ab9edb1c6fc2cdb67753c3dd Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Tue, 21 Sep 2010 09:06:36 +0200 Subject: [PATCH 144/279] mib19: #163566# Only call FindUnoClass if still pElem==NULL --- basic/source/runtime/step2.cxx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index ebc494305f81..64a9d86ab940 100755 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -143,15 +143,19 @@ SbxVariable* SbiRuntime::FindElement else pElem = getVBAConstant( aName ); } - // #72382 VORSICHT! Liefert jetzt wegen unbekannten - // Modulen IMMER ein Ergebnis! - SbUnoClass* pUnoClass = findUnoClass( aName ); - if( pUnoClass ) + + if( !pElem ) { - pElem = new SbxVariable( t ); - SbxValues aRes( SbxOBJECT ); - aRes.pObj = pUnoClass; - pElem->SbxVariable::Put( aRes ); + // #72382 VORSICHT! Liefert jetzt wegen unbekannten + // Modulen IMMER ein Ergebnis! + SbUnoClass* pUnoClass = findUnoClass( aName ); + if( pUnoClass ) + { + pElem = new SbxVariable( t ); + SbxValues aRes( SbxOBJECT ); + aRes.pObj = pUnoClass; + pElem->SbxVariable::Put( aRes ); + } } // #62939 Wenn eine Uno-Klasse gefunden wurde, muss From 04a3e68aece9ad6a0f96b66c2fcb22d26ca4780c Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 21 Sep 2010 15:50:18 +0200 Subject: [PATCH 145/279] #i114622# - Fixed wrong arguments for InteractiveLockingLockedExceptions- --- ucb/source/ucp/webdav/webdavcontent.cxx | 56 +++++++++++++++---------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 26b2a044e7b6..b679b81b5d52 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -1183,7 +1183,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( std::auto_ptr< ContentProperties > xProps; std::auto_ptr< ContentProperties > xCachedProps; std::auto_ptr< DAVResourceAccess > xResAccess; - rtl::OUString aEscapedTitle; + rtl::OUString aUnescapedTitle; bool bHasAll = false; uno::Reference< lang::XMultiServiceFactory > xSMgr; uno::Reference< ucb::XContentIdentifier > xIdentifier; @@ -1192,7 +1192,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - aEscapedTitle = NeonUri::unescape( m_aEscapedTitle ); + aUnescapedTitle = NeonUri::unescape( m_aEscapedTitle ); xSMgr.set( m_xSMgr ); xIdentifier.set( m_xIdentifier ); xProvider.set( m_xProvider.get() ); @@ -1365,7 +1365,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if ( m_eResourceType == NON_DAV ) xProps->addProperties( aMissingProps, ContentProperties( - aEscapedTitle, + aUnescapedTitle, false ) ); } catch ( DAVException const & e ) @@ -1386,32 +1386,32 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // might trigger HTTP redirect. // Therefore, title must be updated here. NeonUri aUri( xResAccess->getURL() ); - aEscapedTitle = aUri.GetPathBaseName(); + aUnescapedTitle = aUri.GetPathBaseNameUnescaped(); - if ( UNKNOWN == rType ) + if ( rType == UNKNOWN ) { - xProps.reset( new ContentProperties( aEscapedTitle ) ); + xProps.reset( new ContentProperties( aUnescapedTitle ) ); } // For DAV resources we only know the Title, for non-DAV // resources we additionally know that it is a document. - if ( DAV == rType ) + else if ( rType == DAV ) { //xProps.reset( - // new ContentProperties( aEscapedTitle ) ); + // new ContentProperties( aUnescapedTitle ) ); xProps->addProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), - uno::makeAny( aEscapedTitle ), + uno::makeAny( aUnescapedTitle ), true ); } else { if ( !xProps.get() ) - xProps.reset( new ContentProperties( aEscapedTitle, false ) ); + xProps.reset( new ContentProperties( aUnescapedTitle, false ) ); else xProps->addProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), - uno::makeAny( aEscapedTitle ), + uno::makeAny( aUnescapedTitle ), true ); xProps->addProperty( @@ -1429,7 +1429,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // No server access for just created (not yet committed) objects. // Only a minimal set of properties supported at this stage. if (m_bTransient) - xProps.reset( new ContentProperties( aEscapedTitle, + xProps.reset( new ContentProperties( aUnescapedTitle, m_bCollection ) ); } @@ -1480,7 +1480,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( m_xCachedProps->addProperties( *xProps.get() ); m_xResAccess.reset( new DAVResourceAccess( *xResAccess.get() ) ); - m_aEscapedTitle = aEscapedTitle; + m_aEscapedTitle = NeonUri::escapeSegment( aUnescapedTitle ); } return xResultRow; @@ -2947,6 +2947,20 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) // Map DAVException... uno::Any aException; + rtl::OUString aURL; + if ( m_bTransient ) + { + aURL = getParentURL(); + if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) ) + aURL += rtl::OUString::createFromAscii( "/" ); + + aURL += m_aEscapedTitle; + } + else + { + aURL = m_xIdentifier->getContentIdentifier(); + } + switch ( e.getStatus() ) { case SC_NOT_FOUND: @@ -2954,7 +2968,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= beans::PropertyValue( rtl::OUString::createFromAscii("Uri"), -1, - uno::makeAny(m_xIdentifier->getContentIdentifier()), + uno::makeAny(aURL), beans::PropertyState_DIRECT_VALUE); aException <<= @@ -3044,14 +3058,14 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString::createFromAscii( "Locked!" ), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier(), - sal_True ); + aURL, + sal_False ); // not SelfOwned #else { uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= beans::PropertyValue( rtl::OUString::createFromAscii("Uri"), -1, - uno::makeAny(m_xIdentifier->getContentIdentifier()), + uno::makeAny(aURL), beans::PropertyState_DIRECT_VALUE); aException <<= @@ -3071,8 +3085,8 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString::createFromAscii( "Locked (self)!" ), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier(), - sal_True ); + aURL, + sal_True ); // SelfOwned break; case DAVException::DAV_NOT_LOCKED: @@ -3081,7 +3095,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString::createFromAscii( "Not locked!" ), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier() ); + aURL ); break; case DAVException::DAV_LOCK_EXPIRED: @@ -3090,7 +3104,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString::createFromAscii( "Lock expired!" ), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier() ); + aURL ); break; default: From 5698690a8bccc3c0345ad34fe27934c0027d76a9 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 21 Sep 2010 16:10:51 +0200 Subject: [PATCH 146/279] #i114622# - set infinite timeout in case of unknown timeout. --- ucb/source/ucp/webdav/LockSequence.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index 98e61954032f..bc9b9f0175f7 100644 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.cxx @@ -218,8 +218,12 @@ extern "C" int LockSequence_chardata_callback( // @@@ // } else + { + pCtx->pLock->Timeout = sal_Int64( -1 ); + pCtx->hasTimeout = true; OSL_ENSURE( sal_False, - "LockSequence_chardata_callback - Unknown timeout!" ); + "LockSequence_chardata_callback - Unknown timeout!" ); + } break; case STATE_HREF: From ca9d33a5ba1fcf98990aa61ac3f42287e2d2fec5 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 21 Sep 2010 17:05:14 +0200 Subject: [PATCH 147/279] dba34a: WaE --- xmloff/source/forms/propertyimport.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 9d8e7be994f3..de57eadb69ae 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -363,19 +363,19 @@ bool OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl implPushBackPropertyValue( aNewValue ); return true; } -#if OSL_DEBUG_LEVEL > 0 if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for { +#if OSL_DEBUG_LEVEL > 0 ::rtl::OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" ); sMessage += ::rtl::OString( " Attribute name: " ); sMessage += ::rtl::OString( _rLocalName.getStr(), _rLocalName.getLength(), osl_getThreadTextEncoding() ); sMessage += ::rtl::OString( "\n value: " ); sMessage += ::rtl::OString( _rValue.getStr(), _rValue.getLength(), osl_getThreadTextEncoding() ); OSL_ENSURE( sal_False, sMessage.getStr() ); +#endif return false; } return true; -#endif } //===================================================================== From 7acf233d5c2dbb3bf996a9893a84c030e9a9e4c5 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 23 Sep 2010 13:38:12 +0200 Subject: [PATCH 148/279] dba34a: #i114671# --- xmloff/source/chart/SchXMLTableContext.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index d3f0670f672d..bc1b50a908a2 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -704,6 +704,7 @@ private: public: SchXMLRangeSomewhereContext( SvXMLImport& rImport, + USHORT nPrefix, const ::rtl::OUString& rLocalName, ::rtl::OUString& rRangeString ); virtual ~SchXMLRangeSomewhereContext(); @@ -818,7 +819,7 @@ SvXMLImportContext* SchXMLTableCellContext::CreateChildContext( { //#i113950# previously the range was exported to attribute text:id, but that attribute does not allow arbitrary strings anymore //so we need to find an alternative to save that range info for copy/paste scenario ... -> use description at an empty group element for now - pContext = new SchXMLRangeSomewhereContext( GetImport(), rLocalName, maRangeId ); + pContext = new SchXMLRangeSomewhereContext( GetImport(), nPrefix, rLocalName, maRangeId ); } else { @@ -1188,9 +1189,10 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary( //--------------------------------------------------------------------------------------------------- SchXMLRangeSomewhereContext::SchXMLRangeSomewhereContext( SvXMLImport& rImport, + USHORT nPrefix, const OUString& rLocalName, OUString& rRangeString ) : - SvXMLImportContext( rImport, XML_NAMESPACE_TEXT, rLocalName ), + SvXMLImportContext( rImport, nPrefix, rLocalName ), mrRangeString( rRangeString ) { } From afe2be5bf8b540c3211f11bb5dbf02361d6374d6 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 23 Sep 2010 15:06:54 +0200 Subject: [PATCH 149/279] sb132: #i113833# removed unused configmgr::Node::findMember --- configmgr/source/node.cxx | 4 ---- configmgr/source/node.hxx | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/configmgr/source/node.cxx b/configmgr/source/node.cxx index a5a089106b2a..5473b6b1de0c 100644 --- a/configmgr/source/node.cxx +++ b/configmgr/source/node.cxx @@ -101,8 +101,4 @@ Node::~Node() {} void Node::clear() {} -rtl::Reference< Node > Node::findMember(rtl::OUString const &) { - return rtl::Reference< Node >(); -} - } diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx index 7c9417e68ea9..f79e7ba296fa 100644 --- a/configmgr/source/node.hxx +++ b/configmgr/source/node.hxx @@ -31,11 +31,12 @@ #include "sal/config.h" #include "rtl/ref.hxx" -#include "rtl/ustring.hxx" #include "salhelper/simplereferenceobject.hxx" #include "nodemap.hxx" +namespace rtl { class OUString; } + namespace configmgr { class Node: public salhelper::SimpleReferenceObject { @@ -75,8 +76,6 @@ protected: virtual void clear(); - virtual rtl::Reference< Node > findMember(rtl::OUString const & name); - int layer_; int finalized_; }; From a2586c9696e79f1a49dca524dcff3297ab60fb6b Mon Sep 17 00:00:00 2001 From: os Date: Thu, 23 Sep 2010 15:51:45 +0200 Subject: [PATCH 150/279] shape properties wzDescription and wzName support added --- editeng/inc/editeng/svxrtf.hxx | 7 +++--- editeng/source/editeng/eertfpar.cxx | 1 + editeng/source/rtf/rtfgrf.cxx | 36 ++++++++++++++++++++++++++--- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx index 25d20fe0fdcd..bb648f090a18 100644 --- a/editeng/inc/editeng/svxrtf.hxx +++ b/editeng/inc/editeng/svxrtf.hxx @@ -36,7 +36,8 @@ #define _SVSTDARR_USHORTS #include #include - +#include +#include class Font; class Color; class Graphic; @@ -104,7 +105,7 @@ struct SvxRTFStyleType // Bitmap - Mode - +typedef ::std::vector< ::std::pair< ::rtl::OUString, ::rtl::OUString > > PictPropertyNameValuePairs; struct EDITENG_DLLPUBLIC SvxRTFPictureType { // Format der Bitmap @@ -135,7 +136,7 @@ struct EDITENG_DLLPUBLIC SvxRTFPictureType USHORT nWidthBytes; USHORT nScalX, nScalY; short nCropT, nCropB, nCropL, nCropR; - + PictPropertyNameValuePairs aPropertyPairs; SvxRTFPictureType() { ResetValues(); } // alle Werte auf default; wird nach einlesen der Bitmap aufgerufen ! void ResetValues(); diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 9f919afb39d6..817949294444 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -54,6 +54,7 @@ void SvxRTFPictureType::ResetValues() nBitsPerPixel = nPlanes = 1; nScalX = nScalY = 100; // Skalierung in Prozent nCropT = nCropB = nCropL = nCropR = 0; + aPropertyPairs.clear(); } ImportInfo::ImportInfo( ImportState eSt, SvParser* pPrsrs, const ESelection& rSel ) diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx index 24fd4465b031..4b0051cd3c81 100644 --- a/editeng/source/rtf/rtfgrf.cxx +++ b/editeng/source/rtf/rtfgrf.cxx @@ -39,6 +39,7 @@ #include +using namespace ::rtl; #ifndef DBG_UTIL #undef DEBUG_JP @@ -316,14 +317,26 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) if( RTF_SHPPICT == GetStackPtr(0)->nTokenId ) ++nValidDataBraket; - + OUString sShapePropertyName, sShapePropertyValue; + int nShapePropertyBracket = -1; while( _nOpenBrakets && IsParserWorking() && bValidBmp ) { nToken = GetNextToken(); USHORT nVal = USHORT( nTokenValue ); switch( nToken ) { - case '}': --_nOpenBrakets; break; + case '}': + --_nOpenBrakets; + if( nShapePropertyBracket > 0 && nShapePropertyBracket > _nOpenBrakets ) + { + nShapePropertyBracket = -1; + if( sShapePropertyName.getLength() ) + { + rPicType.aPropertyPairs.push_back( ::std::pair< OUString, OUString >( sShapePropertyName, sShapePropertyValue ) ); + sShapePropertyName = sShapePropertyValue = ::rtl::OUString(); + } + } + break; case '{': { if( RTF_IGNOREFLAG != GetNextToken() ) @@ -439,7 +452,24 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) case RTF_PICCROPB: rPicType.nCropB = (short)nTokenValue; break; case RTF_PICCROPL: rPicType.nCropL = (short)nTokenValue; break; case RTF_PICCROPR: rPicType.nCropR = (short)nTokenValue; break; - + case RTF_SP: + //read pairs of {\sn Name}{\sv Value} + nShapePropertyBracket = _nOpenBrakets; + break; + case RTF_SN: + nToken = GetNextToken(); + if( nToken != '}' ) + sShapePropertyName = aToken; + else + nToken = SkipToken( -1 ); + break; + case RTF_SV: + nToken = GetNextToken(); + if( nToken != '}' ) + sShapePropertyValue = aToken; + else + nToken = SkipToken( -1 ); + break; case RTF_TEXTTOKEN: // JP 26.06.98: Bug #51719# - nur TextToken auf 1. Ebene // auswerten. Alle anderen sind irgendwelche From 92808f61784ee940bfd90fb300b5df43e7c05d08 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 23 Sep 2010 16:09:13 +0200 Subject: [PATCH 151/279] sb132: #i114145# removed unused TESTDIR and NO_TESTS --- shell/qa/makefile.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/shell/qa/makefile.mk b/shell/qa/makefile.mk index cc91a6b1ad5c..290798bab18e 100755 --- a/shell/qa/makefile.mk +++ b/shell/qa/makefile.mk @@ -28,8 +28,6 @@ PRJ=.. PRJNAME=shell TARGET=qa -# this is removed at the moment because we need some enhancements -# TESTDIR=TRUE ENABLE_EXCEPTIONS=TRUE From aa04a0319281bd20dec664c146aa920d8a13c5f6 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 23 Sep 2010 16:17:38 +0200 Subject: [PATCH 152/279] sb132: #i114155# use "en" as additional fallback locale after "en-US" --- configmgr/source/childaccess.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx index ef2b213d4ef1..c20fa49fb18c 100644 --- a/configmgr/source/childaccess.cxx +++ b/configmgr/source/childaccess.cxx @@ -283,8 +283,9 @@ css::uno::Any ChildAccess::asValue() { // Find best match using an adaption of RFC 4647 lookup matching // rules, removing "-" or "_" delimited segments from the end; // defaults are the empty string locale, the "en-US" locale, the - // first child (if any), or a nil value (even though it may be - // illegal for the given property), in that order: + // "en" locale, the first child (if any), or a nil value (even + // though it may be illegal for the given property), in that + // order: rtl::Reference< ChildAccess > child; for (;;) { child = getChild(locale); @@ -301,10 +302,14 @@ css::uno::Any ChildAccess::asValue() { child = getChild( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en-US"))); if (!child.is()) { - std::vector< rtl::Reference< ChildAccess > > all( - getAllChildren()); - if (!all.empty()) { - child = all.front(); + child = getChild( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"))); + if (!child.is()) { + std::vector< rtl::Reference< ChildAccess > > all( + getAllChildren()); + if (!all.empty()) { + child = all.front(); + } } } } From c95c83950c9de73ca9a01f7b468b72b77c19c051 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 23 Sep 2010 16:17:38 +0200 Subject: [PATCH 153/279] sb132: #i114155# use "en" as additional fallback locale after "en-US" (transplanted from 630d6876c61cd1e0d42b8aa18bfc2ab22079a20f) --- configmgr/source/childaccess.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx index ef2b213d4ef1..c20fa49fb18c 100644 --- a/configmgr/source/childaccess.cxx +++ b/configmgr/source/childaccess.cxx @@ -283,8 +283,9 @@ css::uno::Any ChildAccess::asValue() { // Find best match using an adaption of RFC 4647 lookup matching // rules, removing "-" or "_" delimited segments from the end; // defaults are the empty string locale, the "en-US" locale, the - // first child (if any), or a nil value (even though it may be - // illegal for the given property), in that order: + // "en" locale, the first child (if any), or a nil value (even + // though it may be illegal for the given property), in that + // order: rtl::Reference< ChildAccess > child; for (;;) { child = getChild(locale); @@ -301,10 +302,14 @@ css::uno::Any ChildAccess::asValue() { child = getChild( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en-US"))); if (!child.is()) { - std::vector< rtl::Reference< ChildAccess > > all( - getAllChildren()); - if (!all.empty()) { - child = all.front(); + child = getChild( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"))); + if (!child.is()) { + std::vector< rtl::Reference< ChildAccess > > all( + getAllChildren()); + if (!all.empty()) { + child = all.front(); + } } } } From 8051a0ab7bd9557aaf076650f48731befce32a1a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 24 Sep 2010 11:31:52 +0200 Subject: [PATCH 154/279] dba34a: #i114719#: it's allowed for a model to provide an empty view data container --- sfx2/source/view/sfxbasecontroller.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index cda5fd0bdd7d..3dd6b1707d60 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1438,11 +1438,11 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect ) try { Reference< XViewDataSupplier > xViewDataSupplier( getModel(), UNO_QUERY_THROW ); - Reference< XIndexAccess > xViewData( xViewDataSupplier->getViewData(), UNO_SET_THROW ); + Reference< XIndexAccess > xViewData( xViewDataSupplier->getViewData() ); // find the view data item whose ViewId matches the ID of the view we're just connecting to const SfxObjectFactory& rDocFactory( rDoc.GetFactory() ); - const sal_Int32 nCount = xViewData->getCount(); + const sal_Int32 nCount = xViewData.is() ? xViewData->getCount() : 0; sal_Int32 nViewDataIndex = 0; for ( sal_Int32 i=0; i Date: Fri, 24 Sep 2010 12:55:26 +0200 Subject: [PATCH 155/279] dba34a: #i114606# some refactoring (not really related to the fix for the bug, but perhaps next time I have some bug here, it's easier to understand the stone-aged code here ...) --- svx/source/form/fmshimp.cxx | 115 +++--------------- svx/source/form/fmvwimp.cxx | 234 ++++++++++++++---------------------- svx/source/inc/fmvwimp.hxx | 23 ++-- 3 files changed, 122 insertions(+), 250 deletions(-) diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 52ad139543c5..576648847c9f 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -538,7 +538,6 @@ sal_Bool IsSearchableControl( const ::com::sun::star::uno::Reference< ::com::sun //------------------------------------------------------------------------------ sal_Bool FmXBoundFormFieldIterator::ShouldStepInto(const Reference< XInterface>& _rContainer) const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXBoundFormFieldIterator::ShouldStepInto" ); if (_rContainer == m_xStartingPoint) // would be quite stupid to step over the root .... return sal_True; @@ -549,7 +548,6 @@ sal_Bool FmXBoundFormFieldIterator::ShouldStepInto(const Reference< XInterface>& //------------------------------------------------------------------------------ sal_Bool FmXBoundFormFieldIterator::ShouldHandleElement(const Reference< XInterface>& _rElement) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXBoundFormFieldIterator::ShouldHandleElement" ); if (!_rElement.is()) // NULL element return sal_False; @@ -675,7 +673,6 @@ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame ) ,m_bPreparedClose( sal_False ) ,m_bFirstActivation( sal_True ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::FmXFormShell" ); DBG_CTOR(FmXFormShell,NULL); m_aMarkTimer.SetTimeout(100); m_aMarkTimer.SetTimeoutHdl(LINK(this,FmXFormShell,OnTimeOut)); @@ -707,7 +704,6 @@ FmXFormShell::~FmXFormShell() //------------------------------------------------------------------ Reference< XModel > FmXFormShell::getContextDocument() const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::getContextDocument" ); Reference< XModel > xModel; // determine the type of document we live in @@ -729,14 +725,12 @@ Reference< XModel > FmXFormShell::getContextDocument() const //------------------------------------------------------------------ bool FmXFormShell::isEnhancedForm() const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::isEnhancedForm" ); return getDocumentType() == eEnhancedForm; } //------------------------------------------------------------------ bool FmXFormShell::impl_checkDisposed() const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::impl_checkDisposed" ); if ( !m_pShell ) { OSL_ENSURE( false, "FmXFormShell::impl_checkDisposed: already disposed!" ); @@ -748,7 +742,6 @@ bool FmXFormShell::impl_checkDisposed() const //------------------------------------------------------------------ ::svxform::DocumentType FmXFormShell::getDocumentType() const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::getDocumentType" ); if ( m_eDocumentType != eUnknownDocumentType ) return m_eDocumentType; @@ -769,7 +762,6 @@ bool FmXFormShell::impl_checkDisposed() const //------------------------------------------------------------------ bool FmXFormShell::IsReadonlyDoc() const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::IsReadonlyDoc" ); if ( impl_checkDisposed() ) return true; @@ -782,19 +774,16 @@ bool FmXFormShell::IsReadonlyDoc() const //------------------------------------------------------------------ Any SAL_CALL FmXFormShell::queryInterface( const Type& type) throw ( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::queryInterface" ); return FmXFormShell_BASE::queryInterface(type); } //------------------------------------------------------------------------------ Sequence< Type > SAL_CALL FmXFormShell::getTypes( ) throw(RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::getTypes" ); return FmXFormShell_BASE::getTypes(); } //------------------------------------------------------------------------------ Sequence< sal_Int8 > SAL_CALL FmXFormShell::getImplementationId() throw(RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::getImplementationId" ); static ::cppu::OImplementationId* pId = 0; if (! pId) { @@ -811,7 +800,6 @@ Sequence< sal_Int8 > SAL_CALL FmXFormShell::getImplementationId() throw(RuntimeE //------------------------------------------------------------------------------ void SAL_CALL FmXFormShell::disposing(const EventObject& e) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::disposing" ); impl_checkDisposed(); if (m_xActiveController == e.Source) @@ -851,7 +839,6 @@ void SAL_CALL FmXFormShell::disposing(const EventObject& e) throw( RuntimeExcept //------------------------------------------------------------------------------ void SAL_CALL FmXFormShell::propertyChange(const PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::propertyChange" ); if ( impl_checkDisposed() ) return; @@ -888,7 +875,6 @@ void SAL_CALL FmXFormShell::propertyChange(const PropertyChangeEvent& evt) throw //------------------------------------------------------------------------------ void FmXFormShell::invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatures ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::invalidateFeatures" ); if ( impl_checkDisposed() ) return; @@ -918,7 +904,6 @@ void FmXFormShell::invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatu //------------------------------------------------------------------------------ void SAL_CALL FmXFormShell::formActivated(const EventObject& rEvent) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::formActivated" ); if ( impl_checkDisposed() ) return; @@ -930,7 +915,6 @@ void SAL_CALL FmXFormShell::formActivated(const EventObject& rEvent) throw( Runt //------------------------------------------------------------------------------ void SAL_CALL FmXFormShell::formDeactivated(const EventObject& rEvent) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::formDeactivated" ); if ( impl_checkDisposed() ) return; @@ -941,7 +925,6 @@ void SAL_CALL FmXFormShell::formDeactivated(const EventObject& rEvent) throw( Ru //------------------------------------------------------------------------------ void FmXFormShell::disposing() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::disposing" ); impl_checkDisposed(); FmXFormShell_BASE::disposing(); @@ -1019,7 +1002,6 @@ void FmXFormShell::disposing() //------------------------------------------------------------------------------ void FmXFormShell::UpdateSlot( sal_Int16 _nId ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::UpdateSlot" ); if ( impl_checkDisposed() ) return; @@ -1041,7 +1023,6 @@ void FmXFormShell::UpdateSlot( sal_Int16 _nId ) //------------------------------------------------------------------------------ void FmXFormShell::InvalidateSlot( sal_Int16 nId, sal_Bool bWithId ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::InvalidateSlot" ); if ( impl_checkDisposed() ) return; @@ -1062,7 +1043,6 @@ void FmXFormShell::InvalidateSlot( sal_Int16 nId, sal_Bool bWithId ) //------------------------------------------------------------------------------ void FmXFormShell::LockSlotInvalidation(sal_Bool bLock) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::LockSlotInvalidation" ); if ( impl_checkDisposed() ) return; @@ -1109,7 +1089,6 @@ IMPL_LINK(FmXFormShell, OnInvalidateSlots, void*, EMPTYARG) //------------------------------------------------------------------------------ void FmXFormShell::ForceUpdateSelection(sal_Bool bAllowInvalidation) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::ForceUpdateSelection" ); if ( impl_checkDisposed() ) return; @@ -1131,7 +1110,6 @@ void FmXFormShell::ForceUpdateSelection(sal_Bool bAllowInvalidation) //------------------------------------------------------------------------------ PopupMenu* FmXFormShell::GetConversionMenu() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::GetConversionMenu" ); const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); BOOL bIsHiContrastMode = rSettings.GetHighContrastMode(); @@ -1150,7 +1128,6 @@ PopupMenu* FmXFormShell::GetConversionMenu() //------------------------------------------------------------------------------ bool FmXFormShell::isControlConversionSlot( sal_uInt16 nSlotId ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::isControlConversionSlot" ); for ( size_t i = 0; i < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++i ) if (nConvertSlots[i] == nSlotId) return true; @@ -1160,7 +1137,6 @@ bool FmXFormShell::isControlConversionSlot( sal_uInt16 nSlotId ) //------------------------------------------------------------------------------ bool FmXFormShell::executeControlConversionSlot( sal_uInt16 _nSlotId ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::executeControlConversionSlot" ); OSL_PRECOND( canConvertCurrentSelectionToControl( _nSlotId ), "FmXFormShell::executeControlConversionSlot: illegal call!" ); InterfaceBag::const_iterator aSelectedElement = m_aCurrentSelection.begin(); if ( aSelectedElement == m_aCurrentSelection.end() ) @@ -1172,7 +1148,6 @@ bool FmXFormShell::executeControlConversionSlot( sal_uInt16 _nSlotId ) //------------------------------------------------------------------------------ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent >& _rxObject, sal_uInt16 _nSlotId ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::executeControlConversionSlot" ); if ( impl_checkDisposed() ) return false; @@ -1379,7 +1354,6 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent //------------------------------------------------------------------------------ bool FmXFormShell::canConvertCurrentSelectionToControl( sal_Int16 nConversionSlot ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::canConvertCurrentSelectionToControl" ); if ( m_aCurrentSelection.empty() ) return false; @@ -1418,7 +1392,6 @@ bool FmXFormShell::canConvertCurrentSelectionToControl( sal_Int16 nConversionSlo //------------------------------------------------------------------------------ void FmXFormShell::checkControlConversionSlotsForCurrentSelection( Menu& rMenu ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::checkControlConversionSlotsForCurrentSelection" ); for (sal_Int16 i=0; i disable rMenu.EnableItem( rMenu.GetItemId(i), canConvertCurrentSelectionToControl( rMenu.GetItemId( i ) ) ); @@ -1427,7 +1400,6 @@ void FmXFormShell::checkControlConversionSlotsForCurrentSelection( Menu& rMenu ) //------------------------------------------------------------------------------ void FmXFormShell::LoopGrids(sal_Int16 nWhat) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::LoopGrids" ); if ( impl_checkDisposed() ) return; @@ -1497,7 +1469,6 @@ void FmXFormShell::LoopGrids(sal_Int16 nWhat) //------------------------------------------------------------------------------ Reference< XControlContainer > FmXFormShell::getControlContainerForView() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::getControlContainerForView" ); if ( impl_checkDisposed() ) return NULL; @@ -1515,7 +1486,6 @@ Reference< XControlContainer > FmXFormShell::getControlContainerForView() //------------------------------------------------------------------------------ void FmXFormShell::ExecuteTabOrderDialog( const Reference< XTabControllerModel >& _rxForForm ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::ExecuteTabOrderDialog" ); if ( impl_checkDisposed() ) return; @@ -1564,7 +1534,6 @@ void FmXFormShell::ExecuteTabOrderDialog( const Reference< XTabControllerModel > //------------------------------------------------------------------------------ void FmXFormShell::ExecuteSearch() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::ExecuteSearch" ); if ( impl_checkDisposed() ) return; @@ -1711,7 +1680,6 @@ void FmXFormShell::ExecuteSearch() //------------------------------------------------------------------------------ sal_Bool FmXFormShell::GetY2KState(sal_uInt16& n) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::GetY2KState" ); if ( impl_checkDisposed() ) return sal_False; @@ -1751,7 +1719,6 @@ sal_Bool FmXFormShell::GetY2KState(sal_uInt16& n) //------------------------------------------------------------------------------ void FmXFormShell::SetY2KState(sal_uInt16 n) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::SetY2KState" ); if ( impl_checkDisposed() ) return; @@ -1826,7 +1793,6 @@ void FmXFormShell::SetY2KState(sal_uInt16 n) //------------------------------------------------------------------------------ void FmXFormShell::CloseExternalFormViewer() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::CloseExternalFormViewer" ); if ( impl_checkDisposed() ) return; @@ -1848,7 +1814,6 @@ void FmXFormShell::CloseExternalFormViewer() //------------------------------------------------------------------------------ Reference< XResultSet> FmXFormShell::getInternalForm(const Reference< XResultSet>& _xForm) const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::getInternalForm" ); if ( impl_checkDisposed() ) return NULL; @@ -1864,7 +1829,6 @@ Reference< XResultSet> FmXFormShell::getInternalForm(const Reference< XResultSet //------------------------------------------------------------------------------ Reference< XForm> FmXFormShell::getInternalForm(const Reference< XForm>& _xForm) const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::getInternalForm" ); if ( impl_checkDisposed() ) return NULL; @@ -1893,7 +1857,6 @@ namespace //------------------------------------------------------------------------------ bool FmXFormShell::IsFormSlotEnabled( sal_Int32 _nSlot, FeatureState* _pCompleteState ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::IsFormSlotEnabled" ); const ::svx::ControllerFeatures& rController = lcl_isNavigationRelevant( _nSlot ) ? getNavControllerFeatures() @@ -1909,7 +1872,6 @@ bool FmXFormShell::IsFormSlotEnabled( sal_Int32 _nSlot, FeatureState* _pComplete //------------------------------------------------------------------------------ void FmXFormShell::ExecuteFormSlot( sal_Int32 _nSlot ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::ExecuteFormSlot" ); const ::svx::ControllerFeatures& rController = lcl_isNavigationRelevant( _nSlot ) ? getNavControllerFeatures() @@ -1945,7 +1907,6 @@ void FmXFormShell::ExecuteFormSlot( sal_Int32 _nSlot ) //------------------------------------------------------------------------------ void FmXFormShell::impl_switchActiveControllerListening( const bool _bListen ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::impl_switchActiveControllerListening" ); Reference< XComponent> xComp( m_xActiveController, UNO_QUERY ); if ( !xComp.is() ) return; @@ -1959,7 +1920,6 @@ void FmXFormShell::impl_switchActiveControllerListening( const bool _bListen ) //------------------------------------------------------------------------------ void FmXFormShell::setActiveController( const Reference< runtime::XFormController >& xController, sal_Bool _bNoSaveOldContent ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::setActiveController" ); if ( impl_checkDisposed() ) return; @@ -2068,14 +2028,12 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle //------------------------------------------------------------------------------ void FmXFormShell::getCurrentSelection( InterfaceBag& /* [out] */ _rSelection ) const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::getCurrentSelection" ); _rSelection = m_aCurrentSelection; } //------------------------------------------------------------------------------ bool FmXFormShell::setCurrentSelectionFromMark( const SdrMarkList& _rMarkList ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::setCurrentSelectionFromMark" ); m_aLastKnownMarkedControls.clear(); if ( ( _rMarkList.GetMarkCount() > 0 ) && isControlList( _rMarkList ) ) @@ -2087,14 +2045,12 @@ bool FmXFormShell::setCurrentSelectionFromMark( const SdrMarkList& _rMarkList ) //------------------------------------------------------------------------------ bool FmXFormShell::selectLastMarkedControls() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::selectLastMarkedControls" ); return setCurrentSelection( m_aLastKnownMarkedControls ); } //------------------------------------------------------------------------------ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::setCurrentSelection" ); if ( impl_checkDisposed() ) return false; @@ -2176,14 +2132,12 @@ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection ) //------------------------------------------------------------------------------ bool FmXFormShell::isSolelySelected( const Reference< XInterface >& _rxObject ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::isSolelySelected" ); return ( m_aCurrentSelection.size() == 1 ) && ( *m_aCurrentSelection.begin() == _rxObject ); } //------------------------------------------------------------------------------ void FmXFormShell::forgetCurrentForm() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::forgetCurrentForm" ); if ( !m_xCurrentForm.is() ) return; @@ -2198,7 +2152,6 @@ void FmXFormShell::forgetCurrentForm() //------------------------------------------------------------------------------ void FmXFormShell::impl_updateCurrentForm( const Reference< XForm >& _rxNewCurForm ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::impl_updateCurrentForm" ); if ( impl_checkDisposed() ) return; @@ -2217,7 +2170,6 @@ void FmXFormShell::impl_updateCurrentForm( const Reference< XForm >& _rxNewCurFo //------------------------------------------------------------------------------ void FmXFormShell::startListening() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::startListening" ); if ( impl_checkDisposed() ) return; @@ -2297,7 +2249,6 @@ void FmXFormShell::startListening() //------------------------------------------------------------------------------ void FmXFormShell::stopListening() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::stopListening" ); if ( impl_checkDisposed() ) return; @@ -2321,7 +2272,6 @@ void FmXFormShell::stopListening() //------------------------------------------------------------------------------ void FmXFormShell::ShowSelectionProperties( sal_Bool bShow ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::ShowSelectionProperties" ); if ( impl_checkDisposed() ) return; @@ -2652,7 +2602,6 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn //------------------------------------------------------------------------------ void FmXFormShell::elementInserted(const ContainerEvent& evt) throw(::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::elementInserted" ); if ( impl_checkDisposed() ) return; @@ -2666,7 +2615,6 @@ void FmXFormShell::elementInserted(const ContainerEvent& evt) throw(::com::sun:: //------------------------------------------------------------------------------ void FmXFormShell::elementReplaced(const ContainerEvent& evt) throw(::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::elementReplaced" ); if ( impl_checkDisposed() ) return; @@ -2680,7 +2628,6 @@ void FmXFormShell::elementReplaced(const ContainerEvent& evt) throw(::com::sun:: //------------------------------------------------------------------------------ void FmXFormShell::elementRemoved(const ContainerEvent& evt) throw(::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::elementRemoved" ); if ( impl_checkDisposed() ) return; @@ -2693,7 +2640,6 @@ void FmXFormShell::elementRemoved(const ContainerEvent& evt) throw(::com::sun::s //------------------------------------------------------------------------------ void FmXFormShell::UpdateForms( sal_Bool _bInvalidate ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::UpdateForms" ); if ( impl_checkDisposed() ) return; @@ -2719,7 +2665,6 @@ void FmXFormShell::UpdateForms( sal_Bool _bInvalidate ) //------------------------------------------------------------------------------ void FmXFormShell::AddElement(const Reference< XInterface>& _xElement) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::AddElement" ); if ( impl_checkDisposed() ) return; impl_AddElement_nothrow(_xElement); @@ -2752,7 +2697,6 @@ void FmXFormShell::impl_AddElement_nothrow(const Reference< XInterface>& Element //------------------------------------------------------------------------------ void FmXFormShell::RemoveElement(const Reference< XInterface>& Element) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::RemoveElement" ); if ( impl_checkDisposed() ) return; impl_RemoveElement_nothrow(Element); @@ -2789,7 +2733,6 @@ void FmXFormShell::impl_RemoveElement_nothrow(const Reference< XInterface>& Elem //------------------------------------------------------------------------------ void FmXFormShell::selectionChanged(const EventObject& rEvent) throw(::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::selectionChanged" ); if ( impl_checkDisposed() ) return; @@ -2831,7 +2774,6 @@ IMPL_LINK(FmXFormShell, OnTimeOut, void*, /*EMPTYTAG*/) //------------------------------------------------------------------------ void FmXFormShell::SetSelectionDelayed() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::SetSelectionDelayed" ); if ( impl_checkDisposed() ) return; @@ -2842,7 +2784,6 @@ void FmXFormShell::SetSelectionDelayed() //------------------------------------------------------------------------ void FmXFormShell::SetSelection(const SdrMarkList& rMarkList) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::SetSelection" ); if ( impl_checkDisposed() ) return; @@ -2853,7 +2794,6 @@ void FmXFormShell::SetSelection(const SdrMarkList& rMarkList) //------------------------------------------------------------------------ void FmXFormShell::DetermineSelection(const SdrMarkList& rMarkList) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::DetermineSelection" ); if ( setCurrentSelectionFromMark( rMarkList ) && IsPropBrwOpen() ) ShowSelectionProperties( sal_True ); } @@ -2861,7 +2801,6 @@ void FmXFormShell::DetermineSelection(const SdrMarkList& rMarkList) //------------------------------------------------------------------------------ sal_Bool FmXFormShell::IsPropBrwOpen() const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::IsPropBrwOpen" ); if ( impl_checkDisposed() ) return sal_False; @@ -2898,7 +2837,6 @@ public: //------------------------------------------------------------------------------ void FmXFormShell::SetDesignMode(sal_Bool bDesign) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::SetDesignMode" ); if ( impl_checkDisposed() ) return; @@ -3031,7 +2969,6 @@ Reference< XControl> FmXFormShell::impl_getControl( const Reference< XControlMod void FmXFormShell::impl_collectFormSearchContexts_nothrow( const Reference< XInterface>& _rxStartingPoint, const ::rtl::OUString& _rCurrentLevelPrefix, FmFormArray& _out_rForms, ::std::vector< String >& _out_rNames ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::impl_collectFormSearchContexts_nothrow" ); try { Reference< XIndexAccess> xContainer( _rxStartingPoint, UNO_QUERY ); @@ -3086,7 +3023,6 @@ void FmXFormShell::impl_collectFormSearchContexts_nothrow( const Reference< XInt //------------------------------------------------------------------------------ void FmXFormShell::startFiltering() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::startFiltering" ); if ( impl_checkDisposed() ) return; @@ -3103,12 +3039,14 @@ void FmXFormShell::startFiltering() else xContainer = getActiveController()->getContainer(); - FmWinRecList::iterator i = pXView->findWindow(xContainer); - if (i != pXView->getWindowList().end()) + PFormViewPageWindowAdapter pAdapter = pXView->findWindow( xContainer ); + if ( pAdapter.is() ) { - const ::std::vector< Reference< runtime::XFormController> >& rControllerList = (*i)->GetList(); - for (::std::vector< Reference< runtime::XFormController> >::const_iterator j = rControllerList.begin(); - j != rControllerList.end(); ++j) + const ::std::vector< Reference< runtime::XFormController> >& rControllerList = pAdapter->GetList(); + for ( ::std::vector< Reference< runtime::XFormController> >::const_iterator j = rControllerList.begin(); + j != rControllerList.end(); + ++j + ) { Reference< XModeSelector> xModeSelector(*j, UNO_QUERY); if (xModeSelector.is()) @@ -3161,7 +3099,6 @@ void saveFilter(const Reference< runtime::XFormController >& _rxController) //------------------------------------------------------------------------------ void FmXFormShell::stopFiltering(sal_Bool bSave) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::stopFiltering" ); if ( impl_checkDisposed() ) return; @@ -3179,10 +3116,10 @@ void FmXFormShell::stopFiltering(sal_Bool bSave) else xContainer = getActiveController()->getContainer(); - FmWinRecList::iterator i = pXView->findWindow(xContainer); - if (i != pXView->getWindowList().end()) + PFormViewPageWindowAdapter pAdapter = pXView->findWindow(xContainer); + if ( pAdapter.is() ) { - const ::std::vector< Reference< runtime::XFormController > >& rControllerList = (*i)->GetList(); + const ::std::vector< Reference< runtime::XFormController > >& rControllerList = pAdapter->GetList(); ::std::vector < ::rtl::OUString > aOriginalFilters; ::std::vector < sal_Bool > aOriginalApplyFlags; @@ -3223,7 +3160,7 @@ void FmXFormShell::stopFiltering(sal_Bool bSave) } if (bSave) // execute the filter { - const ::std::vector< Reference< runtime::XFormController > > & rControllers = (*i)->GetList(); + const ::std::vector< Reference< runtime::XFormController > > & rControllers = pAdapter->GetList(); for (::std::vector< Reference< runtime::XFormController > > ::const_iterator j = rControllers.begin(); j != rControllers.end(); ++j) { @@ -3300,7 +3237,6 @@ void clearFilter(const Reference< runtime::XFormController >& _rxController) //------------------------------------------------------------------------------ void FmXFormShell::clearFilter() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::clearFilter" ); if ( impl_checkDisposed() ) return; @@ -3316,12 +3252,14 @@ void FmXFormShell::clearFilter() else xContainer = getActiveController()->getContainer(); - FmWinRecList::iterator i = pXView->findWindow(xContainer); - if (i != pXView->getWindowList().end()) + PFormViewPageWindowAdapter pAdapter = pXView->findWindow(xContainer); + if ( pAdapter.is() ) { - const ::std::vector< Reference< runtime::XFormController > > & rControllerList = (*i)->GetList(); - for (::std::vector< Reference< runtime::XFormController > > ::const_iterator j = rControllerList.begin(); - j != rControllerList.end(); ++j) + const ::std::vector< Reference< runtime::XFormController > > & rControllerList = pAdapter->GetList(); + for ( ::std::vector< Reference< runtime::XFormController > > ::const_iterator j = rControllerList.begin(); + j != rControllerList.end(); + ++j + ) { ::clearFilter(*j); } @@ -3331,7 +3269,6 @@ void FmXFormShell::clearFilter() //------------------------------------------------------------------------------ void FmXFormShell::CreateExternalView() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::CreateExternalView" ); if ( impl_checkDisposed() ) return; @@ -3746,7 +3683,6 @@ void FmXFormShell::CreateExternalView() //------------------------------------------------------------------------ void FmXFormShell::implAdjustConfigCache() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::implAdjustConfigCache" ); // get (cache) the wizard usage flag Sequence< ::rtl::OUString > aNames(1); aNames[0] = ::rtl::OUString::createFromAscii("FormControlPilotsEnabled"); @@ -3758,7 +3694,6 @@ void FmXFormShell::implAdjustConfigCache() //------------------------------------------------------------------------ void FmXFormShell::Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::Notify" ); if ( impl_checkDisposed() ) return; @@ -3779,7 +3714,6 @@ void FmXFormShell::Commit() //------------------------------------------------------------------------ void FmXFormShell::SetWizardUsing(sal_Bool _bUseThem) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::SetWizardUsing" ); m_bUseWizards = _bUseThem; Sequence< ::rtl::OUString > aNames(1); @@ -3792,7 +3726,6 @@ void FmXFormShell::SetWizardUsing(sal_Bool _bUseThem) //------------------------------------------------------------------------ void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeactivateController /* = sal_True */ ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewDeactivated" ); if ( _rCurrentView.GetImpl() && !_rCurrentView.IsDesignMode() ) { @@ -3864,7 +3797,6 @@ IMPL_LINK( FmXFormShell, OnFormsCreated, FmFormPage*, /*_pPage*/ ) //------------------------------------------------------------------------ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncAction /* = sal_False */ ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewActivated" ); FmFormPage* pPage = _rCurrentView.GetCurPage(); @@ -3913,7 +3845,6 @@ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncActi //------------------------------------------------------------------------------ void FmXFormShell::impl_defaultCurrentForm_nothrow() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::impl_defaultCurrentForm_nothrow" ); if ( impl_checkDisposed() ) return; @@ -3944,7 +3875,6 @@ void FmXFormShell::impl_defaultCurrentForm_nothrow() //------------------------------------------------------------------------------ void FmXFormShell::smartControlReset( const Reference< XIndexAccess >& _rxModels ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::smartControlReset" ); if (!_rxModels.is()) { DBG_ERROR("FmXFormShell::smartControlReset: invalid container!"); @@ -4052,7 +3982,6 @@ namespace //------------------------------------------------------------------------ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour /* FORMS_LOAD | FORMS_SYNC */ ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::loadForms" ); DBG_ASSERT( ( _nBehaviour & ( FORMS_ASYNC | FORMS_UNLOAD ) ) != ( FORMS_ASYNC | FORMS_UNLOAD ), "FmXFormShell::loadForms: async loading not supported - this will heavily fail!" ); @@ -4130,41 +4059,35 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour / //------------------------------------------------------------------------ void FmXFormShell::ExecuteTextAttribute( SfxRequest& _rReq ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::ExecuteTextAttribute" ); m_pTextShell->ExecuteTextAttribute( _rReq ); } //------------------------------------------------------------------------ void FmXFormShell::GetTextAttributeState( SfxItemSet& _rSet ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::GetTextAttributeState" ); m_pTextShell->GetTextAttributeState( _rSet ); } //------------------------------------------------------------------------ bool FmXFormShell::IsActiveControl( bool _bCountRichTextOnly ) const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::IsActiveControl" ); return m_pTextShell->IsActiveControl( _bCountRichTextOnly ); } //------------------------------------------------------------------------ void FmXFormShell::ForgetActiveControl() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::ForgetActiveControl" ); m_pTextShell->ForgetActiveControl(); } //------------------------------------------------------------------------ void FmXFormShell::SetControlActivationHandler( const Link& _rHdl ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::SetControlActivationHandler" ); m_pTextShell->SetControlActivationHandler( _rHdl ); } //------------------------------------------------------------------------ void FmXFormShell::handleShowPropertiesRequest() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::handleShowPropertiesRequest" ); if ( onlyControlsAreMarked() ) ShowSelectionProperties( sal_True ); } @@ -4172,7 +4095,6 @@ void FmXFormShell::handleShowPropertiesRequest() //------------------------------------------------------------------------ void FmXFormShell::handleMouseButtonDown( const SdrViewEvent& _rViewEvent ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::handleMouseButtonDown" ); // catch simple double clicks if ( ( _rViewEvent.nMouseClicks == 2 ) && ( _rViewEvent.nMouseCode == MOUSE_LEFT ) ) { @@ -4284,7 +4206,6 @@ ControlConversionMenuController::ControlConversionMenuController( sal_uInt16 _nI //------------------------------------------------------------------------------ ControlConversionMenuController::~ControlConversionMenuController() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "ControlConversionMenuController::~ControlConversionMenuController" ); m_pMainMenu->SetPopupMenu(SID_FM_CHANGECONTROLTYPE, NULL); delete m_pConversionMenu; } diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 0bf6a35abd98..8e03961f8135 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -173,20 +173,19 @@ public: }; //======================================================================== -DBG_NAME(FmXPageViewWinRec) +DBG_NAME(FormViewPageWindowAdapter) //------------------------------------------------------------------------ -FmXPageViewWinRec::FmXPageViewWinRec( const ::comphelper::ComponentContext& _rContext, const SdrPageWindow& _rWindow, FmXFormView* _pViewImpl ) +FormViewPageWindowAdapter::FormViewPageWindowAdapter( const ::comphelper::ComponentContext& _rContext, const SdrPageWindow& _rWindow, FmXFormView* _pViewImpl ) : m_xControlContainer( _rWindow.GetControlContainer() ), m_aContext( _rContext ), m_pViewImpl( _pViewImpl ), m_pWindow( dynamic_cast< Window* >( &_rWindow.GetPaintWindow().GetOutputDevice() ) ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::FmXPageViewWinRec" ); - DBG_CTOR(FmXPageViewWinRec,NULL); + DBG_CTOR(FormViewPageWindowAdapter,NULL); // create an XFormController for every form FmFormPage* pFormPage = dynamic_cast< FmFormPage* >( _rWindow.GetPageView().GetPage() ); - DBG_ASSERT( pFormPage, "FmXPageViewWinRec::FmXPageViewWinRec: no FmFormPage found!" ); + DBG_ASSERT( pFormPage, "FormViewPageWindowAdapter::FormViewPageWindowAdapter: no FmFormPage found!" ); if ( pFormPage ) { try @@ -207,15 +206,14 @@ FmXPageViewWinRec::FmXPageViewWinRec( const ::comphelper::ComponentContext& _rCo } } // ----------------------------------------------------------------------------- -FmXPageViewWinRec::~FmXPageViewWinRec() +FormViewPageWindowAdapter::~FormViewPageWindowAdapter() { - DBG_DTOR(FmXPageViewWinRec,NULL); + DBG_DTOR(FormViewPageWindowAdapter,NULL); } //------------------------------------------------------------------ -void FmXPageViewWinRec::dispose() +void FormViewPageWindowAdapter::dispose() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::dispose" ); for ( ::std::vector< Reference< XFormController > >::const_iterator i = m_aControllerList.begin(); i != m_aControllerList.end(); ++i @@ -249,39 +247,34 @@ void FmXPageViewWinRec::dispose() //------------------------------------------------------------------------------ -sal_Bool SAL_CALL FmXPageViewWinRec::hasElements(void) throw( RuntimeException ) +sal_Bool SAL_CALL FormViewPageWindowAdapter::hasElements(void) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::hasElements" ); return getCount() != 0; } //------------------------------------------------------------------------------ -Type SAL_CALL FmXPageViewWinRec::getElementType(void) throw( RuntimeException ) +Type SAL_CALL FormViewPageWindowAdapter::getElementType(void) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::getElementType" ); return ::getCppuType((const Reference< XFormController>*)0); } // XEnumerationAccess //------------------------------------------------------------------------------ -Reference< XEnumeration > SAL_CALL FmXPageViewWinRec::createEnumeration(void) throw( RuntimeException ) +Reference< XEnumeration > SAL_CALL FormViewPageWindowAdapter::createEnumeration(void) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::createEnumeration" ); return new ::comphelper::OEnumerationByIndex(this); } // XIndexAccess //------------------------------------------------------------------------------ -sal_Int32 SAL_CALL FmXPageViewWinRec::getCount(void) throw( RuntimeException ) +sal_Int32 SAL_CALL FormViewPageWindowAdapter::getCount(void) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::getCount" ); return m_aControllerList.size(); } //------------------------------------------------------------------------------ -Any SAL_CALL FmXPageViewWinRec::getByIndex(sal_Int32 nIndex) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) +Any SAL_CALL FormViewPageWindowAdapter::getByIndex(sal_Int32 nIndex) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::getByIndex" ); if (nIndex < 0 || nIndex >= getCount()) throw IndexOutOfBoundsException(); @@ -292,7 +285,7 @@ Any SAL_CALL FmXPageViewWinRec::getByIndex(sal_Int32 nIndex) throw( IndexOutOfBo } //------------------------------------------------------------------------ -void SAL_CALL FmXPageViewWinRec::makeVisible( const Reference< XControl >& _Control ) throw (RuntimeException) +void SAL_CALL FormViewPageWindowAdapter::makeVisible( const Reference< XControl >& _Control ) throw (RuntimeException) { ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); @@ -331,9 +324,8 @@ Reference< XFormController > getControllerSearchChilds( const Reference< XIndex // Search the according controller //------------------------------------------------------------------------ -Reference< XFormController > FmXPageViewWinRec::getController( const Reference< XForm > & xForm ) const +Reference< XFormController > FormViewPageWindowAdapter::getController( const Reference< XForm > & xForm ) const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::getController" ); Reference< XTabControllerModel > xModel(xForm, UNO_QUERY); for (::std::vector< Reference< XFormController > >::const_iterator i = m_aControllerList.begin(); i != m_aControllerList.end(); i++) @@ -350,9 +342,9 @@ Reference< XFormController > FmXPageViewWinRec::getController( const Reference< } //------------------------------------------------------------------------ -void FmXPageViewWinRec::setController(const Reference< XForm > & xForm, const Reference< XFormController >& _rxParentController ) +void FormViewPageWindowAdapter::setController(const Reference< XForm > & xForm, const Reference< XFormController >& _rxParentController ) { - DBG_ASSERT( xForm.is(), "FmXPageViewWinRec::setController: there should be a form!" ); + DBG_ASSERT( xForm.is(), "FormViewPageWindowAdapter::setController: there should be a form!" ); Reference< XIndexAccess > xFormCps(xForm, UNO_QUERY); if (!xFormCps.is()) return; @@ -410,10 +402,9 @@ void FmXPageViewWinRec::setController(const Reference< XForm > & xForm, const Re } //------------------------------------------------------------------------ -void FmXPageViewWinRec::updateTabOrder( const Reference< XForm >& _rxForm ) +void FormViewPageWindowAdapter::updateTabOrder( const Reference< XForm >& _rxForm ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::updateTabOrder" ); - OSL_PRECOND( _rxForm.is(), "FmXPageViewWinRec::updateTabOrder: illegal argument!" ); + OSL_PRECOND( _rxForm.is(), "FormViewPageWindowAdapter::updateTabOrder: illegal argument!" ); if ( !_rxForm.is() ) return; @@ -457,13 +448,11 @@ FmXFormView::FmXFormView(const ::comphelper::ComponentContext& _rContext, FmForm ,m_bFirstActivation( true ) ,m_isTabOrderUpdateSuspended( false ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::FmXFormView" ); } //------------------------------------------------------------------------ void FmXFormView::cancelEvents() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::cancelEvents" ); if ( m_nActivationEvent ) { Application::RemoveUserEvent( m_nActivationEvent ); @@ -492,7 +481,6 @@ void FmXFormView::cancelEvents() //------------------------------------------------------------------------ void FmXFormView::notifyViewDying( ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::notifyViewDying" ); DBG_ASSERT( m_pView, "FmXFormView::notifyViewDying: my view already died!" ); m_pView = NULL; cancelEvents(); @@ -501,7 +489,7 @@ void FmXFormView::notifyViewDying( ) //------------------------------------------------------------------------ FmXFormView::~FmXFormView() { - DBG_ASSERT(m_aWinList.size() == 0, "FmXFormView::~FmXFormView: Window list not empty!"); + DBG_ASSERT( m_aPageWindowAdapters.empty(), "FmXFormView::~FmXFormView: Window list not empty!" ); cancelEvents(); @@ -513,7 +501,6 @@ FmXFormView::~FmXFormView() //------------------------------------------------------------------------------ void SAL_CALL FmXFormView::disposing(const EventObject& Source) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::disposing" ); if ( m_xWindow.is() && Source.Source == m_xWindow ) removeGridWindowListening(); } @@ -522,7 +509,6 @@ void SAL_CALL FmXFormView::disposing(const EventObject& Source) throw( RuntimeEx //------------------------------------------------------------------------------ void SAL_CALL FmXFormView::formActivated(const EventObject& rEvent) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::formActivated" ); if ( m_pView && m_pView->GetFormShell() && m_pView->GetFormShell()->GetImpl() ) m_pView->GetFormShell()->GetImpl()->formActivated( rEvent ); } @@ -530,7 +516,6 @@ void SAL_CALL FmXFormView::formActivated(const EventObject& rEvent) throw( Runti //------------------------------------------------------------------------------ void SAL_CALL FmXFormView::formDeactivated(const EventObject& rEvent) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::formDeactivated" ); if ( m_pView && m_pView->GetFormShell() && m_pView->GetFormShell()->GetImpl() ) m_pView->GetFormShell()->GetImpl()->formDeactivated( rEvent ); } @@ -539,7 +524,6 @@ void SAL_CALL FmXFormView::formDeactivated(const EventObject& rEvent) throw( Run //------------------------------------------------------------------------------ void SAL_CALL FmXFormView::elementInserted(const ContainerEvent& evt) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::elementInserted" ); try { Reference< XControlContainer > xControlContainer( evt.Source, UNO_QUERY_THROW ); @@ -554,11 +538,9 @@ void SAL_CALL FmXFormView::elementInserted(const ContainerEvent& evt) throw( Run } else { - FmWinRecList::iterator pos = findWindow( xControlContainer ); - if ( pos != m_aWinList.end() ) - { - (*pos)->updateTabOrder( xForm ); - } + PFormViewPageWindowAdapter pAdapter = findWindow( xControlContainer ); + if ( pAdapter.is() ) + pAdapter->updateTabOrder( xForm ); } } catch( const Exception& ) @@ -570,92 +552,80 @@ void SAL_CALL FmXFormView::elementInserted(const ContainerEvent& evt) throw( Run //------------------------------------------------------------------------------ void SAL_CALL FmXFormView::elementReplaced(const ContainerEvent& evt) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::elementReplaced" ); elementInserted(evt); } //------------------------------------------------------------------------------ void SAL_CALL FmXFormView::elementRemoved(const ContainerEvent& /*evt*/) throw( RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::elementRemoved" ); } //------------------------------------------------------------------------------ -FmWinRecList::const_iterator FmXFormView::findWindow( const Reference< XControlContainer >& _rxCC ) const +PFormViewPageWindowAdapter FmXFormView::findWindow( const Reference< XControlContainer >& _rxCC ) const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::findWindow" ); - for (FmWinRecList::const_iterator i = m_aWinList.begin(); - i != m_aWinList.end(); i++) + for ( PageWindowAdapterList::const_iterator i = m_aPageWindowAdapters.begin(); + i != m_aPageWindowAdapters.end(); + ++i + ) { if ( _rxCC == (*i)->getControlContainer() ) - return i; + return *i; } - return m_aWinList.end(); -} - -//------------------------------------------------------------------------------ -FmWinRecList::iterator FmXFormView::findWindow( const Reference< XControlContainer >& _rxCC ) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::findWindow" ); - for (FmWinRecList::iterator i = m_aWinList.begin(); - i != m_aWinList.end(); i++) - { - if ( _rxCC == (*i)->getControlContainer() ) - return i; - } - return m_aWinList.end(); + return NULL; } //------------------------------------------------------------------------------ void FmXFormView::addWindow(const SdrPageWindow& rWindow) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::addWindow" ); FmFormPage* pFormPage = PTR_CAST( FmFormPage, rWindow.GetPageView().GetPage() ); if ( !pFormPage ) return; Reference< XControlContainer > xCC = rWindow.GetControlContainer(); - if ( xCC.is() && findWindow( xCC ) == m_aWinList.end()) + if ( xCC.is() + && ( !findWindow( xCC ).is() ) + ) { - FmXPageViewWinRec *pFmRec = new FmXPageViewWinRec( m_aContext, rWindow, this ); - pFmRec->acquire(); - - m_aWinList.push_back(pFmRec); + PFormViewPageWindowAdapter pAdapter = new FormViewPageWindowAdapter( m_aContext, rWindow, this ); + m_aPageWindowAdapters.push_back( pAdapter ); // Am ControlContainer horchen um Aenderungen mitzbekommen Reference< XContainer > xContainer( xCC, UNO_QUERY ); - if (xContainer.is()) - xContainer->addContainerListener(this); + if ( xContainer.is() ) + xContainer->addContainerListener( this ); } } //------------------------------------------------------------------------------ void FmXFormView::removeWindow( const Reference< XControlContainer >& _rxCC ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::removeWindow" ); // Wird gerufen, wenn // - in den Design-Modus geschaltet wird // - ein Window geloescht wird, waehrend man im Design-Modus ist // - der Control-Container fuer ein Window entfernt wird, waehrend // der aktive Modus eingeschaltet ist. - FmWinRecList::iterator i = findWindow( _rxCC ); - if (i != m_aWinList.end()) + + for ( PageWindowAdapterList::iterator i = m_aPageWindowAdapters.begin(); + i != m_aPageWindowAdapters.end(); + ++i + ) { - // Am ControlContainer horchen um Aenderungen mitzbekommen + if ( _rxCC != (*i)->getControlContainer() ) + continue; + Reference< XContainer > xContainer( _rxCC, UNO_QUERY ); - if (xContainer.is()) - xContainer->removeContainerListener(this); + if ( xContainer.is() ) + xContainer->removeContainerListener( this ); (*i)->dispose(); - (*i)->release(); - m_aWinList.erase(i); + m_aPageWindowAdapters.erase( i ); + break; } } //------------------------------------------------------------------------------ void FmXFormView::displayAsyncErrorMessage( const SQLErrorEvent& _rEvent ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::displayAsyncErrorMessage" ); DBG_ASSERT( 0 == m_nErrorMessageEvent, "FmXFormView::displayAsyncErrorMessage: not too fast, please!" ); // This should not happen - usually, the PostUserEvent is faster than any possible user // interaction which could trigger a new error. If it happens, we need a queue for the events. @@ -674,7 +644,6 @@ IMPL_LINK(FmXFormView, OnDelayedErrorMessage, void*, /*EMPTYTAG*/) //------------------------------------------------------------------------------ void FmXFormView::onFirstViewActivation( const FmFormModel* _pDocModel ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::onFirstViewActivation" ); if ( _pDocModel && _pDocModel->GetAutoControlFocus() ) m_nAutoFocusEvent = Application::PostUserEvent( LINK( this, FmXFormView, OnAutoFocus ) ); } @@ -682,7 +651,6 @@ void FmXFormView::onFirstViewActivation( const FmFormModel* _pDocModel ) //------------------------------------------------------------------------------ void FmXFormView::suspendTabOrderUpdate() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::suspendTabOrderUpdate" ); OSL_ENSURE( !m_isTabOrderUpdateSuspended, "FmXFormView::suspendTabOrderUpdate: nesting not allowed!" ); m_isTabOrderUpdateSuspended = true; } @@ -690,7 +658,6 @@ void FmXFormView::suspendTabOrderUpdate() //------------------------------------------------------------------------------ void FmXFormView::resumeTabOrderUpdate() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::resumeTabOrderUpdate" ); OSL_ENSURE( m_isTabOrderUpdateSuspended, "FmXFormView::resumeTabOrderUpdate: not suspended!" ); m_isTabOrderUpdateSuspended = false; @@ -700,8 +667,8 @@ void FmXFormView::resumeTabOrderUpdate() ++container ) { - FmWinRecList::iterator pos = findWindow( container->first ); - if ( pos == m_aWinList.end() ) + PFormViewPageWindowAdapter pAdapter = findWindow( container->first ); + if ( !pAdapter.is() ) continue; for ( SetOfForms::const_iterator form = container->second.begin(); @@ -709,7 +676,7 @@ void FmXFormView::resumeTabOrderUpdate() ++form ) { - (*pos)->updateTabOrder( *form ); + pAdapter->updateTabOrder( *form ); } } m_aNeedTabOrderUpdate.clear(); @@ -730,41 +697,42 @@ IMPL_LINK(FmXFormView, OnActivate, void*, /*EMPTYTAG*/) if (m_pView->GetFormShell() && m_pView->GetActualOutDev() && m_pView->GetActualOutDev()->GetOutDevType() == OUTDEV_WINDOW) { Window* pWindow = const_cast(static_cast(m_pView->GetActualOutDev())); - FmXPageViewWinRec* pFmRec = m_aWinList.size() ? m_aWinList[0] : NULL; - for (FmWinRecList::const_iterator i = m_aWinList.begin(); - i != m_aWinList.end(); i++) + PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? NULL : m_aPageWindowAdapters[0]; + for ( PageWindowAdapterList::const_iterator i = m_aPageWindowAdapters.begin(); + i != m_aPageWindowAdapters.end(); + ++i + ) { - if (pWindow == (*i)->getWindow()) - pFmRec =*i; + if ( pWindow == (*i)->getWindow() ) + pAdapter =*i; } - if (pFmRec) + if ( pAdapter.get() ) { - for (::std::vector< Reference< XFormController > >::const_iterator i = pFmRec->GetList().begin(); - i != pFmRec->GetList().end(); i++) + for ( ::std::vector< Reference< XFormController > >::const_iterator i = pAdapter->GetList().begin(); + i != pAdapter->GetList().end(); + ++i + ) { const Reference< XFormController > & xController = *i; - if (xController.is()) + if ( !xController.is() ) + continue; + + // only database forms are to be activated + Reference< XRowSet > xForm(xController->getModel(), UNO_QUERY); + if ( !xForm.is() || !OStaticDataAccessTools().getRowSetConnection( xForm ).is() ) + continue; + + Reference< XPropertySet > xFormSet( xForm, UNO_QUERY ); + ENSURE_OR_CONTINUE( xFormSet.is(), "FmXFormView::OnActivate: a form which does not have properties?" ); + + const ::rtl::OUString aSource = ::comphelper::getString( xFormSet->getPropertyValue( FM_PROP_COMMAND ) ); + if ( aSource.getLength() ) { - // Nur bei Datenbankformularen erfolgt eine aktivierung - Reference< XRowSet > xForm(xController->getModel(), UNO_QUERY); - if (xForm.is() && OStaticDataAccessTools().getRowSetConnection(xForm).is()) - { - Reference< XPropertySet > xFormSet(xForm, UNO_QUERY); - if (xFormSet.is()) - { - // wenn es eine Datenquelle gibt, dann als aktive ::com::sun::star::form setzen - ::rtl::OUString aSource = ::comphelper::getString(xFormSet->getPropertyValue(FM_PROP_COMMAND)); - if (aSource.getLength()) - { - // benachrichtigung der Shell - FmXFormShell* pShImpl = m_pView->GetFormShell()->GetImpl(); - if (pShImpl) - pShImpl->setActiveController(xController); - break; - } - } - } + FmXFormShell* pShImpl = m_pView->GetFormShell()->GetImpl(); + if ( pShImpl ) + pShImpl->setActiveController( xController ); + break; } } } @@ -775,7 +743,6 @@ IMPL_LINK(FmXFormView, OnActivate, void*, /*EMPTYTAG*/) //------------------------------------------------------------------------------ void FmXFormView::Activate(sal_Bool bSync) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::Activate" ); if (m_nActivationEvent) { Application::RemoveUserEvent(m_nActivationEvent); @@ -793,7 +760,6 @@ void FmXFormView::Activate(sal_Bool bSync) //------------------------------------------------------------------------------ void FmXFormView::Deactivate(BOOL bDeactivateController) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::Deactivate" ); if (m_nActivationEvent) { Application::RemoveUserEvent(m_nActivationEvent); @@ -808,13 +774,11 @@ void FmXFormView::Deactivate(BOOL bDeactivateController) //------------------------------------------------------------------------------ FmFormShell* FmXFormView::GetFormShell() const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::GetFormShell" ); return m_pView ? m_pView->GetFormShell() : NULL; } // ----------------------------------------------------------------------------- void FmXFormView::AutoFocus( sal_Bool _bSync ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::AutoFocus" ); if (m_nAutoFocusEvent) Application::RemoveUserEvent(m_nAutoFocusEvent); @@ -927,18 +891,20 @@ namespace // ----------------------------------------------------------------------------- Reference< XFormController > FmXFormView::getFormController( const Reference< XForm >& _rxForm, const OutputDevice& _rDevice ) const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::getFormController" ); Reference< XFormController > xController; - for ( FmWinRecList::const_iterator rec = m_aWinList.begin(); rec != m_aWinList.end(); ++rec ) + for ( PageWindowAdapterList::const_iterator pos = m_aPageWindowAdapters.begin(); + pos != m_aPageWindowAdapters.end(); + ++pos + ) { - const FmXPageViewWinRec* pViewWinRec( *rec ); - OSL_ENSURE( pViewWinRec, "FmXFormView::getFormController: invalid PageViewWinRec!" ); - if ( !pViewWinRec || ( pViewWinRec->getWindow() != &_rDevice ) ) + const PFormViewPageWindowAdapter pAdapter( *pos ); + ENSURE_OR_CONTINUE( pAdapter.get(), "FmXFormView::getFormController: invalid page window adapter!" ); + if ( pAdapter->getWindow() != &_rDevice ) // wrong device continue; - xController = pViewWinRec->getController( _rxForm ); + xController = pAdapter->getController( _rxForm ); if ( xController.is() ) break; } @@ -960,12 +926,10 @@ IMPL_LINK(FmXFormView, OnAutoFocus, void*, /*EMPTYTAG*/) FmFormPage* pPage = m_pView ? PTR_CAST( FmFormPage, m_pView->GetSdrPageView()->GetPage() ) : NULL; Reference< XIndexAccess > xForms( pPage ? Reference< XIndexAccess >( pPage->GetForms(), UNO_QUERY ) : Reference< XIndexAccess >() ); - const FmXPageViewWinRec* pViewWinRec = m_aWinList.size() ? m_aWinList[0] : NULL; - const Window* pWindow = pViewWinRec ? pViewWinRec->getWindow() : NULL; + const PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? NULL : m_aPageWindowAdapters[0]; + const Window* pWindow = pAdapter.get() ? pAdapter->getWindow() : NULL; - OSL_ENSURE( xForms.is() && pWindow, "FmXFormView::OnAutoFocus: could not collect all essentials!" ); - if ( !xForms.is() || !pWindow ) - return 0L; + ENSURE_OR_RETURN( xForms.is() && pWindow, "FmXFormView::OnAutoFocus: could not collect all essentials!", 0L ); try { @@ -973,7 +937,7 @@ IMPL_LINK(FmXFormView, OnAutoFocus, void*, /*EMPTYTAG*/) if ( !xForms->getCount() ) break; Reference< XForm > xForm( xForms->getByIndex( 0 ), UNO_QUERY_THROW ); - Reference< XTabController > xTabController( pViewWinRec->getController( xForm ), UNO_QUERY_THROW ); + Reference< XTabController > xTabController( pAdapter->getController( xForm ), UNO_QUERY_THROW ); // go for the first control of the controller Sequence< Reference< XControl > > aControls( xTabController->getControls() ); @@ -1024,7 +988,6 @@ IMPL_LINK(FmXFormView, OnAutoFocus, void*, /*EMPTYTAG*/) // ----------------------------------------------------------------------------- void FmXFormView::onCreatedFormObject( FmFormObj& _rFormObject ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::onCreatedFormObject" ); FmFormShell* pShell = m_pView ? m_pView->GetFormShell() : NULL; FmXFormShell* pShellImpl = pShell ? pShell->GetImpl() : NULL; OSL_ENSURE( pShellImpl, "FmXFormView::onCreatedFormObject: no form shell!" ); @@ -1155,7 +1118,6 @@ namespace // ----------------------------------------------------------------------------- SdrObject* FmXFormView::implCreateFieldControl( const ::svx::ODataAccessDescriptor& _rColumnDescriptor ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::implCreateFieldControl" ); // not if we're in design mode if ( !m_pView->IsDesignMode() ) return NULL; @@ -1387,7 +1349,6 @@ SdrObject* FmXFormView::implCreateFieldControl( const ::svx::ODataAccessDescript // ----------------------------------------------------------------------------- SdrObject* FmXFormView::implCreateXFormsControl( const ::svx::OXFormsDescriptor &_rDesc ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::implCreateXFormsControl" ); // not if we're in design mode if ( !m_pView->IsDesignMode() ) return NULL; @@ -1523,7 +1484,6 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO const Reference< XDataSource >& _rxDataSource, const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rCommand, const sal_Int32 _nCommandType ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::createControlLabelPair" ); if ( !createControlLabelPair( m_aContext, _rOutDev, _nXOffsetMM, _nYOffsetMM, _rxField, _rxNumberFormats, _nControlObjectID, _rFieldPostfix, FmFormInventor, OBJ_FM_FIXEDTEXT, NULL, NULL, NULL, _rpLabel, _rpControl ) @@ -1551,7 +1511,6 @@ bool FmXFormView::createControlLabelPair( const ::comphelper::ComponentContext& const ::rtl::OUString& _rFieldPostfix, UINT32 _nInventor, UINT16 _nLabelObjectID, SdrPage* _pLabelPage, SdrPage* _pControlPage, SdrModel* _pModel, SdrUnoObj*& _rpLabel, SdrUnoObj*& _rpControl) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::createControlLabelPair" ); sal_Int32 nDataType = 0; ::rtl::OUString sFieldName; Any aFieldName; @@ -1717,7 +1676,6 @@ void FmXFormView::ObjectRemoveListener::Notify( SfxBroadcaster& /*rBC*/, const S //------------------------------------------------------------------------------ void FmXFormView::ObjectRemovedInAliveMode( const SdrObject* pObject ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::ObjectRemovedInAliveMode" ); // wenn das entfernte Objekt in meiner MarkList, die ich mir beim Umschalten in den Alive-Mode gemerkt habe, steht, // muss ich es jetzt da rausnehmen, da ich sonst beim Zurueckschalten versuche, die Markierung wieder zu setzen // (interesanterweise geht das nur bei gruppierten Objekten schief (beim Zugriff auf deren ObjList GPF), nicht bei einzelnen) @@ -1740,7 +1698,6 @@ void FmXFormView::ObjectRemovedInAliveMode( const SdrObject* pObject ) //------------------------------------------------------------------------------ void FmXFormView::stopMarkListWatching() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::stopMarkListWatching" ); if ( m_pWatchStoredList ) { m_pWatchStoredList->EndListeningAll(); @@ -1752,7 +1709,6 @@ void FmXFormView::stopMarkListWatching() //------------------------------------------------------------------------------ void FmXFormView::startMarkListWatching() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::startMarkListWatching" ); if ( !m_pWatchStoredList ) { m_pWatchStoredList = new ObjectRemoveListener( this ); @@ -1769,7 +1725,6 @@ void FmXFormView::startMarkListWatching() //------------------------------------------------------------------------------ void FmXFormView::saveMarkList( sal_Bool _bSmartUnmark ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::saveMarkList" ); if ( m_pView ) { m_aMark = m_pView->GetMarkedObjectList(); @@ -1828,7 +1783,6 @@ static sal_Bool lcl_hasObject( SdrObjListIter& rIter, SdrObject* pObj ) //------------------------------------------------------------------------------ void FmXFormView::restoreMarkList( SdrMarkList& _rRestoredMarkList ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::restoreMarkList" ); if ( !m_pView ) return; @@ -1916,7 +1870,6 @@ void FmXFormView::restoreMarkList( SdrMarkList& _rRestoredMarkList ) // ----------------------------------------------------------------------------- void SAL_CALL FmXFormView::focusGained( const FocusEvent& /*e*/ ) throw (RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::focusGained" ); if ( m_xWindow.is() && m_pView ) { m_pView->SetMoveOutside( TRUE, FmFormView::ImplAccess() ); @@ -1925,7 +1878,6 @@ void SAL_CALL FmXFormView::focusGained( const FocusEvent& /*e*/ ) throw (Runtime // ----------------------------------------------------------------------------- void SAL_CALL FmXFormView::focusLost( const FocusEvent& /*e*/ ) throw (RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::focusLost" ); // when switch the focus outside the office the mark didn't change // so we can not remove us as focus listener if ( m_xWindow.is() && m_pView ) @@ -1936,7 +1888,6 @@ void SAL_CALL FmXFormView::focusLost( const FocusEvent& /*e*/ ) throw (RuntimeEx // ----------------------------------------------------------------------------- void FmXFormView::removeGridWindowListening() { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::removeGridWindowListening" ); if ( m_xWindow.is() ) { m_xWindow->removeFocusListener(this); @@ -1951,7 +1902,6 @@ void FmXFormView::removeGridWindowListening() // ----------------------------------------------------------------------------- DocumentType FmXFormView::impl_getDocumentType() const { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::impl_getDocumentType" ); if ( GetFormShell() && GetFormShell()->GetImpl() ) return GetFormShell()->GetImpl()->getDocumentType(); return eUnknownDocumentType; diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx index 1131209a384a..8bb682690b36 100644 --- a/svx/source/inc/fmvwimp.hxx +++ b/svx/source/inc/fmvwimp.hxx @@ -51,6 +51,7 @@ #include #include #include +#include //class SdrPageViewWinRec; class SdrPageWindow; @@ -79,13 +80,13 @@ namespace svx { } //================================================================== -// FmXPageViewWinRec +// FormViewPageWindowAdapter //================================================================== typedef ::cppu::WeakImplHelper2 < ::com::sun::star::container::XIndexAccess , ::com::sun::star::form::runtime::XFormControllerContext - > FmXPageViewWinRec_Base; + > FormViewPageWindowAdapter_Base; -class FmXPageViewWinRec : public FmXPageViewWinRec_Base +class FormViewPageWindowAdapter : public FormViewPageWindowAdapter_Base { friend class FmXFormView; @@ -96,10 +97,10 @@ class FmXPageViewWinRec : public FmXPageViewWinRec_Base Window* m_pWindow; protected: - ~FmXPageViewWinRec(); + ~FormViewPageWindowAdapter(); public: - FmXPageViewWinRec( const ::comphelper::ComponentContext& _rContext, + FormViewPageWindowAdapter( const ::comphelper::ComponentContext& _rContext, const SdrPageWindow&, FmXFormView* pView); //const SdrPageViewWinRec*, FmXFormView* pView); @@ -130,7 +131,8 @@ protected: Window* getWindow() const {return m_pWindow;} }; -typedef ::std::vector FmWinRecList; +typedef ::rtl::Reference< FormViewPageWindowAdapter > PFormViewPageWindowAdapter; +typedef ::std::vector< PFormViewPageWindowAdapter > PageWindowAdapterList; typedef ::std::set < ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > , ::comphelper::OInterfaceCompare< ::com::sun::star::form::XForm > > SetOfForms; @@ -150,7 +152,7 @@ class FmXFormView : public ::cppu::WeakImplHelper3< friend class FmFormView; friend class FmFormShell; friend class FmXFormShell; - friend class FmXPageViewWinRec; + friend class FormViewPageWindowAdapter; class ObjectRemoveListener; friend class ObjectRemoveListener; @@ -168,7 +170,8 @@ class FmXFormView : public ::cppu::WeakImplHelper3< ::com::sun::star::sdb::SQLErrorEvent m_aAsyncError; // error event which is to be displayed asyn. See m_nErrorMessageEvent. - FmWinRecList m_aWinList; // to be filled in alive mode only + PageWindowAdapterList + m_aPageWindowAdapters; // to be filled in alive mode only MapControlContainerToSetOfForms m_aNeedTabOrderUpdate; @@ -215,8 +218,7 @@ public: virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException); FmFormView* getView() const {return m_pView;} - FmWinRecList::const_iterator findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxCC ) const; - const FmWinRecList& getWindowList() const {return m_aWinList;} + PFormViewPageWindowAdapter findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxCC ) const; ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm, const OutputDevice& _rDevice ) const; @@ -246,7 +248,6 @@ public: ); private: - FmWinRecList::iterator findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxCC ); //void addWindow(const SdrPageViewWinRec*); void addWindow(const SdrPageWindow&); void removeWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxCC ); From ecbd2f0119229ef432e7076e5702ecbf7aa8e0dd Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 24 Sep 2010 12:59:00 +0200 Subject: [PATCH 156/279] dba34a: #i114606# ~FmXFormView: do not only assert when our adapter list is not empty upon destruction, but properly clean it up --- svx/source/form/fmvwimp.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 8e03961f8135..2bf00300a5a5 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -490,6 +490,16 @@ void FmXFormView::notifyViewDying( ) FmXFormView::~FmXFormView() { DBG_ASSERT( m_aPageWindowAdapters.empty(), "FmXFormView::~FmXFormView: Window list not empty!" ); + if ( !m_aPageWindowAdapters.empty() ) + { + for ( PageWindowAdapterList::const_iterator loop = m_aPageWindowAdapters.begin(); + loop != m_aPageWindowAdapters.end(); + ++loop + ) + { + (*loop)->dispose(); + } + } cancelEvents(); From 47c0ac79eea410b8b110e2bf5abfc2d86ef9164a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 24 Sep 2010 15:57:20 +0200 Subject: [PATCH 157/279] dba34a: separate the handling of generic property/attributes into a dedicated method, which can be called at appropriate time by derived classes (if desired, otherwise OElementImport will call it automatically) --- xmloff/source/forms/elementimport.cxx | 64 ++++++++++++++++----------- xmloff/source/forms/elementimport.hxx | 29 ++++++++---- 2 files changed, 59 insertions(+), 34 deletions(-) diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index ed11b57d9c54..cdaa36d7a5a6 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -160,6 +160,7 @@ namespace xmloff ,m_rEventManager(_rEventManager) ,m_pStyleElement( NULL ) ,m_xParentContainer(_rxParentContainer) + ,m_bImplicitGenericAttributeHandling( true ) { OSL_ENSURE(m_xParentContainer.is(), "OElementImport::OElementImport: invalid parent container!"); } @@ -545,30 +546,8 @@ namespace xmloff } //--------------------------------------------------------------------- - bool OElementImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OElementImport::tryGenericAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ) { - if ( token::IsXMLToken( _rLocalName, token::XML_CONTROL_IMPLEMENTATION ) ) - // ignore this, it has already been handled in OElementImport::StartElement - return true; - - if ( token::IsXMLToken( _rLocalName, token::XML_NAME ) ) - { - if ( !m_sName.getLength() ) - // remember the name for later use in EndElement - m_sName = _rValue; - return true; - } - - // maybe it's the style attribute? - if ( token::IsXMLToken( _rLocalName, token::XML_TEXT_STYLE_NAME ) ) - { - const SvXMLStyleContext* pStyleContext = m_rContext.getStyleElement( _rValue ); - OSL_ENSURE( pStyleContext, "OElementImport::handleAttribute: do not know the style!" ); - // remember the element for later usage. - m_pStyleElement = PTR_CAST( XMLTextStyleContext, pStyleContext ); - return true; - } - // the generic approach (which I hope all props will be migrated to, on the medium term): property handlers const AttributeDescription attribute( metadata::getAttributeDescription( _nNamespaceKey, _rLocalName ) ); if ( attribute.attributeToken != XML_TOKEN_INVALID ) @@ -577,7 +556,7 @@ namespace xmloff metadata::getPropertyGroupList( attribute, propertyGroups ); const PropertyGroups::const_iterator pos = impl_matchPropertyGroup( propertyGroups ); if ( pos == propertyGroups.end() ) - return OPropertyImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + return false; do { @@ -611,6 +590,37 @@ namespace xmloff // handled return true; } + return false; + } + + //--------------------------------------------------------------------- + bool OElementImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + { + if ( token::IsXMLToken( _rLocalName, token::XML_CONTROL_IMPLEMENTATION ) ) + // ignore this, it has already been handled in OElementImport::StartElement + return true; + + if ( token::IsXMLToken( _rLocalName, token::XML_NAME ) ) + { + if ( !m_sName.getLength() ) + // remember the name for later use in EndElement + m_sName = _rValue; + return true; + } + + // maybe it's the style attribute? + if ( token::IsXMLToken( _rLocalName, token::XML_TEXT_STYLE_NAME ) ) + { + const SvXMLStyleContext* pStyleContext = m_rContext.getStyleElement( _rValue ); + OSL_ENSURE( pStyleContext, "OElementImport::handleAttribute: do not know the style!" ); + // remember the element for later usage. + m_pStyleElement = PTR_CAST( XMLTextStyleContext, pStyleContext ); + return true; + } + + if ( m_bImplicitGenericAttributeHandling ) + if ( tryGenericAttribute( _nNamespaceKey, _rLocalName, _rValue ) ) + return true; // let the base class handle it return OPropertyImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); @@ -664,6 +674,7 @@ namespace xmloff :OElementImport(_rImport, _rEventManager, _nPrefix, _rName, _rxParentContainer) ,m_eElementType(OControlElement::UNKNOWN) { + disableImplicitGenericAttributeHandling(); } //--------------------------------------------------------------------- @@ -672,6 +683,7 @@ namespace xmloff :OElementImport(_rImport, _rEventManager, _nPrefix, _rName, _rxParentContainer) ,m_eElementType(_eType) { + disableImplicitGenericAttributeHandling(); } //--------------------------------------------------------------------- @@ -763,7 +775,7 @@ namespace xmloff return true; } - if ( OElementImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ) ) + if ( OElementImport::tryGenericAttribute( _nNamespaceKey, _rLocalName, _rValue ) ) return true; static const sal_Char* pValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_VALUE); @@ -807,7 +819,7 @@ namespace xmloff return true; } - return false; + return OElementImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //--------------------------------------------------------------------- diff --git a/xmloff/source/forms/elementimport.hxx b/xmloff/source/forms/elementimport.hxx index f48f031854de..0db43d7d58a7 100644 --- a/xmloff/source/forms/elementimport.hxx +++ b/xmloff/source/forms/elementimport.hxx @@ -85,22 +85,25 @@ namespace xmloff ,public OStackedLogging { protected: - ::rtl::OUString m_sServiceName; // the service name as extracted from the service-name attribute - ::rtl::OUString m_sName; // the name of the object (redundant, already contained in the base class' array) + ::rtl::OUString m_sServiceName; // the service name as extracted from the service-name attribute + ::rtl::OUString m_sName; // the name of the object (redundant, already contained in the base class' array) OFormLayerXMLImport_Impl& m_rFormImport; // the form import context - IEventAttacherManager& m_rEventManager; // the event attacher manager + IEventAttacherManager& m_rEventManager; // the event attacher manager const XMLTextStyleContext* m_pStyleElement; // the XML element which describes the style we encountered // while reading our element + /// the parent container to insert the new element into ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > - m_xParentContainer; - // the parent container to insert the new element into + m_xParentContainer; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > - m_xInfo; + /// the element we're creating. Valid after StartElement ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > - m_xElement; // the element we're creating. Valid after StartElement + m_xElement; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + m_xInfo; + + bool m_bImplicitGenericAttributeHandling; public: /** ctor @@ -160,6 +163,16 @@ namespace xmloff */ void simulateDefaultedAttribute(const sal_Char* _pAttributeName, const ::rtl::OUString& _rPropertyName, const sal_Char* _pAttributeDefault); + /** to be called from within handleAttribute, checks whether the given attribute is covered by our generic + attribute handler mechanisms + */ + bool tryGenericAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ); + + /** controls whether |handleAttribute| implicitly calls |tryGenericAttribute|, or whether the derived class + must do this explicitly at a suitable place in its own |handleAttribute| + */ + void disableImplicitGenericAttributeHandling() { m_bImplicitGenericAttributeHandling = false; } + private: ::rtl::OUString implGetDefaultName() const; void implImportGenericProperties(); From 06513cd01e1db6ca7ab4f9b05aff22d5c0f1b048 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 24 Sep 2010 16:25:13 +0200 Subject: [PATCH 158/279] dockingwindows: Fixed many issues regarding the layout manager rework --- framework/inc/helper/ilayoutnotifications.hxx | 52 +++++++ framework/inc/services/layoutmanager.hxx | 8 +- framework/source/layoutmanager/helpers.cxx | 43 +++++- framework/source/layoutmanager/helpers.hxx | 8 +- .../source/layoutmanager/layoutmanager.cxx | 131 +++++------------- .../layoutmanager/toolbarlayoutmanager.cxx | 35 ++++- .../layoutmanager/toolbarlayoutmanager.hxx | 8 +- 7 files changed, 177 insertions(+), 108 deletions(-) create mode 100755 framework/inc/helper/ilayoutnotifications.hxx diff --git a/framework/inc/helper/ilayoutnotifications.hxx b/framework/inc/helper/ilayoutnotifications.hxx new file mode 100755 index 000000000000..db63ea15c7b4 --- /dev/null +++ b/framework/inc/helper/ilayoutnotifications.hxx @@ -0,0 +1,52 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_ILAYOUTNOTIFICATIONS_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_ILAYOUTNOTIFICATIONS_HXX_ + +namespace framework +{ + +class ILayoutNotifications +{ + public: + enum Hint + { + HINT_NOT_SPECIFIED, + HINT_TOOLBARSPACE_HAS_CHANGED, + HINT_COUNT + }; + + virtual void requestLayout( Hint eHint = HINT_NOT_SPECIFIED ) = 0; +}; + +} + +#endif // __FRAMEWORK_LAYOUTMANAGER_ILAYOUTNOTIFICATIONS_HXX_ diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 898d1c240b2b..6fcd1e18488c 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -55,6 +55,7 @@ #include #include #include +#include //_________________________________________________________________________________________________________________ // interface includes @@ -111,6 +112,7 @@ namespace framework // Order is neccessary for right initialization! private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. public ::cppu::OBroadcastHelper , + public ILayoutNotifications , public LayoutManager_PBase { public: @@ -218,6 +220,11 @@ namespace framework DECL_LINK( MenuBarClose, MenuBar * ); DECL_LINK( WindowEventListener, VclSimpleEvent* ); + //--------------------------------------------------------------------------------------------------------- + // ILayoutNotifications + //--------------------------------------------------------------------------------------------------------- + virtual void requestLayout( Hint eHint ); + struct DockedData { DockedData() : m_aPos( LONG_MAX, LONG_MAX ), @@ -282,7 +289,6 @@ namespace framework ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createElement( const rtl::OUString& aName ); // layouting methods - sal_Bool implts_compareRectangles( const ::com::sun::star::awt::Rectangle& rRect1, const ::com::sun::star::awt::Rectangle& rRect2 ); sal_Bool implts_resizeContainerWindow( const ::com::sun::star::awt::Size& rContainerSize, const ::com::sun::star::awt::Point& rComponentPos ); ::Size implts_getTopBottomDockingAreaSizes(); ::Size implts_getContainerWindowOutputSize(); diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index bfa20e9324cd..8297a361ad93 100755 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -69,6 +69,14 @@ using namespace com::sun::star; namespace framework { +void setZeroRectangle( ::Rectangle& rRect ) +{ + rRect.setX(0); + rRect.setY(0); + rRect.setWidth(0); + rRect.setHeight(0); +} + // ATTENTION! // This value is directly copied from the sfx2 project. // You have to change BOTH values, see sfx2/inc/sfx2/sfxsids.hrc (SID_DOCKWIN_START) @@ -152,7 +160,29 @@ bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aEl return false; } -css::awt::Rectangle impl_convertRectangleToAWT( const ::Rectangle& rRect ) +::com::sun::star::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect ) +{ + css::awt::Rectangle aRect; + aRect.X = rRect.Left(); + aRect.Y = rRect.Top(); + aRect.Width = rRect.Right(); + aRect.Height = rRect.Bottom(); + + return aRect; +} + +::Rectangle putAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ) +{ + ::Rectangle aRect; + aRect.Left() = rRect.X; + aRect.Top() = rRect.Y; + aRect.Right() = rRect.Width; + aRect.Bottom() = rRect.Height; + + return aRect; +} + +css::awt::Rectangle convertRectangleToAWT( const ::Rectangle& rRect ) { css::awt::Rectangle aRect; aRect.X = rRect.Left(); @@ -162,7 +192,7 @@ css::awt::Rectangle impl_convertRectangleToAWT( const ::Rectangle& rRect ) return aRect; } -::Rectangle impl_convertAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ) +::Rectangle convertAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ) { ::Rectangle aRect; aRect.Left() = rRect.X; @@ -173,6 +203,15 @@ css::awt::Rectangle impl_convertRectangleToAWT( const ::Rectangle& rRect ) return aRect; } +bool equalRectangles( const css::awt::Rectangle& rRect1, + const css::awt::Rectangle& rRect2 ) +{ + return (( rRect1.X == rRect2.X ) && + ( rRect1.Y == rRect2.Y ) && + ( rRect1.Width == rRect2.Width ) && + ( rRect1.Height == rRect2.Height )); +} + uno::Reference< frame::XModel > impl_getModelFromFrame( const uno::Reference< frame::XFrame >& rFrame ) { // Query for the model to get check the context information diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx index 71eb623df6ff..61b05d771278 100755 --- a/framework/source/layoutmanager/helpers.hxx +++ b/framework/source/layoutmanager/helpers.hxx @@ -67,12 +67,16 @@ namespace framework { +bool equalRectangles( const css::awt::Rectangle& rRect1, const css::awt::Rectangle& rRect2 ); +void setZeroRectangle( ::Rectangle& rRect ); bool lcl_checkUIElement(const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement,::com::sun::star::awt::Rectangle& _rPosSize, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xWindow); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > createToolkitWindow( const css::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rFactory, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent, const char* pService ); WindowAlign ImplConvertAlignment( sal_Int16 aAlignment ); bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ); -::com::sun::star::awt::Rectangle impl_convertRectangleToAWT( const ::Rectangle& rRect ); -::Rectangle impl_convertAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ); +::Rectangle putAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ); +::com::sun::star::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect ); +::com::sun::star::awt::Rectangle convertRectangleToAWT( const ::Rectangle& rRect ); +::Rectangle convertAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > impl_getModelFromFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); sal_Bool implts_isPreviewModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel ); sal_Bool implts_isFrameOrWindowTop( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame ); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index cc8795171de7..6d2426936584 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -201,11 +201,12 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM , m_pToolbarManager( 0 ) { // Initialize statusbar member + const sal_Bool bRefreshVisibility = sal_False; m_aStatusBarElement.m_aType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "statusbar" )); m_aStatusBarElement.m_aName = m_aStatusBarAlias; m_pMiscOptions = new SvtMiscOptions(); - m_pToolbarManager = new ToolbarLayoutManager( xServiceManager, m_xUIElementFactoryManager ); + m_pToolbarManager = new ToolbarLayoutManager( xServiceManager, m_xUIElementFactoryManager, this ); m_xToolbarManager = uno::Reference< awt::XDockableWindowListener >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY ); m_pMiscOptions->AddListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); @@ -220,7 +221,6 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, css::beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, ::getCppuType( &m_bHideCurrentUI ) ); registerProperty( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY, &m_nLockCount, getCppuType( &m_nLockCount ) ); registerProperty( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, css::beans::PropertyAttribute::TRANSIENT, &m_bMenuBarCloser, ::getCppuType( &m_bMenuBarCloser ) ); - const sal_Bool bRefreshVisibility = sal_False; registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, css::beans::PropertyAttribute::TRANSIENT, ::getCppuType( &bRefreshVisibility ), &bRefreshVisibility ); registerProperty( LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, css::beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, ::getCppuType( &m_bPreserveContentSize ) ); } @@ -2085,16 +2085,16 @@ throw (RuntimeException) bMustBeLayouted = m_pToolbarManager->isLayoutDirty(); } } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" )) + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && + aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) { - if ( aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ) && !bInPlaceMenu ) + // PB 2004-12-15 #i38743# don't create a menubar if frame isn't top + if ( !bInPlaceMenu && !m_xMenuBar.is() && implts_isFrameOrWindowTop( xFrame )) { vos::OGuard aGuard( Application::GetSolarMutex() ); - // PB 2004-12-15 #i38743# don't create a menubar if frame isn't top - if ( !m_xMenuBar.is() && implts_isFrameOrWindowTop(xFrame) ) - m_xMenuBar = implts_createElement( aName ); - if ( m_xMenuBar.is() && implts_isFrameOrWindowTop(xFrame) ) + m_xMenuBar = implts_createElement( aName ); + if ( m_xMenuBar.is() ) { Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); while ( pWindow && !pWindow->IsSystemWindow() ) @@ -2131,9 +2131,7 @@ throw (RuntimeException) pSysWindow->SetMenuBar( pMenuBar ); pMenuBar->SetDisplayable( m_bMenuVisible ); if ( m_bMenuVisible ) - { bNotify = sal_True; - } implts_updateMenuBarClose(); } } @@ -2191,7 +2189,7 @@ throw (RuntimeException) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - sal_Bool bMustLayouted( sal_False ); + sal_Bool bMustBeLayouted( sal_False ); sal_Bool bMustBeDestroyed( sal_False ); sal_Bool bMustBeSorted( sal_False ); sal_Bool bNotify( sal_False ); @@ -2217,7 +2215,7 @@ throw (RuntimeException) { aWriteLock.unlock(); implts_destroyStatusBar(); - bMustLayouted = sal_True; + bMustBeLayouted = sal_True; bNotify = sal_True; } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && @@ -2225,67 +2223,15 @@ throw (RuntimeException) { aWriteLock.unlock(); implts_createProgressBar(); - bMustLayouted = sal_True; + bMustBeLayouted = sal_True; bNotify = sal_True; } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && + m_pToolbarManager != NULL ) { - UIElementVector::iterator pIter; - - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName ) - { - xComponent.set( pIter->m_xUIElement, UNO_QUERY ); - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - rtl::OUString aAddonTbResourceName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )); - if ( aName.indexOf( aAddonTbResourceName ) != 0 ) - { - try - { - if ( xWindow.is() ) - xWindow->removeWindowListener( Reference< css::awt::XWindowListener >( - static_cast< OWeakObject * >( this ), UNO_QUERY )); - } - catch( Exception& ) - { - } - - try - { - if ( xDockWindow.is() ) - xDockWindow->removeDockableWindowListener( Reference< css::awt::XDockableWindowListener >( - static_cast< OWeakObject * >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - - bMustBeDestroyed = sal_True; - } - else - { - pIter->m_bVisible = sal_False; - xWindow->setVisible( sal_False ); - bNotify = sal_True; - } - - if ( !xDockWindow->isFloating() ) - bMustLayouted = sal_True; - if ( bMustBeDestroyed ) - pIter->m_xUIElement.clear(); - - bMustBeSorted = sal_True; - } - - break; - } - } + aWriteLock.unlock(); + bNotify = m_pToolbarManager->destroyToolbar( aName ); + bMustBeLayouted = m_pToolbarManager->isLayoutDirty(); } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) { @@ -2294,8 +2240,8 @@ throw (RuntimeException) aWriteLock.unlock(); impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false ); - bMustLayouted = sal_False; - bNotify = sal_False; + bMustBeLayouted = sal_False; + bNotify = sal_False; } } aWriteLock.unlock(); @@ -2311,7 +2257,7 @@ throw (RuntimeException) if ( bMustBeSorted ) { implts_sortUIElements(); - if ( bMustLayouted ) + if ( bMustBeLayouted ) doLayout(); } @@ -3301,6 +3247,15 @@ throw (RuntimeException) implts_doLayout_notify( sal_True ); } +//--------------------------------------------------------------------------------------------------------- +// ILayoutNotifications +//--------------------------------------------------------------------------------------------------------- +void LayoutManager::requestLayout( Hint eHint ) +{ + if ( eHint == HINT_TOOLBARSPACE_HAS_CHANGED ) + doLayout(); +} + void LayoutManager::implts_doLayout_notify( sal_Bool bOuterResize ) { sal_Bool bLayouted = implts_doLayout( sal_False, bOuterResize ); @@ -3352,11 +3307,14 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ aWriteGuard.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - css::awt::Rectangle aBorderSpace = implts_calcDockingAreaSizes(); + css::awt::Rectangle aDockSpace( implts_calcDockingAreaSizes() ); + css::awt::Rectangle aBorderSpace( aDockSpace ); sal_Bool bGotRequestedBorderSpace( sal_True ); - sal_Bool bEqual = implts_compareRectangles( aBorderSpace, aCurrBorderSpace ); - if ( !bEqual || bForceRequestBorderSpace || bMustDoLayout ) + // We have to add the height of a possible status bar + aBorderSpace.Height += implts_getStatusBarSize().Height(); + + if ( !equalRectangles( aBorderSpace, aCurrBorderSpace ) || bForceRequestBorderSpace || bMustDoLayout ) { // we always resize the content window (instead of the complete container window) if we're not set up // to (attempt to) preserve the content window's size @@ -3407,15 +3365,14 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ if ( bGotRequestedBorderSpace ) { - ::Size aContainerSize; - ::Size aStatusBarSize; + ::Size aContainerSize; + ::Size aStatusBarSize; - aStatusBarSize = implts_getStatusBarSize(); - aBorderSpace.Height -= aStatusBarSize.Height(); - m_pToolbarManager->setDockingArea( aBorderSpace ); + m_pToolbarManager->setDockingArea( aDockSpace ); // Subtract status bar size from our container output size. Docking area windows // don't contain the status bar! + aStatusBarSize = implts_getStatusBarSize(); aContainerSize = implts_getContainerWindowOutputSize(); aContainerSize.Height() -= aStatusBarSize.Height(); @@ -3439,15 +3396,6 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ return bLayouted; } -sal_Bool LayoutManager::implts_compareRectangles( const css::awt::Rectangle& rRect1, - const css::awt::Rectangle& rRect2 ) -{ - return (( rRect1.X == rRect2.X ) && - ( rRect1.Y == rRect2.Y ) && - ( rRect1.Width == rRect2.Width ) && - ( rRect1.Height == rRect2.Height )); -} - sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContainerSize, const awt::Point& rComponentPos ) { @@ -3558,9 +3506,6 @@ css::awt::Rectangle LayoutManager::implts_calcDockingAreaSizes() if ( xDockingAreaAcceptor.is() && xContainerWindow.is() ) aBorderSpace = m_pToolbarManager->getDockingArea(); - // We have to add the height of a possible status bar - aBorderSpace.Height += implts_getStatusBarSize().Height(); - return aBorderSpace; } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 076a82b24ebd..96d641cef387 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -68,8 +68,10 @@ namespace framework ToolbarLayoutManager::ToolbarLayoutManager( const uno::Reference< lang::XMultiServiceFactory >& xSMGR, - const uno::Reference< ui::XUIElementFactory >& xUIElementFactory ) + const uno::Reference< ui::XUIElementFactory >& xUIElementFactory, + ILayoutNotifications* pParentLayouter ) : ThreadHelpBase( &Application::GetSolarMutex() ), + m_pParentLayouter( pParentLayouter ), m_xSMGR( xSMGR ), m_xUIElementFactoryManager( xUIElementFactory ), m_eDockOperation( DOCKOP_ON_COLROW ), @@ -85,6 +87,11 @@ ToolbarLayoutManager::ToolbarLayoutManager( m_aCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "custom_" )), m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )) { + // initialize rectangles to zero values + setZeroRectangle( m_aDockingAreaOffsets ); + setZeroRectangle( m_aDockingArea ); + + // create toolkit object m_xToolkit = uno::Reference< css::awt::XToolkit >( m_xSMGR->createInstance( SERVICENAME_VCLTOOLKIT ), uno::UNO_QUERY ); } @@ -145,14 +152,14 @@ void SAL_CALL ToolbarLayoutManager::disposing( const lang::EventObject& aEvent ) aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - return impl_convertRectangleToAWT( aNewDockingArea ); + return putRectangleValueToAWT(aNewDockingArea); } void ToolbarLayoutManager::setDockingArea( const awt::Rectangle& rDockingArea ) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - m_aDockingArea = impl_convertAWTToRectangle( rDockingArea ); + m_aDockingArea = putAWTToRectangle( rDockingArea ); m_bLayoutDirty = true; aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -259,6 +266,11 @@ void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) nOffset += aRowColumnsWindowData[j].nStaticSize; } } + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + m_bLayoutDirty = false; + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } bool ToolbarLayoutManager::implts_isParentWindowVisible() const @@ -290,6 +302,10 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea() std::vector< sal_Int32 > aRowColumnSizes[DOCKINGAREAS_COUNT]; UIElementVector::const_iterator pConstIter; + // initialize rectangle with zero values! + aBorderSpace.setWidth(0); + aBorderSpace.setHeight(0); + aRowColumnSizes[nCurrDockingArea].clear(); aRowColumnSizes[nCurrDockingArea].push_back( 0 ); @@ -1016,7 +1032,7 @@ void ToolbarLayoutManager::implts_createElement( const ::rtl::OUString& aName, b /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - UIElement rElement = impl_findElement( aName ); + UIElement& rElement = impl_findElement( aName ); if ( rElement.m_aName.getLength() > 0 ) { // Reuse a local entry so we are able to use the latest @@ -3119,7 +3135,7 @@ void SAL_CALL ToolbarLayoutManager::startDocking( const awt::DockingEvent& e ) throw (uno::RuntimeException) { - sal_Bool bWinFound( sal_False ); + bool bWinFound( false ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadGuard( m_aLock ); @@ -3142,6 +3158,8 @@ throw (uno::RuntimeException) if ( aUIElement.m_xUIElement.is() && xWindow.is() ) { awt::Rectangle aRect; + + bWinFound = true; uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( xDockWindow->isFloating() ) { @@ -3189,7 +3207,6 @@ throw (uno::RuntimeException) UIElement aUIDockingElement; DockingOperation eDockingOperation( DOCKOP_ON_COLROW ); - aDockingData.TrackingRectangle = e.TrackingRectangle; sal_Bool bDockingInProgress; { @@ -3204,6 +3221,8 @@ throw (uno::RuntimeException) xRightDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; xBottomDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; aUIDockingElement = m_aDockUIElement; + + aDockingData.TrackingRectangle = e.TrackingRectangle; } /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } @@ -3464,8 +3483,12 @@ throw (uno::RuntimeException) aWriteLock.lock(); m_bDockingInProgress = sal_False; m_bLayoutDirty = !bStartDockFloated || !bFloating; + bool bNotify = m_bLayoutDirty; aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( bNotify ) + m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); } sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index 95b27f69c9c9..9d7ce8c28be7 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -54,7 +54,7 @@ #include #include #include -#include +#include //_________________________________________________________________________________________________________________ // interface includes @@ -75,8 +75,6 @@ #include #include #include -#include -#include //_________________________________________________________________________________________________________________ // other includes @@ -96,7 +94,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper2< ::com::sun::star::a enum { DOCKINGAREAS_COUNT = 4 }; ToolbarLayoutManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMGR, - const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElementFactory >& xUIElementFactory ); + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElementFactory >& xUIElementFactory, + ILayoutNotifications* pParentLayouter ); virtual ~ToolbarLayoutManager(); void reset(); @@ -290,6 +289,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper2< ::com::sun::star::a css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr; css::uno::Reference< ::com::sun::star::awt::XToolkit > m_xToolkit; css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; + ILayoutNotifications* m_pParentLayouter; UIElementVector m_aUIElements; UIElement m_aDockUIElement; From df76cd75dee1e539533b3c2b00b5d0330062fe88 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 24 Sep 2010 21:27:18 +0200 Subject: [PATCH 159/279] dba34a: OElementImport::EndElement: don't assert m_aValues being empty - this is legitimate, especially for grid controls --- xmloff/source/forms/elementimport.cxx | 85 +++++++++++++++------------ xmloff/source/forms/elementimport.hxx | 3 +- 2 files changed, 49 insertions(+), 39 deletions(-) diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index cdaa36d7a5a6..5cc9a8203054 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -225,26 +225,61 @@ namespace xmloff if (!m_xElement.is()) return; + // apply the non-generic properties + implApplySpecificProperties(); + + // set the generic properties + implApplyGenericProperties(); + + // set the style properties + if ( m_pStyleElement && m_xElement.is() ) + { + Reference< XPropertySet > xPropTranslation = + new OGridColumnPropertyTranslator( Reference< XMultiPropertySet >( m_xElement, UNO_QUERY ) ); + const_cast< XMLTextStyleContext* >( m_pStyleElement )->FillPropertySet( xPropTranslation ); + + const ::rtl::OUString sNumberStyleName = const_cast< XMLTextStyleContext* >( m_pStyleElement )->GetDataStyleName( ); + if ( sNumberStyleName.getLength() ) + // the style also has a number (sub) style + m_rContext.applyControlNumberStyle( m_xElement, sNumberStyleName ); + } + + // insert the element into the parent container + if (!m_sName.getLength()) + { + OSL_ENSURE(sal_False, "OElementImport::EndElement: did not find a name attribute!"); + m_sName = implGetDefaultName(); + } + + m_xParentContainer->insertByName(m_sName, makeAny(m_xElement)); + LEAVE_LOG_CONTEXT( ); + } + + //--------------------------------------------------------------------- + void OElementImport::implApplySpecificProperties() + { + if ( m_aValues.empty() ) + return; + // set all the properties we collected #if OSL_DEBUG_LEVEL > 0 // check if the object has all the properties // (We do this in the non-pro version only. Doing it all the time would be much to expensive) if ( m_xInfo.is() ) { - PropertyValueArray::iterator aEnd = m_aValues.end(); + PropertyValueArray::const_iterator aEnd = m_aValues.end(); for ( PropertyValueArray::iterator aCheck = m_aValues.begin(); aCheck != aEnd; ++aCheck ) { OSL_ENSURE(m_xInfo->hasPropertyByName(aCheck->Name), - ::rtl::OString("OElementImport::EndElement: read a property (") + ::rtl::OString("OElementImport::implApplySpecificProperties: read a property (") += ::rtl::OString(aCheck->Name.getStr(), aCheck->Name.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString(") which does not exist on the element!")); } } #endif - OSL_ENSURE(!m_aValues.empty(), "OElementImport::EndElement: no properties read!"); // set the properties const Reference< XMultiPropertySet > xMultiProps(m_xElement, UNO_QUERY); @@ -281,7 +316,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OElementImport::EndElement: could not set the properties (using the XMultiPropertySet)!"); + OSL_ENSURE(sal_False, "OElementImport::implApplySpecificProperties: could not set the properties (using the XMultiPropertySet)!"); } } @@ -302,42 +337,16 @@ namespace xmloff catch(Exception&) { OSL_ENSURE(sal_False, - ::rtl::OString("OElementImport::EndElement: could not set the property \"") + ::rtl::OString("OElementImport::implApplySpecificProperties: could not set the property \"") += ::rtl::OString(aPropValues->Name.getStr(), aPropValues->Name.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\"!")); } } } - - // set the generic properties - implImportGenericProperties(); - - // set the style properties - if ( m_pStyleElement && m_xElement.is() ) - { - Reference< XPropertySet > xPropTranslation = - new OGridColumnPropertyTranslator( Reference< XMultiPropertySet >( m_xElement, UNO_QUERY ) ); - const_cast< XMLTextStyleContext* >( m_pStyleElement )->FillPropertySet( xPropTranslation ); - - const ::rtl::OUString sNumberStyleName = const_cast< XMLTextStyleContext* >( m_pStyleElement )->GetDataStyleName( ); - if ( sNumberStyleName.getLength() ) - // the style also has a number (sub) style - m_rContext.applyControlNumberStyle( m_xElement, sNumberStyleName ); - } - - // insert the element into the parent container - if (!m_sName.getLength()) - { - OSL_ENSURE(sal_False, "OElementImport::EndElement: did not find a name attribute!"); - m_sName = implGetDefaultName(); - } - - m_xParentContainer->insertByName(m_sName, makeAny(m_xElement)); - LEAVE_LOG_CONTEXT( ); } //--------------------------------------------------------------------- - void OElementImport::implImportGenericProperties() + void OElementImport::implApplyGenericProperties() { if ( m_aGenericValues.empty() ) return; @@ -362,7 +371,7 @@ namespace xmloff if ( !xDynamicProperties.is() ) { #if OSL_DEBUG_LEVEL > 0 - ::rtl::OString aMessage( "OElementImport::implImportGenericProperties: encountered an unknown property (" ); + ::rtl::OString aMessage( "OElementImport::implApplyGenericProperties: encountered an unknown property (" ); aMessage += ::rtl::OUStringToOString( aPropValues->Name, RTL_TEXTENCODING_ASCII_US ); aMessage += "), but component is no PropertyBag!"; OSL_ENSURE( false, aMessage.getStr() ); @@ -401,18 +410,18 @@ namespace xmloff if ( bPropIsSequence != bValueIsSequence ) { - OSL_ENSURE( false, "OElementImport::implImportGenericProperties: either both value and property should be a sequence, or none of them!" ); + OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: either both value and property should be a sequence, or none of them!" ); continue; } if ( bValueIsSequence ) { OSL_ENSURE( eValueTypeClass == TypeClass_ANY, - "OElementImport::implImportGenericProperties: only ANYs should have been imported as generic list property!" ); + "OElementImport::implApplyGenericProperties: only ANYs should have been imported as generic list property!" ); // (OPropertyImport should produce only Sequencer< Any >, since it cannot know the real type OSL_ENSURE( ePropTypeClass == TypeClass_SHORT, - "OElementImport::implImportGenericProperties: conversion to sequences other than 'sequence< short >' not implemented, yet!" ); + "OElementImport::implApplyGenericProperties: conversion to sequences other than 'sequence< short >' not implemented, yet!" ); Sequence< Any > aXMLValueList; aPropValues->Value >>= aXMLValueList; @@ -455,13 +464,13 @@ namespace xmloff aPropValues->Value <<= static_cast< sal_Int64 >( nVal ); break; default: - OSL_ENSURE( false, "OElementImport::implImportGenericProperties: unsupported value type!" ); + OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: unsupported value type!" ); break; } } break; default: - OSL_ENSURE( false, "OElementImport::implImportGenericProperties: non-double values not supported!" ); + OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: non-double values not supported!" ); break; } } diff --git a/xmloff/source/forms/elementimport.hxx b/xmloff/source/forms/elementimport.hxx index 0db43d7d58a7..3b604c752595 100644 --- a/xmloff/source/forms/elementimport.hxx +++ b/xmloff/source/forms/elementimport.hxx @@ -175,7 +175,8 @@ namespace xmloff private: ::rtl::OUString implGetDefaultName() const; - void implImportGenericProperties(); + void implApplyGenericProperties(); + void implApplySpecificProperties(); /** sets the style properties which have been read for the element (if any) */ From 138c8c209cec4f90a64d4e3e147a00761ec4b329 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 11:37:17 +0200 Subject: [PATCH 160/279] dba34a: #i114770# fix getDate --- connectivity/source/commontools/FValue.cxx | 30 ++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index aca181916b47..1e39befaf5f7 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -1753,7 +1753,7 @@ Sequence ORowSetValue::getSequence() const } // ----------------------------------------------------------------------------- -::com::sun::star::util::Date ORowSetValue::getDate() const +::com::sun::star::util::Date ORowSetValue::getDate() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbtools", "Ocke.Janssen@sun.com", "ORowSetValue::getDate" ); ::com::sun::star::util::Date aValue; @@ -1768,8 +1768,6 @@ Sequence ORowSetValue::getSequence() const break; case DataType::DECIMAL: case DataType::NUMERIC: - aValue = DBTypeConversion::toDate((double)*this); - break; case DataType::FLOAT: case DataType::DOUBLE: case DataType::REAL: @@ -1787,12 +1785,28 @@ Sequence ORowSetValue::getSequence() const aValue.Year = pDateTime->Year; } break; + case DataType::BIT: + case DataType::BOOLEAN: + case DataType::TINYINT: + case DataType::SMALLINT: + case DataType::INTEGER: + case DataType::BIGINT: + aValue = DBTypeConversion::toDate( double( sal_Int64( *this ) ) ); + break; + + case DataType::BLOB: + case DataType::CLOB: + case DataType::OBJECT: default: - { - Any aAnyValue = getAny(); - aAnyValue >>= aValue; - break; - } + OSL_ENSURE( false, "ORowSetValue::getDate: cannot retrieve the data!" ); + // NO break! + + case DataType::BINARY: + case DataType::VARBINARY: + case DataType::LONGVARBINARY: + case DataType::TIME: + aValue = DBTypeConversion::toDate( (double)0 ); + break; } } return aValue; From b3742608b22bcd85bc818257afff4f95b85e88ee Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 12:35:37 +0200 Subject: [PATCH 161/279] dba34a: #i105989# fix setEvaluationResult --- connectivity/source/drivers/file/fanalyzer.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index 7abf10191f21..c2c72ffe428b 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -291,11 +291,12 @@ void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std: { if ( aIter->second.isValid() ) { - sal_Int32 map = nPos; // the first column (index 0) is for convenience only. The first real select column is no 1. - if ( (nPos > 0) && (nPos < static_cast(_rColumnMapping.size())) ) - map = _rColumnMapping[nPos]; - aIter->second->startSelection((_pRow->get())[map]); + sal_Int32 map = nPos + 1; + if ( nPos < static_cast< sal_Int32 >( _rColumnMapping.size() ) ) + map = _rColumnMapping[nPos] + 1; + if ( map > 0 ) + aIter->second->startSelection( (_pRow->get())[map] ); } } } From 12db5269581cb3728c9dd1edfe5fb58f7e696daa Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 13:53:55 +0200 Subject: [PATCH 162/279] dba34a: fix off-by-one in previous fix --- connectivity/source/drivers/file/fanalyzer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index c2c72ffe428b..d6c5def9c1f8 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -292,9 +292,9 @@ void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std: if ( aIter->second.isValid() ) { // the first column (index 0) is for convenience only. The first real select column is no 1. - sal_Int32 map = nPos + 1; + sal_Int32 map = nPos; if ( nPos < static_cast< sal_Int32 >( _rColumnMapping.size() ) ) - map = _rColumnMapping[nPos] + 1; + map = _rColumnMapping[nPos]; if ( map > 0 ) aIter->second->startSelection( (_pRow->get())[map] ); } From d764a2871b7042f8cd2eeb7f07b087f5c55efd5b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 14:18:19 +0200 Subject: [PATCH 163/279] dba34a: #i105989# proper number of elements in m_aSelectionEvaluation --- .../source/drivers/file/fanalyzer.cxx | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index d6c5def9c1f8..0885ad0eef4c 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -103,7 +103,26 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode) m_pConnection->throwGenericSQLException(STR_QUERY_COMPLEX_COUNT,NULL); } else - m_aSelectionEvaluations.push_back( TPredicates() ); + { + if ( SQL_ISPUNCTUATION( pColumnRef, "*" ) + || ( SQL_ISRULE( pColumnRef, column_ref ) + && ( pColumnRef->count() == 3 ) + && ( pColumnRef->getChild(0)->getNodeType() == SQL_NODE_NAME ) + && SQL_ISPUNCTUATION( pColumnRef->getChild(1), "." ) + && SQL_ISRULE( pColumnRef->getChild(2), column_val ) + && SQL_ISPUNCTUATION( pColumnRef->getChild(2)->getChild(0), "*" ) + ) + ) + { + // push one element for each column of our table + const Reference< XNameAccess > xColumnNames( m_aCompiler->getOrigColumns() ); + const Sequence< ::rtl::OUString > aColumnNames( xColumnNames->getElementNames() ); + for ( sal_Int32 i=0; i Date: Mon, 27 Sep 2010 15:26:48 +0200 Subject: [PATCH 164/279] dba34a: removed nonsensical return statement --- connectivity/source/inc/file/fcomp.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx index b46d24ddd089..7cbdb730258a 100644 --- a/connectivity/source/inc/file/fcomp.hxx +++ b/connectivity/source/inc/file/fcomp.hxx @@ -109,7 +109,7 @@ namespace connectivity inline void startSelection(ORowSetValueDecoratorRef& _rVal) { - return evaluateSelection(m_rCompiler->m_aCodeList,_rVal); + evaluateSelection(m_rCompiler->m_aCodeList,_rVal); } From f89f2b8bf506de0cc547ad596c75cbe1a0cf1ef1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 15:27:57 +0200 Subject: [PATCH 165/279] dba34a: #i105989# fixed sorting by function column --- .../source/drivers/file/FResultSet.cxx | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 305e26d386e0..c516b325ad9a 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -937,9 +937,13 @@ again: { m_pTable->fetchRow(m_aEvaluateRow, rTableCols, sal_True,bRetrieveData || bHasRestriction); - if ( (!m_bShowDeleted && m_aEvaluateRow->isDeleted()) - || (bHasRestriction && //!bShowDeleted && m_aEvaluateRow->isDeleted() ||// keine Anzeige von geloeschten Saetzen - !m_pSQLAnalyzer->evaluateRestriction())) // Auswerten der Bedingungen + if ( ( !m_bShowDeleted + && m_aEvaluateRow->isDeleted() + ) + || ( bHasRestriction + && !m_pSQLAnalyzer->evaluateRestriction() + ) + ) { // naechsten Satz auswerten // aktuelle Zeile loeschen im Keyset if (m_pEvaluationKeySet) @@ -988,12 +992,14 @@ again: // Evaluate darf nur gesetzt sein, // wenn der Keyset weiter aufgebaut werden soll - if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT && !isCount() && - (m_pFileSet.isValid() || m_pSortIndex) && bEvaluate) + if ( ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT ) + && !isCount() + && bEvaluate + ) { if (m_pSortIndex) { - OKeyValue* pKeyValue = GetOrderbyKeyValue(m_aEvaluateRow); + OKeyValue* pKeyValue = GetOrderbyKeyValue( m_aSelectRow ); m_pSortIndex->AddKeyValue(pKeyValue); } else if (m_pFileSet.isValid()) @@ -1294,8 +1300,8 @@ void OResultSet::sortRows() ::std::vector::iterator aOrderByIter = m_aOrderbyColumnNumber.begin(); for (::std::vector::size_type i=0;aOrderByIter != m_aOrderbyColumnNumber.end(); ++aOrderByIter,++i) { - OSL_ENSURE((sal_Int32)m_aRow->get().size() > *aOrderByIter,"Invalid Index"); - switch ((*(m_aRow->get().begin()+*aOrderByIter))->getValue().getTypeKind()) + OSL_ENSURE((sal_Int32)m_aSelectRow->get().size() > *aOrderByIter,"Invalid Index"); + switch ((*(m_aSelectRow->get().begin()+*aOrderByIter))->getValue().getTypeKind()) { case DataType::CHAR: case DataType::VARCHAR: @@ -1324,7 +1330,7 @@ void OResultSet::sortRows() OSL_ASSERT("OFILECursor::Execute: Datentyp nicht implementiert"); break; } - (m_aEvaluateRow->get())[*aOrderByIter]->setBound(sal_True); + (m_aSelectRow->get())[*aOrderByIter]->setBound(sal_True); } m_pSortIndex = new OSortIndex(eKeyType,m_aOrderbyAscending); @@ -1341,8 +1347,13 @@ void OResultSet::sortRows() } else { - while (ExecuteRow(IResultSetHelper::NEXT,1,TRUE)) + while ( ExecuteRow( IResultSetHelper::NEXT, 1, FALSE, TRUE ) ) { + m_aSelectRow->get()[0]->setValue( m_aRow->get()[0]->getValue() ); + if ( m_pSQLAnalyzer->hasFunctions() ) + m_pSQLAnalyzer->setSelectionEvaluationResult( m_aSelectRow, m_aColMapping ); + const sal_Int32 nBookmark = (*m_aRow->get().begin())->getValue(); + ExecuteRow( IResultSetHelper::BOOKMARK, nBookmark, TRUE, FALSE ); } } From 97fbd5818c12faca18c9b28546e8a6b82ba76994 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 27 Sep 2010 18:52:02 +0200 Subject: [PATCH 166/279] dockingwindows: Fix further problems - moved more code from general layout manager to toolbar specific part --- framework/inc/services/layoutmanager.hxx | 1 + .../source/layoutmanager/layoutmanager.cxx | 135 ++------- .../layoutmanager/toolbarlayoutmanager.cxx | 270 ++++++++++-------- .../layoutmanager/toolbarlayoutmanager.hxx | 21 +- 4 files changed, 195 insertions(+), 232 deletions(-) diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 6fcd1e18488c..48bca97bdb71 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -311,6 +311,7 @@ namespace framework sal_Bool implts_showProgressBar(); sal_Bool implts_hideProgressBar(); void implts_backupProgressBarWrapper(); + void implts_setOffset( const sal_Int32 nBottomOffset ); void implts_setInplaceMenuBar( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xMergedMenuBar ) diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 6d2426936584..3a1392476c73 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -67,7 +67,6 @@ #include #include #include -#include #include #include #include @@ -327,10 +326,6 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) ReadGuard aReadLock( m_aLock ); Reference< XFrame > xFrame = m_xFrame; Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - Reference< css::awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - Reference< css::awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - Reference< css::awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; - Reference< css::awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; Reference< XUIConfiguration > xModuleCfgMgr( m_xModuleCfgMgr, UNO_QUERY ); Reference< XUIConfiguration > xDocCfgMgr( m_xDocCfgMgr, UNO_QUERY ); Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); @@ -1119,55 +1114,12 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) { WriteGuard aWriteLock( m_aLock ); + bOld = m_bDoLayout; m_bDoLayout = sal_True; - bOld = m_bDoLayout; - } - - ReadGuard aReadLock( m_aLock ); - aWinVector.reserve(m_aUIElements.size()); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - if ( bSetVisible ) - { - if ( pIter->m_bVisible && !pIter->m_bMasterHide ) - aWinVector.push_back( xWindow ); - } - else - aWinVector.push_back( xWindow ); - } - } - } - - aReadLock.unlock(); - - try - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - const sal_uInt32 nCount = aWinVector.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - Reference< css::awt::XWindow > xWindow( aWinVector[i] ); - if ( xWindow.is() ) - { - // we need VCL here to pass special flags to Show() - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if( pWindow ) - pWindow->Show( bSetVisible, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - } - } - } - catch ( DisposedException& ) - { } // Hide/show menubar according to bSetVisible - aReadLock.lock(); + ReadGuard aReadLock( m_aLock ); Reference< XUIElement > xMenuBar( m_xMenuBar, UNO_QUERY ); Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); Reference< XComponent > xInplaceMenuBar( m_xInplaceMenuBar ); @@ -1215,38 +1167,17 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) if ( bSetVisible ) { - m_pToolbarManager->implts_createNonContextSensitiveToolBars(); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY ); + if ( xThis.is() ) + m_pToolbarManager->setVisible(bSetVisible); implts_doLayout_notify( sal_False ); } else { - // Set docking area window size to zero - ReadGuard aReadLock2( m_aLock ); - Reference< css::awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - Reference< css::awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - Reference< css::awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; - Reference< css::awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; - aReadLock2.unlock(); - - try - { - if ( xTopDockingWindow.is() ) - xTopDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xLeftDockingWindow.is() ) - xLeftDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xRightDockingWindow.is() ) - xRightDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xBottomDockingWindow.is() ) - xBottomDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - - WriteGuard aWriteLock( m_aLock ); - m_aDockingArea = css::awt::Rectangle(); - m_bMustDoLayout = sal_True; - aWriteLock.unlock(); - } - catch ( Exception& ) - { - } + WriteGuard aWriteLock( m_aLock ); + m_aDockingArea = css::awt::Rectangle(); + m_bMustDoLayout = sal_True; + aWriteLock.unlock(); } } @@ -1491,6 +1422,7 @@ sal_Bool LayoutManager::implts_showProgressBar() { if ( !pWindow->IsVisible() ) { + implts_setOffset( pWindow->GetSizePixel().Height() ); pWindow->Show(); implts_doLayout_notify( sal_False ); } @@ -1532,6 +1464,7 @@ sal_Bool LayoutManager::implts_hideProgressBar() if ( pWindow && pWindow->IsVisible() && ( bHideStatusBar || bInternalStatusBar )) { + implts_setOffset( 0 ); pWindow->Hide(); implts_doLayout_notify( sal_False ); return sal_True; @@ -1558,7 +1491,9 @@ sal_Bool LayoutManager::implts_showStatusBar( sal_Bool bStoreState ) Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && !pWindow->IsVisible() ) { + implts_setOffset( pWindow->GetSizePixel().Height() ); pWindow->Show(); + implts_doLayout_notify( sal_False ); return sal_True; } } @@ -1584,7 +1519,9 @@ sal_Bool LayoutManager::implts_hideStatusBar( sal_Bool bStoreState ) Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && pWindow->IsVisible() ) { + implts_setOffset( 0 ); pWindow->Hide(); + implts_doLayout_notify( sal_False ); return sal_True; } } @@ -1592,6 +1529,18 @@ sal_Bool LayoutManager::implts_hideStatusBar( sal_Bool bStoreState ) return sal_False; } +void LayoutManager::implts_setOffset( const sal_Int32 nBottomOffset ) +{ + ::Rectangle aOffsetRect; + setZeroRectangle( aOffsetRect ); + aOffsetRect.setHeight( nBottomOffset ); + + // make sure that the toolbar manager refernence/pointer is valid + uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY ); + if ( xThis.is() ) + m_pToolbarManager->setDockingAreaOffsets( aOffsetRect ); +} + void LayoutManager::implts_setInplaceMenuBar( const Reference< XIndexAccess >& xMergedMenuBar ) throw (::com::sun::star::uno::RuntimeException) { @@ -1684,8 +1633,6 @@ throw (::com::sun::star::uno::RuntimeException) m_xFrame = xFrame; aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - // if ( xFrame.is() ) - // xFrame->getContainerWindow()->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } void SAL_CALL LayoutManager::reset() @@ -3937,31 +3884,6 @@ throw( css::uno::RuntimeException ) xComponentWindow->setPosSize( 0, 0, aSize.Width, aSize.Height, css::awt::PosSize::POSSIZE ); } } - else - { - // resize event for one of the UIElements - sal_Bool bLocked( m_bDockingInProgress ); - sal_Bool bDoLayout( m_bDoLayout ); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( !bLocked && !bDoLayout ) - { - // Do not do anything if we are in the middle of a docking process. This would interfere all other - // operations. We will store the new position and size in the docking handlers. - // Do not do anything if we are in the middle of our layouting process. We will adapt the position - // and size of the user interface elements. - UIElement aUIElement; - if ( implts_findElement( aEvent.Source, aUIElement )) - { - if ( aUIElement.m_bFloating ) - implts_writeNewStateData( aUIElement.m_aName, - Reference< css::awt::XWindow >( aEvent.Source, UNO_QUERY )); - else - doLayout(); - } - } - } } void SAL_CALL LayoutManager::windowMoved( const css::awt::WindowEvent& ) throw( css::uno::RuntimeException ) @@ -3992,10 +3914,7 @@ void SAL_CALL LayoutManager::windowShown( const css::lang::EventObject& aEvent ) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( bSetVisible ) - { implts_updateUIElementsVisibleState( sal_True ); - //implts_doLayout( sal_False ); - } } } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 96d641cef387..8ff7e265dbf0 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -83,6 +83,8 @@ ToolbarLayoutManager::ToolbarLayoutManager( m_bStoreWindowState( false ), m_bGlobalSettings( false ), m_bDockingInProgress( false ), + m_bVisible( true ), + m_bLayoutInProgress( false ), m_aFullAddonTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )), m_aCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "custom_" )), m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )) @@ -251,6 +253,16 @@ bool ToolbarLayoutManager::isLayoutDirty() void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + + if ( m_bLayoutInProgress ) + return; + + m_bLayoutInProgress = true; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + // Retrieve row/column dependent data from all docked user-interface elements for ( sal_Int32 i = 0; i < DOCKINGAREAS_COUNT; i++ ) { @@ -268,8 +280,10 @@ void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) } /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_bLayoutDirty = false; + aWriteLock.lock(); + m_bLayoutDirty = false; + m_bLayoutInProgress = false; + aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } @@ -403,6 +417,7 @@ void ToolbarLayoutManager::reset() /* SAFE AREA ----------------------------------------------------------------------------------------------- */ destroyToolbars(); + resetDockingArea(); } void ToolbarLayoutManager::attach( @@ -538,10 +553,13 @@ void ToolbarLayoutManager::destroyToolbars() { UIElementVector aUIElementVector; + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); aUIElementVector = m_aUIElements; m_aUIElements.clear(); + m_bLayoutDirty = true; aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ UIElementVector::iterator pIter; for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) @@ -552,6 +570,36 @@ void ToolbarLayoutManager::destroyToolbars() } } +void ToolbarLayoutManager::setVisible( bool bVisible ) +{ + UIElementVector aUIElementVector; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + aUIElementVector = m_aUIElements; + m_bLayoutDirty = true; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + UIElementVector::iterator pIter; + for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) + { + bool bToolbarVisible = pIter->m_bVisible; + + pIter->m_bMasterHide = !bVisible; + if ( pIter->m_xUIElement.is() ) + { + uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); + uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + if ( xWindow.is() ) + xWindow->setVisible(bVisible & bToolbarVisible); + } + } + + if ( !bVisible ) + resetDockingArea(); +} + void ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& /*rResourceURL*/, ::com::sun::star::ui::DockingArea /*eDockingArea*/, @@ -699,7 +747,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() if ( aElement.m_aUIName.getLength() == 0 ) { aElement.m_aUIName = aGenericAddonTitle; - implts_writeWindowStateData( aElement.m_aName, aElement ); + implts_writeWindowStateData( aElement ); } } else @@ -712,7 +760,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() if ( aNewToolbar.m_aUIName.getLength() == 0 ) { aNewToolbar.m_aUIName = aGenericAddonTitle; - implts_writeWindowStateData( aNewToolbar.m_aName, aNewToolbar ); + implts_writeWindowStateData( aNewToolbar ); } implts_insertElement( aNewToolbar ); } @@ -1197,7 +1245,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno css::awt::PosSize::POS ); if ( bWriteData ) - implts_writeWindowStateData( rElement.m_aName, rElement ); + implts_writeWindowStateData( rElement ); if ( bShowElement && pWindow ) { vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -1421,7 +1469,7 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& return sal_False; } -void ToolbarLayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, const UIElement& rElementData ) +void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElementData ) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); @@ -1457,35 +1505,36 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const rtl::OUString& aNa { uno::Sequence< beans::PropertyValue > aWindowState( 8 ); - aWindowState[0].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKED ); - aWindowState[0].Value = ::uno::makeAny( sal_Bool( !rElementData.m_bFloating )); - aWindowState[1].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_VISIBLE ); - aWindowState[1].Value = uno::makeAny( sal_Bool( rElementData.m_bVisible )); + aWindowState[0].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKED ); + aWindowState[0].Value = ::uno::makeAny( sal_Bool( !rElementData.m_bFloating )); + aWindowState[1].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_VISIBLE ); + aWindowState[1].Value = uno::makeAny( sal_Bool( rElementData.m_bVisible )); - aWindowState[2].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKINGAREA ); - aWindowState[2].Value = uno::makeAny( static_cast< ui::DockingArea >( rElementData.m_aDockedData.m_nDockedArea ) ); + aWindowState[2].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKINGAREA ); + aWindowState[2].Value = uno::makeAny( static_cast< ui::DockingArea >( rElementData.m_aDockedData.m_nDockedArea ) ); awt::Point aPos; aPos.X = rElementData.m_aDockedData.m_aPos.X(); aPos.Y = rElementData.m_aDockedData.m_aPos.Y(); - aWindowState[3].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKPOS ); - aWindowState[3].Value <<= aPos; + aWindowState[3].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKPOS ); + aWindowState[3].Value <<= aPos; aPos.X = rElementData.m_aFloatingData.m_aPos.X(); aPos.Y = rElementData.m_aFloatingData.m_aPos.Y(); - aWindowState[4].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_POS ); - aWindowState[4].Value <<= aPos; + aWindowState[4].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_POS ); + aWindowState[4].Value <<= aPos; awt::Size aSize; - aSize.Width = rElementData.m_aFloatingData.m_aSize.Width(); + aSize.Width = rElementData.m_aFloatingData.m_aSize.Width(); aSize.Height = rElementData.m_aFloatingData.m_aSize.Height(); - aWindowState[5].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_SIZE ); - aWindowState[5].Value <<= aSize; - aWindowState[6].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_UINAME ); - aWindowState[6].Value = uno::makeAny( rElementData.m_aUIName ); - aWindowState[7].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_LOCKED ); - aWindowState[7].Value = uno::makeAny( rElementData.m_aDockedData.m_bLocked ); + aWindowState[5].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_SIZE ); + aWindowState[5].Value <<= aSize; + aWindowState[6].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_UINAME ); + aWindowState[6].Value = uno::makeAny( rElementData.m_aUIName ); + aWindowState[7].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_LOCKED ); + aWindowState[7].Value = uno::makeAny( rElementData.m_aDockedData.m_bLocked ); + ::rtl::OUString aName = rElementData.m_aName; if ( xPersistentWindowState->hasByName( aName )) { uno::Reference< container::XNameReplace > xReplace( xPersistentWindowState, uno::UNO_QUERY ); @@ -1503,9 +1552,11 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const rtl::OUString& aNa } // Reset flag + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteLock.lock(); m_bStoreWindowState = false; aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } /****************************************************************************** @@ -3128,6 +3179,80 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( } } +//--------------------------------------------------------------------------------------------------------- +// XWindowListener +//--------------------------------------------------------------------------------------------------------- +void SAL_CALL ToolbarLayoutManager::windowResized( const css::awt::WindowEvent& aEvent ) +throw( css::uno::RuntimeException ) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + bool bLocked( m_bDockingInProgress ); + bool bDoLayout( m_bLayoutInProgress ); + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + // Do not do anything if we are in the middle of a docking process. This would interfere all other + // operations. We will store the new position and size in the docking handlers. + // Do not do anything if we are in the middle of our layouting process. We will adapt the position + // and size of the user interface elements. + if ( !bLocked && !bDoLayout ) + { + bool bNotify( false ); + uno::Reference< css::awt::XWindow > xWindow( aEvent.Source, uno::UNO_QUERY ); + + UIElement aUIElement = implts_findElement( aEvent.Source ); + if ( aUIElement.m_xUIElement.is() ) + { + if ( aUIElement.m_bFloating ) + { + uno::Reference< css::awt::XWindow2 > xWindow2( xWindow, uno::UNO_QUERY ); + + if( xWindow2.is() ) + { + awt::Rectangle aPos = xWindow2->getPosSize(); + awt::Size aSize = xWindow2->getOutputSize(); // always use output size for consistency + bool bVisible = xWindow2->isVisible(); + + // update element data + aUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); + aUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); + aUIElement.m_bVisible = bVisible; + } + + implts_writeWindowStateData( aUIElement ); + } + else + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + aWriteLock.lock(); + m_bLayoutDirty = true; + bNotify = true; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } + } + + if ( bNotify ) + m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); + } +} + +void SAL_CALL ToolbarLayoutManager::windowMoved( const css::awt::WindowEvent& /*aEvent*/ ) +throw( css::uno::RuntimeException ) +{ +} + +void SAL_CALL ToolbarLayoutManager::windowShown( const css::lang::EventObject& /*aEvent*/ ) +throw( css::uno::RuntimeException ) +{ +} + +void SAL_CALL ToolbarLayoutManager::windowHidden( const css::lang::EventObject& /*aEvent*/ ) +throw( css::uno::RuntimeException ) +{ +} + //--------------------------------------------------------------------------------------------------------- // XDockableWindowListener //--------------------------------------------------------------------------------------------------------- @@ -3443,7 +3568,7 @@ throw (uno::RuntimeException) aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); + implts_writeWindowStateData( aUIDockingElement ); if ( bDockingInProgress ) { @@ -3659,7 +3784,7 @@ throw (uno::RuntimeException) m_bLayoutDirty = true; aWriteLock.unlock(); - implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); + implts_writeWindowStateData( aUIDockingElement ); implts_sortUIElements(); } } @@ -3762,101 +3887,6 @@ throw (uno::RuntimeException) sal_Bool SAL_CALL ToolbarLayoutManager::dockWindow( const ::rtl::OUString& /*aName*/, ui::DockingArea /*DockingArea*/, const awt::Point& /*Pos*/ ) throw (uno::RuntimeException) { -/* - UIElement& rUIElement = impl_findElement( aUIElement.m_aName ); - - if ( rUIElement.m_xUIElement.is() ) - { - try - { - uno::Reference< awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); - if ( xDockWindow.is() ) - { - if ( DockingArea != DockingArea_DOCKINGAREA_DEFAULT ) - aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( DockingArea ); - - if (( Pos.X != SAL_MAX_INT32 ) && ( Pos.Y != SAL_MAX_INT32 )) - aUIElement.m_aDockedData.m_aPos = ::Point( Pos.X, Pos.Y ); - - if ( !xDockWindow->isFloating() ) - { - Window* pWindow( 0 ); - ToolBox* pToolBox( 0 ); - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - pToolBox = (ToolBox *)pWindow; - - // We have to set the alignment of the toolbox. It's possible that the toolbox is moved from a - // horizontal to a vertical docking area! - pToolBox->SetAlign( ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea )); - } - } - - if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) || - ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) - { - // Docking on its default position without a preset position - - // we have to find a good place for it. - ::Size aSize; - - vos::OGuard aGuard( Application::GetSolarMutex() ); - { - if ( pToolBox ) - aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) ); - else - aSize = pWindow->GetSizePixel(); - } - - ::Point aPixelPos; - ::Point aDockPos; - implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); - aUIElement.m_aDockedData.m_aPos = aDockPos; - } - } - - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aName ) - { - rUIElement.m_aDockedData.m_nDockedArea = aUIElement.m_aDockedData.m_nDockedArea; - rUIElement.m_aDockedData.m_aPos = aUIElement.m_aDockedData.m_aPos; - } - aWriteLock.unlock(); - - if ( xDockWindow->isFloating() ) - { - // Will call toggle floating mode which will do the rest! - xWindow->setVisible( sal_False ); - xDockWindow->setFloatingMode( sal_False ); - xWindow->setVisible( sal_True ); - } - else - { - implts_writeWindowStateData( aName, aUIElement ); - implts_sortUIElements(); - - if ( aUIElement.m_bVisible ) - { - m_bLayoutDirty = true; - } - } - - return sal_True; - } - } - catch ( uno::DisposedException& ) - { - } - } -*/ return false; } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index 9d7ce8c28be7..016168cefcc0 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -80,14 +80,15 @@ // other includes //_________________________________________________________________________________________________________________ -#include +#include namespace framework { -class ToolbarLayoutManager : public ::cppu::WeakImplHelper2< ::com::sun::star::awt::XDockableWindowListener, - ::com::sun::star::ui::XUIConfigurationListener >, +class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::awt::XDockableWindowListener, + ::com::sun::star::ui::XUIConfigurationListener, + ::com::sun::star::awt::XWindowListener >, private ThreadHelpBase // Struct for right initalization of mutex member! Must be first of baseclasses. { public: @@ -117,6 +118,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper2< ::com::sun::star::a void createToolbars(); void destroyToolbars(); + void setVisible(bool bVisible); + bool isVisible() { return m_bVisible; } bool createToolbar( const ::rtl::OUString& rResourceURL ); bool destroyToolbar( const ::rtl::OUString& rResourceURL ); @@ -137,6 +140,14 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper2< ::com::sun::star::a //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); + //--------------------------------------------------------------------------------------------------------- + // XWindowListener + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); + virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); + virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); + virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); + //--------------------------------------------------------------------------------------------------------- // XDockableWindowListener //--------------------------------------------------------------------------------------------------------- @@ -275,7 +286,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper2< ::com::sun::star::a // persistence methods //--------------------------------------------------------------------------------------------------------- sal_Bool implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ); - void implts_writeWindowStateData( const rtl::OUString& aName, const UIElement& rElementData ); + void implts_writeWindowStateData( const UIElement& rElementData ); //--------------------------------------------------------------------------------------------------------- // members @@ -307,6 +318,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper2< ::com::sun::star::a bool m_bStoreWindowState; bool m_bGlobalSettings; bool m_bDockingInProgress; + bool m_bVisible; + bool m_bLayoutInProgress; ::rtl::OUString m_aFullAddonTbxPrefix; ::rtl::OUString m_aCustomTbxPrefix; From 2ab0a16a185c613efc445655be42577e12cdd1fc Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 23:00:17 +0200 Subject: [PATCH 167/279] dba34a: GCC WaE --- connectivity/source/drivers/file/fanalyzer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index 0885ad0eef4c..8211e954a49f 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -117,7 +117,7 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode) // push one element for each column of our table const Reference< XNameAccess > xColumnNames( m_aCompiler->getOrigColumns() ); const Sequence< ::rtl::OUString > aColumnNames( xColumnNames->getElementNames() ); - for ( sal_Int32 i=0; i Date: Mon, 27 Sep 2010 23:21:07 +0200 Subject: [PATCH 168/279] dba34a: #i31275# allow 'select as you type' aka 'quick selection' for tree list boxes (SvLBox derivees, to be precise), and enable this for Base main window, and the stylist --- sfx2/source/dialog/templdlg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index e3edcecfb386..7b5efc69ba49 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -756,7 +756,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx DEFINE_CONST_UNICODE("com.sun.star.frame.ModuleManager") ), UNO_QUERY ), pbDeleted ( NULL ), - aFmtLb ( this, WB_BORDER | WB_TABSTOP | WB_SORT ), + aFmtLb ( this, WB_BORDER | WB_TABSTOP | WB_SORT | WB_QUICK_SEARCH ), aFilterLb ( pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP ), nActFamily ( 0xffff ), @@ -1776,7 +1776,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) pTreeBox = new StyleTreeListBox_Impl( this, WB_HASBUTTONS | WB_HASLINES | WB_BORDER | WB_TABSTOP | WB_HASLINESATROOT | - WB_HASBUTTONSATROOT | WB_HIDESELECTION ); + WB_HASBUTTONSATROOT | WB_HIDESELECTION | WB_QUICK_SEARCH ); pTreeBox->SetFont( aFmtLb.GetFont() ); pTreeBox->SetPosSizePixel(aFmtLb.GetPosPixel(), aFmtLb.GetSizePixel()); From 433a39eda2666c5a3a21abfa80d728200ec0f95b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 28 Sep 2010 09:26:16 +0200 Subject: [PATCH 169/279] dba34a: #i114785# removed assertion - not really useful, and the asserted condition is in fact valid in some cases --- connectivity/source/commontools/dbtools2.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index c9a878fe1840..67f1b9130862 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -585,7 +585,6 @@ bool getDataSourceSetting( const Reference< XInterface >& _xChild, const ::rtl:: try { const Reference< XPropertySet> xDataSourceProperties( findDataSource( _xChild ), UNO_QUERY ); - OSL_ENSURE( xDataSourceProperties.is(), "getDataSourceSetting: invalid data source object!" ); if ( !xDataSourceProperties.is() ) return false; From 289865fae9d4a7d6d079894124bf47747b37d906 Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Tue, 28 Sep 2010 10:03:56 +0200 Subject: [PATCH 170/279] #dv22#i114788# Add 'show license' to extension popup menu --- desktop/source/deployment/gui/dp_gui.hrc | 2 + .../source/deployment/gui/dp_gui_dialog.src | 34 +++++++++++++ .../source/deployment/gui/dp_gui_dialog2.cxx | 50 ++++++++++++++++++- .../source/deployment/gui/dp_gui_dialog2.hxx | 15 ++++++ .../deployment/gui/dp_gui_extlistbox.cxx | 1 + .../deployment/gui/dp_gui_extlistbox.hxx | 1 + .../source/deployment/registry/dp_backend.cxx | 9 ++++ .../deployment/registry/inc/dp_backend.h | 3 ++ .../registry/package/dp_package.cxx | 28 +++++++++++ .../deployment/registry/sfwk/dp_sfwk.cxx | 7 +++ 10 files changed, 149 insertions(+), 1 deletion(-) mode change 100755 => 100644 desktop/source/deployment/gui/dp_gui.hrc mode change 100755 => 100644 desktop/source/deployment/gui/dp_gui_dialog.src mode change 100644 => 100755 desktop/source/deployment/gui/dp_gui_dialog2.cxx mode change 100755 => 100644 desktop/source/deployment/gui/dp_gui_dialog2.hxx mode change 100644 => 100755 desktop/source/deployment/registry/dp_backend.cxx mode change 100644 => 100755 desktop/source/deployment/registry/inc/dp_backend.h mode change 100644 => 100755 desktop/source/deployment/registry/package/dp_package.cxx mode change 100644 => 100755 desktop/source/deployment/registry/sfwk/dp_sfwk.cxx diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc old mode 100755 new mode 100644 index 5f52b042edf3..af9a9e7686ec --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -163,6 +163,7 @@ #define RID_STR_NO_ADMIN_PRIVILEGE (RID_DEPLOYMENT_GUI_START+95) #define RID_STR_ERROR_MISSING_DEPENDENCIES (RID_DEPLOYMENT_GUI_START+96) #define RID_STR_ERROR_MISSING_LICENSE (RID_DEPLOYMENT_GUI_START+97) +#define RID_STR_SHOW_LICENSE_CMD (RID_DEPLOYMENT_GUI_START+98) #define WARNINGBOX_CONCURRENTINSTANCE (RID_DEPLOYMENT_GUI_START+100) @@ -172,6 +173,7 @@ #define RID_WARNINGBOX_REMOVE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+104) #define RID_WARNINGBOX_ENABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+105) #define RID_WARNINGBOX_DISABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+106) +#define RID_DLG_SHOW_LICENSE (RID_DEPLOYMENT_GUI_START+107) #define RID_DLG_LICENSE RID_DEPLOYMENT_LICENSE_START diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src b/desktop/source/deployment/gui/dp_gui_dialog.src old mode 100755 new mode 100644 index 15823288ee20..4b6499ee07e0 --- a/desktop/source/deployment/gui/dp_gui_dialog.src +++ b/desktop/source/deployment/gui/dp_gui_dialog.src @@ -119,6 +119,11 @@ String RID_STR_ERROR_MISSING_LICENSE Text [ en-US ] = "This extension is disabled because you haven't accepted the license yet.\n"; }; +String RID_STR_SHOW_LICENSE_CMD +{ + Text [ en-US ] = "Show license"; +}; + // Dialog layout // --------------------------------------------------- // row 1 | multi line edit @@ -290,6 +295,35 @@ ModalDialog RID_DLG_LICENSE }; +ModalDialog RID_DLG_SHOW_LICENSE +{ + Text [ en-US ] = "Extension Software License Agreement"; + Size = MAP_APPFONT( 300, 200 ); + OutputSize = TRUE; + SVLook = TRUE; + Moveable = TRUE; + Closeable = TRUE; + Sizeable = TRUE; + + MultiLineEdit ML_LICENSE + { + Pos = MAP_APPFONT( 5, 5 ); + Size = MAP_APPFONT( 300 - 10, 200 - 15 - RSC_CD_PUSHBUTTON_HEIGHT ); + Border = TRUE; + VScroll = TRUE; + ReadOnly = TRUE; + }; + + OKButton RID_EM_BTN_CLOSE + { + TabStop = TRUE; + DefButton = TRUE; + Text [ en-US ] = "Close"; + Pos = MAP_APPFONT( (300-RSC_CD_PUSHBUTTON_WIDTH)/2, 200 - 5 - RSC_CD_PUSHBUTTON_HEIGHT ); + Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); + }; +}; + WarningBox RID_WARNINGBOX_INSTALL_EXTENSION { diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx old mode 100644 new mode 100755 index 78b29624b16e..4efb1e0c202b --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -39,8 +39,10 @@ #include "dp_gui_theextmgr.hxx" #include "dp_gui_extensioncmdqueue.hxx" #include "dp_misc.h" +#include "dp_ucb.h" #include "dp_update.hxx" #include "dp_identifier.hxx" +#include "dp_descriptioninfoset.hxx" #include "vcl/ctrl.hxx" #include "vcl/menu.hxx" @@ -118,7 +120,8 @@ enum MENU_COMMAND CMD_REMOVE = 1, CMD_ENABLE, CMD_DISABLE, - CMD_UPDATE + CMD_UPDATE, + CMD_SHOW_LICENSE }; class ExtBoxWithBtns_Impl : public ExtensionBox_Impl @@ -382,6 +385,9 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long aPopup.InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) ); } + if ( GetEntryData( nPos )->m_sLicenseText.Len() ) + aPopup.InsertItem( CMD_SHOW_LICENSE, DialogHelper::getResourceString( RID_STR_SHOW_LICENSE_CMD ) ); + return (MENU_COMMAND) aPopup.Execute( this, rPos ); } @@ -407,6 +413,12 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt ) break; case CMD_REMOVE: m_pParent->removePackage( GetEntryData( nPos )->m_xPackage ); break; + case CMD_SHOW_LICENSE: + { + ShowLicenseDialog aLicenseDlg( m_pParent, GetEntryData( nPos )->m_xPackage ); + aLicenseDlg.Execute(); + break; + } } } else if ( rMEvt.IsLeft() ) @@ -1740,6 +1752,42 @@ void UpdateRequiredDialog::disableAllEntries() m_aCloseBtn.SetText( m_sCloseText ); } +//------------------------------------------------------------------------------ +// ShowLicenseDialog +//------------------------------------------------------------------------------ +ShowLicenseDialog::ShowLicenseDialog( Window * pParent, + const uno::Reference< deployment::XPackage > &xPackage ) : + ModalDialog( pParent, DialogHelper::getResId( RID_DLG_SHOW_LICENSE ) ), + m_aLicenseText( this, DialogHelper::getResId( ML_LICENSE ) ), + m_aCloseBtn( this, DialogHelper::getResId( RID_EM_BTN_CLOSE ) ) +{ + FreeResource(); + + OUString aText = xPackage->getLicenseText(); + m_aLicenseText.SetText( aText ); +} + +//------------------------------------------------------------------------------ +ShowLicenseDialog::~ShowLicenseDialog() +{} + +//------------------------------------------------------------------------------ +void ShowLicenseDialog::Resize() +{ + Size aTotalSize( GetOutputSizePixel() ); + Size aTextSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT, + aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_TOP - 2*RSC_SP_DLG_INNERBORDER_BOTTOM + - m_aCloseBtn.GetSizePixel().Height() ); + + m_aLicenseText.SetPosSizePixel( Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ), + aTextSize ); + + Point aBtnPos( (aTotalSize.Width() - m_aCloseBtn.GetSizePixel().Width())/2, + aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_BOTTOM + - m_aCloseBtn.GetSizePixel().Height() ); + m_aCloseBtn.SetPosPixel( aBtnPos ); +} + //================================================================================= // UpdateRequiredDialogService //================================================================================= diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx old mode 100755 new mode 100644 index f0a85cce98c0..755c3aadcbdf --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -35,6 +35,7 @@ #include "svtools/fixedhyper.hxx" #include "svtools/prgsbar.hxx" +#include "svtools/svmedit.hxx" #include "osl/conditn.hxx" #include "osl/mutex.hxx" @@ -245,6 +246,20 @@ public: bool installExtensionWarn( const ::rtl::OUString &rExtensionURL ) const; }; +//============================================================================== +class ShowLicenseDialog : public ModalDialog +{ + MultiLineEdit m_aLicenseText; + OKButton m_aCloseBtn; + +public: + ShowLicenseDialog( Window * pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ); + virtual ~ShowLicenseDialog(); + + virtual void Resize(); +}; + //============================================================================== class UpdateRequiredDialogService : public ::cppu::WeakImplHelper1< ::com::sun::star::ui::dialogs::XExecutableDialog > { diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 24b47aa223e3..d54175a94cc8 100755 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -74,6 +74,7 @@ Entry_Impl::Entry_Impl( const uno::Reference< deployment::XPackage > &xPackage, m_sTitle = xPackage->getDisplayName(); m_sVersion = xPackage->getVersion(); m_sDescription = xPackage->getDescription(); + m_sLicenseText = xPackage->getLicenseText(); beans::StringPair aInfo( m_xPackage->getPublisherInfo() ); m_sPublisher = aInfo.First; diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 762f50296690..cbf9e27a8da1 100755 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -81,6 +81,7 @@ struct Entry_Impl String m_sPublisher; String m_sPublisherURL; String m_sErrorText; + String m_sLicenseText; Image m_aIcon; Image m_aIconHC; svt::FixedHyperlink *m_pPublisher; diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx old mode 100644 new mode 100755 index d781ba9e40ef..fa53d4e78a15 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -519,6 +519,15 @@ OUString Package::getDescription() throw ( return OUString(); } +//______________________________________________________________________________ +OUString Package::getLicenseText() throw ( + deployment::ExtensionRemovedException,RuntimeException) +{ + if (m_bRemoved) + throw deployment::ExtensionRemovedException(); + return OUString(); +} + //______________________________________________________________________________ Sequence Package::getUpdateInformationURLs() throw ( deployment::ExtensionRemovedException, RuntimeException) diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h old mode 100644 new mode 100755 index 3d3bf7cf912c..4b5ef4d7d1c9 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -237,6 +237,9 @@ public: virtual ::rtl::OUString SAL_CALL getDescription() throw (css::deployment::ExtensionRemovedException, css::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getLicenseText() + throw (css::deployment::ExtensionRemovedException, + css::uno::RuntimeException); virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getUpdateInformationURLs() throw (css::deployment::ExtensionRemovedException, diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx old mode 100644 new mode 100755 index feb55d0af3bf..4ce5981cd3b0 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -190,6 +190,9 @@ class BackendImpl : public ImplBaseT virtual OUString SAL_CALL getDescription() throw (deployment::ExtensionRemovedException, RuntimeException); + virtual OUString SAL_CALL getLicenseText() + throw (deployment::ExtensionRemovedException, RuntimeException); + virtual void SAL_CALL exportTo( OUString const & destFolderURL, OUString const & newTitle, sal_Int32 nameClashAction, @@ -998,6 +1001,31 @@ OUString BackendImpl::PackageImpl::getDescription() return OUString(); } +//______________________________________________________________________________ +OUString BackendImpl::PackageImpl::getLicenseText() + throw (deployment::ExtensionRemovedException, RuntimeException) +{ + if (m_bRemoved) + throw deployment::ExtensionRemovedException(); + + OUString sLicense; + DescriptionInfoset aInfo = getDescriptionInfoset(); + + ::boost::optional< SimpleLicenseAttributes > aSimplLicAttr = aInfo.getSimpleLicenseAttributes(); + if ( aSimplLicAttr ) + { + OUString aLicenseURL = aInfo.getLocalizedLicenseURL(); + + if ( aLicenseURL.getLength() ) + { + OUString aFullURL = m_url_expanded + OUSTR("/") + aLicenseURL; + sLicense = getTextFromURL( Reference< ucb::XCommandEnvironment >(), aFullURL); + } + } + + return sLicense; +} + //______________________________________________________________________________ void BackendImpl::PackageImpl::exportTo( OUString const & destFolderURL, OUString const & newTitle, diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx old mode 100644 new mode 100755 index 8a4ee1b45fbc..f3195701fc7c --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -88,6 +88,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend OUString const & identifier); // XPackage virtual OUString SAL_CALL getDescription() throw (RuntimeException); + virtual OUString SAL_CALL getLicenseText() throw (RuntimeException); }; friend class PackageImpl; @@ -132,6 +133,12 @@ OUString BackendImpl::PackageImpl::getDescription() throw (RuntimeException) return m_descr; } +//______________________________________________________________________________ +OUString BackendImpl::PackageImpl::getLicenseText() throw (RuntimeException) +{ + return Package::getDescription(); +} + //______________________________________________________________________________ BackendImpl::PackageImpl::PackageImpl( ::rtl::Reference const & myBackend, From b65b7928cb68656a615fdba993e9cb7192609a06 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 28 Sep 2010 10:15:20 +0200 Subject: [PATCH 171/279] dba34a: recognize hsqldb.compatible_version in the properties file --- .../source/drivers/hsqldb/HDriver.cxx | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 14758afafb3f..25fa1c4289f9 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -273,22 +273,38 @@ namespace connectivity if ( pStream.get() ) { ByteString sLine; + ByteString sVersionString; while ( pStream->ReadLine(sLine) ) { - if ( sLine.Equals("version=",0,sizeof("version=")-1) ) + if ( sLine.Len() == 0 ) + continue; + const ByteString sKey = sLine.GetToken( 0, '=' ); + const ByteString sValue = sLine.GetToken( 1, '=' ); + if ( sKey.Equals( "hsqldb.compatible_version" ) ) { - sLine = sLine.GetToken(1,'='); - const sal_Int32 nMajor = sLine.GetToken(0,'.').ToInt32(); - const sal_Int32 nMinor = sLine.GetToken(1,'.').ToInt32(); - const sal_Int32 nMicro = sLine.GetToken(2,'.').ToInt32(); - if ( nMajor > 1 - || ( nMajor == 1 && nMinor > 8 ) - || ( nMajor == 1 && nMinor == 8 && nMicro > 0 ) ) + sVersionString = sValue; + } + else + { + if ( sKey.Equals( "version" ) + && ( sVersionString.Len() == 0 ) + ) { - ::connectivity::SharedResources aResources; - sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION); + sVersionString = sValue; } - break; + } + } + if ( sVersionString.Len() ) + { + const sal_Int32 nMajor = sVersionString.GetToken(0,'.').ToInt32(); + const sal_Int32 nMinor = sVersionString.GetToken(1,'.').ToInt32(); + const sal_Int32 nMicro = sVersionString.GetToken(2,'.').ToInt32(); + if ( nMajor > 1 + || ( nMajor == 1 && nMinor > 8 ) + || ( nMajor == 1 && nMinor == 8 && nMicro > 0 ) ) + { + ::connectivity::SharedResources aResources; + sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION); } } } From f23b151efd588900c91bf36fd7ae211989c9fc60 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 28 Sep 2010 10:17:38 +0200 Subject: [PATCH 172/279] dba34a: removed assertion from impl_matchPropertyGroup - it is allowed that no group matches, as long as we did not migrate all properties to this new mechanism --- xmloff/source/forms/elementimport.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 5cc9a8203054..1f1c28d579cf 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -550,7 +550,6 @@ namespace xmloff return group; } - OSL_ENSURE( false, "OElementImport::impl_matchPropertyGroup: no group matched!" ); return i_propertyGroups.end(); } From c8c5ba6a21754c0fd28dcc8a9d2322c3e30d545e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 29 Sep 2010 08:28:18 +0200 Subject: [PATCH 173/279] dba34a: GCC WaE --- connectivity/source/drivers/hsqldb/HDriver.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 25fa1c4289f9..a0b755c107c9 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -278,15 +278,15 @@ namespace connectivity { if ( sLine.Len() == 0 ) continue; - const ByteString sKey = sLine.GetToken( 0, '=' ); + const ByteString sIniKey = sLine.GetToken( 0, '=' ); const ByteString sValue = sLine.GetToken( 1, '=' ); - if ( sKey.Equals( "hsqldb.compatible_version" ) ) + if ( sIniKey.Equals( "hsqldb.compatible_version" ) ) { sVersionString = sValue; } else { - if ( sKey.Equals( "version" ) + if ( sIniKey.Equals( "version" ) && ( sVersionString.Len() == 0 ) ) { From 1aaca7da01b830bd5bb4e6e4001c1cacdd77d243 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 29 Sep 2010 11:02:42 +0200 Subject: [PATCH 174/279] add exception file --- sfx2/source/dialog/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 sfx2/source/dialog/makefile.mk diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk old mode 100755 new mode 100644 index 4c56cd683e34..572053557e00 --- a/sfx2/source/dialog/makefile.mk +++ b/sfx2/source/dialog/makefile.mk @@ -46,6 +46,7 @@ EXCEPTIONSFILES=\ $(SLO)$/templdlg.obj \ $(SLO)$/dinfdlg.obj \ $(SLO)$/dockwin.obj \ + $(SLO)$/passwd.obj \ $(SLO)$/taskpane.obj SLOFILES =\ @@ -58,7 +59,6 @@ SLOFILES =\ $(SLO)$/mgetempl.obj \ $(SLO)$/navigat.obj \ $(SLO)$/newstyle.obj \ - $(SLO)$/passwd.obj \ $(SLO)$/printopt.obj \ $(SLO)$/sfxdlg.obj \ $(SLO)$/splitwin.obj \ From f8a26479f2de04ba0237d4ba4159e39f03047773 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 1 Oct 2010 09:59:59 +0200 Subject: [PATCH 175/279] dba34a: remaint of #i105989#: for calculating the sort column indexes, don't ask the table, but the select columns (the column orders in both might differ) --- .../source/drivers/file/FStatement.cxx | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index acc2059f15c7..52200553d042 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -451,19 +451,12 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef, return; // Alles geprueft und wir haben den Namen der Column. // Die wievielte Column ist das? - try - { - m_aOrderbyColumnNumber.push_back(xColLocate->findColumn(aColumnName)); - } - catch(Exception) - { - ::vos::ORef aSelectColumns = m_aSQLIterator.getSelectColumns(); - ::comphelper::UStringMixEqual aCase; - OSQLColumns::Vector::const_iterator aFind = ::connectivity::find(aSelectColumns->get().begin(),aSelectColumns->get().end(),aColumnName,aCase); - if ( aFind == aSelectColumns->get().end() ) - throw SQLException(); - m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->get().begin()) + 1); - } + ::vos::ORef aSelectColumns = m_aSQLIterator.getSelectColumns(); + ::comphelper::UStringMixEqual aCase; + OSQLColumns::Vector::const_iterator aFind = ::connectivity::find(aSelectColumns->get().begin(),aSelectColumns->get().end(),aColumnName,aCase); + if ( aFind == aSelectColumns->get().end() ) + throw SQLException(); + m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->get().begin()) + 1); // Ascending or Descending? m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? SQL_DESC : SQL_ASC); From 6cf96e73055e4e63efaf64f14555087d89b56b4d Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Fri, 1 Oct 2010 12:50:38 +0200 Subject: [PATCH 176/279] #i114876# - Added support for MediaDescriptor properties 'SuggestedSaveAsDir' and 'SuggestedSaveAsName'. --- sfx2/inc/sfx2/sfxsids.hrc | 32 +++++++------ sfx2/source/appl/appuno.cxx | 94 +++++++++++++++++++++++++------------ 2 files changed, 82 insertions(+), 44 deletions(-) mode change 100755 => 100644 sfx2/source/appl/appuno.cxx diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index 26e1991c24b8..1d4d5efd76ac 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -191,7 +191,7 @@ #define SID_EXPLORER_FILEPROPS_END (SID_SFX_START + 1399) #define ID_FILETP_START SID_EXPLORER_FILEPROPS_START -#define ID_FILETP_READONLY (ID_FILETP_START + 0) +#define ID_FILETP_READONLY (ID_FILETP_START + 0) #define ID_FILETP_TITLE (ID_FILETP_START + 1) #define SID_EXPLORER_PROPS_START (SID_SFX_START + 1410) @@ -225,9 +225,9 @@ #define SID_OFFICE_PLK (SID_SFX_START + 1601) #define SID_OFFICE_PALK (SID_SFX_START + 1604) #define SID_CHECK_KEY (SID_SFX_START + 1605) -#define SID_OFFICE_PRIVATE_USE (SID_SFX_START + 1606) -#define SID_OFFICE_COMMERCIAL_USE (SID_SFX_START + 1607) -#define SID_OFFICE_CUSTOMERNUMBER (SID_SFX_START + 1608) +#define SID_OFFICE_PRIVATE_USE (SID_SFX_START + 1606) +#define SID_OFFICE_COMMERCIAL_USE (SID_SFX_START + 1607) +#define SID_OFFICE_CUSTOMERNUMBER (SID_SFX_START + 1608) #define SID_OFFICE_INVALIDATE_TITLE (SID_SFX_START + 1609) #define SID_OFFICE_CHECK_PLZ (SID_SFX_START + 1610) #define SID_INTERNET_SEARCH (SID_SFX_START + 1611) @@ -240,11 +240,11 @@ #define SID_NEW_MSG_PARENT (SID_SFX_START + 1622) -#define SID_PGP_ENCODE (SID_SFX_START + 1625) -#define SID_PGP_DECODE (SID_SFX_START + 1626) -#define SID_TIPWINDOW (SID_SFX_START + 1632) +#define SID_PGP_ENCODE (SID_SFX_START + 1625) +#define SID_PGP_DECODE (SID_SFX_START + 1626) +#define SID_TIPWINDOW (SID_SFX_START + 1632) #define SID_CHARSET (SID_SFX_START + 1633) -#define SID_OVERWRITE (SID_SFX_START + 1634) +#define SID_OVERWRITE (SID_SFX_START + 1634) #define SID_RENAME (SID_SFX_START + 1653) #define SID_PARTWIN (SID_SFX_START + 1640) #define SID_CRASH (SID_SFX_START + 1645) @@ -275,7 +275,7 @@ #define SID_SHOW_IME_STATUS_WINDOW (SID_SFX_START + 1680) #define SID_UPDATE_CONFIG (SID_SFX_START + 1681) #define SID_VIEWONLY (SID_SFX_START + 1682) -#define SID_REPAIRPACKAGE (SID_SFX_START + 1683) +#define SID_REPAIRPACKAGE (SID_SFX_START + 1683) #define SID_ADDONHELP (SID_SFX_START + 1684) #define SID_OBJECTSHELL (SID_SFX_START + 1685) #define SID_MINIMIZED (SID_SFX_START + 1687) @@ -309,7 +309,9 @@ #define SID_DEFAULTFILENAME (SID_SFX_START + 1717) #define SID_MODIFYPASSWORDINFO (SID_SFX_START + 1718) #define SID_RECOMMENDREADONLY (SID_SFX_START + 1719) -#define SID_SFX_free_START (SID_SFX_START + 1720) +#define SID_SUGGESTEDSAVEASDIR (SID_SFX_START + 1720) +#define SID_SUGGESTEDSAVEASNAME (SID_SFX_START + 1721) +#define SID_SFX_free_START (SID_SFX_START + 1722) #define SID_SFX_free_END (SID_SFX_START + 3999) #define SID_OPEN_NEW_VIEW (SID_SFX_START + 520) @@ -493,7 +495,7 @@ #define SID_PASTE (SID_SFX_START + 712) // steht unter diesem Wert in chaos/cntids.hrc!!! -//#define SID_DELETE (SID_SFX_START + 713) +//#define SID_DELETE (SID_SFX_START + 713) #define SID_BACKSPACE (SID_SFX_START + 714) #define SID_FORMATPAINTBRUSH (SID_SFX_START + 715) @@ -657,7 +659,7 @@ #define SID_OPT_HELP_PATH (SID_SFX_START + 1560) #define SID_OPT_BOOKMARKS_PATH (SID_SFX_START + 1561) #define SID_OPT_GALLERY_PATH (SID_SFX_START + 1562) -#define SID_OPT_NEWDOC_PATH (SID_SFX_START + 1563) +#define SID_OPT_NEWDOC_PATH (SID_SFX_START + 1563) #define SID_OPT_AGENTS_PATH (SID_SFX_START + 1564) #define SID_OPT_AUTOPILOT_PATH (SID_SFX_START + 1565) #define SID_OPT_EXPLORER_PATH (SID_SFX_START + 1566) @@ -751,9 +753,9 @@ #define SID_ATTR_AUTOHELPAGENT (SID_OPTIONS_START + 67) #define SID_AUTOHELPAGENT_RESET (SID_OPTIONS_START + 68) #define SID_HELPAGENT_TIMEOUT (SID_OPTIONS_START + 93) -#define SID_ATTR_WELCOMESCREEN (SID_OPTIONS_START + 81) +#define SID_ATTR_WELCOMESCREEN (SID_OPTIONS_START + 81) #define SID_WELCOMESCREEN_RESET (SID_OPTIONS_START + 82) -#define SID_RESTORE_EXPAND_STATE (SID_OPTIONS_START + 83) +#define SID_RESTORE_EXPAND_STATE (SID_OPTIONS_START + 83) #define SID_ATTR_QUICKLAUNCHER (SID_OPTIONS_START + 74) #define SID_ATTR_YEAR2000 (SID_OPTIONS_START + 87) #define SID_ATTR_ALLOWFOLDERWEBVIEW (SID_OPTIONS_START + 92) @@ -825,7 +827,7 @@ #define SID_INET_CHANNELS_ONOFF (SID_OPTIONS_START + 64) -#define SID_INET_COOKIESHANDLE (SID_OPTIONS_START + 69) +#define SID_INET_COOKIESHANDLE (SID_OPTIONS_START + 69) #define SID_INET_CACHEJS (SID_OPTIONS_START + 70) #define SID_INET_CACHEEXPIRED (SID_OPTIONS_START + 71) diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx old mode 100755 new mode 100644 index 6f9d3b258745..c391f201583f --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -166,7 +166,7 @@ static char const sDontEdit[] = "DontEdit"; static char const sSilent[] = "Silent"; static char const sJumpMark[] = "JumpMark"; static char const sFileName[] = "FileName"; -static char const sSalvageURL[] = "SalvagedFile"; +static char const sSalvagedFile[] = "SalvagedFile"; static char const sStatusInd[] = "StatusIndicator"; static char const sModel[] = "Model"; static char const sFrame[] = "Frame"; @@ -192,6 +192,8 @@ static char const sUseSystemDialog[] = "UseSystemDialog"; static char const sStandardDir[] = "StandardDir"; static char const sBlackList[] = "BlackList"; static char const sModifyPasswordInfo[] = "ModifyPasswordInfo"; +static char const sSuggestedSaveAsDir[] = "SuggestedSaveAsDir"; +static char const sSuggestedSaveAsName[] = "SuggestedSaveAsName"; void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) { @@ -686,7 +688,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); - DBG_ASSERT( bOK, "invalid type or value for StanadardDir" ); + DBG_ASSERT( bOK, "invalid type or value for StandardDir" ); if (bOK) rSet.Put( SfxStringItem( SID_STANDARD_DIR, sVal ) ); } @@ -710,11 +712,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_FILE_NAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvageURL)) ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvagedFile)) ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); - DBG_ASSERT( bOK, "invalid type or value for SalvageURL" ); + DBG_ASSERT( bOK, "invalid type or value for SalvagedFile" ); if (bOK) rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) ); } @@ -722,7 +724,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); - DBG_ASSERT( bOK, "invalid type or value for SalvageURL" ); + DBG_ASSERT( bOK, "invalid type or value for FolderName" ); if (bOK) rSet.Put( SfxStringItem( SID_PATH, sVal ) ); } @@ -851,6 +853,22 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { rSet.Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, rProp.Value ) ); } + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsDir)) ) + { + ::rtl::OUString sVal; + sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsDir" ); + if (bOK) + rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASDIR, sVal ) ); + } + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsName)) ) + { + ::rtl::OUString sVal; + sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsName" ); + if (bOK) + rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASNAME, sVal ) ); + } #ifdef DBG_UTIL else --nFoundArgs; @@ -1065,6 +1083,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nAdditional++; if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SFX_ITEM_SET ) nAdditional++; + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR ) == SFX_ITEM_SET ) + nAdditional++; + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME ) == SFX_ITEM_SET ) + nAdditional++; // consider additional arguments nProps += nAdditional; @@ -1206,6 +1228,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta continue; if ( nId == SID_MODIFYPASSWORDINFO ) continue; + if ( nId == SID_SUGGESTEDSAVEASDIR ) + continue; + if ( nId == SID_SUGGESTEDSAVEASNAME ) + continue; } ByteString aDbg( "Unknown item detected: "); @@ -1490,7 +1516,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvageURL)); + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvagedFile)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET ) @@ -1569,6 +1595,16 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModifyPasswordInfo)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSuggestedSaveAsDir)); + pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); + } + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSuggestedSaveAsName)); + pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); + } } } @@ -1874,8 +1910,8 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: } if ( pSh && pSh->GetModel().is() ) - // remove flag for modal mode - pSh->SetMacroMode_Impl( FALSE ); + // remove flag for modal mode + pSh->SetMacroMode_Impl( FALSE ); } else nErr = ERRCODE_BASIC_PROC_UNDEFINED; @@ -2377,18 +2413,18 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::FilterOptionsRequest aOptionsRequest( temp, - temp2, + temp2, rModel, rProperties ); - m_aRequest <<= aOptionsRequest; + m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; - m_pOptions = new FilterOptionsContinuation; + m_pAbort = new ContinuationAbort; + m_pOptions = new FilterOptionsContinuation; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); } ::com::sun::star::uno::Any SAL_CALL RequestFilterOptions::getRequest() @@ -2411,17 +2447,17 @@ RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); + temp2, + aName ); - m_aRequest <<= aBrokenPackageRequest; + m_aRequest <<= aBrokenPackageRequest; - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; + m_pApprove = new ContinuationApprove; + m_pDisapprove = new ContinuationDisapprove; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); } /*uno::*/Any SAL_CALL RequestPackageReparation::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) @@ -2464,15 +2500,15 @@ NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); + temp2, + aName ); - m_aRequest <<= aBrokenPackageRequest; + m_aRequest <<= aBrokenPackageRequest; - m_pAbort = new ContinuationAbort; + m_pAbort = new ContinuationAbort; - m_lContinuations.realloc( 1 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations.realloc( 1 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); } /*uno::*/Any SAL_CALL NotifyBrokenPackage::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) From a83c7faceec94f6062481c9977e92621f3b71060 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 1 Oct 2010 17:36:06 +0200 Subject: [PATCH 177/279] pl08: #i111050# use interaction handler for export warnings, this may be suppressed by a custom interaction handler --- .../registry/data/org/openoffice/Interaction.xcu | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/officecfg/registry/data/org/openoffice/Interaction.xcu b/officecfg/registry/data/org/openoffice/Interaction.xcu index afd78005fb71..cc207de626d2 100644 --- a/officecfg/registry/data/org/openoffice/Interaction.xcu +++ b/officecfg/registry/data/org/openoffice/Interaction.xcu @@ -52,5 +52,17 @@ com.sun.star.comp.dbaccess.DatabaseInteractionHandler + + + + + named-and-derived + + + + + com.sun.star.filter.pdfexport.PDFExportInteractionHandler + + From d66fbfadfe177d21cc6ff81e72984d54e6039004 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 4 Oct 2010 16:15:24 +0200 Subject: [PATCH 178/279] enable exceptions --- editeng/source/rtf/makefile.mk | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/editeng/source/rtf/makefile.mk b/editeng/source/rtf/makefile.mk index ef1c5f44b196..bf32205afdc3 100644 --- a/editeng/source/rtf/makefile.mk +++ b/editeng/source/rtf/makefile.mk @@ -29,19 +29,16 @@ PRJ=..$/.. PRJNAME=editeng TARGET=rtf - +ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- .INCLUDE : settings.mk .INCLUDE : $(PRJ)$/util$/makefile.pmk - # --- Files -------------------------------------------------------- -EXCEPTIONSFILES= \ - $(SLO)$/svxrtf.obj SLOFILES= \ - $(EXCEPTIONSFILES) \ + $(SLO)$/svxrtf.obj \ $(SLO)$/rtfitem.obj \ $(SLO)$/rtfgrf.obj From ece3a2c61cfa0cbbbde59204a9f305c54ee1ac4c Mon Sep 17 00:00:00 2001 From: os Date: Tue, 5 Oct 2010 09:47:37 +0200 Subject: [PATCH 179/279] #i114081# SID_MAIL_PREPAREEXPORT re-implemented --- sfx2/inc/sfx2/sfxsids.hrc | 2 + sfx2/source/dialog/mailmodel.cxx | 145 ++++++++++++++++------ shell/source/win32/simplemail/senddoc.cxx | 2 +- svx/sdi/svx.sdi | 28 +++++ 4 files changed, 139 insertions(+), 38 deletions(-) diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index 26e1991c24b8..71d92294d762 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -93,6 +93,8 @@ #define SID_MAIL_PRIORITY (SID_SFX_START + 337) #define SID_MAIL_ATTACH_FILE (SID_SFX_START + 375) +#define SID_MAIL_PREPAREEXPORT (SID_SFX_START + 385) +#define SID_MAIL_NEEDS_PREPAREEXPORT (SID_SFX_START + 386) #define SID_MAIL_EXPORT_FINISHED (SID_SFX_START + 388) #define SID_WEBHTML (SID_SFX_START + 393) diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 0e0c6ec22ee1..dfd099f6cf45 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -53,13 +53,11 @@ #include #include #include +#include #include #include #include -#ifndef _RTL_TEXTENC_H -#include -#endif #include #include #include @@ -84,6 +82,7 @@ #include #include #include +#include // -------------------------------------------------------------- using namespace ::com::sun::star; @@ -98,6 +97,54 @@ using namespace ::com::sun::star::system; using namespace ::rtl; namespace css = ::com::sun::star; +// - class PrepareListener_Impl ------------------------------------------ +class PrepareListener_Impl : public ::cppu::WeakImplHelper1< css::frame::XStatusListener > +{ + bool m_bState; +public: + PrepareListener_Impl(); + virtual ~PrepareListener_Impl(); + + // css.frame.XStatusListener + virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& aEvent) + throw(css::uno::RuntimeException); + + // css.lang.XEventListener + virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent) + throw(css::uno::RuntimeException); + + bool IsSet() const {return m_bState;} +}; + +/*-- 25.08.2010 14:32:49--------------------------------------------------- + + -----------------------------------------------------------------------*/ +PrepareListener_Impl::PrepareListener_Impl() : + m_bState( false ) +{ +} +/*-- 25.08.2010 14:32:51--------------------------------------------------- + + -----------------------------------------------------------------------*/ +PrepareListener_Impl::~PrepareListener_Impl() +{ +} +/*-- 25.08.2010 14:32:51--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void PrepareListener_Impl::statusChanged(const css::frame::FeatureStateEvent& rEvent) throw(css::uno::RuntimeException) +{ + if( rEvent.IsEnabled ) + rEvent.State >>= m_bState; + else + m_bState = sal_False; +} +/*-- 25.08.2010 14:32:52--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) throw(css::uno::RuntimeException) +{ +} // class AddressList_Impl ------------------------------------------------ @@ -547,46 +594,68 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( aArgs[nNumArgs-1].Value = css::uno::makeAny( aPassword ); } - if ( bModified || !bHasLocation || bStoreTo ) + bool bNeedsPreparation = false; + css::util::URL aPrepareURL; + css::uno::Reference< css::frame::XDispatch > xPrepareDispatch; + css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY ); + css::uno::Reference< css::util::XURLTransformer > xURLTransformer( + xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), + css::uno::UNO_QUERY ); + if( !bSendAsPDF ) + { + try + { + // check if the document needs to be prepared for sending as mail (embedding of links, removal of invisible content) + + if ( xURLTransformer.is() ) + { + aPrepareURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" )); + xURLTransformer->parseStrict( aPrepareURL ); + } + + if ( xDispatchProvider.is() ) + { + xPrepareDispatch = css::uno::Reference< css::frame::XDispatch >( + xDispatchProvider->queryDispatch( aPrepareURL, ::rtl::OUString(), 0 )); + if ( xPrepareDispatch.is() ) + { + PrepareListener_Impl* pPrepareListener; + uno::Reference< css::frame::XStatusListener > xStatusListener = pPrepareListener = new PrepareListener_Impl; + xPrepareDispatch->addStatusListener( xStatusListener, aPrepareURL ); + bNeedsPreparation = pPrepareListener->IsSet(); + xPrepareDispatch->removeStatusListener( xStatusListener, aPrepareURL ); + } + } + } + catch ( css::uno::RuntimeException& ) + { + throw; + } + catch ( css::uno::Exception& ) + { + } + } + + if ( bModified || !bHasLocation || bStoreTo || bNeedsPreparation ) { // Document is modified, is newly created or should be stored in a special format try { - css::uno::Reference< css::util::XURLTransformer > xURLTransformer( - xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), - css::uno::UNO_QUERY ); - - css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY ); - css::uno::Reference< css::frame::XDispatch > xDispatch; - - css::util::URL aURL; - css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; - - if( !bSendAsPDF ) + if( bNeedsPreparation && xPrepareDispatch.is() ) { - if ( xURLTransformer.is() ) + if ( xPrepareDispatch.is() ) { - aURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" )); - xURLTransformer->parseStrict( aURL ); - } - - if ( xDispatchProvider.is() ) - { - xDispatch = css::uno::Reference< css::frame::XDispatch >( - xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); - if ( xDispatch.is() ) + try + { + css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; + xPrepareDispatch->dispatch( aPrepareURL, aDispatchArgs ); + } + catch ( css::uno::RuntimeException& ) + { + throw; + } + catch ( css::uno::Exception& ) { - try - { - xDispatch->dispatch( aURL, aDispatchArgs ); - } - catch ( css::uno::RuntimeException& ) - { - throw; - } - catch ( css::uno::Exception& ) - { - } } } } @@ -608,6 +677,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if( !bSendAsPDF ) { + css::util::URL aURL; // #i30432# notify that export is finished - the Writer may want to restore removed content if ( xURLTransformer.is() ) { @@ -617,12 +687,13 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if ( xDispatchProvider.is() ) { - xDispatch = css::uno::Reference< css::frame::XDispatch >( + css::uno::Reference< css::frame::XDispatch > xDispatch = css::uno::Reference< css::frame::XDispatch >( xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); if ( xDispatch.is() ) { try { + css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; xDispatch->dispatch( aURL, aDispatchArgs ); } catch ( css::uno::RuntimeException& ) diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index c8ac40799cea..bb743960afc5 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -170,7 +170,7 @@ void initMapiMessage( pMapiMessage->lpszSubject = const_cast(gSubject.c_str()); pMapiMessage->lpszNoteText = (gBody.length() ? const_cast(gBody.c_str()) : NULL); pMapiMessage->lpOriginator = aMapiOriginator; - pMapiMessage->lpRecips = &aMapiRecipientList[0]; + pMapiMessage->lpRecips = aMapiRecipientList.size() ? &aMapiRecipientList[0] : 0; pMapiMessage->nRecipCount = aMapiRecipientList.size(); pMapiMessage->lpFiles = &aMapiAttachmentList[0]; pMapiMessage->nFileCount = aMapiAttachmentList.size(); diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 240ca9cbd4e1..bdeefb372564 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -15135,3 +15135,31 @@ SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG ToolBoxConfig = FALSE, GroupId = GID_TABLE; ] +//-------------------------------------------------------------------------- +SfxVoidItem PrepareMailExport SID_MAIL_PREPAREEXPORT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* status: */ + SlotType = SfxBoolItem + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_EXPLORER; +] + From 66730c9bb251ad849be733223302fa29c033a1c3 Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Wed, 6 Oct 2010 10:38:25 +0200 Subject: [PATCH 180/279] #dv22#i114788# fixed typo in error message --- desktop/source/deployment/misc/dp_misc.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 desktop/source/deployment/misc/dp_misc.src diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src old mode 100644 new mode 100755 index 0d341122af16..ae810d2c7851 --- a/desktop/source/deployment/misc/dp_misc.src +++ b/desktop/source/deployment/misc/dp_misc.src @@ -32,7 +32,7 @@ String RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN { }; String RID_DEPLYOMENT_DEPENDENCIES_MIN { - Text[en-US] = "Extensions requires at least OpenOffice.org %VERSION"; + Text[en-US] = "Extension requires at least OpenOffice.org %VERSION"; }; String RID_DEPLYOMENT_DEPENDENCIES_MAX { From 133d2bcf60167b5807fb5b6cf6a53ac0c96e98df Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 6 Oct 2010 13:15:05 +0200 Subject: [PATCH 181/279] Backed out changeset ce84668a7646 --- sfx2/inc/sfx2/ipclient.hxx | 1 - sfx2/source/view/ipclient.cxx | 6 ------ 2 files changed, 7 deletions(-) diff --git a/sfx2/inc/sfx2/ipclient.hxx b/sfx2/inc/sfx2/ipclient.hxx index 960c6629b8d2..e0708f1f061d 100644 --- a/sfx2/inc/sfx2/ipclient.hxx +++ b/sfx2/inc/sfx2/ipclient.hxx @@ -101,7 +101,6 @@ public: // used in Writer // Rectangle PixelObjVisAreaToLogic( const Rectangle & rObjRect ) const; // Rectangle LogicObjAreaToPixel( const Rectangle & rRect ) const; - virtual void FormatChanged(); // object format was changed (used for StarMath formulas aligning) }; #endif diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 997cb584f83d..328d88d8b2b9 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -220,7 +220,6 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const document::EventObject& a if ( m_pClient && aEvent.EventName.equalsAscii("OnVisAreaChanged") && m_nAspect != embed::Aspects::MSOLE_ICON ) { - m_pClient->FormatChanged(); // for Writer when format of the object is changed with the area m_pClient->ViewChanged(); m_pClient->Invalidate(); } @@ -1083,11 +1082,6 @@ void SfxInPlaceClient::MakeVisible() // dummy implementation } -void SfxInPlaceClient::FormatChanged() -{ - // dummy implementation -} - void SfxInPlaceClient::DeactivateObject() { if ( GetObject().is() ) From 6ececd40c1473033bcdb4071eb5542c4346181ea Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 6 Oct 2010 17:43:02 +0200 Subject: [PATCH 182/279] sb131: #i114962# first step of passive extension component registration (no live deployment yet) --- desktop/prj/build.lst | 2 + .../registry/component/dp_component.cxx | 238 +++++++++++++--- .../registry/component/dp_component.hrc | 1 + .../registry/component/dp_component.src | 5 + desktop/test/deployment/boxt/boxt.cxx | 11 - desktop/test/deployment/boxt/makefile.mk | 2 +- desktop/test/deployment/passive/Addons.xcu | 67 +++++ .../deployment/passive/ProtocolHandler.xcu | 48 ++++ desktop/test/deployment/passive/Service.java | 130 +++++++++ .../test/deployment/passive/description.xml | 37 +++ desktop/test/deployment/passive/makefile.mk | 119 ++++++++ desktop/test/deployment/passive/manifest.mf | 3 + desktop/test/deployment/passive/manifest.xml | 40 +++ .../deployment/passive/passive_java.component | 34 +++ .../passive/passive_native.component | 34 +++ .../deployment/passive/passive_native.cxx | 253 ++++++++++++++++++ .../passive/passive_python.component | 34 +++ .../test/deployment/passive/passive_python.py | 74 +++++ 18 files changed, 1090 insertions(+), 42 deletions(-) create mode 100644 desktop/test/deployment/passive/Addons.xcu create mode 100644 desktop/test/deployment/passive/ProtocolHandler.xcu create mode 100644 desktop/test/deployment/passive/Service.java create mode 100644 desktop/test/deployment/passive/description.xml create mode 100644 desktop/test/deployment/passive/makefile.mk create mode 100644 desktop/test/deployment/passive/manifest.mf create mode 100644 desktop/test/deployment/passive/manifest.xml create mode 100644 desktop/test/deployment/passive/passive_java.component create mode 100644 desktop/test/deployment/passive/passive_native.component create mode 100644 desktop/test/deployment/passive/passive_native.cxx create mode 100644 desktop/test/deployment/passive/passive_python.component create mode 100644 desktop/test/deployment/passive/passive_python.py diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index dc5d7a99b2d6..36d3ca86246f 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -41,3 +41,5 @@ dt desktop\registry\data\org\openoffice\Office nmake - a dt desktop\source\registration\com\sun\star\servicetag\resources get - all sn_svctagres NULL dt desktop\source\registration\com\sun\star\servicetag nmake - all sn_svctag NULL dt desktop\source\registration\com\sun\star\registration nmake - all sn_regjob sn_svctag NULL +dt desktop\test\deployment\boxt nmake - all dt_test_deployment_boxt NULL +dt desktop\test\deployment\passive nmake - all dt_test_deployment_passive NULL diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index e0844c227669..dea59c5de152 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -161,6 +161,30 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend }; friend class ComponentPackageImpl; + class ComponentsPackageImpl : public ::dp_registry::backend::Package + { + BackendImpl * getMyBackend() const; + + // Package + virtual beans::Optional< beans::Ambiguous > isRegistered_( + ::osl::ResettableMutexGuard & guard, + ::rtl::Reference const & abortChannel, + Reference const & xCmdEnv ); + virtual void processPackage_( + ::osl::ResettableMutexGuard & guard, + bool registerPackage, + bool startup, + ::rtl::Reference const & abortChannel, + Reference const & xCmdEnv ); + public: + ComponentsPackageImpl( + ::rtl::Reference const & myBackend, + OUString const & url, OUString const & name, + Reference const & xPackageType, + bool bRemoved, OUString const & identifier); + }; + friend class ComponentsPackageImpl; + class TypelibraryPackageImpl : public ::dp_registry::backend::Package { BackendImpl * getMyBackend() const; @@ -194,8 +218,20 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend t_stringlist m_jar_typelibs; t_stringlist m_rdb_typelibs; - t_stringlist & getTypelibs( bool jar ) { - return jar ? m_jar_typelibs : m_rdb_typelibs; + t_stringlist m_components; + + enum RcItem { RCITEM_JAR_TYPELIB, RCITEM_RDB_TYPELIB, RCITEM_COMPONENTS }; + + t_stringlist & getRcItemList( RcItem kind ) { + switch (kind) + { + case RCITEM_JAR_TYPELIB: + return m_jar_typelibs; + case RCITEM_RDB_TYPELIB: + return m_rdb_typelibs; + default: // case RCITEM_COMPONENTS + return m_components; + } } bool m_unorc_inited; @@ -217,6 +253,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend const Reference m_xDynComponentTypeInfo; const Reference m_xJavaComponentTypeInfo; const Reference m_xPythonComponentTypeInfo; + const Reference m_xComponentsTypeInfo; const Reference m_xRDBTypelibTypeInfo; const Reference m_xJavaTypelibTypeInfo; Sequence< Reference > m_typeInfos; @@ -254,11 +291,11 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend OUString const & id, Reference const & xObject ); void releaseObject( OUString const & id ); - bool addToUnoRc( bool jarFile, OUString const & url, + bool addToUnoRc( RcItem kind, OUString const & url, Reference const & xCmdEnv ); - bool removeFromUnoRc( bool jarFile, OUString const & url, + bool removeFromUnoRc( RcItem kind, OUString const & url, Reference const & xCmdEnv ); - bool hasInUnoRc( bool jarFile, OUString const & url ); + bool hasInUnoRc( RcItem kind, OUString const & url ); @@ -538,6 +575,13 @@ BackendImpl::BackendImpl( RID_STR_PYTHON_COMPONENT), RID_IMG_COMPONENT, RID_IMG_COMPONENT_HC ) ), + m_xComponentsTypeInfo( new Package::TypeInfo( + OUSTR("application/" + "vnd.sun.star.uno-components"), + OUSTR("*.components"), + getResourceString(RID_STR_COMPONENTS), + RID_IMG_COMPONENT, + RID_IMG_COMPONENT_HC ) ), m_xRDBTypelibTypeInfo( new Package::TypeInfo( OUSTR("application/" "vnd.sun.star.uno-typelibrary;" @@ -553,13 +597,14 @@ BackendImpl::BackendImpl( getResourceString(RID_STR_JAVA_TYPELIB), RID_IMG_JAVA_TYPELIB, RID_IMG_JAVA_TYPELIB_HC ) ), - m_typeInfos( 5 ) + m_typeInfos( 6 ) { m_typeInfos[ 0 ] = m_xDynComponentTypeInfo; m_typeInfos[ 1 ] = m_xJavaComponentTypeInfo; m_typeInfos[ 2 ] = m_xPythonComponentTypeInfo; - m_typeInfos[ 3 ] = m_xRDBTypelibTypeInfo; - m_typeInfos[ 4 ] = m_xJavaTypelibTypeInfo; + m_typeInfos[ 3 ] = m_xComponentsTypeInfo; + m_typeInfos[ 4 ] = m_xRDBTypelibTypeInfo; + m_typeInfos[ 5 ] = m_xJavaTypelibTypeInfo; const Reference xCmdEnv; @@ -723,6 +768,17 @@ Reference BackendImpl::bindPackage_( } } } + else if (subType.EqualsIgnoreCaseAscii( + "vnd.sun.star.uno-components")) + { + INetContentTypeParameter const * param = params.find( + ByteString("platform") ); + if (param == 0 || platform_fits( param->m_sValue )) { + return new BackendImpl::ComponentsPackageImpl( + this, url, name, m_xComponentsTypeInfo, bRemoved, + identifier); + } + } else if (subType.EqualsIgnoreCaseAscii( "vnd.sun.star.uno-typelibrary")) { @@ -816,11 +872,50 @@ void BackendImpl::unorc_verify_init( while (index >= 0); } if (readLine( &line, OUSTR("UNO_SERVICES="), ucb_content, - RTL_TEXTENCODING_UTF8 )) { - sal_Int32 start = sizeof ("UNO_SERVICES=?$ORIGIN/") - 1; - sal_Int32 sep = line.indexOf( ' ', start ); - OSL_ASSERT( sep > 0 ); - m_commonRDB_RO = line.copy( start, sep - start ); + RTL_TEXTENCODING_UTF8 )) + { + // The UNO_SERVICES line always has the BNF form + // "UNO_SERVICES=" + // ("?$ORIGIN/" )? -- first + // "${$ORIGIN/${_OS}_${_ARCH}rc:UNO_SERVICES}"? -- second + // ("?" ("BUNDLED_EXTENSIONS" | -- third + // "UNO_SHARED_PACKAGES_CACHE" | "UNO_USER_PACKAGES_CACHE") + // ...)* + // so can unambiguously be split into its thre parts: + int state = 1; + for (sal_Int32 i = RTL_CONSTASCII_LENGTH("UNO_SERVICES="); + i >= 0;) + { + rtl::OUString token(line.getToken(0, ' ', i)); + if (token.getLength() != 0) + { + if (state == 1 && + token.matchAsciiL( + RTL_CONSTASCII_STRINGPARAM("?$ORIGIN/"))) + { + m_commonRDB_RO = token.copy( + RTL_CONSTASCII_LENGTH("?$ORIGIN/")); + state = 2; + } + else if (state <= 2 && + token.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( + "${$ORIGIN/${_OS}_${_ARCH}rc:" + "UNO_SERVICES}"))) + { + state = 3; + } + else + { + if (token[0] == '?') + { + token = token.copy(1); + } + m_components.push_back(token); + state = 3; + } + } + } } // native rc: @@ -896,16 +991,27 @@ void BackendImpl::unorc_flush( Reference const & xCmdEnv ) OUString sCommonRDB(m_commonRDB.getLength() > 0 ? m_commonRDB : m_commonRDB_RO); OUString sNativeRDB(m_nativeRDB.getLength() > 0 ? m_nativeRDB : m_nativeRDB_RO); - if (sCommonRDB.getLength() > 0 || sNativeRDB.getLength() > 0) + if (sCommonRDB.getLength() > 0 || sNativeRDB.getLength() > 0 || + !m_components.empty()) { - buf.append( RTL_CONSTASCII_STRINGPARAM("UNO_SERVICES=?$ORIGIN/") ); - buf.append( ::rtl::OUStringToOString( - sCommonRDB, RTL_TEXTENCODING_ASCII_US ) ); + buf.append( RTL_CONSTASCII_STRINGPARAM("UNO_SERVICES=") ); + bool space = false; + if (sCommonRDB.getLength() > 0) + { + buf.append( RTL_CONSTASCII_STRINGPARAM("?$ORIGIN/") ); + buf.append( ::rtl::OUStringToOString( + sCommonRDB, RTL_TEXTENCODING_ASCII_US ) ); + space = true; + } if (sNativeRDB.getLength() > 0) { + if (space) + { + buf.append(' '); + } buf.append( RTL_CONSTASCII_STRINGPARAM( - " ${$ORIGIN/${_OS}_${_ARCH}rc:UNO_SERVICES}") ); - buf.append(LF); + "${$ORIGIN/${_OS}_${_ARCH}rc:UNO_SERVICES}") ); + space = true; // write native rc: ::rtl::OStringBuffer buf2; @@ -927,6 +1033,18 @@ void BackendImpl::unorc_flush( Reference const & xCmdEnv ) xCmdEnv ); ucb_content.writeStream( xData, true /* replace existing */ ); } + for (t_stringlist::iterator i(m_components.begin()); + i != m_components.end(); ++i) + { + if (space) + { + buf.append(' '); + } + buf.append('?'); + buf.append(rtl::OUStringToOString(*i, RTL_TEXTENCODING_UTF8)); + space = true; + } + buf.append(LF); } // write unorc: @@ -943,13 +1061,13 @@ void BackendImpl::unorc_flush( Reference const & xCmdEnv ) } //______________________________________________________________________________ -bool BackendImpl::addToUnoRc( bool jarFile, OUString const & url_, +bool BackendImpl::addToUnoRc( RcItem kind, OUString const & url_, Reference const & xCmdEnv ) { const OUString rcterm( dp_misc::makeRcTerm(url_) ); const ::osl::MutexGuard guard( getMutex() ); unorc_verify_init( xCmdEnv ); - t_stringlist & rSet = getTypelibs(jarFile); + t_stringlist & rSet = getRcItemList(kind); if (::std::find( rSet.begin(), rSet.end(), rcterm ) == rSet.end()) { rSet.push_front( rcterm ); // prepend to list, thus overriding // write immediately: @@ -963,13 +1081,13 @@ bool BackendImpl::addToUnoRc( bool jarFile, OUString const & url_, //______________________________________________________________________________ bool BackendImpl::removeFromUnoRc( - bool jarFile, OUString const & url_, + RcItem kind, OUString const & url_, Reference const & xCmdEnv ) { const OUString rcterm( dp_misc::makeRcTerm(url_) ); const ::osl::MutexGuard guard( getMutex() ); unorc_verify_init( xCmdEnv ); - getTypelibs(jarFile).remove( rcterm ); + getRcItemList(kind).remove( rcterm ); // write immediately: m_unorc_modified = true; unorc_flush( xCmdEnv ); @@ -978,11 +1096,11 @@ bool BackendImpl::removeFromUnoRc( //______________________________________________________________________________ bool BackendImpl::hasInUnoRc( - bool jarFile, OUString const & url_ ) + RcItem kind, OUString const & url_ ) { const OUString rcterm( dp_misc::makeRcTerm(url_) ); const ::osl::MutexGuard guard( getMutex() ); - t_stringlist const & rSet = getTypelibs(jarFile); + t_stringlist const & rSet = getRcItemList(kind); return ::std::find( rSet.begin(), rSet.end(), rcterm ) != rSet.end(); } @@ -1264,7 +1382,7 @@ void BackendImpl::ComponentPackageImpl::processPackage_( //It may fail if there is no suitable java. if (isJavaTypelib) { - that->addToUnoRc( java, url, xCmdEnv ); + that->addToUnoRc( RCITEM_JAR_TYPELIB, url, xCmdEnv ); data.javaTypeLibrary = true; } @@ -1432,7 +1550,7 @@ void BackendImpl::ComponentPackageImpl::processPackage_( xImplReg->revokeImplementation( url, xServicesRDB ); if (isJavaTypelib) - that->removeFromUnoRc( java, url, xCmdEnv ); + that->removeFromUnoRc( RCITEM_JAR_TYPELIB, url, xCmdEnv ); if (bRemoteContext) that->releaseObject( url ); @@ -1480,7 +1598,8 @@ BackendImpl::TypelibraryPackageImpl::isRegistered_( return beans::Optional< beans::Ambiguous >( true /* IsPresent */, beans::Ambiguous( - that->hasInUnoRc( m_jarFile, getURL() ), + that->hasInUnoRc( + m_jarFile ? RCITEM_JAR_TYPELIB : RCITEM_RDB_TYPELIB, getURL() ), false /* IsAmbiguous */ ) ); } @@ -1546,11 +1665,13 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_( } } - that->addToUnoRc( m_jarFile, url, xCmdEnv ); + that->addToUnoRc( m_jarFile ? RCITEM_JAR_TYPELIB : RCITEM_RDB_TYPELIB, + url, xCmdEnv ); } else // revokePackage() { - that->removeFromUnoRc( m_jarFile, url, xCmdEnv ); + that->removeFromUnoRc( + m_jarFile ? RCITEM_JAR_TYPELIB : RCITEM_RDB_TYPELIB, url, xCmdEnv ); // revoking types at runtime, possible, sensible? if (!m_xTDprov.is()) @@ -1570,6 +1691,63 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_( } } +BackendImpl * BackendImpl::ComponentsPackageImpl::getMyBackend() const +{ + BackendImpl * pBackend = static_cast(m_myBackend.get()); + if (NULL == pBackend) + { + //Throws a DisposedException + check(); + //We should never get here... + throw RuntimeException( + OUSTR("Failed to get the BackendImpl"), + static_cast(const_cast(this))); + } + return pBackend; +} + +beans::Optional< beans::Ambiguous > +BackendImpl::ComponentsPackageImpl::isRegistered_( + ::osl::ResettableMutexGuard &, + ::rtl::Reference const &, + Reference const & ) +{ + return beans::Optional< beans::Ambiguous >( + true, + beans::Ambiguous( + getMyBackend()->hasInUnoRc(RCITEM_COMPONENTS, getURL()), false)); +} + +void BackendImpl::ComponentsPackageImpl::processPackage_( + ::osl::ResettableMutexGuard &, + bool doRegisterPackage, + bool, + ::rtl::Reference const &, + Reference const & xCmdEnv ) +{ + BackendImpl * that = getMyBackend(); + rtl::OUString url(getURL()); + if (doRegisterPackage) + { + //TODO + that->addToUnoRc(RCITEM_COMPONENTS, url, xCmdEnv); + } + else // revoke + { + that->removeFromUnoRc(RCITEM_COMPONENTS, url, xCmdEnv); + //TODO + } +} + +BackendImpl::ComponentsPackageImpl::ComponentsPackageImpl( + ::rtl::Reference const & myBackend, + OUString const & url, OUString const & name, + Reference const & xPackageType, + bool bRemoved, OUString const & identifier) + : Package( myBackend, url, name, name /* display-name */, + xPackageType, bRemoved, identifier) +{} + } // anon namespace namespace sdecl = comphelper::service_decl; diff --git a/desktop/source/deployment/registry/component/dp_component.hrc b/desktop/source/deployment/registry/component/dp_component.hrc index 53085a48d185..4a8c4184a994 100644 --- a/desktop/source/deployment/registry/component/dp_component.hrc +++ b/desktop/source/deployment/registry/component/dp_component.hrc @@ -33,6 +33,7 @@ #define RID_STR_DYN_COMPONENT (RID_DEPLOYMENT_COMPONENT_START+10) #define RID_STR_JAVA_COMPONENT (RID_DEPLOYMENT_COMPONENT_START+11) #define RID_STR_PYTHON_COMPONENT (RID_DEPLOYMENT_COMPONENT_START+12) +#define RID_STR_COMPONENTS (RID_DEPLOYMENT_COMPONENT_START+13) #define RID_STR_RDB_TYPELIB (RID_DEPLOYMENT_COMPONENT_START+20) #define RID_STR_JAVA_TYPELIB (RID_DEPLOYMENT_COMPONENT_START+21) diff --git a/desktop/source/deployment/registry/component/dp_component.src b/desktop/source/deployment/registry/component/dp_component.src index 36f2a1cc4a5c..9e9ab1a82bbf 100644 --- a/desktop/source/deployment/registry/component/dp_component.src +++ b/desktop/source/deployment/registry/component/dp_component.src @@ -42,6 +42,11 @@ String RID_STR_PYTHON_COMPONENT Text [ en-US ] = "UNO Python Component"; }; +String RID_STR_COMPONENTS +{ + Text [ en-US ] = "UNO Components"; +}; + String RID_STR_RDB_TYPELIB { Text [ en-US ] = "UNO RDB Type Library"; diff --git a/desktop/test/deployment/boxt/boxt.cxx b/desktop/test/deployment/boxt/boxt.cxx index dc82c0c004d6..51c223dedcd4 100644 --- a/desktop/test/deployment/boxt/boxt.cxx +++ b/desktop/test/deployment/boxt/boxt.cxx @@ -187,17 +187,6 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL dummy( return css::uno::Reference< css::uno::XInterface >(); } -rtl::OUString SAL_CALL getImplementationName() { - return rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.test.deployment.boxt")); -} - -css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() { - rtl::OUString name( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.test.deployment.boxt")); - return css::uno::Sequence< rtl::OUString >(&name, 1); -} - css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL createFactory( cppu::ComponentFactoryFunc, rtl::OUString const &, diff --git a/desktop/test/deployment/boxt/makefile.mk b/desktop/test/deployment/boxt/makefile.mk index 11d736448d44..88e72aef4ab8 100644 --- a/desktop/test/deployment/boxt/makefile.mk +++ b/desktop/test/deployment/boxt/makefile.mk @@ -46,7 +46,7 @@ SHL1OBJS = $(SLO)/boxt.obj SHL1RPATH = BOXT SHL1STDLIBS = \ $(CPPUHELPERLIB) $(CPPULIB) $(MSFILTERLIB) $(SALLIB) $(TOOLSLIB) $(VCLLIB) -SHL1VERSIONMAP = $(SOLARENV)/src/component.map +SHL1VERSIONMAP = $(SOLARENV)/src/reg-component.map DEF1NAME = $(SHL1TARGET) .INCLUDE: target.mk diff --git a/desktop/test/deployment/passive/Addons.xcu b/desktop/test/deployment/passive/Addons.xcu new file mode 100644 index 000000000000..61578d7426e9 --- /dev/null +++ b/desktop/test/deployment/passive/Addons.xcu @@ -0,0 +1,67 @@ + + + + + + + + + passive + + + + + vnd.org.openoffice.test.desktop.deployment.passive_native: + + + native + + + + + vnd.org.openoffice.test.desktop.deployment.passive_java: + + + java + + + + + vnd.org.openoffice.test.desktop.deployment.passive_python: + + + python + + + + + + + diff --git a/desktop/test/deployment/passive/ProtocolHandler.xcu b/desktop/test/deployment/passive/ProtocolHandler.xcu new file mode 100644 index 000000000000..bc0355be41df --- /dev/null +++ b/desktop/test/deployment/passive/ProtocolHandler.xcu @@ -0,0 +1,48 @@ + + + + + + + + vnd.org.openoffice.test.desktop.deployment.passive_native:* + + + + + vnd.org.openoffice.test.desktop.deployment.passive_java:* + + + + + vnd.org.openoffice.test.desktop.deployment.passive_python:* + + + + diff --git a/desktop/test/deployment/passive/Service.java b/desktop/test/deployment/passive/Service.java new file mode 100644 index 000000000000..d4f2d52f1da0 --- /dev/null +++ b/desktop/test/deployment/passive/Service.java @@ -0,0 +1,130 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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 +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +package com.sun.star.comp.test.deployment.passive_java; + +import com.sun.star.awt.MessageBoxButtons; +import com.sun.star.awt.Rectangle; +import com.sun.star.awt.XMessageBox; +import com.sun.star.awt.XMessageBoxFactory; +import com.sun.star.awt.XWindowPeer; +import com.sun.star.beans.PropertyValue; +import com.sun.star.frame.DispatchDescriptor; +import com.sun.star.frame.XDesktop; +import com.sun.star.frame.XDispatch; +import com.sun.star.frame.XDispatchProvider; +import com.sun.star.frame.XStatusListener; +import com.sun.star.lang.WrappedTargetRuntimeException; +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XMultiComponentFactory; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lang.XSingleComponentFactory; +import com.sun.star.lib.uno.helper.Factory; +import com.sun.star.lib.uno.helper.WeakBase; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XComponentContext; +import com.sun.star.util.URL; + +public final class Service extends WeakBase + implements XServiceInfo, XDispatchProvider, XDispatch +{ + public Service(XComponentContext context) { + this.context = context; + } + + public String getImplementationName() { return implementationName; } + + public boolean supportsService(String ServiceName) { + return ServiceName.equals(getSupportedServiceNames()[0]); //TODO + } + + public String[] getSupportedServiceNames() { + return serviceNames; + } + + public XDispatch queryDispatch( + URL URL, String TargetFrameName, int SearchFlags) + { + return this; + } + + public XDispatch[] queryDispatches(DispatchDescriptor[] Requests) { + XDispatch[] s = new XDispatch[Requests.length]; + for (int i = 0; i < s.length; ++i) { + s[i] = queryDispatch( + Requests[i].FeatureURL, Requests[i].FrameName, + Requests[i].SearchFlags); + } + return s; + } + + public void dispatch(URL URL, PropertyValue[] Arguments) { + try { + XMultiComponentFactory smgr = UnoRuntime.queryInterface( + XMultiComponentFactory.class, context.getServiceManager()); + XMessageBox box = UnoRuntime.queryInterface( + XMessageBoxFactory.class, + smgr.createInstanceWithContext( + "com.sun.star.awt.Toolkit", context)). + createMessageBox( + UnoRuntime.queryInterface( + XWindowPeer.class, + (UnoRuntime.queryInterface( + XDesktop.class, + smgr.createInstanceWithContext( + "com.sun.star.frame.Desktop", context)). + getCurrentFrame().getComponentWindow())), + new Rectangle(), "infobox", MessageBoxButtons.BUTTONS_OK, + "passive", "java"); + box.execute(); + UnoRuntime.queryInterface(XComponent.class, box).dispose(); + } catch (com.sun.star.uno.RuntimeException e) { + throw e; + } catch (com.sun.star.uno.Exception e) { + throw new WrappedTargetRuntimeException( + "wrapped: " + e.getMessage(), this, e); + } + } + + public void addStatusListener(XStatusListener Control, URL URL) {} + + public void removeStatusListener(XStatusListener Control, URL URL) {} + + public static XSingleComponentFactory __getComponentFactory( + String implementation) + { + return implementation.equals(implementationName) + ? Factory.createComponentFactory(Service.class, serviceNames) + : null; + } + + private final XComponentContext context; + + private static final String implementationName = + "com.sun.star.comp.test.deployment.passive_java"; + + private static final String[] serviceNames = new String[] { + "com.sun.star.test.deployment.passive_java" }; +} diff --git a/desktop/test/deployment/passive/description.xml b/desktop/test/deployment/passive/description.xml new file mode 100644 index 000000000000..26972733fa15 --- /dev/null +++ b/desktop/test/deployment/passive/description.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/desktop/test/deployment/passive/makefile.mk b/desktop/test/deployment/passive/makefile.mk new file mode 100644 index 000000000000..deadd782dd60 --- /dev/null +++ b/desktop/test/deployment/passive/makefile.mk @@ -0,0 +1,119 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +PRJ = ../../.. +PRJNAME = desktop +TARGET = test_deployment_passive + +ENABLE_EXCEPTIONS = TRUE + +PACKAGE = com/sun/star/comp/test/deployment/passive_java +JAVAFILES = Service.java +JARFILES = juh.jar ridl.jar unoil.jar + +my_components = passive_native passive_java passive_python + +.INCLUDE: settings.mk + +DLLPRE = + +SLOFILES = $(SHL1OBJS) + +SHL1TARGET = passive_native.uno +SHL1OBJS = $(SLO)/passive_native.obj +SHL1RPATH = OXT +SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) +SHL1VERSIONMAP = $(SOLARENV)/src/component.map +DEF1NAME = $(SHL1TARGET) + +.INCLUDE: target.mk + +ALLTAR : $(MISC)/passive.oxt + +$(MISC)/passive.oxt : manifest.xml description.xml Addons.xcu \ + ProtocolHandler.xcu $(MISC)/$(TARGET)/uno.components $(SHL1TARGETN) \ + $(MISC)/$(TARGET)/passive_java.jar passive_python.py + $(RM) $@ + $(RM) -r $(MISC)/$(TARGET)/passive.oxt-zip + $(MKDIR) $(MISC)/$(TARGET)/passive.oxt-zip + $(MKDIRHIER) $(MISC)/$(TARGET)/passive.oxt-zip/META-INF + $(COPY) manifest.xml $(MISC)/$(TARGET)/passive.oxt-zip/META-INF/ + $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' < description.xml \ + > $(MISC)/$(TARGET)/passive.oxt-zip/description.xml + $(COPY) Addons.xcu ProtocolHandler.xcu $(MISC)/$(TARGET)/uno.components \ + $(SHL1TARGETN) $(MISC)/$(TARGET)/passive_java.jar passive_python.py \ + $(MISC)/$(TARGET)/passive.oxt-zip/ + cd $(MISC)/$(TARGET)/passive.oxt-zip && zip ../../passive.oxt \ + META-INF/manifest.xml description.xml Addons.xcu ProtocolHandler.xcu \ + uno.components $(SHL1TARGETN:f) passive_java.jar passive_python.py + +$(MISC)/$(TARGET)/uno.components : $(SOLARENV)/bin/packcomponents.xslt \ + $(MISC)/$(TARGET)/uno.components.input \ + $(my_components:^"$(MISC)/$(TARGET)/":+".component") + $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/$(TARGET)/ -o $@ \ + $(SOLARENV)/bin/packcomponents.xslt \ + $(MISC)/$(TARGET)/uno.components.input + +$(MISC)/$(TARGET)/uno.components.input : + $(MKDIRHIER) $(@:d) + echo \ + '$(my_components:^"":+".component")' \ + > $@ + +$(MISC)/$(TARGET)/passive_native.component : \ + $(SOLARENV)/bin/createcomponent.xslt passive_native.component + $(MKDIRHIER) $(@:d) + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_EXTENSION)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt passive_native.component + +$(MISC)/$(TARGET)/passive_java.component : \ + $(SOLARENV)/bin/createcomponent.xslt passive_java.component + $(MKDIRHIER) $(@:d) + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_EXTENSION)passive_java.jar' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt passive_java.component + +$(MISC)/$(TARGET)/passive_python.component : \ + $(SOLARENV)/bin/createcomponent.xslt passive_python.component + $(MKDIRHIER) $(@:d) + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_EXTENSION)passive_python.py' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt passive_python.component + +$(MISC)/$(TARGET)/passive_java.jar : manifest.mf $(JAVATARGET) + $(MKDIRHIER) $(@:d) + $(RM) $@ + $(RM) -r $(MISC)/$(TARGET)/passive_java.jar-zip + $(MKDIR) $(MISC)/$(TARGET)/passive_java.jar-zip + $(MKDIRHIER) $(MISC)/$(TARGET)/passive_java.jar-zip/META-INF \ + $(MISC)/$(TARGET)/passive_java.jar-zip/$(PACKAGE) + $(COPY) manifest.mf $(MISC)/$(TARGET)/passive_java.jar-zip/META-INF/ + $(COPY) $(foreach,i,$(JAVAFILES:b) $(CLASSDIR)/$(PACKAGE)/$i.class) \ + $(MISC)/$(TARGET)/passive_java.jar-zip/$(PACKAGE)/ + cd $(MISC)/$(TARGET)/passive_java.jar-zip && zip ../passive_java.jar \ + META-INF/manifest.mf $(foreach,i,$(JAVAFILES:b) $(PACKAGE)/$i.class) diff --git a/desktop/test/deployment/passive/manifest.mf b/desktop/test/deployment/passive/manifest.mf new file mode 100644 index 000000000000..5ad70357a1d2 --- /dev/null +++ b/desktop/test/deployment/passive/manifest.mf @@ -0,0 +1,3 @@ +Sealed: true +RegistrationClassName: com.sun.star.comp.test.deployment.passive_java.Service +UNO-Type-Path: diff --git a/desktop/test/deployment/passive/manifest.xml b/desktop/test/deployment/passive/manifest.xml new file mode 100644 index 000000000000..eb7588e15511 --- /dev/null +++ b/desktop/test/deployment/passive/manifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + diff --git a/desktop/test/deployment/passive/passive_java.component b/desktop/test/deployment/passive/passive_java.component new file mode 100644 index 000000000000..dfc55a5b8c36 --- /dev/null +++ b/desktop/test/deployment/passive/passive_java.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/desktop/test/deployment/passive/passive_native.component b/desktop/test/deployment/passive/passive_native.component new file mode 100644 index 000000000000..7b0c314628a6 --- /dev/null +++ b/desktop/test/deployment/passive/passive_native.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/desktop/test/deployment/passive/passive_native.cxx b/desktop/test/deployment/passive/passive_native.cxx new file mode 100644 index 000000000000..3c29174ffcb0 --- /dev/null +++ b/desktop/test/deployment/passive/passive_native.cxx @@ -0,0 +1,253 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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 +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "precompiled_desktop.hxx" +#include "sal/config.h" + +#include "boost/noncopyable.hpp" +#include "com/sun/star/awt/MessageBoxButtons.hpp" +#include "com/sun/star/awt/Rectangle.hpp" +#include "com/sun/star/awt/XMessageBox.hpp" +#include "com/sun/star/awt/XMessageBoxFactory.hpp" +#include "com/sun/star/awt/XWindowPeer.hpp" +#include "com/sun/star/beans/PropertyValue.hpp" +#include "com/sun/star/frame/DispatchDescriptor.hpp" +#include "com/sun/star/frame/XDesktop.hpp" +#include "com/sun/star/frame/XDispatch.hpp" +#include "com/sun/star/frame/XDispatchProvider.hpp" +#include "com/sun/star/frame/XFrame.hpp" +#include "com/sun/star/frame/XStatusListener.hpp" +#include "com/sun/star/lang/XComponent.hpp" +#include "com/sun/star/lang/XMultiComponentFactory.hpp" +#include "com/sun/star/lang/XServiceInfo.hpp" +#include "com/sun/star/lang/XSingleComponentFactory.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/util/URL.hpp" +#include "cppuhelper/factory.hxx" +#include "cppuhelper/implbase1.hxx" +#include "cppuhelper/implbase3.hxx" +#include "cppuhelper/implementationentry.hxx" +#include "cppuhelper/weak.hxx" +#include "osl/diagnose.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "uno/lbnames.h" + +namespace { + +namespace css = com::sun::star; + +namespace service { + +rtl::OUString getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.test.deployment.passive_native")); +} + +css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.test.deployment.passive_native")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +} + +class Service: + public cppu::WeakImplHelper3< + css::lang::XServiceInfo, css::frame::XDispatchProvider, + css::frame::XDispatch >, + private boost::noncopyable +{ +public: + Service(css::uno::Reference< css::uno::XComponentContext > const & context): + context_(context) { OSL_ASSERT(context.is()); } + +private: + virtual ~Service() {} + + virtual rtl::OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException) + { return service::getImplementationName(); } + + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) + throw (css::uno::RuntimeException) + { return ServiceName == getSupportedServiceNames()[0]; } //TODO + + virtual css::uno::Sequence< rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (css::uno::RuntimeException) + { return service::getSupportedServiceNames(); } + + virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( + css::util::URL const &, rtl::OUString const &, sal_Int32) + throw (css::uno::RuntimeException) + { return this; } + + virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > + SAL_CALL queryDispatches( + css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL dispatch( + css::util::URL const &, + css::uno::Sequence< css::beans::PropertyValue > const &) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL addStatusListener( + css::uno::Reference< css::frame::XStatusListener > const &, + css::util::URL const &) + throw (css::uno::RuntimeException) + {} + + virtual void SAL_CALL removeStatusListener( + css::uno::Reference< css::frame::XStatusListener > const &, + css::util::URL const &) + throw (css::uno::RuntimeException) + {} + + css::uno::Reference< css::uno::XComponentContext > context_; +}; + +css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > +Service::queryDispatches( + css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) + throw (css::uno::RuntimeException) +{ + css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > s( + Requests.getLength()); + for (sal_Int32 i = 0; i < s.getLength(); ++i) { + s[i] = queryDispatch( + Requests[i].FeatureURL, Requests[i].FrameName, + Requests[i].SearchFlags); + } + return s; +} + +void Service::dispatch( + css::util::URL const &, + css::uno::Sequence< css::beans::PropertyValue > const &) + throw (css::uno::RuntimeException) +{ + css::uno::Reference< css::lang::XMultiComponentFactory > smgr( + context_->getServiceManager(), css::uno::UNO_SET_THROW); + css::uno::Reference< css::awt::XMessageBox > box( + css::uno::Reference< css::awt::XMessageBoxFactory >( + smgr->createInstanceWithContext( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.awt.Toolkit")), context_), + css::uno::UNO_QUERY_THROW)->createMessageBox( + css::uno::Reference< css::awt::XWindowPeer >( + css::uno::Reference< css::frame::XFrame >( + css::uno::Reference< css::frame::XDesktop >( + smgr->createInstanceWithContext( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.frame.Desktop")), + context_), + css::uno::UNO_QUERY_THROW)->getCurrentFrame(), + css::uno::UNO_SET_THROW)->getComponentWindow(), + css::uno::UNO_QUERY_THROW), + css::awt::Rectangle(), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("infobox")), + css::awt::MessageBoxButtons::BUTTONS_OK, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("passive")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("native"))), + css::uno::UNO_SET_THROW); + box->execute(); + css::uno::Reference< css::lang::XComponent >( + box, css::uno::UNO_QUERY_THROW)->dispose(); +} + +class Factory: + public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, + private boost::noncopyable +{ +public: + Factory() {} + +private: + virtual ~Factory() {} + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithContext( + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException) + { return static_cast< cppu::OWeakObject * >(new Service(Context)); } + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithArgumentsAndContext( + css::uno::Sequence< css::uno::Any > const &, + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException) + { return createInstanceWithContext(Context); } +}; + +css::uno::Reference< css::uno::XInterface > SAL_CALL dummy( + css::uno::Reference< css::uno::XComponentContext > const &) + SAL_THROW((css::uno::Exception)) +{ + OSL_ASSERT(false); + return css::uno::Reference< css::uno::XInterface >(); +} + +css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL +createFactory( + cppu::ComponentFactoryFunc, rtl::OUString const &, + css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) + SAL_THROW(()) +{ + return new Factory; +} + +static cppu::ImplementationEntry const services[] = { + { &dummy, &service::getImplementationName, + &service::getSupportedServiceNames, &createFactory, 0, 0 }, + { 0, 0, 0, 0, 0, 0 } +}; + +} + +extern "C" void * SAL_CALL component_getFactory( + char const * pImplName, void * pServiceManager, void * pRegistryKey) +{ + return cppu::component_getFactoryHelper( + pImplName, pServiceManager, pRegistryKey, services); +} + +extern "C" void SAL_CALL component_getImplementationEnvironment( + char const ** ppEnvTypeName, uno_Environment **) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} diff --git a/desktop/test/deployment/passive/passive_python.component b/desktop/test/deployment/passive/passive_python.component new file mode 100644 index 000000000000..3a0bea4b5296 --- /dev/null +++ b/desktop/test/deployment/passive/passive_python.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/desktop/test/deployment/passive/passive_python.py b/desktop/test/deployment/passive/passive_python.py new file mode 100644 index 000000000000..183cbdc899c3 --- /dev/null +++ b/desktop/test/deployment/passive/passive_python.py @@ -0,0 +1,74 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +import uno +import unohelper + +from com.sun.star.awt import Rectangle +from com.sun.star.awt.MessageBoxButtons import BUTTONS_OK +from com.sun.star.frame import XDispatch, XDispatchProvider +from com.sun.star.lang import XServiceInfo + +implementationName = "com.sun.star.comp.test.deployment.passive_python" +serviceNames = ("com.sun.star.test.deployment.passive_python",) + +class Service(unohelper.Base, XServiceInfo, XDispatchProvider, XDispatch): + def __init__(self, context): + self.context = context + + def getImplementationName(self): + return implementationName + + def supportsService(self, ServiceName): + return ServiceName in serviceNames + + def getSupportedServiceNames(self): + return serviceNames + + def queryDispatch(self, URL, TargetFrame, SearchFlags): + return self + + def dispatch(self, URL, Arguments): + smgr = self.context.getServiceManager() + box = smgr.createInstanceWithContext( \ + "com.sun.star.awt.Toolkit", self.context).createMessageBox( \ + smgr.createInstanceWithContext( \ + "com.sun.star.frame.Desktop", self.context). \ + getCurrentFrame().getComponentWindow(), \ + Rectangle(), "infobox", BUTTONS_OK, "passive", "python") + box.execute(); + box.dispose(); + + def addStatusListener(self, Control, URL): + pass + + def removeStatusListener(self, Control, URL): + pass + +g_ImplementationHelper = unohelper.ImplementationHelper() +g_ImplementationHelper.addImplementation( \ + Service, implementationName, serviceNames,) From 3dc5bef2459e2d8981a06cb9d69a4481bcd91dbd Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 7 Oct 2010 16:33:21 +0200 Subject: [PATCH 183/279] dockingwindows: More code rework to prepare LayoutManager to control more ui element types. Move more code to other ui element type specific classes --- framework/inc/services/layoutmanager.hxx | 77 +- framework/source/layoutmanager/helpers.cxx | 91 +- framework/source/layoutmanager/helpers.hxx | 11 +- .../source/layoutmanager/layoutmanager.cxx | 3084 +++---- .../layoutmanager/layoutmanager.cxx.bak | 7388 ----------------- .../source/layoutmanager/panelmanager.cxx | 3 +- .../layoutmanager/toolbarlayoutmanager.cxx | 801 +- .../layoutmanager/toolbarlayoutmanager.hxx | 172 +- 8 files changed, 1829 insertions(+), 9798 deletions(-) mode change 100644 => 100755 framework/source/layoutmanager/layoutmanager.cxx delete mode 100755 framework/source/layoutmanager/layoutmanager.cxx.bak diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 48bca97bdb71..ef827e7e85b9 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -82,7 +82,7 @@ // other includes //_________________________________________________________________________________________________________________ #include -#include +#include #include #include #include @@ -96,13 +96,12 @@ namespace framework class ToolbarLayoutManager; class PanelManager; class GlobalSettings; - typedef ::cppu::WeakImplHelper9 < ::com::sun::star::lang::XServiceInfo + typedef ::cppu::WeakImplHelper8 < ::com::sun::star::lang::XServiceInfo , ::com::sun::star::frame::XLayoutManager , ::com::sun::star::awt::XWindowListener , ::com::sun::star::frame::XFrameActionListener , ::com::sun::star::ui::XUIConfigurationListener , ::com::sun::star::frame::XInplaceLayout - , ::com::sun::star::awt::XDockableWindowListener , ::com::sun::star::frame::XMenuBarMergingAcceptor , ::com::sun::star::frame::XLayoutManagerEventBroadcaster > LayoutManager_Base; @@ -130,7 +129,7 @@ namespace framework // XLayoutManager //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& Frame ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL reset( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL reset() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::awt::Rectangle SAL_CALL getCurrentDockingArea( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor > SAL_CALL getDockingAreaAcceptor() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDockingAreaAcceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor >& xDockingAreaAcceptor ) throw (::com::sun::star::uno::RuntimeException); @@ -200,17 +199,6 @@ namespace framework virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - //--------------------------------------------------------------------------------------------------------- - // XDockableWindowListener - //--------------------------------------------------------------------------------------------------------- - virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException); - //--------------------------------------------------------------------------------------------------------- // XLayoutManagerEventBroadcaster //--------------------------------------------------------------------------------------------------------- @@ -225,54 +213,35 @@ namespace framework //--------------------------------------------------------------------------------------------------------- virtual void requestLayout( Hint eHint ); - struct DockedData - { - DockedData() : m_aPos( LONG_MAX, LONG_MAX ), - m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ), - m_bLocked( sal_False ) {} - - Point m_aPos; - Size m_aSize; - sal_Int16 m_nDockedArea; - sal_Bool m_bLocked; - }; - struct FloatingData - { - FloatingData() : m_aPos( LONG_MAX, LONG_MAX ), - m_nLines( 1 ), - m_bIsHorizontal( sal_True ) {} - - Point m_aPos; - Size m_aSize; - sal_Int16 m_nLines; - sal_Bool m_bIsHorizontal; - }; - protected: DECL_LINK( AsyncLayoutHdl, Timer * ); private: - typedef std::vector< UIElement > UIElementVector; - //--------------------------------------------------------------------------------------------------------- // helper //--------------------------------------------------------------------------------------------------------- + + //--------------------------------------------------------------------------------------------------------- + // menu bar + //--------------------------------------------------------------------------------------------------------- void impl_clearUpMenuBar(); void implts_reset( sal_Bool bAttach ); void implts_setMenuBarCloser(sal_Bool bCloserState); void implts_updateMenuBarClose(); sal_Bool implts_resetMenuBar(); + //--------------------------------------------------------------------------------------------------------- + // locking + //--------------------------------------------------------------------------------------------------------- void implts_lock(); sal_Bool implts_unlock(); - sal_Bool implts_findElement( const rtl::OUString& aName, rtl::OUString& aElementType, rtl::OUString& aElementName, ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xSettings ); - sal_Bool implts_findElement( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xUIElement, UIElement& aElementData ); - sal_Bool implts_findElement( const rtl::OUString& aName, UIElement& aElementData ); + //--------------------------------------------------------------------------------------------------------- + // query + //--------------------------------------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_findElement( const rtl::OUString& aName ); UIElement& impl_findElement( const rtl::OUString& aName ); - sal_Bool implts_insertUIElement( const UIElement& rUIElement ); - void implts_refreshContextToolbarsVisibility(); void implts_writeNewStateData( const rtl::OUString aName, const ::com::sun::star::uno::Reference< com::sun::star::awt::XWindow >& xWindow ); sal_Bool implts_readWindowStateData( const rtl::OUString& rName, UIElement& rElementData ); void implts_writeWindowStateData( const rtl::OUString& rName, const UIElement& rElementData ); @@ -323,9 +292,6 @@ namespace framework void implts_updateUIElementsVisibleState( sal_Bool bShow ); void implts_setCurrentUIVisibility( sal_Bool bShow ); 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* ); @@ -354,9 +320,7 @@ namespace framework css::uno::WeakReference< css::frame::XModel > m_xModel; css::uno::Reference< css::awt::XWindow > m_xContainerWindow; css::uno::Reference< css::awt::XTopWindow2 > m_xContainerTopWindow; - css::uno::Reference< css::awt::XWindow > m_xDockAreaWindows[DOCKINGAREAS_COUNT]; sal_Int32 m_nLockCount; - UIElementVector m_aUIElements; bool m_bActive; bool m_bInplaceMenuSet; bool m_bDockingInProgress; @@ -371,10 +335,9 @@ namespace framework bool m_bHideCurrentUI; bool m_bGlobalSettings; bool m_bPreserveContentSize; - UIElement m_aDockUIElement; + bool m_bMenuBarCloser; css::awt::Rectangle m_aDockingArea; css::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor > m_xDockingAreaAcceptor; - Point m_aStartDockMousePos; css::uno::Reference< ::com::sun::star::lang::XComponent > m_xInplaceMenuBar; MenuBarManager* m_pInplaceMenuBar; css::uno::Reference< ::com::sun::star::ui::XUIElement > m_xMenuBar; @@ -383,14 +346,10 @@ namespace framework com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xProgressBarBackup; css::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager; css::uno::Reference< ::com::sun::star::ui::XUIElementFactory > m_xUIElementFactoryManager; - bool m_bMenuBarCloser; css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowStateSupplier; GlobalSettings* m_pGlobalSettings; rtl::OUString m_aModuleIdentifier; - rtl::OUString m_aCustomTbxPrefix; - rtl::OUString m_aFullCustomTbxPrefix; - rtl::OUString m_aFullAddonTbxPrefix; rtl::OUString m_aStatusBarAlias; rtl::OUString m_aProgressBarAlias; rtl::OUString m_aPropDocked; @@ -403,15 +362,13 @@ namespace framework rtl::OUString m_aPropStyle; rtl::OUString m_aPropLocked; rtl::OUString m_aCustomizeCmd; - AddonsOptions* m_pAddonOptions; - SvtMiscOptions* m_pMiscOptions; sal_Int16 m_eSymbolsSize; sal_Int16 m_eSymbolsStyle; - Timer m_aAsyncLayoutTimer; + Timer m_aAsyncLayoutTimer; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener PanelManager* m_pPanelManager; ToolbarLayoutManager* m_pToolbarManager; - css::uno::Reference< ::com::sun::star::awt::XDockableWindowListener > m_xToolbarManager; + css::uno::Reference< ::com::sun::star::lang::XComponent > m_xToolbarManager; }; } // namespace framework diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index 8297a361ad93..10b8c06fddac 100755 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -49,6 +49,7 @@ #include #include #include +#include //_________________________________________________________________________________________________________________ // other includes @@ -56,7 +57,6 @@ #include #include -#include #include #include @@ -69,6 +69,55 @@ using namespace com::sun::star; namespace framework { +::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow ) +{ + ::rtl::OUString aToolbarName; + + if ( pWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolBox = dynamic_cast( pWindow ); + if ( pToolBox ) + { + aToolbarName = pToolBox->GetSmartHelpId().GetStr(); + sal_Int32 i = aToolbarName.lastIndexOf( ':' ); + if (( aToolbarName.getLength() > 0 ) && ( i > 0 ) && (( i+ 1 ) < aToolbarName.getLength() )) + aToolbarName = aToolbarName.copy( i+1 ); // Remove ".HelpId:" protocol from toolbar name + else + aToolbarName = ::rtl::OUString(); + } + } + return aToolbarName; +} + +ToolBox* getToolboxPtr( Window* pWindow ) +{ + ToolBox* pToolbox(NULL); + if ( pWindow->GetType() == WINDOW_TOOLBOX ) + pToolbox = dynamic_cast( pWindow ); + return pToolbox; +} + +Window* getWindowFromXUIElement( const uno::Reference< ui::XUIElement >& xUIElement ) +{ + vos::OGuard aGuard( Application::GetSolarMutex() ); + uno::Reference< awt::XWindow > xWindow; + if ( xUIElement.is() ) + xWindow = uno::Reference< awt::XWindow >( xUIElement->getRealInterface(), uno::UNO_QUERY ); + return VCLUnoHelper::GetWindow( xWindow ); +} + +SystemWindow* getTopSystemWindow( const uno::Reference< awt::XWindow >& xWindow ) +{ + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + while ( pWindow && !pWindow->IsSystemWindow() ) + pWindow = pWindow->GetParent(); + + if ( pWindow ) + return (SystemWindow *)pWindow; + else + return 0; +} + void setZeroRectangle( ::Rectangle& rRect ) { rRect.setX(0); @@ -114,12 +163,12 @@ uno::Reference< awt::XWindowPeer > createToolkitWindow( const uno::Reference< la { // describe window properties. css::awt::WindowDescriptor aDescriptor; - aDescriptor.Type = awt::WindowClass_SIMPLE ; - aDescriptor.WindowServiceName = DECLARE_ASCII(pService) ; - aDescriptor.ParentIndex = -1 ; - aDescriptor.Parent = uno::Reference< awt::XWindowPeer >( rParent, uno::UNO_QUERY ) ; - aDescriptor.Bounds = awt::Rectangle(0,0,0,0) ; - aDescriptor.WindowAttributes = 0 ; + aDescriptor.Type = awt::WindowClass_SIMPLE; + aDescriptor.WindowServiceName = ::rtl::OUString::createFromAscii( pService ); + aDescriptor.ParentIndex = -1; + aDescriptor.Parent = uno::Reference< awt::XWindowPeer >( rParent, uno::UNO_QUERY ); + aDescriptor.Bounds = awt::Rectangle(0,0,0,0); + aDescriptor.WindowAttributes = 0; // create a awt window xPeer = xToolkit->createWindow( aDescriptor ); @@ -142,7 +191,7 @@ WindowAlign ImplConvertAlignment( sal_Int16 aAlignment ) return WINDOWALIGN_BOTTOM; } -bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ) +void parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ) { sal_Int32 nIndex = 0; @@ -154,10 +203,7 @@ bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aEl aElementType = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex ); aElementName = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex ); - return true; } - - return false; } ::com::sun::star::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect ) @@ -317,27 +363,4 @@ void impl_addWindowListeners( } } -css::uno::Reference< css::awt::XWindowPeer > implts_createToolkitWindow( - const css::uno::Reference< css::awt::XToolkit >& rToolkit, - const css::uno::Reference< css::awt::XWindowPeer >& rParent ) -{ - css::uno::Reference< css::awt::XWindowPeer > xPeer; - if ( rToolkit.is() ) - { - // describe window properties. - css::awt::WindowDescriptor aDescriptor; - aDescriptor.Type = css::awt::WindowClass_SIMPLE; - aDescriptor.WindowServiceName = DECLARE_ASCII("dockingarea"); - aDescriptor.ParentIndex = -1; - aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >( rParent, css::uno::UNO_QUERY ); - aDescriptor.Bounds = css::awt::Rectangle(0,0,0,0); - aDescriptor.WindowAttributes = 0; - - // create a docking area window - xPeer = rToolkit->createWindow( aDescriptor ); - } - - return xPeer; -} - } // namespace framework diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx index 61b05d771278..f48f1278fc52 100755 --- a/framework/source/layoutmanager/helpers.hxx +++ b/framework/source/layoutmanager/helpers.hxx @@ -54,6 +54,7 @@ //_________________________________________________________________________________________________________________ #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -64,15 +65,23 @@ #define UIRESOURCE_URL_ASCII "private:resource" #define UIRESOURCE_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( UIRESOURCE_URL_ASCII )) +#define UIRESOURCETYPE_TOOLBAR "toolbar" +#define UIRESOURCETYPE_STATUSBAR "statusbar" +#define UIRESOURCETYPE_MENUBAR "menubar" + namespace framework { +::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow ); +ToolBox* getToolboxPtr( Window* pWindow ); +Window* getWindowFromXUIElement( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement ); +SystemWindow* getTopSystemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xWindow ); bool equalRectangles( const css::awt::Rectangle& rRect1, const css::awt::Rectangle& rRect2 ); void setZeroRectangle( ::Rectangle& rRect ); bool lcl_checkUIElement(const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement,::com::sun::star::awt::Rectangle& _rPosSize, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xWindow); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > createToolkitWindow( const css::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rFactory, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent, const char* pService ); WindowAlign ImplConvertAlignment( sal_Int16 aAlignment ); -bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ); +void parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ); ::Rectangle putAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ); ::com::sun::star::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect ); ::com::sun::star::awt::Rectangle convertRectangleToAWT( const ::Rectangle& rRect ); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx old mode 100644 new mode 100755 index 3a1392476c73..1e2ca064d140 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -72,7 +71,6 @@ #include #include #include -#include #include #include #include @@ -103,13 +101,12 @@ // using namespace using namespace ::com::sun::star; -using namespace com::sun::star::uno; -using namespace com::sun::star::beans; -using namespace com::sun::star::util; -using namespace com::sun::star::lang; -using namespace com::sun::star::container; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::util; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::container; using namespace ::com::sun::star::ui; -using namespace com::sun::star::frame; using namespace ::com::sun::star::frame; @@ -137,102 +134,79 @@ struct UIElementVisibility //***************************************************************************************************************** IMPLEMENT_FORWARD_XTYPEPROVIDER2( LayoutManager, LayoutManager_Base, LayoutManager_PBase ) IMPLEMENT_FORWARD_XINTERFACE2( LayoutManager, LayoutManager_Base, LayoutManager_PBase ) +DEFINE_XSERVICEINFO_MULTISERVICE( LayoutManager, ::cppu::OWeakObject, SERVICENAME_LAYOUTMANAGER, IMPLEMENTATIONNAME_LAYOUTMANAGER) +DEFINE_INIT_SERVICE( LayoutManager, {} ) -DEFINE_XSERVICEINFO_MULTISERVICE ( LayoutManager , - ::cppu::OWeakObject , - SERVICENAME_LAYOUTMANAGER , - IMPLEMENTATIONNAME_LAYOUTMANAGER - ) - -DEFINE_INIT_SERVICE ( LayoutManager, {} ) - - -LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceManager ) - : LayoutManager_Base ( ) - , ThreadHelpBase ( &Application::GetSolarMutex() ) - , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) - , LayoutManager_PBase ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) - , m_xSMGR( xServiceManager ) - , m_xURLTransformer( xServiceManager->createInstance( SERVICENAME_URLTRANSFORMER ), UNO_QUERY ) - , m_xDisplayAccess( xServiceManager->createInstance( SERVICENAME_DISPLAYACCESS ), UNO_QUERY ) - , m_nLockCount( 0 ) - , m_bActive( sal_False ) - , m_bInplaceMenuSet( sal_False ) - , m_bDockingInProgress( sal_False ) - , m_bMenuVisible( sal_True ) - , m_bComponentAttached( sal_False ) - , m_bDoLayout( sal_False ) - , m_bVisible( sal_True ) - , m_bParentWindowVisible( sal_False ) - , m_bMustDoLayout( sal_True ) - , m_bAutomaticToolbars( sal_True ) - , m_bStoreWindowState( sal_False ) - , m_bHideCurrentUI( false ) - , m_bGlobalSettings( sal_False ) - , m_bPreserveContentSize( false ) - , m_pInplaceMenuBar( NULL ) - , m_xModuleManager( Reference< XModuleManager >( - xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY )) - , m_xUIElementFactoryManager( Reference< ::com::sun::star::ui::XUIElementFactory >( +LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceManager ) : LayoutManager_Base() + , ThreadHelpBase( &Application::GetSolarMutex()) + , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex()) + , LayoutManager_PBase( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) + , m_xSMGR( xServiceManager ) + , m_xURLTransformer( xServiceManager->createInstance( SERVICENAME_URLTRANSFORMER ), UNO_QUERY ) + , m_xDisplayAccess( xServiceManager->createInstance( SERVICENAME_DISPLAYACCESS ), UNO_QUERY ) + , m_nLockCount( 0 ) + , m_bActive( sal_False ) + , m_bInplaceMenuSet( sal_False ) + , m_bDockingInProgress( sal_False ) + , m_bMenuVisible( sal_True ) + , m_bComponentAttached( sal_False ) + , m_bDoLayout( sal_False ) + , m_bVisible( sal_True ) + , m_bParentWindowVisible( sal_False ) + , m_bMustDoLayout( sal_True ) + , m_bAutomaticToolbars( sal_True ) + , m_bStoreWindowState( sal_False ) + , m_bHideCurrentUI( false ) + , m_bGlobalSettings( sal_False ) + , m_bPreserveContentSize( false ) + , m_bMenuBarCloser( sal_False ) + , m_pInplaceMenuBar( NULL ) + , m_xModuleManager( Reference< XModuleManager >( xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY )) + , m_xUIElementFactoryManager( Reference< ui::XUIElementFactory >( xServiceManager->createInstance( SERVICENAME_UIELEMENTFACTORYMANAGER ), UNO_QUERY )) - , m_bMenuBarCloser( sal_False ) - , m_xPersistentWindowStateSupplier( Reference< XNameAccess >( + , m_xPersistentWindowStateSupplier( Reference< XNameAccess >( xServiceManager->createInstance( SERVICENAME_WINDOWSTATECONFIGURATION ), UNO_QUERY )) - , m_pGlobalSettings( 0 ) - , m_aCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "custom_" )) - , m_aFullCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/custom_" )) - , m_aFullAddonTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )) - , m_aStatusBarAlias( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" )) - , m_aProgressBarAlias( RTL_CONSTASCII_USTRINGPARAM( "private:resource/progressbar/progressbar" )) - , m_aPropDocked( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKED )) - , m_aPropVisible( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_VISIBLE )) - , m_aPropDockingArea( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKINGAREA )) - , m_aPropDockPos( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKPOS )) - , m_aPropPos( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_POS )) - , m_aPropSize( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_SIZE )) - , m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_UINAME )) - , m_aPropStyle( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_STYLE )) - , m_aPropLocked( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_LOCKED )) - , m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )) - , m_pAddonOptions( 0 ) - , m_aListenerContainer( m_aLock.getShareableOslMutex() ) - , m_pPanelManager( 0 ) - , m_pToolbarManager( 0 ) + , m_pGlobalSettings( 0 ) + , m_aStatusBarAlias( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" )) + , m_aProgressBarAlias( RTL_CONSTASCII_USTRINGPARAM( "private:resource/progressbar/progressbar" )) + , m_aPropDocked( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKED )) + , m_aPropVisible( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_VISIBLE )) + , m_aPropDockingArea( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKINGAREA )) + , m_aPropDockPos( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKPOS )) + , m_aPropPos( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_POS )) + , m_aPropSize( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_SIZE )) + , m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_UINAME )) + , m_aPropStyle( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_STYLE )) + , m_aPropLocked( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_LOCKED )) + , m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )) + , m_aListenerContainer( m_aLock.getShareableOslMutex() ) + , m_pPanelManager( 0 ) + , m_pToolbarManager( 0 ) { // Initialize statusbar member const sal_Bool bRefreshVisibility = sal_False; m_aStatusBarElement.m_aType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "statusbar" )); m_aStatusBarElement.m_aName = m_aStatusBarAlias; - m_pMiscOptions = new SvtMiscOptions(); m_pToolbarManager = new ToolbarLayoutManager( xServiceManager, m_xUIElementFactoryManager, this ); - m_xToolbarManager = uno::Reference< awt::XDockableWindowListener >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY ); + m_xToolbarManager = uno::Reference< lang::XComponent >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY ); - m_pMiscOptions->AddListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - m_eSymbolsSize = m_pMiscOptions->GetSymbolsSize(); - m_eSymbolsStyle = m_pMiscOptions->GetCurrentSymbolsStyle(); m_aAsyncLayoutTimer.SetTimeout( 50 ); m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) ); registerProperty( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, ::getCppuType( &m_bAutomaticToolbars ) ); - registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, css::beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, ::getCppuType( &m_bHideCurrentUI ) ); - registerProperty( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY, &m_nLockCount, getCppuType( &m_nLockCount ) ); - registerProperty( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, css::beans::PropertyAttribute::TRANSIENT, &m_bMenuBarCloser, ::getCppuType( &m_bMenuBarCloser ) ); - registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, css::beans::PropertyAttribute::TRANSIENT, ::getCppuType( &bRefreshVisibility ), &bRefreshVisibility ); - registerProperty( LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, css::beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, ::getCppuType( &m_bPreserveContentSize ) ); + registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, ::getCppuType( &m_bHideCurrentUI ) ); + registerProperty( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, beans::PropertyAttribute::TRANSIENT | beans::PropertyAttribute::READONLY, &m_nLockCount, getCppuType( &m_nLockCount ) ); + registerProperty( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, beans::PropertyAttribute::TRANSIENT, &m_bMenuBarCloser, ::getCppuType( &m_bMenuBarCloser ) ); + registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, beans::PropertyAttribute::TRANSIENT, ::getCppuType( &bRefreshVisibility ), &bRefreshVisibility ); + registerProperty( LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, ::getCppuType( &m_bPreserveContentSize ) ); } LayoutManager::~LayoutManager() { Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - if ( m_pMiscOptions ) - { - m_pMiscOptions->RemoveListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); - delete m_pMiscOptions; - m_pMiscOptions = 0; - } m_aAsyncLayoutTimer.Stop(); } @@ -246,18 +220,15 @@ void LayoutManager::impl_clearUpMenuBar() { vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { + SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); + if ( pSysWindow ) + { MenuBar* pSetMenuBar = 0; - if ( m_xInplaceMenuBar.is() ) + if ( m_xInplaceMenuBar.is() ) pSetMenuBar = (MenuBar *)m_pInplaceMenuBar->GetMenuBar(); else { - Reference< css::awt::XMenuBar > xMenuBar; + Reference< awt::XMenuBar > xMenuBar; Reference< XPropertySet > xPropSet( m_xMenuBar, UNO_QUERY ); if ( xPropSet.is() ) @@ -266,10 +237,10 @@ void LayoutManager::impl_clearUpMenuBar() { xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar; } - catch ( com::sun::star::beans::UnknownPropertyException ) + catch ( beans::UnknownPropertyException ) { } - catch ( com::sun::star::lang::WrappedTargetException ) + catch ( lang::WrappedTargetException ) { } } @@ -279,9 +250,9 @@ void LayoutManager::impl_clearUpMenuBar() pSetMenuBar = (MenuBar*)pAwtMenuBar->GetMenu(); } - MenuBar* pTopMenuBar = ((SystemWindow *)pWindow)->GetMenuBar(); - if ( pSetMenuBar == pTopMenuBar ) - ((SystemWindow *)pWindow)->SetMenuBar( 0 ); + MenuBar* pTopMenuBar = pSysWindow->GetMenuBar(); + if ( pSetMenuBar == pTopMenuBar ) + pSysWindow->SetMenuBar( 0 ); } } @@ -302,22 +273,15 @@ void LayoutManager::impl_clearUpMenuBar() void LayoutManager::implts_lock() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); ++m_nLockCount; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } sal_Bool LayoutManager::implts_unlock() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - --m_nLockCount; - if ( m_nLockCount < 0 ) - m_nLockCount = 0; + m_nLockCount = std::max( --m_nLockCount, static_cast(0) ); return ( m_nLockCount == 0 ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } void LayoutManager::implts_reset( sal_Bool bAttached ) @@ -325,14 +289,16 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); Reference< XFrame > xFrame = m_xFrame; - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); Reference< XUIConfiguration > xModuleCfgMgr( m_xModuleCfgMgr, UNO_QUERY ); Reference< XUIConfiguration > xDocCfgMgr( m_xDocCfgMgr, UNO_QUERY ); Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); Reference< XMultiServiceFactory > xServiceManager( m_xSMGR ); Reference< XNameAccess > xPersistentWindowStateSupplier( m_xPersistentWindowStateSupplier ); + Reference< awt::XWindowListener > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); ::rtl::OUString aModuleIdentifier( m_aModuleIdentifier ); - sal_Bool bAutomaticToolbars( m_bAutomaticToolbars ); + bool bAutomaticToolbars( m_bAutomaticToolbars ); aReadLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -467,7 +433,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_xModel = xModel; - m_aDockingArea = css::awt::Rectangle(); + m_aDockingArea = awt::Rectangle(); m_bComponentAttached = bAttached; m_aModuleIdentifier = aModuleIdentifier; m_xModuleCfgMgr = xModCfgMgr; @@ -477,17 +443,23 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + // reset/notify toolbar layout manager + if ( pToolbarManager ) + { if ( bAttached ) { - m_pToolbarManager->attach( xFrame, xModCfgMgr, xDokCfgMgr, xPersistentWindowState ); - css::uno::Reference< css::awt::XWindowPeer > xParent( xContainerWindow, UNO_QUERY ); - m_pToolbarManager->setParentWindow( xParent ); + pToolbarManager->attach( xFrame, xModCfgMgr, xDokCfgMgr, xPersistentWindowState ); + uno::Reference< awt::XWindowPeer > xParent( xContainerWindow, UNO_QUERY ); + pToolbarManager->setParentWindow( xParent ); + if ( bAutomaticToolbars ) + pToolbarManager->createStaticToolbars(); } else { - m_pToolbarManager->reset(); + pToolbarManager->reset(); implts_destroyElements(); } + } } implts_unlock(); @@ -495,15 +467,12 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) sal_Bool LayoutManager::implts_isEmbeddedLayoutManager() const { - // check if this layout manager is currently using the embedded feature - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); Reference< XFrame > xFrame = m_xFrame; - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - Reference< css::awt::XWindow > xFrameContainerWindow = xFrame->getContainerWindow(); + Reference< awt::XWindow > xFrameContainerWindow = xFrame->getContainerWindow(); if ( xFrameContainerWindow == xContainerWindow ) return sal_False; else @@ -512,20 +481,13 @@ sal_Bool LayoutManager::implts_isEmbeddedLayoutManager() const void LayoutManager::implts_destroyElements() { - UIElementVector aUIElementVector; - WriteGuard aWriteLock( m_aLock ); - aUIElementVector = m_aUIElements; - m_aUIElements.clear(); + uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; aWriteLock.unlock(); - UIElementVector::iterator pIter; - for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) - { - Reference< XComponent > xComponent( pIter->m_xUIElement, UNO_QUERY ); - if ( xComponent.is() ) - xComponent->dispose(); - } + if ( pToolbarManager ) + pToolbarManager->destroyToolbars(); implts_destroyStatusBar(); @@ -536,191 +498,61 @@ void LayoutManager::implts_destroyElements() void LayoutManager::implts_toggleFloatingUIElementsVisibility( sal_Bool bActive ) { - WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIter; - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); - if ( xDockWindow.is() && xWindow.is() ) - { - sal_Bool bVisible( sal_True ); - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - bVisible = pWindow->IsVisible(); + uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); - if ( xDockWindow->isFloating() ) - { - if ( bActive ) - { - if ( !bVisible && pIter->m_bDeactiveHide ) - { - pIter->m_bDeactiveHide = sal_False; - // we need VCL here to pass special flags to Show() - if( pWindow ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - //xWindow->setVisible( sal_True ); - } - } - else - { - if ( bVisible ) - { - pIter->m_bDeactiveHide = sal_True; - xWindow->setVisible( sal_False ); - } - } - } - } - } - } + if ( pToolbarManager ) + pToolbarManager->setFloatingToolbarsVisibility( bActive ); } -sal_Bool LayoutManager::implts_findElement( const rtl::OUString& aName, rtl::OUString& aElementType, rtl::OUString& aElementName, Reference< XUIElement >& xUIElement ) +uno::Reference< ui::XUIElement > LayoutManager::implts_findElement( const rtl::OUString& aName ) { - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - ReadGuard aReadLock( m_aLock ); - xUIElement = m_xMenuBar; - return sal_True; - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - ReadGuard aReadLock( m_aLock ); - xUIElement = m_aStatusBarElement.m_xUIElement; - return sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) - { - ReadGuard aReadLock( m_aLock ); - xUIElement = m_aProgressBarElement.m_xUIElement; - return sal_True; - } - else - { - UIElementVector::const_iterator pIter; + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName ) - { - xUIElement = pIter->m_xUIElement; - return sal_True; - } - } - } - } + parseResourceURL( aName, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + return m_xMenuBar; + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == aName )) + return m_aStatusBarElement.m_xUIElement; + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) + return m_aProgressBarElement.m_xUIElement; - return sal_False; -} - -sal_Bool LayoutManager::implts_findElement( const Reference< XInterface >& xUIElement, UIElement& aElementData ) -{ - UIElementVector::const_iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - { - Reference< XInterface > xIfac( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xIfac == xUIElement ) - { - aElementData = *pIter; - return sal_True; - } - } - } - - return sal_False; -} - -sal_Bool LayoutManager::implts_findElement( const rtl::OUString& aName, UIElement& aElementData ) -{ - UIElementVector::const_iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName ) - { - aElementData = *pIter; - return sal_True; - } - } - - return sal_False; + return uno::Reference< ui::XUIElement >(); } UIElement& LayoutManager::impl_findElement( const rtl::OUString& aName ) { static UIElement aEmptyElement; - UIElementVector::iterator pIter; + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName ) - return *pIter; - } + parseResourceURL( aName, aElementType, aElementName ); + if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == aName )) + return m_aStatusBarElement; + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) + return m_aProgressBarElement; return aEmptyElement; } -sal_Bool LayoutManager::implts_insertUIElement( const UIElement& rUIElement ) +void LayoutManager::implts_writeNewStateData( const rtl::OUString aName, const Reference< awt::XWindow >& xWindow ) { - UIElement aTempData; - bool bFound = implts_findElement( rUIElement.m_aName, aTempData ); - -#ifdef DBG_UTIL - if ( bFound ) - { - char aBuffer[256]; - const sal_Int32 MAX_NAME_LENGTH = 128; - ::rtl::OString aName = ::rtl::OUStringToOString( rUIElement.m_aName, RTL_TEXTENCODING_ASCII_US ); - aName = aName.copy( ::std::min( MAX_NAME_LENGTH, aName.getLength() )); - sprintf( aBuffer, "Try to insert an already existing user interface element (%s) into the list\n", aName.getStr() ); - DBG_ASSERT( bFound, aBuffer ); - } -#endif - - bool bResult( false ); - if ( !bFound ) - { - WriteGuard aWriteLock( m_aLock ); - m_aUIElements.push_back( rUIElement ); - bResult = true; - } - return bResult; -} - -void LayoutManager::implts_writeNewStateData( const rtl::OUString aName, const Reference< css::awt::XWindow >& xWindow ) -{ - css::awt::Rectangle aPos; - css::awt::Size aSize; + awt::Rectangle aPos; + awt::Size aSize; sal_Bool bVisible( sal_False ); sal_Bool bFloating( sal_True ); if ( xWindow.is() ) { - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); if ( xDockWindow.is() ) bFloating = xDockWindow->isFloating(); - Reference< css::awt::XWindow2 > xWindow2( xWindow, UNO_QUERY ); + Reference< awt::XWindow2 > xWindow2( xWindow, UNO_QUERY ); if( xWindow2.is() ) { aPos = xWindow2->getPosSize(); @@ -747,52 +579,6 @@ void LayoutManager::implts_writeNewStateData( const rtl::OUString aName, const R aWriteLock.unlock(); } -void LayoutManager::implts_refreshContextToolbarsVisibility() -{ - std::vector< UIElementVisibility > aToolbarVisibleVector; - - ReadGuard aReadLock( m_aLock ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - if ( !m_bVisible || !m_bAutomaticToolbars ) - return; - - UIElementVisibility aUIElementVisible; - - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aType.equalsAsciiL( "toolbar", 7 )) - { - aUIElementVisible.aName = pIter->m_aName; - aUIElementVisible.bVisible = pIter->m_bVisible; - aToolbarVisibleVector.push_back( aUIElementVisible ); - } - } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - aReadLock.unlock(); - - UIElement aUIElement; - const sal_uInt32 nCount = aToolbarVisibleVector.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - UIElementVisibility& rToolbar = aToolbarVisibleVector[i]; - - sal_Bool bVisible = rToolbar.bVisible; - if ( implts_readWindowStateData( rToolbar.aName, aUIElement ) && - aUIElement.m_bVisible != bVisible ) - { - WriteGuard aWriteLock( m_aLock ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - UIElement& rUIElement = impl_findElement( rToolbar.aName ); - - if ( rUIElement.m_aName == rToolbar.aName ) - rUIElement.m_bVisible = aUIElement.m_bVisible; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - aWriteLock.unlock(); - } - } -} - sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ) { sal_Bool bGetSettingsState( sal_False ); @@ -834,13 +620,13 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, } else if ( aWindowState[n].Name == m_aPropDockingArea ) { - ::com::sun::star::ui::DockingArea eDockingArea; + ui::DockingArea eDockingArea; if ( aWindowState[n].Value >>= eDockingArea ) rElementData.m_aDockedData.m_nDockedArea = sal_Int16( eDockingArea ); } else if ( aWindowState[n].Name == m_aPropDockPos ) { - css::awt::Point aPoint; + awt::Point aPoint; if ( aWindowState[n].Value >>= aPoint ) { rElementData.m_aDockedData.m_aPos.X() = aPoint.X; @@ -849,7 +635,7 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, } else if ( aWindowState[n].Name == m_aPropPos ) { - css::awt::Point aPoint; + awt::Point aPoint; if ( aWindowState[n].Value >>= aPoint ) { rElementData.m_aFloatingData.m_aPos.X() = aPoint.X; @@ -858,7 +644,7 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, } else if ( aWindowState[n].Name == m_aPropSize ) { - css::awt::Size aSize; + awt::Size aSize; if ( aWindowState[n].Value >>= aSize ) { rElementData.m_aFloatingData.m_aSize.Width() = aSize.Width; @@ -910,7 +696,7 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, m_bGlobalSettings = sal_True; aWriteLock2.unlock(); - css::uno::Any aValue; + uno::Any aValue; sal_Bool bValue = sal_Bool(); if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR, GlobalSettings::STATEINFO_LOCKED, @@ -954,12 +740,12 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con // Check persistent flag of the user interface element xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" ))) >>= bPersistent; } - catch ( com::sun::star::beans::UnknownPropertyException ) + catch ( beans::UnknownPropertyException ) { // Non-configurable elements should at least store their dimension/position bPersistent = sal_True; } - catch ( com::sun::star::lang::WrappedTargetException ) + catch ( lang::WrappedTargetException ) { } } @@ -970,34 +756,34 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con { Sequence< PropertyValue > aWindowState( 8 ); - aWindowState[0].Name = m_aPropDocked; - aWindowState[0].Value = makeAny( sal_Bool( !rElementData.m_bFloating )); - aWindowState[1].Name = m_aPropVisible; - aWindowState[1].Value = makeAny( sal_Bool( rElementData.m_bVisible )); + aWindowState[0].Name = m_aPropDocked; + aWindowState[0].Value = makeAny( sal_Bool( !rElementData.m_bFloating )); + aWindowState[1].Name = m_aPropVisible; + aWindowState[1].Value = makeAny( sal_Bool( rElementData.m_bVisible )); - aWindowState[2].Name = m_aPropDockingArea; - aWindowState[2].Value = makeAny( static_cast< DockingArea >( rElementData.m_aDockedData.m_nDockedArea ) ); + aWindowState[2].Name = m_aPropDockingArea; + aWindowState[2].Value = makeAny( static_cast< DockingArea >( rElementData.m_aDockedData.m_nDockedArea ) ); - css::awt::Point aPos; + awt::Point aPos; aPos.X = rElementData.m_aDockedData.m_aPos.X(); aPos.Y = rElementData.m_aDockedData.m_aPos.Y(); - aWindowState[3].Name = m_aPropDockPos; - aWindowState[3].Value <<= aPos; + aWindowState[3].Name = m_aPropDockPos; + aWindowState[3].Value <<= aPos; aPos.X = rElementData.m_aFloatingData.m_aPos.X(); aPos.Y = rElementData.m_aFloatingData.m_aPos.Y(); - aWindowState[4].Name = m_aPropPos; - aWindowState[4].Value <<= aPos; + aWindowState[4].Name = m_aPropPos; + aWindowState[4].Value <<= aPos; - css::awt::Size aSize; + awt::Size aSize; aSize.Width = rElementData.m_aFloatingData.m_aSize.Width(); aSize.Height = rElementData.m_aFloatingData.m_aSize.Height(); - aWindowState[5].Name = m_aPropSize; - aWindowState[5].Value <<= aSize; - aWindowState[6].Name = m_aPropUIName; - aWindowState[6].Value = makeAny( rElementData.m_aUIName ); - aWindowState[7].Name = m_aPropLocked; - aWindowState[7].Value = makeAny( rElementData.m_aDockedData.m_bLocked ); + aWindowState[5].Name = m_aPropSize; + aWindowState[5].Value <<= aSize; + aWindowState[6].Name = m_aPropUIName; + aWindowState[6].Value = makeAny( rElementData.m_aUIName ); + aWindowState[7].Name = m_aPropLocked; + aWindowState[7].Value = makeAny( rElementData.m_aDockedData.m_bLocked ); if ( xPersistentWindowState->hasByName( aName )) { @@ -1023,47 +809,25 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con ::Size LayoutManager::implts_getContainerWindowOutputSize() { - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - ::Size aContainerWinSize; + ::Size aContainerWinSize; Window* pContainerWindow( 0 ); + + ReadGuard aReadLock( m_aLock ); + Reference< awt::XWindow > xContainerWindow = m_xContainerWindow; aReadLock.unlock(); // Retrieve output size from container Window vos::OGuard aGuard( Application::GetSolarMutex() ); pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); if ( pContainerWindow ) - return pContainerWindow->GetOutputSizePixel(); - else - return ::Size(); -} + aContainerWinSize = pContainerWindow->GetOutputSizePixel(); -void LayoutManager::implts_sortUIElements() -{ - WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIterStart = m_aUIElements.begin(); - UIElementVector::iterator pIterEnd = m_aUIElements.end(); - - std::stable_sort( pIterStart, pIterEnd ); // first created element should first - - // We have to reset our temporary flags. - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - // why check, just set it to false - //if ( pIter->m_bUserActive ) - pIter->m_bUserActive = sal_False; - } - -#ifdef DBG_UTIL - implts_checkElementContainer(); -#endif - aWriteLock.unlock(); + return aContainerWinSize; } Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString& aName ) { - Reference< ::com::sun::star::ui::XUIElement > xUIElement; + Reference< ui::XUIElement > xUIElement; ReadGuard aReadLock( m_aLock ); Sequence< PropertyValue > aPropSeq( 2 ); @@ -1088,28 +852,22 @@ Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString void LayoutManager::implts_setVisibleState( sal_Bool bShow ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - pIter->m_bMasterHide = !bShow; m_aStatusBarElement.m_bMasterHide = !bShow; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ implts_updateUIElementsVisibleState( bShow ); - //implts_doLayout( sal_False ); } void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) { // notify listeners - css::uno::Any a; + uno::Any a; if ( bSetVisible ) - implts_notifyListeners( css::frame::LayoutManagerEvents::VISIBLE, a ); + implts_notifyListeners( frame::LayoutManagerEvents::VISIBLE, a ); else - implts_notifyListeners( css::frame::LayoutManagerEvents::INVISIBLE, a ); - std::vector< Reference< css::awt::XWindow > > aWinVector; + implts_notifyListeners( frame::LayoutManagerEvents::INVISIBLE, a ); + std::vector< Reference< awt::XWindow > > aWinVector; sal_Bool bOld; { @@ -1120,10 +878,10 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) // Hide/show menubar according to bSetVisible ReadGuard aReadLock( m_aLock ); - Reference< XUIElement > xMenuBar( m_xMenuBar, UNO_QUERY ); - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - Reference< XComponent > xInplaceMenuBar( m_xInplaceMenuBar ); - MenuBarManager* pInplaceMenuBar( m_pInplaceMenuBar ); + Reference< XUIElement > xMenuBar( m_xMenuBar, UNO_QUERY ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< XComponent > xInplaceMenuBar( m_xInplaceMenuBar ); + MenuBarManager* pInplaceMenuBar( m_pInplaceMenuBar ); aReadLock.unlock(); if (( xMenuBar.is() || xInplaceMenuBar.is() ) && xContainerWindow.is() ) @@ -1139,13 +897,9 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) pMenuBar = (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar(); } - Window* pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) + SystemWindow* pSysWindow = getTopSystemWindow( xContainerWindow ); + if ( pSysWindow ) { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; if ( bSetVisible ) pSysWindow->SetMenuBar( pMenuBar ); else @@ -1167,7 +921,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) if ( bSetVisible ) { - uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY ); + uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); if ( xThis.is() ) m_pToolbarManager->setVisible(bSetVisible); implts_doLayout_notify( sal_False ); @@ -1175,7 +929,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) else { WriteGuard aWriteLock( m_aLock ); - m_aDockingArea = css::awt::Rectangle(); + m_aDockingArea = awt::Rectangle(); m_bMustDoLayout = sal_True; aWriteLock.unlock(); } @@ -1183,38 +937,25 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) void LayoutManager::implts_setCurrentUIVisibility( sal_Bool bShow ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( !bShow && pIter->m_bVisible && pIter->m_xUIElement.is() ) - pIter->m_bMasterHide = true; - else if ( bShow && pIter->m_bMasterHide ) - pIter->m_bMasterHide = false; - } - if ( !bShow && m_aStatusBarElement.m_bVisible && m_aStatusBarElement.m_xUIElement.is() ) m_aStatusBarElement.m_bMasterHide = true; else if ( bShow && m_aStatusBarElement.m_bVisible ) m_aStatusBarElement.m_bMasterHide = false; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ implts_updateUIElementsVisibleState( bShow ); } void LayoutManager::implts_destroyStatusBar() { - Reference< XComponent > xCompStatusBar; + Reference< XComponent > xCompStatusBar; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_aStatusBarElement.m_aName = rtl::OUString(); xCompStatusBar = Reference< XComponent >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); m_aStatusBarElement.m_xUIElement.clear(); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( xCompStatusBar.is() ) xCompStatusBar->dispose(); @@ -1224,7 +965,6 @@ void LayoutManager::implts_destroyStatusBar() void LayoutManager::implts_createStatusBar( const rtl::OUString& aStatusBarName ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); if ( !m_aStatusBarElement.m_xUIElement.is() ) { @@ -1232,14 +972,13 @@ void LayoutManager::implts_createStatusBar( const rtl::OUString& aStatusBarName m_aStatusBarElement.m_aName = aStatusBarName; m_aStatusBarElement.m_xUIElement = implts_createElement( aStatusBarName ); } + aWriteLock.unlock(); implts_createProgressBar(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } void LayoutManager::implts_readStatusBarState( const rtl::OUString& rStatusBarName ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); if ( !m_aStatusBarElement.m_bStateRead ) { @@ -1247,17 +986,15 @@ void LayoutManager::implts_readStatusBarState( const rtl::OUString& rStatusBarNa if ( implts_readWindowStateData( rStatusBarName, m_aStatusBarElement )) m_aStatusBarElement.m_bStateRead = sal_True; } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } void LayoutManager::implts_createProgressBar() { - Reference< XUIElement > xStatusBar; + Reference< XUIElement > xStatusBar; Reference< XUIElement > xProgressBar; Reference< XUIElement > xProgressBarBackup; - Reference< css::awt::XWindow > xContainerWindow; + Reference< awt::XWindow > xContainerWindow; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); @@ -1265,7 +1002,6 @@ void LayoutManager::implts_createProgressBar() m_xProgressBarBackup.clear(); xContainerWindow = m_xContainerWindow; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ sal_Bool bRecycled = xProgressBarBackup.is(); ProgressBarWrapper* pWrapper = 0; @@ -1278,12 +1014,12 @@ void LayoutManager::implts_createProgressBar() if ( xStatusBar.is() ) { - Reference< css::awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); + Reference< awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); pWrapper->setStatusBar( xWindow ); } else { - Reference< css::awt::XWindow > xStatusBarWindow = pWrapper->getStatusBar(); + Reference< awt::XWindow > xStatusBarWindow = pWrapper->getStatusBar(); vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pStatusBarWnd = VCLUnoHelper::GetWindow( xStatusBarWindow ); @@ -1293,7 +1029,7 @@ void LayoutManager::implts_createProgressBar() if ( pWindow ) { StatusBar* pStatusBar = new StatusBar( pWindow, WinBits( WB_LEFT | WB_3DLOOK ) ); - Reference< css::awt::XWindow > xStatusBarWindow2( VCLUnoHelper::GetInterface( pStatusBar )); + Reference< awt::XWindow > xStatusBarWindow2( VCLUnoHelper::GetInterface( pStatusBar )); pWrapper->setStatusBar( xStatusBarWindow2, sal_True ); } } @@ -1330,7 +1066,7 @@ void LayoutManager::implts_backupProgressBarWrapper() { ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)m_xProgressBarBackup.get(); if ( pWrapper ) - pWrapper->setStatusBar( Reference< css::awt::XWindow >(), sal_False ); + pWrapper->setStatusBar( Reference< awt::XWindow >(), sal_False ); } // prevent us from dispose() the m_aProgressBarElement.m_xUIElement inside implts_reset() @@ -1351,9 +1087,9 @@ void LayoutManager::implts_destroyProgressBar() void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Size& rSize ) { - Reference< XUIElement > xStatusBar; + Reference< XUIElement > xStatusBar; Reference< XUIElement > xProgressBar; - Reference< css::awt::XWindow > xContainerWindow; + Reference< awt::XWindow > xContainerWindow; /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); @@ -1361,9 +1097,9 @@ void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Siz xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); xContainerWindow = m_xContainerWindow; - Reference< css::awt::XWindow > xWindow; + Reference< awt::XWindow > xWindow; if ( xStatusBar.is() ) - xWindow = Reference< css::awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); + xWindow = Reference< awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); else if ( xProgressBar.is() ) { ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); @@ -1390,9 +1126,9 @@ void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Siz sal_Bool LayoutManager::implts_showProgressBar() { - Reference< XUIElement > xStatusBar; + Reference< XUIElement > xStatusBar; Reference< XUIElement > xProgressBar; - Reference< css::awt::XWindow > xWindow; + Reference< awt::XWindow > xWindow; /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); @@ -1405,7 +1141,7 @@ sal_Bool LayoutManager::implts_showProgressBar() { if ( xStatusBar.is() && !m_aStatusBarElement.m_bMasterHide ) { - xWindow = Reference< css::awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); + xWindow = Reference< awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); } else if ( xProgressBar.is() ) { @@ -1415,6 +1151,7 @@ sal_Bool LayoutManager::implts_showProgressBar() } } aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); @@ -1435,7 +1172,7 @@ sal_Bool LayoutManager::implts_showProgressBar() sal_Bool LayoutManager::implts_hideProgressBar() { Reference< XUIElement > xProgressBar; - Reference< css::awt::XWindow > xWindow; + Reference< awt::XWindow > xWindow; sal_Bool bHideStatusBar( sal_False ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -1445,19 +1182,20 @@ sal_Bool LayoutManager::implts_hideProgressBar() sal_Bool bInternalStatusBar( sal_False ); if ( xProgressBar.is() ) { - Reference< css::awt::XWindow > xStatusBar; + Reference< awt::XWindow > xStatusBar; ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); if ( pWrapper ) xWindow = pWrapper->getStatusBar(); - Reference< css::ui::XUIElement > xStatusBarElement = m_aStatusBarElement.m_xUIElement; + Reference< ui::XUIElement > xStatusBarElement = m_aStatusBarElement.m_xUIElement; if ( xStatusBarElement.is() ) - xStatusBar = Reference< css::awt::XWindow >( xStatusBarElement->getRealInterface(), UNO_QUERY ); + xStatusBar = Reference< awt::XWindow >( xStatusBarElement->getRealInterface(), UNO_QUERY ); bInternalStatusBar = xStatusBar != xWindow; } m_aProgressBarElement.m_bVisible = sal_False; implts_readStatusBarState( m_aStatusBarAlias ); bHideStatusBar = !m_aStatusBarElement.m_bVisible; aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); @@ -1475,17 +1213,15 @@ sal_Bool LayoutManager::implts_hideProgressBar() sal_Bool LayoutManager::implts_showStatusBar( sal_Bool bStoreState ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - Reference< css::ui::XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; + Reference< ui::XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; if ( bStoreState ) m_aStatusBarElement.m_bVisible = sal_True; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( xStatusBar.is() ) { - Reference< css::awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); + Reference< awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); @@ -1503,17 +1239,15 @@ sal_Bool LayoutManager::implts_showStatusBar( sal_Bool bStoreState ) sal_Bool LayoutManager::implts_hideStatusBar( sal_Bool bStoreState ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - Reference< css::ui::XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; + Reference< ui::XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; if ( bStoreState ) m_aStatusBarElement.m_bVisible = sal_False; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( xStatusBar.is() ) { - Reference< css::awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); + Reference< awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); @@ -1536,19 +1270,19 @@ void LayoutManager::implts_setOffset( const sal_Int32 nBottomOffset ) aOffsetRect.setHeight( nBottomOffset ); // make sure that the toolbar manager refernence/pointer is valid - uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY ); + uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); if ( xThis.is() ) m_pToolbarManager->setDockingAreaOffsets( aOffsetRect ); } void LayoutManager::implts_setInplaceMenuBar( const Reference< XIndexAccess >& xMergedMenuBar ) -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - if ( !m_bInplaceMenuSet ) - { + if ( !m_bInplaceMenuSet ) + { vos::OGuard aGuard( Application::GetSolarMutex() ); // Reset old inplace menubar! @@ -1558,8 +1292,7 @@ throw (::com::sun::star::uno::RuntimeException) m_xInplaceMenuBar.clear(); m_bInplaceMenuSet = sal_False; - if ( m_xFrame.is() && - m_xContainerWindow.is() ) + if ( m_xFrame.is() && m_xContainerWindow.is() ) { rtl::OUString aModuleIdentifier; Reference< XDispatchProvider > xDispatchProvider; @@ -1568,15 +1301,9 @@ throw (::com::sun::star::uno::RuntimeException) m_pInplaceMenuBar = new MenuBarManager( m_xSMGR, m_xFrame, m_xURLTransformer,xDispatchProvider, aModuleIdentifier, pMenuBar, sal_True, sal_True ); m_pInplaceMenuBar->SetItemContainer( xMergedMenuBar ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; + SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); + if ( pSysWindow ) pSysWindow->SetMenuBar( pMenuBar ); - } m_bInplaceMenuSet = sal_True; m_xInplaceMenuBar = Reference< XComponent >( (OWeakObject *)m_pInplaceMenuBar, UNO_QUERY ); @@ -1584,15 +1311,15 @@ throw (::com::sun::star::uno::RuntimeException) aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + implts_updateMenuBarClose(); } - } void LayoutManager::implts_resetInplaceMenuBar() -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_bInplaceMenuSet = sal_False; @@ -1601,13 +1328,9 @@ throw (::com::sun::star::uno::RuntimeException) { vos::OGuard aGuard( Application::GetSolarMutex() ); MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, m_xMenuBar.get() ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) + SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); + if ( pSysWindow ) { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; if ( pMenuBarWrapper ) pSysWindow->SetMenuBar( (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar() ); else @@ -1620,19 +1343,14 @@ throw (::com::sun::star::uno::RuntimeException) if ( m_xInplaceMenuBar.is() ) m_xInplaceMenuBar->dispose(); m_xInplaceMenuBar.clear(); - - aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } void SAL_CALL LayoutManager::attachFrame( const Reference< XFrame >& xFrame ) -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_xFrame = xFrame; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } void SAL_CALL LayoutManager::reset() @@ -1640,7 +1358,6 @@ throw (RuntimeException) { sal_Bool bComponentAttached( sal_False ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); bComponentAttached = m_bComponentAttached; aReadLock.unlock(); @@ -1649,13 +1366,13 @@ throw (RuntimeException) } void SAL_CALL LayoutManager::setInplaceMenuBar( sal_Int64 ) -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { OSL_ENSURE( sal_False, "This method is obsolete and should not be used!\n" ); } void SAL_CALL LayoutManager::resetInplaceMenuBar() -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { OSL_ENSURE( sal_False, "This method is obsolete and should not be used!\n" ); } @@ -1665,45 +1382,42 @@ throw (::com::sun::star::uno::RuntimeException) //--------------------------------------------------------------------------------------------------------- sal_Bool SAL_CALL LayoutManager::setMergedMenuBar( const Reference< XIndexAccess >& xMergedMenuBar ) -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { implts_setInplaceMenuBar( xMergedMenuBar ); - css::uno::Any a; - implts_notifyListeners( css::frame::LayoutManagerEvents::MERGEDMENUBAR, a ); + uno::Any a; + implts_notifyListeners( frame::LayoutManagerEvents::MERGEDMENUBAR, a ); return sal_True; } void SAL_CALL LayoutManager::removeMergedMenuBar() -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { implts_resetInplaceMenuBar(); } -::com::sun::star::awt::Rectangle SAL_CALL LayoutManager::getCurrentDockingArea() +awt::Rectangle SAL_CALL LayoutManager::getCurrentDockingArea() throw ( RuntimeException ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); return m_aDockingArea; } Reference< XDockingAreaAcceptor > SAL_CALL LayoutManager::getDockingAreaAcceptor() -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); return m_xDockingAreaAcceptor; } -void SAL_CALL LayoutManager::setDockingAreaAcceptor( const Reference< ::com::sun::star::ui::XDockingAreaAcceptor >& xDockingAreaAcceptor ) +void SAL_CALL LayoutManager::setDockingAreaAcceptor( const Reference< ui::XDockingAreaAcceptor >& xDockingAreaAcceptor ) throw ( RuntimeException ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - if (( m_xDockingAreaAcceptor == xDockingAreaAcceptor ) || - !m_xFrame.is() ) + if (( m_xDockingAreaAcceptor == xDockingAreaAcceptor ) || !m_xFrame.is() ) return; // IMPORTANT: Be sure to stop layout timer if don't have a docking area acceptor! @@ -1711,7 +1425,10 @@ throw ( RuntimeException ) m_aAsyncLayoutTimer.Stop(); sal_Bool bAutomaticToolbars( m_bAutomaticToolbars ); - std::vector< Reference< css::awt::XWindow > > oldDockingAreaWindows; + std::vector< Reference< awt::XWindow > > oldDockingAreaWindows; + + uno::Reference< lang::XComponent > xToolbarManager( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; if ( !xDockingAreaAcceptor.is() ) m_aAsyncLayoutTimer.Stop(); @@ -1719,12 +1436,13 @@ throw ( RuntimeException ) // Remove listener from old docking area acceptor if ( m_xDockingAreaAcceptor.is() ) { - Reference< css::awt::XWindow > xWindow( m_xDockingAreaAcceptor->getContainerWindow() ); + Reference< awt::XWindow > xWindow( m_xDockingAreaAcceptor->getContainerWindow() ); if ( xWindow.is() && ( m_xFrame->getContainerWindow() != m_xContainerWindow || !xDockingAreaAcceptor.is() ) ) - xWindow->removeWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); + xWindow->removeWindowListener( Reference< awt::XWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); - m_aDockingArea = css::awt::Rectangle(); - m_pToolbarManager->reset(); + m_aDockingArea = awt::Rectangle(); + if ( pToolbarManager ) + pToolbarManager->reset(); Window* pContainerWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pContainerWindow ) @@ -1735,18 +1453,18 @@ throw ( RuntimeException ) m_pPanelManager = NULL; } - Reference< ::com::sun::star::ui::XDockingAreaAcceptor > xOldDockingAreaAcceptor( m_xDockingAreaAcceptor ); + Reference< ui::XDockingAreaAcceptor > xOldDockingAreaAcceptor( m_xDockingAreaAcceptor ); m_xDockingAreaAcceptor = xDockingAreaAcceptor; if ( m_xDockingAreaAcceptor.is() ) { - m_aDockingArea = css::awt::Rectangle(); + m_aDockingArea = awt::Rectangle(); m_xContainerWindow = m_xDockingAreaAcceptor->getContainerWindow(); m_xContainerTopWindow.set( m_xContainerWindow, UNO_QUERY ); - m_xContainerWindow->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + m_xContainerWindow->addWindowListener( Reference< awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); // we always must keep a connection to the window of our frame for resize events if ( m_xContainerWindow != m_xFrame->getContainerWindow() ) - m_xFrame->getContainerWindow()->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); + m_xFrame->getContainerWindow()->addWindowListener( Reference< awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); // #i37884# set initial visibility state - in the plugin case the container window is already shown // and we get no notification anymore @@ -1757,8 +1475,8 @@ throw ( RuntimeException ) m_bParentWindowVisible = pContainerWindow->IsVisible(); } - css::uno::Reference< css::awt::XWindowPeer > xParent( m_xContainerWindow, UNO_QUERY ); - m_pToolbarManager->setParentWindow( xParent ); + uno::Reference< awt::XWindowPeer > xParent( m_xContainerWindow, UNO_QUERY ); + pToolbarManager->setParentWindow( xParent ); // create new panel manager m_pPanelManager = new PanelManager( m_xSMGR, m_xFrame ); @@ -1766,7 +1484,7 @@ throw ( RuntimeException ) } aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( xDockingAreaAcceptor.is() ) { @@ -1786,47 +1504,35 @@ throw ( RuntimeException ) if ( !oldDockingAreaWindows.empty() ) { // Reset docking area size for our old docking area acceptor - css::awt::Rectangle aEmptyRect; + awt::Rectangle aEmptyRect; xOldDockingAreaAcceptor->setDockingAreaSpace( aEmptyRect ); } if ( xDockingAreaAcceptor.is() ) { if ( bAutomaticToolbars ) - m_pToolbarManager->createToolbars(); - implts_sortUIElements(); + { + lock(); + pToolbarManager->createStaticToolbars(); + unlock(); + } implts_doLayout( sal_True, sal_False ); } } void LayoutManager::implts_reparentChildWindows() { - UIElementVector aUIElementVector; - UIElement aStatusBarElement; - css::uno::Reference< css::awt::XWindow > xTopDockWindow; - css::uno::Reference< css::awt::XWindow > xBottomDockWindow; - css::uno::Reference< css::awt::XWindow > xLeftDockWindow; - css::uno::Reference< css::awt::XWindow > xRightDockWindow; - css::uno::Reference< css::awt::XWindow > xContainerWindow; - css::uno::Reference< css::awt::XWindow > xStatusBarWindow; - WriteGuard aWriteLock( m_aLock ); - aUIElementVector = m_aUIElements; - xTopDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - xBottomDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; - xLeftDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - xRightDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; - xContainerWindow = m_xContainerWindow; - aStatusBarElement = m_aStatusBarElement; + UIElement aStatusBarElement = m_aStatusBarElement; + uno::Reference< awt::XWindow > xContainerWindow = m_xContainerWindow; aWriteLock.unlock(); + uno::Reference< awt::XWindow > xStatusBarWindow; if ( aStatusBarElement.m_xUIElement.is() ) { try { - xStatusBarWindow = Reference< css::awt::XWindow >( - aStatusBarElement.m_xUIElement->getRealInterface(), - UNO_QUERY ); + xStatusBarWindow = Reference< awt::XWindow >( aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY ); } catch ( RuntimeException& ) { @@ -1837,65 +1543,16 @@ void LayoutManager::implts_reparentChildWindows() } } - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - Window* pTopDockWindow = VCLUnoHelper::GetWindow( xTopDockWindow ); - Window* pBottomDockWindow = VCLUnoHelper::GetWindow( xBottomDockWindow ); - Window* pLeftDockWindow = VCLUnoHelper::GetWindow( xLeftDockWindow ); - Window* pRightDockWindow = VCLUnoHelper::GetWindow( xRightDockWindow ); - if ( pContainerWindow ) + if ( xStatusBarWindow.is() ) { - UIElementVector::iterator pIter; - for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) - { - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow; - try - { - // We have to retreive the window reference with try/catch as it is - // possible that all elements has been disposed! - xWindow = Reference< css::awt::XWindow >( xUIElement->getRealInterface(), UNO_QUERY ); - } - catch ( RuntimeException& ) - { - throw; - } - catch ( Exception& ) - { - } - - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - // Reparent our child windows acording to their current state. - if ( pIter->m_bFloating ) - pWindow->SetParent( pContainerWindow ); - else - { - if ( pIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_TOP ) - pWindow->SetParent( pTopDockWindow ); - else if ( pIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) - pWindow->SetParent( pBottomDockWindow ); - else if ( pIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_LEFT ) - pWindow->SetParent( pLeftDockWindow ); - else - pWindow->SetParent( pRightDockWindow ); - } - } - } - } - - if ( xStatusBarWindow.is() ) - { - Window* pWindow = VCLUnoHelper::GetWindow( xStatusBarWindow ); - if ( pWindow ) - pWindow->SetParent( pContainerWindow ); - } - - implts_resetMenuBar(); + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + Window* pWindow = VCLUnoHelper::GetWindow( xStatusBarWindow ); + if ( pWindow && pContainerWindow ) + pWindow->SetParent( pContainerWindow ); } + + implts_resetMenuBar(); } uno::Reference< ui::XUIElement > LayoutManager::implts_createDockingWindow( const ::rtl::OUString& aElementName ) @@ -1906,91 +1563,17 @@ uno::Reference< ui::XUIElement > LayoutManager::implts_createDockingWindow( cons IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) { - // To enable toolbar controllers to change their image when a sub-toolbar function - // is activated, we need this mechanism. We have NO connection between these toolbars - // anymore! - if ( pEvent && pEvent->ISA( VclWindowEvent )) - { - if ( pEvent->GetId() == VCLEVENT_TOOLBOX_SELECT ) - { - Window* pWindow( ((VclWindowEvent*)pEvent)->GetWindow() ); - ToolBox* pToolBox( 0 ); - rtl::OUString aToolbarName; - rtl::OUString aCommand; + long nResult( 1 ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - pToolBox = (ToolBox *)pWindow; - aToolbarName = pToolBox->GetSmartHelpId().GetStr(); - sal_Int32 i = aToolbarName.lastIndexOf( ':' ); - if (( aToolbarName.getLength() > 0 ) && - ( i > 0 ) && (( i+ 1 ) < aToolbarName.getLength() )) - { - // Remove ".HelpId:" protocol from toolbar name - aToolbarName = aToolbarName.copy( i+1 ); + ReadGuard aReadLock( m_aLock ); + uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); + aReadLock.unlock(); - USHORT nId = pToolBox->GetCurItemId(); - if ( nId > 0 ) - aCommand = pToolBox->GetItemCommand( nId ); - } - } + if ( pToolbarManager ) + nResult = pToolbarManager->childWindowEvent( pEvent ); - if (( aToolbarName.getLength() > 0 ) && ( aCommand.getLength() > 0 )) - { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - std::vector< css::uno::Reference< css::ui::XUIFunctionListener > > aListenerArray; - UIElementVector::iterator pIter; - - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aType.equalsAscii( "toolbar" ) && - pIter->m_xUIElement.is() ) - { - css::uno::Reference< css::ui::XUIFunctionListener > xListener( pIter->m_xUIElement, UNO_QUERY ); - if ( xListener.is() ) - aListenerArray.push_back( xListener ); - } - } - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - const sal_uInt32 nCount = aListenerArray.size(); - for ( sal_uInt32 i = 0; i < nCount; ++i ) - { - try - { - aListenerArray[i]->functionExecute( aToolbarName, aCommand ); - } - catch ( RuntimeException& e ) - { - throw e; - } - catch ( Exception& ) {} - } - } - } - else if ( pEvent->GetId() == VCLEVENT_TOOLBOX_FORMATCHANGED ) - { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - - Window* pWindow( ((VclWindowEvent*)pEvent)->GetWindow() ); - ToolBox* pToolBox( 0 ); - rtl::OUString aToolbarName; - - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - pToolBox = (ToolBox *)pWindow; - aToolbarName = pToolBox->GetSmartHelpId().GetStr(); - if (( aToolbarName.getLength() > 0 ) && ( m_nLockCount == 0 )) - m_aAsyncLayoutTimer.Start(); - } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - } - } - - return 1; + return nResult; } void SAL_CALL LayoutManager::createElement( const ::rtl::OUString& aName ) @@ -1998,13 +1581,11 @@ throw (RuntimeException) { RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::createElement" ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); Reference< XFrame > xFrame = m_xFrame; Reference< XURLTransformer > xURLTransformer = m_xURLTransformer; sal_Bool bInPlaceMenu = m_bInplaceMenuSet; aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( !xFrame.is() ) return; @@ -2022,15 +1603,12 @@ throw (RuntimeException) ::rtl::OUString aElementType; ::rtl::OUString aElementName; - impl_parseResourceURL( aName, aElementType, aElementName ); + parseResourceURL( aName, aElementType, aElementName ); - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR ) && m_pToolbarManager != NULL ) { - if ( m_pToolbarManager != NULL ) - { - bNotify = m_pToolbarManager->createToolbar( aName ); - bMustBeLayouted = m_pToolbarManager->isLayoutDirty(); - } + bNotify = m_pToolbarManager->createToolbar( aName ); + bMustBeLayouted = m_pToolbarManager->isLayoutDirty(); } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) @@ -2038,19 +1616,15 @@ throw (RuntimeException) // PB 2004-12-15 #i38743# don't create a menubar if frame isn't top if ( !bInPlaceMenu && !m_xMenuBar.is() && implts_isFrameOrWindowTop( xFrame )) { - vos::OGuard aGuard( Application::GetSolarMutex() ); - m_xMenuBar = implts_createElement( aName ); if ( m_xMenuBar.is() ) { - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); + vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pWindow ) - { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; - Reference< css::awt::XMenuBar > xMenuBar; + SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); + if ( pSysWindow ) + { + Reference< awt::XMenuBar > xMenuBar; Reference< XPropertySet > xPropSet( m_xMenuBar, UNO_QUERY ); if ( xPropSet.is() ) @@ -2059,27 +1633,27 @@ throw (RuntimeException) { xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar; } - catch ( com::sun::star::beans::UnknownPropertyException ) + catch ( beans::UnknownPropertyException ) { } - catch ( com::sun::star::lang::WrappedTargetException ) + catch ( lang::WrappedTargetException ) { } } if ( xMenuBar.is() ) { - VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); - if ( pAwtMenuBar ) + VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); + if ( pAwtMenuBar ) { MenuBar* pMenuBar = (MenuBar*)pAwtMenuBar->GetMenu(); if ( pMenuBar ) { - pSysWindow->SetMenuBar( pMenuBar ); + pSysWindow->SetMenuBar( pMenuBar ); pMenuBar->SetDisplayable( m_bMenuVisible ); - if ( m_bMenuVisible ) + if ( m_bMenuVisible ) bNotify = sal_True; - implts_updateMenuBarClose(); + implts_updateMenuBarClose(); } } } @@ -2103,7 +1677,7 @@ throw (RuntimeException) else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) { // Add layout manager as listener for docking and other window events - uno::Reference< uno::XInterface > xThis( static_cast< OWeakObject* >(this), css::uno::UNO_QUERY ); + uno::Reference< uno::XInterface > xThis( static_cast< OWeakObject* >(this), uno::UNO_QUERY ); uno::Reference< ui::XUIElement > xUIElement( implts_createDockingWindow( aName )); if ( xUIElement.is() ) @@ -2114,17 +1688,16 @@ throw (RuntimeException) // The docking window is created by a factory method located in the sfx2 library. // CreateDockingWindow( xFrame, aElementName ); - } + } } if ( bMustBeLayouted ) implts_doLayout_notify( sal_True ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( bNotify ) { // UI element is invisible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) ); + implts_notifyListeners( frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) ); } } @@ -2136,61 +1709,55 @@ throw (RuntimeException) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - sal_Bool bMustBeLayouted( sal_False ); - sal_Bool bMustBeDestroyed( sal_False ); - sal_Bool bMustBeSorted( sal_False ); - sal_Bool bNotify( sal_False ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; + bool bMustBeLayouted( sal_False ); + bool bMustBeDestroyed( sal_False ); + bool bNotify( sal_False ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; Reference< XComponent > xComponent; - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - if ( !m_bInplaceMenuSet ) - { - impl_clearUpMenuBar(); - m_xMenuBar.clear(); - bNotify = sal_True; - } - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - aWriteLock.unlock(); - implts_destroyStatusBar(); - bMustBeLayouted = sal_True; - bNotify = sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) ) - { - aWriteLock.unlock(); - implts_createProgressBar(); - bMustBeLayouted = sal_True; - bNotify = sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && - m_pToolbarManager != NULL ) - { - aWriteLock.unlock(); - bNotify = m_pToolbarManager->destroyToolbar( aName ); - bMustBeLayouted = m_pToolbarManager->isLayoutDirty(); - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR ); - aWriteLock.unlock(); + parseResourceURL( aName, aElementType, aElementName ); - impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false ); - bMustBeLayouted = sal_False; - bNotify = sal_False; + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + { + if ( !m_bInplaceMenuSet ) + { + impl_clearUpMenuBar(); + m_xMenuBar.clear(); + bNotify = true; } } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || + ( m_aStatusBarElement.m_aName == aName )) + { + aWriteLock.unlock(); + implts_destroyStatusBar(); + bMustBeLayouted = true; + bNotify = true; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) + { + aWriteLock.unlock(); + implts_createProgressBar(); + bMustBeLayouted = true; + bNotify = sal_True; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR ) && m_pToolbarManager != NULL ) + { + aWriteLock.unlock(); + bNotify = m_pToolbarManager->destroyToolbar( aName ); + bMustBeLayouted = m_pToolbarManager->isLayoutDirty(); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + uno::Reference< lang::XMultiServiceFactory > xSMGR( m_xSMGR ); + aWriteLock.unlock(); + + impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false ); + bMustBeLayouted = false; + bNotify = false; + } aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -2198,173 +1765,91 @@ throw (RuntimeException) { if ( xComponent.is() ) xComponent->dispose(); - bNotify = sal_True; + bNotify = true; } - if ( bMustBeSorted ) - { - implts_sortUIElements(); - if ( bMustBeLayouted ) - doLayout(); - } + if ( bMustBeLayouted ) + doLayout(); if ( bNotify ) - { - // UI element is invisible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) ); - } + implts_notifyListeners( frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) ); } -::sal_Bool SAL_CALL LayoutManager::requestElement( const ::rtl::OUString& ResourceURL ) -throw (::com::sun::star::uno::RuntimeException) +::sal_Bool SAL_CALL LayoutManager::requestElement( const ::rtl::OUString& rResourceURL ) +throw (uno::RuntimeException) { - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::requestElement" ); + bool bResult( false ); + bool bNotify( false ); + bool bDoLayout( false ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - UIElementVector::iterator pIter; - sal_Bool bResult( sal_False ); - sal_Bool bNotify( sal_False ); + parseResourceURL( rResourceURL, aElementType, aElementName ); WriteGuard aWriteLock( m_aLock ); - if ( impl_parseResourceURL( ResourceURL, aElementType, aElementName )) + + ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); + RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s requested.", aResName.getStr() ); + + if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == rResourceURL )) { - ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); - RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); - - if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == ResourceURL )) + implts_readStatusBarState( rResourceURL ); + if ( m_aStatusBarElement.m_bVisible && !m_aStatusBarElement.m_bMasterHide ) { - implts_readStatusBarState( ResourceURL ); - if ( m_aStatusBarElement.m_bVisible && !m_aStatusBarElement.m_bMasterHide ) - { - createElement( ResourceURL ); + aWriteLock.unlock(); + createElement( rResourceURL ); - // There are some situation where we are not able to create an element. - // Therefore we have to check the reference before further action. - // See #i70019# - css::uno::Reference< css::ui::XUIElement > xUIElement( m_aStatusBarElement.m_xUIElement ); - if ( xUIElement.is() ) + // There are some situation where we are not able to create an element. + // Therefore we have to check the reference before further action. + // See #i70019# + uno::Reference< ui::XUIElement > xUIElement( m_aStatusBarElement.m_xUIElement ); + if ( xUIElement.is() ) + { + // we need VCL here to pass special flags to Show() + vos::OGuard aGuard( Application::GetSolarMutex() ); + Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow ) { - // we need VCL here to pass special flags to Show() - vos::OGuard aGuard( Application::GetSolarMutex() ); - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - doLayout(); - bResult = sal_True; - bNotify = sal_True; - } + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + bResult = true; + bNotify = true; + bDoLayout = true; } } } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) ) + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) ) + { + aWriteLock.unlock(); + implts_showProgressBar(); + bResult = true; + bNotify = true; + bDoLayout = true; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR ) && m_bParentWindowVisible ) + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + + if ( pToolbarManager ) { - aWriteLock.unlock(); - implts_showProgressBar(); - doLayout(); - bResult = sal_True; - bNotify = sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - if ( m_bVisible ) - { - bool bFound( false ); - bool bShowElement( false ); + bNotify = pToolbarManager->requestToolbar( rResourceURL ); + bDoLayout = true; + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + aWriteLock.unlock(); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == ResourceURL ) - { - bFound = sal_True; - bShowElement = ( pIter->m_bVisible && !pIter->m_bMasterHide && m_bParentWindowVisible ); - - Reference< css::awt::XWindow2 > xContainerWindow( m_xContainerWindow, UNO_QUERY ); - if ( xContainerWindow.is() && pIter->m_bFloating ) - bShowElement = ( bShowElement && xContainerWindow->isActive() ); - - if ( pIter->m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - if ( xDockWindow.is() && xDockWindow->isFloating() ) - bShowElement = ( bShowElement && xContainerWindow->isActive() ); - - if ( xDockWindow.is() && bShowElement ) - { - pIter->m_bVisible = sal_True; - aWriteLock.unlock(); - - // we need VCL here to pass special flags to Show() - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if( pWindow && !pWindow->IsReallyVisible() ) - { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - implts_writeNewStateData( ResourceURL, xWindow ); - - if ( xDockWindow.is() && !xDockWindow->isFloating() ) - doLayout(); - bResult = sal_True; - bNotify = sal_True; - } - - bResult = sal_False; - } - } // if ( pIter->m_xUIElement.is() ) - break; - } - } - - // Create toolbar on demand when it's visible - if ( !bResult ) - { - Reference< ::com::sun::star::ui::XUIElement > xUIElement; - if ( !bFound ) - { - UIElement aNewToolbar( aElementName, aElementType, xUIElement ); - aNewToolbar.m_aName = ResourceURL; - implts_readWindowStateData( ResourceURL, aNewToolbar ); - implts_insertUIElement( aNewToolbar ); - aWriteLock.unlock(); - - implts_sortUIElements(); - if ( aNewToolbar.m_bVisible ) - createElement( ResourceURL ); - bResult = sal_True; - bNotify = sal_True; - } - else if ( bShowElement ) - { - aWriteLock.unlock(); - - createElement( ResourceURL ); - bResult = sal_True; - bNotify = sal_True; - } - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - aWriteLock.unlock(); - - CreateDockingWindow( xFrame, aElementName ); - } + CreateDockingWindow( xFrame, aElementName ); } if ( bNotify ) - { - // UI element is visible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( ResourceURL ) ); - } + implts_notifyListeners( frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( rResourceURL ) ); return bResult; } @@ -2372,50 +1857,42 @@ throw (::com::sun::star::uno::RuntimeException) Reference< XUIElement > SAL_CALL LayoutManager::getElement( const ::rtl::OUString& aName ) throw (RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< XUIElement > xElement; - - implts_findElement( aName, aElementType, aElementName, xElement ); - return xElement; + return implts_findElement( aName ); } -Sequence< Reference< ::com::sun::star::ui::XUIElement > > SAL_CALL LayoutManager::getElements() -throw (::com::sun::star::uno::RuntimeException) +Sequence< Reference< ui::XUIElement > > SAL_CALL LayoutManager::getElements() +throw (uno::RuntimeException) { - ReadGuard aReadLock( m_aLock ); + ReadGuard aReadLock( m_aLock ); + uno::Reference< ui::XUIElement > xMenuBar( m_xMenuBar ); + uno::Reference< ui::XUIElement > xStatusBar( m_aStatusBarElement.m_xUIElement ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); + aReadLock.unlock(); - sal_Bool bMenuBar( sal_False ); - sal_Bool bStatusBar( sal_False ); - sal_Int32 nSize = m_aUIElements.size(); + Sequence< Reference< ui::XUIElement > > aSeq; + if ( pToolbarManager ) + aSeq = pToolbarManager->getElements(); - if ( m_xMenuBar.is() ) + sal_Int32 nSize = aSeq.getLength(); + sal_Int32 nMenuBarIndex(-1); + sal_Int32 nStatusBarIndex(-1); + if ( xMenuBar.is() ) { + nMenuBarIndex = nSize; ++nSize; - bMenuBar = sal_True; } - if ( m_aStatusBarElement.m_xUIElement.is() ) + if ( xStatusBar.is() ) { + nStatusBarIndex = nSize; ++nSize; - bStatusBar = sal_True; } - Sequence< Reference< ::com::sun::star::ui::XUIElement > > aSeq( nSize ); - - sal_Int32 nIndex = 0; - UIElementVector::const_iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - aSeq[nIndex++] = pIter->m_xUIElement; - } - if ( bMenuBar ) - aSeq[nIndex++] = m_xMenuBar; - if ( bStatusBar ) - aSeq[nIndex++] = m_aStatusBarElement.m_xUIElement; - - // Resize sequence as we now know our correct size - aSeq.realloc( nIndex ); + aSeq.realloc(nSize); + if ( nMenuBarIndex >= 0 ) + aSeq[nMenuBarIndex] = xMenuBar; + if ( nStatusBarIndex >= 0 ) + aSeq[nStatusBarIndex] = xStatusBar; return aSeq; } @@ -2425,114 +1902,79 @@ throw (RuntimeException) { RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::showElement" ); - sal_Bool bResult( sal_False ); - sal_Bool bNotify( sal_False ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; + bool bResult( false ); + bool bNotify( false ); + bool bMustLayout( false ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - if ( impl_parseResourceURL( aName, aElementType, aElementName )) + parseResourceURL( aName, aElementType, aElementName ); + + ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); + RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); + + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) { - ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); - RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); + WriteGuard aWriteLock( m_aLock ); + m_bMenuVisible = sal_True; + aWriteLock.unlock(); - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + bResult = implts_resetMenuBar(); + bNotify = bResult; + } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == aName )) + { + WriteGuard aWriteLock( m_aLock ); + if ( m_aStatusBarElement.m_xUIElement.is() && !m_aStatusBarElement.m_bMasterHide && + implts_showStatusBar( sal_True )) { - WriteGuard aWriteLock( m_aLock ); - m_bMenuVisible = sal_True; aWriteLock.unlock(); - bResult = implts_resetMenuBar(); - bNotify = bResult; - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - WriteGuard aWriteLock( m_aLock ); - if ( m_aStatusBarElement.m_xUIElement.is() && - !m_aStatusBarElement.m_bMasterHide ) - { - if ( implts_showStatusBar( sal_True )) - { - implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); - doLayout(); - bResult = sal_True; - bNotify = sal_True; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) - { - bNotify = bResult = implts_showProgressBar(); - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - UIElementVector::iterator pIter; - - WriteGuard aWriteLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - UIElement aUIElement = *pIter; - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - sal_Bool bShowElement( !pIter->m_bMasterHide && m_bParentWindowVisible ); - - pIter->m_bVisible = sal_True; - aWriteLock.unlock(); - - implts_writeWindowStateData( aUIElement.m_aName, aUIElement ); - implts_sortUIElements(); - - if ( xDockWindow.is() && bShowElement ) - { - // we need VCL here to pass special flags to Show() - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if( pWindow ) - { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - bNotify = sal_True; - } - implts_writeNewStateData( aName, xWindow ); - - if ( xDockWindow.is() && !xDockWindow->isFloating() ) - doLayout(); - - bResult = sal_True; - } // if ( xDockWindow.is() && bShowElement ) - break; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - ReadGuard aReadGuard( m_aLock ); - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR ); - aReadGuard.unlock(); - - impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, true ); - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolpanel" )) - { - ReadGuard aReadGuard( m_aLock ); - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - aReadGuard.unlock(); - - ActivateToolPanel( m_xFrame, aName ); + implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); + bMustLayout = true; + bResult = true; + bNotify = true; } } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) + { + bNotify = bResult = implts_showProgressBar(); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< awt::XWindowListener > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + + if ( pToolbarManager ) + { + bNotify = pToolbarManager->showToolbar( aName ); + bMustLayout = pToolbarManager->isLayoutDirty(); + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + ReadGuard aReadGuard( m_aLock ); + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + uno::Reference< lang::XMultiServiceFactory > xSMGR( m_xSMGR ); + aReadGuard.unlock(); + + impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, true ); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolpanel" )) + { + ReadGuard aReadGuard( m_aLock ); + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + aReadGuard.unlock(); + ActivateToolPanel( m_xFrame, aName ); + } + + if ( bMustLayout ) + doLayout(); if ( bNotify ) - { - // UI element is visible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) ); - } + implts_notifyListeners( frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) ); return bResult; } @@ -2542,345 +1984,247 @@ throw (RuntimeException) { RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::hideElement" ); + bool bResult( false ); + bool bNotify( false ); + bool bMustLayout( false ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - sal_Bool bResult( sal_False ); - sal_Bool bNotify( sal_False ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; + parseResourceURL( aName, aElementType, aElementName ); + ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); + RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); - if ( impl_parseResourceURL( aName, aElementType, aElementName )) + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) { - ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); - RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); + WriteGuard aWriteLock( m_aLock ); - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + if ( m_xContainerWindow.is() ) { - WriteGuard aWriteLock( m_aLock ); + m_bMenuVisible = sal_False; - if ( m_xContainerWindow.is() ) + vos::OGuard aGuard( Application::GetSolarMutex() ); + SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); + if ( pSysWindow ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - m_bMenuVisible = sal_False; - if ( pWindow ) + MenuBar* pMenuBar = pSysWindow->GetMenuBar(); + if ( pMenuBar ) { - MenuBar* pMenuBar = ((SystemWindow *)pWindow)->GetMenuBar(); - if ( pMenuBar ) - { - pMenuBar->SetDisplayable( sal_False ); - bResult = sal_True; - bNotify = sal_True; - } + pMenuBar->SetDisplayable( sal_False ); + bResult = true; + bNotify = true; } } } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - WriteGuard aWriteLock( m_aLock ); - if ( m_aStatusBarElement.m_xUIElement.is() && - !m_aStatusBarElement.m_bMasterHide ) - { - if ( implts_hideStatusBar( sal_True )) - { - implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); - doLayout(); - bNotify = sal_True; - bResult = sal_True; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) - { - bResult = bNotify = implts_hideProgressBar(); - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - UIElementVector::iterator pIter; - - WriteGuard aWriteLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - if ( xDockWindow.is() ) - { - pIter->m_bVisible = sal_False; - aWriteLock.unlock(); - - xWindow->setVisible( sal_False ); - implts_writeNewStateData( aName, xWindow ); - - if ( xDockWindow.is() && !xDockWindow->isFloating() ) - doLayout(); - - bResult = sal_True; - bNotify = sal_True; - } // if ( xDockWindow.is() ) - break; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - ReadGuard aReadGuard( m_aLock ); - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR ); - aReadGuard.unlock(); - - impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false ); - } } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == aName )) + { + WriteGuard aWriteLock( m_aLock ); + if ( m_aStatusBarElement.m_xUIElement.is() && !m_aStatusBarElement.m_bMasterHide && + implts_hideStatusBar( sal_True )) + { + implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); + bMustLayout = sal_True; + bNotify = sal_True; + bResult = sal_True; + } + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) + { + bResult = bNotify = implts_hideProgressBar(); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + + bNotify = pToolbarManager->hideToolbar( aName ); + bMustLayout = pToolbarManager->isLayoutDirty(); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + ReadGuard aReadGuard( m_aLock ); + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + uno::Reference< lang::XMultiServiceFactory > xSMGR( m_xSMGR ); + aReadGuard.unlock(); + + impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false ); + } + + if ( bMustLayout ) + doLayout(); if ( bNotify ) - { - // UI element is visible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) ); - } + implts_notifyListeners( frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) ); return sal_False; } -sal_Bool SAL_CALL LayoutManager::dockWindow( const ::rtl::OUString& aName, DockingArea DockingArea, const css::awt::Point& Pos ) +sal_Bool SAL_CALL LayoutManager::dockWindow( const ::rtl::OUString& aName, DockingArea DockingArea, const awt::Point& Pos ) throw (RuntimeException) { ::rtl::OUString aElementType; ::rtl::OUString aElementName; - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - m_pToolbarManager->dockToolbar( aName, DockingArea, Pos ); - } + parseResourceURL( aName, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + m_pToolbarManager->dockToolbar( aName, DockingArea, Pos ); return sal_False; } -::sal_Bool SAL_CALL LayoutManager::dockAllWindows( ::sal_Int16 nElementType ) throw (::com::sun::star::uno::RuntimeException) +::sal_Bool SAL_CALL LayoutManager::dockAllWindows( ::sal_Int16 /*nElementType*/ ) throw (uno::RuntimeException) { - if ( nElementType == UIElementType::TOOLBAR ) - { - std::vector< rtl::OUString > aToolBarNameVector; + bool bResult( false ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); - { - ReadGuard aReadLock( m_aLock ); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aType.equalsAscii( "toolbar" ) && - pIter->m_xUIElement.is() && - pIter->m_bFloating && - pIter->m_bVisible ) - aToolBarNameVector.push_back( pIter->m_aName ); - } - } - - const sal_uInt32 nCount = aToolBarNameVector.size(); - for ( sal_uInt32 i = 0; i < nCount; ++i ) - { - ::com::sun::star::awt::Point aPoint; - aPoint.X = aPoint.Y = SAL_MAX_INT32; - dockWindow( aToolBarNameVector[i], DockingArea_DOCKINGAREA_DEFAULT, aPoint ); - } - } - - return sal_False; + if ( pToolbarManager ) + bResult = pToolbarManager->dockAllToolbars(); + return bResult; } sal_Bool SAL_CALL LayoutManager::floatWindow( const ::rtl::OUString& aName ) throw (RuntimeException) { - UIElement aUIElement; + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + UIElement aUIElement = impl_findElement( aName ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - if ( implts_findElement( aName, aUIElement )) - { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xWindow.is() && xDockWindow.is() ) - { - if ( !xDockWindow->isFloating() ) - { - xDockWindow->setFloatingMode( sal_True ); - return sal_True; - } - } - } - catch ( DisposedException& ) - { - } - } - } - - return sal_False; -} - -::sal_Bool SAL_CALL LayoutManager::lockWindow( const ::rtl::OUString& ResourceURL ) -throw (::com::sun::star::uno::RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( ResourceURL, aUIElement )) - { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && - pWindow->IsVisible() && - xDockWindow.is() && - !xDockWindow->isFloating() ) - { - aUIElement.m_aDockedData.m_bLocked = sal_True; - implts_writeWindowStateData( ResourceURL, aUIElement ); - xDockWindow->lock(); - - // Write back lock state - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aUIElement.m_aName ) - rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; - aWriteLock.unlock(); - - doLayout(); - return sal_True; - } - } - catch ( DisposedException& ) - { - } - } - } - - return sal_False; -} - -::sal_Bool SAL_CALL LayoutManager::unlockWindow( const ::rtl::OUString& ResourceURL ) -throw (::com::sun::star::uno::RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( ResourceURL, aUIElement )) - { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && - pWindow->IsVisible() && - xDockWindow.is() && - !xDockWindow->isFloating() ) - { - aUIElement.m_aDockedData.m_bLocked = sal_False; - implts_writeWindowStateData( ResourceURL, aUIElement ); - xDockWindow->unlock(); - - // Write back lock state - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aUIElement.m_aName ) - rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; - aWriteLock.unlock(); - - doLayout(); - return sal_True; - } - } - catch ( DisposedException& ) - { - } - } - } - - return sal_False; -} - -void SAL_CALL LayoutManager::setElementSize( const ::rtl::OUString& aName, const css::awt::Size& aSize ) -throw (RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( aName, aUIElement )) - { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - if ( xWindow.is() && xWindow2.is() && xDockWindow.is() ) - { - if ( aUIElement.m_bFloating ) - { - xWindow2->setOutputSize( aSize ); - implts_writeNewStateData( aName, xWindow ); - } - } - } - catch ( DisposedException& ) - { - } - } - } -} - -void SAL_CALL LayoutManager::setElementPos( const ::rtl::OUString& aName, const css::awt::Point& aPos ) -throw (RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( aName, aUIElement ) && aUIElement.m_xUIElement.is() ) + if ( aUIElement.m_xUIElement.is() ) { try { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - if ( xWindow.is() && xDockWindow.is() ) + Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + if ( xWindow.is() && xDockWindow.is() ) { - if ( aUIElement.m_bFloating ) + if ( !xDockWindow->isFloating() ) { - xWindow->setPosSize( aPos.X, aPos.Y, 0, 0, css::awt::PosSize::POS ); - implts_writeNewStateData( aName, xWindow ); + xDockWindow->setFloatingMode( sal_True ); + return sal_True; } - else - { - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aName ) - rUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); - aWriteLock.unlock(); + } + } + catch ( DisposedException& ) + { + } + } - aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); - implts_writeWindowStateData( aName, aUIElement ); - implts_sortUIElements(); + return sal_False; +} - if ( aUIElement.m_bVisible ) - doLayout(); - } +::sal_Bool SAL_CALL LayoutManager::lockWindow( const ::rtl::OUString& rResourceURL ) +throw (uno::RuntimeException) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + UIElement aUIElement = impl_findElement( rResourceURL ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( aUIElement.m_xUIElement.is() ) + { + try + { + Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() && xDockWindow.is() && !xDockWindow->isFloating() ) + { + aUIElement.m_aDockedData.m_bLocked = sal_True; + implts_writeWindowStateData( rResourceURL, aUIElement ); + xDockWindow->lock(); + + // Write back lock state + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); + if ( rUIElement.m_aName == aUIElement.m_aName ) + rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + doLayout(); + return sal_True; + } + } + catch ( DisposedException& ) + { + } + } + + return sal_False; +} + +::sal_Bool SAL_CALL LayoutManager::unlockWindow( const ::rtl::OUString& rResourceURL ) +throw (uno::RuntimeException) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + UIElement aUIElement = impl_findElement( rResourceURL ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( aUIElement.m_xUIElement.is() ) + { + try + { + Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() && xDockWindow.is() && !xDockWindow->isFloating() ) + { + aUIElement.m_aDockedData.m_bLocked = sal_False; + implts_writeWindowStateData( rResourceURL, aUIElement ); + xDockWindow->unlock(); + + // Write back lock state + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); + if ( rUIElement.m_aName == aUIElement.m_aName ) + rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; + aWriteLock.unlock(); + + doLayout(); + return sal_True; + } + } + catch ( DisposedException& ) + { + } + } + + return sal_False; +} + +void SAL_CALL LayoutManager::setElementSize( const ::rtl::OUString& aName, const awt::Size& aSize ) +throw (RuntimeException) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + UIElement aUIElement = impl_findElement( aName ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( aUIElement.m_xUIElement.is() ) + { + try + { + Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + + if ( xWindow.is() && xWindow2.is() && xDockWindow.is() && aUIElement.m_bFloating ) + { + xWindow2->setOutputSize( aSize ); + implts_writeNewStateData( aName, xWindow ); } } catch ( DisposedException& ) @@ -2889,50 +2233,41 @@ throw (RuntimeException) } } -void SAL_CALL LayoutManager::setElementPosSize( const ::rtl::OUString& aName, const css::awt::Point& aPos, const css::awt::Size& aSize ) +void SAL_CALL LayoutManager::setElementPos( const ::rtl::OUString& aName, const awt::Point& aPos ) throw (RuntimeException) { - UIElement aUIElement; + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - if ( implts_findElement( aName, aUIElement )) + parseResourceURL( aName, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + ReadGuard aReadLock( m_aLock ); + uno::Reference< lang::XComponent > xToolbarManager( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); + aReadLock.unlock(); - if ( xWindow.is() && xWindow2.is() && xDockWindow.is() ) - { - if ( aUIElement.m_bFloating ) - { - xWindow2->setPosSize( aPos.X, aPos.Y, 0, 0, css::awt::PosSize::POS ); - xWindow2->setOutputSize( aSize ); - implts_writeNewStateData( aName, xWindow ); - } - else - { - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aName ) - rUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); - aWriteLock.unlock(); + if ( pToolbarManager ) + pToolbarManager->setElementPos( aName, aPos ); + } +} - aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); - implts_writeWindowStateData( aName, rUIElement ); - implts_sortUIElements(); +void SAL_CALL LayoutManager::setElementPosSize( const ::rtl::OUString& aName, const awt::Point& aPos, const awt::Size& aSize ) +throw (RuntimeException) +{ + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - if ( aUIElement.m_bVisible ) - doLayout(); - } - } - } - catch ( DisposedException& ) - { - } - } + parseResourceURL( aName, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< lang::XComponent > xToolbarManager( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); + aReadLock.unlock(); + + if ( pToolbarManager ) + pToolbarManager->setElementPosSize( aName, aPos, aSize ); } } @@ -2942,84 +2277,66 @@ throw (RuntimeException) ::rtl::OUString aElementType; ::rtl::OUString aElementName; - if ( impl_parseResourceURL( aName, aElementType, aElementName )) + parseResourceURL( aName, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + ReadGuard aReadLock( m_aLock ); + if ( m_xContainerWindow.is() ) { - ReadGuard aReadLock( m_aLock ); - if ( m_xContainerWindow.is() ) + aReadLock.unlock(); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); + if ( pSysWindow ) { - aReadLock.unlock(); - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - MenuBar* pMenuBar = ((SystemWindow *)pWindow)->GetMenuBar(); - if ( pMenuBar && pMenuBar->IsDisplayable() ) - return sal_True; - } + MenuBar* pMenuBar = pSysWindow->GetMenuBar(); + if ( pMenuBar && pMenuBar->IsDisplayable() ) + return sal_True; + } + else + { + aReadLock.lock(); + return m_bMenuVisible; + } + } + } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == aName )) + { + if ( m_aStatusBarElement.m_xUIElement.is() ) + { + Reference< awt::XWindow > xWindow( m_aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY ); + if ( xWindow.is() ) + { + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->IsVisible() ) + return sal_True; else - { - aReadLock.lock(); - return m_bMenuVisible; - } + return sal_False; } } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - if ( m_aStatusBarElement.m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( - m_aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() ) - return sal_True; - else - return sal_False; - } - } - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ))) - { - if ( m_aProgressBarElement.m_xUIElement.is() ) - return m_aProgressBarElement.m_bVisible; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - UIElementVector::const_iterator pIter; + } + else if (( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ))) + { + if ( m_aProgressBarElement.m_xUIElement.is() ) + return m_aProgressBarElement.m_bVisible; + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< frame::XLayoutManager > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - return pWindow && pWindow->IsVisible(); - } - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - ReadGuard aReadGuard( m_aLock ); - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - aReadGuard.unlock(); + if ( pToolbarManager ) + return pToolbarManager->isElementVisible( aName ); + } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) + { + ReadGuard aReadGuard( m_aLock ); + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + aReadGuard.unlock(); - return IsDockingWindowVisible( xFrame, aElementName ); - } + return IsDockingWindowVisible( xFrame, aElementName ); } return sal_False; @@ -3028,16 +2345,19 @@ throw (RuntimeException) sal_Bool SAL_CALL LayoutManager::isElementFloating( const ::rtl::OUString& aName ) throw (RuntimeException) { - UIElementVector::const_iterator pIter; + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + parseResourceURL( aName, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - return xDockWindow.is() && xDockWindow->isFloating(); - } + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + + if ( pToolbarManager ) + return pToolbarManager->isElementFloating( aName ); } return sal_False; @@ -3046,93 +2366,85 @@ throw (RuntimeException) sal_Bool SAL_CALL LayoutManager::isElementDocked( const ::rtl::OUString& aName ) throw (RuntimeException) { - UIElementVector::const_iterator pIter; + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + parseResourceURL( aName, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - return xDockWindow.is() && !xDockWindow->isFloating(); - } + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + + if ( pToolbarManager ) + return pToolbarManager->isElementDocked( aName ); } return sal_False; } ::sal_Bool SAL_CALL LayoutManager::isElementLocked( const ::rtl::OUString& ResourceURL ) -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { - UIElementVector::const_iterator pIter; + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + parseResourceURL( ResourceURL, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - if (( pIter->m_aName == ResourceURL ) && ( pIter->m_xUIElement.is() )) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - return xDockWindow.is() && !xDockWindow->isLocked(); - } + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + + if ( pToolbarManager ) + pToolbarManager->isElementLocked( ResourceURL ); } return sal_False; } -css::awt::Size SAL_CALL LayoutManager::getElementSize( const ::rtl::OUString& aName ) +awt::Size SAL_CALL LayoutManager::getElementSize( const ::rtl::OUString& ResourceURL ) throw (RuntimeException) { - ReadGuard aReadLock( m_aLock ); - UIElement aElementData; - if ( implts_findElement( aName,aElementData ) && aElementData.m_xUIElement.is() ) + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + + parseResourceURL( ResourceURL, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - Reference< css::awt::XWindow > xWindow( aElementData.m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - ::Size aSize = pWindow->GetSizePixel(); - css::awt::Size aElementSize; - aElementSize.Width = aSize.Width(); - aElementSize.Height = aSize.Height(); - return aElementSize; - } // if ( pWindow ) - } + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + + if ( pToolbarManager ) + return pToolbarManager->getElementSize( ResourceURL ); } - return css::awt::Size(); + + return awt::Size(); } -css::awt::Point SAL_CALL LayoutManager::getElementPos( const ::rtl::OUString& aName ) +awt::Point SAL_CALL LayoutManager::getElementPos( const ::rtl::OUString& ResourceURL ) throw (RuntimeException) { - ReadGuard aReadLock( m_aLock ); - UIElement aElementData; - if ( implts_findElement( aName,aElementData ) && aElementData.m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( aElementData.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow.is() ) - { - css::awt::Point aPos; - if ( aElementData.m_bFloating ) - { - css::awt::Rectangle aRect = xWindow->getPosSize(); - aPos.X = aRect.X; - aPos.Y = aRect.Y; - } - else - { - ::Point aVirtualPos = aElementData.m_aDockedData.m_aPos; - aPos.X = aVirtualPos.X(); - aPos.Y = aVirtualPos.Y(); - } + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - return aPos; - } + parseResourceURL( ResourceURL, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + + if ( pToolbarManager ) + return pToolbarManager->getElementPos( ResourceURL ); } - return css::awt::Point(); + return awt::Point(); } void SAL_CALL LayoutManager::lock() @@ -3154,7 +2466,7 @@ throw (RuntimeException) #endif Any a( nLockCount ); - implts_notifyListeners( css::frame::LayoutManagerEvents::LOCK, a ); + implts_notifyListeners( frame::LayoutManagerEvents::LOCK, a ); } void SAL_CALL LayoutManager::unlock() @@ -3182,7 +2494,7 @@ throw (RuntimeException) aWriteLock.unlock(); Any a( nLockCount ); - implts_notifyListeners( css::frame::LayoutManagerEvents::UNLOCK, a ); + implts_notifyListeners( frame::LayoutManagerEvents::UNLOCK, a ); if ( bDoLayout ) implts_doLayout_notify( sal_True ); @@ -3207,7 +2519,7 @@ void LayoutManager::implts_doLayout_notify( sal_Bool bOuterResize ) { sal_Bool bLayouted = implts_doLayout( sal_False, bOuterResize ); if ( bLayouted ) - implts_notifyListeners( css::frame::LayoutManagerEvents::LAYOUT, Any() ); + implts_notifyListeners( frame::LayoutManagerEvents::LAYOUT, Any() ); } sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize ) @@ -3215,10 +2527,10 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::implts_doLayout" ); sal_Bool bNoLock( sal_False ); - css::awt::Rectangle aCurrBorderSpace; - Reference< css::awt::XWindow > xContainerWindow; - Reference< css::awt::XTopWindow2 > xContainerTopWindow; - Reference< css::awt::XWindow > xComponentWindow; + awt::Rectangle aCurrBorderSpace; + Reference< awt::XWindow > xContainerWindow; + Reference< awt::XTopWindow2 > xContainerTopWindow; + Reference< awt::XWindow > xComponentWindow; Reference< XDockingAreaAcceptor > xDockingAreaAcceptor; bool bPreserveContentSize( false ); @@ -3254,8 +2566,8 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ aWriteGuard.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - css::awt::Rectangle aDockSpace( implts_calcDockingAreaSizes() ); - css::awt::Rectangle aBorderSpace( aDockSpace ); + awt::Rectangle aDockSpace( implts_calcDockingAreaSizes() ); + awt::Rectangle aBorderSpace( aDockSpace ); sal_Bool bGotRequestedBorderSpace( sal_True ); // We have to add the height of a possible status bar @@ -3274,7 +2586,7 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ // if the component window does not have a size (yet), then we can't use it to calc the container // window size - css::awt::Rectangle aComponentRect = xComponentWindow->getPosSize(); + awt::Rectangle aComponentRect = xComponentWindow->getPosSize(); if ( bOuterResize && ( aComponentRect.Width == 0 ) && ( aComponentRect.Height == 0 ) ) bOuterResize = sal_False; @@ -3312,9 +2624,12 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ if ( bGotRequestedBorderSpace ) { - ::Size aContainerSize; - ::Size aStatusBarSize; + ::Size aContainerSize; + ::Size aStatusBarSize; + // Interim solution to let the layout method within the + // toolbar layout manager. + implts_setOffset( implts_getStatusBarSize().Height() ); m_pToolbarManager->setDockingArea( aDockSpace ); // Subtract status bar size from our container output size. Docking area windows @@ -3383,14 +2698,14 @@ sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContaine } // resize our container window - xContainerWindow->setPosSize( 0, 0, rContainerSize.Width, rContainerSize.Height, css::awt::PosSize::SIZE ); + xContainerWindow->setPosSize( 0, 0, rContainerSize.Width, rContainerSize.Height, awt::PosSize::SIZE ); // position the component window - xComponentWindow->setPosSize( rComponentPos.X, rComponentPos.Y, 0, 0, css::awt::PosSize::POS ); + xComponentWindow->setPosSize( rComponentPos.X, rComponentPos.Y, 0, 0, awt::PosSize::POS ); return sal_True; } void SAL_CALL LayoutManager::setVisible( sal_Bool bVisible ) -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { sal_Bool bWasVisible( sal_True ); @@ -3404,7 +2719,7 @@ throw (::com::sun::star::uno::RuntimeException) } sal_Bool SAL_CALL LayoutManager::isVisible() -throw (::com::sun::star::uno::RuntimeException) +throw (uno::RuntimeException) { ReadGuard aReadLock( m_aLock ); return m_bVisible; @@ -3413,15 +2728,15 @@ throw (::com::sun::star::uno::RuntimeException) ::Size LayoutManager::implts_getStatusBarSize() { ReadGuard aReadLock( m_aLock ); - sal_Bool bStatusBarVisible( isElementVisible( m_aStatusBarAlias )); - sal_Bool bProgressBarVisible( isElementVisible( m_aProgressBarAlias )); - sal_Bool bVisible = m_bVisible; - Reference< XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; - Reference< XUIElement > xProgressBar = m_aProgressBarElement.m_xUIElement; + bool bStatusBarVisible( isElementVisible( m_aStatusBarAlias )); + bool bProgressBarVisible( isElementVisible( m_aProgressBarAlias )); + bool bVisible( m_bVisible ); + Reference< XUIElement > xStatusBar( m_aStatusBarElement.m_xUIElement ); + Reference< XUIElement > xProgressBar( m_aProgressBarElement.m_xUIElement ); - Reference< css::awt::XWindow > xWindow; + Reference< awt::XWindow > xWindow; if ( bStatusBarVisible && bVisible && xStatusBar.is() ) - xWindow = Reference< css::awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); + xWindow = Reference< awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); else if ( xProgressBar.is() && !xStatusBar.is() && bProgressBarVisible ) { ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); @@ -3432,45 +2747,40 @@ throw (::com::sun::star::uno::RuntimeException) if ( xWindow.is() ) { - css::awt::Rectangle aPosSize = xWindow->getPosSize(); + awt::Rectangle aPosSize = xWindow->getPosSize(); return ::Size( aPosSize.Width, aPosSize.Height ); } else return ::Size(); } -css::awt::Rectangle LayoutManager::implts_calcDockingAreaSizes() +awt::Rectangle LayoutManager::implts_calcDockingAreaSizes() { - Reference< css::awt::XWindow > xContainerWindow; - Reference< XDockingAreaAcceptor > xDockingAreaAcceptor; - ReadGuard aReadLock( m_aLock ); - xContainerWindow = m_xContainerWindow; - xDockingAreaAcceptor = m_xDockingAreaAcceptor; + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< XDockingAreaAcceptor > xDockingAreaAcceptor( m_xDockingAreaAcceptor ); aReadLock.unlock(); - css::awt::Rectangle aBorderSpace; + awt::Rectangle aBorderSpace; if ( xDockingAreaAcceptor.is() && xContainerWindow.is() ) aBorderSpace = m_pToolbarManager->getDockingArea(); return aBorderSpace; } -void LayoutManager::implts_setDockingAreaWindowSizes( const css::awt::Rectangle& /*rBorderSpace*/ ) +void LayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangle& /*rBorderSpace*/ ) { - Reference< css::awt::XWindow > xContainerWindow; - ReadGuard aReadLock( m_aLock ); - xContainerWindow = m_xContainerWindow; + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); aReadLock.unlock(); - css::uno::Reference< css::awt::XDevice > xDevice( xContainerWindow, css::uno::UNO_QUERY ); + uno::Reference< awt::XDevice > xDevice( xContainerWindow, uno::UNO_QUERY ); // Convert relativ size to output size. - css::awt::Rectangle aRectangle = xContainerWindow->getPosSize(); - css::awt::DeviceInfo aInfo = xDevice->getInfo(); - css::awt::Size aContainerClientSize = css::awt::Size( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , - aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); - ::Size aStatusBarSize = implts_getStatusBarSize(); + awt::Rectangle aRectangle = xContainerWindow->getPosSize(); + awt::DeviceInfo aInfo = xDevice->getInfo(); + awt::Size aContainerClientSize = awt::Size( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset, + aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); + ::Size aStatusBarSize = implts_getStatusBarSize(); // Position the status bar if ( aStatusBarSize.Height() > 0 ) @@ -3485,37 +2795,24 @@ void LayoutManager::implts_setDockingAreaWindowSizes( const css::awt::Rectangle& //--------------------------------------------------------------------------------------------------------- void LayoutManager::implts_updateMenuBarClose() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - sal_Bool bShowCloser = m_bMenuBarCloser; - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + bool bShowCloser( m_bMenuBarCloser ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); aWriteLock.unlock(); if ( xContainerWindow.is() ) { vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; - MenuBar* pMenuBar = pSysWindow->GetMenuBar(); + SystemWindow* pSysWindow = getTopSystemWindow( xContainerWindow ); + if ( pSysWindow ) + { + MenuBar* pMenuBar = pSysWindow->GetMenuBar(); if ( pMenuBar ) { // TODO remove link on FALSE ?! - if ( bShowCloser ) - { - pMenuBar->ShowCloser( TRUE ); - pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); - } - else - { - pMenuBar->ShowCloser( FALSE ); - pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); - } + pMenuBar->ShowCloser( bShowCloser ); + pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); } } } @@ -3526,14 +2823,14 @@ sal_Bool LayoutManager::implts_resetMenuBar() /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); sal_Bool bMenuVisible( m_bMenuVisible ); - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); MenuBar* pSetMenuBar = 0; if ( m_xInplaceMenuBar.is() ) pSetMenuBar = (MenuBar *)m_pInplaceMenuBar->GetMenuBar(); else { - MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, m_xMenuBar.get() ); + MenuBarWrapper* pMenuBarWrapper = static_cast< MenuBarWrapper* >( m_xMenuBar.get() ); if ( pMenuBarWrapper ) pSetMenuBar = (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar(); } @@ -3541,13 +2838,10 @@ sal_Bool LayoutManager::implts_resetMenuBar() /* SAFE AREA ----------------------------------------------------------------------------------------------- */ vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow && bMenuVisible && pSetMenuBar ) + SystemWindow* pSysWindow = getTopSystemWindow( xContainerWindow ); + if ( pSysWindow && bMenuVisible && pSetMenuBar ) { - ((SystemWindow *)pWindow)->SetMenuBar( pSetMenuBar ); + pSysWindow->SetMenuBar( pSetMenuBar ); pSetMenuBar->SetDisplayable( sal_True ); return sal_True; } @@ -3557,7 +2851,6 @@ sal_Bool LayoutManager::implts_resetMenuBar() void LayoutManager::implts_setMenuBarCloser(sal_Bool bCloserState) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_bMenuBarCloser = bCloserState; aWriteLock.unlock(); @@ -3565,256 +2858,53 @@ void LayoutManager::implts_setMenuBarCloser(sal_Bool bCloserState) implts_updateMenuBarClose(); } -sal_Int16 LayoutManager::implts_getCurrentSymbolsSize() -{ - sal_Int16 eOptSymbolsSize( 0 ); - - { - ReadGuard aReadLock( m_aLock ); - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( m_pMiscOptions ) - eOptSymbolsSize = m_pMiscOptions->GetCurrentSymbolsSize(); - } - - return eOptSymbolsSize; -} - -sal_Int16 LayoutManager::implts_getCurrentSymbolsStyle() -{ - sal_Int16 eOptSymbolsStyle( 0 ); - - { - ReadGuard aReadLock( m_aLock ); - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( m_pMiscOptions ) - eOptSymbolsStyle = m_pMiscOptions->GetCurrentSymbolsStyle(); - } - - return eOptSymbolsStyle; -} - IMPL_LINK( LayoutManager, MenuBarClose, MenuBar *, EMPTYARG ) { ReadGuard aReadLock( m_aLock ); - css::uno::Reference< css::frame::XDispatchProvider > xProvider(m_xFrame, css::uno::UNO_QUERY); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR; + uno::Reference< frame::XDispatchProvider > xProvider(m_xFrame, uno::UNO_QUERY); + uno::Reference< lang::XMultiServiceFactory > xSMGR = m_xSMGR; aReadLock.unlock(); - if (! xProvider.is()) + if ( !xProvider.is()) return 0; - css::uno::Reference< css::frame::XDispatchHelper > xDispatcher( - xSMGR->createInstance(SERVICENAME_DISPATCHHELPER), css::uno::UNO_QUERY_THROW); + uno::Reference< frame::XDispatchHelper > xDispatcher( + xSMGR->createInstance(SERVICENAME_DISPATCHHELPER), uno::UNO_QUERY_THROW); xDispatcher->executeDispatch( xProvider, ::rtl::OUString::createFromAscii(".uno:CloseWin"), ::rtl::OUString::createFromAscii("_self"), 0, - css::uno::Sequence< css::beans::PropertyValue >()); + uno::Sequence< beans::PropertyValue >()); return 0; } -IMPL_LINK( LayoutManager, OptionsChanged, void*, EMPTYARG ) -{ - sal_Int16 eSymbolsSize( implts_getCurrentSymbolsSize() ); - sal_Int16 eSymbolsStyle( implts_getCurrentSymbolsStyle() ); - - ReadGuard aReadLock( m_aLock ); - sal_Int16 eOldSymbolsSize = m_eSymbolsSize; - sal_Int16 eOldSymbolsStyle = m_eSymbolsStyle; - aReadLock.unlock(); - - if ( eSymbolsSize != eOldSymbolsSize || eSymbolsStyle != eOldSymbolsStyle ) - { - WriteGuard aWriteLock( m_aLock ); - m_eSymbolsSize = eSymbolsSize; - m_eSymbolsStyle = eSymbolsStyle; - aWriteLock.unlock(); - - std::vector< Reference< XUpdatable > > aToolBarVector; - - aReadLock.lock(); - { - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - aToolBarVector.push_back( Reference< XUpdatable >( pIter->m_xUIElement, UNO_QUERY )); - } - } - aReadLock.unlock(); - - lock(); - { - std::vector< Reference< XUpdatable > >::iterator pIter; - for ( pIter = aToolBarVector.begin(); pIter != aToolBarVector.end(); pIter++ ) - { - if ( (*pIter).is() ) - (*pIter)->update(); - } - } - unlock(); - doLayout(); - } - - return 1; -} - IMPL_LINK( LayoutManager, SettingsChanged, void*, EMPTYARG ) { return 1; } -//--------------------------------------------------------------------------------------------------------- -// XDockableWindowListener -//--------------------------------------------------------------------------------------------------------- -void SAL_CALL LayoutManager::startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException) -{ - Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - - // Determine if we have a toolbar and forward request to toolbar manager - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - ToolBox* pToolBox = 0; - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - m_pToolbarManager->startDocking(e); -} - -css::awt::DockingData SAL_CALL LayoutManager::docking( const ::com::sun::star::awt::DockingEvent& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - - // Determine if we have a toolbar and forward request to toolbar manager - css::awt::DockingData aDockingData; - - // copy current tracking rectangle from docking event - aDockingData.TrackingRectangle = e.TrackingRectangle; - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - ToolBox* pToolBox = 0; - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - aDockingData = m_pToolbarManager->docking(e); - - return aDockingData; -} - -void SAL_CALL LayoutManager::endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - - // Determine if we have a toolbar and forward request to toolbar manager - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - ToolBox* pToolBox = 0; - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - m_pToolbarManager->endDocking(e); - if ( m_pToolbarManager->isLayoutDirty()) - implts_doLayout_notify( sal_True ); - } -} - -sal_Bool SAL_CALL LayoutManager::prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - - // Determine if we have a toolbar and forward request to toolbar manager - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - ToolBox* pToolBox = 0; - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - return m_pToolbarManager->prepareToggleFloatingMode(e); - else - return sal_False; -} - -void SAL_CALL LayoutManager::toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - - // Determine if we have a toolbar and forward request to toolbar manager - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - ToolBox* pToolBox = 0; - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - m_pToolbarManager->toggleFloatingMode(e); - if ( m_pToolbarManager->isLayoutDirty()) - implts_doLayout_notify( sal_True ); - } -} - -void SAL_CALL LayoutManager::closed( const ::com::sun::star::lang::EventObject& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - rtl::OUString aName; - UIElement aUIElement; - UIElementVector::iterator pIter; - - WriteGuard aWriteLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - if ( xUIElement.is() ) - { - Reference< XInterface > xIfac( xUIElement->getRealInterface(), UNO_QUERY ); - if ( xIfac == e.Source ) - { - aName = pIter->m_aName; - - // user closes a toolbar => - // context sensitive toolbar: only destroy toolbar and store state. - // context sensitive toolbar: make it invisible, store state and destroy it. - if ( !pIter->m_bContextSensitive ) - pIter->m_bVisible = sal_False; - - aUIElement = *pIter; - break; - } - } - } - aWriteLock.unlock(); - - - // destroy element - if ( aName.getLength() > 0 ) - { - implts_writeWindowStateData( aName, aUIElement ); - destroyElement( aName ); - } -} - -void SAL_CALL LayoutManager::endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& ) -throw (::com::sun::star::uno::RuntimeException) -{ -} - //--------------------------------------------------------------------------------------------------------- // XLayoutManagerEventBroadcaster //--------------------------------------------------------------------------------------------------------- -void SAL_CALL LayoutManager::addLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& xListener ) -throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL LayoutManager::addLayoutManagerEventListener( const uno::Reference< frame::XLayoutManagerListener >& xListener ) +throw (uno::RuntimeException) { - m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XLayoutManagerListener >*)NULL ), xListener ); + m_aListenerContainer.addInterface( ::getCppuType( (const uno::Reference< frame::XLayoutManagerListener >*)NULL ), xListener ); } -void SAL_CALL LayoutManager::removeLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& xListener ) -throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL LayoutManager::removeLayoutManagerEventListener( const uno::Reference< frame::XLayoutManagerListener >& xListener ) +throw (uno::RuntimeException) { - m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XLayoutManagerListener >*)NULL ), xListener ); + m_aListenerContainer.removeInterface( ::getCppuType( (const uno::Reference< frame::XLayoutManagerListener >*)NULL ), xListener ); } -void LayoutManager::implts_notifyListeners( short nEvent, ::com::sun::star::uno::Any aInfoParam ) +void LayoutManager::implts_notifyListeners( short nEvent, uno::Any aInfoParam ) { - css::lang::EventObject aSource (static_cast< ::cppu::OWeakObject*>(this)); - ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::frame::XLayoutManagerListener >*) NULL ) ); + lang::EventObject aSource( static_cast< ::cppu::OWeakObject*>(this) ); + ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const uno::Reference< frame::XLayoutManagerListener >*) NULL ) ); if (pContainer!=NULL) { ::cppu::OInterfaceIteratorHelper pIterator(*pContainer); @@ -3822,9 +2912,9 @@ void LayoutManager::implts_notifyListeners( short nEvent, ::com::sun::star::uno: { try { - ((css::frame::XLayoutManagerListener*)pIterator.next())->layoutEvent( aSource, nEvent, aInfoParam ); + ((frame::XLayoutManagerListener*)pIterator.next())->layoutEvent( aSource, nEvent, aInfoParam ); } - catch( css::uno::RuntimeException& ) + catch( uno::RuntimeException& ) { pIterator.remove(); } @@ -3835,8 +2925,8 @@ void LayoutManager::implts_notifyListeners( short nEvent, ::com::sun::star::uno: //--------------------------------------------------------------------------------------------------------- // XWindowListener //--------------------------------------------------------------------------------------------------------- -void SAL_CALL LayoutManager::windowResized( const css::awt::WindowEvent& aEvent ) -throw( css::uno::RuntimeException ) +void SAL_CALL LayoutManager::windowResized( const awt::WindowEvent& aEvent ) +throw( uno::RuntimeException ) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); @@ -3845,9 +2935,9 @@ throw( css::uno::RuntimeException ) return; // Request to set docking area space again. - css::awt::Rectangle aDockingArea( m_aDockingArea ); + awt::Rectangle aDockingArea( m_aDockingArea ); Reference< XDockingAreaAcceptor > xDockingAreaAcceptor( m_xDockingAreaAcceptor ); - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); if ( xIfac == aEvent.Source && m_bVisible ) @@ -3869,62 +2959,56 @@ throw( css::uno::RuntimeException ) { // the container window of my DockingAreaAcceptor is not the same as of my frame // I still have to resize my frames' window as nobody else will do it - Reference< css::awt::XWindow > xComponentWindow( m_xFrame->getComponentWindow() ); + Reference< awt::XWindow > xComponentWindow( m_xFrame->getComponentWindow() ); if( xComponentWindow.is() == sal_True ) { - css::uno::Reference< css::awt::XDevice > xDevice( m_xFrame->getContainerWindow(), css::uno::UNO_QUERY ); + uno::Reference< awt::XDevice > xDevice( m_xFrame->getContainerWindow(), uno::UNO_QUERY ); // Convert relativ size to output size. - css::awt::Rectangle aRectangle = m_xFrame->getContainerWindow()->getPosSize(); - css::awt::DeviceInfo aInfo = xDevice->getInfo(); - css::awt::Size aSize ( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , - aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); + awt::Rectangle aRectangle = m_xFrame->getContainerWindow()->getPosSize(); + awt::DeviceInfo aInfo = xDevice->getInfo(); + awt::Size aSize( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , + aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); // Resize our component window. - xComponentWindow->setPosSize( 0, 0, aSize.Width, aSize.Height, css::awt::PosSize::POSSIZE ); + xComponentWindow->setPosSize( 0, 0, aSize.Width, aSize.Height, awt::PosSize::POSSIZE ); } } } -void SAL_CALL LayoutManager::windowMoved( const css::awt::WindowEvent& ) throw( css::uno::RuntimeException ) +void SAL_CALL LayoutManager::windowMoved( const awt::WindowEvent& ) throw( uno::RuntimeException ) { } -void SAL_CALL LayoutManager::windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) +void SAL_CALL LayoutManager::windowShown( const lang::EventObject& aEvent ) throw( uno::RuntimeException ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); - - // Request to set docking area space again. - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); bool bParentWindowVisible( m_bParentWindowVisible ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); if ( xIfac == aEvent.Source ) { bool bSetVisible = false; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_bParentWindowVisible = true; bSetVisible = ( m_bParentWindowVisible != bParentWindowVisible ); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( bSetVisible ) implts_updateUIElementsVisibleState( sal_True ); } } -void SAL_CALL LayoutManager::windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) +void SAL_CALL LayoutManager::windowHidden( const lang::EventObject& aEvent ) throw( uno::RuntimeException ) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); // Request to set docking area space again. - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); bool bParentWindowVisible( m_bParentWindowVisible ); aReadLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -3934,12 +3018,10 @@ void SAL_CALL LayoutManager::windowHidden( const css::lang::EventObject& aEvent { bool bSetInvisible = false; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_bParentWindowVisible = false; bSetInvisible = ( m_bParentWindowVisible != bParentWindowVisible ); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( bSetInvisible ) implts_updateUIElementsVisibleState( sal_False ); @@ -3957,8 +3039,8 @@ IMPL_LINK( LayoutManager, AsyncLayoutHdl, Timer *, EMPTYARG ) if( !m_xContainerWindow.is() ) return 0; - css::awt::Rectangle aDockingArea( m_aDockingArea ); - ::Size aStatusBarSize( implts_getStatusBarSize() ); + awt::Rectangle aDockingArea( m_aDockingArea ); + ::Size aStatusBarSize( implts_getStatusBarSize() ); // Subtract status bar height aDockingArea.Height -= aStatusBarSize.Height(); @@ -3970,78 +3052,42 @@ IMPL_LINK( LayoutManager, AsyncLayoutHdl, Timer *, EMPTYARG ) return 0; } -#ifdef DBG_UTIL -void LayoutManager::implts_checkElementContainer() -{ -#ifdef DBG_UTIL - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - - BaseHash< sal_Int32 > aUIElementHash; - - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - aUIElementHash[pIter->m_aName]++; - - - BaseHash< sal_Int32 >::const_iterator pCheckIter = aUIElementHash.begin(); - for ( ; pCheckIter != aUIElementHash.end(); pCheckIter++ ) - { - if ( pCheckIter->second > 1 ) - { - ::rtl::OString aName = ::rtl::OUStringToOString( pCheckIter->first, RTL_TEXTENCODING_ASCII_US ); - DBG_ASSERT( "More than one element (%s) with the same name found!", aName.getStr() ); - } - } // for ( ; pCheckIter != aUIElementHash.end(); pCheckIter++ ) -#endif -} -#endif - //--------------------------------------------------------------------------------------------------------- // XFrameActionListener //--------------------------------------------------------------------------------------------------------- void SAL_CALL LayoutManager::frameAction( const FrameActionEvent& aEvent ) throw ( RuntimeException ) { - if (( aEvent.Action == FrameAction_COMPONENT_ATTACHED ) || - ( aEvent.Action == FrameAction_COMPONENT_REATTACHED )) + if (( aEvent.Action == FrameAction_COMPONENT_ATTACHED ) || ( aEvent.Action == FrameAction_COMPONENT_REATTACHED )) { RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_ATTACHED|REATTACHED)" ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_bComponentAttached = sal_True; m_bMustDoLayout = sal_True; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ implts_reset( sal_True ); implts_doLayout( sal_True, sal_False ); implts_doLayout( sal_True, sal_True ); } - else if (( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ) || - ( aEvent.Action == FrameAction_FRAME_UI_DEACTIVATING )) + else if (( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ) || ( aEvent.Action == FrameAction_FRAME_UI_DEACTIVATING )) { RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (FRAME_UI_ACTIVATED|DEACTIVATING)" ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_bActive = ( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ implts_toggleFloatingUIElementsVisibility( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ); -// doLayout(); } else if ( aEvent.Action == FrameAction_COMPONENT_DETACHING ) { RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_DETACHING)" ); - // SAFE AREA ----------------------------------------------------------------------------------------------- WriteGuard aWriteLock( m_aLock ); m_bComponentAttached = sal_False; aWriteLock.unlock(); - // SAFE AREA ----------------------------------------------------------------------------------------------- implts_reset( sal_False ); } @@ -4049,7 +3095,7 @@ throw ( RuntimeException ) // ______________________________________________ -void SAL_CALL LayoutManager::disposing( const css::lang::EventObject& rEvent ) +void SAL_CALL LayoutManager::disposing( const lang::EventObject& rEvent ) throw( RuntimeException ) { sal_Bool bDisposeAndClear( sal_False ); @@ -4059,23 +3105,11 @@ throw( RuntimeException ) if ( rEvent.Source == Reference< XInterface >( m_xFrame, UNO_QUERY )) { - // Our frame gets disposed, release all our references that depends on a working - // frame reference. + // Our frame gets disposed, release all our references that depends on a working frame reference. Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - if ( m_pMiscOptions ) - { - m_pMiscOptions->RemoveListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); - delete m_pMiscOptions; - m_pMiscOptions = 0; - } - - delete m_pAddonOptions; - m_pAddonOptions = 0; // destroy all elements, it's possible that dettaching is NOT called! implts_destroyElements(); - - m_aUIElements.clear(); impl_clearUpMenuBar(); m_xMenuBar.clear(); if ( m_xInplaceMenuBar.is() ) @@ -4122,14 +3156,20 @@ throw( RuntimeException ) m_xFrame.clear(); delete m_pGlobalSettings; m_pGlobalSettings = 0; - m_xDockingAreaAcceptor = Reference< ::com::sun::star::ui::XDockingAreaAcceptor >(); + m_xDockingAreaAcceptor = Reference< ui::XDockingAreaAcceptor >(); bDisposeAndClear = sal_True; } else if ( rEvent.Source == Reference< XInterface >( m_xContainerWindow, UNO_QUERY )) { // Our container window gets disposed. Remove all user interface elements. - m_aUIElements.clear(); + uno::Reference< lang::XComponent > xToolbarManager( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + if ( pToolbarManager ) + { + uno::Reference< awt::XWindowPeer > aEmptyWindowPeer; + pToolbarManager->setParentWindow( aEmptyWindowPeer ); + } impl_clearUpMenuBar(); m_xMenuBar.clear(); if ( m_xInplaceMenuBar.is() ) @@ -4142,13 +3182,9 @@ throw( RuntimeException ) m_xContainerTopWindow.clear(); } else if ( rEvent.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY )) - { m_xDocCfgMgr.clear(); - } else if ( rEvent.Source == Reference< XInterface >( m_xModuleCfgMgr , UNO_QUERY )) - { m_xModuleCfgMgr.clear(); - } aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -4157,189 +3193,166 @@ throw( RuntimeException ) if ( bDisposeAndClear ) { // Send message to all listener and forget her references. - css::uno::Reference< css::frame::XLayoutManager > xThis( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ); - css::lang::EventObject aEvent( xThis ); + uno::Reference< frame::XLayoutManager > xThis( static_cast< ::cppu::OWeakObject* >(this), uno::UNO_QUERY ); + lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); } } -void SAL_CALL LayoutManager::elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL LayoutManager::elementInserted( const ui::ConfigurationEvent& Event ) throw (uno::RuntimeException) { ReadGuard aReadLock( m_aLock ); + Reference< XFrame > xFrame( m_xFrame ); + aReadLock.unlock(); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< XUIElement > xElement; - Reference< XFrame > xFrame( m_xFrame ); - - if ( m_xFrame.is() ) + if ( xFrame.is() ) { - implts_findElement( Event.ResourceURL, aElementType, aElementName, xElement ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - Reference< XUIElementSettings > xElementSettings( xElement, UNO_QUERY ); - if ( xElementSettings.is() ) + parseResourceURL( Event.ResourceURL, aElementType, aElementName ); + if ( aElementName.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); - Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); - if ( xPropSet.is() ) + uno::Reference< ui::XUIConfigurationListener > xUICfgListener( m_xToolbarManager, uno::UNO_QUERY ); + if ( xUICfgListener.is() ) + xUICfgListener->elementInserted( Event ); + } + else if ( aElementName.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_MENUBAR )) + { + Reference< XUIElement > xUIElement = implts_findElement( Event.ResourceURL ); + Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); + if ( xElementSettings.is() ) { - if ( Event.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY )) - xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xDocCfgMgr )); + ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); + uno::Reference< XPropertySet > xPropSet( xElementSettings, uno::UNO_QUERY ); + if ( xPropSet.is() ) + { + if ( Event.Source == uno::Reference< uno::XInterface >( m_xDocCfgMgr, uno::UNO_QUERY )) + xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xDocCfgMgr )); + } + xElementSettings->updateSettings(); } - xElementSettings->updateSettings(); + } + } +} + +void SAL_CALL LayoutManager::elementRemoved( const ui::ConfigurationEvent& Event ) throw (uno::RuntimeException) +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + Reference< frame::XFrame > xFrame( m_xFrame ); + Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< ui::XUIElement > xMenuBar( m_xMenuBar ); + Reference< ui::XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr ); + Reference< ui::XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr ); + aReadLock.unlock(); + + + if ( xFrame.is() ) + { + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + parseResourceURL( Event.ResourceURL, aElementType, aElementName ); + if ( aElementName.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + { + if ( xToolbarManager.is() ) + xToolbarManager->elementRemoved( Event ); } else { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && - ( aElementName.indexOf( m_aCustomTbxPrefix ) != -1 )) + Reference< XUIElement > xUIElement = implts_findElement( Event.ResourceURL ); + Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); + if ( xElementSettings.is() ) { - // custom toolbar must be directly created, shown and layouted! - createElement( Event.ResourceURL ); - Reference< XUIElement > xUIElement = getElement( Event.ResourceURL ); - if ( xUIElement.is() ) + bool bNoSettings( false ); + ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); + Reference< XInterface > xElementCfgMgr; + Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); + + if ( xPropSet.is() ) + xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; + + if ( !xElementCfgMgr.is() ) + return; + + // Check if the same UI configuration manager has changed => check further + if ( Event.Source == xElementCfgMgr ) { - Reference< XUIConfigurationManager > xCfgMgr; - Reference< XPropertySet > xPropSet; - ::rtl::OUString aUIName; - - try - { - xCfgMgr = Reference< XUIConfigurationManager >( Event.Source, UNO_QUERY ); - xPropSet = Reference< XPropertySet >( xCfgMgr->getSettings( Event.ResourceURL, sal_False ), UNO_QUERY ); - - if ( xPropSet.is() ) - xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= aUIName; - } - catch ( com::sun::star::container::NoSuchElementException& ) - { - } - catch ( com::sun::star::beans::UnknownPropertyException& ) - { - } - catch ( com::sun::star::lang::WrappedTargetException& ) + // Same UI configuration manager where our element has its settings + if ( Event.Source == Reference< XInterface >( xDocCfgMgr, UNO_QUERY )) { + // document settings removed + if ( xModuleCfgMgr->hasSettings( Event.ResourceURL )) + { + xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xModuleCfgMgr )); + xElementSettings->updateSettings(); + return; + } } - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - pWindow->SetText( aUIName ); - } + bNoSettings = true; + } - showElement( Event.ResourceURL ); + // No settings anymore, element must be destroyed + if ( xContainerWindow.is() && bNoSettings ) + { + if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + { + SystemWindow* pSysWindow = getTopSystemWindow( xContainerWindow ); + if ( pSysWindow && !m_bInplaceMenuSet ) + pSysWindow->SetMenuBar( 0 ); + + Reference< XComponent > xComp( xMenuBar, UNO_QUERY ); + if ( xComp.is() ) + xComp->dispose(); + + WriteGuard aWriteLock( m_aLock ); + m_xMenuBar.clear(); + } } } } } } -void SAL_CALL LayoutManager::elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< XUIElement > xUIElement; - Reference< XFrame > xFrame( m_xFrame ); - - if ( m_xFrame.is() ) - { - implts_findElement( Event.ResourceURL, aElementType, aElementName, xUIElement ); - - Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); - if ( xElementSettings.is() ) - { - bool bNoSettings( false ); - ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); - Reference< XInterface > xElementCfgMgr; - Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); - - if ( xPropSet.is() ) - xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; - - if ( !xElementCfgMgr.is() ) - return; - - // Check if the same UI configuration manager has changed => check further - if ( Event.Source == xElementCfgMgr ) - { - // Same UI configuration manager where our element has its settings - if ( Event.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY )) - { - // document settings removed - if ( m_xModuleCfgMgr->hasSettings( Event.ResourceURL )) - { - xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xModuleCfgMgr )); - xElementSettings->updateSettings(); - return; - } - } - - bNoSettings = true; - } - - // No settings anymore, element must be destroyed - if ( m_xContainerWindow.is() && bNoSettings ) - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow && !m_bInplaceMenuSet ) - ((SystemWindow *)pWindow)->SetMenuBar( 0 ); - - Reference< XComponent > xComp( m_xMenuBar, UNO_QUERY ); - if ( xComp.is() ) - xComp->dispose(); - m_xMenuBar.clear(); - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - destroyElement( Event.ResourceURL ); - } - } - } - } -} - -void SAL_CALL LayoutManager::elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL LayoutManager::elementReplaced( const ui::ConfigurationEvent& Event ) throw (uno::RuntimeException) { ReadGuard aReadLock( m_aLock ); + Reference< XFrame > xFrame( m_xFrame ); + Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + aReadLock.unlock(); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< XUIElement > xUIElement; - Reference< XFrame > xFrame( m_xFrame ); - - if ( m_xFrame.is() ) + if ( xFrame.is() ) { - implts_findElement( Event.ResourceURL, aElementType, aElementName, xUIElement ); + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; - Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); - if ( xElementSettings.is() ) + parseResourceURL( Event.ResourceURL, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + { + if ( xToolbarManager.is() ) + xToolbarManager->elementReplaced( Event ); + } + else { - ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); - Reference< XInterface > xElementCfgMgr; - Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); - - if ( xPropSet.is() ) - xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; - - if ( !xElementCfgMgr.is() ) - return; - - // Check if the same UI configuration manager has changed => update settings - if ( Event.Source == xElementCfgMgr ) + Reference< XUIElement > xUIElement = implts_findElement( Event.ResourceURL ); + Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); + if ( xElementSettings.is() ) { - xElementSettings->updateSettings(); - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - doLayout(); + ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); + Reference< XInterface > xElementCfgMgr; + Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); + + if ( xPropSet.is() ) + xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; + + if ( !xElementCfgMgr.is() ) + return; + + // Check if the same UI configuration manager has changed => update settings + if ( Event.Source == xElementCfgMgr ) + xElementSettings->updateSettings(); } } } @@ -4348,17 +3361,16 @@ void SAL_CALL LayoutManager::elementReplaced( const ::com::sun::star::ui::Config //--------------------------------------------------------------------------------------------------------- // OPropertySetHelper //--------------------------------------------------------------------------------------------------------- -// XPropertySet helper -sal_Bool SAL_CALL LayoutManager::convertFastPropertyValue( Any& aConvertedValue , - Any& aOldValue , - sal_Int32 nHandle , - const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) +sal_Bool SAL_CALL LayoutManager::convertFastPropertyValue( Any& aConvertedValue, + Any& aOldValue, + sal_Int32 nHandle, + const Any& aValue ) throw( lang::IllegalArgumentException ) { return LayoutManager_PBase::convertFastPropertyValue( aConvertedValue, aOldValue, nHandle, aValue ); } -void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , - const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ) +void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, + const uno::Any& aValue ) throw( uno::Exception ) { if ( nHandle != LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY ) LayoutManager_PBase::setFastPropertyValue_NoBroadcast( nHandle, aValue ); @@ -4373,18 +3385,26 @@ void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32 { sal_Bool bValue = sal_Bool(); if (( aValue >>= bValue ) && bValue ) - implts_refreshContextToolbarsVisibility(); + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + + if ( pToolbarManager ) + pToolbarManager->refreshToolbarsVisibility(); + } break; } case LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI: implts_setCurrentUIVisibility( !m_bHideCurrentUI ); break; + default: break; } } -void SAL_CALL LayoutManager::getFastPropertyValue( com::sun::star::uno::Any& aValue , - sal_Int32 nHandle ) const +void SAL_CALL LayoutManager::getFastPropertyValue( uno::Any& aValue, sal_Int32 nHandle ) const { LayoutManager_PBase::getFastPropertyValue( aValue, nHandle ); } @@ -4415,12 +3435,12 @@ void SAL_CALL LayoutManager::getFastPropertyValue( com::sun::star::uno::Any& aVa return(*pInfoHelper); } -com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL LayoutManager::getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException) +uno::Reference< beans::XPropertySetInfo > SAL_CALL LayoutManager::getPropertySetInfo() throw (uno::RuntimeException) { // Optimize this method ! // We initialize a static variable only one time. And we don't must use a mutex at every call! // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >* pInfo = NULL; + static uno::Reference< beans::XPropertySetInfo >* pInfo = NULL; if( pInfo == NULL ) { @@ -4429,10 +3449,10 @@ com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CA // Control this pointer again, another instance can be faster then these! if( pInfo == NULL ) { - // Create structure of propertysetinfo for baseclass "OPropertySetHelper". + // Create structure of propertysetinfo for baseclass "OPropertySetHelper". // (Use method "getInfoHelper()".) - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); - pInfo = &xInfo; + static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + pInfo = &xInfo; } } diff --git a/framework/source/layoutmanager/layoutmanager.cxx.bak b/framework/source/layoutmanager/layoutmanager.cxx.bak deleted file mode 100755 index 82fc4e1a8d71..000000000000 --- a/framework/source/layoutmanager/layoutmanager.cxx.bak +++ /dev/null @@ -1,7388 +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: layoutmanager.cxx,v $ - * $Revision: 1.72 $ - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_framework.hxx" - -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -// ______________________________________________ -// using namespace - -using namespace ::com::sun::star; -using namespace com::sun::star::uno; -using namespace com::sun::star::beans; -using namespace com::sun::star::util; -using namespace com::sun::star::lang; -using namespace com::sun::star::container; -using namespace ::com::sun::star::ui; -using namespace com::sun::star::frame; -using namespace ::com::sun::star::frame; - -#define UIRESOURCE_PROTOCO_ASCII "private:" -#define UIRESOURCE_RESOURCE_ASCII "resource" -#define UIRESOURCE_URL_ASCII "private:resource" -#define UIRESOURCE_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( UIRESOURCE_URL_ASCII )) - -// ATTENTION! -// This value is directly copied from the sfx2 project. -// You have to change BOTH values, see sfx2/inc/sfx2/sfxsids.hrc (SID_DOCKWIN_START) -static const sal_Int32 DOCKWIN_ID_BASE = 9800; - -//_________________________________________________________________________________________________________________ -// Namespace -//_________________________________________________________________________________________________________________ -// - -namespace framework -{ - -struct UIElementVisibility -{ - rtl::OUString aName; - bool bVisible; -}; - -//***************************************************************************************************************** -// XInterface, XTypeProvider, XServiceInfo -//***************************************************************************************************************** -IMPLEMENT_FORWARD_XTYPEPROVIDER2( LayoutManager, LayoutManager_Base, LayoutManager_PBase ) -IMPLEMENT_FORWARD_XINTERFACE2( LayoutManager, LayoutManager_Base, LayoutManager_PBase ) - -DEFINE_XSERVICEINFO_MULTISERVICE ( LayoutManager , - ::cppu::OWeakObject , - SERVICENAME_LAYOUTMANAGER , - IMPLEMENTATIONNAME_LAYOUTMANAGER - ) - -DEFINE_INIT_SERVICE ( LayoutManager, {} ) - - -LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceManager ) - : LayoutManager_Base ( ) - , ThreadHelpBase ( &Application::GetSolarMutex() ) - , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) - , LayoutManager_PBase ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) - , m_xSMGR( xServiceManager ) - , m_xURLTransformer( xServiceManager->createInstance( SERVICENAME_URLTRANSFORMER ), UNO_QUERY ) - , m_xDisplayAccess( xServiceManager->createInstance( SERVICENAME_DISPLAYACCESS ), UNO_QUERY ) - , m_nLockCount( 0 ) - , m_bActive( sal_False ) - , m_bInplaceMenuSet( sal_False ) - , m_bDockingInProgress( sal_False ) - , m_bMenuVisible( sal_True ) - , m_bComponentAttached( sal_False ) - , m_bDoLayout( sal_False ) - , m_bVisible( sal_True ) - , m_bParentWindowVisible( sal_False ) - , m_bMustDoLayout( sal_True ) - , m_bAutomaticToolbars( sal_True ) - , m_bStoreWindowState( sal_False ) - , m_bHideCurrentUI( false ) - , m_bGlobalSettings( sal_False ) - , m_bPreserveContentSize( false ) - , m_eDockOperation( DOCKOP_ON_COLROW ) - , m_pInplaceMenuBar( NULL ) - , m_xModuleManager( Reference< XModuleManager >( - xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY )) - , m_xUIElementFactoryManager( Reference< ::com::sun::star::ui::XUIElementFactory >( - xServiceManager->createInstance( SERVICENAME_UIELEMENTFACTORYMANAGER ), UNO_QUERY )) - , m_bMenuBarCloser( sal_False ) - , m_xPersistentWindowStateSupplier( Reference< XNameAccess >( - xServiceManager->createInstance( SERVICENAME_WINDOWSTATECONFIGURATION ), UNO_QUERY )) - , m_pGlobalSettings( 0 ) - , m_aCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "custom_" )) - , m_aFullCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/custom_" )) - , m_aFullAddonTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )) - , m_aStatusBarAlias( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" )) - , m_aProgressBarAlias( RTL_CONSTASCII_USTRINGPARAM( "private:resource/progressbar/progressbar" )) - , m_aPropDocked( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKED )) - , m_aPropVisible( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_VISIBLE )) - , m_aPropDockingArea( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKINGAREA )) - , m_aPropDockPos( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_DOCKPOS )) - , m_aPropPos( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_POS )) - , m_aPropSize( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_SIZE )) - , m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_UINAME )) - , m_aPropStyle( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_STYLE )) - , m_aPropLocked( RTL_CONSTASCII_USTRINGPARAM( WINDOWSTATE_PROPERTY_LOCKED )) - , m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )) - , m_pAddonOptions( 0 ) - , m_aListenerContainer( m_aLock.getShareableOslMutex() ) - , m_pPanelManager( 0 ) -{ - // Initialize statusbar member - m_aStatusBarElement.m_aType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "statusbar" )); - m_aStatusBarElement.m_aName = m_aStatusBarAlias; - - m_pMiscOptions = new SvtMiscOptions(); - - m_pMiscOptions->AddListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); - Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - m_eSymbolsSize = m_pMiscOptions->GetSymbolsSize(); - m_eSymbolsStyle = m_pMiscOptions->GetCurrentSymbolsStyle(); - - m_aAsyncLayoutTimer.SetTimeout( 50 ); - m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) ); - - registerProperty( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, ::getCppuType( &m_bAutomaticToolbars ) ); - registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, css::beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, ::getCppuType( &m_bHideCurrentUI ) ); - registerProperty( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY, &m_nLockCount, getCppuType( &m_nLockCount ) ); - registerProperty( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, css::beans::PropertyAttribute::TRANSIENT, &m_bMenuBarCloser, ::getCppuType( &m_bMenuBarCloser ) ); - const sal_Bool bRefreshVisibility = sal_False; - registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, css::beans::PropertyAttribute::TRANSIENT, ::getCppuType( &bRefreshVisibility ), &bRefreshVisibility ); - registerProperty( LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, css::beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, ::getCppuType( &m_bPreserveContentSize ) ); -} - -LayoutManager::~LayoutManager() -{ - Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - if ( m_pMiscOptions ) - { - m_pMiscOptions->RemoveListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); - delete m_pMiscOptions; - m_pMiscOptions = 0; - } - m_aAsyncLayoutTimer.Stop(); -} - -// Internal helper function -void LayoutManager::impl_clearUpMenuBar() -{ - implts_lock(); - - // Clear up VCL menu bar to prepare shutdown - if ( m_xContainerWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - MenuBar* pSetMenuBar = 0; - if ( m_xInplaceMenuBar.is() ) - pSetMenuBar = (MenuBar *)m_pInplaceMenuBar->GetMenuBar(); - else - { - Reference< css::awt::XMenuBar > xMenuBar; - - Reference< XPropertySet > xPropSet( m_xMenuBar, UNO_QUERY ); - if ( xPropSet.is() ) - { - try - { - xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar; - } - catch ( com::sun::star::beans::UnknownPropertyException ) - { - } - catch ( com::sun::star::lang::WrappedTargetException ) - { - } - } - - VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); - if ( pAwtMenuBar ) - pSetMenuBar = (MenuBar*)pAwtMenuBar->GetMenu(); - } - - MenuBar* pTopMenuBar = ((SystemWindow *)pWindow)->GetMenuBar(); - if ( pSetMenuBar == pTopMenuBar ) - ((SystemWindow *)pWindow)->SetMenuBar( 0 ); - } - } - - // reset inplace menubar manager - m_pInplaceMenuBar = 0; - if ( m_xInplaceMenuBar.is() ) - { - m_xInplaceMenuBar->dispose(); - m_xInplaceMenuBar.clear(); - } - - Reference< XComponent > xComp( m_xMenuBar, UNO_QUERY ); - if ( xComp.is() ) - xComp->dispose(); - m_xMenuBar.clear(); - implts_unlock(); -} - -sal_Bool LayoutManager::impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ) -{ - URL aURL; - sal_Int32 nIndex = 0; - - aURL.Complete = aResourceURL; - m_xURLTransformer->parseStrict( aURL ); - - ::rtl::OUString aUIResource = aURL.Path.getToken( 0, (sal_Unicode)'/', nIndex ); - - if (( aURL.Protocol.equalsIgnoreAsciiCaseAscii( UIRESOURCE_PROTOCO_ASCII )) && - ( aUIResource.equalsIgnoreAsciiCaseAscii( UIRESOURCE_RESOURCE_ASCII ))) - { - aElementType = aURL.Path.getToken( 0, (sal_Unicode)'/', nIndex ); - aElementName = aURL.Path.getToken( 0, (sal_Unicode)'/', nIndex ); - return sal_True; - } - - return sal_False; -} - -void LayoutManager::implts_lock() -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - ++m_nLockCount; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ -} - -sal_Bool LayoutManager::implts_unlock() -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - --m_nLockCount; - if ( m_nLockCount < 0 ) - m_nLockCount = 0; - return ( m_nLockCount == 0 ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ -} - -void LayoutManager::implts_reset( sal_Bool bAttached ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - Reference< XFrame > xFrame = m_xFrame; - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - Reference< css::awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - Reference< css::awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - Reference< css::awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; - Reference< css::awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; - Reference< XUIConfiguration > xModuleCfgMgr( m_xModuleCfgMgr, UNO_QUERY ); - Reference< XUIConfiguration > xDocCfgMgr( m_xDocCfgMgr, UNO_QUERY ); - Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - Reference< XMultiServiceFactory > xServiceManager( m_xSMGR ); - Reference< XNameAccess > xPersistentWindowStateSupplier( m_xPersistentWindowStateSupplier ); - ::rtl::OUString aModuleIdentifier( m_aModuleIdentifier ); - sal_Bool bAutomaticToolbars( m_bAutomaticToolbars ); - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - implts_lock(); - - Reference< XModel > xModel; - if ( xFrame.is() ) - { - if ( bAttached ) - { - ::rtl::OUString aOldModuleIdentifier( aModuleIdentifier ); - try - { - aModuleIdentifier = m_xModuleManager->identify( Reference< XInterface >( xFrame, UNO_QUERY ) ); - } - catch( Exception& ) - { - } - - if ( aModuleIdentifier.getLength() && aOldModuleIdentifier != aModuleIdentifier ) - { - Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier; - if ( xServiceManager.is() ) - xModuleCfgSupplier = Reference< XModuleUIConfigurationManagerSupplier >( - xServiceManager->createInstance( SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ), UNO_QUERY ); - - if ( xModuleCfgMgr.is() ) - { - try - { - // Remove listener to old module ui configuration manager - xModuleCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - } - - try - { - // Add listener to new module ui configuration manager - xModuleCfgMgr = Reference< XUIConfiguration >( xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier ), UNO_QUERY ); - if ( xModuleCfgMgr.is() ) - xModuleCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - - try - { - // Retrieve persistent window state reference for our new module - if ( xPersistentWindowStateSupplier.is() ) - xPersistentWindowStateSupplier->getByName( aModuleIdentifier ) >>= xPersistentWindowState; - } - catch ( NoSuchElementException& ) - { - } - catch ( WrappedTargetException& ) - { - } - } - - xModel = impl_getModelFromFrame( xFrame ); - if ( xModel.is() ) - { - Reference< XUIConfigurationManagerSupplier > xUIConfigurationManagerSupplier( xModel, UNO_QUERY ); - if ( xUIConfigurationManagerSupplier.is() ) - { - if ( xDocCfgMgr.is() ) - { - try - { - // Remove listener to old ui configuration manager - xDocCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - } - - try - { - xDocCfgMgr = Reference< XUIConfiguration >( xUIConfigurationManagerSupplier->getUIConfigurationManager(), UNO_QUERY ); - if ( xDocCfgMgr.is() ) - xDocCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - } - } - } - else - { - // Remove configuration listeners before we can release our references - if ( xModuleCfgMgr.is() ) - { - try - { - xModuleCfgMgr->removeConfigurationListener( - Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - } - - if ( xDocCfgMgr.is() ) - { - try - { - xDocCfgMgr->removeConfigurationListener( - Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - } - - // Release references to our configuration managers as we currently don't have - // an attached module. - xModuleCfgMgr.clear(); - xDocCfgMgr.clear(); - xPersistentWindowState.clear(); - aModuleIdentifier = ::rtl::OUString(); - } - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_xModel = xModel; - m_aDockingArea = css::awt::Rectangle(); - m_bComponentAttached = bAttached; - m_aModuleIdentifier = aModuleIdentifier; - m_xModuleCfgMgr = Reference< XUIConfigurationManager >( xModuleCfgMgr, UNO_QUERY ); - m_xDocCfgMgr = Reference< XUIConfigurationManager >( xDocCfgMgr, UNO_QUERY ); - m_xPersistentWindowState = xPersistentWindowState; - m_aStatusBarElement.m_bStateRead = sal_False; // reset state to read data again! - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( bAttached ) - { - // reset docking area windows back to zero size - try - { - if ( xTopDockingWindow.is() ) - xTopDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xLeftDockingWindow.is() ) - xLeftDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xRightDockingWindow.is() ) - xRightDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xBottomDockingWindow.is() ) - xBottomDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - } - catch ( Exception& ) - { - } - - if ( bAutomaticToolbars ) - { - implts_createCustomToolBars(); - implts_createAddonsToolBars(); - implts_createNonContextSensitiveToolBars(); - } - implts_sortUIElements(); - } - else - implts_destroyElements(); - } - - implts_unlock(); -} - -sal_Bool LayoutManager::implts_isEmbeddedLayoutManager() const -{ - // check if this layout manager is currently using the embedded feature - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - Reference< XFrame > xFrame = m_xFrame; - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - Reference< css::awt::XWindow > xFrameContainerWindow = xFrame->getContainerWindow(); - if ( xFrameContainerWindow == xContainerWindow ) - return sal_False; - else - return sal_True; -} - -void LayoutManager::implts_destroyElements() -{ - UIElementVector aUIElementVector; - - WriteGuard aWriteLock( m_aLock ); - aUIElementVector = m_aUIElements; - m_aUIElements.clear(); - aWriteLock.unlock(); - - UIElementVector::iterator pIter; - for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) - { - Reference< XComponent > xComponent( pIter->m_xUIElement, UNO_QUERY ); - if ( xComponent.is() ) - xComponent->dispose(); - } - - implts_destroyStatusBar(); - - aWriteLock.lock(); - impl_clearUpMenuBar(); - aWriteLock.unlock(); -} - -void LayoutManager::implts_destroyDockingAreaWindows() -{ - std::vector< Reference< css::awt::XWindow > > oldDockingAreaWindows; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] ); - - m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT].clear(); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - const sal_uInt32 nCount = oldDockingAreaWindows.size(); - for ( sal_uInt32 i=0; i < nCount; i++ ) - { - if ( oldDockingAreaWindows[i].is() ) - { - try - { - oldDockingAreaWindows[i]->dispose(); - } - catch ( Exception& ) - { - } - } - } -} - -void LayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ) -{ - if ( aTbxResName.getLength() > 0 ) - { - createElement( aTbxResName ); - if ( aTitle ) - { - Reference< XUIElement > xUIElement = getElement( aTbxResName ); - if ( xUIElement.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - pWindow->SetText( aTitle ); - } - } - } -} - -void LayoutManager::implts_createCustomToolBars( - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aTbxSeqSeq ) -{ - const Sequence< PropertyValue >* pTbxSeq = aTbxSeqSeq.getConstArray(); - for ( sal_Int32 i = 0; i < aTbxSeqSeq.getLength(); i++ ) - { - const Sequence< PropertyValue >& rTbxSeq = pTbxSeq[i]; - ::rtl::OUString aTbxResName; - ::rtl::OUString aTbxTitle; - for ( sal_Int32 j = 0; j < rTbxSeq.getLength(); j++ ) - { - if ( rTbxSeq[j].Name.equalsAscii( "ResourceURL" )) - rTbxSeq[j].Value >>= aTbxResName; - else if ( rTbxSeq[j].Name.equalsAscii( "UIName" )) - rTbxSeq[j].Value >>= aTbxTitle; - } - - // Only create custom toolbars. Their name have to start with "custom_"! - if ( aTbxResName.getLength() > 0 && aTbxResName.indexOf( m_aCustomTbxPrefix ) != -1 ) - implts_createCustomToolBar( aTbxResName, aTbxTitle ); - } -} - -void LayoutManager::implts_createCustomToolBars() -{ - ReadGuard aReadLock( m_aLock ); - if ( !m_bComponentAttached ) - return; - - Reference< XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); - Reference< XFrame > xFrame( m_xFrame ); - Reference< XModel > xModel; - Reference< XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr, UNO_QUERY ); - Reference< XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr, UNO_QUERY ); - aReadLock.unlock(); - - if ( xFrame.is() ) - { - xModel = impl_getModelFromFrame( xFrame ); - if ( implts_isPreviewModel( xModel )) - return; // no custom toolbars for preview frame! - - Sequence< Sequence< PropertyValue > > aTbxSeq; - if ( xDocCfgMgr.is() ) - { - aTbxSeq = xDocCfgMgr->getUIElementsInfo( UIElementType::TOOLBAR ); - implts_createCustomToolBars( aTbxSeq ); // first create all document based toolbars - } - if ( xModuleCfgMgr.is() ) - { - aTbxSeq = xModuleCfgMgr->getUIElementsInfo( UIElementType::TOOLBAR ); - implts_createCustomToolBars( aTbxSeq ); // second create module based toolbars - } - } -} - -rtl::OUString LayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const -{ - String aAddonGenericTitle; - - aAddonGenericTitle = String( FwkResId( STR_TOOLBAR_TITLE_ADDON )); - const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - - String aNumStr = rI18nHelper.GetNum( nNumber, 0, FALSE, FALSE ); - aAddonGenericTitle.SearchAndReplaceAscii( "%num%", aNumStr ); - - return rtl::OUString( aAddonGenericTitle ); -} - -void LayoutManager::implts_createAddonsToolBars() -{ - WriteGuard aWriteLock( m_aLock ); - if ( !m_bComponentAttached ) - return; - - Reference< XModel > xModel; - Reference< XFrame > xFrame( m_xFrame ); - if ( !xFrame.is() ) - return; - - if ( !m_pAddonOptions ) - m_pAddonOptions = new AddonsOptions; - - Reference< XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); - aWriteLock.unlock(); - - xModel = impl_getModelFromFrame( xFrame ); - if ( implts_isPreviewModel( xModel )) - return; // no addon toolbars for preview frame! - - UIElementVector aUIElementVector; - Sequence< Sequence< PropertyValue > > aAddonToolBarData; - Reference< XUIElement > xUIElement; - - sal_uInt32 nCount = m_pAddonOptions->GetAddonsToolBarCount(); - ::rtl::OUString aAddonsToolBarStaticName( m_aFullAddonTbxPrefix ); - ::rtl::OUString aElementType( RTL_CONSTASCII_USTRINGPARAM( "toolbar" )); - - Sequence< PropertyValue > aPropSeq( 2 ); - aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); - aPropSeq[0].Value <<= xFrame; - aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationData" )); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - ::rtl::OUString aAddonToolBarName( aAddonsToolBarStaticName + m_pAddonOptions->GetAddonsToolbarResourceName(i) ); - aAddonToolBarData = m_pAddonOptions->GetAddonsToolBarPart( i ); - aPropSeq[1].Value <<= aAddonToolBarData; - - aWriteLock.lock(); - UIElement aElement = impl_findElement( aAddonToolBarName ); - aWriteLock.unlock(); - - // #i79828 - // It's now possible that we are called more than once. Be sure to not create - // add-on toolbars more than once! - if ( aElement.m_xUIElement.is() ) - continue; - - try - { - xUIElement = xUIElementFactory->createUIElement( aAddonToolBarName, aPropSeq ); - if ( xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), UNO_QUERY ); - if ( xDockWindow.is() ) - { - try - { - xDockWindow->addDockableWindowListener( Reference< css::awt::XDockableWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); - xDockWindow->enableDocking( sal_True ); - Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); - if ( xWindow.is() ) - xWindow->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - } - - ::rtl::OUString aGenericAddonTitle = implts_generateGenericAddonToolbarTitle( i+1 ); - - if ( aElement.m_aName.getLength() > 0 ) - { - // Reuse a local entry so we are able to use the latest - // UI changes for this document. - implts_setElementData( aElement, xDockWindow ); - aElement.m_xUIElement = xUIElement; - if ( aElement.m_aUIName.getLength() == 0 ) - { - aElement.m_aUIName = aGenericAddonTitle; - implts_writeWindowStateData( aElement.m_aName, aElement ); - } - } - else - { - // Create new UI element and try to read its state data - UIElement aNewToolbar( aAddonToolBarName, aElementType, xUIElement ); - aNewToolbar.m_bFloating = sal_True; - implts_readWindowStateData( aAddonToolBarName, aNewToolbar ); - implts_setElementData( aNewToolbar, xDockWindow ); - if ( aNewToolbar.m_aUIName.getLength() == 0 ) - { - aNewToolbar.m_aUIName = aGenericAddonTitle; - implts_writeWindowStateData( aNewToolbar.m_aName, aNewToolbar ); - } - implts_insertUIElement( aNewToolbar ); - } - - Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); - if ( xWindow.is() ) - { - // Set generic title for add-on toolbar - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow->GetText().Len() == 0 ) - pWindow->SetText( aGenericAddonTitle ); - if ( pWindow->GetType() == WINDOW_TOOLBOX ) - { - ToolBox* pToolbar = (ToolBox *)pWindow; - pToolbar->SetMenuType(); - } - } - } - } - catch ( NoSuchElementException& ) - { - } - catch ( IllegalArgumentException& ) - { - } - } -} - -void LayoutManager::implts_createNonContextSensitiveToolBars() -{ - ReadGuard aReadLock( m_aLock ); - - if ( !m_xPersistentWindowState.is() || - !m_xFrame.is() || - !m_bComponentAttached ) - return; - - Reference< XFrame > xFrame( m_xFrame ); - - Reference< XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); - Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - aReadLock.unlock(); - - if ( implts_isPreviewModel( impl_getModelFromFrame( xFrame ))) - return; - - std::vector< rtl::OUString > aMakeVisibleToolbars; - - try - { - Sequence< rtl::OUString > aToolbarNames = xPersistentWindowState->getElementNames(); - - if ( aToolbarNames.getLength() > 0 ) - { - rtl::OUString aElementType; - rtl::OUString aElementName; - rtl::OUString aName; - - Reference< ::com::sun::star::ui::XUIElement > xUIElement; - aMakeVisibleToolbars.reserve(aToolbarNames.getLength()); - WriteGuard aWriteLock( m_aLock ); - - const rtl::OUString* pTbNames = aToolbarNames.getConstArray(); - for ( sal_Int32 i = 0; i < aToolbarNames.getLength(); i++ ) - { - aName = pTbNames[i]; - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - // Check that we only create: - // - Toolbars (the statusbar is also member of the persistent window state) - // - Not custom toolbars, there are created with their own method (implts_createCustomToolbars) - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && - aElementName.indexOf( m_aCustomTbxPrefix ) == -1 ) - { - UIElement aNewToolbar( aName, aElementType, xUIElement ); - bool bFound = implts_findElement( aName, aNewToolbar ); - if ( !bFound ) - implts_readWindowStateData( aName, aNewToolbar ); - - if ( aNewToolbar.m_bVisible && - !aNewToolbar.m_bContextSensitive ) - { - if ( !bFound ) - implts_insertUIElement( aNewToolbar ); - aMakeVisibleToolbars.push_back( aName ); - } - } - } - } - } - } - catch ( RuntimeException& e ) - { - throw e; - } - catch ( Exception& ) - { - } - - if ( !aMakeVisibleToolbars.empty() ) - { - implts_lock(); - ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &LayoutManager::requestElement, this,_1 )); - implts_unlock(); - } -} - -void LayoutManager::implts_toggleFloatingUIElementsVisibility( sal_Bool bActive ) -{ - WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); - if ( xDockWindow.is() && xWindow.is() ) - { - sal_Bool bVisible( sal_True ); - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - bVisible = pWindow->IsVisible(); - - if ( xDockWindow->isFloating() ) - { - if ( bActive ) - { - if ( !bVisible && pIter->m_bDeactiveHide ) - { - pIter->m_bDeactiveHide = sal_False; - // we need VCL here to pass special flags to Show() - if( pWindow ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - //xWindow->setVisible( sal_True ); - } - } - else - { - if ( bVisible ) - { - pIter->m_bDeactiveHide = sal_True; - xWindow->setVisible( sal_False ); - } - } - } - } - } - } -} - -sal_Bool LayoutManager::implts_findElement( const rtl::OUString& aName, rtl::OUString& aElementType, rtl::OUString& aElementName, Reference< XUIElement >& xUIElement ) -{ - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - ReadGuard aReadLock( m_aLock ); - xUIElement = m_xMenuBar; - return sal_True; - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - ReadGuard aReadLock( m_aLock ); - xUIElement = m_aStatusBarElement.m_xUIElement; - return sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) - { - ReadGuard aReadLock( m_aLock ); - xUIElement = m_aProgressBarElement.m_xUIElement; - return sal_True; - } - else - { - UIElementVector::const_iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName ) - { - xUIElement = pIter->m_xUIElement; - return sal_True; - } - } - } - } - - return sal_False; -} - -sal_Bool LayoutManager::implts_findElement( const Reference< XInterface >& xUIElement, UIElement& aElementData ) -{ - UIElementVector::const_iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - { - Reference< XInterface > xIfac( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xIfac == xUIElement ) - { - aElementData = *pIter; - return sal_True; - } - } - } - - return sal_False; -} - -sal_Bool LayoutManager::implts_findElement( const rtl::OUString& aName, UIElement& aElementData ) -{ - UIElementVector::const_iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName ) - { - aElementData = *pIter; - return sal_True; - } - } - - return sal_False; -} - -UIElement& LayoutManager::impl_findElement( const rtl::OUString& aName ) -{ - static UIElement aEmptyElement; - - UIElementVector::iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName ) - return *pIter; - } - - return aEmptyElement; -} - -sal_Bool LayoutManager::implts_insertUIElement( const UIElement& rUIElement ) -{ - UIElement aTempData; - bool bFound = implts_findElement( rUIElement.m_aName, aTempData ); - -#ifdef DBG_UTIL - if ( bFound ) - { - char aBuffer[256]; - const sal_Int32 MAX_NAME_LENGTH = 128; - ::rtl::OString aName = ::rtl::OUStringToOString( rUIElement.m_aName, RTL_TEXTENCODING_ASCII_US ); - aName = aName.copy( ::std::min( MAX_NAME_LENGTH, aName.getLength() )); - sprintf( aBuffer, "Try to insert an already existing user interface element (%s) into the list\n", aName.getStr() ); - DBG_ASSERT( bFound, aBuffer ); - } -#endif - - bool bResult( false ); - if ( !bFound ) - { - WriteGuard aWriteLock( m_aLock ); - m_aUIElements.push_back( rUIElement ); - bResult = true; - } - return bResult; -} - -void LayoutManager::implts_writeNewStateData( const rtl::OUString aName, const Reference< css::awt::XWindow >& xWindow ) -{ - css::awt::Rectangle aPos; - css::awt::Size aSize; - sal_Bool bVisible( sal_False ); - sal_Bool bFloating( sal_True ); - - if ( xWindow.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow.is() ) - bFloating = xDockWindow->isFloating(); - - Reference< css::awt::XWindow2 > xWindow2( xWindow, UNO_QUERY ); - if( xWindow2.is() ) - { - aPos = xWindow2->getPosSize(); - aSize = xWindow2->getOutputSize(); // always use output size for consistency - bVisible = xWindow2->isVisible(); - } - } - - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = impl_findElement( aName ); - if ( rUIElement.m_xUIElement.is() && xWindow.is() ) - { - rUIElement.m_bVisible = bVisible; - rUIElement.m_bFloating = bFloating; - if ( bFloating ) - { - rUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); - rUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); - } - } - - implts_writeWindowStateData( aName, rUIElement ); - - aWriteLock.unlock(); -} - -void LayoutManager::implts_refreshContextToolbarsVisibility() -{ - std::vector< UIElementVisibility > aToolbarVisibleVector; - - ReadGuard aReadLock( m_aLock ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - if ( !m_bVisible || !m_bAutomaticToolbars ) - return; - - UIElementVisibility aUIElementVisible; - - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aType.equalsAsciiL( "toolbar", 7 )) - { - aUIElementVisible.aName = pIter->m_aName; - aUIElementVisible.bVisible = pIter->m_bVisible; - aToolbarVisibleVector.push_back( aUIElementVisible ); - } - } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - aReadLock.unlock(); - - UIElement aUIElement; - const sal_uInt32 nCount = aToolbarVisibleVector.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - UIElementVisibility& rToolbar = aToolbarVisibleVector[i]; - - sal_Bool bVisible = rToolbar.bVisible; - if ( implts_readWindowStateData( rToolbar.aName, aUIElement ) && - aUIElement.m_bVisible != bVisible ) - { - WriteGuard aWriteLock( m_aLock ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - UIElement& rUIElement = impl_findElement( rToolbar.aName ); - - if ( rUIElement.m_aName == rToolbar.aName ) - rUIElement.m_bVisible = aUIElement.m_bVisible; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - aWriteLock.unlock(); - } - } -} - -sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ) -{ - sal_Bool bGetSettingsState( sal_False ); - - WriteGuard aWriteLock( m_aLock ); - Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - aWriteLock.unlock(); - - if ( xPersistentWindowState.is() ) - { - aWriteLock.lock(); - sal_Bool bGlobalSettings( m_bGlobalSettings ); - GlobalSettings* pGlobalSettings( 0 ); - if ( m_pGlobalSettings == 0 ) - { - m_pGlobalSettings = new GlobalSettings( m_xSMGR ); - bGetSettingsState = sal_True; - } - pGlobalSettings = m_pGlobalSettings; - aWriteLock.unlock(); - - try - { - Sequence< PropertyValue > aWindowState; - if ( xPersistentWindowState->getByName( aName ) >>= aWindowState ) - { - sal_Bool bValue( sal_False ); - for ( sal_Int32 n = 0; n < aWindowState.getLength(); n++ ) - { - if ( aWindowState[n].Name == m_aPropDocked ) - { - if ( aWindowState[n].Value >>= bValue ) - rElementData.m_bFloating = !bValue; - } - else if ( aWindowState[n].Name == m_aPropVisible ) - { - if ( aWindowState[n].Value >>= bValue ) - rElementData.m_bVisible = bValue; - } - else if ( aWindowState[n].Name == m_aPropDockingArea ) - { - ::com::sun::star::ui::DockingArea eDockingArea; - if ( aWindowState[n].Value >>= eDockingArea ) - rElementData.m_aDockedData.m_nDockedArea = sal_Int16( eDockingArea ); - } - else if ( aWindowState[n].Name == m_aPropDockPos ) - { - css::awt::Point aPoint; - if ( aWindowState[n].Value >>= aPoint ) - { - rElementData.m_aDockedData.m_aPos.X() = aPoint.X; - rElementData.m_aDockedData.m_aPos.Y() = aPoint.Y; - } - } - else if ( aWindowState[n].Name == m_aPropPos ) - { - css::awt::Point aPoint; - if ( aWindowState[n].Value >>= aPoint ) - { - rElementData.m_aFloatingData.m_aPos.X() = aPoint.X; - rElementData.m_aFloatingData.m_aPos.Y() = aPoint.Y; - } - } - else if ( aWindowState[n].Name == m_aPropSize ) - { - css::awt::Size aSize; - if ( aWindowState[n].Value >>= aSize ) - { - rElementData.m_aFloatingData.m_aSize.Width() = aSize.Width; - rElementData.m_aFloatingData.m_aSize.Height() = aSize.Height; - } - } - else if ( aWindowState[n].Name == m_aPropUIName ) - aWindowState[n].Value >>= rElementData.m_aUIName; - else if ( aWindowState[n].Name == m_aPropStyle ) - { - sal_Int32 nStyle = 0; - if ( aWindowState[n].Value >>= nStyle ) - rElementData.m_nStyle = sal_Int16( nStyle ); - } - else if ( aWindowState[n].Name == m_aPropLocked ) - { - if ( aWindowState[n].Value >>= bValue ) - rElementData.m_aDockedData.m_bLocked = bValue; - } - else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXT )) - { - if ( aWindowState[n].Value >>= bValue ) - rElementData.m_bContextSensitive = bValue; - } - else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_NOCLOSE )) - { - if ( aWindowState[n].Value >>= bValue ) - rElementData.m_bNoClose = bValue; - } - else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXTACTIVE )) - { - if ( aWindowState[n].Value >>= bValue ) - rElementData.m_bContextActive = bValue; - } - else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_SOFTCLOSE )) - { - if ( aWindowState[n].Value >>= bValue ) - rElementData.m_bSoftClose = bValue; - } - } - } - - // oversteer values with global settings - if ( pGlobalSettings && ( bGetSettingsState || bGlobalSettings )) - { - if ( pGlobalSettings->HasStatesInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR )) - { - WriteGuard aWriteLock2( m_aLock ); - m_bGlobalSettings = sal_True; - aWriteLock2.unlock(); - - css::uno::Any aValue; - sal_Bool bValue = sal_Bool(); - if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR, - GlobalSettings::STATEINFO_LOCKED, - aValue )) - aValue >>= rElementData.m_aDockedData.m_bLocked; - if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR, - GlobalSettings::STATEINFO_DOCKED, - aValue )) - { - if ( aValue >>= bValue ) - rElementData.m_bFloating = !bValue; - } - } - } - - return sal_True; - } - catch ( NoSuchElementException& ) - { - } - } - - return sal_False; -} - -void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, const UIElement& rElementData ) -{ - WriteGuard aWriteLock( m_aLock ); - Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - - // set flag to determine that we triggered the notification - m_bStoreWindowState = sal_True; - aWriteLock.unlock(); - - sal_Bool bPersistent( sal_False ); - Reference< XPropertySet > xPropSet( rElementData.m_xUIElement, UNO_QUERY ); - if ( xPropSet.is() ) - { - try - { - // Check persistent flag of the user interface element - xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" ))) >>= bPersistent; - } - catch ( com::sun::star::beans::UnknownPropertyException ) - { - // Non-configurable elements should at least store their dimension/position - bPersistent = sal_True; - } - catch ( com::sun::star::lang::WrappedTargetException ) - { - } - } - - if ( bPersistent && xPersistentWindowState.is() ) - { - try - { - Sequence< PropertyValue > aWindowState( 8 ); - - aWindowState[0].Name = m_aPropDocked; - aWindowState[0].Value = makeAny( sal_Bool( !rElementData.m_bFloating )); - aWindowState[1].Name = m_aPropVisible; - aWindowState[1].Value = makeAny( sal_Bool( rElementData.m_bVisible )); - - aWindowState[2].Name = m_aPropDockingArea; - aWindowState[2].Value = makeAny( static_cast< DockingArea >( rElementData.m_aDockedData.m_nDockedArea ) ); - - css::awt::Point aPos; - aPos.X = rElementData.m_aDockedData.m_aPos.X(); - aPos.Y = rElementData.m_aDockedData.m_aPos.Y(); - aWindowState[3].Name = m_aPropDockPos; - aWindowState[3].Value <<= aPos; - - aPos.X = rElementData.m_aFloatingData.m_aPos.X(); - aPos.Y = rElementData.m_aFloatingData.m_aPos.Y(); - aWindowState[4].Name = m_aPropPos; - aWindowState[4].Value <<= aPos; - - css::awt::Size aSize; - aSize.Width = rElementData.m_aFloatingData.m_aSize.Width(); - aSize.Height = rElementData.m_aFloatingData.m_aSize.Height(); - aWindowState[5].Name = m_aPropSize; - aWindowState[5].Value <<= aSize; - aWindowState[6].Name = m_aPropUIName; - aWindowState[6].Value = makeAny( rElementData.m_aUIName ); - aWindowState[7].Name = m_aPropLocked; - aWindowState[7].Value = makeAny( rElementData.m_aDockedData.m_bLocked ); - - if ( xPersistentWindowState->hasByName( aName )) - { - Reference< XNameReplace > xReplace( xPersistentWindowState, uno::UNO_QUERY ); - xReplace->replaceByName( aName, makeAny( aWindowState )); - } - else - { - Reference< XNameContainer > xInsert( xPersistentWindowState, uno::UNO_QUERY ); - xInsert->insertByName( aName, makeAny( aWindowState )); - } - } - catch ( Exception& ) - { - } - } - - // Reset flag - aWriteLock.lock(); - m_bStoreWindowState = sal_False; - aWriteLock.unlock(); -} - -void LayoutManager::implts_setElementData( UIElement& rElement, const Reference< css::awt::XDockableWindow >& rDockWindow ) -{ - ReadGuard aReadLock( m_aLock ); - sal_Bool bShowElement( rElement.m_bVisible && !rElement.m_bMasterHide && m_bParentWindowVisible ); - aReadLock.unlock(); - - Reference< css::awt::XDockableWindow > xDockWindow( rDockWindow ); - Reference< css::awt::XWindow2 > xWindow( xDockWindow, UNO_QUERY ); - - Window* pWindow( 0 ); - ToolBox* pToolBox( 0 ); - - if ( xDockWindow.is() && xWindow.is() ) - { - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - String aText = pWindow->GetText(); - if ( aText.Len() == 0 ) - pWindow->SetText( rElement.m_aUIName ); - if ( rElement.m_bNoClose ) - pWindow->SetStyle( pWindow->GetStyle() & ~WB_CLOSEABLE ); - if ( pWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pWindow; - } - if ( pToolBox ) - { - if (( rElement.m_nStyle < 0 ) || - ( rElement.m_nStyle > BUTTON_SYMBOLTEXT )) - rElement.m_nStyle = BUTTON_SYMBOL; - pToolBox->SetButtonType( (ButtonType)rElement.m_nStyle ); - if ( rElement.m_bNoClose ) - pToolBox->SetFloatStyle( pToolBox->GetFloatStyle() & ~WB_CLOSEABLE ); - } - } - - if ( rElement.m_bFloating ) - { - if ( pWindow ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - String aText = pWindow->GetText(); - if ( aText.Len() == 0 ) - pWindow->SetText( rElement.m_aUIName ); - } - - ::Point aPos( rElement.m_aFloatingData.m_aPos.X(), - rElement.m_aFloatingData.m_aPos.Y() ); - sal_Bool bWriteData( sal_False ); - sal_Bool bUndefPos = ( rElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || - rElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); - sal_Bool bSetSize = ( rElement.m_aFloatingData.m_aSize.Width() != 0 && - rElement.m_aFloatingData.m_aSize.Height() != 0 ); - xDockWindow->setFloatingMode( sal_True ); - if ( bUndefPos ) - { - aPos = implts_findNextCascadeFloatingPos(); - rElement.m_aFloatingData.m_aPos = aPos; // set new cascaded position - bWriteData = sal_True; - } - - if( bSetSize ) - xWindow->setOutputSize( AWTSize( rElement.m_aFloatingData.m_aSize ) ); - else - { - if( pToolBox ) - { - // set an optimal initial floating size - vos::OGuard aGuard( Application::GetSolarMutex() ); - ::Size aSize( pToolBox->CalcFloatingWindowSizePixel() ); - pToolBox->SetOutputSizePixel( aSize ); - } - } - - // #i60882# IMPORTANT: Set position after size as it is - // possible that we position some part of the toolbar - // outside of the desktop. A default constructed toolbar - // always has one line. Now VCL automatically - // position the toolbar back into the desktop. Therefore - // we resize the toolbar with the new (wrong) position. - // To fix this problem we have to set the size BEFORE the - // position. - xWindow->setPosSize( aPos.X(), aPos.Y(), 0, 0, - css::awt::PosSize::POS ); - - if ( bWriteData ) - implts_writeWindowStateData( rElement.m_aName, rElement ); - if ( bShowElement && pWindow ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - } - } - else - { - ::Point aDockPos; - ::Point aPixelPos; - sal_Bool bSetSize( sal_False ); - ::Size aSize; - - if ( pToolBox ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pToolBox->SetAlign( ImplConvertAlignment(rElement.m_aDockedData.m_nDockedArea ) ); - pToolBox->SetLineCount( 1 ); - if ( rElement.m_aDockedData.m_bLocked ) - xDockWindow->lock(); - aSize = pToolBox->CalcWindowSizePixel(); - bSetSize = sal_True; - - if (( rElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && - ( rElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) - { - implts_findNextDockingPos( (DockingArea)rElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); - rElement.m_aDockedData.m_aPos = aDockPos; - } - } - - xWindow->setPosSize( aPixelPos.X(), - aPixelPos.Y(), - 0, 0, - css::awt::PosSize::POS ); - if( bSetSize ) - xWindow->setOutputSize( AWTSize( aSize) ); - - if ( bShowElement && pWindow ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow->Show( sal_True ); - } - } - } -} - -::Point LayoutManager::implts_findNextCascadeFloatingPos() -{ - const sal_Int32 nHotZoneX = 50; - const sal_Int32 nHotZoneY = 50; - const sal_Int32 nCascadeIndentX = 15; - const sal_Int32 nCascadeIndentY = 15; - - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - Reference< css::awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - Reference< css::awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - aReadLock.unlock(); - - ::Point aStartPos( nCascadeIndentX, nCascadeIndentY ); - ::Point aCurrPos( aStartPos ); - css::awt::Rectangle aRect; - - Window* pContainerWindow( 0 ); - if ( xContainerWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - if ( pContainerWindow ) - aStartPos = pContainerWindow->OutputToScreenPixel( aStartPos ); - } - - // Determine size of top and left docking area - css::awt::Rectangle aTopRect = xTopDockingWindow->getPosSize(); - css::awt::Rectangle aLeftRect = xLeftDockingWindow->getPosSize(); - - aStartPos.X() += aLeftRect.Width + nCascadeIndentX; - aStartPos.Y() += aTopRect.Height + nCascadeIndentY; - aCurrPos = aStartPos; - - // Try to find a cascaded position for the new floating window - UIElementVector::const_iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow > xWindow( xDockWindow, UNO_QUERY ); - if ( xDockWindow.is() && xDockWindow->isFloating() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() ) - { - css::awt::Rectangle aFloatRect = xWindow->getPosSize(); - if ((( aFloatRect.X - nHotZoneX ) <= aCurrPos.X() ) && - ( aFloatRect.X >= aCurrPos.X() ) && - (( aFloatRect.Y - nHotZoneY ) <= aCurrPos.Y() ) && - ( aFloatRect.Y >= aCurrPos.Y() )) - { - aCurrPos.X() = aFloatRect.X + nCascadeIndentX; - aCurrPos.Y() = aFloatRect.Y + nCascadeIndentY; - } - } - } - } - } - - return aCurrPos; -} - -void LayoutManager::implts_findNextDockingPos( DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ) -{ - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xDockingWindow = m_xDockAreaWindows[DockingArea]; - ::Size aDockingWinSize; - Window* pDockingWindow( 0 ); - aReadLock.unlock(); - - if (( DockingArea < DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea > DockingArea_DOCKINGAREA_RIGHT )) - DockingArea = DockingArea_DOCKINGAREA_TOP; - - { - // Retrieve output size from container Window - vos::OGuard aGuard( Application::GetSolarMutex() ); - pDockingWindow = VCLUnoHelper::GetWindow( xDockingWindow ); - if ( pDockingWindow ) - aDockingWinSize = pDockingWindow->GetOutputSizePixel(); - } - - sal_Int32 nFreeRowColPixelPos( 0 ); - sal_Int32 nMaxSpace( 0 ); - sal_Int32 nNeededSpace( 0 ); - sal_Int32 nTopDockingAreaSize( 0 ); - - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - nMaxSpace = aDockingWinSize.Width(); - nNeededSpace = aUIElementSize.Width(); - } - else - { - nMaxSpace = aDockingWinSize.Height(); - nNeededSpace = aUIElementSize.Height(); - nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); - } - - std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; - - implts_getDockingAreaElementInfos( DockingArea, aRowColumnsWindowData ); - sal_Int32 nPixelPos( 0 ); - const sal_uInt32 nCount = aRowColumnsWindowData.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - SingleRowColumnWindowData& rRowColumnWindowData = aRowColumnsWindowData[i]; - - if (( DockingArea == DockingArea_DOCKINGAREA_BOTTOM ) || - ( DockingArea == DockingArea_DOCKINGAREA_RIGHT )) - nPixelPos += rRowColumnWindowData.nStaticSize; - - if ((( nMaxSpace - rRowColumnWindowData.nVarSize ) >= nNeededSpace ) || - ( rRowColumnWindowData.nSpace >= nNeededSpace )) - { - // Check current row where we can find the needed space - sal_Int32 nCurrPos( 0 ); - const sal_uInt32 nWindowSizesCount = rRowColumnWindowData.aRowColumnWindowSizes.size(); - for ( sal_uInt32 j = 0; j < nWindowSizesCount; j++ ) - { - css::awt::Rectangle rRect = rRowColumnWindowData.aRowColumnWindowSizes[j]; - sal_Int32& rSpace = rRowColumnWindowData.aRowColumnSpace[j]; - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - if ( rSpace >= nNeededSpace ) - { - rVirtualPos = ::Point( nCurrPos, rRowColumnWindowData.nRowColumn ); - if ( DockingArea == DockingArea_DOCKINGAREA_TOP ) - rPixelPos = ::Point( nCurrPos, nPixelPos ); - else - rPixelPos = ::Point( nCurrPos, aDockingWinSize.Height() - nPixelPos ); - return; - } - nCurrPos = rRect.X + rRect.Width; - } - else - { - if ( rSpace >= nNeededSpace ) - { - rVirtualPos = ::Point( rRowColumnWindowData.nRowColumn, nCurrPos ); - if ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) - rPixelPos = ::Point( nPixelPos, nTopDockingAreaSize + nCurrPos ); - else - rPixelPos = ::Point( aDockingWinSize.Width() - nPixelPos , nTopDockingAreaSize + nCurrPos ); - return; - } - nCurrPos = rRect.Y + rRect.Height; - } - } - - if (( nCurrPos + nNeededSpace ) <= nMaxSpace ) - { - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - rVirtualPos = ::Point( nCurrPos, rRowColumnWindowData.nRowColumn ); - if ( DockingArea == DockingArea_DOCKINGAREA_TOP ) - rPixelPos = ::Point( nCurrPos, nPixelPos ); - else - rPixelPos = ::Point( nCurrPos, aDockingWinSize.Height() - nPixelPos ); - return; - } - else - { - rVirtualPos = ::Point( rRowColumnWindowData.nRowColumn, nCurrPos ); - if ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) - rPixelPos = ::Point( nPixelPos, nTopDockingAreaSize + nCurrPos ); - else - rPixelPos = ::Point( aDockingWinSize.Width() - nPixelPos , nTopDockingAreaSize + nCurrPos ); - return; - } - } - } - - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_LEFT )) - nPixelPos += rRowColumnWindowData.nStaticSize; - } - - sal_Int32 nNextFreeRowCol( 0 ); - sal_Int32 nRowColumnsCount = aRowColumnsWindowData.size(); - if ( nRowColumnsCount > 0 ) - nNextFreeRowCol = aRowColumnsWindowData[nRowColumnsCount-1].nRowColumn+1; - else - nNextFreeRowCol = 0; - - if ( nNextFreeRowCol == 0 ) - { - if ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - nFreeRowColPixelPos = aDockingWinSize.Height() - aUIElementSize.Height(); - else if ( DockingArea == DockingArea_DOCKINGAREA_RIGHT ) - nFreeRowColPixelPos = aDockingWinSize.Width() - aUIElementSize.Width(); - } - - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - rVirtualPos = ::Point( 0, nNextFreeRowCol ); - if ( DockingArea == DockingArea_DOCKINGAREA_TOP ) - rPixelPos = ::Point( 0, nFreeRowColPixelPos ); - else - rPixelPos = ::Point( 0, aDockingWinSize.Height() - nFreeRowColPixelPos ); - } - else - { - rVirtualPos = ::Point( nNextFreeRowCol, 0 ); - rPixelPos = ::Point( aDockingWinSize.Width() - nFreeRowColPixelPos, 0 ); - } -} - -::Size LayoutManager::implts_getContainerWindowOutputSize() -{ - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - ::Size aContainerWinSize; - Window* pContainerWindow( 0 ); - aReadLock.unlock(); - - // Retrieve output size from container Window - vos::OGuard aGuard( Application::GetSolarMutex() ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - if ( pContainerWindow ) - return pContainerWindow->GetOutputSizePixel(); - else - return ::Size(); -} - -void LayoutManager::implts_sortUIElements() -{ - WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIterStart = m_aUIElements.begin(); - UIElementVector::iterator pIterEnd = m_aUIElements.end(); - - std::stable_sort( pIterStart, pIterEnd ); // first created element should first - - // We have to reset our temporary flags. - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - // why check, just set it to false - //if ( pIter->m_bUserActive ) - pIter->m_bUserActive = sal_False; - } - -#ifdef DBG_UTIL - implts_checkElementContainer(); -#endif - aWriteLock.unlock(); -} - -void LayoutManager::implts_getDockingAreaElementInfos( DockingArea eDockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ) -{ - std::vector< UIElement > aWindowVector; - - if (( eDockingArea < DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea > DockingArea_DOCKINGAREA_RIGHT )) - eDockingArea = DockingArea_DOCKINGAREA_TOP; - - Reference< css::awt::XWindow > xDockAreaWindow; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - aWindowVector.reserve(m_aUIElements.size()); - xDockAreaWindow = m_xDockAreaWindows[eDockingArea]; - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea && pIter->m_bVisible && !pIter->m_bFloating ) - { - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow.is() ) - { - // docked windows - aWindowVector.push_back( *pIter ); - } - } - } - } - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - rRowColumnsWindowData.clear(); - - // Collect data from windows that are on the same row/column - sal_Int32 j; - sal_Int32 nIndex( 0 ); - sal_Int32 nLastPos( 0 ); - sal_Int32 nCurrPos( -1 ); - sal_Int32 nLastRowColPixelPos( 0 ); - css::awt::Rectangle aDockAreaRect; - - if ( xDockAreaWindow.is() ) - aDockAreaRect = xDockAreaWindow->getPosSize(); - - if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) - nLastRowColPixelPos = 0; - else if ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - nLastRowColPixelPos = aDockAreaRect.Height; - else if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) - nLastRowColPixelPos = 0; - else - nLastRowColPixelPos = aDockAreaRect.Width; - - const sal_uInt32 nCount = aWindowVector.size(); - for ( j = 0; j < sal_Int32( nCount); j++ ) - { - const UIElement& rElement = aWindowVector[j]; - Reference< css::awt::XWindow > xWindow; - Reference< XUIElement > xUIElement( rElement.m_xUIElement ); - css::awt::Rectangle aPosSize; - if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) ) - continue; - if (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - if ( nCurrPos == -1 ) - { - nCurrPos = rElement.m_aDockedData.m_aPos.Y(); - nLastPos = 0; - - SingleRowColumnWindowData aRowColumnWindowData; - aRowColumnWindowData.nRowColumn = nCurrPos; - rRowColumnsWindowData.push_back( aRowColumnWindowData ); - } - - sal_Int32 nSpace( 0 ); - if ( rElement.m_aDockedData.m_aPos.Y() != nCurrPos ) - { - if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) - nLastRowColPixelPos += rRowColumnsWindowData[nIndex].nStaticSize; - else - nLastRowColPixelPos -= rRowColumnsWindowData[nIndex].nStaticSize; - ++nIndex; - nLastPos = 0; - nCurrPos = rElement.m_aDockedData.m_aPos.Y(); - SingleRowColumnWindowData aRowColumnWindowData; - aRowColumnWindowData.nRowColumn = nCurrPos; - rRowColumnsWindowData.push_back( aRowColumnWindowData ); - } - - // Calc space before an element and store it - nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); - if ( rElement.m_aDockedData.m_aPos.X() >= nLastPos ) - { - rRowColumnsWindowData[nIndex].nSpace += nSpace; - nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width; - } - else - { - nSpace = 0; - nLastPos += aPosSize.Width; - } - rRowColumnsWindowData[nIndex].aRowColumnSpace.push_back( nSpace ); - - rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); - rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); - rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); - if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Height ) - rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Height; - if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, nLastRowColPixelPos, - aDockAreaRect.Width, aPosSize.Height ); - else - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, ( nLastRowColPixelPos - aPosSize.Height ), - aDockAreaRect.Width, aPosSize.Height ); - rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Width + nSpace; - } - else - { - if ( nCurrPos == -1 ) - { - nCurrPos = rElement.m_aDockedData.m_aPos.X(); - nLastPos = 0; - - SingleRowColumnWindowData aRowColumnWindowData; - aRowColumnWindowData.nRowColumn = nCurrPos; - rRowColumnsWindowData.push_back( aRowColumnWindowData ); - } - - sal_Int32 nSpace( 0 ); - if ( rElement.m_aDockedData.m_aPos.X() != nCurrPos ) - { - if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) - nLastRowColPixelPos += rRowColumnsWindowData[nIndex].nStaticSize; - else - nLastRowColPixelPos -= rRowColumnsWindowData[nIndex].nStaticSize; - ++nIndex; - nLastPos = 0; - nCurrPos = rElement.m_aDockedData.m_aPos.X(); - SingleRowColumnWindowData aRowColumnWindowData; - aRowColumnWindowData.nRowColumn = nCurrPos; - rRowColumnsWindowData.push_back( aRowColumnWindowData ); - } - - // Calc space before an element and store it - nSpace = ( rElement.m_aDockedData.m_aPos.Y() - nLastPos ); - if ( rElement.m_aDockedData.m_aPos.Y() > nLastPos ) - { - rRowColumnsWindowData[nIndex].nSpace += nSpace; - nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; - } - else - { - nSpace = 0; - nLastPos += aPosSize.Height; - } - rRowColumnsWindowData[nIndex].aRowColumnSpace.push_back( nSpace ); - - rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); - rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); - rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); - if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Width ) - rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Width; - if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( nLastRowColPixelPos, 0, - aPosSize.Width, aDockAreaRect.Height ); - else - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( ( nLastRowColPixelPos - aPosSize.Width ), 0, - aPosSize.Width, aDockAreaRect.Height ); - rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Height + nSpace; - } - } -} - -void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea eDockingArea, sal_Int32 nRowCol, SingleRowColumnWindowData& rRowColumnWindowData ) -{ - std::vector< UIElement > aWindowVector; - - if (( eDockingArea < DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea > DockingArea_DOCKINGAREA_RIGHT )) - eDockingArea = DockingArea_DOCKINGAREA_TOP; - - sal_Bool bHorzDockArea = (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - UIElementVector::iterator pIter; - UIElementVector::iterator pEnd = m_aUIElements.end(); - for ( pIter = m_aUIElements.begin(); pIter != pEnd; pIter++ ) - { - if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea ) - { - sal_Bool bSameRowCol = bHorzDockArea ? - ( pIter->m_aDockedData.m_aPos.Y() == nRowCol ) : - ( pIter->m_aDockedData.m_aPos.X() == nRowCol ); - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - - if ( bSameRowCol && xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( pWindow && pIter->m_bVisible && xDockWindow.is() && !pIter->m_bFloating ) - { - // docked windows - aWindowVector.push_back( *pIter ); - } - } - } - } - } - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - // Initialize structure - rRowColumnWindowData.aUIElementNames.clear(); - rRowColumnWindowData.aRowColumnWindows.clear(); - rRowColumnWindowData.aRowColumnWindowSizes.clear(); - rRowColumnWindowData.aRowColumnSpace.clear(); - rRowColumnWindowData.nVarSize = 0; - rRowColumnWindowData.nStaticSize = 0; - rRowColumnWindowData.nSpace = 0; - rRowColumnWindowData.nRowColumn = nRowCol; - - // Collect data from windows that are on the same row/column - sal_Int32 j; - sal_Int32 nLastPos( 0 ); - - const sal_uInt32 nCount = aWindowVector.size(); - for ( j = 0; j < sal_Int32( nCount); j++ ) - { - const UIElement& rElement = aWindowVector[j]; - Reference< css::awt::XWindow > xWindow; - Reference< XUIElement > xUIElement( rElement.m_xUIElement ); - css::awt::Rectangle aPosSize; - if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) ) - continue; - - sal_Int32 nSpace; - if (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); - - // Calc space before an element and store it - if ( rElement.m_aDockedData.m_aPos.X() > nLastPos ) - rRowColumnWindowData.nSpace += nSpace; - else - nSpace = 0; - - nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width; - - - rRowColumnWindowData.aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); - if ( rRowColumnWindowData.nStaticSize < aPosSize.Height ) - rRowColumnWindowData.nStaticSize = aPosSize.Height; - rRowColumnWindowData.nVarSize += aPosSize.Width; - } - else - { - // Calc space before an element and store it - nSpace = ( rElement.m_aDockedData.m_aPos.Y() - nLastPos ); - if ( rElement.m_aDockedData.m_aPos.Y() > nLastPos ) - rRowColumnWindowData.nSpace += nSpace; - else - nSpace = 0; - - nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; - - rRowColumnWindowData.aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); - if ( rRowColumnWindowData.nStaticSize < aPosSize.Width ) - rRowColumnWindowData.nStaticSize = aPosSize.Width; - rRowColumnWindowData.nVarSize += aPosSize.Height; - } - - rRowColumnWindowData.aUIElementNames.push_back( rElement.m_aName ); - rRowColumnWindowData.aRowColumnWindows.push_back( xWindow ); - rRowColumnWindowData.aRowColumnSpace.push_back( nSpace ); - rRowColumnWindowData.nVarSize += nSpace; - } -} - -::Rectangle LayoutManager::implts_determineFrontDockingRect( - DockingArea eDockingArea, - sal_Int32 nRowCol, - const ::Rectangle& rDockedElementRect, - const ::rtl::OUString& rMovedElementName, - const ::Rectangle& rMovedElementRect ) -{ - SingleRowColumnWindowData aRowColumnWindowData; - - sal_Bool bHorzDockArea = (( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - - implts_getDockingAreaElementInfoOnSingleRowCol( eDockingArea, nRowCol, aRowColumnWindowData ); - if ( aRowColumnWindowData.aRowColumnWindows.empty() ) - return rMovedElementRect; - else - { - sal_Int32 nSpace( 0 ); - ::Rectangle aFrontDockingRect( rMovedElementRect ); - const sal_uInt32 nCount = aRowColumnWindowData.aRowColumnWindows.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - if ( bHorzDockArea ) - { - if ( aRowColumnWindowData.aRowColumnWindowSizes[i].X >= rDockedElementRect.Left() ) - { - nSpace += aRowColumnWindowData.aRowColumnSpace[i]; - break; - } - else if ( aRowColumnWindowData.aUIElementNames[i] == rMovedElementName ) - nSpace += aRowColumnWindowData.aRowColumnWindowSizes[i].Width + - aRowColumnWindowData.aRowColumnSpace[i]; - else - nSpace = 0; - } - else - { - if ( aRowColumnWindowData.aRowColumnWindowSizes[i].Y >= rDockedElementRect.Top() ) - { - nSpace += aRowColumnWindowData.aRowColumnSpace[i]; - break; - } - else if ( aRowColumnWindowData.aUIElementNames[i] == rMovedElementName ) - nSpace += aRowColumnWindowData.aRowColumnWindowSizes[i].Height + - aRowColumnWindowData.aRowColumnSpace[i]; - else - nSpace = 0; - } - } - - if ( nSpace > 0 ) - { - sal_Int32 nMove = std::min( nSpace, static_cast(aFrontDockingRect.getWidth()) ); - if ( bHorzDockArea ) - aFrontDockingRect.Move( -nMove, 0 ); - else - aFrontDockingRect.Move( 0, -nMove ); - } - - return aFrontDockingRect; - } -} - -::Rectangle LayoutManager::implts_getWindowRectFromRowColumn( - ::com::sun::star::ui::DockingArea DockingArea, - const SingleRowColumnWindowData& rRowColumnWindowData, - const ::Point& rMousePos, - const rtl::OUString& rExcludeElementName ) -{ - ::Rectangle aWinRect; - - if (( DockingArea < DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea > DockingArea_DOCKINGAREA_RIGHT )) - DockingArea = DockingArea_DOCKINGAREA_TOP; - - if ( rRowColumnWindowData.aRowColumnWindows.empty() ) - return aWinRect; - else - { - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - Reference< css::awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[DockingArea]; - aReadLock.unlock(); - - // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect - vos::OGuard aGuard( Application::GetSolarMutex() ); - - // Retrieve output size from container Window - Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow )); - Window* pDockingAreaWindow( VCLUnoHelper::GetWindow( xDockingAreaWindow )); - if ( pDockingAreaWindow && pContainerWindow ) - { - const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindows.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - css::awt::Rectangle aWindowRect = rRowColumnWindowData.aRowColumnWindows[i]->getPosSize(); - ::Rectangle aRect( aWindowRect.X, aWindowRect.Y, aWindowRect.X+aWindowRect.Width, aWindowRect.Y+aWindowRect.Height ); - aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); - if ( aRect.IsInside( rMousePos )) - { - // Check if we have found the excluded element. If yes, we have to provide an empty rectangle. - // We prevent that a toolbar cannot be moved when the mouse pointer is inside its own rectangle! - if ( rExcludeElementName != rRowColumnWindowData.aUIElementNames[i] ) - return aRect; - else - break; - } - } - } - } - - return aWinRect; -} - -framework::LayoutManager::DockingOperation -LayoutManager::implts_determineDockingOperation( - ::com::sun::star::ui::DockingArea DockingArea, - const ::Rectangle& rRowColRect, - const Point& rMousePos ) -{ - const sal_Int32 nHorzVerticalRegionSize = 6; - const sal_Int32 nHorzVerticalMoveRegion = 4; - - if ( rRowColRect.IsInside( rMousePos )) - { - if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - sal_Int32 nRegion = rRowColRect.getHeight() / nHorzVerticalRegionSize; - sal_Int32 nPosY = rRowColRect.Top() + nRegion; - - if ( rMousePos.Y() < nPosY ) - return ( DockingArea == DockingArea_DOCKINGAREA_TOP ) ? DOCKOP_BEFORE_COLROW : DOCKOP_AFTER_COLROW; - else if ( rMousePos.Y() < ( nPosY + nRegion*nHorzVerticalMoveRegion )) - return DOCKOP_ON_COLROW; - else - return ( DockingArea == DockingArea_DOCKINGAREA_TOP ) ? DOCKOP_AFTER_COLROW : DOCKOP_BEFORE_COLROW; - } - else - { - sal_Int32 nRegion = rRowColRect.getWidth() / nHorzVerticalRegionSize; - sal_Int32 nPosX = rRowColRect.Left() + nRegion; - - if ( rMousePos.X() < nPosX ) - return ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) ? DOCKOP_BEFORE_COLROW : DOCKOP_AFTER_COLROW; - else if ( rMousePos.X() < ( nPosX + nRegion*nHorzVerticalMoveRegion )) - return DOCKOP_ON_COLROW; - else - return ( DockingArea == DockingArea_DOCKINGAREA_LEFT ) ? DOCKOP_AFTER_COLROW : DOCKOP_BEFORE_COLROW; - } - } - else - return DOCKOP_ON_COLROW; -} - -::Rectangle LayoutManager::implts_calcTrackingAndElementRect( - ::com::sun::star::ui::DockingArea eDockingArea, - sal_Int32 nRowCol, - UIElement& rUIElement, - const ::Rectangle& rTrackingRect, - const ::Rectangle& rRowColumnRect, - const ::Size& rContainerWinSize ) -{ - sal_Bool bHorizontalDockArea( ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - - sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); - sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); - - ::Size aStatusBarSize( implts_getStatusBarSize() ); - sal_Int32 nMaxLeftRightDockAreaSize = rContainerWinSize.Height() - - nTopDockingAreaSize - - nBottomDockingAreaSize - - aStatusBarSize.Height(); - - ::Rectangle aTrackingRect( rTrackingRect ); - if ( bHorizontalDockArea ) - { - sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 ))); - if (( nPosX + rTrackingRect.getWidth()) > rContainerWinSize.Width() ) - nPosX = std::min( nPosX, - std::max( sal_Int32( rContainerWinSize.Width() - rTrackingRect.getWidth() ), - sal_Int32( 0 ))); - - sal_Int32 nSize = std::min( rContainerWinSize.Width(), rTrackingRect.getWidth() ); - - aTrackingRect.SetPos( ::Point( nPosX, rRowColumnRect.Top() )); - aTrackingRect.setWidth( nSize ); - aTrackingRect.setHeight( rRowColumnRect.getHeight() ); - - // Set virtual position - rUIElement.m_aDockedData.m_aPos.X() = nPosX; - rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; - } - else - { - sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), - sal_Int32( nMaxLeftRightDockAreaSize )); - - sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); - if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) - nPosY = std::min( nPosY, - std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), - sal_Int32( nTopDockingAreaSize ))); - - sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast(aTrackingRect.getHeight()) ); - - aTrackingRect.SetPos( ::Point( rRowColumnRect.Left(), nPosY )); - aTrackingRect.setWidth( rRowColumnRect.getWidth() ); - aTrackingRect.setHeight( nSize ); - - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[eDockingArea]; - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - aReadLock.unlock(); - - sal_Int32 nDockPosY( 0 ); - Window* pDockingAreaWindow( 0 ); - Window* pContainerWindow( 0 ); - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - nDockPosY = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( ::Point( 0, nPosY ))).Y(); - } - - // Set virtual position - rUIElement.m_aDockedData.m_aPos.X() = nRowCol; - rUIElement.m_aDockedData.m_aPos.Y() = nDockPosY; - } - - return aTrackingRect; -} - -void implts_setTrackingRect( DockingArea eDockingArea, const Point& rMousePos, ::Rectangle& rTrackingRect ) -{ - sal_Bool bHorizontalDockArea( ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - - ::Point aPoint = rTrackingRect.TopLeft(); - if ( bHorizontalDockArea ) - aPoint.X() = rMousePos.X(); - else - aPoint.Y() = rMousePos.Y(); - rTrackingRect.SetPos( aPoint ); -} - -void LayoutManager::implts_calcDockingPosSize( - UIElement& rUIElement, - DockingOperation& rDockingOperation, - ::Rectangle& rTrackingRect, - const Point& rMousePos ) -{ - ReadGuard aReadLock( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow = m_xContainerWindow; - ::Size aContainerWinSize; - Window* pContainerWindow( 0 ); - aReadLock.unlock(); - - { - // Retrieve output size from container Window - vos::OGuard aGuard( Application::GetSolarMutex() ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - aContainerWinSize = pContainerWindow->GetOutputSizePixel(); - } - - if ( !rUIElement.m_xUIElement.is() ) - { - rTrackingRect = ::Rectangle(); - return; - } - - Window* pDockWindow( 0 ); - Window* pDockingAreaWindow( 0 ); - ToolBox* pToolBox( 0 ); - Reference< css::awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow > xDockingAreaWindow; - ::Rectangle aTrackingRect( rTrackingRect ); - ::com::sun::star::ui::DockingArea eDockedArea( (::com::sun::star::ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); - sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); - sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); - sal_Bool bHorizontalDockArea( ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM )); - ::Size aStatusBarSize( implts_getStatusBarSize() ); - sal_Int32 nMaxLeftRightDockAreaSize = aContainerWinSize.Height() - - nTopDockingAreaSize - - nBottomDockingAreaSize - - aStatusBarSize.Height(); - ::Rectangle aDockingAreaRect; - - aReadLock.lock(); - xDockingAreaWindow = m_xDockAreaWindows[eDockedArea]; - aReadLock.unlock(); - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); - pDockWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pDockWindow && pDockWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pDockWindow; - - aDockingAreaRect = ::Rectangle( pDockingAreaWindow->GetPosPixel(), pDockingAreaWindow->GetSizePixel() ); - if ( pToolBox ) - { - // docked toolbars always have one line - ::Size aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( sal_Int16( eDockedArea )) ); - aTrackingRect.SetSize( ::Size( aSize.Width(), aSize.Height() )); - } - } - - // default docking operation, dock on the given row/column - sal_Bool bOpOutsideOfDockingArea( !aDockingAreaRect.IsInside( rMousePos )); - std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; - - rDockingOperation = DOCKOP_ON_COLROW; - implts_getDockingAreaElementInfos( eDockedArea, aRowColumnsWindowData ); - - // determine current first row/column and last row/column - sal_Int32 nMaxRowCol( -1 ); - sal_Int32 nMinRowCol( SAL_MAX_INT32 ); - const sal_uInt32 nCount = aRowColumnsWindowData.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - if ( aRowColumnsWindowData[i].nRowColumn > nMaxRowCol ) - nMaxRowCol = aRowColumnsWindowData[i].nRowColumn; - if ( aRowColumnsWindowData[i].nRowColumn < nMinRowCol ) - nMinRowCol = aRowColumnsWindowData[i].nRowColumn; - } - - if ( !bOpOutsideOfDockingArea ) - { - // docking inside our docking area - sal_Int32 nIndex( -1 ); - sal_Int32 nRowCol( -1 ); - ::Rectangle aWindowRect; - ::Rectangle aRowColumnRect; - - const sal_uInt32 nWindowDataCount = aRowColumnsWindowData.size(); - for ( sal_uInt32 i = 0; i < nWindowDataCount; i++ ) - { - ::Rectangle aRect( aRowColumnsWindowData[i].aRowColumnRect.X, - aRowColumnsWindowData[i].aRowColumnRect.Y, - aRowColumnsWindowData[i].aRowColumnRect.X + aRowColumnsWindowData[i].aRowColumnRect.Width, - aRowColumnsWindowData[i].aRowColumnRect.Y + aRowColumnsWindowData[i].aRowColumnRect.Height ); - - { - // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect - vos::OGuard aGuard( Application::GetSolarMutex() ); - aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); - } - - sal_Bool bIsInsideRowCol( aRect.IsInside( rMousePos ) ); - if ( bIsInsideRowCol ) - { - nIndex = i; - nRowCol = aRowColumnsWindowData[i].nRowColumn; - rDockingOperation = implts_determineDockingOperation( eDockedArea, aRect, rMousePos ); - aWindowRect = implts_getWindowRectFromRowColumn( eDockedArea, aRowColumnsWindowData[i], rMousePos, rUIElement.m_aName ); - aRowColumnRect = aRect; - break; - } - } - - OSL_ENSURE( ( nIndex >= 0 ) && ( nRowCol >= 0 ), "Impossible case - no row/column found but mouse pointer is inside our docking area" ); - if (( nIndex >= 0 ) && ( nRowCol >= 0 )) - { - if ( rDockingOperation == DOCKOP_ON_COLROW ) - { - if ( !aWindowRect.IsEmpty()) - { - // Tracking rect is on a row/column and mouse is over a docked toolbar. - // Determine if the tracking rect must be located before/after the docked toolbar. - - ::Rectangle aUIElementRect( aWindowRect ); - sal_Int32 nMiddle( bHorizontalDockArea ? ( aWindowRect.Left() + aWindowRect.getWidth() / 2 ) : - ( aWindowRect.Top() + aWindowRect.getHeight() / 2 )); - sal_Bool bInsertBefore( bHorizontalDockArea ? ( rMousePos.X() < nMiddle ) : ( rMousePos.Y() < nMiddle )); - if ( bInsertBefore ) - { - if ( bHorizontalDockArea ) - { - sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( aContainerWinSize.Width() - aWindowRect.Left() ), - sal_Int32( aTrackingRect.getWidth() ))); - if ( nSize == 0 ) - nSize = aWindowRect.getWidth(); - - aUIElementRect.SetSize( ::Size( nSize, aWindowRect.getHeight() )); - aWindowRect = implts_determineFrontDockingRect( eDockedArea, nRowCol, aWindowRect,rUIElement.m_aName, aUIElementRect ); - - // Set virtual position - rUIElement.m_aDockedData.m_aPos.X() = aWindowRect.Left(); - rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; - } - else - { - sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( - nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Top() ), - sal_Int32( aTrackingRect.getHeight() ))); - if ( nSize == 0 ) - nSize = aWindowRect.getHeight(); - - aUIElementRect.SetSize( ::Size( aWindowRect.getWidth(), nSize )); - aWindowRect = implts_determineFrontDockingRect( eDockedArea, nRowCol, aWindowRect, rUIElement.m_aName, aUIElementRect ); - - // Set virtual position - sal_Int32 nPosY = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( aWindowRect.TopLeft() )).Y(); - rUIElement.m_aDockedData.m_aPos.X() = nRowCol; - rUIElement.m_aDockedData.m_aPos.Y() = nPosY; - } - - rTrackingRect = aWindowRect; - return; - } - else - { - if ( bHorizontalDockArea ) - { - sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32(( aContainerWinSize.Width() ) - aWindowRect.Right() ), - sal_Int32( aTrackingRect.getWidth() ))); - if ( nSize == 0 ) - { - aUIElementRect.SetPos( ::Point( aContainerWinSize.Width() - aTrackingRect.getWidth(), aWindowRect.Top() )); - aUIElementRect.SetSize( ::Size( aTrackingRect.getWidth(), aWindowRect.getHeight() )); - rUIElement.m_aDockedData.m_aPos.X() = aUIElementRect.Left(); - } - else - { - aUIElementRect.SetPos( ::Point( aWindowRect.Right(), aWindowRect.Top() )); - aUIElementRect.SetSize( ::Size( nSize, aWindowRect.getHeight() )); - rUIElement.m_aDockedData.m_aPos.X() = aWindowRect.Right(); - } - - // Set virtual position - rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; - } - else - { - sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Bottom() ), - sal_Int32( aTrackingRect.getHeight() ))); - aUIElementRect.SetPos( ::Point( aWindowRect.Left(), aWindowRect.Bottom() )); - aUIElementRect.SetSize( ::Size( aWindowRect.getWidth(), nSize )); - - // Set virtual position - sal_Int32 nPosY( 0 ); - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - nPosY = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( aWindowRect.BottomRight() )).Y(); - } - rUIElement.m_aDockedData.m_aPos.X() = nRowCol; - rUIElement.m_aDockedData.m_aPos.Y() = nPosY; - } - - rTrackingRect = aUIElementRect; - return; - } - } - else - { - implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); - rTrackingRect = implts_calcTrackingAndElementRect( - eDockedArea, nRowCol, rUIElement, - aTrackingRect, aRowColumnRect, aContainerWinSize ); - return; - } - } - else - { - if ((( nRowCol == nMinRowCol ) && ( rDockingOperation == DOCKOP_BEFORE_COLROW )) || - (( nRowCol == nMaxRowCol ) && ( rDockingOperation == DOCKOP_AFTER_COLROW ))) - bOpOutsideOfDockingArea = sal_True; - else - { - // handle docking before/after a row - implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); - rTrackingRect = implts_calcTrackingAndElementRect( - eDockedArea, nRowCol, rUIElement, - aTrackingRect, aRowColumnRect, aContainerWinSize ); - - sal_Int32 nOffsetX( 0 ); - sal_Int32 nOffsetY( 0 ); - if ( bHorizontalDockArea ) - nOffsetY = sal_Int32( floor( aRowColumnRect.getHeight() / 2 + 0.5 )); - else - nOffsetX = sal_Int32( floor( aRowColumnRect.getWidth() / 2 + 0.5 )); - - if ( rDockingOperation == DOCKOP_BEFORE_COLROW ) - { - if (( eDockedArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockedArea == DockingArea_DOCKINGAREA_LEFT )) - { - // Docking before/after means move track rectangle half column/row. - // As left and top are ordered 0...n instead of right and bottom - // which uses n...0, we have to use negative values for top/left. - nOffsetX *= -1; - nOffsetY *= -1; - } - } - else - { - if (( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) || - ( eDockedArea == DockingArea_DOCKINGAREA_RIGHT )) - { - // Docking before/after means move track rectangle half column/row. - // As left and top are ordered 0...n instead of right and bottom - // which uses n...0, we have to use negative values for top/left. - nOffsetX *= -1; - nOffsetY *= -1; - } - nRowCol++; - } - - if ( bHorizontalDockArea ) - rUIElement.m_aDockedData.m_aPos.Y() = nRowCol; - else - rUIElement.m_aDockedData.m_aPos.X() = nRowCol; - - rTrackingRect.Move( nOffsetX, nOffsetY ); - rTrackingRect.SetSize( aTrackingRect.GetSize() ); - } - } - } - } - - // Docking outside of our docking window area => - // Users want to dock before/after first/last docked element or to an empty docking area - if ( bOpOutsideOfDockingArea ) - { - // set correct size for docking - implts_setTrackingRect( eDockedArea, rMousePos, aTrackingRect ); - rTrackingRect = aTrackingRect; - - if ( bHorizontalDockArea ) - { - sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 ))); - if (( nPosX + rTrackingRect.getWidth()) > aContainerWinSize.Width() ) - nPosX = std::min( nPosX, - std::max( sal_Int32( aContainerWinSize.Width() - rTrackingRect.getWidth() ), - sal_Int32( 0 ))); - - sal_Int32 nSize = std::min( aContainerWinSize.Width(), rTrackingRect.getWidth() ); - sal_Int32 nDockHeight = std::max( static_cast(aDockingAreaRect.getHeight()), sal_Int32( 0 )); - if ( nDockHeight == 0 ) - { - sal_Int32 nPosY( std::max( aDockingAreaRect.Top(), aDockingAreaRect.Bottom() )); - if ( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) - nPosY -= rTrackingRect.getHeight(); - rTrackingRect.SetPos( Point( nPosX, nPosY )); - rUIElement.m_aDockedData.m_aPos.Y() = 0; - } - else if ( rMousePos.Y() < ( aDockingAreaRect.Top() + ( nDockHeight / 2 ))) - { - rTrackingRect.SetPos( Point( nPosX, aDockingAreaRect.Top() - rTrackingRect.getHeight() )); - if ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) - rUIElement.m_aDockedData.m_aPos.Y() = 0; - else - rUIElement.m_aDockedData.m_aPos.Y() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; - rDockingOperation = DOCKOP_BEFORE_COLROW; - } - else - { - rTrackingRect.SetPos( Point( nPosX, aDockingAreaRect.Bottom() )); - if ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) - rUIElement.m_aDockedData.m_aPos.Y() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; - else - rUIElement.m_aDockedData.m_aPos.Y() = 0; - rDockingOperation = DOCKOP_AFTER_COLROW; - } - rTrackingRect.setWidth( nSize ); - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - nPosX = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( rTrackingRect.TopLeft() )).X(); - } - rUIElement.m_aDockedData.m_aPos.X() = nPosX; - } - else - { - sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), - sal_Int32( nMaxLeftRightDockAreaSize )); - - sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); - if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) - nPosY = std::min( nPosY, - std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), - sal_Int32( nTopDockingAreaSize ))); - - sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast(aTrackingRect.getHeight()) ); - sal_Int32 nDockWidth = std::max( static_cast(aDockingAreaRect.getWidth()), sal_Int32( 0 )); - if ( nDockWidth == 0 ) - { - sal_Int32 nPosX( std::max( aDockingAreaRect.Left(), aDockingAreaRect.Right() )); - if ( eDockedArea == DockingArea_DOCKINGAREA_RIGHT ) - nPosX -= rTrackingRect.getWidth(); - rTrackingRect.SetPos( Point( nPosX, nPosY )); - rUIElement.m_aDockedData.m_aPos.X() = 0; - } - else if ( rMousePos.X() < ( aDockingAreaRect.Left() + ( nDockWidth / 2 ))) - { - rTrackingRect.SetPos( Point( aDockingAreaRect.Left() - rTrackingRect.getWidth(), nPosY )); - if ( eDockedArea == DockingArea_DOCKINGAREA_LEFT ) - rUIElement.m_aDockedData.m_aPos.X() = 0; - else - rUIElement.m_aDockedData.m_aPos.X() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; - rDockingOperation = DOCKOP_BEFORE_COLROW; - } - else - { - rTrackingRect.SetPos( Point( aDockingAreaRect.Right(), nPosY )); - if ( eDockedArea == DockingArea_DOCKINGAREA_LEFT ) - rUIElement.m_aDockedData.m_aPos.X() = ( nMaxRowCol >= 0 ) ? nMaxRowCol+1 : 0; - else - rUIElement.m_aDockedData.m_aPos.X() = 0; - rDockingOperation = DOCKOP_AFTER_COLROW; - } - rTrackingRect.setHeight( nSize ); - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - nPosY = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( rTrackingRect.TopLeft() )).Y(); - } - rUIElement.m_aDockedData.m_aPos.Y() = nPosY; - } - } -} - -void LayoutManager::implts_renumberRowColumnData( - ::com::sun::star::ui::DockingArea eDockingArea, - DockingOperation /*eDockingOperation*/, - const UIElement& rUIElement ) -{ - ReadGuard aReadLock( m_aLock ); - Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - aReadLock.unlock(); - - sal_Bool bHorzDockingArea(( eDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM )); - sal_Int32 nRowCol( bHorzDockingArea ? rUIElement.m_aDockedData.m_aPos.Y() : - rUIElement.m_aDockedData.m_aPos.X() ); - - WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if (( pIter->m_aDockedData.m_nDockedArea == sal_Int16( eDockingArea )) && - ( pIter->m_aName != rUIElement.m_aName )) - { - // Don't change toolbars without a valid docking position! - if (( pIter->m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && - ( pIter->m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) - continue; - - sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? - pIter->m_aDockedData.m_aPos.Y() : pIter->m_aDockedData.m_aPos.X(); - if ( nWindowRowCol >= nRowCol ) - { - if ( bHorzDockingArea ) - pIter->m_aDockedData.m_aPos.Y() += 1; - else - pIter->m_aDockedData.m_aPos.X() += 1; - } - } - } - aWriteLock.unlock(); - - // We have to change the persistent window state part - if ( xPersistentWindowState.is() ) - { - try - { - Sequence< rtl::OUString > aWindowElements = xPersistentWindowState->getElementNames(); - for ( sal_Int32 i = 0; i < aWindowElements.getLength(); i++ ) - { - if ( rUIElement.m_aName != aWindowElements[i] ) - { - try - { - Sequence< PropertyValue > aPropValueSeq; - css::awt::Point aDockedPos; - DockingArea nDockedArea( DockingArea_DOCKINGAREA_DEFAULT ); - - xPersistentWindowState->getByName( aWindowElements[i] ) >>= aPropValueSeq; - for ( sal_Int32 j = 0; j < aPropValueSeq.getLength(); j++ ) - { - if ( aPropValueSeq[j].Name == m_aPropDockingArea ) - aPropValueSeq[j].Value >>= nDockedArea; - else if ( aPropValueSeq[j].Name == m_aPropDockPos ) - aPropValueSeq[j].Value >>= aDockedPos; - } - - // Don't change toolbars without a valid docking position! - if (( aDockedPos.X == SAL_MAX_INT32 ) && ( aDockedPos.Y == SAL_MAX_INT32 )) - continue; - - sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? aDockedPos.Y : aDockedPos.X; - if (( nDockedArea == eDockingArea ) && ( nWindowRowCol >= nRowCol )) - { - if ( bHorzDockingArea ) - aDockedPos.Y += 1; - else - aDockedPos.X += 1; - - Reference< XNameReplace > xReplace( xPersistentWindowState, UNO_QUERY ); - xReplace->replaceByName( aWindowElements[i], makeAny( aPropValueSeq )); - } - } - catch ( Exception& ) - { - } - } - } - } - catch ( Exception& ) - { - } - } -} - -::Size LayoutManager::implts_getTopBottomDockingAreaSizes() -{ - ::Size aSize; - Reference< css::awt::XWindow > xTopDockingAreaWindow; - Reference< css::awt::XWindow > xBottomDockingAreaWindow; - - ReadGuard aReadLock( m_aLock ); - xTopDockingAreaWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - xBottomDockingAreaWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; - aReadLock.unlock(); - - if ( xTopDockingAreaWindow.is() ) - aSize.Width() = xTopDockingAreaWindow->getPosSize().Height; - if ( xBottomDockingAreaWindow.is() ) - aSize.Height() = xBottomDockingAreaWindow->getPosSize().Height; - - return aSize; -} - -Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString& aName ) -{ - Reference< ::com::sun::star::ui::XUIElement > xUIElement; - - ReadGuard aReadLock( m_aLock ); - Sequence< PropertyValue > aPropSeq( 2 ); - aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); - aPropSeq[0].Value <<= m_xFrame; - aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" )); - aPropSeq[1].Value <<= sal_True; - - try - { - xUIElement = m_xUIElementFactoryManager->createUIElement( aName, aPropSeq ); - } - catch ( NoSuchElementException& ) - { - } - catch ( IllegalArgumentException& ) - { - } - - return xUIElement; -} - -Reference< css::awt::XWindowPeer > LayoutManager::implts_createToolkitWindow( const Reference< css::awt::XWindowPeer >& rParent ) -{ - Reference< css::awt::XWindowPeer > xPeer; - css::uno::Reference< css::awt::XToolkit > xToolkit( m_xSMGR->createInstance( SERVICENAME_VCLTOOLKIT ), css::uno::UNO_QUERY ); - if ( xToolkit.is() ) - { - // describe window properties. - css::awt::WindowDescriptor aDescriptor; - aDescriptor.Type = css::awt::WindowClass_SIMPLE ; - aDescriptor.WindowServiceName = DECLARE_ASCII("dockingarea") ; - aDescriptor.ParentIndex = -1 ; - aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >( rParent, UNO_QUERY ) ; - aDescriptor.Bounds = css::awt::Rectangle(0,0,0,0) ; - aDescriptor.WindowAttributes = 0 ; - - // create a docking area window - xPeer = xToolkit->createWindow( aDescriptor ); - } - - return xPeer; -} - -void LayoutManager::implts_setVisibleState( sal_Bool bShow ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - pIter->m_bMasterHide = !bShow; - m_aStatusBarElement.m_bMasterHide = !bShow; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - implts_updateUIElementsVisibleState( bShow ); - //implts_doLayout( sal_False ); -} - -void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) -{ - // notify listeners - css::uno::Any a; - if ( bSetVisible ) - implts_notifyListeners( css::frame::LayoutManagerEvents::VISIBLE, a ); - else - implts_notifyListeners( css::frame::LayoutManagerEvents::INVISIBLE, a ); - std::vector< Reference< css::awt::XWindow > > aWinVector; - sal_Bool bOld; - - { - WriteGuard aWriteLock( m_aLock ); - m_bDoLayout = sal_True; - bOld = m_bDoLayout; - } - - ReadGuard aReadLock( m_aLock ); - aWinVector.reserve(m_aUIElements.size()); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - if ( bSetVisible ) - { - if ( pIter->m_bVisible && !pIter->m_bMasterHide ) - aWinVector.push_back( xWindow ); - } - else - aWinVector.push_back( xWindow ); - } - } - } - - aReadLock.unlock(); - - try - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - const sal_uInt32 nCount = aWinVector.size(); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - Reference< css::awt::XWindow > xWindow( aWinVector[i] ); - if ( xWindow.is() ) - { - // we need VCL here to pass special flags to Show() - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if( pWindow ) - pWindow->Show( bSetVisible, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - } - } - } - catch ( DisposedException& ) - { - } - - // Hide/show menubar according to bSetVisible - aReadLock.lock(); - Reference< XUIElement > xMenuBar( m_xMenuBar, UNO_QUERY ); - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - Reference< XComponent > xInplaceMenuBar( m_xInplaceMenuBar ); - MenuBarManager* pInplaceMenuBar( m_pInplaceMenuBar ); - aReadLock.unlock(); - - if (( xMenuBar.is() || xInplaceMenuBar.is() ) && xContainerWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - MenuBar* pMenuBar( 0 ); - if ( xInplaceMenuBar.is() ) - pMenuBar = (MenuBar *)pInplaceMenuBar->GetMenuBar(); - else - { - MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, xMenuBar.get() ); - pMenuBar = (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar(); - } - - Window* pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; - if ( bSetVisible ) - pSysWindow->SetMenuBar( pMenuBar ); - else - pSysWindow->SetMenuBar( 0 ); - } - } - - // Hide/show the statusbar according to bSetVisible - if ( bSetVisible ) - implts_showStatusBar(); - else - implts_hideStatusBar(); - - if ( !bOld ) - { - WriteGuard aWriteLock( m_aLock ); - m_bDoLayout = sal_False; - } - - if ( bSetVisible ) - { - implts_createNonContextSensitiveToolBars(); - implts_doLayout_notify( sal_False ); - } - else - { - // Set docking area window size to zero - ReadGuard aReadLock2( m_aLock ); - Reference< css::awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - Reference< css::awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - Reference< css::awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; - Reference< css::awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; - aReadLock2.unlock(); - - try - { - if ( xTopDockingWindow.is() ) - xTopDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xLeftDockingWindow.is() ) - xLeftDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xRightDockingWindow.is() ) - xRightDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - if ( xBottomDockingWindow.is() ) - xBottomDockingWindow->setPosSize( 0, 0, 0, 0, css::awt::PosSize::POSSIZE ); - - WriteGuard aWriteLock( m_aLock ); - m_aDockingArea = css::awt::Rectangle(); - m_bMustDoLayout = sal_True; - aWriteLock.unlock(); - } - catch ( Exception& ) - { - } - } -} - -void LayoutManager::implts_setCurrentUIVisibility( sal_Bool bShow ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( !bShow && pIter->m_bVisible && pIter->m_xUIElement.is() ) - pIter->m_bMasterHide = true; - else if ( bShow && pIter->m_bMasterHide ) - pIter->m_bMasterHide = false; - } - - if ( !bShow && m_aStatusBarElement.m_bVisible && m_aStatusBarElement.m_xUIElement.is() ) - m_aStatusBarElement.m_bMasterHide = true; - else if ( bShow && m_aStatusBarElement.m_bVisible ) - m_aStatusBarElement.m_bMasterHide = false; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - implts_updateUIElementsVisibleState( bShow ); -} - -void LayoutManager::implts_destroyStatusBar() -{ - Reference< XComponent > xCompStatusBar; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_aStatusBarElement.m_aName = rtl::OUString(); - xCompStatusBar = Reference< XComponent >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); - m_aStatusBarElement.m_xUIElement.clear(); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( xCompStatusBar.is() ) - xCompStatusBar->dispose(); - - implts_destroyProgressBar(); -} - -void LayoutManager::implts_createStatusBar( const rtl::OUString& aStatusBarName ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - if ( !m_aStatusBarElement.m_xUIElement.is() ) - { - implts_readStatusBarState( aStatusBarName ); - m_aStatusBarElement.m_aName = aStatusBarName; - m_aStatusBarElement.m_xUIElement = implts_createElement( aStatusBarName ); - } - - implts_createProgressBar(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ -} - -void LayoutManager::implts_readStatusBarState( const rtl::OUString& rStatusBarName ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - if ( !m_aStatusBarElement.m_bStateRead ) - { - // Read persistent data for status bar if not yet read! - if ( implts_readWindowStateData( rStatusBarName, m_aStatusBarElement )) - m_aStatusBarElement.m_bStateRead = sal_True; - } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ -} - -void LayoutManager::implts_createProgressBar() -{ - Reference< XUIElement > xStatusBar; - Reference< XUIElement > xProgressBar; - Reference< XUIElement > xProgressBarBackup; - Reference< css::awt::XWindow > xContainerWindow; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); - xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); - xProgressBarBackup = m_xProgressBarBackup; - m_xProgressBarBackup.clear(); - xContainerWindow = m_xContainerWindow; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - sal_Bool bRecycled = xProgressBarBackup.is(); - ProgressBarWrapper* pWrapper = 0; - if ( bRecycled ) - pWrapper = (ProgressBarWrapper*)xProgressBarBackup.get(); - else if ( xProgressBar.is() ) - pWrapper = (ProgressBarWrapper*)xProgressBar.get(); - else - pWrapper = new ProgressBarWrapper(); - - if ( xStatusBar.is() ) - { - Reference< css::awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); - pWrapper->setStatusBar( xWindow ); - } - else - { - Reference< css::awt::XWindow > xStatusBarWindow = pWrapper->getStatusBar(); - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pStatusBarWnd = VCLUnoHelper::GetWindow( xStatusBarWindow ); - if ( !pStatusBarWnd ) - { - Window* pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - if ( pWindow ) - { - StatusBar* pStatusBar = new StatusBar( pWindow, WinBits( WB_LEFT | WB_3DLOOK ) ); - Reference< css::awt::XWindow > xStatusBarWindow2( VCLUnoHelper::GetInterface( pStatusBar )); - pWrapper->setStatusBar( xStatusBarWindow2, sal_True ); - } - } - } - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - aWriteLock.lock(); - m_aProgressBarElement.m_xUIElement = Reference< XUIElement >( - static_cast< cppu::OWeakObject* >( pWrapper ), UNO_QUERY ); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( bRecycled ) - implts_showProgressBar(); -} - -void LayoutManager::implts_backupProgressBarWrapper() -{ - // SAFE -> ---------------------------------- - WriteGuard aWriteLock(m_aLock); - - if (m_xProgressBarBackup.is()) - return; - - // safe a backup copy of the current progress! - // This copy will be used automaticly inside createProgressBar() which is called - // implictly from implts_doLayout() .-) - m_xProgressBarBackup = m_aProgressBarElement.m_xUIElement; - - // remove the relation between this old progress bar and our old status bar. - // Otherwhise we work on disposed items ... - // The internal used ProgressBarWrapper can handle a NULL reference. - if ( m_xProgressBarBackup.is() ) - { - ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)m_xProgressBarBackup.get(); - if ( pWrapper ) - pWrapper->setStatusBar( Reference< css::awt::XWindow >(), sal_False ); - } - - // prevent us from dispose() the m_aProgressBarElement.m_xUIElement inside implts_reset() - m_aProgressBarElement.m_xUIElement.clear(); - - aWriteLock.unlock(); - // <- SAFE ---------------------------------- -} - -void LayoutManager::implts_destroyProgressBar() -{ - // dont remove the progressbar in general - // We must reuse it if a new status bar is created later. - // Of course there exists one backup only. - // And further this backup will be released inside our dtor. - implts_backupProgressBarWrapper(); -} - -void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Size& rSize ) -{ - Reference< XUIElement > xStatusBar; - Reference< XUIElement > xProgressBar; - Reference< css::awt::XWindow > xContainerWindow; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); - xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); - xContainerWindow = m_xContainerWindow; - - Reference< css::awt::XWindow > xWindow; - if ( xStatusBar.is() ) - xWindow = Reference< css::awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); - else if ( xProgressBar.is() ) - { - ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); - if ( pWrapper ) - xWindow = pWrapper->getStatusBar(); - } - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( xWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pParentWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pParentWindow && ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR )) - { - Window* pOldParentWindow = pWindow->GetParent(); - if ( pParentWindow != pOldParentWindow ) - pWindow->SetParent( pParentWindow ); - ((StatusBar *)pWindow)->SetPosSizePixel( rPos, rSize ); - } - } -} - -sal_Bool LayoutManager::implts_showProgressBar() -{ - Reference< XUIElement > xStatusBar; - Reference< XUIElement > xProgressBar; - Reference< css::awt::XWindow > xWindow; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); - xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); - sal_Bool bVisible( m_bVisible ); - - m_aProgressBarElement.m_bVisible = sal_True; - if ( bVisible ) - { - if ( xStatusBar.is() && !m_aStatusBarElement.m_bMasterHide ) - { - xWindow = Reference< css::awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); - } - else if ( xProgressBar.is() ) - { - ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); - if ( pWrapper ) - xWindow = pWrapper->getStatusBar(); - } - } - aWriteLock.unlock(); - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - if ( !pWindow->IsVisible() ) - { - pWindow->Show(); - implts_doLayout_notify( sal_False ); - } - return sal_True; - } - - return sal_False; -} - -sal_Bool LayoutManager::implts_hideProgressBar() -{ - Reference< XUIElement > xProgressBar; - Reference< css::awt::XWindow > xWindow; - sal_Bool bHideStatusBar( sal_False ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY ); - - sal_Bool bInternalStatusBar( sal_False ); - if ( xProgressBar.is() ) - { - Reference< css::awt::XWindow > xStatusBar; - ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); - if ( pWrapper ) - xWindow = pWrapper->getStatusBar(); - Reference< css::ui::XUIElement > xStatusBarElement = m_aStatusBarElement.m_xUIElement; - if ( xStatusBarElement.is() ) - xStatusBar = Reference< css::awt::XWindow >( xStatusBarElement->getRealInterface(), UNO_QUERY ); - bInternalStatusBar = xStatusBar != xWindow; - } - m_aProgressBarElement.m_bVisible = sal_False; - implts_readStatusBarState( m_aStatusBarAlias ); - bHideStatusBar = !m_aStatusBarElement.m_bVisible; - aWriteLock.unlock(); - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() && - ( bHideStatusBar || bInternalStatusBar )) - { - pWindow->Hide(); - implts_doLayout_notify( sal_False ); - return sal_True; - } - - return sal_False; -} - -sal_Bool LayoutManager::implts_showStatusBar( sal_Bool bStoreState ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - Reference< css::ui::XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; - if ( bStoreState ) - m_aStatusBarElement.m_bVisible = sal_True; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( xStatusBar.is() ) - { - Reference< css::awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && !pWindow->IsVisible() ) - { - pWindow->Show(); - return sal_True; - } - } - - return sal_False; -} - -sal_Bool LayoutManager::implts_hideStatusBar( sal_Bool bStoreState ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - Reference< css::ui::XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; - if ( bStoreState ) - m_aStatusBarElement.m_bVisible = sal_False; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( xStatusBar.is() ) - { - Reference< css::awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() ) - { - pWindow->Hide(); - return sal_True; - } - } - - return sal_False; -} - -void LayoutManager::implts_setInplaceMenuBar( const Reference< XIndexAccess >& xMergedMenuBar ) -throw (::com::sun::star::uno::RuntimeException) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - - if ( !m_bInplaceMenuSet ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - // Reset old inplace menubar! - m_pInplaceMenuBar = 0; - if ( m_xInplaceMenuBar.is() ) - m_xInplaceMenuBar->dispose(); - m_xInplaceMenuBar.clear(); - m_bInplaceMenuSet = sal_False; - - if ( m_xFrame.is() && - m_xContainerWindow.is() ) - { - rtl::OUString aModuleIdentifier; - Reference< XDispatchProvider > xDispatchProvider; - - MenuBar* pMenuBar = new MenuBar; - m_pInplaceMenuBar = new MenuBarManager( m_xSMGR, m_xFrame, m_xURLTransformer,xDispatchProvider, aModuleIdentifier, pMenuBar, sal_True, sal_True ); - m_pInplaceMenuBar->SetItemContainer( xMergedMenuBar ); - - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; - pSysWindow->SetMenuBar( pMenuBar ); - } - - m_bInplaceMenuSet = sal_True; - m_xInplaceMenuBar = Reference< XComponent >( (OWeakObject *)m_pInplaceMenuBar, UNO_QUERY ); - } - - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - implts_updateMenuBarClose(); - } - -} - -void LayoutManager::implts_resetInplaceMenuBar() -throw (::com::sun::star::uno::RuntimeException) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_bInplaceMenuSet = sal_False; - - // if ( m_xMenuBar.is() && - if ( m_xContainerWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, m_xMenuBar.get() ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; - if ( pMenuBarWrapper ) - pSysWindow->SetMenuBar( (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar() ); - else - pSysWindow->SetMenuBar( 0 ); - } - } - - // Remove inplace menu bar - m_pInplaceMenuBar = 0; - if ( m_xInplaceMenuBar.is() ) - m_xInplaceMenuBar->dispose(); - m_xInplaceMenuBar.clear(); - - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ -} - -void SAL_CALL LayoutManager::attachFrame( const Reference< XFrame >& xFrame ) -throw (::com::sun::star::uno::RuntimeException) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_xFrame = xFrame; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - // if ( xFrame.is() ) - // xFrame->getContainerWindow()->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); -} - -void SAL_CALL LayoutManager::reset() -throw (RuntimeException) -{ - sal_Bool bComponentAttached( sal_False ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - bComponentAttached = m_bComponentAttached; - aReadLock.unlock(); - - implts_reset( sal_True ); -} - -void SAL_CALL LayoutManager::setInplaceMenuBar( sal_Int64 ) -throw (::com::sun::star::uno::RuntimeException) -{ - OSL_ENSURE( sal_False, "This method is obsolete and should not be used!\n" ); -} - -void SAL_CALL LayoutManager::resetInplaceMenuBar() -throw (::com::sun::star::uno::RuntimeException) -{ - OSL_ENSURE( sal_False, "This method is obsolete and should not be used!\n" ); -} - -//--------------------------------------------------------------------------------------------------------- -// XMenuBarMergingAcceptor -//--------------------------------------------------------------------------------------------------------- -sal_Bool SAL_CALL LayoutManager::setMergedMenuBar( - const Reference< XIndexAccess >& xMergedMenuBar ) -throw (::com::sun::star::uno::RuntimeException) -{ - implts_setInplaceMenuBar( xMergedMenuBar ); - - css::uno::Any a; - implts_notifyListeners( css::frame::LayoutManagerEvents::MERGEDMENUBAR, a ); - return sal_True; -} - -void SAL_CALL LayoutManager::removeMergedMenuBar() -throw (::com::sun::star::uno::RuntimeException) -{ - implts_resetInplaceMenuBar(); -} - -::com::sun::star::awt::Rectangle SAL_CALL LayoutManager::getCurrentDockingArea() -throw ( RuntimeException ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - return m_aDockingArea; -} - -Reference< XDockingAreaAcceptor > SAL_CALL LayoutManager::getDockingAreaAcceptor() -throw (::com::sun::star::uno::RuntimeException) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - return m_xDockingAreaAcceptor; -} - -void SAL_CALL LayoutManager::setDockingAreaAcceptor( const Reference< ::com::sun::star::ui::XDockingAreaAcceptor >& xDockingAreaAcceptor ) -throw ( RuntimeException ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - - if (( m_xDockingAreaAcceptor == xDockingAreaAcceptor ) || - !m_xFrame.is() ) - return; - - // IMPORTANT: Be sure to stop layout timer if don't have a docking area acceptor! - if ( !xDockingAreaAcceptor.is() ) - m_aAsyncLayoutTimer.Stop(); - - sal_Bool bAutomaticToolbars( m_bAutomaticToolbars ); - std::vector< Reference< css::awt::XWindow > > oldDockingAreaWindows; - - if ( !xDockingAreaAcceptor.is() ) - m_aAsyncLayoutTimer.Stop(); - - // Remove listener from old docking area acceptor - if ( m_xDockingAreaAcceptor.is() ) - { - Reference< css::awt::XWindow > xWindow( m_xDockingAreaAcceptor->getContainerWindow() ); - if ( xWindow.is() && ( m_xFrame->getContainerWindow() != m_xContainerWindow || !xDockingAreaAcceptor.is() ) ) - xWindow->removeWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject * >( this ), UNO_QUERY )); - - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] ); - oldDockingAreaWindows.push_back( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] ); - - m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT].clear(); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT].clear(); - m_aDockingArea = css::awt::Rectangle(); - - Window* pContainerWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pContainerWindow ) - pContainerWindow->RemoveChildEventListener( LINK( this, LayoutManager, WindowEventListener ) ); - - // destroy panel manager - delete m_pPanelManager; - m_pPanelManager = NULL; - } - - // Set new docking area acceptor and add ourself as window listener on the container window. - // Create our docking area windows which are parents for all docked windows. - css::uno::Reference< css::awt::XWindow > xTopDockWindow; - css::uno::Reference< css::awt::XWindow > xBottomDockWindow; - css::uno::Reference< css::awt::XWindow > xLeftDockWindow; - css::uno::Reference< css::awt::XWindow > xRightDockWindow; - - Reference< ::com::sun::star::ui::XDockingAreaAcceptor > xOldDockingAreaAcceptor( m_xDockingAreaAcceptor ); - m_xDockingAreaAcceptor = xDockingAreaAcceptor; - if ( m_xDockingAreaAcceptor.is() ) - { - m_aDockingArea = css::awt::Rectangle(); - m_xContainerWindow = m_xDockingAreaAcceptor->getContainerWindow(); - m_xContainerTopWindow.set( m_xContainerWindow, UNO_QUERY ); - m_xContainerWindow->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - - // we always must keep a connection to the window of our frame for resize events - if ( m_xContainerWindow != m_xFrame->getContainerWindow() ) - m_xFrame->getContainerWindow()->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - - // #i37884# set initial visibility state - in the plugin case the container window is already shown - // and we get no notification anymore - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - if( pContainerWindow ) - m_bParentWindowVisible = pContainerWindow->IsVisible(); - } - - css::uno::Reference< css::awt::XWindowPeer > xParent( m_xContainerWindow, UNO_QUERY ); - xTopDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); - xBottomDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); - xLeftDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); - xRightDockWindow = Reference< css::awt::XWindow >( implts_createToolkitWindow( xParent ), UNO_QUERY ); - m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] = xTopDockWindow; - m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] = xBottomDockWindow; - m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] = xLeftDockWindow; - m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] = xRightDockWindow; - - // create new panel manager - m_pPanelManager = new PanelManager( m_xSMGR, m_xFrame ); - m_pPanelManager->createPanels(); - } - - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( xDockingAreaAcceptor.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - ::DockingAreaWindow* pWindow; - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xTopDockWindow ) ); - if( pWindow ) pWindow->SetAlign( WINDOWALIGN_TOP ); - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xBottomDockWindow ) ); - if( pWindow ) pWindow->SetAlign( WINDOWALIGN_BOTTOM ); - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xLeftDockWindow ) ); - if( pWindow ) pWindow->SetAlign( WINDOWALIGN_LEFT ); - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xRightDockWindow ) ); - if( pWindow ) pWindow->SetAlign( WINDOWALIGN_RIGHT ); - - // Add layout manager as listener to get notifications about toolbar button activties - Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - if ( pContainerWindow ) - pContainerWindow->AddChildEventListener( LINK( this, LayoutManager, WindowEventListener ) ); - - // We have now a new container window, reparent all child windows! - implts_reparentChildWindows(); - } - else - implts_destroyElements(); // remove all elements - - if ( !oldDockingAreaWindows.empty() ) - { - const sal_uInt32 nCount = oldDockingAreaWindows.size(); - for ( sal_uInt32 i = 0; i < nCount; ++i ) - { - if ( oldDockingAreaWindows[i].is() ) - { - try - { - oldDockingAreaWindows[i]->dispose(); - } - catch ( Exception& ) - { - } - } - } - - // Reset docking area size for our old docking area acceptor - css::awt::Rectangle aEmptyRect; - xOldDockingAreaAcceptor->setDockingAreaSpace( aEmptyRect ); - } - - if ( xDockingAreaAcceptor.is() ) - { - if ( bAutomaticToolbars ) - { - implts_createAddonsToolBars(); // create addon toolbars - implts_createCustomToolBars(); // create custom toolbars - implts_createNonContextSensitiveToolBars(); - } - implts_sortUIElements(); - implts_doLayout( sal_True, sal_False ); - } -} - -void LayoutManager::implts_reparentChildWindows() -{ - UIElementVector aUIElementVector; - UIElement aStatusBarElement; - css::uno::Reference< css::awt::XWindow > xTopDockWindow; - css::uno::Reference< css::awt::XWindow > xBottomDockWindow; - css::uno::Reference< css::awt::XWindow > xLeftDockWindow; - css::uno::Reference< css::awt::XWindow > xRightDockWindow; - css::uno::Reference< css::awt::XWindow > xContainerWindow; - css::uno::Reference< css::awt::XWindow > xStatusBarWindow; - - WriteGuard aWriteLock( m_aLock ); - aUIElementVector = m_aUIElements; - xTopDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - xBottomDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; - xLeftDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - xRightDockWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; - xContainerWindow = m_xContainerWindow; - aStatusBarElement = m_aStatusBarElement; - aWriteLock.unlock(); - - if ( aStatusBarElement.m_xUIElement.is() ) - { - try - { - xStatusBarWindow = Reference< css::awt::XWindow >( - aStatusBarElement.m_xUIElement->getRealInterface(), - UNO_QUERY ); - } - catch ( RuntimeException& ) - { - throw; - } - catch ( Exception& ) - { - } - } - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - Window* pTopDockWindow = VCLUnoHelper::GetWindow( xTopDockWindow ); - Window* pBottomDockWindow = VCLUnoHelper::GetWindow( xBottomDockWindow ); - Window* pLeftDockWindow = VCLUnoHelper::GetWindow( xLeftDockWindow ); - Window* pRightDockWindow = VCLUnoHelper::GetWindow( xRightDockWindow ); - if ( pContainerWindow ) - { - UIElementVector::iterator pIter; - for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) - { - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow; - try - { - // We have to retreive the window reference with try/catch as it is - // possible that all elements has been disposed! - xWindow = Reference< css::awt::XWindow >( xUIElement->getRealInterface(), UNO_QUERY ); - } - catch ( RuntimeException& ) - { - throw; - } - catch ( Exception& ) - { - } - - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - // Reparent our child windows acording to their current state. - if ( pIter->m_bFloating ) - pWindow->SetParent( pContainerWindow ); - else - { - if ( pIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_TOP ) - pWindow->SetParent( pTopDockWindow ); - else if ( pIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_BOTTOM ) - pWindow->SetParent( pBottomDockWindow ); - else if ( pIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_LEFT ) - pWindow->SetParent( pLeftDockWindow ); - else - pWindow->SetParent( pRightDockWindow ); - } - } - } - } - - if ( xStatusBarWindow.is() ) - { - Window* pWindow = VCLUnoHelper::GetWindow( xStatusBarWindow ); - if ( pWindow ) - pWindow->SetParent( pContainerWindow ); - } - - implts_resetMenuBar(); - } -} - -uno::Reference< ui::XUIElement > LayoutManager::implts_createDockingWindow( const ::rtl::OUString& aElementName ) -{ - Reference< XUIElement > xUIElement = implts_createElement( aElementName ); - return xUIElement; -} - -IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) -{ - // To enable toolbar controllers to change their image when a sub-toolbar function - // is activated, we need this mechanism. We have NO connection between these toolbars - // anymore! - if ( pEvent && pEvent->ISA( VclWindowEvent )) - { - if ( pEvent->GetId() == VCLEVENT_TOOLBOX_SELECT ) - { - Window* pWindow( ((VclWindowEvent*)pEvent)->GetWindow() ); - ToolBox* pToolBox( 0 ); - rtl::OUString aToolbarName; - rtl::OUString aCommand; - - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - pToolBox = (ToolBox *)pWindow; - aToolbarName = pToolBox->GetSmartHelpId().GetStr(); - sal_Int32 i = aToolbarName.lastIndexOf( ':' ); - if (( aToolbarName.getLength() > 0 ) && - ( i > 0 ) && (( i+ 1 ) < aToolbarName.getLength() )) - { - // Remove ".HelpId:" protocol from toolbar name - aToolbarName = aToolbarName.copy( i+1 ); - - USHORT nId = pToolBox->GetCurItemId(); - if ( nId > 0 ) - aCommand = pToolBox->GetItemCommand( nId ); - } - } - - if (( aToolbarName.getLength() > 0 ) && ( aCommand.getLength() > 0 )) - { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - std::vector< css::uno::Reference< css::ui::XUIFunctionListener > > aListenerArray; - UIElementVector::iterator pIter; - - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aType.equalsAscii( "toolbar" ) && - pIter->m_xUIElement.is() ) - { - css::uno::Reference< css::ui::XUIFunctionListener > xListener( pIter->m_xUIElement, UNO_QUERY ); - if ( xListener.is() ) - aListenerArray.push_back( xListener ); - } - } - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - const sal_uInt32 nCount = aListenerArray.size(); - for ( sal_uInt32 i = 0; i < nCount; ++i ) - { - try - { - aListenerArray[i]->functionExecute( aToolbarName, aCommand ); - } - catch ( RuntimeException& e ) - { - throw e; - } - catch ( Exception& ) {} - } - } - } - else if ( pEvent->GetId() == VCLEVENT_TOOLBOX_FORMATCHANGED ) - { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - - Window* pWindow( ((VclWindowEvent*)pEvent)->GetWindow() ); - ToolBox* pToolBox( 0 ); - rtl::OUString aToolbarName; - - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - pToolBox = (ToolBox *)pWindow; - aToolbarName = pToolBox->GetSmartHelpId().GetStr(); - if (( aToolbarName.getLength() > 0 ) && ( m_nLockCount == 0 )) - m_aAsyncLayoutTimer.Start(); - } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - } - } - - return 1; -} - -void SAL_CALL LayoutManager::createElement( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::createElement" ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - Reference< XFrame > xFrame = m_xFrame; - Reference< XURLTransformer > xURLTransformer = m_xURLTransformer; - sal_Bool bInPlaceMenu = m_bInplaceMenuSet; - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( !xFrame.is() ) - return; - - Reference< XModel > xModel( impl_getModelFromFrame( xFrame ) ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - - sal_Bool bFound( sal_False ); - sal_Bool bNotify( sal_False ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< ::com::sun::star::ui::XUIElement > xUIElement; - - implts_findElement( aName, aElementType, aElementName, xUIElement ); - bFound = xUIElement.is(); - - if ( /*xFrame.is() && */m_xContainerWindow.is() && !implts_isPreviewModel( xModel ) ) // no bars on preview mode - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - if ( !bFound ) - { - SvtCommandOptions aCmdOptions; - - xUIElement = implts_createElement( aName ); - sal_Bool bVisible( sal_False ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), UNO_QUERY ); - if ( xDockWindow.is() && xWindow.is() ) - { - try - { - xDockWindow->addDockableWindowListener( Reference< css::awt::XDockableWindowListener >( - static_cast< OWeakObject * >( this ), UNO_QUERY )); - xWindow->addWindowListener( Reference< css::awt::XWindowListener >( - static_cast< OWeakObject * >( this ), UNO_QUERY )); - xDockWindow->enableDocking( sal_True ); - } - catch ( Exception& ) - { - } - } - - UIElement& rElement = impl_findElement( aName ); - if ( rElement.m_aName.getLength() > 0 ) - { - // Reuse a local entry so we are able to use the latest - // UI changes for this document. - implts_setElementData( rElement, xDockWindow ); - rElement.m_xUIElement = xUIElement; - bVisible = rElement.m_bVisible; - } - else - { - // Create new UI element and try to read its state data - UIElement aNewToolbar( aName, aElementType, xUIElement ); - implts_readWindowStateData( aName, aNewToolbar ); - implts_setElementData( aNewToolbar, xDockWindow ); - implts_insertUIElement( aNewToolbar ); - bVisible = aNewToolbar.m_bVisible; - } - - // set toolbar menu style according to customize command state - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - ToolBox* pToolbar = (ToolBox *)pWindow; - USHORT nMenuType = pToolbar->GetMenuType(); - if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, m_aCustomizeCmd )) - pToolbar->SetMenuType( nMenuType & ~TOOLBOX_MENUTYPE_CUSTOMIZE ); - else - pToolbar->SetMenuType( nMenuType | TOOLBOX_MENUTYPE_CUSTOMIZE ); - } - } - aWriteLock.unlock(); - - implts_sortUIElements(); - - if ( bVisible ) - { - doLayout(); - bNotify = sal_True; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - if ( aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ) && !bInPlaceMenu ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - // PB 2004-12-15 #i38743# don't create a menubar if frame isn't top - if ( !m_xMenuBar.is() && implts_isFrameOrWindowTop(xFrame) ) - m_xMenuBar = implts_createElement( aName ); - - if ( m_xMenuBar.is() && implts_isFrameOrWindowTop(xFrame) ) - { - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; - Reference< css::awt::XMenuBar > xMenuBar; - - Reference< XPropertySet > xPropSet( m_xMenuBar, UNO_QUERY ); - if ( xPropSet.is() ) - { - try - { - xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar; - } - catch ( com::sun::star::beans::UnknownPropertyException ) - { - } - catch ( com::sun::star::lang::WrappedTargetException ) - { - } - } - - if ( xMenuBar.is() ) - { - VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); - if ( pAwtMenuBar ) - { - MenuBar* pMenuBar = (MenuBar*)pAwtMenuBar->GetMenu(); - if ( pMenuBar ) - { - pSysWindow->SetMenuBar( pMenuBar ); - pMenuBar->SetDisplayable( m_bMenuVisible ); - if ( m_bMenuVisible ) - { - bNotify = sal_True; - } - implts_updateMenuBarClose(); - } - } - } - } - } - } - aWriteLock.unlock(); - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && ( implts_isFrameOrWindowTop(xFrame) || implts_isEmbeddedLayoutManager() )) - { - implts_createStatusBar( aName ); - bNotify = sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - implts_isFrameOrWindowTop(xFrame) ) - { - implts_createProgressBar(); - bNotify = sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - aWriteLock.unlock(); - - aWriteLock.unlock(); - - // Add layout manager as listener for docking and other window events - Reference< css::uno::XInterface > xThis( static_cast< OWeakObject* >(this), css::uno::UNO_QUERY ); - xUIElement = implts_createDockingWindow( aName ); - if ( xUIElement.is() ) - { - impl_addWindowListeners( xThis, xUIElement ); - m_pPanelManager->addDockingWindow( aName, xUIElement ); - } - - // The docking window is created by a factory method located in the sfx2 library. -// CreateDockingWindow( xFrame, aElementName ); - } - } - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - if ( bNotify ) - { - // UI element is invisible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) ); - } -} - -void SAL_CALL LayoutManager::destroyElement( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::destroyElement" ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - - sal_Bool bMustLayouted( sal_False ); - sal_Bool bMustBeDestroyed( sal_False ); - sal_Bool bMustBeSorted( sal_False ); - sal_Bool bNotify( sal_False ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - Reference< XComponent > xComponent; - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - if ( !m_bInplaceMenuSet ) - { - impl_clearUpMenuBar(); - m_xMenuBar.clear(); - bNotify = sal_True; - } - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - aWriteLock.unlock(); - implts_destroyStatusBar(); - bMustLayouted = sal_True; - bNotify = sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) ) - { - aWriteLock.unlock(); - implts_createProgressBar(); - bMustLayouted = sal_True; - bNotify = sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - UIElementVector::iterator pIter; - - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName ) - { - xComponent.set( pIter->m_xUIElement, UNO_QUERY ); - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - rtl::OUString aAddonTbResourceName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )); - if ( aName.indexOf( aAddonTbResourceName ) != 0 ) - { - try - { - if ( xWindow.is() ) - xWindow->removeWindowListener( Reference< css::awt::XWindowListener >( - static_cast< OWeakObject * >( this ), UNO_QUERY )); - } - catch( Exception& ) - { - } - - try - { - if ( xDockWindow.is() ) - xDockWindow->removeDockableWindowListener( Reference< css::awt::XDockableWindowListener >( - static_cast< OWeakObject * >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - - bMustBeDestroyed = sal_True; - } - else - { - pIter->m_bVisible = sal_False; - xWindow->setVisible( sal_False ); - bNotify = sal_True; - } - - if ( !xDockWindow->isFloating() ) - bMustLayouted = sal_True; - if ( bMustBeDestroyed ) - pIter->m_xUIElement.clear(); - - bMustBeSorted = sal_True; - } - - break; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR ); - aWriteLock.unlock(); - - impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false ); - bMustLayouted = sal_False; - bNotify = sal_False; - } - } - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( bMustBeDestroyed ) - { - if ( xComponent.is() ) - xComponent->dispose(); - bNotify = sal_True; - } - - if ( bMustBeSorted ) - { - implts_sortUIElements(); - if ( bMustLayouted ) - doLayout(); - } - - if ( bNotify ) - { - // UI element is invisible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) ); - } -} - -::sal_Bool SAL_CALL LayoutManager::requestElement( const ::rtl::OUString& ResourceURL ) -throw (::com::sun::star::uno::RuntimeException) -{ - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::requestElement" ); - - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - UIElementVector::iterator pIter; - sal_Bool bResult( sal_False ); - sal_Bool bNotify( sal_False ); - - WriteGuard aWriteLock( m_aLock ); - if ( impl_parseResourceURL( ResourceURL, aElementType, aElementName )) - { - ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); - RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); - - if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == ResourceURL )) - { - implts_readStatusBarState( ResourceURL ); - if ( m_aStatusBarElement.m_bVisible && !m_aStatusBarElement.m_bMasterHide ) - { - createElement( ResourceURL ); - - // There are some situation where we are not able to create an element. - // Therefore we have to check the reference before further action. - // See #i70019# - css::uno::Reference< css::ui::XUIElement > xUIElement( m_aStatusBarElement.m_xUIElement ); - if ( xUIElement.is() ) - { - // we need VCL here to pass special flags to Show() - vos::OGuard aGuard( Application::GetSolarMutex() ); - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - doLayout(); - bResult = sal_True; - bNotify = sal_True; - } - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) ) - { - aWriteLock.unlock(); - implts_showProgressBar(); - doLayout(); - bResult = sal_True; - bNotify = sal_True; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - if ( m_bVisible ) - { - bool bFound( false ); - bool bShowElement( false ); - - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == ResourceURL ) - { - bFound = sal_True; - bShowElement = ( pIter->m_bVisible && !pIter->m_bMasterHide && m_bParentWindowVisible ); - - Reference< css::awt::XWindow2 > xContainerWindow( m_xContainerWindow, UNO_QUERY ); - if ( xContainerWindow.is() && pIter->m_bFloating ) - bShowElement = ( bShowElement && xContainerWindow->isActive() ); - - if ( pIter->m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - if ( xDockWindow.is() && xDockWindow->isFloating() ) - bShowElement = ( bShowElement && xContainerWindow->isActive() ); - - if ( xDockWindow.is() && bShowElement ) - { - pIter->m_bVisible = sal_True; - aWriteLock.unlock(); - - // we need VCL here to pass special flags to Show() - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if( pWindow && !pWindow->IsReallyVisible() ) - { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - implts_writeNewStateData( ResourceURL, xWindow ); - - if ( xDockWindow.is() && !xDockWindow->isFloating() ) - doLayout(); - bResult = sal_True; - bNotify = sal_True; - } - - bResult = sal_False; - } - } // if ( pIter->m_xUIElement.is() ) - break; - } - } - - // Create toolbar on demand when it's visible - if ( !bResult ) - { - Reference< ::com::sun::star::ui::XUIElement > xUIElement; - if ( !bFound ) - { - UIElement aNewToolbar( aElementName, aElementType, xUIElement ); - aNewToolbar.m_aName = ResourceURL; - implts_readWindowStateData( ResourceURL, aNewToolbar ); - implts_insertUIElement( aNewToolbar ); - aWriteLock.unlock(); - - implts_sortUIElements(); - if ( aNewToolbar.m_bVisible ) - createElement( ResourceURL ); - bResult = sal_True; - bNotify = sal_True; - } - else if ( bShowElement ) - { - aWriteLock.unlock(); - - createElement( ResourceURL ); - bResult = sal_True; - bNotify = sal_True; - } - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - aWriteLock.unlock(); - - CreateDockingWindow( xFrame, aElementName ); - } - } - - if ( bNotify ) - { - // UI element is visible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( ResourceURL ) ); - } - - return bResult; -} - -Reference< XUIElement > SAL_CALL LayoutManager::getElement( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< XUIElement > xElement; - - implts_findElement( aName, aElementType, aElementName, xElement ); - return xElement; -} - -Sequence< Reference< ::com::sun::star::ui::XUIElement > > SAL_CALL LayoutManager::getElements() -throw (::com::sun::star::uno::RuntimeException) -{ - ReadGuard aReadLock( m_aLock ); - - sal_Bool bMenuBar( sal_False ); - sal_Bool bStatusBar( sal_False ); - sal_Int32 nSize = m_aUIElements.size(); - - if ( m_xMenuBar.is() ) - { - ++nSize; - bMenuBar = sal_True; - } - if ( m_aStatusBarElement.m_xUIElement.is() ) - { - ++nSize; - bStatusBar = sal_True; - } - - Sequence< Reference< ::com::sun::star::ui::XUIElement > > aSeq( nSize ); - - sal_Int32 nIndex = 0; - UIElementVector::const_iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - aSeq[nIndex++] = pIter->m_xUIElement; - } - if ( bMenuBar ) - aSeq[nIndex++] = m_xMenuBar; - if ( bStatusBar ) - aSeq[nIndex++] = m_aStatusBarElement.m_xUIElement; - - // Resize sequence as we now know our correct size - aSeq.realloc( nIndex ); - - return aSeq; -} - -sal_Bool SAL_CALL LayoutManager::showElement( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::showElement" ); - - sal_Bool bResult( sal_False ); - sal_Bool bNotify( sal_False ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); - RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); - - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - WriteGuard aWriteLock( m_aLock ); - m_bMenuVisible = sal_True; - aWriteLock.unlock(); - - bResult = implts_resetMenuBar(); - bNotify = bResult; - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - WriteGuard aWriteLock( m_aLock ); - if ( m_aStatusBarElement.m_xUIElement.is() && - !m_aStatusBarElement.m_bMasterHide ) - { - if ( implts_showStatusBar( sal_True )) - { - implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); - doLayout(); - bResult = sal_True; - bNotify = sal_True; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) - { - bNotify = bResult = implts_showProgressBar(); - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - UIElementVector::iterator pIter; - - WriteGuard aWriteLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - UIElement aUIElement = *pIter; - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - sal_Bool bShowElement( !pIter->m_bMasterHide && m_bParentWindowVisible ); - - pIter->m_bVisible = sal_True; - aWriteLock.unlock(); - - implts_writeWindowStateData( aUIElement.m_aName, aUIElement ); - implts_sortUIElements(); - - if ( xDockWindow.is() && bShowElement ) - { - // we need VCL here to pass special flags to Show() - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if( pWindow ) - { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - bNotify = sal_True; - } - implts_writeNewStateData( aName, xWindow ); - - if ( xDockWindow.is() && !xDockWindow->isFloating() ) - doLayout(); - - bResult = sal_True; - } // if ( xDockWindow.is() && bShowElement ) - break; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - ReadGuard aReadGuard( m_aLock ); - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR ); - aReadGuard.unlock(); - - impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, true ); - } - } - - if ( bNotify ) - { - // UI element is visible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_VISIBLE, uno::makeAny( aName ) ); - } - - return bResult; -} - -sal_Bool SAL_CALL LayoutManager::hideElement( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::hideElement" ); - - - sal_Bool bResult( sal_False ); - sal_Bool bNotify( sal_False ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - ::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); - RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); - - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - WriteGuard aWriteLock( m_aLock ); - - if ( m_xContainerWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - m_bMenuVisible = sal_False; - if ( pWindow ) - { - MenuBar* pMenuBar = ((SystemWindow *)pWindow)->GetMenuBar(); - if ( pMenuBar ) - { - pMenuBar->SetDisplayable( sal_False ); - bResult = sal_True; - bNotify = sal_True; - } - } - } - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - WriteGuard aWriteLock( m_aLock ); - if ( m_aStatusBarElement.m_xUIElement.is() && - !m_aStatusBarElement.m_bMasterHide ) - { - if ( implts_hideStatusBar( sal_True )) - { - implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); - doLayout(); - bNotify = sal_True; - bResult = sal_True; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) - { - bResult = bNotify = implts_hideProgressBar(); - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - UIElementVector::iterator pIter; - - WriteGuard aWriteLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - if ( xDockWindow.is() ) - { - pIter->m_bVisible = sal_False; - aWriteLock.unlock(); - - xWindow->setVisible( sal_False ); - implts_writeNewStateData( aName, xWindow ); - - if ( xDockWindow.is() && !xDockWindow->isFloating() ) - doLayout(); - - bResult = sal_True; - bNotify = sal_True; - } // if ( xDockWindow.is() ) - break; - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - ReadGuard aReadGuard( m_aLock ); - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR ); - aReadGuard.unlock(); - - impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false ); - } - } - - if ( bNotify ) - { - // UI element is visible - provide information to listeners - implts_notifyListeners( css::frame::LayoutManagerEvents::UIELEMENT_INVISIBLE, uno::makeAny( aName ) ); - } - - return sal_False; -} - -sal_Bool SAL_CALL LayoutManager::dockWindow( const ::rtl::OUString& aName, DockingArea DockingArea, const css::awt::Point& Pos ) -throw (RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( aName, aUIElement ) && aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow.is() ) - { - if ( DockingArea != DockingArea_DOCKINGAREA_DEFAULT ) - aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( DockingArea ); - - if (( Pos.X != SAL_MAX_INT32 ) && ( Pos.Y != SAL_MAX_INT32 )) - aUIElement.m_aDockedData.m_aPos = ::Point( Pos.X, Pos.Y ); - - if ( !xDockWindow->isFloating() ) - { - Window* pWindow( 0 ); - ToolBox* pToolBox( 0 ); - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - pToolBox = (ToolBox *)pWindow; - - // We have to set the alignment of the toolbox. It's possible that the toolbox is moved from a - // horizontal to a vertical docking area! - pToolBox->SetAlign( ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea )); - } - } - - if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) || - ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) - { - // Docking on its default position without a preset position - - // we have to find a good place for it. - ::Size aSize; - - vos::OGuard aGuard( Application::GetSolarMutex() ); - { - if ( pToolBox ) - aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) ); - else - aSize = pWindow->GetSizePixel(); - } - - ::Point aPixelPos; - ::Point aDockPos; - implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); - aUIElement.m_aDockedData.m_aPos = aDockPos; - } - } - - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aName ) - { - rUIElement.m_aDockedData.m_nDockedArea = aUIElement.m_aDockedData.m_nDockedArea; - rUIElement.m_aDockedData.m_aPos = aUIElement.m_aDockedData.m_aPos; - } - aWriteLock.unlock(); - - if ( xDockWindow->isFloating() ) - { - // Will call toggle floating mode which will do the rest! - xWindow->setVisible( sal_False ); - xDockWindow->setFloatingMode( sal_False ); - xWindow->setVisible( sal_True ); - } - else - { - implts_writeWindowStateData( aName, aUIElement ); - implts_sortUIElements(); - - if ( aUIElement.m_bVisible ) - doLayout(); - } - - return sal_True; - } - } - catch ( DisposedException& ) - { - } - } - - return sal_False; -} - -::sal_Bool SAL_CALL LayoutManager::dockAllWindows( ::sal_Int16 nElementType ) throw (::com::sun::star::uno::RuntimeException) -{ - if ( nElementType == UIElementType::TOOLBAR ) - { - std::vector< rtl::OUString > aToolBarNameVector; - - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - { - ReadGuard aReadLock( m_aLock ); - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aType.equalsAscii( "toolbar" ) && - pIter->m_xUIElement.is() && - pIter->m_bFloating && - pIter->m_bVisible ) - aToolBarNameVector.push_back( pIter->m_aName ); - } - } - - const sal_uInt32 nCount = aToolBarNameVector.size(); - for ( sal_uInt32 i = 0; i < nCount; ++i ) - { - ::com::sun::star::awt::Point aPoint; - aPoint.X = aPoint.Y = SAL_MAX_INT32; - dockWindow( aToolBarNameVector[i], DockingArea_DOCKINGAREA_DEFAULT, aPoint ); - } - } - - return sal_False; -} - -sal_Bool SAL_CALL LayoutManager::floatWindow( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( aName, aUIElement )) - { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xWindow.is() && xDockWindow.is() ) - { - if ( !xDockWindow->isFloating() ) - { - xDockWindow->setFloatingMode( sal_True ); - return sal_True; - } - } - } - catch ( DisposedException& ) - { - } - } - } - - return sal_False; -} - -::sal_Bool SAL_CALL LayoutManager::lockWindow( const ::rtl::OUString& ResourceURL ) -throw (::com::sun::star::uno::RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( ResourceURL, aUIElement )) - { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && - pWindow->IsVisible() && - xDockWindow.is() && - !xDockWindow->isFloating() ) - { - aUIElement.m_aDockedData.m_bLocked = sal_True; - implts_writeWindowStateData( ResourceURL, aUIElement ); - xDockWindow->lock(); - - // Write back lock state - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aUIElement.m_aName ) - rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; - aWriteLock.unlock(); - - doLayout(); - return sal_True; - } - } - catch ( DisposedException& ) - { - } - } - } - - return sal_False; -} - -::sal_Bool SAL_CALL LayoutManager::unlockWindow( const ::rtl::OUString& ResourceURL ) -throw (::com::sun::star::uno::RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( ResourceURL, aUIElement )) - { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && - pWindow->IsVisible() && - xDockWindow.is() && - !xDockWindow->isFloating() ) - { - aUIElement.m_aDockedData.m_bLocked = sal_False; - implts_writeWindowStateData( ResourceURL, aUIElement ); - xDockWindow->unlock(); - - // Write back lock state - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aUIElement.m_aName ) - rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; - aWriteLock.unlock(); - - doLayout(); - return sal_True; - } - } - catch ( DisposedException& ) - { - } - } - } - - return sal_False; -} - -void SAL_CALL LayoutManager::setElementSize( const ::rtl::OUString& aName, const css::awt::Size& aSize ) -throw (RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( aName, aUIElement )) - { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - if ( xWindow.is() && xWindow2.is() && xDockWindow.is() ) - { - if ( aUIElement.m_bFloating ) - { - xWindow2->setOutputSize( aSize ); - implts_writeNewStateData( aName, xWindow ); - } - } - } - catch ( DisposedException& ) - { - } - } - } -} - -void SAL_CALL LayoutManager::setElementPos( const ::rtl::OUString& aName, const css::awt::Point& aPos ) -throw (RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( aName, aUIElement ) && aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - if ( xWindow.is() && xDockWindow.is() ) - { - if ( aUIElement.m_bFloating ) - { - xWindow->setPosSize( aPos.X, aPos.Y, 0, 0, css::awt::PosSize::POS ); - implts_writeNewStateData( aName, xWindow ); - } - else - { - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aName ) - rUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); - aWriteLock.unlock(); - - aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); - implts_writeWindowStateData( aName, aUIElement ); - implts_sortUIElements(); - - if ( aUIElement.m_bVisible ) - doLayout(); - } - } - } - catch ( DisposedException& ) - { - } - } -} - -void SAL_CALL LayoutManager::setElementPosSize( const ::rtl::OUString& aName, const css::awt::Point& aPos, const css::awt::Size& aSize ) -throw (RuntimeException) -{ - UIElement aUIElement; - - if ( implts_findElement( aName, aUIElement )) - { - if ( aUIElement.m_xUIElement.is() ) - { - try - { - Reference< css::awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - - if ( xWindow.is() && xWindow2.is() && xDockWindow.is() ) - { - if ( aUIElement.m_bFloating ) - { - xWindow2->setPosSize( aPos.X, aPos.Y, 0, 0, css::awt::PosSize::POS ); - xWindow2->setOutputSize( aSize ); - implts_writeNewStateData( aName, xWindow ); - } - else - { - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aName ) - rUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); - aWriteLock.unlock(); - - aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); - implts_writeWindowStateData( aName, rUIElement ); - implts_sortUIElements(); - - if ( aUIElement.m_bVisible ) - doLayout(); - } - } - } - catch ( DisposedException& ) - { - } - } - } -} - -sal_Bool SAL_CALL LayoutManager::isElementVisible( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - ReadGuard aReadLock( m_aLock ); - if ( m_xContainerWindow.is() ) - { - aReadLock.unlock(); - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - MenuBar* pMenuBar = ((SystemWindow *)pWindow)->GetMenuBar(); - if ( pMenuBar && pMenuBar->IsDisplayable() ) - return sal_True; - } - else - { - aReadLock.lock(); - return m_bMenuVisible; - } - } - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || - ( m_aStatusBarElement.m_aName == aName )) - { - if ( m_aStatusBarElement.m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( - m_aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() ) - return sal_True; - else - return sal_False; - } - } - } - else if (( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ))) - { - if ( m_aProgressBarElement.m_xUIElement.is() ) - return m_aProgressBarElement.m_bVisible; - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - UIElementVector::const_iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - return pWindow && pWindow->IsVisible(); - } - } - } - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) - { - ReadGuard aReadGuard( m_aLock ); - css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); - aReadGuard.unlock(); - - return IsDockingWindowVisible( xFrame, aElementName ); - } - } - - return sal_False; -} - -sal_Bool SAL_CALL LayoutManager::isElementFloating( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - UIElementVector::const_iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - return xDockWindow.is() && xDockWindow->isFloating(); - } - } - - return sal_False; -} - -sal_Bool SAL_CALL LayoutManager::isElementDocked( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - UIElementVector::const_iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - return xDockWindow.is() && !xDockWindow->isFloating(); - } - } - - return sal_False; -} - -::sal_Bool SAL_CALL LayoutManager::isElementLocked( const ::rtl::OUString& ResourceURL ) -throw (::com::sun::star::uno::RuntimeException) -{ - UIElementVector::const_iterator pIter; - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if (( pIter->m_aName == ResourceURL ) && ( pIter->m_xUIElement.is() )) - { - Reference< css::awt::XDockableWindow > xDockWindow( pIter->m_xUIElement->getRealInterface(), UNO_QUERY ); - return xDockWindow.is() && !xDockWindow->isLocked(); - } - } - - return sal_False; -} - -css::awt::Size SAL_CALL LayoutManager::getElementSize( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - ReadGuard aReadLock( m_aLock ); - UIElement aElementData; - if ( implts_findElement( aName,aElementData ) && aElementData.m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( aElementData.m_xUIElement->getRealInterface(), UNO_QUERY ); - if ( xWindow.is() ) - { - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - ::Size aSize = pWindow->GetSizePixel(); - css::awt::Size aElementSize; - aElementSize.Width = aSize.Width(); - aElementSize.Height = aSize.Height(); - return aElementSize; - } // if ( pWindow ) - } - } - return css::awt::Size(); -} - -css::awt::Point SAL_CALL LayoutManager::getElementPos( const ::rtl::OUString& aName ) -throw (RuntimeException) -{ - ReadGuard aReadLock( m_aLock ); - UIElement aElementData; - if ( implts_findElement( aName,aElementData ) && aElementData.m_xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( aElementData.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow.is() ) - { - css::awt::Point aPos; - if ( aElementData.m_bFloating ) - { - css::awt::Rectangle aRect = xWindow->getPosSize(); - aPos.X = aRect.X; - aPos.Y = aRect.Y; - } - else - { - ::Point aVirtualPos = aElementData.m_aDockedData.m_aPos; - aPos.X = aVirtualPos.X(); - aPos.Y = aVirtualPos.Y(); - } - - return aPos; - } - } - - return css::awt::Point(); -} - -void SAL_CALL LayoutManager::lock() -throw (RuntimeException) -{ - implts_lock(); - - ReadGuard aReadLock( m_aLock ); - sal_Int32 nLockCount( m_nLockCount ); - aReadLock.unlock(); - - RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::lock lockCount=%d", nLockCount ); -#ifdef DBG_UTIL - ByteString aStr("LayoutManager::lock "); - aStr += ByteString::CreateFromInt32((long)this); - aStr += " - "; - aStr += ByteString::CreateFromInt32(nLockCount); - DBG_TRACE( aStr.GetBuffer() ); -#endif - - Any a( nLockCount ); - implts_notifyListeners( css::frame::LayoutManagerEvents::LOCK, a ); -} - -void SAL_CALL LayoutManager::unlock() -throw (RuntimeException) -{ - sal_Bool bDoLayout( implts_unlock() ); - - ReadGuard aReadLock( m_aLock ); - sal_Int32 nLockCount( m_nLockCount ); - aReadLock.unlock(); - - RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::unlock lockCount=%d", nLockCount ); -#ifdef DBG_UTIL - ByteString aStr("LayoutManager::unlock "); - aStr += ByteString::CreateFromInt32((long)this); - aStr += " - "; - aStr += ByteString::CreateFromInt32(nLockCount); - DBG_TRACE( aStr.GetBuffer() ); -#endif - // conform to documentation: unlock with lock count == 0 means force a layout - - WriteGuard aWriteLock( m_aLock ); - if ( bDoLayout ) - m_aAsyncLayoutTimer.Stop(); - aWriteLock.unlock(); - - Any a( nLockCount ); - implts_notifyListeners( css::frame::LayoutManagerEvents::UNLOCK, a ); - - if ( bDoLayout ) - implts_doLayout_notify( sal_True ); -} - -void SAL_CALL LayoutManager::doLayout() -throw (RuntimeException) -{ - implts_doLayout_notify( sal_True ); -} - -void LayoutManager::implts_doLayout_notify( sal_Bool bOuterResize ) -{ - sal_Bool bLayouted = implts_doLayout( sal_False, bOuterResize ); - if ( bLayouted ) - implts_notifyListeners( css::frame::LayoutManagerEvents::LAYOUT, Any() ); -} - -sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize ) -{ - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::implts_doLayout" ); - - sal_Bool bNoLock( sal_False ); - css::awt::Rectangle aCurrBorderSpace; - Reference< css::awt::XWindow > xContainerWindow; - Reference< css::awt::XTopWindow2 > xContainerTopWindow; - Reference< css::awt::XWindow > xComponentWindow; - Reference< XDockingAreaAcceptor > xDockingAreaAcceptor; - bool bPreserveContentSize( false ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - - sal_Bool bMustDoLayout( m_bMustDoLayout ); - if ( !m_bParentWindowVisible ) - return sal_False; - - bNoLock = ( m_nLockCount == 0 ); - xContainerWindow = m_xContainerWindow; - xContainerTopWindow = m_xContainerTopWindow; - xComponentWindow = m_xFrame->getComponentWindow(); - xDockingAreaAcceptor = m_xDockingAreaAcceptor; - aCurrBorderSpace = m_aDockingArea; - bPreserveContentSize = m_bPreserveContentSize; - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - sal_Bool bLayouted( sal_False ); - - if ( bNoLock && - xDockingAreaAcceptor.is() && - xContainerWindow.is() && - xComponentWindow.is() ) - { - bLayouted = sal_True; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteGuard( m_aLock ); - m_bDoLayout = sal_True; - aWriteGuard.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - css::awt::Rectangle aBorderSpace = implts_calcDockingAreaSizes(); - sal_Bool bGotRequestedBorderSpace( sal_True ); - sal_Bool bEqual = implts_compareRectangles( aBorderSpace, aCurrBorderSpace ); - - if ( !bEqual || bForceRequestBorderSpace || bMustDoLayout ) - { - // we always resize the content window (instead of the complete container window) if we're not set up - // to (attempt to) preserve the content window's size - if ( bOuterResize && !bPreserveContentSize ) - bOuterResize = sal_False; - - // maximized windows can resized their content window only, not their container window - if ( bOuterResize && xContainerTopWindow.is() && xContainerTopWindow->getIsMaximized() ) - bOuterResize = sal_False; - - // if the component window does not have a size (yet), then we can't use it to calc the container - // window size - css::awt::Rectangle aComponentRect = xComponentWindow->getPosSize(); - if ( bOuterResize && ( aComponentRect.Width == 0 ) && ( aComponentRect.Height == 0 ) ) - bOuterResize = sal_False; - - bGotRequestedBorderSpace = sal_False; - if ( bOuterResize ) - { - Reference< awt::XDevice > xDevice( xContainerWindow, uno::UNO_QUERY ); - awt::DeviceInfo aContainerInfo = xDevice->getInfo(); - - awt::Size aRequestedSize( aComponentRect.Width + aContainerInfo.LeftInset + aContainerInfo.RightInset + aBorderSpace.X + aBorderSpace.Width, - aComponentRect.Height + aContainerInfo.TopInset + aContainerInfo.BottomInset + aBorderSpace.Y + aBorderSpace.Height ); - awt::Point aComponentPos( aBorderSpace.X, aBorderSpace.Y ); - - bGotRequestedBorderSpace = implts_resizeContainerWindow( aRequestedSize, aComponentPos ); - } - - // if we did not do an container window resize, or it failed, then use the DockingAcceptor as usual - if ( !bGotRequestedBorderSpace ) - { - bGotRequestedBorderSpace = xDockingAreaAcceptor->requestDockingAreaSpace( aBorderSpace ); - if ( bGotRequestedBorderSpace ) - xDockingAreaAcceptor->setDockingAreaSpace( aBorderSpace ); - } - - if ( bGotRequestedBorderSpace ) - { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - aWriteGuard.lock(); - m_aDockingArea = aBorderSpace; - m_bMustDoLayout = sal_False; - aWriteGuard.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - } - } - - if ( bGotRequestedBorderSpace ) - { - ::Size aContainerSize; - ::Size aStatusBarSize; - - aStatusBarSize = implts_getStatusBarSize(); - aBorderSpace.Height -= aStatusBarSize.Height(); - implts_setDockingAreaWindowSizes( aBorderSpace ); - - // Subtract status bar size from our container output size. Docking area windows - // don't contain the status bar! - aContainerSize = implts_getContainerWindowOutputSize(); - aContainerSize.Height() -= aStatusBarSize.Height(); - - // Retrieve row/column dependent data from all docked user-interface elements - for ( sal_Int32 i = 0; i < DOCKINGAREAS_COUNT; i++ ) - { - std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; - - implts_getDockingAreaElementInfos( (DockingArea)i, aRowColumnsWindowData ); - - sal_Int32 nOffset( 0 ); - const sal_uInt32 nCount = aRowColumnsWindowData.size(); - for ( sal_uInt32 j = 0; j < nCount; ++j ) - { - implts_calcWindowPosSizeOnSingleRowColumn( i, nOffset, aRowColumnsWindowData[j], aContainerSize ); - nOffset += aRowColumnsWindowData[j].nStaticSize; - } - } - - // Position the status bar - if ( aStatusBarSize.Height() > 0 ) - { - implts_setStatusBarPosSize( ::Point( 0, std::max(( aContainerSize.Height() ), long( 0 ))), - ::Size( aContainerSize.Width(),aStatusBarSize.Height() )); - } - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - aWriteGuard.lock(); - m_bDoLayout = sal_False; - aWriteGuard.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - } - } - - return bLayouted; -} - -sal_Bool LayoutManager::implts_compareRectangles( const css::awt::Rectangle& rRect1, - const css::awt::Rectangle& rRect2 ) -{ - return (( rRect1.X == rRect2.X ) && - ( rRect1.Y == rRect2.Y ) && - ( rRect1.Width == rRect2.Width ) && - ( rRect1.Height == rRect2.Height )); -} - -sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContainerSize, - const awt::Point& rComponentPos ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - Reference< awt::XWindow > xContainerWindow = m_xContainerWindow; - Reference< awt::XTopWindow2 > xContainerTopWindow = m_xContainerTopWindow; - Reference< awt::XWindow > xComponentWindow = m_xFrame->getComponentWindow(); - Reference< container::XIndexAccess > xDisplayAccess = m_xDisplayAccess; - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - // calculate the maximum size we have for the container window - awt::Rectangle aWorkArea; - try - { - sal_Int32 nDisplay = xContainerTopWindow->getDisplay(); - Reference< beans::XPropertySet > xDisplayInfo( xDisplayAccess->getByIndex( nDisplay ), UNO_QUERY_THROW ); - OSL_VERIFY( xDisplayInfo->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WorkArea" ) ) ) >>= aWorkArea ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - - if ( ( aWorkArea.Width > 0 ) && ( aWorkArea.Height > 0 ) ) - { - if ( ( rContainerSize.Width > aWorkArea.Width ) - || ( rContainerSize.Height > aWorkArea.Height ) - ) - return sal_False; - // Strictly, this is not correct. If we have a multi-screen display (css.awt.DisplayAccess.MultiDisplay == true), - // the the "effective work area" would be much larger than the work area of a single display, since we could in theory - // position the container window across multiple screens. - // However, this should suffice as a heuristics here ... (nobody really wants to check whethere the different screens are - // stacked horizontally or vertically, whether their work areas can really be combined, or are separated by non-work-areas, - // and the like ... right?) - } - - // resize our container window - xContainerWindow->setPosSize( 0, 0, rContainerSize.Width, rContainerSize.Height, css::awt::PosSize::SIZE ); - // position the component window - xComponentWindow->setPosSize( rComponentPos.X, rComponentPos.Y, 0, 0, css::awt::PosSize::POS ); - return sal_True; -} - -void SAL_CALL LayoutManager::setVisible( sal_Bool bVisible ) -throw (::com::sun::star::uno::RuntimeException) -{ - sal_Bool bWasVisible( sal_True ); - - WriteGuard aWriteLock( m_aLock ); - bWasVisible = m_bVisible; - m_bVisible = bVisible; - aWriteLock.unlock(); - - if ( bWasVisible != bVisible ) - implts_setVisibleState( bVisible ); -} - -sal_Bool SAL_CALL LayoutManager::isVisible() -throw (::com::sun::star::uno::RuntimeException) -{ - ReadGuard aReadLock( m_aLock ); - return m_bVisible; -} - -void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockingArea, - sal_Int32 nOffset, - SingleRowColumnWindowData& rRowColumnWindowData, - const ::Size& rContainerSize ) -{ - sal_Int32 nDiff( 0 ); - sal_Int32 nRCSpace( rRowColumnWindowData.nSpace ); - sal_Int32 nTopDockingAreaSize; - sal_Int32 nBottomDockingAreaSize; - sal_Int32 nContainerClientSize; - - if ( rRowColumnWindowData.aRowColumnWindows.empty() ) - return; - - if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - nContainerClientSize = rContainerSize.Width(); - nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize; - } - else - { - nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); - nBottomDockingAreaSize = implts_getTopBottomDockingAreaSizes().Height(); - nContainerClientSize = ( rContainerSize.Height() - nTopDockingAreaSize - nBottomDockingAreaSize ); - nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize; - } - - const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindowSizes.size(); - if (( nDiff < 0 ) && ( nRCSpace > 0 )) - { - // First we try to reduce the size of blank space before/behind docked windows - sal_Int32 i = nCount - 1; - while ( i >= 0 ) - { - sal_Int32 nSpace = rRowColumnWindowData.aRowColumnSpace[i]; - if ( nSpace >= -nDiff ) - { - - if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount ; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff; - } - else - { - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount ; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff; - } - nDiff = 0; - - break; - } - else if ( nSpace > 0 ) - { - if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].X -= nSpace; - } - else - { - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].Y -= nSpace; - } - nDiff += nSpace; - } - --i; - } - } - - // Check if we have to reduce further - if ( nDiff < 0 ) - { - // Now we have to reduce the size of certain docked windows - sal_Int32 i = sal_Int32( nCount - 1 ); - while ( i >= 0 ) - { - css::awt::Rectangle& rWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; - ::Size aMinSize; - - vos::OGuard aGuard( Application::GetSolarMutex() ); - { - Reference< css::awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - aMinSize = ((ToolBox *)pWindow)->CalcMinimumWindowSizePixel(); - } - - if (( aMinSize.Width() > 0 ) && ( aMinSize.Height() > 0 )) - { - if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - sal_Int32 nMaxReducation = ( rWinRect.Width - aMinSize.Width() ); - if ( nMaxReducation >= -nDiff ) - { - rWinRect.Width = rWinRect.Width + nDiff; - nDiff = 0; - } - else - { - rWinRect.Width = aMinSize.Width(); - nDiff += nMaxReducation; - } - - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].X += nDiff; - } - else - { - sal_Int32 nMaxReducation = ( rWinRect.Height - aMinSize.Height() ); - if ( nMaxReducation >= -nDiff ) - { - rWinRect.Height = rWinRect.Height + nDiff; - nDiff = 0; - } - else - { - rWinRect.Height = aMinSize.Height(); - nDiff += nMaxReducation; - } - - // Try to move this and all user elements behind with the calculated difference - for ( sal_uInt32 j = i; j < nCount; j++ ) - rRowColumnWindowData.aRowColumnWindowSizes[j].Y += nDiff; - } - } - - if ( nDiff >= 0 ) - break; - - --i; - } - } - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - Window* pDockAreaWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[nDockingArea] ); - aReadLock.unlock(); - - sal_Int32 nCurrPos( 0 ); - sal_Int32 nStartOffset( 0 ); - - if ( nDockingArea == DockingArea_DOCKINGAREA_RIGHT ) - nStartOffset = pDockAreaWindow->GetSizePixel().Width() - rRowColumnWindowData.nStaticSize; - else if ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - nStartOffset = pDockAreaWindow->GetSizePixel().Height() - rRowColumnWindowData.nStaticSize; - - vos::OGuard aGuard( Application::GetSolarMutex() ); - for ( sal_uInt32 i = 0; i < nCount; i++ ) - { - Reference< css::awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - Window* pOldParentWindow = pWindow->GetParent(); - - if ( pDockAreaWindow != pOldParentWindow ) - pWindow->SetParent( pDockAreaWindow ); - - css::awt::Rectangle aWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; - if ( nDockingArea == DockingArea_DOCKINGAREA_TOP ) - { - if ( aWinRect.X < nCurrPos ) - aWinRect.X = nCurrPos; - pWindow->SetPosSizePixel( ::Point( aWinRect.X, nOffset ), - ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); - nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; - } - else if ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - { - if ( aWinRect.X < nCurrPos ) - aWinRect.X = nCurrPos; - pWindow->SetPosSizePixel( ::Point( aWinRect.X, nStartOffset - nOffset ), - ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); - nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; - } - else if ( nDockingArea == DockingArea_DOCKINGAREA_LEFT ) - { - if ( aWinRect.Y < nCurrPos ) - aWinRect.Y = nCurrPos; - pWindow->SetPosSizePixel( ::Point( nOffset, aWinRect.Y ), - ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); - nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; - } - else if ( nDockingArea == DockingArea_DOCKINGAREA_RIGHT ) - { - if ( aWinRect.Y < nCurrPos ) - aWinRect.Y = nCurrPos; - pWindow->SetPosSizePixel( ::Point( nStartOffset - nOffset, aWinRect.Y ), - ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); - nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; - } - } -} - -::Size LayoutManager::implts_getStatusBarSize() -{ - ReadGuard aReadLock( m_aLock ); - sal_Bool bStatusBarVisible( isElementVisible( m_aStatusBarAlias )); - sal_Bool bProgressBarVisible( isElementVisible( m_aProgressBarAlias )); - sal_Bool bVisible = m_bVisible; - Reference< XUIElement > xStatusBar = m_aStatusBarElement.m_xUIElement; - Reference< XUIElement > xProgressBar = m_aProgressBarElement.m_xUIElement; - - Reference< css::awt::XWindow > xWindow; - if ( bStatusBarVisible && bVisible && xStatusBar.is() ) - xWindow = Reference< css::awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY ); - else if ( xProgressBar.is() && !xStatusBar.is() && bProgressBarVisible ) - { - ProgressBarWrapper* pWrapper = (ProgressBarWrapper*)xProgressBar.get(); - if ( pWrapper ) - xWindow = pWrapper->getStatusBar(); - } - aReadLock.unlock(); - - if ( xWindow.is() ) - { - css::awt::Rectangle aPosSize = xWindow->getPosSize(); - return ::Size( aPosSize.Width, aPosSize.Height ); - } - else - return ::Size(); -} - -css::awt::Rectangle LayoutManager::implts_calcDockingAreaSizes() -{ - Reference< css::awt::XWindow > xContainerWindow; - Reference< XDockingAreaAcceptor > xDockingAreaAcceptor; - - ReadGuard aReadLock( m_aLock ); - xContainerWindow = m_xContainerWindow; - xDockingAreaAcceptor = m_xDockingAreaAcceptor; - UIElementVector aWindowVector( m_aUIElements ); - aReadLock.unlock(); - - css::awt::Rectangle aBorderSpace; - if ( xDockingAreaAcceptor.is() && xContainerWindow.is() ) - { - sal_Int32 nCurrRowColumn( 0 ); - sal_Int32 nCurrPos( 0 ); - sal_Int32 nCurrDockingArea( DockingArea_DOCKINGAREA_TOP ); - std::vector< sal_Int32 > aRowColumnSizes[DOCKINGAREAS_COUNT]; - UIElementVector::const_iterator pConstIter; - - aRowColumnSizes[nCurrDockingArea].clear(); - aRowColumnSizes[nCurrDockingArea].push_back( 0 ); - - for ( pConstIter = aWindowVector.begin(); pConstIter != aWindowVector.end(); pConstIter++ ) - { - Reference< XUIElement > xUIElement( pConstIter->m_xUIElement, UNO_QUERY ); - if ( xUIElement.is() ) - { - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xWindow.is() && xDockWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() && !xDockWindow->isFloating() ) - { - css::awt::Rectangle aPosSize = xWindow->getPosSize(); - if ( pConstIter->m_aDockedData.m_nDockedArea != nCurrDockingArea ) - { - nCurrDockingArea = pConstIter->m_aDockedData.m_nDockedArea; - nCurrRowColumn = 0; - nCurrPos = 0; - aRowColumnSizes[nCurrDockingArea].clear(); - aRowColumnSizes[nCurrDockingArea].push_back( 0 ); - } - - if ( pConstIter->m_aDockedData.m_nDockedArea == nCurrDockingArea ) - { - if (( pConstIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_TOP ) || - ( pConstIter->m_aDockedData.m_nDockedArea == DockingArea_DOCKINGAREA_BOTTOM )) - { - if ( pConstIter->m_aDockedData.m_aPos.Y() > nCurrPos ) - { - ++nCurrRowColumn; - nCurrPos = pConstIter->m_aDockedData.m_aPos.Y(); - aRowColumnSizes[nCurrDockingArea].push_back( 0 ); - } - - if ( aPosSize.Height > aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] ) - aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] = aPosSize.Height; - } - else - { - if ( pConstIter->m_aDockedData.m_aPos.X() > nCurrPos ) - { - ++nCurrRowColumn; - nCurrPos = pConstIter->m_aDockedData.m_aPos.X(); - aRowColumnSizes[nCurrDockingArea].push_back( 0 ); - } - - if ( aPosSize.Width > aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] ) - aRowColumnSizes[nCurrDockingArea][nCurrRowColumn] = aPosSize.Width; - } - } - } - } - } - } - - // Sum up max heights from every row/column - if ( !aWindowVector.empty() ) - { - for ( sal_Int32 i = 0; i <= DockingArea_DOCKINGAREA_RIGHT; i++ ) - { - sal_Int32 nSize( 0 ); - const sal_uInt32 nCount = aRowColumnSizes[i].size(); - for ( sal_uInt32 j = 0; j < nCount; j++ ) - nSize += aRowColumnSizes[i][j]; - - if ( i == DockingArea_DOCKINGAREA_TOP ) - aBorderSpace.Y = nSize; - else if ( i == DockingArea_DOCKINGAREA_BOTTOM ) - aBorderSpace.Height = nSize; - else if ( i == DockingArea_DOCKINGAREA_LEFT ) - aBorderSpace.X = nSize; - else - aBorderSpace.Width = nSize; - } - } - - // We have to add the height of a possible status bar - aBorderSpace.Height += implts_getStatusBarSize().Height(); - } - - return aBorderSpace; -} - -void LayoutManager::implts_setDockingAreaWindowSizes( const css::awt::Rectangle& rBorderSpace ) -{ - Reference< css::awt::XWindow > xContainerWindow; - - ReadGuard aReadLock( m_aLock ); - xContainerWindow = m_xContainerWindow; - aReadLock.unlock(); - - css::uno::Reference< css::awt::XDevice > xDevice( xContainerWindow, css::uno::UNO_QUERY ); - // Convert relativ size to output size. - css::awt::Rectangle aRectangle = xContainerWindow->getPosSize(); - css::awt::DeviceInfo aInfo = xDevice->getInfo(); - css::awt::Size aContainerClientSize = css::awt::Size( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , - aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); - ::Size aStatusBarSize = implts_getStatusBarSize(); - - sal_Int32 nLeftRightDockingAreaHeight( aContainerClientSize.Height ); - if ( rBorderSpace.Y >= 0 ) - { - // Top docking area window - aReadLock.lock(); - Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] ); - aReadLock.unlock(); - - xDockAreaWindow->setPosSize( 0, 0, aContainerClientSize.Width, rBorderSpace.Y, css::awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); - nLeftRightDockingAreaHeight -= rBorderSpace.Y; - } - - if ( rBorderSpace.Height >= 0 ) - { - // Bottom docking area window - sal_Int32 nBottomPos = std::max( sal_Int32( aContainerClientSize.Height - rBorderSpace.Height - aStatusBarSize.Height() ), sal_Int32( 0 )); - sal_Int32 nHeight = ( nBottomPos == 0 ) ? 0 : rBorderSpace.Height; - - aReadLock.lock(); - Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] ); - aReadLock.unlock(); - - xDockAreaWindow->setPosSize( 0, nBottomPos, aContainerClientSize.Width, nHeight, css::awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); - nLeftRightDockingAreaHeight -= nHeight; - } - - nLeftRightDockingAreaHeight -= aStatusBarSize.Height(); - if ( rBorderSpace.X >= 0 || nLeftRightDockingAreaHeight > 0 ) - { - // Left docking area window - aReadLock.lock(); - Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] ); - aReadLock.unlock(); - - // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! - sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); - - xDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, css::awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); - } - if ( rBorderSpace.Width >= 0 || nLeftRightDockingAreaHeight > 0 ) - { - // Right docking area window - aReadLock.lock(); - Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] ); - aReadLock.unlock(); - - // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! - sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width )); - sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); - sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width; - - xDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, css::awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); - } - - // Position the status bar - if ( aStatusBarSize.Height() > 0 ) - { - implts_setStatusBarPosSize( ::Point( 0, std::max(( aContainerClientSize.Height - aStatusBarSize.Height() ), long( 0 ))), - ::Size( aContainerClientSize.Width, aStatusBarSize.Height() )); - } -} - -//--------------------------------------------------------------------------------------------------------- -// XMenuCloser -//--------------------------------------------------------------------------------------------------------- -void LayoutManager::implts_updateMenuBarClose() -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - sal_Bool bShowCloser = m_bMenuBarCloser; - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - aWriteLock.unlock(); - - if ( xContainerWindow.is() ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - Window* pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow ) - { - SystemWindow* pSysWindow = (SystemWindow *)pWindow; - MenuBar* pMenuBar = pSysWindow->GetMenuBar(); - if ( pMenuBar ) - { - // TODO remove link on FALSE ?! - if ( bShowCloser ) - { - pMenuBar->ShowCloser( TRUE ); - pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); - } - else - { - pMenuBar->ShowCloser( FALSE ); - pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); - } - } - } - } -} - -sal_Bool LayoutManager::implts_resetMenuBar() -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - sal_Bool bMenuVisible( m_bMenuVisible ); - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - - MenuBar* pSetMenuBar = 0; - if ( m_xInplaceMenuBar.is() ) - pSetMenuBar = (MenuBar *)m_pInplaceMenuBar->GetMenuBar(); - else - { - MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, m_xMenuBar.get() ); - if ( pMenuBarWrapper ) - pSetMenuBar = (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar(); - } - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow && bMenuVisible && pSetMenuBar ) - { - ((SystemWindow *)pWindow)->SetMenuBar( pSetMenuBar ); - pSetMenuBar->SetDisplayable( sal_True ); - return sal_True; - } - - return sal_False; -} - -void LayoutManager::implts_setMenuBarCloser(sal_Bool bCloserState) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_bMenuBarCloser = bCloserState; - aWriteLock.unlock(); - - implts_updateMenuBarClose(); -} - -sal_Int16 LayoutManager::implts_getCurrentSymbolsSize() -{ - sal_Int16 eOptSymbolsSize( 0 ); - - { - ReadGuard aReadLock( m_aLock ); - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( m_pMiscOptions ) - eOptSymbolsSize = m_pMiscOptions->GetCurrentSymbolsSize(); - } - - return eOptSymbolsSize; -} - -sal_Int16 LayoutManager::implts_getCurrentSymbolsStyle() -{ - sal_Int16 eOptSymbolsStyle( 0 ); - - { - ReadGuard aReadLock( m_aLock ); - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( m_pMiscOptions ) - eOptSymbolsStyle = m_pMiscOptions->GetCurrentSymbolsStyle(); - } - - return eOptSymbolsStyle; -} - -IMPL_LINK( LayoutManager, MenuBarClose, MenuBar *, EMPTYARG ) -{ - ReadGuard aReadLock( m_aLock ); - css::uno::Reference< css::frame::XDispatchProvider > xProvider(m_xFrame, css::uno::UNO_QUERY); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR; - aReadLock.unlock(); - - if (! xProvider.is()) - return 0; - - css::uno::Reference< css::frame::XDispatchHelper > xDispatcher( - xSMGR->createInstance(SERVICENAME_DISPATCHHELPER), css::uno::UNO_QUERY_THROW); - - xDispatcher->executeDispatch( - xProvider, - ::rtl::OUString::createFromAscii(".uno:CloseWin"), - ::rtl::OUString::createFromAscii("_self"), - 0, - css::uno::Sequence< css::beans::PropertyValue >()); - - return 0; -} - -IMPL_LINK( LayoutManager, OptionsChanged, void*, EMPTYARG ) -{ - sal_Int16 eSymbolsSize( implts_getCurrentSymbolsSize() ); - sal_Int16 eSymbolsStyle( implts_getCurrentSymbolsStyle() ); - - ReadGuard aReadLock( m_aLock ); - sal_Int16 eOldSymbolsSize = m_eSymbolsSize; - sal_Int16 eOldSymbolsStyle = m_eSymbolsStyle; - aReadLock.unlock(); - - if ( eSymbolsSize != eOldSymbolsSize || eSymbolsStyle != eOldSymbolsStyle ) - { - WriteGuard aWriteLock( m_aLock ); - m_eSymbolsSize = eSymbolsSize; - m_eSymbolsStyle = eSymbolsStyle; - aWriteLock.unlock(); - - std::vector< Reference< XUpdatable > > aToolBarVector; - - aReadLock.lock(); - { - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_xUIElement.is() ) - aToolBarVector.push_back( Reference< XUpdatable >( pIter->m_xUIElement, UNO_QUERY )); - } - } - aReadLock.unlock(); - - lock(); - { - std::vector< Reference< XUpdatable > >::iterator pIter; - for ( pIter = aToolBarVector.begin(); pIter != aToolBarVector.end(); pIter++ ) - { - if ( (*pIter).is() ) - (*pIter)->update(); - } - } - unlock(); - doLayout(); - } - - return 1; -} - -IMPL_LINK( LayoutManager, SettingsChanged, void*, EMPTYARG ) -{ - return 1; -} - -//--------------------------------------------------------------------------------------------------------- -// XDockableWindowListener -//--------------------------------------------------------------------------------------------------------- -void SAL_CALL LayoutManager::startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException) -{ - sal_Bool bWinFound( sal_False ); - UIElement aUIElement; - - ReadGuard aReadGuard( m_aLock ); - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - Reference< css::awt::XWindow2 > xWindow( e.Source, UNO_QUERY ); - aReadGuard.unlock(); - - Window* pContainerWindow( 0 ); - Window* pWindow( 0 ); - ::Point aMousePos; - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - aMousePos = pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y )); - } - - bWinFound = implts_findElement( e.Source, aUIElement ); - - if ( !bWinFound ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - PanelWindow* pPanelWindow = dynamic_cast(pWindow); - if ( pPanelWindow ) - m_pPanelManager->startDocking( e ); - } - else if ( xWindow.is() ) - { - css::awt::Rectangle aRect; - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow->isFloating() ) - { - css::awt::Rectangle aPos = xWindow->getPosSize(); - css::awt::Size aSize = xWindow->getOutputSize(); - - aUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); - aUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); - - vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - { - ToolBox* pToolBox = (ToolBox *)pWindow; - aUIElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); - } - } - } - - WriteGuard aWriteLock( m_aLock ); - m_bDockingInProgress = bWinFound; - m_aDockUIElement = aUIElement; - m_aDockUIElement.m_bUserActive = sal_True; - m_aStartDockMousePos = aMousePos; - aWriteLock.unlock(); -} - -::Rectangle LayoutManager::implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ) -{ - ::Rectangle aRect( rRect ); - - aRect.Left() -= nHotZoneOffset; - aRect.Top() -= nHotZoneOffset; - aRect.Right() += nHotZoneOffset; - aRect.Bottom() += nHotZoneOffset; - return aRect; -} - -css::awt::DockingData SAL_CALL LayoutManager::docking( const ::com::sun::star::awt::DockingEvent& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - const sal_Int32 MAGNETIC_DISTANCE_UNDOCK = 25; - const sal_Int32 MAGNETIC_DISTANCE_DOCK = 20; - - css::awt::DockingData aDockingData; - Reference< css::awt::XDockableWindow > xDockWindow( e.Source, UNO_QUERY ); - Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - Reference< css::awt::XWindow > xTopDockingWindow; - Reference< css::awt::XWindow > xLeftDockingWindow; - Reference< css::awt::XWindow > xRightDockingWindow; - Reference< css::awt::XWindow > xBottomDockingWindow; - Reference< css::awt::XWindow > xContainerWindow; - UIElement aUIDockingElement; - DockingOperation eDockingOperation( DOCKOP_ON_COLROW ); - ::Size aStatusBarSize; - - aDockingData.TrackingRectangle = e.TrackingRectangle; - sal_Bool bDockingInProgress; - - { - ReadGuard aReadLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; - if ( bDockingInProgress ) - { - xContainerWindow = m_xContainerWindow; - xTopDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP]; - xLeftDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT]; - xRightDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT]; - xBottomDockingWindow = m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM]; - aUIDockingElement = m_aDockUIElement; - aStatusBarSize = implts_getStatusBarSize(); - } - } - - if ( bDockingInProgress && - xDockWindow.is() && - xWindow.is() ) - { - try - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - - sal_Int16 eDockingArea( -1 ); // none - sal_Int32 nMagneticZone( aUIDockingElement.m_bFloating ? MAGNETIC_DISTANCE_DOCK : MAGNETIC_DISTANCE_UNDOCK ); - css::awt::Rectangle aNewTrackingRect; - ::Rectangle aTrackingRect( e.TrackingRectangle.X, - e.TrackingRectangle.Y, - ( e.TrackingRectangle.X + e.TrackingRectangle.Width ), - ( e.TrackingRectangle.Y + e.TrackingRectangle.Height )); - - css::awt::Rectangle aTmpRect = xTopDockingWindow->getPosSize(); - ::Rectangle aTopDockRect( aTmpRect.X, aTmpRect.Y, aTmpRect.Width, aTmpRect.Height ); - ::Rectangle aHotZoneTopDockRect( implts_calcHotZoneRect( aTopDockRect, nMagneticZone )); - - aTmpRect = xBottomDockingWindow->getPosSize(); - ::Rectangle aBottomDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width), ( aTmpRect.Y + aTmpRect.Height )); - ::Rectangle aHotZoneBottomDockRect( implts_calcHotZoneRect( aBottomDockRect, nMagneticZone )); - - aTmpRect = xLeftDockingWindow->getPosSize(); - ::Rectangle aLeftDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); - ::Rectangle aHotZoneLeftDockRect( implts_calcHotZoneRect( aLeftDockRect, nMagneticZone )); - - aTmpRect = xRightDockingWindow->getPosSize(); - ::Rectangle aRightDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); - ::Rectangle aHotZoneRightDockRect( implts_calcHotZoneRect( aRightDockRect, nMagneticZone )); - - Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow ) ); - Window* pDockingAreaWindow( 0 ); - ::Point aMousePos( pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y ))); - - if ( aHotZoneTopDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_TOP; - else if ( aHotZoneBottomDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_BOTTOM; - else if ( aHotZoneLeftDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_LEFT; - else if ( aHotZoneRightDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_RIGHT; - - // Higher priority for movements inside the real docking area - if ( aTopDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_TOP; - else if ( aBottomDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_BOTTOM; - else if ( aLeftDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_LEFT; - else if ( aRightDockRect.IsInside( aMousePos )) - eDockingArea = DockingArea_DOCKINGAREA_RIGHT; - - // Determine if we have a toolbar and set alignment according to the docking area! - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - ToolBox* pToolBox = 0; - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pWindow; - - if ( eDockingArea != -1 ) - { - if ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) - { - aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_TOP; - aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xTopDockingWindow ); - } - else if ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) - { - aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_BOTTOM; - aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xBottomDockingWindow ); - } - else if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) - { - aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_LEFT; - aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xLeftDockingWindow ); - } - else if ( eDockingArea == DockingArea_DOCKINGAREA_RIGHT ) - { - aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_RIGHT; - aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xRightDockingWindow ); - } - - ::Point aOutputPos = pContainerWindow->ScreenToOutputPixel( aTrackingRect.TopLeft() ); - aTrackingRect.SetPos( aOutputPos ); - - ::Rectangle aNewDockingRect( aTrackingRect ); - implts_calcDockingPosSize( aUIDockingElement, eDockingOperation, aNewDockingRect, aMousePos ); - - ::Point aScreenPos = pContainerWindow->OutputToScreenPixel( aNewDockingRect.TopLeft() ); - aNewTrackingRect = css::awt::Rectangle( aScreenPos.X(), - aScreenPos.Y(), - aNewDockingRect.getWidth(), - aNewDockingRect.getHeight() ); - aDockingData.TrackingRectangle = aNewTrackingRect; - } - else if ( pToolBox && bDockingInProgress ) - { - sal_Bool bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); - ::Size aFloatSize = aUIDockingElement.m_aFloatingData.m_aSize; - if ( aFloatSize.Width() > 0 && aFloatSize.Height() > 0 ) - { - aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( - ::Point( e.MousePos.X, e.MousePos.Y )); - aDockingData.TrackingRectangle.Height = aFloatSize.Height(); - aDockingData.TrackingRectangle.Width = aFloatSize.Width(); - } - else - { - aFloatSize = pToolBox->CalcWindowSizePixel(); - if ( !bIsHorizontal ) - { - // Floating toolbars are always horizontal aligned! We have to swap - // width/height if we have a vertical aligned toolbar. - sal_Int32 nTemp = aFloatSize.Height(); - aFloatSize.Height() = aFloatSize.Width(); - aFloatSize.Width() = nTemp; - } - - aDockingData.TrackingRectangle.Height = aFloatSize.Height(); - aDockingData.TrackingRectangle.Width = aFloatSize.Width(); - - // For the first time we don't have any data about the floating size of a toolbar. - // We calculate it and store it for later use. - aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( - ::Point( e.MousePos.X, e.MousePos.Y )); - aUIDockingElement.m_aFloatingData.m_aSize = aFloatSize; - aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); - } - aDockingData.TrackingRectangle.X = e.MousePos.X; - aDockingData.TrackingRectangle.Y = e.MousePos.Y; - } - - aDockingData.bFloating = ( eDockingArea == -1 ); - - // Write current data to the member docking progress data - WriteGuard aWriteLock( m_aLock ); - m_aDockUIElement.m_bFloating = aDockingData.bFloating; - if ( !aDockingData.bFloating ) - { - m_aDockUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; - m_eDockOperation = eDockingOperation; - } - else - m_aDockUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; - aWriteLock.unlock(); - } - catch ( Exception& ) - { - } - } - - return aDockingData; -} - -void SAL_CALL LayoutManager::endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - sal_Bool bDockingInProgress( sal_False ); - sal_Bool bStartDockFloated( sal_False ); - sal_Bool bFloating( sal_False ); - UIElement aUIDockingElement; - - WriteGuard aWriteLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; - aUIDockingElement = m_aDockUIElement; - bFloating = aUIDockingElement.m_bFloating; - - UIElement& rUIElement = impl_findElement( aUIDockingElement.m_aName ); - if ( rUIElement.m_aName == aUIDockingElement.m_aName ) - { - if ( aUIDockingElement.m_bFloating ) - { - // Write last position into position data - Reference< css::awt::XWindow > xWindow( aUIDockingElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - rUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; - css::awt::Rectangle aTmpRect = xWindow->getPosSize(); - rUIElement.m_aFloatingData.m_aPos = ::Point( aTmpRect.X, aTmpRect.Y ); - // make changes also for our local data as we use it to make data persistent - aUIDockingElement.m_aFloatingData = rUIElement.m_aFloatingData; - } - else - { - rUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; - rUIElement.m_aFloatingData.m_aSize = aUIDockingElement.m_aFloatingData.m_aSize; - - if ( m_eDockOperation != DOCKOP_ON_COLROW ) - { - // we have to renumber our row/column data to insert a new row/column - implts_renumberRowColumnData( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, - m_eDockOperation, - aUIDockingElement ); - } - } - - bStartDockFloated = rUIElement.m_bFloating; - rUIElement.m_bFloating = m_aDockUIElement.m_bFloating; - rUIElement.m_bUserActive = sal_True; - } - - // reset member for next docking operation - m_aDockUIElement.m_xUIElement.clear(); - m_eDockOperation = DOCKOP_ON_COLROW; - aWriteLock.unlock(); - - implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); - - if ( bDockingInProgress ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( Reference< css::awt::XWindow >( e.Source, UNO_QUERY )); - ToolBox* pToolBox = 0; - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pWindow; - - if ( pToolBox ) - { - if( e.bFloating ) - { - if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) - pToolBox->SetAlign( WINDOWALIGN_TOP ); - else - pToolBox->SetAlign( WINDOWALIGN_LEFT ); - } - else - { - ::Size aSize; - - pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); - - // Docked toolbars have always one line - aSize = pToolBox->CalcWindowSizePixel( 1 ); - - // Lock layouting updates as our listener would be called due to SetSizePixel - pToolBox->SetOutputSizePixel( aSize ); - } - } - } - - aWriteLock.lock(); - m_bDockingInProgress = sal_False; - aWriteLock.unlock(); - - implts_sortUIElements(); - if ( !bStartDockFloated || !bFloating ) - { - // Optimization: Don't layout if we started floating and now floating again. - // This would not change anything for the docked user-interface elements. - doLayout(); - } -} - -sal_Bool SAL_CALL LayoutManager::prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - sal_Bool bDockingInProgress( sal_False ); - - ReadGuard aReadLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; - aReadLock.unlock(); - - UIElement aUIDockingElement; - sal_Bool bWinFound( implts_findElement( e.Source, aUIDockingElement ) ); - Reference< css::awt::XWindow > xWindow( e.Source, UNO_QUERY ); - - if ( bWinFound && xWindow.is() ) - { - if ( !bDockingInProgress ) - { - css::awt::Rectangle aRect; - Reference< css::awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow->isFloating() ) - { - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - { - if ( pWindow->GetType() == WINDOW_TOOLBOX ) - { - ToolBox* pToolBox = (ToolBox *)pWindow; - aUIDockingElement.m_aFloatingData.m_aPos = pToolBox->GetPosPixel(); - aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->GetOutputSizePixel(); - aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); - } - } - } - - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIDockingElement.m_aName ); - if ( rUIElement.m_aName == aUIDockingElement.m_aName ) - rUIElement = aUIDockingElement; - aWriteLock.unlock(); - } - } - } - - return sal_True; -} - -void SAL_CALL LayoutManager::toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - sal_Bool bDockingInProgress( sal_False ); - UIElement aUIDockingElement; - - ReadGuard aReadLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; - if ( bDockingInProgress ) - aUIDockingElement = m_aDockUIElement; - aReadLock.unlock(); - - Window* pWindow( 0 ); - ToolBox* pToolBox( 0 ); - Reference< css::awt::XWindow2 > xWindow; - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - xWindow = Reference< css::awt::XWindow2 >( e.Source, UNO_QUERY ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - - if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) - pToolBox = (ToolBox *)pWindow; - } - - if ( !bDockingInProgress ) - { - sal_Bool bWinFound( implts_findElement( e.Source, aUIDockingElement ) ); - if ( bWinFound && xWindow.is() ) - { - aUIDockingElement.m_bFloating = !aUIDockingElement.m_bFloating; - aUIDockingElement.m_bUserActive = sal_True; - - WriteGuard aWriteLock( m_aLock ); - m_bDoLayout = sal_True; - aWriteLock.unlock(); - - if ( aUIDockingElement.m_bFloating ) - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pToolBox ) - { - pToolBox->SetLineCount( aUIDockingElement.m_aFloatingData.m_nLines ); - if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) - pToolBox->SetAlign( WINDOWALIGN_TOP ); - else - pToolBox->SetAlign( WINDOWALIGN_LEFT ); - } - - sal_Bool bUndefPos = ( aUIDockingElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || - aUIDockingElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); - sal_Bool bSetSize = ( aUIDockingElement.m_aFloatingData.m_aSize.Width() != 0 && - aUIDockingElement.m_aFloatingData.m_aSize.Height() != 0 ); - - if ( bUndefPos ) - aUIDockingElement.m_aFloatingData.m_aPos = implts_findNextCascadeFloatingPos(); - - if ( !bSetSize ) - { - if ( pToolBox ) - aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->CalcFloatingWindowSizePixel(); - else - aUIDockingElement.m_aFloatingData.m_aSize = pWindow->GetOutputSizePixel(); - } - - xWindow->setPosSize( aUIDockingElement.m_aFloatingData.m_aPos.X(), - aUIDockingElement.m_aFloatingData.m_aPos.Y(), - 0, 0, css::awt::PosSize::POS ); - xWindow->setOutputSize( AWTSize( aUIDockingElement.m_aFloatingData.m_aSize ) ); - } - else - { - if (( aUIDockingElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && - ( aUIDockingElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) - { - // Docking on its default position without a preset position - - // we have to find a good place for it. - ::Point aPixelPos; - ::Point aDockPos; - ::Size aSize; - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pToolBox ) - aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea ) ); - else - aSize = pWindow->GetSizePixel(); - } - - implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); - aUIDockingElement.m_aDockedData.m_aPos = aDockPos; - } - - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pToolBox ) - { - pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); - ::Size aSize = pToolBox->CalcWindowSizePixel( 1 ); - css::awt::Rectangle aRect = xWindow->getPosSize(); - xWindow->setPosSize( aRect.X, aRect.Y, 0, 0, css::awt::PosSize::POS ); - xWindow->setOutputSize( AWTSize( aSize ) ); - } - } - - aWriteLock.lock(); - m_bDoLayout = sal_False; - UIElement& rUIElement = LayoutManager::impl_findElement( aUIDockingElement.m_aName ); - if ( rUIElement.m_aName == aUIDockingElement.m_aName ) - rUIElement = aUIDockingElement; - aWriteLock.unlock(); - - implts_writeWindowStateData( aUIDockingElement.m_aName, aUIDockingElement ); - - implts_sortUIElements(); - doLayout(); - } - } - else - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pToolBox ) - { - if ( aUIDockingElement.m_bFloating ) - { - if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) - pToolBox->SetAlign( WINDOWALIGN_TOP ); - else - pToolBox->SetAlign( WINDOWALIGN_LEFT ); - } - else - { - pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); - } - } - } -} - -void SAL_CALL LayoutManager::closed( const ::com::sun::star::lang::EventObject& e ) -throw (::com::sun::star::uno::RuntimeException) -{ - rtl::OUString aName; - UIElement aUIElement; - UIElementVector::iterator pIter; - - WriteGuard aWriteLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - Reference< XUIElement > xUIElement( pIter->m_xUIElement ); - if ( xUIElement.is() ) - { - Reference< XInterface > xIfac( xUIElement->getRealInterface(), UNO_QUERY ); - if ( xIfac == e.Source ) - { - aName = pIter->m_aName; - - // user closes a toolbar => - // context sensitive toolbar: only destroy toolbar and store state. - // context sensitive toolbar: make it invisible, store state and destroy it. - if ( !pIter->m_bContextSensitive ) - pIter->m_bVisible = sal_False; - - aUIElement = *pIter; - break; - } - } - } - aWriteLock.unlock(); - - - // destroy element - if ( aName.getLength() > 0 ) - { - implts_writeWindowStateData( aName, aUIElement ); - destroyElement( aName ); - } -} - -void SAL_CALL LayoutManager::endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& ) -throw (::com::sun::star::uno::RuntimeException) -{ - -} - -//--------------------------------------------------------------------------------------------------------- -// XLayoutManagerEventBroadcaster -//--------------------------------------------------------------------------------------------------------- -void SAL_CALL LayoutManager::addLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& xListener ) -throw (::com::sun::star::uno::RuntimeException) -{ - m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XLayoutManagerListener >*)NULL ), xListener ); -} - -void SAL_CALL LayoutManager::removeLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& xListener ) -throw (::com::sun::star::uno::RuntimeException) -{ - m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XLayoutManagerListener >*)NULL ), xListener ); -} - -void LayoutManager::implts_notifyListeners( short nEvent, ::com::sun::star::uno::Any aInfoParam ) -{ - css::lang::EventObject aSource (static_cast< ::cppu::OWeakObject*>(this)); - ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::frame::XLayoutManagerListener >*) NULL ) ); - if (pContainer!=NULL) - { - ::cppu::OInterfaceIteratorHelper pIterator(*pContainer); - while (pIterator.hasMoreElements()) - { - try - { - ((css::frame::XLayoutManagerListener*)pIterator.next())->layoutEvent( aSource, nEvent, aInfoParam ); - } - catch( css::uno::RuntimeException& ) - { - pIterator.remove(); - } - } - } -} - -//--------------------------------------------------------------------------------------------------------- -// XWindowListener -//--------------------------------------------------------------------------------------------------------- -void SAL_CALL LayoutManager::windowResized( const css::awt::WindowEvent& aEvent ) -throw( css::uno::RuntimeException ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - - if ( !m_xDockingAreaAcceptor.is() ) - return; - - // Request to set docking area space again. - css::awt::Rectangle aDockingArea( m_aDockingArea ); - Reference< XDockingAreaAcceptor > xDockingAreaAcceptor( m_xDockingAreaAcceptor ); - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - - Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); - if ( xIfac == aEvent.Source && m_bVisible ) - { - // We have to call our resize handler at least once synchronously, as some - // application modules need this. So we have to check if this is the first - // call after the async layout time expired. - m_bMustDoLayout = sal_True; - if ( !m_aAsyncLayoutTimer.IsActive() ) - { - const Link& aLink = m_aAsyncLayoutTimer.GetTimeoutHdl(); - if ( aLink.IsSet() ) - aLink.Call( &m_aAsyncLayoutTimer ); - } - if ( m_nLockCount == 0 ) - m_aAsyncLayoutTimer.Start(); - } - else if ( m_xFrame.is() && aEvent.Source == m_xFrame->getContainerWindow() ) - { - // the container window of my DockingAreaAcceptor is not the same as of my frame - // I still have to resize my frames' window as nobody else will do it - Reference< css::awt::XWindow > xComponentWindow( m_xFrame->getComponentWindow() ); - if( xComponentWindow.is() == sal_True ) - { - css::uno::Reference< css::awt::XDevice > xDevice( m_xFrame->getContainerWindow(), css::uno::UNO_QUERY ); - - // Convert relativ size to output size. - css::awt::Rectangle aRectangle = m_xFrame->getContainerWindow()->getPosSize(); - css::awt::DeviceInfo aInfo = xDevice->getInfo(); - css::awt::Size aSize ( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , - aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); - - // Resize our component window. - xComponentWindow->setPosSize( 0, 0, aSize.Width, aSize.Height, css::awt::PosSize::POSSIZE ); - } - } - else - { - // resize event for one of the UIElements - sal_Bool bLocked( m_bDockingInProgress ); - sal_Bool bDoLayout( m_bDoLayout ); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( !bLocked && !bDoLayout ) - { - // Do not do anything if we are in the middle of a docking process. This would interfere all other - // operations. We will store the new position and size in the docking handlers. - // Do not do anything if we are in the middle of our layouting process. We will adapt the position - // and size of the user interface elements. - UIElement aUIElement; - if ( implts_findElement( aEvent.Source, aUIElement )) - { - if ( aUIElement.m_bFloating ) - implts_writeNewStateData( aUIElement.m_aName, - Reference< css::awt::XWindow >( aEvent.Source, UNO_QUERY )); - else - doLayout(); - } - } - } -} - -void SAL_CALL LayoutManager::windowMoved( const css::awt::WindowEvent& ) throw( css::uno::RuntimeException ) -{ -} - -void SAL_CALL LayoutManager::windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - - // Request to set docking area space again. - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - bool bParentWindowVisible( m_bParentWindowVisible ); - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); - if ( xIfac == aEvent.Source ) - { - bool bSetVisible = false; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_bParentWindowVisible = true; - bSetVisible = ( m_bParentWindowVisible != bParentWindowVisible ); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( bSetVisible ) - { - implts_updateUIElementsVisibleState( sal_True ); - //implts_doLayout( sal_False ); - } - } -} - -void SAL_CALL LayoutManager::windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - - // Request to set docking area space again. - Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); - bool bParentWindowVisible( m_bParentWindowVisible ); - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); - if ( xIfac == aEvent.Source ) - { - bool bSetInvisible = false; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_bParentWindowVisible = false; - bSetInvisible = ( m_bParentWindowVisible != bParentWindowVisible ); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( bSetInvisible ) - implts_updateUIElementsVisibleState( sal_False ); - } -} - -IMPL_LINK( LayoutManager, AsyncLayoutHdl, Timer *, EMPTYARG ) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - - // Request to set docking area space again. - m_aAsyncLayoutTimer.Stop(); - - if( !m_xContainerWindow.is() ) - return 0; - - css::awt::Rectangle aDockingArea( m_aDockingArea ); - ::Size aStatusBarSize( implts_getStatusBarSize() ); - - // Subtract status bar height - aDockingArea.Height -= aStatusBarSize.Height(); - aReadLock.unlock(); - - implts_setDockingAreaWindowSizes( aDockingArea ); - implts_doLayout( sal_True, sal_False ); - - return 0; -} - -#ifdef DBG_UTIL -void LayoutManager::implts_checkElementContainer() -{ -#ifdef DBG_UTIL - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - - BaseHash< sal_Int32 > aUIElementHash; - - UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - aUIElementHash[pIter->m_aName]++; - - - BaseHash< sal_Int32 >::const_iterator pCheckIter = aUIElementHash.begin(); - for ( ; pCheckIter != aUIElementHash.end(); pCheckIter++ ) - { - if ( pCheckIter->second > 1 ) - { - ::rtl::OString aName = ::rtl::OUStringToOString( pCheckIter->first, RTL_TEXTENCODING_ASCII_US ); - DBG_ASSERT( "More than one element (%s) with the same name found!", aName.getStr() ); - } - } // for ( ; pCheckIter != aUIElementHash.end(); pCheckIter++ ) -#endif -} -#endif - -//--------------------------------------------------------------------------------------------------------- -// XFrameActionListener -//--------------------------------------------------------------------------------------------------------- -void SAL_CALL LayoutManager::frameAction( const FrameActionEvent& aEvent ) -throw ( RuntimeException ) -{ - if (( aEvent.Action == FrameAction_COMPONENT_ATTACHED ) || - ( aEvent.Action == FrameAction_COMPONENT_REATTACHED )) - { - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_ATTACHED|REATTACHED)" ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_bComponentAttached = sal_True; - m_bMustDoLayout = sal_True; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - implts_reset( sal_True ); - implts_doLayout( sal_True, sal_False ); - implts_doLayout( sal_True, sal_True ); - } - else if (( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ) || - ( aEvent.Action == FrameAction_FRAME_UI_DEACTIVATING )) - { - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (FRAME_UI_ACTIVATED|DEACTIVATING)" ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_bActive = ( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - implts_toggleFloatingUIElementsVisibility( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ); -// doLayout(); - } - else if ( aEvent.Action == FrameAction_COMPONENT_DETACHING ) - { - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_DETACHING)" ); - - // SAFE AREA ----------------------------------------------------------------------------------------------- - WriteGuard aWriteLock( m_aLock ); - m_bComponentAttached = sal_False; - aWriteLock.unlock(); - // SAFE AREA ----------------------------------------------------------------------------------------------- - - implts_reset( sal_False ); - } -} - -// ______________________________________________ - -void SAL_CALL LayoutManager::disposing( const css::lang::EventObject& rEvent ) -throw( RuntimeException ) -{ - sal_Bool bDisposeAndClear( sal_False ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - - if ( rEvent.Source == Reference< XInterface >( m_xFrame, UNO_QUERY )) - { - // Our frame gets disposed, release all our references that depends on a working - // frame reference. - Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - if ( m_pMiscOptions ) - { - m_pMiscOptions->RemoveListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); - delete m_pMiscOptions; - m_pMiscOptions = 0; - } - - delete m_pAddonOptions; - m_pAddonOptions = 0; - - // destroy all elements, it's possible that dettaching is NOT called! - implts_destroyElements(); - - m_aUIElements.clear(); - impl_clearUpMenuBar(); - m_xMenuBar.clear(); - if ( m_xInplaceMenuBar.is() ) - { - m_pInplaceMenuBar = 0; - m_xInplaceMenuBar->dispose(); - } - m_xInplaceMenuBar.clear(); - m_xContainerWindow.clear(); - m_xContainerTopWindow.clear(); - implts_destroyDockingAreaWindows(); - - if ( m_xModuleCfgMgr.is() ) - { - try - { - Reference< XUIConfiguration > xModuleCfgMgr( m_xModuleCfgMgr, UNO_QUERY ); - xModuleCfgMgr->removeConfigurationListener( - Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - } - - if ( m_xDocCfgMgr.is() ) - { - try - { - Reference< XUIConfiguration > xDocCfgMgr( m_xDocCfgMgr, UNO_QUERY ); - xDocCfgMgr->removeConfigurationListener( - Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch ( Exception& ) - { - } - } - - m_xDocCfgMgr.clear(); - m_xModuleCfgMgr.clear(); - m_xFrame.clear(); - delete m_pGlobalSettings; - m_pGlobalSettings = 0; - m_xDockingAreaAcceptor = Reference< ::com::sun::star::ui::XDockingAreaAcceptor >(); - - bDisposeAndClear = sal_True; - } - else if ( rEvent.Source == Reference< XInterface >( m_xContainerWindow, UNO_QUERY )) - { - // Our container window gets disposed. Remove all user interface elements. - m_aUIElements.clear(); - impl_clearUpMenuBar(); - m_xMenuBar.clear(); - if ( m_xInplaceMenuBar.is() ) - { - m_pInplaceMenuBar = 0; - m_xInplaceMenuBar->dispose(); - } - m_xInplaceMenuBar.clear(); - m_xContainerWindow.clear(); - m_xContainerTopWindow.clear(); - } - else if ( rEvent.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY )) - { - m_xDocCfgMgr.clear(); - } - else if ( rEvent.Source == Reference< XInterface >( m_xModuleCfgMgr , UNO_QUERY )) - { - m_xModuleCfgMgr.clear(); - } - - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - // Send disposing to our listener when we have lost our frame. - if ( bDisposeAndClear ) - { - // Send message to all listener and forget her references. - css::uno::Reference< css::frame::XLayoutManager > xThis( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ); - css::lang::EventObject aEvent( xThis ); - m_aListenerContainer.disposeAndClear( aEvent ); - } -} - -void SAL_CALL LayoutManager::elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException) -{ - ReadGuard aReadLock( m_aLock ); - - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< XUIElement > xElement; - Reference< XFrame > xFrame( m_xFrame ); - - if ( m_xFrame.is() ) - { - implts_findElement( Event.ResourceURL, aElementType, aElementName, xElement ); - - Reference< XUIElementSettings > xElementSettings( xElement, UNO_QUERY ); - if ( xElementSettings.is() ) - { - ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); - Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); - if ( xPropSet.is() ) - { - if ( Event.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY )) - xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xDocCfgMgr )); - } - xElementSettings->updateSettings(); - } - else - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && - ( aElementName.indexOf( m_aCustomTbxPrefix ) != -1 )) - { - // custom toolbar must be directly created, shown and layouted! - createElement( Event.ResourceURL ); - Reference< XUIElement > xUIElement = getElement( Event.ResourceURL ); - if ( xUIElement.is() ) - { - Reference< XUIConfigurationManager > xCfgMgr; - Reference< XPropertySet > xPropSet; - ::rtl::OUString aUIName; - - try - { - xCfgMgr = Reference< XUIConfigurationManager >( Event.Source, UNO_QUERY ); - xPropSet = Reference< XPropertySet >( xCfgMgr->getSettings( Event.ResourceURL, sal_False ), UNO_QUERY ); - - if ( xPropSet.is() ) - xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= aUIName; - } - catch ( com::sun::star::container::NoSuchElementException& ) - { - } - catch ( com::sun::star::beans::UnknownPropertyException& ) - { - } - catch ( com::sun::star::lang::WrappedTargetException& ) - { - } - - { - vos::OGuard aGuard( Application::GetSolarMutex() ); - Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - pWindow->SetText( aUIName ); - } - - showElement( Event.ResourceURL ); - } - } - } - } -} - -void SAL_CALL LayoutManager::elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException) -{ - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< XUIElement > xUIElement; - Reference< XFrame > xFrame( m_xFrame ); - - if ( m_xFrame.is() ) - { - implts_findElement( Event.ResourceURL, aElementType, aElementName, xUIElement ); - - Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); - if ( xElementSettings.is() ) - { - bool bNoSettings( false ); - ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); - Reference< XInterface > xElementCfgMgr; - Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); - - if ( xPropSet.is() ) - xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; - - if ( !xElementCfgMgr.is() ) - return; - - // Check if the same UI configuration manager has changed => check further - if ( Event.Source == xElementCfgMgr ) - { - // Same UI configuration manager where our element has its settings - if ( Event.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY )) - { - // document settings removed - if ( m_xModuleCfgMgr->hasSettings( Event.ResourceURL )) - { - xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xModuleCfgMgr )); - xElementSettings->updateSettings(); - return; - } - } - - bNoSettings = true; - } - - // No settings anymore, element must be destroyed - if ( m_xContainerWindow.is() && bNoSettings ) - { - if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) - { - Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - while ( pWindow && !pWindow->IsSystemWindow() ) - pWindow = pWindow->GetParent(); - - if ( pWindow && !m_bInplaceMenuSet ) - ((SystemWindow *)pWindow)->SetMenuBar( 0 ); - - Reference< XComponent > xComp( m_xMenuBar, UNO_QUERY ); - if ( xComp.is() ) - xComp->dispose(); - m_xMenuBar.clear(); - } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - { - destroyElement( Event.ResourceURL ); - } - } - } - } -} - -void SAL_CALL LayoutManager::elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException) -{ - ReadGuard aReadLock( m_aLock ); - - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - Reference< XUIElement > xUIElement; - Reference< XFrame > xFrame( m_xFrame ); - - if ( m_xFrame.is() ) - { - implts_findElement( Event.ResourceURL, aElementType, aElementName, xUIElement ); - - Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); - if ( xElementSettings.is() ) - { - ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); - Reference< XInterface > xElementCfgMgr; - Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); - - if ( xPropSet.is() ) - xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; - - if ( !xElementCfgMgr.is() ) - return; - - // Check if the same UI configuration manager has changed => update settings - if ( Event.Source == xElementCfgMgr ) - { - xElementSettings->updateSettings(); - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) - doLayout(); - } - } - } -} - -//--------------------------------------------------------------------------------------------------------- -// OPropertySetHelper -//--------------------------------------------------------------------------------------------------------- -// XPropertySet helper -sal_Bool SAL_CALL LayoutManager::convertFastPropertyValue( Any& aConvertedValue , - Any& aOldValue , - sal_Int32 nHandle , - const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) -{ - return LayoutManager_PBase::convertFastPropertyValue( aConvertedValue, aOldValue, nHandle, aValue ); -} - -void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , - const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ) -{ - if ( nHandle != LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY ) - LayoutManager_PBase::setFastPropertyValue_NoBroadcast( nHandle, aValue ); - - switch( nHandle ) - { - case LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER: - implts_updateMenuBarClose(); - break; - - case LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY: - { - sal_Bool bValue = sal_Bool(); - if (( aValue >>= bValue ) && bValue ) - implts_refreshContextToolbarsVisibility(); - break; - } - - case LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI: - implts_setCurrentUIVisibility( !m_bHideCurrentUI ); - break; - } -} - -void SAL_CALL LayoutManager::getFastPropertyValue( com::sun::star::uno::Any& aValue , - sal_Int32 nHandle ) const -{ - LayoutManager_PBase::getFastPropertyValue( aValue, nHandle ); -} - -::cppu::IPropertyArrayHelper& SAL_CALL LayoutManager::getInfoHelper() -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! - static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; - - if( pInfoHelper == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - - // Control this pointer again, another instance can be faster then these! - if( pInfoHelper == NULL ) - { - // Define static member to give structure of properties to baseclass "OPropertySetHelper". - uno::Sequence< beans::Property > aProperties; - describeProperties( aProperties ); - static ::cppu::OPropertyArrayHelper aInfoHelper( aProperties, sal_True ); - pInfoHelper = &aInfoHelper; - } - } - - return(*pInfoHelper); -} - -com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL LayoutManager::getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException) -{ - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >* pInfo = NULL; - - if( pInfo == NULL ) - { - // Ready for multithreading - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - // Control this pointer again, another instance can be faster then these! - if( pInfo == NULL ) - { - // Create structure of propertysetinfo for baseclass "OPropertySetHelper". - // (Use method "getInfoHelper()".) - static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); - pInfo = &xInfo; - } - } - - return (*pInfo); -} - -} // namespace framework - diff --git a/framework/source/layoutmanager/panelmanager.cxx b/framework/source/layoutmanager/panelmanager.cxx index 3c82a4fd4f28..4fd0a733b5a7 100755 --- a/framework/source/layoutmanager/panelmanager.cxx +++ b/framework/source/layoutmanager/panelmanager.cxx @@ -92,9 +92,8 @@ bool PanelManager::createPanels() { if ( m_xFrame.is() ) { - uno::Reference< awt::XWindow > xWindow; vos::OGuard aGuard( Application::GetSolarMutex() ); - xWindow = m_xFrame->getContainerWindow(), uno::UNO_QUERY; + uno::Reference< awt::XWindow > xWindow( m_xFrame->getContainerWindow(), uno::UNO_QUERY ); if ( xWindow.is() ) { // destroy old panel windows diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 8ff7e265dbf0..4ef8aa6d64b9 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -50,6 +50,8 @@ #include #include #include +#include +#include //_________________________________________________________________________________________________________________ // other includes @@ -60,6 +62,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -71,9 +74,9 @@ ToolbarLayoutManager::ToolbarLayoutManager( const uno::Reference< ui::XUIElementFactory >& xUIElementFactory, ILayoutNotifications* pParentLayouter ) : ThreadHelpBase( &Application::GetSolarMutex() ), - m_pParentLayouter( pParentLayouter ), m_xSMGR( xSMGR ), m_xUIElementFactoryManager( xUIElementFactory ), + m_pParentLayouter( pParentLayouter ), m_eDockOperation( DOCKOP_ON_COLROW ), m_pAddonOptions( 0 ), m_pGlobalSettings( 0 ), @@ -87,7 +90,8 @@ ToolbarLayoutManager::ToolbarLayoutManager( m_bLayoutInProgress( false ), m_aFullAddonTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )), m_aCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "custom_" )), - m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )) + m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )), + m_aToolbarTypeString( RTL_CONSTASCII_USTRINGPARAM( UIRESOURCETYPE_TOOLBAR )) { // initialize rectangles to zero values setZeroRectangle( m_aDockingAreaOffsets ); @@ -119,7 +123,8 @@ uno::Any SAL_CALL ToolbarLayoutManager::queryInterface( const uno::Type & rType uno::Any a = ::cppu::queryInterface( rType, SAL_STATIC_CAST( ::com::sun::star::awt::XDockableWindowListener*, this ), - SAL_STATIC_CAST( ::com::sun::star::ui::XUIConfigurationListener*, this )); + SAL_STATIC_CAST( ::com::sun::star::ui::XUIConfigurationListener*, this ), + SAL_STATIC_CAST( ::com::sun::star::awt::XWindowListener*, this )); if ( a.hasValue() ) return a; @@ -409,7 +414,7 @@ void ToolbarLayoutManager::reset() /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr = m_xModuleCfgMgr; - uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr = m_xDocCfgMgr; + uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr = m_xDocCfgMgr; m_xModuleCfgMgr.clear(); m_xDocCfgMgr.clear(); m_bComponentAttached = false; @@ -441,7 +446,7 @@ void ToolbarLayoutManager::attach( /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } -void ToolbarLayoutManager::createToolbars() +void ToolbarLayoutManager::createStaticToolbars() { resetDockingArea(); implts_createCustomToolBars(); @@ -450,12 +455,48 @@ void ToolbarLayoutManager::createToolbars() implts_sortUIElements(); } +bool ToolbarLayoutManager::requestToolbar( const ::rtl::OUString& rResourceURL ) +{ + bool bNotify( false ); + bool bMustCallCreate( false ); + uno::Reference< ui::XUIElement > xUIElement; + + UIElement aRequestedToolbar = impl_findToolbar( rResourceURL ); + if ( aRequestedToolbar.m_aName != rResourceURL ) + { + bMustCallCreate = true; + aRequestedToolbar.m_aName = rResourceURL; + aRequestedToolbar.m_aType = m_aToolbarTypeString; + aRequestedToolbar.m_xUIElement = xUIElement; + implts_readWindowStateData( rResourceURL, aRequestedToolbar ); + } + + xUIElement = aRequestedToolbar.m_xUIElement; + if ( !xUIElement.is() ) + bMustCallCreate = true; + + bool bCreateOrShowToolbar = aRequestedToolbar.m_bVisible & !aRequestedToolbar.m_bMasterHide; + uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow, uno::UNO_QUERY ); + if ( xContainerWindow.is() && aRequestedToolbar.m_bFloating ) + bCreateOrShowToolbar = ( bCreateOrShowToolbar && xContainerWindow->isActive() ); + + if ( bCreateOrShowToolbar ) + { + if ( bMustCallCreate ) + bNotify = createToolbar( rResourceURL ); + else + bNotify = showToolbar( rResourceURL ); + } + + return bNotify; +} + bool ToolbarLayoutManager::createToolbar( const ::rtl::OUString& rResourceURL ) { bool bNotify( false ); uno::Reference< ui::XUIElement > xUITempElement; - implts_createElement( rResourceURL, bNotify, xUITempElement ); + implts_createToolBar( rResourceURL, bNotify, xUITempElement ); return bNotify; } @@ -536,11 +577,9 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) if ( bMustLayouted ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteLock.lock(); m_bLayoutDirty = true; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } if ( bMustBeSorted ) @@ -553,13 +592,11 @@ void ToolbarLayoutManager::destroyToolbars() { UIElementVector aUIElementVector; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); aUIElementVector = m_aUIElements; m_aUIElements.clear(); m_bLayoutDirty = true; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ UIElementVector::iterator pIter; for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) @@ -570,6 +607,108 @@ void ToolbarLayoutManager::destroyToolbars() } } +bool ToolbarLayoutManager::showToolbar( const ::rtl::OUString& rResourceURL ) +{ + UIElement aUIElement = implts_findToolbar( rResourceURL ); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = getWindowFromXUIElement( aUIElement.m_xUIElement ); + if ( pWindow ) + { + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + if ( !aUIElement.m_bFloating ) + { + WriteGuard aWriteLock( m_aLock ); + m_bLayoutDirty = true; + } + + aUIElement.m_bVisible = true; + implts_writeWindowStateData( aUIElement ); + return true; + } + + return false; +} + +bool ToolbarLayoutManager::hideToolbar( const ::rtl::OUString& rResourceURL ) +{ + UIElement aUIElement = implts_findToolbar( rResourceURL ); + + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = getWindowFromXUIElement( aUIElement.m_xUIElement ); + if ( pWindow ) + { + pWindow->Show( FALSE ); + if ( !aUIElement.m_bFloating ) + { + WriteGuard aWriteLock( m_aLock ); + m_bLayoutDirty = true; + } + + aUIElement.m_bVisible = false; + implts_writeWindowStateData( aUIElement ); + return true; + } + + return false; +} + +void ToolbarLayoutManager::refreshToolbarsVisibility() +{ + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + UIElementVector aUIElementVector = m_aUIElements; + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + bool bLayoutDirty( false ); + UIElementVector::iterator pIter; + + vos::OGuard aGuard( Application::GetSolarMutex() ); + for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) + { + Window* pWindow = getWindowFromXUIElement( pIter->m_xUIElement ); + if ( pWindow ) + { + if ( pIter->m_bVisible && !pIter->m_bMasterHide ) + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + else + pWindow->Show( FALSE ); + + if ( !pIter->m_bFloating ) + bLayoutDirty = true; + } + } +} + +void ToolbarLayoutManager::setFloatingToolbarsVisibility( bool bVisible ) +{ + UIElementVector aUIElementVector; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + aUIElementVector = m_aUIElements; + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + UIElementVector::iterator pIter; + vos::OGuard aGuard( Application::GetSolarMutex() ); + for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) + { + Window* pWindow = getWindowFromXUIElement( pIter->m_xUIElement ); + if ( pWindow && pIter->m_bFloating ) + { + if ( bVisible ) + { + if ( pIter->m_bVisible && !pIter->m_bMasterHide ) + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + } + else + pWindow->Show( FALSE ); + } + } +} + void ToolbarLayoutManager::setVisible( bool bVisible ) { UIElementVector aUIElementVector; @@ -582,29 +721,136 @@ void ToolbarLayoutManager::setVisible( bool bVisible ) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ UIElementVector::iterator pIter; + + vos::OGuard aGuard( Application::GetSolarMutex() ); for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) { bool bToolbarVisible = pIter->m_bVisible; pIter->m_bMasterHide = !bVisible; - if ( pIter->m_xUIElement.is() ) - { - uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); - uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); - if ( xWindow.is() ) - xWindow->setVisible(bVisible & bToolbarVisible); - } + Window* pWindow = getWindowFromXUIElement( pIter->m_xUIElement ); + if ( pWindow ) + pWindow->Show(bVisible & bToolbarVisible, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } if ( !bVisible ) resetDockingArea(); } -void ToolbarLayoutManager::dockToolbar( +bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& /*rResourceURL*/, ::com::sun::star::ui::DockingArea /*eDockingArea*/, const ::com::sun::star::awt::Point& /*aPos*/ ) { + return false; +} + +bool ToolbarLayoutManager::dockAllToolbars() +{ + std::vector< ::rtl::OUString > aToolBarNameVector; + + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + UIElementVector::iterator pIter; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aType.equalsAscii( "toolbar" ) && + pIter->m_xUIElement.is() && + pIter->m_bFloating && + pIter->m_bVisible ) + aToolBarNameVector.push_back( pIter->m_aName ); + } + aReadLock.unlock(); + + bool bResult(true); + const sal_uInt32 nCount = aToolBarNameVector.size(); + for ( sal_uInt32 i = 0; i < nCount; ++i ) + { + awt::Point aPoint; + aPoint.X = aPoint.Y = SAL_MAX_INT32; + bResult &= dockToolbar( aToolBarNameVector[i], ui::DockingArea_DOCKINGAREA_DEFAULT, aPoint ); + } + + return bResult; +} + +long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) +{ + // To enable toolbar controllers to change their image when a sub-toolbar function + // is activated, we need this mechanism. We have NO connection between these toolbars + // anymore! + if ( pEvent && pEvent->ISA( VclWindowEvent )) + { + if ( pEvent->GetId() == VCLEVENT_TOOLBOX_SELECT ) + { + ::rtl::OUString aToolbarName; + ::rtl::OUString aCommand; + ToolBox* pToolBox = getToolboxPtr( ((VclWindowEvent*)pEvent)->GetWindow() ); + + if ( pToolBox ) + { + aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); + USHORT nId = pToolBox->GetCurItemId(); + if ( nId > 0 ) + aCommand = pToolBox->GetItemCommand( nId ); + } + + if (( aToolbarName.getLength() > 0 ) && ( aCommand.getLength() > 0 )) + { + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + ::std::vector< uno::Reference< ui::XUIFunctionListener > > aListenerArray; + UIElementVector::iterator pIter; + + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aType.equalsAscii( "toolbar" ) && pIter->m_xUIElement.is() ) + { + uno::Reference< ui::XUIFunctionListener > xListener( pIter->m_xUIElement, uno::UNO_QUERY ); + if ( xListener.is() ) + aListenerArray.push_back( xListener ); + } + } + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + const sal_uInt32 nCount = aListenerArray.size(); + for ( sal_uInt32 i = 0; i < nCount; ++i ) + { + try + { + aListenerArray[i]->functionExecute( aToolbarName, aCommand ); + } + catch ( uno::RuntimeException& e ) + { + throw e; + } + catch ( uno::Exception& ) {} + } + } + } + else if ( pEvent->GetId() == VCLEVENT_TOOLBOX_FORMATCHANGED ) + { + ToolBox* pToolBox = getToolboxPtr( ((VclWindowEvent*)pEvent)->GetWindow() ); + + if ( pToolBox ) + { + ::rtl::OUString aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); + + if ( aToolbarName.getLength() > 0 ) + { + WriteGuard aWriteLock( m_aLock ); + m_bLayoutDirty = true; + aWriteLock.unlock(); + m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); + } + } + } + } + + return 1; } void ToolbarLayoutManager::resetDockingArea() @@ -631,10 +877,12 @@ void ToolbarLayoutManager::resetDockingArea() void ToolbarLayoutManager::setParentWindow( const uno::Reference< awt::XWindowPeer >& xParentWindow ) { - uno::Reference< awt::XWindow > xTopDockingWindow = uno::Reference< awt::XWindow >( implts_createToolkitWindow( m_xToolkit, xParentWindow ), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xLeftDockingWindow = uno::Reference< awt::XWindow >( implts_createToolkitWindow( m_xToolkit, xParentWindow ), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xRightDockingWindow = uno::Reference< awt::XWindow >( implts_createToolkitWindow( m_xToolkit, xParentWindow ), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xBottomDockingWindow = uno::Reference< awt::XWindow >( implts_createToolkitWindow( m_xToolkit, xParentWindow ), uno::UNO_QUERY ); + static const char DOCKINGAREASTRING[] = "dockingarea"; + + uno::Reference< awt::XWindow > xTopDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xLeftDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xRightDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xBottomDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); @@ -647,7 +895,13 @@ void ToolbarLayoutManager::setParentWindow( aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - implts_reparentToolbars(); + if ( xParentWindow.is() ) + implts_reparentToolbars(); + else + { + destroyToolbars(); + resetDockingArea(); + } } void ToolbarLayoutManager::setDockingAreaOffsets( const ::Rectangle aOffsets ) @@ -707,7 +961,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() aAddonToolBarData = m_pAddonOptions->GetAddonsToolBarPart( i ); aPropSeq[1].Value <<= aAddonToolBarData; - UIElement aElement = implts_findElement( aAddonToolBarName ); + UIElement aElement = implts_findToolbar( aAddonToolBarName ); // #i79828 // It's now possible that we are called more than once. Be sure to not create @@ -762,7 +1016,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() aNewToolbar.m_aUIName = aGenericAddonTitle; implts_writeWindowStateData( aNewToolbar ); } - implts_insertElement( aNewToolbar ); + implts_insertToolbar( aNewToolbar ); } uno::Reference< awt::XWindow > xWindow( xDockWindow, uno::UNO_QUERY ); @@ -830,14 +1084,11 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); - if ( !m_xPersistentWindowState.is() || - !m_xFrame.is() || - !m_bComponentAttached ) + if ( !m_xPersistentWindowState.is() || !m_xFrame.is() || !m_bComponentAttached ) return; - uno::Reference< frame::XFrame > xFrame( m_xFrame ); - - uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); aReadLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -867,25 +1118,23 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() for ( sal_Int32 i = 0; i < aToolbarNames.getLength(); i++ ) { aName = pTbNames[i]; - if ( impl_parseResourceURL( aName, aElementType, aElementName )) - { - // Check that we only create: - // - Toolbars (the statusbar is also member of the persistent window state) - // - Not custom toolbars, there are created with their own method (implts_createCustomToolbars) - if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && - aElementName.indexOf( m_aCustomTbxPrefix ) == -1 ) - { - UIElement aNewToolbar = implts_findElement( aName ); - bool bFound = ( aNewToolbar.m_aName == aName ); - if ( !bFound ) - implts_readWindowStateData( aName, aNewToolbar ); + parseResourceURL( aName, aElementType, aElementName ); - if ( aNewToolbar.m_bVisible && !aNewToolbar.m_bContextSensitive ) - { - if ( !bFound ) - implts_insertElement( aNewToolbar ); - aMakeVisibleToolbars.push_back( aName ); - } + // Check that we only create: + // - Toolbars (the statusbar is also member of the persistent window state) + // - Not custom toolbars, there are created with their own method (implts_createCustomToolbars) + if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && aElementName.indexOf( m_aCustomTbxPrefix ) == -1 ) + { + UIElement aNewToolbar = implts_findToolbar( aName ); + bool bFound = ( aNewToolbar.m_aName == aName ); + if ( !bFound ) + implts_readWindowStateData( aName, aNewToolbar ); + + if ( aNewToolbar.m_bVisible && !aNewToolbar.m_bContextSensitive ) + { + if ( !bFound ) + implts_insertToolbar( aNewToolbar ); + aMakeVisibleToolbars.push_back( aName ); } } } @@ -901,11 +1150,7 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() } if ( !aMakeVisibleToolbars.empty() ) - { -// implts_lock(); -// ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &LayoutManager::requestElement, this,_1 )); -// implts_unlock(); - } + ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &ToolbarLayoutManager::requestToolbar, this,_1 )); } void ToolbarLayoutManager::implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aTbxSeqSeq ) @@ -936,14 +1181,13 @@ void ToolbarLayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbx { bool bNotify( false ); uno::Reference< ui::XUIElement > xUIElement; - implts_createElement( aTbxResName, bNotify, xUIElement ); + implts_createToolBar( aTbxResName, bNotify, xUIElement ); if ( aTitle && xUIElement.is() ) { vos::OGuard aGuard( Application::GetSolarMutex() ); - uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + Window* pWindow = getWindowFromXUIElement( xUIElement ); if ( pWindow ) pWindow->SetText( aTitle ); } @@ -1023,7 +1267,7 @@ void ToolbarLayoutManager::implts_reparentToolbars() } } -void ToolbarLayoutManager::implts_createElement( const ::rtl::OUString& aName, bool& bNotify, uno::Reference< ui::XUIElement >& rUIElement ) +void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, bool& bNotify, uno::Reference< ui::XUIElement >& rUIElement ) { bNotify = false; @@ -1038,30 +1282,17 @@ void ToolbarLayoutManager::implts_createElement( const ::rtl::OUString& aName, b if ( !xFrame.is() || !xContainerWindow.is() ) return; - bool bFound( false ); - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - uno::Reference< ui::XUIElement > xUIElement; - - UIElement aToolbarElement = implts_findElement( aName ); - bFound = aToolbarElement.m_xUIElement.is(); - - if ( !bFound ) + UIElement aToolbarElement = implts_findToolbar( aName ); + if ( !aToolbarElement.m_xUIElement.is() ) { - uno::Sequence< beans::PropertyValue > aPropSeq( 2 ); - aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); - aPropSeq[0].Value <<= xFrame; - aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" )); - aPropSeq[1].Value <<= sal_True; - - xUIElement = xUIElementFactory->createUIElement( aName, aPropSeq ); + uno::Reference< ui::XUIElement > xUIElement = implts_createElement( aName ); sal_Bool bVisible( sal_False ); if ( xUIElement.is() ) { rUIElement = xUIElement; uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( xDockWindow.is() && xWindow.is() ) { try @@ -1080,7 +1311,7 @@ void ToolbarLayoutManager::implts_createElement( const ::rtl::OUString& aName, b /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - UIElement& rElement = impl_findElement( aName ); + UIElement& rElement = impl_findToolbar( aName ); if ( rElement.m_aName.getLength() > 0 ) { // Reuse a local entry so we are able to use the latest @@ -1092,10 +1323,10 @@ void ToolbarLayoutManager::implts_createElement( const ::rtl::OUString& aName, b else { // Create new UI element and try to read its state data - UIElement aNewToolbar( aName, aElementType, xUIElement ); + UIElement aNewToolbar( aName, m_aToolbarTypeString, xUIElement ); implts_readWindowStateData( aName, aNewToolbar ); implts_setElementData( aNewToolbar, xDockWindow ); - implts_insertElement( aNewToolbar ); + implts_insertToolbar( aNewToolbar ); bVisible = aNewToolbar.m_bVisible; } @@ -1559,12 +1790,53 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } +void ToolbarLayoutManager::implts_writeNewWindowStateData( const rtl::OUString aName, const uno::Reference< awt::XWindow >& xWindow ) +{ + awt::Rectangle aPos; + awt::Size aSize; + bool bVisible( false ); + bool bFloating( true ); + + if ( xWindow.is() ) + { + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xDockWindow.is() ) + bFloating = xDockWindow->isFloating(); + + uno::Reference< awt::XWindow2 > xWindow2( xWindow, uno::UNO_QUERY ); + if( xWindow2.is() ) + { + aPos = xWindow2->getPosSize(); + aSize = xWindow2->getOutputSize(); // always use output size for consistency + bVisible = xWindow2->isVisible(); + } + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = impl_findToolbar( aName ); + if ( rUIElement.m_xUIElement.is() ) + { + rUIElement.m_bVisible = bVisible; + rUIElement.m_bFloating = bFloating; + if ( bFloating ) + { + rUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); + rUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); + } + } + + implts_writeWindowStateData( rUIElement ); + + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + } +} + /****************************************************************************** LOOKUP PART FOR TOOLBARS ******************************************************************************/ -UIElement& ToolbarLayoutManager::impl_findElement( - const rtl::OUString& aName ) +UIElement& ToolbarLayoutManager::impl_findToolbar( const rtl::OUString& aName ) { static UIElement aEmptyElement; UIElementVector::iterator pIter; @@ -1581,8 +1853,7 @@ UIElement& ToolbarLayoutManager::impl_findElement( /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } -UIElement ToolbarLayoutManager::implts_findElement( - const rtl::OUString& aName ) +UIElement ToolbarLayoutManager::implts_findToolbar( const rtl::OUString& aName ) { UIElement aEmptyElement; UIElementVector::iterator pIter; @@ -1599,7 +1870,7 @@ UIElement ToolbarLayoutManager::implts_findElement( /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } -UIElement ToolbarLayoutManager::implts_findElement( +UIElement ToolbarLayoutManager::implts_findToolbar( const uno::Reference< uno::XInterface >& xToolbar ) { UIElement aToolbar; @@ -1624,13 +1895,13 @@ UIElement ToolbarLayoutManager::implts_findElement( return aToolbar; } -bool ToolbarLayoutManager::implts_insertElement( const UIElement& rUIElement ) +bool ToolbarLayoutManager::implts_insertToolbar( const UIElement& rUIElement ) { UIElement aTempData; bool bFound( false ); bool bResult( false ); - aTempData = implts_findElement( rUIElement.m_aName ); + aTempData = implts_findToolbar( rUIElement.m_aName ); if ( aTempData.m_aName == rUIElement.m_aName ) bFound = true; @@ -1644,10 +1915,10 @@ bool ToolbarLayoutManager::implts_insertElement( const UIElement& rUIElement ) return bResult; } -void ToolbarLayoutManager::implts_setElement( const UIElement& rUIElement ) +void ToolbarLayoutManager::implts_setToolbar( const UIElement& rUIElement ) { WriteGuard aWriteLock( m_aLock ); - UIElement& rData = impl_findElement( rUIElement.m_aName ); + UIElement& rData = impl_findToolbar( rUIElement.m_aName ); if ( rData.m_aName == rUIElement.m_aName ) rData = rUIElement; else @@ -2491,12 +2762,12 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nCurrPos( 0 ); sal_Int32 nStartOffset( 0 ); + vos::OGuard aGuard( Application::GetSolarMutex() ); if ( nDockingArea == ui::DockingArea_DOCKINGAREA_RIGHT ) nStartOffset = pDockAreaWindow->GetSizePixel().Width() - rRowColumnWindowData.nStaticSize; else if ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) nStartOffset = pDockAreaWindow->GetSizePixel().Height() - rRowColumnWindowData.nStaticSize; - vos::OGuard aGuard( Application::GetSolarMutex() ); for ( sal_uInt32 i = 0; i < nCount; i++ ) { uno::Reference< awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; @@ -2582,23 +2853,23 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( return; } - Window* pDockWindow( 0 ); - Window* pDockingAreaWindow( 0 ); - ToolBox* pToolBox( 0 ); - uno::Reference< awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xDockingAreaWindow; - ::Rectangle aTrackingRect( rTrackingRect ); - ::com::sun::star::ui::DockingArea eDockedArea( (::com::sun::star::ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); - sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); - sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); - sal_Bool bHorizontalDockArea(( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); - sal_Int32 nMaxLeftRightDockAreaSize = aContainerWinSize.Height() - - nTopDockingAreaSize - - nBottomDockingAreaSize - - aDockingAreaOffsets.Top() - - aDockingAreaOffsets.Bottom(); - ::Rectangle aDockingAreaRect; + Window* pDockWindow( 0 ); + Window* pDockingAreaWindow( 0 ); + ToolBox* pToolBox( 0 ); + uno::Reference< awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xDockingAreaWindow; + ::Rectangle aTrackingRect( rTrackingRect ); + ui::DockingArea eDockedArea( (::com::sun::star::ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); + sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); + sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); + sal_Bool bHorizontalDockArea(( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( eDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + sal_Int32 nMaxLeftRightDockAreaSize = aContainerWinSize.Height() - + nTopDockingAreaSize - + nBottomDockingAreaSize - + aDockingAreaOffsets.Top() - + aDockingAreaOffsets.Bottom(); + ::Rectangle aDockingAreaRect; /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aReadLock.lock(); @@ -3201,7 +3472,7 @@ throw( css::uno::RuntimeException ) bool bNotify( false ); uno::Reference< css::awt::XWindow > xWindow( aEvent.Source, uno::UNO_QUERY ); - UIElement aUIElement = implts_findElement( aEvent.Source ); + UIElement aUIElement = implts_findToolbar( aEvent.Source ); if ( aUIElement.m_xUIElement.is() ) { if ( aUIElement.m_bFloating ) @@ -3278,7 +3549,7 @@ throw (uno::RuntimeException) aMousePos = pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y )); } - UIElement aUIElement = implts_findElement( e.Source ); + UIElement aUIElement = implts_findToolbar( e.Source ); if ( aUIElement.m_xUIElement.is() && xWindow.is() ) { @@ -3314,8 +3585,7 @@ throw (uno::RuntimeException) aWriteLock.unlock(); } -awt::DockingData SAL_CALL ToolbarLayoutManager::docking( - const awt::DockingEvent& e ) +awt::DockingData SAL_CALL ToolbarLayoutManager::docking( const awt::DockingEvent& e ) throw (uno::RuntimeException) { const sal_Int32 MAGNETIC_DISTANCE_UNDOCK = 25; @@ -3515,8 +3785,7 @@ throw (uno::RuntimeException) return aDockingData; } -void SAL_CALL ToolbarLayoutManager::endDocking( - const awt::EndDockingEvent& e ) +void SAL_CALL ToolbarLayoutManager::endDocking( const awt::EndDockingEvent& e ) throw (uno::RuntimeException) { bool bDockingInProgress( false ); @@ -3530,7 +3799,7 @@ throw (uno::RuntimeException) aUIDockingElement = m_aDockUIElement; bFloating = aUIDockingElement.m_bFloating; - UIElement& rUIElement = impl_findElement( aUIDockingElement.m_aName ); + UIElement& rUIElement = impl_findToolbar( aUIDockingElement.m_aName ); if ( rUIElement.m_aName == aUIDockingElement.m_aName ) { if ( aUIDockingElement.m_bFloating ) @@ -3616,8 +3885,7 @@ throw (uno::RuntimeException) m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); } -sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( - const lang::EventObject& e ) +sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( const lang::EventObject& e ) throw (uno::RuntimeException) { sal_Bool bDockingInProgress( sal_False ); @@ -3626,7 +3894,7 @@ throw (uno::RuntimeException) bDockingInProgress = m_bDockingInProgress; aReadLock.unlock(); - UIElement aUIDockingElement = implts_findElement( e.Source ); + UIElement aUIDockingElement = implts_findToolbar( e.Source ); bool bWinFound( aUIDockingElement.m_aName.getLength() > 0 ); uno::Reference< awt::XWindow > xWindow( e.Source, uno::UNO_QUERY ); @@ -3655,9 +3923,9 @@ throw (uno::RuntimeException) } } - UIElement aUIElement = implts_findElement( aUIDockingElement.m_aName ); + UIElement aUIElement = implts_findToolbar( aUIDockingElement.m_aName ); if ( aUIElement.m_aName == aUIDockingElement.m_aName ) - implts_setElement( aUIDockingElement ); + implts_setToolbar( aUIDockingElement ); } } } @@ -3672,11 +3940,13 @@ throw (uno::RuntimeException) sal_Bool bDockingInProgress( sal_False ); UIElement aUIDockingElement; + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); bDockingInProgress = m_bDockingInProgress; if ( bDockingInProgress ) aUIDockingElement = m_aDockUIElement; aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ Window* pWindow( 0 ); ToolBox* pToolBox( 0 ); @@ -3693,7 +3963,7 @@ throw (uno::RuntimeException) if ( !bDockingInProgress ) { - aUIDockingElement = implts_findElement( e.Source ); + aUIDockingElement = implts_findToolbar( e.Source ); bool bWinFound = ( aUIDockingElement.m_aName.getLength() > 0 ); if ( bWinFound && xWindow.is() ) @@ -3778,7 +4048,7 @@ throw (uno::RuntimeException) } aWriteLock.lock(); - UIElement& rUIElement = impl_findElement( aUIDockingElement.m_aName ); + UIElement& rUIElement = impl_findToolbar( aUIDockingElement.m_aName ); if ( rUIElement.m_aName == aUIDockingElement.m_aName ) rUIElement = aUIDockingElement; m_bLayoutDirty = true; @@ -3808,14 +4078,12 @@ throw (uno::RuntimeException) } } -void SAL_CALL ToolbarLayoutManager::closed( - const lang::EventObject& /*e*/ ) +void SAL_CALL ToolbarLayoutManager::closed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) { } -void SAL_CALL ToolbarLayoutManager::endPopupMode( - const awt::EndPopupModeEvent& /*e*/ ) +void SAL_CALL ToolbarLayoutManager::endPopupMode( const awt::EndPopupModeEvent& /*e*/ ) throw (uno::RuntimeException) { } @@ -3823,16 +4091,121 @@ throw (uno::RuntimeException) //--------------------------------------------------------------------------------------------------------- // XUIConfigurationListener //--------------------------------------------------------------------------------------------------------- -void SAL_CALL ToolbarLayoutManager::elementInserted( - const ui::ConfigurationEvent& /*Event*/ ) +void SAL_CALL ToolbarLayoutManager::elementInserted( const ui::ConfigurationEvent& rEvent ) throw (uno::RuntimeException) { + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + UIElement aUIElement = implts_findToolbar( rEvent.ResourceURL ); + + uno::Reference< ui::XUIElementSettings > xElementSettings( aUIElement.m_xUIElement, uno::UNO_QUERY ); + if ( xElementSettings.is() ) + { + ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); + uno::Reference< beans::XPropertySet > xPropSet( xElementSettings, uno::UNO_QUERY ); + if ( xPropSet.is() ) + { + if ( rEvent.Source == uno::Reference< uno::XInterface >( m_xDocCfgMgr, uno::UNO_QUERY )) + xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xDocCfgMgr )); + } + xElementSettings->updateSettings(); + } + else + { + parseResourceURL( rEvent.ResourceURL, aElementType, aElementName ); + if ( aElementName.indexOf( m_aCustomTbxPrefix ) != -1 ) + { + // custom toolbar must be directly created, shown and layouted! + createToolbar( rEvent.ResourceURL ); + uno::Reference< ui::XUIElement > xUIElement = getElement( rEvent.ResourceURL ); + if ( xUIElement.is() ) + { + ::rtl::OUString aUIName; + uno::Reference< ui::XUIConfigurationManager > xCfgMgr; + uno::Reference< beans::XPropertySet > xPropSet; + + try + { + xCfgMgr = uno::Reference< ui::XUIConfigurationManager >( rEvent.Source, uno::UNO_QUERY ); + xPropSet = uno::Reference< beans::XPropertySet >( xCfgMgr->getSettings( rEvent.ResourceURL, sal_False ), uno::UNO_QUERY ); + + if ( xPropSet.is() ) + xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= aUIName; + } + catch ( container::NoSuchElementException& ) + { + } + catch ( beans::UnknownPropertyException& ) + { + } + catch ( lang::WrappedTargetException& ) + { + } + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pWindow = getWindowFromXUIElement( xUIElement ); + if ( pWindow ) + pWindow->SetText( aUIName ); + } + + showToolbar( rEvent.ResourceURL ); + } + } + } } -void SAL_CALL ToolbarLayoutManager::elementRemoved( - const ui::ConfigurationEvent& /*Event*/ ) +void SAL_CALL ToolbarLayoutManager::elementRemoved( const ui::ConfigurationEvent& rEvent ) throw (uno::RuntimeException) { + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + ReadGuard aReadLock( m_aLock ); + uno::Reference< awt::XWindow > xContainerWindow( m_xContainerWindow, uno::UNO_QUERY ); + uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr ); + uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr ); + aReadLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + UIElement aUIElement = implts_findToolbar( rEvent.ResourceURL ); + uno::Reference< ui::XUIElementSettings > xElementSettings( aUIElement.m_xUIElement, uno::UNO_QUERY ); + if ( xElementSettings.is() ) + { + bool bNoSettings( false ); + ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); + uno::Reference< uno::XInterface > xElementCfgMgr; + uno::Reference< beans::XPropertySet > xPropSet( xElementSettings, uno::UNO_QUERY ); + + if ( xPropSet.is() ) + xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; + + if ( !xElementCfgMgr.is() ) + return; + + // Check if the same UI configuration manager has changed => check further + if ( rEvent.Source == xElementCfgMgr ) + { + // Same UI configuration manager where our element has its settings + if ( rEvent.Source == uno::Reference< uno::XInterface >( xDocCfgMgr, uno::UNO_QUERY )) + { + // document settings removed + if ( xModuleCfgMgr->hasSettings( rEvent.ResourceURL )) + { + xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( xModuleCfgMgr )); + xElementSettings->updateSettings(); + return; + } + } + + bNoSettings = true; + } + + // No settings anymore, element must be destroyed + if ( xContainerWindow.is() && bNoSettings ) + destroyToolbar( rEvent.ResourceURL ); + } } void SAL_CALL ToolbarLayoutManager::elementReplaced( @@ -3844,125 +4217,149 @@ throw (uno::RuntimeException) //--------------------------------------------------------------------------------------------------------- // XLayoutManager forwards //--------------------------------------------------------------------------------------------------------- -void SAL_CALL ToolbarLayoutManager::createElement( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) +uno::Reference< ui::XUIElement > ToolbarLayoutManager::getElement( const ::rtl::OUString& aName ) { + return implts_findToolbar( aName ).m_xUIElement; } -void SAL_CALL ToolbarLayoutManager::destroyElement( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) +uno::Sequence< uno::Reference< ui::XUIElement > > ToolbarLayoutManager::getElements() { + uno::Sequence< uno::Reference< ui::XUIElement > > aSeq; + return aSeq; } -::sal_Bool SAL_CALL ToolbarLayoutManager::requestElement( const ::rtl::OUString& /*ResourceURL*/ ) -throw (uno::RuntimeException) +::sal_Bool ToolbarLayoutManager::dockAllWindows( ::sal_Int16 /*nElementType*/ ) { return false; } -uno::Reference< ui::XUIElement > SAL_CALL ToolbarLayoutManager::getElement( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) -{ - return uno::Reference< ui::XUIElement >(); -} - -uno::Sequence< uno::Reference< ui::XUIElement > > SAL_CALL ToolbarLayoutManager::getElements() -throw (uno::RuntimeException) -{ - return uno::Sequence< uno::Reference< ui::XUIElement > >(); -} - -sal_Bool SAL_CALL ToolbarLayoutManager::showElement( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) +sal_Bool ToolbarLayoutManager::floatWindow( const ::rtl::OUString& /*aName*/ ) { return false; } -sal_Bool SAL_CALL ToolbarLayoutManager::hideElement( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) +::sal_Bool ToolbarLayoutManager::lockWindow( const ::rtl::OUString& /*ResourceURL*/ ) { return false; } -sal_Bool SAL_CALL ToolbarLayoutManager::dockWindow( const ::rtl::OUString& /*aName*/, ui::DockingArea /*DockingArea*/, const awt::Point& /*Pos*/ ) -throw (uno::RuntimeException) +::sal_Bool ToolbarLayoutManager::unlockWindow( const ::rtl::OUString& /*ResourceURL*/ ) { return false; } -::sal_Bool SAL_CALL ToolbarLayoutManager::dockAllWindows( ::sal_Int16 /*nElementType*/ ) -throw (uno::RuntimeException) +void ToolbarLayoutManager::setElementSize( const ::rtl::OUString& /*aName*/, const awt::Size& /*aSize*/ ) { +} + +void ToolbarLayoutManager::setElementPos( const ::rtl::OUString& /*aName*/, const awt::Point& /*aPos*/ ) +{ +} + +void ToolbarLayoutManager::setElementPosSize( const ::rtl::OUString& /*aName*/, const awt::Point& /*aPos*/, const awt::Size& /*aSize*/ ) +{ +} + +sal_Bool ToolbarLayoutManager::isElementVisible( const ::rtl::OUString& rResourceURL ) +{ + UIElement aUIElement = implts_findToolbar( rResourceURL ); + if ( aUIElement.m_xUIElement.is() ) + { + uno::Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + + if( xWindow2.is() ) + return xWindow2->isVisible(); + } + return false; } -sal_Bool SAL_CALL ToolbarLayoutManager::floatWindow( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) +sal_Bool ToolbarLayoutManager::isElementFloating( const ::rtl::OUString& rResourceURL ) { + UIElement aUIElement = implts_findToolbar( rResourceURL ); + if ( aUIElement.m_xUIElement.is() ) + { + if ( aUIElement.m_bFloating ) + { + uno::Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + + if( xWindow2.is() ) + return true; + } + } + return false; } -::sal_Bool SAL_CALL ToolbarLayoutManager::lockWindow( const ::rtl::OUString& /*ResourceURL*/ ) -throw (uno::RuntimeException) +sal_Bool ToolbarLayoutManager::isElementDocked( const ::rtl::OUString& rResourceURL ) { + UIElement aUIElement = implts_findToolbar( rResourceURL ); + if ( aUIElement.m_xUIElement.is() ) + { + if ( !aUIElement.m_bFloating ) + { + uno::Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + + if( xWindow2.is() ) + return true; + } + } + return false; } -::sal_Bool SAL_CALL ToolbarLayoutManager::unlockWindow( const ::rtl::OUString& /*ResourceURL*/ ) -throw (uno::RuntimeException) +::sal_Bool ToolbarLayoutManager::isElementLocked( const ::rtl::OUString& rResourceURL ) { + UIElement aUIElement = implts_findToolbar( rResourceURL ); + if ( aUIElement.m_xUIElement.is() ) + { + uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + return xDockWindow.is() && !xDockWindow->isLocked(); + } + return false; } -void SAL_CALL ToolbarLayoutManager::setElementSize( const ::rtl::OUString& /*aName*/, const awt::Size& /*aSize*/ ) -throw (uno::RuntimeException) +awt::Size ToolbarLayoutManager::getElementSize( const ::rtl::OUString& rResourceURL ) { -} + UIElement aUIElement = implts_findToolbar( rResourceURL ); + Window* pWindow = getWindowFromXUIElement( aUIElement.m_xUIElement ); + if ( pWindow ) + { + ::Size aSize = pWindow->GetSizePixel(); + awt::Size aWinSize; + aWinSize.Width = aSize.Width(); + aWinSize.Height = aSize.Height(); + return aWinSize; + } -void SAL_CALL ToolbarLayoutManager::setElementPos( const ::rtl::OUString& /*aName*/, const awt::Point& /*aPos*/ ) -throw (uno::RuntimeException) -{ -} - -void SAL_CALL ToolbarLayoutManager::setElementPosSize( const ::rtl::OUString& /*aName*/, const awt::Point& /*aPos*/, const awt::Size& /*aSize*/ ) -throw (uno::RuntimeException) -{ -} - -sal_Bool SAL_CALL ToolbarLayoutManager::isElementVisible( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) -{ - return false; -} - -sal_Bool SAL_CALL ToolbarLayoutManager::isElementFloating( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) -{ - return false; -} - -sal_Bool SAL_CALL ToolbarLayoutManager::isElementDocked( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) -{ - return false; -} - -::sal_Bool SAL_CALL ToolbarLayoutManager::isElementLocked( const ::rtl::OUString& /*ResourceURL*/ ) -throw (uno::RuntimeException) -{ - return false; -} - -awt::Size SAL_CALL ToolbarLayoutManager::getElementSize( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) -{ return awt::Size(); } -awt::Point SAL_CALL ToolbarLayoutManager::getElementPos( const ::rtl::OUString& /*aName*/ ) -throw (uno::RuntimeException) +awt::Point ToolbarLayoutManager::getElementPos( const ::rtl::OUString& rResourceURL ) { - return awt::Point(); + awt::Point aPos; + UIElement aUIElement = implts_findToolbar( rResourceURL ); + + uno::Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xDockWindow.is() ) + { + if ( aUIElement.m_bFloating ) + { + awt::Rectangle aRect = xWindow->getPosSize(); + aPos.X = aRect.X; + aPos.Y = aRect.Y; + } + else + { + ::Point aVirtualPos = aUIElement.m_aDockedData.m_aPos; + aPos.X = aVirtualPos.X(); + aPos.Y = aVirtualPos.Y(); + } + } + + return aPos; } } // namespace framework diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index 016168cefcc0..e5870a48c07d 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -69,7 +69,6 @@ #include #include #include -#include #include #include #include @@ -113,44 +112,81 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a ::com::sun::star::awt::Rectangle getDockingArea(); void setDockingArea( const ::com::sun::star::awt::Rectangle& rDockingArea ); + // layouting bool isLayoutDirty(); void doLayout(const ::Size& aContainerSize); - void createToolbars(); + // creation/destruction + void createStaticToolbars(); void destroyToolbars(); + + bool requestToolbar( const ::rtl::OUString& rResourceURL ); + bool createToolbar( const ::rtl::OUString& rResourceURL ); + bool destroyToolbar( const ::rtl::OUString& rResourceURL ); + + // visibility + bool showToolbar( const ::rtl::OUString& rResourceURL ); + bool hideToolbar( const ::rtl::OUString& rResourceURL ); + + void refreshToolbarsVisibility(); + void setFloatingToolbarsVisibility( bool bVisible ); void setVisible(bool bVisible); bool isVisible() { return m_bVisible; } - bool createToolbar( const ::rtl::OUString& rResourceURL ); - bool destroyToolbar( const ::rtl::OUString& rResourceURL ); - void implts_createNonContextSensitiveToolBars(); + // docking + bool dockToolbar( const ::rtl::OUString& rResourceURL, ::com::sun::star::ui::DockingArea eDockingArea, const ::com::sun::star::awt::Point& aPos ); + bool dockAllToolbars(); - // docking API - void dockToolbar( const ::rtl::OUString& rResourceURL, ::com::sun::star::ui::DockingArea eDockingArea, const ::com::sun::star::awt::Point& aPos ); + // child window notifications + long childWindowEvent( VclSimpleEvent* pEvent ); + + //--------------------------------------------------------------------------------------------------------- + // XLayoutManager forwards + //--------------------------------------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > getElement( const ::rtl::OUString& aName ); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > > getElements(); + sal_Bool dockWindow( const ::rtl::OUString& aName, ::com::sun::star::ui::DockingArea DockingArea, const ::com::sun::star::awt::Point& Pos ); + ::sal_Bool dockAllWindows( ::sal_Int16 nElementType ); + sal_Bool floatWindow( const ::rtl::OUString& aName ); + ::sal_Bool lockWindow( const ::rtl::OUString& ResourceURL ); + ::sal_Bool unlockWindow( const ::rtl::OUString& ResourceURL ); + void setElementSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Size& aSize ); + void setElementPos( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos ); + void setElementPosSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos, const ::com::sun::star::awt::Size& aSize ); + sal_Bool isElementVisible( const ::rtl::OUString& aName ); + sal_Bool isElementFloating( const ::rtl::OUString& aName ); + sal_Bool isElementDocked( const ::rtl::OUString& aName ); + ::sal_Bool isElementLocked( const ::rtl::OUString& ResourceURL ); + ::com::sun::star::awt::Size getElementSize( const ::rtl::OUString& aName ); + ::com::sun::star::awt::Point getElementPos( const ::rtl::OUString& aName ); + + //--------------------------------------------------------------------------------------------------------- + // UNO interfaces + //--------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------- // XInterface - //--------------------------------------------------------------------------------------------------------- - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException ); //--------------------------------------------------------------------------------------------------------- // XEventListener - //--------------------------------------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XWindowListener - //--------------------------------------------------------------------------------------------------------- - virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); - virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); + // XWindowListener + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); + virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); //--------------------------------------------------------------------------------------------------------- // XDockableWindowListener - //--------------------------------------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); @@ -159,38 +195,13 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException); - //--------------------------------------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------------------------- // XUIConfigurationListener - //--------------------------------------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - //--------------------------------------------------------------------------------------------------------- - // XLayoutManager forwards - //--------------------------------------------------------------------------------------------------------- - void SAL_CALL createElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL destroyElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - ::sal_Bool SAL_CALL requestElement( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL getElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > > SAL_CALL getElements( ) throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL showElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL hideElement( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL dockWindow( const ::rtl::OUString& aName, ::com::sun::star::ui::DockingArea DockingArea, const ::com::sun::star::awt::Point& Pos ) throw (::com::sun::star::uno::RuntimeException); - ::sal_Bool SAL_CALL dockAllWindows( ::sal_Int16 nElementType ) throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL floatWindow( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - ::sal_Bool SAL_CALL lockWindow( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException); - ::sal_Bool SAL_CALL unlockWindow( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL setElementSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL setElementPos( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL setElementPosSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos, const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL isElementVisible( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL isElementFloating( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL isElementDocked( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - ::sal_Bool SAL_CALL isElementLocked( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException); - ::com::sun::star::awt::Size SAL_CALL getElementSize( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - ::com::sun::star::awt::Point SAL_CALL getElementPos( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - private: enum DockingOperation { @@ -240,11 +251,11 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a //--------------------------------------------------------------------------------------------------------- // lookup/container methods //--------------------------------------------------------------------------------------------------------- - UIElement implts_findElement( const rtl::OUString& aName ); - UIElement implts_findElement( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xToolbar ); - UIElement& impl_findElement( const rtl::OUString& aName ); - bool implts_insertElement( const UIElement& rUIElement ); - void implts_setElement( const UIElement& rUIElement ); + UIElement implts_findToolbar( const rtl::OUString& aName ); + UIElement implts_findToolbar( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xToolbar ); + UIElement& impl_findToolbar( const rtl::OUString& aName ); + bool implts_insertToolbar( const UIElement& rUIElement ); + void implts_setToolbar( const UIElement& rUIElement ); ::Size implts_getTopBottomDockingAreaSizes(); //--------------------------------------------------------------------------------------------------------- @@ -276,10 +287,10 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a //--------------------------------------------------------------------------------------------------------- void implts_createAddonsToolBars(); void implts_createCustomToolBars(); -// void implts_createNonContextSensitiveToolBars(); + void implts_createNonContextSensitiveToolBars(); void implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aCustomTbxSeq ); void implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ); - void implts_createElement( const ::rtl::OUString& aName, bool& bNotify, ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement ); + void implts_createToolBar( const ::rtl::OUString& aName, bool& bNotify, ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement ); css::uno::Reference< css::ui::XUIElement > implts_createElement( const ::rtl::OUString& aName ); //--------------------------------------------------------------------------------------------------------- @@ -287,43 +298,46 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a //--------------------------------------------------------------------------------------------------------- sal_Bool implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ); void implts_writeWindowStateData( const UIElement& rElementData ); + void implts_writeNewWindowStateData( const rtl::OUString aName, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xWindow ); //--------------------------------------------------------------------------------------------------------- // members //--------------------------------------------------------------------------------------------------------- - css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; - css::uno::Reference< css::frame::XFrame > m_xFrame; - css::uno::Reference< css::awt::XWindow2 > m_xContainerWindow; - css::uno::Reference< css::awt::XWindow > m_xDockAreaWindows[DOCKINGAREAS_COUNT]; - css::uno::Reference< ::com::sun::star::ui::XUIElementFactory > m_xUIElementFactoryManager; - css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr; - css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr; - css::uno::Reference< ::com::sun::star::awt::XToolkit > m_xToolkit; - css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; - ILayoutNotifications* m_pParentLayouter; + css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; + css::uno::Reference< css::frame::XFrame > m_xFrame; + css::uno::Reference< css::awt::XWindow2 > m_xContainerWindow; + css::uno::Reference< css::awt::XWindow > m_xDockAreaWindows[DOCKINGAREAS_COUNT]; + css::uno::Reference< ::com::sun::star::ui::XUIElementFactory > m_xUIElementFactoryManager; + css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr; + css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr; + css::uno::Reference< ::com::sun::star::awt::XToolkit > m_xToolkit; + css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; + ILayoutNotifications* m_pParentLayouter; - UIElementVector m_aUIElements; - UIElement m_aDockUIElement; - Point m_aStartDockMousePos; - Rectangle m_aDockingArea; - Rectangle m_aDockingAreaOffsets; - DockingOperation m_eDockOperation; + UIElementVector m_aUIElements; + UIElement m_aDockUIElement; + Point m_aStartDockMousePos; + Rectangle m_aDockingArea; + Rectangle m_aDockingAreaOffsets; + DockingOperation m_eDockOperation; - AddonsOptions* m_pAddonOptions; - GlobalSettings* m_pGlobalSettings; + AddonsOptions* m_pAddonOptions; + GlobalSettings* m_pGlobalSettings; - bool m_bComponentAttached; - bool m_bMustLayout; - bool m_bLayoutDirty; - bool m_bStoreWindowState; - bool m_bGlobalSettings; - bool m_bDockingInProgress; - bool m_bVisible; - bool m_bLayoutInProgress; + bool m_bComponentAttached; + bool m_bMustLayout; + bool m_bLayoutDirty; + bool m_bStoreWindowState; + bool m_bGlobalSettings; + bool m_bDockingInProgress; + bool m_bVisible; + bool m_bLayoutInProgress; - ::rtl::OUString m_aFullAddonTbxPrefix; - ::rtl::OUString m_aCustomTbxPrefix; - ::rtl::OUString m_aCustomizeCmd; + ::rtl::OUString m_aFullAddonTbxPrefix; + ::rtl::OUString m_aCustomTbxPrefix; + ::rtl::OUString m_aCustomizeCmd; + ::rtl::OUString m_aToolbarTypeString; + ::rtl::OUString m_aModuleIdentifier; }; } // namespace framework From 1ff403576d66813cfec535da9f1558f2f3e2d336 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Mon, 11 Oct 2010 18:15:21 +0200 Subject: [PATCH 184/279] impress202: #i84795# write/load unicode strings for url and author fields --- editeng/source/items/flditem.cxx | 113 +++++++++---------------------- 1 file changed, 33 insertions(+), 80 deletions(-) diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 5cb45144abab..132a6d0ee38c 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -377,83 +377,46 @@ int SvxURLField::operator==( const SvxFieldData& rOther ) const // ----------------------------------------------------------------------- +static void write_unicode( SvPersistStream & rStm, const String& rString ) +{ + USHORT nL = rString.Len(); + rStm << nL; + rStm.Write( rString.GetBuffer(), nL*sizeof(sal_Unicode) ); +} + +static void read_unicode( SvPersistStream & rStm, String& rString ) +{ + USHORT nL = 0; + rStm >> nL; + if ( nL ) + { + rString.AllocBuffer( nL ); + rStm.Read( rString.GetBufferAccess(), nL*sizeof(sal_Unicode) ); + rString.ReleaseBufferAccess( nL ); + } +} + void SvxURLField::Load( SvPersistStream & rStm ) { - USHORT nFormat; - sal_uInt32 nFrameMarker, nCharSetMarker; - long nUlongSize = (long)sizeof(sal_uInt32); - String aTmpURL; + USHORT nFormat = 0; rStm >> nFormat; - - // UNICODE: rStm >> aTmpURL; - rStm.ReadByteString(aTmpURL); - - // UNICODE: rStm >> aRepresentation; - // read to a temp string first, read text encoding and - // convert later to stay compatible to fileformat - ByteString aTempString; - rtl_TextEncoding aTempEncoding = RTL_TEXTENCODING_MS_1252; // #101493# Init for old documents - rStm.ReadByteString(aTempString); - - rStm >> nFrameMarker; - if ( nFrameMarker == FRAME_MARKER ) - { - // UNICODE: rStm >> aTargetFrame; - rStm.ReadByteString(aTargetFrame); - - rStm >> nCharSetMarker; - if ( nCharSetMarker == CHARSET_MARKER ) - { - USHORT nCharSet; - rStm >> nCharSet; - - // remember encoding - aTempEncoding = (rtl_TextEncoding)nCharSet; - } - else - rStm.SeekRel( -nUlongSize ); - } - else - rStm.SeekRel( -nUlongSize ); - - // now build representation string due to known encoding - aRepresentation = String(aTempString, aTempEncoding); - eFormat= (SvxURLFormat)nFormat; - // Relatives Speichern => Beim laden absolut machen. - DBG_ERROR("No BaseURL!"); - // TODO/MBA: no BaseURL - aURL = INetURLObject::GetAbsURL( String(), aTmpURL ); + read_unicode( rStm, aURL ); + read_unicode( rStm, aRepresentation ); + read_unicode( rStm, aTargetFrame ); } // ----------------------------------------------------------------------- void SvxURLField::Save( SvPersistStream & rStm ) { - // Relatives Speichern der URL - DBG_ERROR("No BaseURL!"); - // TODO/MBA: no BaseURL - String aTmpURL = INetURLObject::GetRelURL( String(), aURL ); - rStm << (USHORT)eFormat; - // UNICODE: rStm << aTmpURL; - rStm.WriteByteString(aTmpURL); - - // UNICODE: rStm << aRepresentation; - rStm.WriteByteString(aRepresentation); - - rStm << FRAME_MARKER; - - // UNICODE: rStm << aTargetFrame; - rStm.WriteByteString(aTargetFrame); - - rStm << CHARSET_MARKER; - - // #90477# rStm << (USHORT)GetStoreCharSet(gsl_getSystemTextEncoding(), rStm.GetVersion()); - rStm << (USHORT)GetSOStoreTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rStm.GetVersion()); + write_unicode( rStm, aURL ); + write_unicode( rStm, aRepresentation ); + write_unicode( rStm, aTargetFrame ); } MetaAction* SvxURLField::createBeginComment() const @@ -921,16 +884,11 @@ int SvxAuthorField::operator==( const SvxFieldData& rOther ) const void SvxAuthorField::Load( SvPersistStream & rStm ) { - USHORT nType, nFormat; + USHORT nType = 0, nFormat = 0; - // UNICODE: rStm >> aName; - rStm.ReadByteString(aName); - - // UNICODE: rStm >> aFirstName; - rStm.ReadByteString(aFirstName); - - // UNICODE: rStm >> aShortName; - rStm.ReadByteString(aShortName); + read_unicode( rStm, aName ); + read_unicode( rStm, aFirstName ); + read_unicode( rStm, aShortName ); rStm >> nType; rStm >> nFormat; @@ -943,14 +901,9 @@ void SvxAuthorField::Load( SvPersistStream & rStm ) void SvxAuthorField::Save( SvPersistStream & rStm ) { - // UNICODE: rStm << aName; - rStm.WriteByteString(aName); - - // UNICODE: rStm << aFirstName; - rStm.WriteByteString(aFirstName); - - // UNICODE: rStm << aShortName; - rStm.WriteByteString(aShortName); + write_unicode( rStm, aName ); + write_unicode( rStm, aFirstName ); + write_unicode( rStm, aShortName ); rStm << (USHORT) eType; rStm << (USHORT) eFormat; From e06b0f34ec36ddf5470d3a40d0d41c47e3814670 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Wed, 13 Oct 2010 14:32:41 +0200 Subject: [PATCH 185/279] #i115050# - Drop support for neon < 0.26.0 --- ucb/source/ucp/webdav/LinkSequence.cxx | 4 - ucb/source/ucp/webdav/LockEntrySequence.cxx | 4 - ucb/source/ucp/webdav/LockSequence.cxx | 4 - ucb/source/ucp/webdav/NeonHeadRequest.cxx | 89 ++----------------- ucb/source/ucp/webdav/NeonPropFindRequest.cxx | 18 ---- ucb/source/ucp/webdav/NeonSession.cxx | 20 +---- ucb/source/ucp/webdav/NeonUri.cxx | 18 ---- .../ucp/webdav/UCBDeadPropertyValue.cxx | 4 - 8 files changed, 10 insertions(+), 151 deletions(-) diff --git a/ucb/source/ucp/webdav/LinkSequence.cxx b/ucb/source/ucp/webdav/LinkSequence.cxx index 39d8d9cecc38..31ec14ba0adf 100644 --- a/ucb/source/ucp/webdav/LinkSequence.cxx +++ b/ucb/source/ucp/webdav/LinkSequence.cxx @@ -168,11 +168,7 @@ bool LinkSequence::createFromXML( const rtl::OString & rInData, rInData.getStr() + nStart, nEnd - nStart + TOKEN_LENGTH ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/LockEntrySequence.cxx b/ucb/source/ucp/webdav/LockEntrySequence.cxx index 762170e7e057..1e577a47981b 100644 --- a/ucb/source/ucp/webdav/LockEntrySequence.cxx +++ b/ucb/source/ucp/webdav/LockEntrySequence.cxx @@ -215,11 +215,7 @@ bool LockEntrySequence::createFromXML( const rtl::OString & rInData, rInData.getStr() + nStart, nEnd - nStart + TOKEN_LENGTH ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index bc9b9f0175f7..f95badaf19d2 100644 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.cxx @@ -343,11 +343,7 @@ bool LockSequence::createFromXML( const rtl::OString & rInData, rInData.getStr() + nStart, nEnd - nStart + TOKEN_LENGTH ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/NeonHeadRequest.cxx b/ucb/source/ucp/webdav/NeonHeadRequest.cxx index 2880a86a727d..1e5294882a03 100644 --- a/ucb/source/ucp/webdav/NeonHeadRequest.cxx +++ b/ucb/source/ucp/webdav/NeonHeadRequest.cxx @@ -37,16 +37,15 @@ using namespace com::sun::star; namespace { -#if NEON_VERSION >= 0x0250 -void process_headers(ne_request *req, - DAVResource &rResource, - const std::vector< ::rtl::OUString > &rHeaderNames) +void process_headers( ne_request * req, + DAVResource & rResource, + const std::vector< ::rtl::OUString > & rHeaderNames ) { - void *cursor = NULL; - const char *name, *value; + void * cursor = NULL; + const char * name, *value; - while ((cursor = ne_response_header_iterate(req, cursor, - &name, &value)) != NULL) { + while ( ( cursor = ne_response_header_iterate( req, cursor, + &name, &value ) ) != NULL ) { rtl::OUString aHeaderName( rtl::OUString::createFromAscii( name ) ); rtl::OUString aHeaderValue( rtl::OUString::createFromAscii( value ) ); @@ -86,69 +85,6 @@ void process_headers(ne_request *req, } } } -#else -struct NeonHeadRequestContext -{ - DAVResource * pResource; - const std::vector< ::rtl::OUString > * pHeaderNames; - - NeonHeadRequestContext( DAVResource * p, - const std::vector< ::rtl::OUString > * pHeaders ) - : pResource( p ), pHeaderNames( pHeaders ) {} -}; - -extern "C" void NHR_ResponseHeaderCatcher( void * userdata, - const char * value ) -{ - rtl::OUString aHeader( rtl::OUString::createFromAscii( value ) ); - sal_Int32 nPos = aHeader.indexOf( ':' ); - - if ( nPos != -1 ) - { - rtl::OUString aHeaderName( aHeader.copy( 0, nPos ) ); - - NeonHeadRequestContext * pCtx - = static_cast< NeonHeadRequestContext * >( userdata ); - - // Note: Empty vector means that all headers are requested. - bool bIncludeIt = ( pCtx->pHeaderNames->size() == 0 ); - - if ( !bIncludeIt ) - { - // Check whether this header was requested. - std::vector< ::rtl::OUString >::const_iterator it( - pCtx->pHeaderNames->begin() ); - const std::vector< ::rtl::OUString >::const_iterator end( - pCtx->pHeaderNames->end() ); - - while ( it != end ) - { - if ( (*it) == aHeaderName ) - break; - - ++it; - } - - if ( it != end ) - bIncludeIt = true; - } - - if ( bIncludeIt ) - { - // Create & set the PropertyValue - DAVPropertyValue thePropertyValue; - thePropertyValue.Name = aHeaderName; - thePropertyValue.IsCaseSensitive = false; - - if ( nPos < aHeader.getLength() ) - thePropertyValue.Value <<= aHeader.copy( nPos + 1 ).trim(); - - // Add the newly created PropertyValue - pCtx->pResource->properties.push_back( thePropertyValue ); - } - } -} -#endif } // namespace @@ -156,7 +92,7 @@ extern "C" void NHR_ResponseHeaderCatcher( void * userdata, // Constructor // ------------------------------------------------------------------- -NeonHeadRequest::NeonHeadRequest( HttpSession* inSession, +NeonHeadRequest::NeonHeadRequest( HttpSession * inSession, const rtl::OUString & inPath, const std::vector< ::rtl::OUString > & inHeaderNames, @@ -174,16 +110,9 @@ NeonHeadRequest::NeonHeadRequest( HttpSession* inSession, inPath, RTL_TEXTENCODING_UTF8 ) ); -#if NEON_VERSION < 0x0250 - NeonHeadRequestContext aCtx( &ioResource, &inHeaderNames ); - ne_add_response_header_catcher( req, NHR_ResponseHeaderCatcher, &aCtx ); -#endif - nError = ne_request_dispatch( req ); -#if NEON_VERSION >= 0x0250 - process_headers(req, ioResource, inHeaderNames); -#endif + process_headers( req, ioResource, inHeaderNames ); if ( nError == NE_OK && ne_get_status( req )->klass != 2 ) nError = NE_ERROR; diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx index 85b5ea0393e0..f794516d20aa 100644 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx @@ -191,22 +191,13 @@ extern "C" int NPFR_propfind_iter( void* userdata, // ------------------------------------------------------------------- extern "C" void NPFR_propfind_results( void* userdata, -#if NEON_VERSION >= 0x0260 const ne_uri* uri, -#else - const char* href, -#endif const NeonPropFindResultSet* set ) { // @@@ href is not the uri! DAVResource ctor wants uri! -#if NEON_VERSION >= 0x0260 DAVResource theResource( OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) ); -#else - DAVResource theResource( - OStringToOUString( href, RTL_TEXTENCODING_UTF8 ) ); -#endif ne_propset_iterate( set, NPFR_propfind_iter, &theResource ); @@ -233,22 +224,13 @@ extern "C" int NPFR_propnames_iter( void* userdata, // ------------------------------------------------------------------- extern "C" void NPFR_propnames_results( void* userdata, -#if NEON_VERSION >= 0x0260 const ne_uri* uri, -#else - const char* href, -#endif const NeonPropFindResultSet* results ) { // @@@ href is not the uri! DAVResourceInfo ctor wants uri! // Create entry for the resource. -#if NEON_VERSION >= 0x0260 DAVResourceInfo theResource( OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) ); -#else - DAVResourceInfo theResource( - OStringToOUString( href, RTL_TEXTENCODING_UTF8 ) ); -#endif // Fill entry. ne_propset_iterate( results, NPFR_propnames_iter, &theResource ); diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 254fae546940..dca92a040af0 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -184,11 +184,7 @@ struct NeonRequestContext // A simple Neon response_block_reader for use with an XInputStream // ------------------------------------------------------------------- -#if NEON_VERSION >= 0x0250 extern "C" int NeonSession_ResponseBlockReader(void * inUserData, -#else -extern "C" void NeonSession_ResponseBlockReader(void * inUserData, -#endif const char * inBuf, size_t inLen ) { @@ -204,9 +200,7 @@ extern "C" void NeonSession_ResponseBlockReader(void * inUserData, if ( xInputStream.is() ) xInputStream->AddToStream( inBuf, inLen ); } -#if NEON_VERSION >= 0x0250 return 0; -#endif } // ------------------------------------------------------------------- @@ -214,11 +208,7 @@ extern "C" void NeonSession_ResponseBlockReader(void * inUserData, // A simple Neon response_block_reader for use with an XOutputStream // ------------------------------------------------------------------- -#if NEON_VERSION >= 0x0250 extern "C" int NeonSession_ResponseBlockWriter( void * inUserData, -#else -extern "C" void NeonSession_ResponseBlockWriter( void * inUserData, -#endif const char * inBuf, size_t inLen ) { @@ -236,9 +226,7 @@ extern "C" void NeonSession_ResponseBlockWriter( void * inUserData, xOutputStream->writeBytes( aSeq ); } } -#if NEON_VERSION >= 0x0250 return 0; -#endif } // ------------------------------------------------------------------- @@ -1926,17 +1914,11 @@ int NeonSession::GET( ne_session * sess, void *cursor = NULL; const char *name, *value; -#if NEON_VERSION < 0x0250 - if ( getheaders ) - ne_add_response_header_catcher( - req, runResponseHeaderHandler, userdata ); -#endif ne_decompress * dc = ne_decompress_reader( req, ne_accept_2xx, reader, userdata ); ret = ne_request_dispatch( req ); -#if NEON_VERSION >= 0x0250 if ( getheaders ) { while ( ( cursor = ne_response_header_iterate( @@ -1948,7 +1930,7 @@ int NeonSession::GET( ne_session * sess, runResponseHeaderHandler(userdata, buffer); } } -#endif + if ( ret == NE_OK && ne_get_status( req )->klass != 2 ) ret = NE_ERROR; diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx index 774faa06b9dd..27f24c631161 100644 --- a/ucb/source/ucp/webdav/NeonUri.cxx +++ b/ucb/source/ucp/webdav/NeonUri.cxx @@ -59,36 +59,24 @@ using namespace webdav_ucp; namespace { const ne_uri g_sUriDefaultsHTTP = { "http", -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, DEFAULT_HTTP_PORT, -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, NULL }; const ne_uri g_sUriDefaultsHTTPS = { "https", -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, DEFAULT_HTTPS_PORT, -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, NULL }; const ne_uri g_sUriDefaultsFTP = { "ftp", -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, DEFAULT_FTP_PORT, -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, NULL }; } // namespace @@ -174,11 +162,7 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) pUri->scheme ? pUri->scheme : pUriDefs->scheme, RTL_TEXTENCODING_UTF8 ); mUserInfo = rtl::OStringToOUString( -#if NEON_VERSION >= 0x0260 pUri->userinfo ? pUri->userinfo : pUriDefs->userinfo, -#else - pUri->authinfo ? pUri->authinfo : pUriDefs->authinfo, -#endif RTL_TEXTENCODING_UTF8 ); mHostName = rtl::OStringToOUString( pUri->host ? pUri->host : pUriDefs->host, @@ -188,7 +172,6 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) pUri->path ? pUri->path : pUriDefs->path, RTL_TEXTENCODING_UTF8 ); -#if NEON_VERSION >= 0x0260 if ( pUri->query ) { mPath += rtl::OUString::createFromAscii( "?" ); @@ -202,7 +185,6 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) mPath += rtl::OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 ); } -#endif } // ------------------------------------------------------------------- diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index 1ce4c70e6b21..42f30c665b61 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -373,11 +373,7 @@ bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, ne_xml_parse( parser, rInData.getStr(), rInData.getLength() ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); From bc5dc66313aa64c558c214955c3bc43e43f3d335 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 13 Oct 2010 17:31:05 +0200 Subject: [PATCH 186/279] dockingwindows: Fixed problems with changes done via UI configuration API not being sent to the ToolbarLayoutManager --- framework/inc/services/layoutmanager.hxx | 2 +- .../source/layoutmanager/layoutmanager.cxx | 29 +++++++-------- .../layoutmanager/toolbarlayoutmanager.cxx | 35 +++++++++++++++++-- 3 files changed, 49 insertions(+), 17 deletions(-) diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index ef827e7e85b9..6b0135a39e10 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -368,7 +368,7 @@ namespace framework ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener PanelManager* m_pPanelManager; ToolbarLayoutManager* m_pToolbarManager; - css::uno::Reference< ::com::sun::star::lang::XComponent > m_xToolbarManager; + css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener > m_xToolbarManager; }; } // namespace framework diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 1e2ca064d140..2f16fbaef634 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -189,7 +189,7 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM m_aStatusBarElement.m_aName = m_aStatusBarAlias; m_pToolbarManager = new ToolbarLayoutManager( xServiceManager, m_xUIElementFactoryManager, this ); - m_xToolbarManager = uno::Reference< lang::XComponent >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY ); + m_xToolbarManager = uno::Reference< ui::XUIConfigurationListener >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY ); Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); @@ -482,7 +482,7 @@ sal_Bool LayoutManager::implts_isEmbeddedLayoutManager() const void LayoutManager::implts_destroyElements() { WriteGuard aWriteLock( m_aLock ); - uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); + uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; aWriteLock.unlock(); @@ -499,7 +499,7 @@ void LayoutManager::implts_destroyElements() void LayoutManager::implts_toggleFloatingUIElementsVisibility( sal_Bool bActive ) { ReadGuard aReadLock( m_aLock ); - uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); + uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; aReadLock.unlock(); @@ -921,7 +921,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) if ( bSetVisible ) { - uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); + uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager ); if ( xThis.is() ) m_pToolbarManager->setVisible(bSetVisible); implts_doLayout_notify( sal_False ); @@ -1270,7 +1270,7 @@ void LayoutManager::implts_setOffset( const sal_Int32 nBottomOffset ) aOffsetRect.setHeight( nBottomOffset ); // make sure that the toolbar manager refernence/pointer is valid - uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); + uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager ); if ( xThis.is() ) m_pToolbarManager->setDockingAreaOffsets( aOffsetRect ); } @@ -1427,7 +1427,7 @@ throw ( RuntimeException ) sal_Bool bAutomaticToolbars( m_bAutomaticToolbars ); std::vector< Reference< awt::XWindow > > oldDockingAreaWindows; - uno::Reference< lang::XComponent > xToolbarManager( m_xToolbarManager ); + uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; if ( !xDockingAreaAcceptor.is() ) @@ -1566,7 +1566,7 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) long nResult( 1 ); ReadGuard aReadLock( m_aLock ); - uno::Reference< lang::XComponent > xThis( m_xToolbarManager ); + uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); aReadLock.unlock(); @@ -1827,14 +1827,15 @@ throw (uno::RuntimeException) bNotify = true; bDoLayout = true; } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR ) && m_bParentWindowVisible ) + else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR ) && + m_bParentWindowVisible && m_bVisible ) { - ReadGuard aReadLock( m_aLock ); + bool bComponentAttached( m_aModuleIdentifier.getLength() > 0 ); uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY ); ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; - aReadLock.unlock(); + aWriteLock.unlock(); - if ( pToolbarManager ) + if ( pToolbarManager && bComponentAttached ) { bNotify = pToolbarManager->requestToolbar( rResourceURL ); bDoLayout = true; @@ -2243,7 +2244,7 @@ throw (RuntimeException) if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { ReadGuard aReadLock( m_aLock ); - uno::Reference< lang::XComponent > xToolbarManager( m_xToolbarManager ); + uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); aReadLock.unlock(); @@ -2262,7 +2263,7 @@ throw (RuntimeException) if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { ReadGuard aReadLock( m_aLock ); - uno::Reference< lang::XComponent > xToolbarManager( m_xToolbarManager ); + uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); aReadLock.unlock(); @@ -3163,7 +3164,7 @@ throw( RuntimeException ) else if ( rEvent.Source == Reference< XInterface >( m_xContainerWindow, UNO_QUERY )) { // Our container window gets disposed. Remove all user interface elements. - uno::Reference< lang::XComponent > xToolbarManager( m_xToolbarManager ); + uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; if ( pToolbarManager ) { diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 4ef8aa6d64b9..45c53c98f3a9 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -4208,10 +4208,41 @@ throw (uno::RuntimeException) } } -void SAL_CALL ToolbarLayoutManager::elementReplaced( - const ui::ConfigurationEvent& /*Event*/ ) +void SAL_CALL ToolbarLayoutManager::elementReplaced( const ui::ConfigurationEvent& rEvent ) throw (uno::RuntimeException) { + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; + UIElement aUIElement = implts_findToolbar( rEvent.ResourceURL ); + + uno::Reference< ui::XUIElementSettings > xElementSettings( aUIElement.m_xUIElement, uno::UNO_QUERY ); + if ( xElementSettings.is() ) + { + ::rtl::OUString aConfigSourcePropName( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" )); + uno::Reference< uno::XInterface > xElementCfgMgr; + uno::Reference< beans::XPropertySet > xPropSet( xElementSettings, uno::UNO_QUERY ); + + if ( xPropSet.is() ) + xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; + + if ( !xElementCfgMgr.is() ) + return; + + // Check if the same UI configuration manager has changed => update settings + if ( rEvent.Source == xElementCfgMgr ) + { + xElementSettings->updateSettings(); + + WriteGuard aWriteLock( m_aLock ); + bool bDirty = !aUIElement.m_bFloating; + m_bLayoutDirty = bDirty; + ILayoutNotifications* pParentLayouter( m_pParentLayouter ); + aWriteLock.unlock(); + + if ( bDirty && pParentLayouter ) + pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); + } + } } //--------------------------------------------------------------------------------------------------------- From 96e3776c1ad226e5f7e8765ae6d9e4b3205429fa Mon Sep 17 00:00:00 2001 From: sj Date: Fri, 15 Oct 2010 08:12:17 +0200 Subject: [PATCH 187/279] impress212: #i114750# fixed odf import problem, (using correct word wrap default for shapes) --- svx/source/svdraw/svdmodel.cxx | 2 ++ xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 8ab385fa329c..9abb1969459d 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -207,6 +207,8 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe else nDefTextHgt = SdrEngineDefaults::GetFontHeight(); + pItemPool->SetPoolDefaultItem( SdrTextWordWrapItem( sal_False ) ); + SetTextDefaults(); pLayerAdmin=new SdrLayerAdmin; pLayerAdmin->SetModel(this); diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index 4b8bcf429057..e30b44345d59 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -104,6 +104,16 @@ void XMLGraphicsDefaultStyle::SetDefaults() Reference< XPropertySet > xDefaults( xFact->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Defaults") ) ), UNO_QUERY ); if( !xDefaults.is() ) return; + // SJ: #i114750# + sal_Bool bWordWrapDefault = sal_True; // initializing with correct odf fo:wrap-option default + sal_Int32 nUPD( 0 ); + sal_Int32 nBuild( 0 ); + const bool bBuildIdFound = GetImport().getBuildIds( nUPD, nBuild ); + if ( bBuildIdFound && ( + ( nUPD == 641 ) || ( nUPD == 645 ) || ( nUPD == 680 ) || ( nUPD == 310 ) || ( nUPD == 320 ) || ( nUPD == 330 ) + || ( ( nUPD == 300 ) && ( nBuild <= 9535 ) ) ) ) + bWordWrapDefault = sal_False; + xDefaults->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextWordWrap" ) ), Any( bWordWrapDefault ) ); FillPropertySet( xDefaults ); } From 6e4c487a07e94c58c8402e67437f2cb802f78dea Mon Sep 17 00:00:00 2001 From: sj Date: Fri, 15 Oct 2010 15:44:59 +0200 Subject: [PATCH 188/279] impress212: #i114750# fixed odf import problem, (using correct word wrap default for shapes) --- xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index e30b44345d59..a5de333ee9f6 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -110,8 +110,12 @@ void XMLGraphicsDefaultStyle::SetDefaults() sal_Int32 nBuild( 0 ); const bool bBuildIdFound = GetImport().getBuildIds( nUPD, nBuild ); if ( bBuildIdFound && ( - ( nUPD == 641 ) || ( nUPD == 645 ) || ( nUPD == 680 ) || ( nUPD == 310 ) || ( nUPD == 320 ) || ( nUPD == 330 ) - || ( ( nUPD == 300 ) && ( nBuild <= 9535 ) ) ) ) + ((nUPD >= 600) && (nUPD < 700)) + || + ((nUPD == 300) && (nBuild <= 9535)) + || + ((nUPD > 300) && (nUPD <= 330)) + ) bWordWrapDefault = sal_False; xDefaults->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextWordWrap" ) ), Any( bWordWrapDefault ) ); From da6bba7cb6fed8052fe6929f6a666fa5387b0e55 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 15 Oct 2010 16:18:57 +0200 Subject: [PATCH 189/279] dockingwindows: Fix serveral issues for the reworked LayoutManager class --- framework/source/layoutmanager/helpers.cxx | 20 +- framework/source/layoutmanager/helpers.hxx | 3 +- .../source/layoutmanager/layoutmanager.cxx | 263 +++++++----------- .../layoutmanager/toolbarlayoutmanager.cxx | 22 +- .../layoutmanager/toolbarlayoutmanager.hxx | 34 +-- 5 files changed, 149 insertions(+), 193 deletions(-) diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index 10b8c06fddac..e144519b5e0c 100755 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -191,13 +191,29 @@ WindowAlign ImplConvertAlignment( sal_Int16 aAlignment ) return WINDOWALIGN_BOTTOM; } -void parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ) +::rtl::OUString getElementTypeFromResourceURL( const ::rtl::OUString& aResourceURL ) { - sal_Int32 nIndex = 0; + ::rtl::OUString aType; ::rtl::OUString aUIResourceURL( UIRESOURCE_URL ); if ( aResourceURL.indexOf( aUIResourceURL ) == 0 ) { + sal_Int32 nIndex = 0; + ::rtl::OUString aPathPart = aResourceURL.copy( aUIResourceURL.getLength() ); + ::rtl::OUString aUIResource = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex ); + + return aPathPart.getToken( 0, (sal_Unicode)'/', nIndex ); + } + + return aType; +} + +void parseResourceURL( const rtl::OUString& aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ) +{ + ::rtl::OUString aUIResourceURL( UIRESOURCE_URL ); + if ( aResourceURL.indexOf( aUIResourceURL ) == 0 ) + { + sal_Int32 nIndex = 0; ::rtl::OUString aPathPart = aResourceURL.copy( aUIResourceURL.getLength() ); ::rtl::OUString aUIResource = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex ); diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx index f48f1278fc52..f7f0b3f4ca5c 100755 --- a/framework/source/layoutmanager/helpers.hxx +++ b/framework/source/layoutmanager/helpers.hxx @@ -81,7 +81,8 @@ void setZeroRectangle( ::Rectangle& rRect ); bool lcl_checkUIElement(const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement,::com::sun::star::awt::Rectangle& _rPosSize, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xWindow); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > createToolkitWindow( const css::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rFactory, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent, const char* pService ); WindowAlign ImplConvertAlignment( sal_Int16 aAlignment ); -void parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ); +::rtl::OUString getElementTypeFromResourceURL( const ::rtl::OUString& aResourceURL ); +void parseResourceURL( const rtl::OUString& aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ); ::Rectangle putAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect ); ::com::sun::star::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect ); ::com::sun::star::awt::Rectangle convertRectangleToAWT( const ::Rectangle& rRect ); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 2f16fbaef634..dcf25f22781e 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -31,10 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -//_________________________________________________________________________________________________________________ // my own includes -//_________________________________________________________________________________________________________________ - #include #include #include @@ -50,9 +47,7 @@ #include #include -//_________________________________________________________________________________________________________________ // interface includes -//_________________________________________________________________________________________________________________ #include #include #include @@ -76,9 +71,7 @@ #include #include -//_________________________________________________________________________________________________________________ // other includes -//_________________________________________________________________________________________________________________ #include #include #include @@ -97,9 +90,8 @@ #include #include -// ______________________________________________ -// using namespace +// using namespace using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -115,23 +107,9 @@ using namespace ::com::sun::star::frame; // You have to change BOTH values, see sfx2/inc/sfx2/sfxsids.hrc (SID_DOCKWIN_START) static const sal_Int32 DOCKWIN_ID_BASE = 9800; -//_________________________________________________________________________________________________________________ -// Namespace -//_________________________________________________________________________________________________________________ -// - namespace framework { -struct UIElementVisibility -{ - rtl::OUString aName; - bool bVisible; -}; - -//***************************************************************************************************************** -// XInterface, XTypeProvider, XServiceInfo -//***************************************************************************************************************** IMPLEMENT_FORWARD_XTYPEPROVIDER2( LayoutManager, LayoutManager_Base, LayoutManager_PBase ) IMPLEMENT_FORWARD_XINTERFACE2( LayoutManager, LayoutManager_Base, LayoutManager_PBase ) DEFINE_XSERVICEINFO_MULTISERVICE( LayoutManager, ::cppu::OWeakObject, SERVICENAME_LAYOUTMANAGER, IMPLEMENTATIONNAME_LAYOUTMANAGER) @@ -812,13 +790,9 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con ::Size aContainerWinSize; Window* pContainerWindow( 0 ); - ReadGuard aReadLock( m_aLock ); - Reference< awt::XWindow > xContainerWindow = m_xContainerWindow; - aReadLock.unlock(); - // Retrieve output size from container Window vos::OGuard aGuard( Application::GetSolarMutex() ); - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); if ( pContainerWindow ) aContainerWinSize = pContainerWindow->GetOutputSizePixel(); @@ -868,21 +842,15 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) else implts_notifyListeners( frame::LayoutManagerEvents::INVISIBLE, a ); std::vector< Reference< awt::XWindow > > aWinVector; - sal_Bool bOld; - { - WriteGuard aWriteLock( m_aLock ); - bOld = m_bDoLayout; - m_bDoLayout = sal_True; - } - - // Hide/show menubar according to bSetVisible - ReadGuard aReadLock( m_aLock ); - Reference< XUIElement > xMenuBar( m_xMenuBar, UNO_QUERY ); + WriteGuard aWriteLock( m_aLock ); + bool bOld( m_bDoLayout ); + Reference< XUIElement > xMenuBar( m_xMenuBar, UNO_QUERY ); Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); - Reference< XComponent > xInplaceMenuBar( m_xInplaceMenuBar ); - MenuBarManager* pInplaceMenuBar( m_pInplaceMenuBar ); - aReadLock.unlock(); + Reference< XComponent > xInplaceMenuBar( m_xInplaceMenuBar ); + MenuBarManager* pInplaceMenuBar( m_pInplaceMenuBar ); + m_bDoLayout = sal_True; + aWriteLock.unlock(); if (( xMenuBar.is() || xInplaceMenuBar.is() ) && xContainerWindow.is() ) { @@ -915,8 +883,9 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) if ( !bOld ) { - WriteGuard aWriteLock( m_aLock ); + aWriteLock.lock(); m_bDoLayout = sal_False; + aWriteLock.unlock(); } if ( bSetVisible ) @@ -928,7 +897,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) } else { - WriteGuard aWriteLock( m_aLock ); + aWriteLock.lock(); m_aDockingArea = awt::Rectangle(); m_bMustDoLayout = sal_True; aWriteLock.unlock(); @@ -1858,7 +1827,19 @@ throw (uno::RuntimeException) Reference< XUIElement > SAL_CALL LayoutManager::getElement( const ::rtl::OUString& aName ) throw (RuntimeException) { - return implts_findElement( aName ); + Reference< XUIElement > xUIElement = implts_findElement( aName ); + if ( !xUIElement.is() ) + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); + aReadLock.unlock(); + + if ( pToolbarManager ) + xUIElement = pToolbarManager->getElement( aName ); + } + + return xUIElement; } Sequence< Reference< ui::XUIElement > > SAL_CALL LayoutManager::getElements() @@ -2237,11 +2218,7 @@ throw (RuntimeException) void SAL_CALL LayoutManager::setElementPos( const ::rtl::OUString& aName, const awt::Point& aPos ) throw (RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - parseResourceURL( aName, aElementType, aElementName ); - if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { ReadGuard aReadLock( m_aLock ); uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); @@ -2256,11 +2233,7 @@ throw (RuntimeException) void SAL_CALL LayoutManager::setElementPosSize( const ::rtl::OUString& aName, const awt::Point& aPos, const awt::Size& aSize ) throw (RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - parseResourceURL( aName, aElementType, aElementName ); - if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { ReadGuard aReadLock( m_aLock ); uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); @@ -2346,11 +2319,7 @@ throw (RuntimeException) sal_Bool SAL_CALL LayoutManager::isElementFloating( const ::rtl::OUString& aName ) throw (RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - parseResourceURL( aName, aElementType, aElementName ); - if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { ReadGuard aReadLock( m_aLock ); uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); @@ -2367,11 +2336,7 @@ throw (RuntimeException) sal_Bool SAL_CALL LayoutManager::isElementDocked( const ::rtl::OUString& aName ) throw (RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - parseResourceURL( aName, aElementType, aElementName ); - if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { ReadGuard aReadLock( m_aLock ); uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); @@ -2385,14 +2350,10 @@ throw (RuntimeException) return sal_False; } -::sal_Bool SAL_CALL LayoutManager::isElementLocked( const ::rtl::OUString& ResourceURL ) +::sal_Bool SAL_CALL LayoutManager::isElementLocked( const ::rtl::OUString& aName ) throw (uno::RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - parseResourceURL( ResourceURL, aElementType, aElementName ); - if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { ReadGuard aReadLock( m_aLock ); uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); @@ -2400,20 +2361,16 @@ throw (uno::RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - pToolbarManager->isElementLocked( ResourceURL ); + pToolbarManager->isElementLocked( aName ); } return sal_False; } -awt::Size SAL_CALL LayoutManager::getElementSize( const ::rtl::OUString& ResourceURL ) +awt::Size SAL_CALL LayoutManager::getElementSize( const ::rtl::OUString& aName ) throw (RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - parseResourceURL( ResourceURL, aElementType, aElementName ); - if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { ReadGuard aReadLock( m_aLock ); uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); @@ -2421,20 +2378,16 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - return pToolbarManager->getElementSize( ResourceURL ); + return pToolbarManager->getElementSize( aName ); } return awt::Size(); } -awt::Point SAL_CALL LayoutManager::getElementPos( const ::rtl::OUString& ResourceURL ) +awt::Point SAL_CALL LayoutManager::getElementPos( const ::rtl::OUString& aName ) throw (RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - - parseResourceURL( ResourceURL, aElementType, aElementName ); - if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { ReadGuard aReadLock( m_aLock ); uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); @@ -2442,7 +2395,7 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - return pToolbarManager->getElementPos( ResourceURL ); + return pToolbarManager->getElementPos( aName ); } return awt::Point(); @@ -2518,7 +2471,7 @@ void LayoutManager::requestLayout( Hint eHint ) void LayoutManager::implts_doLayout_notify( sal_Bool bOuterResize ) { - sal_Bool bLayouted = implts_doLayout( sal_False, bOuterResize ); + bool bLayouted = implts_doLayout( false, bOuterResize ); if ( bLayouted ) implts_notifyListeners( frame::LayoutManagerEvents::LAYOUT, Any() ); } @@ -2527,37 +2480,26 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ { RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::implts_doLayout" ); - sal_Bool bNoLock( sal_False ); - awt::Rectangle aCurrBorderSpace; - Reference< awt::XWindow > xContainerWindow; - Reference< awt::XTopWindow2 > xContainerTopWindow; - Reference< awt::XWindow > xComponentWindow; - Reference< XDockingAreaAcceptor > xDockingAreaAcceptor; - bool bPreserveContentSize( false ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); - sal_Bool bMustDoLayout( m_bMustDoLayout ); - if ( !m_bParentWindowVisible ) + if ( !m_xFrame.is() || !m_bParentWindowVisible ) return sal_False; - bNoLock = ( m_nLockCount == 0 ); - xContainerWindow = m_xContainerWindow; - xContainerTopWindow = m_xContainerTopWindow; - xComponentWindow = m_xFrame->getComponentWindow(); - xDockingAreaAcceptor = m_xDockingAreaAcceptor; - aCurrBorderSpace = m_aDockingArea; - bPreserveContentSize = m_bPreserveContentSize; + bool bPreserveContentSize( m_bPreserveContentSize ); + bool bMustDoLayout( m_bMustDoLayout ); + bool bNoLock = ( m_nLockCount == 0 ); + awt::Rectangle aCurrBorderSpace( m_aDockingArea ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); + Reference< awt::XTopWindow2 > xContainerTopWindow( m_xContainerTopWindow ); + Reference< awt::XWindow > xComponentWindow( m_xFrame->getComponentWindow() ); + Reference< XDockingAreaAcceptor > xDockingAreaAcceptor( m_xDockingAreaAcceptor ); aReadLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ sal_Bool bLayouted( sal_False ); - if ( bNoLock && - xDockingAreaAcceptor.is() && - xContainerWindow.is() && - xComponentWindow.is() ) + if ( bNoLock && xDockingAreaAcceptor.is() && xContainerWindow.is() && xComponentWindow.is() ) { bLayouted = sal_True; @@ -2614,12 +2556,10 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ if ( bGotRequestedBorderSpace ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteGuard.lock(); m_aDockingArea = aBorderSpace; m_bMustDoLayout = sal_False; aWriteGuard.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } } @@ -2684,16 +2624,14 @@ sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContaine DBG_UNHANDLED_EXCEPTION(); } - if ( ( aWorkArea.Width > 0 ) && ( aWorkArea.Height > 0 ) ) + if (( aWorkArea.Width > 0 ) && ( aWorkArea.Height > 0 )) { - if ( ( rContainerSize.Width > aWorkArea.Width ) - || ( rContainerSize.Height > aWorkArea.Height ) - ) + if (( rContainerSize.Width > aWorkArea.Width ) || ( rContainerSize.Height > aWorkArea.Height )) return sal_False; // Strictly, this is not correct. If we have a multi-screen display (css.awt.DisplayAccess.MultiDisplay == true), // the the "effective work area" would be much larger than the work area of a single display, since we could in theory // position the container window across multiple screens. - // However, this should suffice as a heuristics here ... (nobody really wants to check whethere the different screens are + // However, this should suffice as a heuristics here ... (nobody really wants to check whether the different screens are // stacked horizontally or vertically, whether their work areas can really be combined, or are separated by non-work-areas, // and the like ... right?) } @@ -2708,10 +2646,8 @@ sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContaine void SAL_CALL LayoutManager::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException) { - sal_Bool bWasVisible( sal_True ); - WriteGuard aWriteLock( m_aLock ); - bWasVisible = m_bVisible; + sal_Bool bWasVisible( m_bVisible ); m_bVisible = bVisible; aWriteLock.unlock(); @@ -2777,11 +2713,11 @@ void LayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangle& /*rB uno::Reference< awt::XDevice > xDevice( xContainerWindow, uno::UNO_QUERY ); // Convert relativ size to output size. - awt::Rectangle aRectangle = xContainerWindow->getPosSize(); - awt::DeviceInfo aInfo = xDevice->getInfo(); - awt::Size aContainerClientSize = awt::Size( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset, - aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); - ::Size aStatusBarSize = implts_getStatusBarSize(); + awt::Rectangle aRectangle = xContainerWindow->getPosSize(); + awt::DeviceInfo aInfo = xDevice->getInfo(); + awt::Size aContainerClientSize = awt::Size( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset, + aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); + ::Size aStatusBarSize = implts_getStatusBarSize(); // Position the status bar if ( aStatusBarSize.Height() > 0 ) @@ -2985,7 +2921,7 @@ void SAL_CALL LayoutManager::windowShown( const lang::EventObject& aEvent ) thro { ReadGuard aReadLock( m_aLock ); Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); - bool bParentWindowVisible( m_bParentWindowVisible ); + bool bParentWindowVisible( m_bParentWindowVisible ); aReadLock.unlock(); Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); @@ -3005,14 +2941,10 @@ void SAL_CALL LayoutManager::windowShown( const lang::EventObject& aEvent ) thro void SAL_CALL LayoutManager::windowHidden( const lang::EventObject& aEvent ) throw( uno::RuntimeException ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); - - // Request to set docking area space again. - Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); - bool bParentWindowVisible( m_bParentWindowVisible ); + Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); + bool bParentWindowVisible( m_bParentWindowVisible ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ Reference< XInterface > xIfac( xContainerWindow, UNO_QUERY ); if ( xIfac == aEvent.Source ) @@ -3204,21 +3136,26 @@ void SAL_CALL LayoutManager::elementInserted( const ui::ConfigurationEvent& Even { ReadGuard aReadLock( m_aLock ); Reference< XFrame > xFrame( m_xFrame ); + Reference< ui::XUIConfigurationListener > xUICfgListener( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; aReadLock.unlock(); if ( xFrame.is() ) { ::rtl::OUString aElementType; ::rtl::OUString aElementName; + bool bRefreshLayout(false); parseResourceURL( Event.ResourceURL, aElementType, aElementName ); - if ( aElementName.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - uno::Reference< ui::XUIConfigurationListener > xUICfgListener( m_xToolbarManager, uno::UNO_QUERY ); if ( xUICfgListener.is() ) + { xUICfgListener->elementInserted( Event ); + bRefreshLayout = pToolbarManager->isLayoutDirty(); + } } - else if ( aElementName.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_MENUBAR )) + else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_MENUBAR )) { Reference< XUIElement > xUIElement = implts_findElement( Event.ResourceURL ); Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); @@ -3234,31 +3171,38 @@ void SAL_CALL LayoutManager::elementInserted( const ui::ConfigurationEvent& Even xElementSettings->updateSettings(); } } + + if ( bRefreshLayout ) + doLayout(); } } void SAL_CALL LayoutManager::elementRemoved( const ui::ConfigurationEvent& Event ) throw (uno::RuntimeException) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); Reference< frame::XFrame > xFrame( m_xFrame ); - Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); Reference< ui::XUIElement > xMenuBar( m_xMenuBar ); Reference< ui::XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr ); Reference< ui::XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; aReadLock.unlock(); - if ( xFrame.is() ) { ::rtl::OUString aElementType; ::rtl::OUString aElementName; - parseResourceURL( Event.ResourceURL, aElementType, aElementName ); - if ( aElementName.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) - { + bool bRefreshLayout(false); + + parseResourceURL( Event.ResourceURL, aElementType, aElementName ); + if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) + { if ( xToolbarManager.is() ) + { xToolbarManager->elementRemoved( Event ); + bRefreshLayout = pToolbarManager->isLayoutDirty(); + } } else { @@ -3296,7 +3240,7 @@ void SAL_CALL LayoutManager::elementRemoved( const ui::ConfigurationEvent& Event } // No settings anymore, element must be destroyed - if ( xContainerWindow.is() && bNoSettings ) + if ( xContainerWindow.is() && bNoSettings ) { if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) { @@ -3314,27 +3258,35 @@ void SAL_CALL LayoutManager::elementRemoved( const ui::ConfigurationEvent& Event } } } + + if ( bRefreshLayout ) + doLayout(); } } void SAL_CALL LayoutManager::elementReplaced( const ui::ConfigurationEvent& Event ) throw (uno::RuntimeException) { ReadGuard aReadLock( m_aLock ); - Reference< XFrame > xFrame( m_xFrame ); - Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY ); + Reference< XFrame > xFrame( m_xFrame ); + Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; aReadLock.unlock(); if ( xFrame.is() ) { ::rtl::OUString aElementType; ::rtl::OUString aElementName; + bool bRefreshLayout(false); parseResourceURL( Event.ResourceURL, aElementType, aElementName ); if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) - { - if ( xToolbarManager.is() ) + { + if ( xToolbarManager.is() ) + { xToolbarManager->elementReplaced( Event ); - } + bRefreshLayout = pToolbarManager->isLayoutDirty(); + } + } else { Reference< XUIElement > xUIElement = implts_findElement( Event.ResourceURL ); @@ -3356,6 +3308,9 @@ void SAL_CALL LayoutManager::elementReplaced( const ui::ConfigurationEvent& Even xElementSettings->updateSettings(); } } + + if ( bRefreshLayout ) + doLayout(); } } @@ -3384,11 +3339,11 @@ void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32 n case LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY: { - sal_Bool bValue = sal_Bool(); + sal_Bool bValue(sal_False); if (( aValue >>= bValue ) && bValue ) { ReadGuard aReadLock( m_aLock ); - uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY ); + Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; aReadLock.unlock(); @@ -3412,20 +3367,14 @@ void SAL_CALL LayoutManager::getFastPropertyValue( uno::Any& aValue, sal_Int32 n ::cppu::IPropertyArrayHelper& SAL_CALL LayoutManager::getInfoHelper() { - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; if( pInfoHelper == NULL ) { - // Ready for multithreading osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - // Control this pointer again, another instance can be faster then these! if( pInfoHelper == NULL ) { - // Define static member to give structure of properties to baseclass "OPropertySetHelper". uno::Sequence< beans::Property > aProperties; describeProperties( aProperties ); static ::cppu::OPropertyArrayHelper aInfoHelper( aProperties, sal_True ); @@ -3438,22 +3387,16 @@ void SAL_CALL LayoutManager::getFastPropertyValue( uno::Any& aValue, sal_Int32 n uno::Reference< beans::XPropertySetInfo > SAL_CALL LayoutManager::getPropertySetInfo() throw (uno::RuntimeException) { - // Optimize this method ! - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! static uno::Reference< beans::XPropertySetInfo >* pInfo = NULL; if( pInfo == NULL ) { - // Ready for multithreading osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - // Control this pointer again, another instance can be faster then these! + if( pInfo == NULL ) { - // Create structure of propertysetinfo for baseclass "OPropertySetHelper". - // (Use method "getInfoHelper()".) static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); - pInfo = &xInfo; + pInfo = &xInfo; } } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 45c53c98f3a9..e60c9d9b2128 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -785,13 +785,13 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) { if ( pEvent->GetId() == VCLEVENT_TOOLBOX_SELECT ) { - ::rtl::OUString aToolbarName; - ::rtl::OUString aCommand; + ::rtl::OUString aToolbarName; + ::rtl::OUString aCommand; ToolBox* pToolBox = getToolboxPtr( ((VclWindowEvent*)pEvent)->GetWindow() ); if ( pToolBox ) - { - aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); + { + aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); USHORT nId = pToolBox->GetCurItemId(); if ( nId > 0 ) aCommand = pToolBox->GetItemCommand( nId ); @@ -836,16 +836,16 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) ToolBox* pToolBox = getToolboxPtr( ((VclWindowEvent*)pEvent)->GetWindow() ); if ( pToolBox ) - { - ::rtl::OUString aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); + { + ::rtl::OUString aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); - if ( aToolbarName.getLength() > 0 ) - { + if ( aToolbarName.getLength() > 0 ) + { WriteGuard aWriteLock( m_aLock ); - m_bLayoutDirty = true; + m_bLayoutDirty = true; aWriteLock.unlock(); - m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); - } + m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); + } } } } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index e5870a48c07d..d11bb42b0d04 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -142,7 +142,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a //--------------------------------------------------------------------------------------------------------- // XLayoutManager forwards - //--------------------------------------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------------------------- ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > getElement( const ::rtl::OUString& aName ); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > > getElements(); sal_Bool dockWindow( const ::rtl::OUString& aName, ::com::sun::star::ui::DockingArea DockingArea, const ::com::sun::star::awt::Point& Pos ); @@ -161,32 +161,28 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a ::com::sun::star::awt::Point getElementPos( const ::rtl::OUString& aName ); //--------------------------------------------------------------------------------------------------------- - // UNO interfaces + // XInterface //--------------------------------------------------------------------------------------------------------- - - //--------------------------------------------------------------------------------------------------------- - // XInterface - //--------------------------------------------------------------------------------------------------------- - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XEventListener - //--------------------------------------------------------------------------------------------------------- + // XEventListener + //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XWindowListener - //--------------------------------------------------------------------------------------------------------- - virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); - virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); + // XWindowListener + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); + virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException ); virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XDockableWindowListener - //--------------------------------------------------------------------------------------------------------- + // XDockableWindowListener + //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); @@ -195,9 +191,9 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException); - //--------------------------------------------------------------------------------------------------------- - // XUIConfigurationListener - //--------------------------------------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------------------------- + // XUIConfigurationListener + //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); From 6b6d1a70cb424af2857dc01f278b42d672713f0b Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 20 Oct 2010 10:32:29 +0200 Subject: [PATCH 190/279] cws tlmath01: #i972# baseline to baseline alignment for Math --- .../registry/schema/org/openoffice/Office/Writer.xcs | 9 +++++++++ sfx2/inc/sfx2/ipclient.hxx | 1 + sfx2/source/view/ipclient.cxx | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs index 4a3c2c02c396..ea806e58f320 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs @@ -1512,6 +1512,15 @@ Contains miscellaneous settings. + + + + TL + Automatically align the baseline of Math objects with the baseline of the surrounding text. + + + true + diff --git a/sfx2/inc/sfx2/ipclient.hxx b/sfx2/inc/sfx2/ipclient.hxx index e0708f1f061d..960c6629b8d2 100644 --- a/sfx2/inc/sfx2/ipclient.hxx +++ b/sfx2/inc/sfx2/ipclient.hxx @@ -101,6 +101,7 @@ public: // used in Writer // Rectangle PixelObjVisAreaToLogic( const Rectangle & rObjRect ) const; // Rectangle LogicObjAreaToPixel( const Rectangle & rRect ) const; + virtual void FormatChanged(); // object format was changed (used for StarMath formulas aligning) }; #endif diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 328d88d8b2b9..997cb584f83d 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -220,6 +220,7 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const document::EventObject& a if ( m_pClient && aEvent.EventName.equalsAscii("OnVisAreaChanged") && m_nAspect != embed::Aspects::MSOLE_ICON ) { + m_pClient->FormatChanged(); // for Writer when format of the object is changed with the area m_pClient->ViewChanged(); m_pClient->Invalidate(); } @@ -1082,6 +1083,11 @@ void SfxInPlaceClient::MakeVisible() // dummy implementation } +void SfxInPlaceClient::FormatChanged() +{ + // dummy implementation +} + void SfxInPlaceClient::DeactivateObject() { if ( GetObject().is() ) From 2a1373ec52ac6e5967a9225700abd3917b6b2e98 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 20 Oct 2010 14:36:33 +0200 Subject: [PATCH 191/279] sb131: #i114962# always building test/deployment/boxt reveals dependency on filter --- desktop/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index 36d3ca86246f..3937ff47072f 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -1,4 +1,4 @@ -dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh NULL +dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter NULL dt desktop usr1 - all dt_mkout NULL dt desktop\inc nmake - all dt_inc NULL dt desktop\prj get - all dt_prj NULL From 423ba9d350fff1071501136e3454220eb5d781cc Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 20 Oct 2010 15:24:42 +0200 Subject: [PATCH 192/279] sb131: #i114962# fix component factory so it can be live deployed --- desktop/test/deployment/boxt/boxt.cxx | 91 ++++++------------ .../deployment/passive/passive_native.cxx | 95 ++++++------------- 2 files changed, 56 insertions(+), 130 deletions(-) diff --git a/desktop/test/deployment/boxt/boxt.cxx b/desktop/test/deployment/boxt/boxt.cxx index 51c223dedcd4..245617a2ad12 100644 --- a/desktop/test/deployment/boxt/boxt.cxx +++ b/desktop/test/deployment/boxt/boxt.cxx @@ -35,8 +35,6 @@ #include "com/sun/star/frame/XDispatchProvider.hpp" #include "com/sun/star/frame/XStatusListener.hpp" #include "com/sun/star/lang/XServiceInfo.hpp" -#include "com/sun/star/lang/XSingleComponentFactory.hpp" -#include "com/sun/star/uno/Any.hxx" #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/RuntimeException.hpp" @@ -45,7 +43,6 @@ #include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/util/URL.hpp" #include "cppuhelper/factory.hxx" -#include "cppuhelper/implbase1.hxx" #include "cppuhelper/implbase3.hxx" #include "cppuhelper/implementationentry.hxx" #include "cppuhelper/weak.hxx" @@ -61,21 +58,6 @@ namespace { namespace css = com::sun::star; -namespace service { - -rtl::OUString getImplementationName() { - return rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.test.deployment.boxt")); -} - -css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { - rtl::OUString name( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.test.deployment.boxt")); - return css::uno::Sequence< rtl::OUString >(&name, 1); -} - -} - class Service: public cppu::WeakImplHelper3< css::lang::XServiceInfo, css::frame::XDispatchProvider, @@ -83,14 +65,24 @@ class Service: private boost::noncopyable { public: - Service() {} + static css::uno::Reference< css::uno::XInterface > SAL_CALL static_create( + css::uno::Reference< css::uno::XComponentContext > const &) + SAL_THROW((css::uno::Exception)) + { return static_cast< cppu::OWeakObject * >(new Service); } + + static rtl::OUString SAL_CALL static_getImplementationName(); + + static css::uno::Sequence< rtl::OUString > SAL_CALL + static_getSupportedServiceNames(); private: + Service() {} + virtual ~Service() {} virtual rtl::OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException) - { return service::getImplementationName(); } + { return static_getImplementationName(); } virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) throw (css::uno::RuntimeException) @@ -98,7 +90,7 @@ private: virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) - { return service::getSupportedServiceNames(); } + { return static_getSupportedServiceNames(); } virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( css::util::URL const &, rtl::OUString const &, sal_Int32) @@ -128,6 +120,17 @@ private: {} }; +rtl::OUString Service::static_getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.test.deployment.boxt")); +} + +css::uno::Sequence< rtl::OUString > Service::static_getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.test.deployment.boxt")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > Service::queryDispatches( css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) @@ -155,50 +158,10 @@ void Service::dispatch( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test"))); } -class Factory: - public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, - private boost::noncopyable -{ -public: - Factory() {} - -private: - virtual ~Factory() {} - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithContext( - css::uno::Reference< css::uno::XComponentContext > const &) - throw (css::uno::Exception, css::uno::RuntimeException) - { return static_cast< cppu::OWeakObject * >(new Service); } - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any > const &, - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) - { return createInstanceWithContext(Context); } -}; - -css::uno::Reference< css::uno::XInterface > SAL_CALL dummy( - css::uno::Reference< css::uno::XComponentContext > const &) - SAL_THROW((css::uno::Exception)) -{ - OSL_ASSERT(false); - return css::uno::Reference< css::uno::XInterface >(); -} - -css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL -createFactory( - cppu::ComponentFactoryFunc, rtl::OUString const &, - css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) - SAL_THROW(()) -{ - return new Factory; -} - static cppu::ImplementationEntry const services[] = { - { &dummy, &service::getImplementationName, - &service::getSupportedServiceNames, &createFactory, 0, 0 }, + { &Service::static_create, &Service::static_getImplementationName, + &Service::static_getSupportedServiceNames, + &cppu::createSingleComponentFactory, 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; diff --git a/desktop/test/deployment/passive/passive_native.cxx b/desktop/test/deployment/passive/passive_native.cxx index 3c29174ffcb0..66a49251d81c 100644 --- a/desktop/test/deployment/passive/passive_native.cxx +++ b/desktop/test/deployment/passive/passive_native.cxx @@ -44,8 +44,6 @@ #include "com/sun/star/lang/XComponent.hpp" #include "com/sun/star/lang/XMultiComponentFactory.hpp" #include "com/sun/star/lang/XServiceInfo.hpp" -#include "com/sun/star/lang/XSingleComponentFactory.hpp" -#include "com/sun/star/uno/Any.hxx" #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/RuntimeException.hpp" @@ -54,7 +52,6 @@ #include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/util/URL.hpp" #include "cppuhelper/factory.hxx" -#include "cppuhelper/implbase1.hxx" #include "cppuhelper/implbase3.hxx" #include "cppuhelper/implementationentry.hxx" #include "cppuhelper/weak.hxx" @@ -68,23 +65,6 @@ namespace { namespace css = com::sun::star; -namespace service { - -rtl::OUString getImplementationName() { - return rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.test.deployment.passive_native")); -} - -css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { - rtl::OUString name( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.test.deployment.passive_native")); - return css::uno::Sequence< rtl::OUString >(&name, 1); -} - -} - class Service: public cppu::WeakImplHelper3< css::lang::XServiceInfo, css::frame::XDispatchProvider, @@ -92,15 +72,25 @@ class Service: private boost::noncopyable { public: + static css::uno::Reference< css::uno::XInterface > SAL_CALL static_create( + css::uno::Reference< css::uno::XComponentContext > const & xContext) + SAL_THROW((css::uno::Exception)) + { return static_cast< cppu::OWeakObject * >(new Service(xContext)); } + + static rtl::OUString SAL_CALL static_getImplementationName(); + + static css::uno::Sequence< rtl::OUString > SAL_CALL + static_getSupportedServiceNames(); + +private: Service(css::uno::Reference< css::uno::XComponentContext > const & context): context_(context) { OSL_ASSERT(context.is()); } -private: virtual ~Service() {} virtual rtl::OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException) - { return service::getImplementationName(); } + { return static_getImplementationName(); } virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) throw (css::uno::RuntimeException) @@ -108,7 +98,7 @@ private: virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) - { return service::getSupportedServiceNames(); } + { return static_getSupportedServiceNames(); } virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( css::util::URL const &, rtl::OUString const &, sal_Int32) @@ -140,6 +130,19 @@ private: css::uno::Reference< css::uno::XComponentContext > context_; }; +rtl::OUString Service::static_getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.test.deployment.passive_native")); +} + +css::uno::Sequence< rtl::OUString > Service::static_getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.test.deployment.passive_native")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > Service::queryDispatches( css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) @@ -190,50 +193,10 @@ void Service::dispatch( box, css::uno::UNO_QUERY_THROW)->dispose(); } -class Factory: - public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, - private boost::noncopyable -{ -public: - Factory() {} - -private: - virtual ~Factory() {} - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithContext( - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) - { return static_cast< cppu::OWeakObject * >(new Service(Context)); } - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any > const &, - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) - { return createInstanceWithContext(Context); } -}; - -css::uno::Reference< css::uno::XInterface > SAL_CALL dummy( - css::uno::Reference< css::uno::XComponentContext > const &) - SAL_THROW((css::uno::Exception)) -{ - OSL_ASSERT(false); - return css::uno::Reference< css::uno::XInterface >(); -} - -css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL -createFactory( - cppu::ComponentFactoryFunc, rtl::OUString const &, - css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) - SAL_THROW(()) -{ - return new Factory; -} - static cppu::ImplementationEntry const services[] = { - { &dummy, &service::getImplementationName, - &service::getSupportedServiceNames, &createFactory, 0, 0 }, + { &Service::static_create, &Service::static_getImplementationName, + &Service::static_getSupportedServiceNames, + &cppu::createSingleComponentFactory, 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; From 69520f9b1e794addf916a64857b299da9792fb43 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 20 Oct 2010 18:22:44 +0200 Subject: [PATCH 193/279] dockingwindows: Added missing methods to ToolbarLayoutManager. Adapted methods in LayoutManager --- .../source/layoutmanager/layoutmanager.cxx | 176 ++---- .../layoutmanager/toolbarlayoutmanager.cxx | 553 +++++++++++------- .../layoutmanager/toolbarlayoutmanager.hxx | 39 +- 3 files changed, 398 insertions(+), 370 deletions(-) diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index dcf25f22781e..3d39c3218246 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -1836,7 +1836,7 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - xUIElement = pToolbarManager->getElement( aName ); + xUIElement = pToolbarManager->getToolbar( aName ); } return xUIElement; @@ -1854,7 +1854,7 @@ throw (uno::RuntimeException) Sequence< Reference< ui::XUIElement > > aSeq; if ( pToolbarManager ) - aSeq = pToolbarManager->getElements(); + aSeq = pToolbarManager->getToolbars(); sal_Int32 nSize = aSeq.getLength(); sal_Int32 nMenuBarIndex(-1); @@ -2058,9 +2058,8 @@ throw (RuntimeException) ::sal_Bool SAL_CALL LayoutManager::dockAllWindows( ::sal_Int16 /*nElementType*/ ) throw (uno::RuntimeException) { - bool bResult( false ); - ReadGuard aReadLock( m_aLock ); + bool bResult( false ); uno::Reference< uno::XInterface > xThis( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; aReadLock.unlock(); @@ -2073,145 +2072,66 @@ throw (RuntimeException) sal_Bool SAL_CALL LayoutManager::floatWindow( const ::rtl::OUString& aName ) throw (RuntimeException) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - UIElement aUIElement = impl_findElement( aName ); - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( aUIElement.m_xUIElement.is() ) + bool bResult( false ); + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - try - { - Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xWindow.is() && xDockWindow.is() ) - { - if ( !xDockWindow->isFloating() ) - { - xDockWindow->setFloatingMode( sal_True ); - return sal_True; - } - } - } - catch ( DisposedException& ) - { - } - } + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); - return sal_False; + if ( pToolbarManager ) + bResult = pToolbarManager->floatToolbar( aName ); + } + return bResult; } -::sal_Bool SAL_CALL LayoutManager::lockWindow( const ::rtl::OUString& rResourceURL ) +::sal_Bool SAL_CALL LayoutManager::lockWindow( const ::rtl::OUString& aName ) throw (uno::RuntimeException) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - UIElement aUIElement = impl_findElement( rResourceURL ); - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( aUIElement.m_xUIElement.is() ) + bool bResult( false ); + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - try - { - Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() && xDockWindow.is() && !xDockWindow->isFloating() ) - { - aUIElement.m_aDockedData.m_bLocked = sal_True; - implts_writeWindowStateData( rResourceURL, aUIElement ); - xDockWindow->lock(); + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); - // Write back lock state - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aUIElement.m_aName ) - rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - doLayout(); - return sal_True; - } - } - catch ( DisposedException& ) - { - } + if ( pToolbarManager ) + bResult = pToolbarManager->lockToolbar( aName ); } - - return sal_False; + return bResult; } -::sal_Bool SAL_CALL LayoutManager::unlockWindow( const ::rtl::OUString& rResourceURL ) +::sal_Bool SAL_CALL LayoutManager::unlockWindow( const ::rtl::OUString& aName ) throw (uno::RuntimeException) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - UIElement aUIElement = impl_findElement( rResourceURL ); - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( aUIElement.m_xUIElement.is() ) + bool bResult( false ); + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - try - { - Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() && xDockWindow.is() && !xDockWindow->isFloating() ) - { - aUIElement.m_aDockedData.m_bLocked = sal_False; - implts_writeWindowStateData( rResourceURL, aUIElement ); - xDockWindow->unlock(); + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); - // Write back lock state - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = LayoutManager::impl_findElement( aUIElement.m_aName ); - if ( rUIElement.m_aName == aUIElement.m_aName ) - rUIElement.m_aDockedData.m_bLocked = aUIElement.m_aDockedData.m_bLocked; - aWriteLock.unlock(); - - doLayout(); - return sal_True; - } - } - catch ( DisposedException& ) - { - } + if ( pToolbarManager ) + bResult = pToolbarManager->unlockToolbar( aName ); } - - return sal_False; + return bResult; } void SAL_CALL LayoutManager::setElementSize( const ::rtl::OUString& aName, const awt::Size& aSize ) throw (RuntimeException) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - UIElement aUIElement = impl_findElement( aName ); - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - if ( aUIElement.m_xUIElement.is() ) + if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { - try - { - Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), UNO_QUERY ); - Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); - if ( xWindow.is() && xWindow2.is() && xDockWindow.is() && aUIElement.m_bFloating ) - { - xWindow2->setOutputSize( aSize ); - implts_writeNewStateData( aName, xWindow ); - } - } - catch ( DisposedException& ) - { - } + if ( pToolbarManager ) + pToolbarManager->setToolbarSize( aName, aSize ); } } @@ -2226,7 +2146,7 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - pToolbarManager->setElementPos( aName, aPos ); + pToolbarManager->setToolbarPos( aName, aPos ); } } @@ -2241,7 +2161,7 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - pToolbarManager->setElementPosSize( aName, aPos, aSize ); + pToolbarManager->setToolbarPosSize( aName, aPos, aSize ); } } @@ -2302,7 +2222,7 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - return pToolbarManager->isElementVisible( aName ); + return pToolbarManager->isToolbarVisible( aName ); } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) { @@ -2327,7 +2247,7 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - return pToolbarManager->isElementFloating( aName ); + return pToolbarManager->isToolbarFloating( aName ); } return sal_False; @@ -2344,7 +2264,7 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - return pToolbarManager->isElementDocked( aName ); + return pToolbarManager->isToolbarDocked( aName ); } return sal_False; @@ -2361,7 +2281,7 @@ throw (uno::RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - pToolbarManager->isElementLocked( aName ); + pToolbarManager->isToolbarLocked( aName ); } return sal_False; @@ -2378,7 +2298,7 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - return pToolbarManager->getElementSize( aName ); + return pToolbarManager->getToolbarSize( aName ); } return awt::Size(); @@ -2395,7 +2315,7 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - return pToolbarManager->getElementPos( aName ); + return pToolbarManager->getToolbarPos( aName ); } return awt::Point(); diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index e60c9d9b2128..ccaadab2a2bb 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -144,32 +144,26 @@ void SAL_CALL ToolbarLayoutManager::disposing( const lang::EventObject& aEvent ) ::com::sun::star::awt::Rectangle ToolbarLayoutManager::getDockingArea() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); Rectangle aNewDockingArea( m_aDockingArea ); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( isLayoutDirty() ) aNewDockingArea = implts_calcDockingArea(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteLock.lock(); m_aDockingArea = aNewDockingArea; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ return putRectangleValueToAWT(aNewDockingArea); } void ToolbarLayoutManager::setDockingArea( const awt::Rectangle& rDockingArea ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_aDockingArea = putAWTToRectangle( rDockingArea ); m_bLayoutDirty = true; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ implts_setDockingAreaWindowSizes( rDockingArea ); } @@ -258,7 +252,6 @@ bool ToolbarLayoutManager::isLayoutDirty() void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); if ( m_bLayoutInProgress ) @@ -266,7 +259,6 @@ void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) m_bLayoutInProgress = true; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ // Retrieve row/column dependent data from all docked user-interface elements for ( sal_Int32 i = 0; i < DOCKINGAREAS_COUNT; i++ ) @@ -284,35 +276,28 @@ void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) } } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteLock.lock(); m_bLayoutDirty = false; m_bLayoutInProgress = false; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } bool ToolbarLayoutManager::implts_isParentWindowVisible() const { bool bVisible( false ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); if ( m_xContainerWindow.is() ) bVisible = m_xContainerWindow->isVisible(); - aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ return bVisible; } Rectangle ToolbarLayoutManager::implts_calcDockingArea() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); UIElementVector aWindowVector( m_aUIElements ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ Rectangle aBorderSpace; sal_Int32 nCurrRowColumn( 0 ); @@ -411,7 +396,6 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea() void ToolbarLayoutManager::reset() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr = m_xModuleCfgMgr; uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr = m_xDocCfgMgr; @@ -419,7 +403,6 @@ void ToolbarLayoutManager::reset() m_xDocCfgMgr.clear(); m_bComponentAttached = false; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ destroyToolbars(); resetDockingArea(); @@ -435,7 +418,6 @@ void ToolbarLayoutManager::attach( if ( m_xFrame.is() && m_xFrame != xFrame ) reset(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_xFrame = xFrame; m_xModuleCfgMgr = xModuleCfgMgr; @@ -443,7 +425,6 @@ void ToolbarLayoutManager::attach( m_xPersistentWindowState = xPersistentWindowState; m_bComponentAttached = true; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } void ToolbarLayoutManager::createStaticToolbars() @@ -502,71 +483,70 @@ bool ToolbarLayoutManager::createToolbar( const ::rtl::OUString& rResourceURL ) bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) { + const rtl::OUString aAddonTbResourceName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )); + UIElementVector::iterator pIter; uno::Reference< lang::XComponent > xComponent; - bool bMustBeDestroyed( false ); + bool bMustBeDestroyed( rResourceURL.indexOf( aAddonTbResourceName ) != 0 ); bool bMustBeSorted( false ); bool bNotify( false ); bool bMustLayouted( false ); - rtl::OUString aAddonTbResourceName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) { if ( pIter->m_aName == rResourceURL ) { xComponent.set( pIter->m_xUIElement, uno::UNO_QUERY ); - uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); - if ( xUIElement.is() ) - { - uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); - - if ( rResourceURL.indexOf( aAddonTbResourceName ) != 0 ) - { - try - { - if ( xWindow.is() ) - xWindow->removeWindowListener( uno::Reference< awt::XWindowListener >( - static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); - } - catch( uno::Exception& ) - { - } - - try - { - if ( xDockWindow.is() ) - xDockWindow->removeDockableWindowListener( uno::Reference< awt::XDockableWindowListener >( - static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); - } - catch ( uno::Exception& ) - { - } - - bMustBeDestroyed = true; - } - else - { - pIter->m_bVisible = sal_False; - xWindow->setVisible( sal_False ); - bNotify = true; - } - - if ( !xDockWindow->isFloating() ) - bMustLayouted = true; - if ( bMustBeDestroyed ) - pIter->m_xUIElement.clear(); - - bMustBeSorted = true; - } - break; + if ( bMustBeDestroyed ) + pIter->m_xUIElement.clear(); + else + pIter->m_bVisible = false; + break; } } aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + uno::Reference< ui::XUIElement > xUIElement( xComponent, uno::UNO_QUERY ); + if ( xUIElement.is() ) + { + uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + + if ( bMustBeDestroyed ) + { + try + { + if ( xWindow.is() ) + xWindow->removeWindowListener( uno::Reference< awt::XWindowListener >( + static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); + } + catch( uno::Exception& ) + { + } + + try + { + if ( xDockWindow.is() ) + xDockWindow->removeDockableWindowListener( uno::Reference< awt::XDockableWindowListener >( + static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); + } + catch ( uno::Exception& ) + { + } + } + else + { + if ( xWindow.is() ) + xWindow->setVisible( sal_False ); + bNotify = true; + } + + if ( !xDockWindow->isFloating() ) + bMustLayouted = true; + bMustBeSorted = true; + } if ( bMustBeDestroyed ) { @@ -655,11 +635,9 @@ bool ToolbarLayoutManager::hideToolbar( const ::rtl::OUString& rResourceURL ) void ToolbarLayoutManager::refreshToolbarsVisibility() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); UIElementVector aUIElementVector = m_aUIElements; aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ bool bLayoutDirty( false ); UIElementVector::iterator pIter; @@ -685,11 +663,9 @@ void ToolbarLayoutManager::setFloatingToolbarsVisibility( bool bVisible ) { UIElementVector aUIElementVector; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); aUIElementVector = m_aUIElements; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ UIElementVector::iterator pIter; vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -713,12 +689,10 @@ void ToolbarLayoutManager::setVisible( bool bVisible ) { UIElementVector aUIElementVector; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); aUIElementVector = m_aUIElements; m_bLayoutDirty = true; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ UIElementVector::iterator pIter; @@ -738,10 +712,95 @@ void ToolbarLayoutManager::setVisible( bool bVisible ) } bool ToolbarLayoutManager::dockToolbar( - const ::rtl::OUString& /*rResourceURL*/, - ::com::sun::star::ui::DockingArea /*eDockingArea*/, - const ::com::sun::star::awt::Point& /*aPos*/ ) + const ::rtl::OUString& rResourceURL, + ::com::sun::star::ui::DockingArea eDockingArea, + const ::com::sun::star::awt::Point& aPos ) { + UIElement aUIElement = implts_findToolbar( rResourceURL ); + + if ( aUIElement.m_xUIElement.is() ) + { + try + { + uno::Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xDockWindow.is() ) + { + if ( eDockingArea != ui::DockingArea_DOCKINGAREA_DEFAULT ) + aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( eDockingArea ); + + if (( aPos.X != SAL_MAX_INT32 ) && ( aPos.Y != SAL_MAX_INT32 )) + aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); + + if ( !xDockWindow->isFloating() ) + { + Window* pWindow( 0 ); + ToolBox* pToolBox( 0 ); + + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + pToolBox = (ToolBox *)pWindow; + + // We have to set the alignment of the toolbox. It's possible that the toolbox is moved from a + // horizontal to a vertical docking area! + pToolBox->SetAlign( ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea )); + } + } + + if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) || + ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + { + // Docking on its default position without a preset position - + // we have to find a good place for it. + ::Size aSize; + + vos::OGuard aGuard( Application::GetSolarMutex() ); + { + if ( pToolBox ) + aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) ); + else + aSize = pWindow->GetSizePixel(); + } + + ::Point aPixelPos; + ::Point aDockPos; + implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea, + aSize, + aDockPos, + aPixelPos ); + aUIElement.m_aDockedData.m_aPos = aDockPos; + } + } + + implts_setToolbar( aUIElement ); + + if ( xDockWindow->isFloating() ) + { + // Will call toggle floating mode which will do the rest! + xWindow->setVisible( sal_False ); + xDockWindow->setFloatingMode( sal_False ); + xWindow->setVisible( sal_True ); + } + else + { + implts_writeWindowStateData( aUIElement ); + implts_sortUIElements(); + + if ( aUIElement.m_bVisible ) + implts_setLayoutDirty(); + } + + return true; + } + } + catch ( lang::DisposedException& ) + { + } + } + return false; } @@ -790,7 +849,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) ToolBox* pToolBox = getToolboxPtr( ((VclWindowEvent*)pEvent)->GetWindow() ); if ( pToolBox ) - { + { aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); USHORT nId = pToolBox->GetCurItemId(); if ( nId > 0 ) @@ -806,7 +865,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) { - if ( pIter->m_aType.equalsAscii( "toolbar" ) && pIter->m_xUIElement.is() ) + if ( pIter->m_xUIElement.is() ) { uno::Reference< ui::XUIFunctionListener > xListener( pIter->m_xUIElement, uno::UNO_QUERY ); if ( xListener.is() ) @@ -841,11 +900,9 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) if ( aToolbarName.getLength() > 0 ) { - WriteGuard aWriteLock( m_aLock ); - m_bLayoutDirty = true; - aWriteLock.unlock(); - m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); - } + implts_setLayoutDirty(); + m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); + } } } } @@ -855,14 +912,12 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) void ToolbarLayoutManager::resetDockingArea() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Reference< awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; uno::Reference< awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; uno::Reference< awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; uno::Reference< awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( xTopDockingWindow.is() ) xTopDockingWindow->setPosSize( 0, 0, 0, 0, awt::PosSize::POSSIZE ); @@ -906,12 +961,9 @@ void ToolbarLayoutManager::setParentWindow( void ToolbarLayoutManager::setDockingAreaOffsets( const ::Rectangle aOffsets ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_aDockingAreaOffsets = aOffsets; m_bLayoutDirty = true; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } rtl::OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const @@ -929,7 +981,6 @@ rtl::OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal void ToolbarLayoutManager::implts_createAddonsToolBars() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); if ( !m_pAddonOptions ) m_pAddonOptions = new AddonsOptions; @@ -937,7 +988,6 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); uno::Reference< frame::XFrame > xFrame( m_xFrame ); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ uno::Reference< frame::XModel > xModel( impl_getModelFromFrame( xFrame )); if ( implts_isPreviewModel( xModel )) @@ -1046,7 +1096,6 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() void ToolbarLayoutManager::implts_createCustomToolBars() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); if ( !m_bComponentAttached ) return; @@ -1057,7 +1106,6 @@ void ToolbarLayoutManager::implts_createCustomToolBars() uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr, uno::UNO_QUERY ); uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr, uno::UNO_QUERY ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( xFrame.is() ) { @@ -1081,7 +1129,6 @@ void ToolbarLayoutManager::implts_createCustomToolBars() void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); if ( !m_xPersistentWindowState.is() || !m_xFrame.is() || !m_bComponentAttached ) @@ -1091,7 +1138,6 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( implts_isPreviewModel( impl_getModelFromFrame( xFrame ))) return; @@ -1196,31 +1242,16 @@ void ToolbarLayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbx void ToolbarLayoutManager::implts_reparentToolbars() { - UIElementVector aUIElementVector; - uno::Reference< awt::XWindow > xTopDockWindow; - uno::Reference< awt::XWindow > xBottomDockWindow; - uno::Reference< awt::XWindow > xLeftDockWindow; - uno::Reference< awt::XWindow > xRightDockWindow; - uno::Reference< awt::XWindow2 > xContainerWindow; - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); - aUIElementVector = m_aUIElements; - xTopDockWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; - xBottomDockWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; - xLeftDockWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; - xRightDockWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; - xContainerWindow = m_xContainerWindow; + UIElementVector aUIElementVector = m_aUIElements; + Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + Window* pTopDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); + Window* pBottomDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); + Window* pLeftDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); + Window* pRightDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] ); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ vos::OGuard aGuard( Application::GetSolarMutex() ); - Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - Window* pTopDockWindow = VCLUnoHelper::GetWindow( xTopDockWindow ); - Window* pBottomDockWindow = VCLUnoHelper::GetWindow( xBottomDockWindow ); - Window* pLeftDockWindow = VCLUnoHelper::GetWindow( xLeftDockWindow ); - Window* pRightDockWindow = VCLUnoHelper::GetWindow( xRightDockWindow ); - if ( pContainerWindow ) { UIElementVector::iterator pIter; @@ -1269,8 +1300,6 @@ void ToolbarLayoutManager::implts_reparentToolbars() void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, bool& bNotify, uno::Reference< ui::XUIElement >& rUIElement ) { - bNotify = false; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Reference< frame::XFrame > xFrame( m_xFrame ); @@ -1279,6 +1308,8 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b aReadLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + bNotify = false; + if ( !xFrame.is() || !xContainerWindow.is() ) return; @@ -1351,13 +1382,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b implts_sortUIElements(); if ( bVisible ) - { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_bLayoutDirty = true; - bNotify = true; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - } + implts_setLayoutDirty(); } } @@ -1858,7 +1883,6 @@ UIElement ToolbarLayoutManager::implts_findToolbar( const rtl::OUString& aName ) UIElement aEmptyElement; UIElementVector::iterator pIter; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) { @@ -1867,7 +1891,6 @@ UIElement ToolbarLayoutManager::implts_findToolbar( const rtl::OUString& aName ) } return aEmptyElement; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } UIElement ToolbarLayoutManager::implts_findToolbar( @@ -1876,7 +1899,6 @@ UIElement ToolbarLayoutManager::implts_findToolbar( UIElement aToolbar; UIElementVector::const_iterator pIter; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) { @@ -1890,11 +1912,47 @@ UIElement ToolbarLayoutManager::implts_findToolbar( } } } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ return aToolbar; } +uno::Reference< awt::XWindow > ToolbarLayoutManager::implts_getXWindow( const ::rtl::OUString& aName ) +{ + UIElementVector::iterator pIter; + uno::Reference< awt::XWindow > xWindow; + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) + { + xWindow = uno::Reference< awt::XWindow >( pIter->m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + break; + } + } + + return xWindow; +} + +Window* ToolbarLayoutManager::implts_getWindow( const ::rtl::OUString& aName ) +{ + UIElementVector::iterator pIter; + Window* pWindow( 0 ); + + ReadGuard aReadLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) + { + uno::Reference< awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + pWindow = VCLUnoHelper::GetWindow( xWindow ); + break; + } + } + + return pWindow; +} + bool ToolbarLayoutManager::implts_insertToolbar( const UIElement& rUIElement ) { UIElement aTempData; @@ -2813,6 +2871,12 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( } } +void ToolbarLayoutManager::implts_setLayoutDirty() +{ + WriteGuard aWriteLock( m_aLock ); + m_bLayoutDirty = true; +} + ::Rectangle ToolbarLayoutManager::implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ) { ::Rectangle aRect( rRect ); @@ -3873,13 +3937,11 @@ throw (uno::RuntimeException) implts_sortUIElements(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteLock.lock(); m_bDockingInProgress = sal_False; m_bLayoutDirty = !bStartDockFloated || !bFloating; bool bNotify = m_bLayoutDirty; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( bNotify ) m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); @@ -3940,17 +4002,15 @@ throw (uno::RuntimeException) sal_Bool bDockingInProgress( sal_False ); UIElement aUIDockingElement; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); bDockingInProgress = m_bDockingInProgress; if ( bDockingInProgress ) aUIDockingElement = m_aDockUIElement; aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ Window* pWindow( 0 ); ToolBox* pToolBox( 0 ); - uno::Reference< css::awt::XWindow2 > xWindow; + uno::Reference< awt::XWindow2 > xWindow; { vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -3971,12 +4031,7 @@ throw (uno::RuntimeException) aUIDockingElement.m_bFloating = !aUIDockingElement.m_bFloating; aUIDockingElement.m_bUserActive = sal_True; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - WriteGuard aWriteLock( m_aLock ); - m_bLayoutDirty = true; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - + implts_setLayoutDirty(); if ( aUIDockingElement.m_bFloating ) { vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -4041,21 +4096,16 @@ throw (uno::RuntimeException) { pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); ::Size aSize = pToolBox->CalcWindowSizePixel( 1 ); - css::awt::Rectangle aRect = xWindow->getPosSize(); + awt::Rectangle aRect = xWindow->getPosSize(); xWindow->setPosSize( aRect.X, aRect.Y, 0, 0, css::awt::PosSize::POS ); xWindow->setOutputSize( AWTSize( aSize ) ); } } - aWriteLock.lock(); - UIElement& rUIElement = impl_findToolbar( aUIDockingElement.m_aName ); - if ( rUIElement.m_aName == aUIDockingElement.m_aName ) - rUIElement = aUIDockingElement; - m_bLayoutDirty = true; - aWriteLock.unlock(); - + implts_setToolbar( aUIDockingElement ); implts_writeWindowStateData( aUIDockingElement ); implts_sortUIElements(); + implts_setLayoutDirty(); } } else @@ -4117,7 +4167,7 @@ throw (uno::RuntimeException) { // custom toolbar must be directly created, shown and layouted! createToolbar( rEvent.ResourceURL ); - uno::Reference< ui::XUIElement > xUIElement = getElement( rEvent.ResourceURL ); + uno::Reference< ui::XUIElement > xUIElement = getToolbar( rEvent.ResourceURL ); if ( xUIElement.is() ) { ::rtl::OUString aUIName; @@ -4161,13 +4211,11 @@ throw (uno::RuntimeException) ::rtl::OUString aElementType; ::rtl::OUString aElementName; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Reference< awt::XWindow > xContainerWindow( m_xContainerWindow, uno::UNO_QUERY ); uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr ); uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ UIElement aUIElement = implts_findToolbar( rEvent.ResourceURL ); uno::Reference< ui::XUIElementSettings > xElementSettings( aUIElement.m_xUIElement, uno::UNO_QUERY ); @@ -4245,116 +4293,142 @@ throw (uno::RuntimeException) } } -//--------------------------------------------------------------------------------------------------------- -// XLayoutManager forwards -//--------------------------------------------------------------------------------------------------------- -uno::Reference< ui::XUIElement > ToolbarLayoutManager::getElement( const ::rtl::OUString& aName ) +uno::Reference< ui::XUIElement > ToolbarLayoutManager::getToolbar( const ::rtl::OUString& aName ) { return implts_findToolbar( aName ).m_xUIElement; } -uno::Sequence< uno::Reference< ui::XUIElement > > ToolbarLayoutManager::getElements() +uno::Sequence< uno::Reference< ui::XUIElement > > ToolbarLayoutManager::getToolbars() { uno::Sequence< uno::Reference< ui::XUIElement > > aSeq; + + ReadGuard aReadLock( m_aLock ); + sal_uInt32 nCount = m_aUIElements.size(); + if ( nCount > 0 ) + { + nCount = 0; + UIElementVector::iterator pIter; + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + if ( pIter->m_xUIElement.is() ) + { + ++nCount; + aSeq.realloc( nCount ); + aSeq[nCount-1] = pIter->m_xUIElement; + } + } + } + aReadLock.unlock(); + return aSeq; } -::sal_Bool ToolbarLayoutManager::dockAllWindows( ::sal_Int16 /*nElementType*/ ) -{ - return false; -} - -sal_Bool ToolbarLayoutManager::floatWindow( const ::rtl::OUString& /*aName*/ ) -{ - return false; -} - -::sal_Bool ToolbarLayoutManager::lockWindow( const ::rtl::OUString& /*ResourceURL*/ ) -{ - return false; -} - -::sal_Bool ToolbarLayoutManager::unlockWindow( const ::rtl::OUString& /*ResourceURL*/ ) -{ - return false; -} - -void ToolbarLayoutManager::setElementSize( const ::rtl::OUString& /*aName*/, const awt::Size& /*aSize*/ ) -{ -} - -void ToolbarLayoutManager::setElementPos( const ::rtl::OUString& /*aName*/, const awt::Point& /*aPos*/ ) -{ -} - -void ToolbarLayoutManager::setElementPosSize( const ::rtl::OUString& /*aName*/, const awt::Point& /*aPos*/, const awt::Size& /*aSize*/ ) -{ -} - -sal_Bool ToolbarLayoutManager::isElementVisible( const ::rtl::OUString& rResourceURL ) +bool ToolbarLayoutManager::floatToolbar( const ::rtl::OUString& rResourceURL ) { UIElement aUIElement = implts_findToolbar( rResourceURL ); if ( aUIElement.m_xUIElement.is() ) { - uno::Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - - if( xWindow2.is() ) - return xWindow2->isVisible(); - } - - return false; -} - -sal_Bool ToolbarLayoutManager::isElementFloating( const ::rtl::OUString& rResourceURL ) -{ - UIElement aUIElement = implts_findToolbar( rResourceURL ); - if ( aUIElement.m_xUIElement.is() ) - { - if ( aUIElement.m_bFloating ) + try { - uno::Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XWindow2 > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xWindow.is() && xWindow->isVisible() && xDockWindow.is() && !xDockWindow->isFloating() ) + { + aUIElement.m_aDockedData.m_bLocked = true; + implts_writeWindowStateData( aUIElement ); + xDockWindow->setFloatingMode( true ); - if( xWindow2.is() ) + implts_setLayoutDirty(); + implts_setToolbar( aUIElement ); return true; + } } + catch ( lang::DisposedException& ) {} } return false; } -sal_Bool ToolbarLayoutManager::isElementDocked( const ::rtl::OUString& rResourceURL ) +bool ToolbarLayoutManager::lockToolbar( const ::rtl::OUString& rResourceURL ) { UIElement aUIElement = implts_findToolbar( rResourceURL ); if ( aUIElement.m_xUIElement.is() ) { - if ( !aUIElement.m_bFloating ) + try { - uno::Reference< css::awt::XWindow2 > xWindow2( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XWindow2 > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xWindow.is() && xWindow->isVisible() && xDockWindow.is() && !xDockWindow->isFloating() && !xDockWindow->isLocked() ) + { + aUIElement.m_aDockedData.m_bLocked = true; + implts_writeWindowStateData( aUIElement ); + xDockWindow->lock(); - if( xWindow2.is() ) + implts_setLayoutDirty(); + implts_setToolbar( aUIElement ); return true; - } + } + } + catch ( lang::DisposedException& ) {} } return false; } -::sal_Bool ToolbarLayoutManager::isElementLocked( const ::rtl::OUString& rResourceURL ) +bool ToolbarLayoutManager::unlockToolbar( const ::rtl::OUString& rResourceURL ) { UIElement aUIElement = implts_findToolbar( rResourceURL ); if ( aUIElement.m_xUIElement.is() ) { - uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - return xDockWindow.is() && !xDockWindow->isLocked(); + try + { + uno::Reference< awt::XWindow2 > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + if ( xWindow.is() && xWindow->isVisible() && xDockWindow.is() && !xDockWindow->isFloating() && xDockWindow->isLocked() ) + { + aUIElement.m_aDockedData.m_bLocked = false; + implts_writeWindowStateData( aUIElement ); + xDockWindow->unlock(); + + implts_setLayoutDirty(); + implts_setToolbar( aUIElement ); + return true; + } + } + catch ( lang::DisposedException& ) {} } return false; } -awt::Size ToolbarLayoutManager::getElementSize( const ::rtl::OUString& rResourceURL ) +bool ToolbarLayoutManager::isToolbarVisible( const ::rtl::OUString& rResourceURL ) { - UIElement aUIElement = implts_findToolbar( rResourceURL ); - Window* pWindow = getWindowFromXUIElement( aUIElement.m_xUIElement ); + uno::Reference< awt::XWindow2 > xWindow2( implts_getXWindow( rResourceURL ), uno::UNO_QUERY ); + return ( xWindow2.is() && xWindow2->isVisible() ); +} + +bool ToolbarLayoutManager::isToolbarFloating( const ::rtl::OUString& rResourceURL ) +{ + uno::Reference< awt::XDockableWindow > xDockWindow( implts_getXWindow( rResourceURL ), uno::UNO_QUERY ); + return ( xDockWindow.is() && !xDockWindow->isFloating() ); +} + +bool ToolbarLayoutManager::isToolbarDocked( const ::rtl::OUString& rResourceURL ) +{ + return !isToolbarFloating( rResourceURL ); +} + +bool ToolbarLayoutManager::isToolbarLocked( const ::rtl::OUString& rResourceURL ) +{ + uno::Reference< awt::XDockableWindow > xDockWindow( implts_getXWindow( rResourceURL ), uno::UNO_QUERY ); + return ( xDockWindow.is() && !xDockWindow->isLocked() ); +} + +awt::Size ToolbarLayoutManager::getToolbarSize( const ::rtl::OUString& rResourceURL ) +{ + Window* pWindow = implts_getWindow( rResourceURL ); + + vos::OGuard aGuard( Application::GetSolarMutex() ); if ( pWindow ) { ::Size aSize = pWindow->GetSizePixel(); @@ -4367,14 +4441,13 @@ awt::Size ToolbarLayoutManager::getElementSize( const ::rtl::OUString& rResource return awt::Size(); } -awt::Point ToolbarLayoutManager::getElementPos( const ::rtl::OUString& rResourceURL ) +awt::Point ToolbarLayoutManager::getToolbarPos( const ::rtl::OUString& rResourceURL ) { awt::Point aPos; UIElement aUIElement = implts_findToolbar( rResourceURL ); - uno::Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); - if ( xDockWindow.is() ) + uno::Reference< awt::XWindow > xWindow( implts_getXWindow( rResourceURL )); + if ( xWindow.is() ) { if ( aUIElement.m_bFloating ) { @@ -4393,4 +4466,42 @@ awt::Point ToolbarLayoutManager::getElementPos( const ::rtl::OUString& rResource return aPos; } +void ToolbarLayoutManager::setToolbarSize( const ::rtl::OUString& rResourceURL, const awt::Size& aSize ) +{ + uno::Reference< awt::XWindow > xWindow( implts_getXWindow( rResourceURL )); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + UIElement aUIElement = implts_findToolbar( rResourceURL ); + + if ( xWindow.is() && xDockWindow.is() && xDockWindow->isFloating() ) + { + xWindow->setPosSize( 0, 0, aSize.Width, aSize.Height, awt::PosSize::SIZE ); + aUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); + implts_setToolbar( aUIElement ); + implts_writeWindowStateData( aUIElement ); + implts_sortUIElements(); + } +} + +void ToolbarLayoutManager::setToolbarPos( const ::rtl::OUString& rResourceURL, const awt::Point& aPos ) +{ + uno::Reference< awt::XWindow > xWindow( implts_getXWindow( rResourceURL )); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + UIElement aUIElement = implts_findToolbar( rResourceURL ); + + if ( xWindow.is() && xDockWindow.is() && xDockWindow->isFloating() ) + { + xWindow->setPosSize( aPos.X, aPos.Y, 0, 0, awt::PosSize::POS ); + aUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); + implts_setToolbar( aUIElement ); + implts_writeWindowStateData( aUIElement ); + implts_sortUIElements(); + } +} + +void ToolbarLayoutManager::setToolbarPosSize( const ::rtl::OUString& rResourceURL, const awt::Point& aPos, const awt::Size& aSize ) +{ + setToolbarPos( rResourceURL, aPos ); + setToolbarSize( rResourceURL, aSize ); +} + } // namespace framework diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index d11bb42b0d04..4357b9bd34be 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -133,33 +133,27 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a void setVisible(bool bVisible); bool isVisible() { return m_bVisible; } - // docking + // docking and further functions bool dockToolbar( const ::rtl::OUString& rResourceURL, ::com::sun::star::ui::DockingArea eDockingArea, const ::com::sun::star::awt::Point& aPos ); bool dockAllToolbars(); + bool floatToolbar( const ::rtl::OUString& rResoureURL ); + bool lockToolbar( const ::rtl::OUString& rResourceURL ); + bool unlockToolbar( const ::rtl::OUString& rResourceURL ); + void setToolbarPos( const ::rtl::OUString& rResourceURL, const ::com::sun::star::awt::Point& aPos ); + void setToolbarSize( const ::rtl::OUString& rResourceURL, const ::com::sun::star::awt::Size& aSize ); + void setToolbarPosSize( const ::rtl::OUString& rResourceURL, const ::com::sun::star::awt::Point& aPos, const ::com::sun::star::awt::Size& aSize ); + bool isToolbarVisible( const ::rtl::OUString& rResourceURL ); + bool isToolbarFloating( const ::rtl::OUString& rResourceURL ); + bool isToolbarDocked( const ::rtl::OUString& rResourceURL ); + bool isToolbarLocked( const ::rtl::OUString& rResourceURL ); + ::com::sun::star::awt::Point getToolbarPos( const ::rtl::OUString& rResourceURL ); + ::com::sun::star::awt::Size getToolbarSize( const ::rtl::OUString& rResourceURL ); + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > getToolbar( const ::rtl::OUString& aName ); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > > getToolbars(); // child window notifications long childWindowEvent( VclSimpleEvent* pEvent ); - //--------------------------------------------------------------------------------------------------------- - // XLayoutManager forwards - //--------------------------------------------------------------------------------------------------------- - ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > getElement( const ::rtl::OUString& aName ); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > > getElements(); - sal_Bool dockWindow( const ::rtl::OUString& aName, ::com::sun::star::ui::DockingArea DockingArea, const ::com::sun::star::awt::Point& Pos ); - ::sal_Bool dockAllWindows( ::sal_Int16 nElementType ); - sal_Bool floatWindow( const ::rtl::OUString& aName ); - ::sal_Bool lockWindow( const ::rtl::OUString& ResourceURL ); - ::sal_Bool unlockWindow( const ::rtl::OUString& ResourceURL ); - void setElementSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Size& aSize ); - void setElementPos( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos ); - void setElementPosSize( const ::rtl::OUString& aName, const ::com::sun::star::awt::Point& aPos, const ::com::sun::star::awt::Size& aSize ); - sal_Bool isElementVisible( const ::rtl::OUString& aName ); - sal_Bool isElementFloating( const ::rtl::OUString& aName ); - sal_Bool isElementDocked( const ::rtl::OUString& aName ); - ::sal_Bool isElementLocked( const ::rtl::OUString& ResourceURL ); - ::com::sun::star::awt::Size getElementSize( const ::rtl::OUString& aName ); - ::com::sun::star::awt::Point getElementPos( const ::rtl::OUString& aName ); - //--------------------------------------------------------------------------------------------------------- // XInterface //--------------------------------------------------------------------------------------------------------- @@ -243,6 +237,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a sal_Int32 nOffset, SingleRowColumnWindowData& rRowColumnWindowData, const ::Size& rContainerSize ); + void implts_setLayoutDirty(); //--------------------------------------------------------------------------------------------------------- // lookup/container methods @@ -250,6 +245,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a UIElement implts_findToolbar( const rtl::OUString& aName ); UIElement implts_findToolbar( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xToolbar ); UIElement& impl_findToolbar( const rtl::OUString& aName ); + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > implts_getXWindow( const ::rtl::OUString& aName ); + Window* implts_getWindow( const ::rtl::OUString& aName ); bool implts_insertToolbar( const UIElement& rUIElement ); void implts_setToolbar( const UIElement& rUIElement ); ::Size implts_getTopBottomDockingAreaSizes(); From 9d792efeb631f24f8864d2f9541afd25422e85c2 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 21 Oct 2010 11:50:04 +0200 Subject: [PATCH 194/279] sb131: #i114962# also test singletons in passive.oxt --- .../passive/{Service.java => Dispatch.java} | 41 +---- desktop/test/deployment/passive/Provider.java | 81 ++++++++++ desktop/test/deployment/passive/Services.java | 49 ++++++ desktop/test/deployment/passive/makefile.mk | 2 +- desktop/test/deployment/passive/manifest.mf | 2 +- .../deployment/passive/passive_java.component | 4 + .../passive/passive_native.component | 4 + .../deployment/passive/passive_native.cxx | 147 +++++++++++++----- .../passive/passive_python.component | 4 + .../test/deployment/passive/passive_python.py | 43 ++++- 10 files changed, 295 insertions(+), 82 deletions(-) rename desktop/test/deployment/passive/{Service.java => Dispatch.java} (73%) create mode 100644 desktop/test/deployment/passive/Provider.java create mode 100644 desktop/test/deployment/passive/Services.java diff --git a/desktop/test/deployment/passive/Service.java b/desktop/test/deployment/passive/Dispatch.java similarity index 73% rename from desktop/test/deployment/passive/Service.java rename to desktop/test/deployment/passive/Dispatch.java index d4f2d52f1da0..295f34d599da 100644 --- a/desktop/test/deployment/passive/Service.java +++ b/desktop/test/deployment/passive/Dispatch.java @@ -34,52 +34,32 @@ import com.sun.star.beans.PropertyValue; import com.sun.star.frame.DispatchDescriptor; import com.sun.star.frame.XDesktop; import com.sun.star.frame.XDispatch; -import com.sun.star.frame.XDispatchProvider; import com.sun.star.frame.XStatusListener; import com.sun.star.lang.WrappedTargetRuntimeException; import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiComponentFactory; import com.sun.star.lang.XServiceInfo; -import com.sun.star.lang.XSingleComponentFactory; -import com.sun.star.lib.uno.helper.Factory; import com.sun.star.lib.uno.helper.WeakBase; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XComponentContext; import com.sun.star.util.URL; -public final class Service extends WeakBase - implements XServiceInfo, XDispatchProvider, XDispatch +public final class Dispatch extends WeakBase implements XServiceInfo, XDispatch { - public Service(XComponentContext context) { + public Dispatch(XComponentContext context) { this.context = context; } public String getImplementationName() { return implementationName; } public boolean supportsService(String ServiceName) { - return ServiceName.equals(getSupportedServiceNames()[0]); //TODO + return false; //TODO } public String[] getSupportedServiceNames() { return serviceNames; } - public XDispatch queryDispatch( - URL URL, String TargetFrameName, int SearchFlags) - { - return this; - } - - public XDispatch[] queryDispatches(DispatchDescriptor[] Requests) { - XDispatch[] s = new XDispatch[Requests.length]; - for (int i = 0; i < s.length; ++i) { - s[i] = queryDispatch( - Requests[i].FeatureURL, Requests[i].FrameName, - Requests[i].SearchFlags); - } - return s; - } - public void dispatch(URL URL, PropertyValue[] Arguments) { try { XMultiComponentFactory smgr = UnoRuntime.queryInterface( @@ -112,19 +92,10 @@ public final class Service extends WeakBase public void removeStatusListener(XStatusListener Control, URL URL) {} - public static XSingleComponentFactory __getComponentFactory( - String implementation) - { - return implementation.equals(implementationName) - ? Factory.createComponentFactory(Service.class, serviceNames) - : null; - } - private final XComponentContext context; - private static final String implementationName = - "com.sun.star.comp.test.deployment.passive_java"; + static final String implementationName = + "com.sun.star.comp.test.deployment.passive_java_singleton"; - private static final String[] serviceNames = new String[] { - "com.sun.star.test.deployment.passive_java" }; + static final String[] serviceNames = new String[0]; } diff --git a/desktop/test/deployment/passive/Provider.java b/desktop/test/deployment/passive/Provider.java new file mode 100644 index 000000000000..6f74ed9eb89e --- /dev/null +++ b/desktop/test/deployment/passive/Provider.java @@ -0,0 +1,81 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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 +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +package com.sun.star.comp.test.deployment.passive_java; + +import com.sun.star.frame.DispatchDescriptor; +import com.sun.star.frame.XDispatch; +import com.sun.star.frame.XDispatchProvider; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lib.uno.helper.WeakBase; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XComponentContext; +import com.sun.star.util.URL; + +public final class Provider extends WeakBase + implements XServiceInfo, XDispatchProvider +{ + public Provider(XComponentContext context) { + this.context = context; + } + + public String getImplementationName() { return implementationName; } + + public boolean supportsService(String ServiceName) { + return ServiceName.equals(getSupportedServiceNames()[0]); //TODO + } + + public String[] getSupportedServiceNames() { + return serviceNames; + } + + public XDispatch queryDispatch( + URL URL, String TargetFrameName, int SearchFlags) + { + return UnoRuntime.queryInterface( + XDispatch.class, + context.getValueByName( + "/singletons/" + + "com.sun.star.test.deployment.passive_java_singleton")); + } + + public XDispatch[] queryDispatches(DispatchDescriptor[] Requests) { + XDispatch[] s = new XDispatch[Requests.length]; + for (int i = 0; i < s.length; ++i) { + s[i] = queryDispatch( + Requests[i].FeatureURL, Requests[i].FrameName, + Requests[i].SearchFlags); + } + return s; + } + + private final XComponentContext context; + + static final String implementationName = + "com.sun.star.comp.test.deployment.passive_java"; + + static final String[] serviceNames = new String[] { + "com.sun.star.test.deployment.passive_java" }; +} diff --git a/desktop/test/deployment/passive/Services.java b/desktop/test/deployment/passive/Services.java new file mode 100644 index 000000000000..799df3e70222 --- /dev/null +++ b/desktop/test/deployment/passive/Services.java @@ -0,0 +1,49 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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 +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +package com.sun.star.comp.test.deployment.passive_java; + +import com.sun.star.lang.XSingleComponentFactory; +import com.sun.star.lib.uno.helper.Factory; + +public final class Services { + private Services() {} + + public static XSingleComponentFactory __getComponentFactory( + String implementation) + { + if (implementation.equals(Dispatch.implementationName)) { + return Factory.createComponentFactory( + Dispatch.class, Dispatch.implementationName, + Dispatch.serviceNames); + } else if (implementation.equals(Provider.implementationName)) { + return Factory.createComponentFactory( + Provider.class, Provider.implementationName, + Provider.serviceNames); + } else { + return null; + } + } +} diff --git a/desktop/test/deployment/passive/makefile.mk b/desktop/test/deployment/passive/makefile.mk index deadd782dd60..2d75d1d253d4 100644 --- a/desktop/test/deployment/passive/makefile.mk +++ b/desktop/test/deployment/passive/makefile.mk @@ -32,7 +32,7 @@ TARGET = test_deployment_passive ENABLE_EXCEPTIONS = TRUE PACKAGE = com/sun/star/comp/test/deployment/passive_java -JAVAFILES = Service.java +JAVAFILES = Dispatch.java Provider.java Services.java JARFILES = juh.jar ridl.jar unoil.jar my_components = passive_native passive_java passive_python diff --git a/desktop/test/deployment/passive/manifest.mf b/desktop/test/deployment/passive/manifest.mf index 5ad70357a1d2..45a04bf263dc 100644 --- a/desktop/test/deployment/passive/manifest.mf +++ b/desktop/test/deployment/passive/manifest.mf @@ -1,3 +1,3 @@ Sealed: true -RegistrationClassName: com.sun.star.comp.test.deployment.passive_java.Service +RegistrationClassName: com.sun.star.comp.test.deployment.passive_java.Services UNO-Type-Path: diff --git a/desktop/test/deployment/passive/passive_java.component b/desktop/test/deployment/passive/passive_java.component index dfc55a5b8c36..74be57177dfe 100644 --- a/desktop/test/deployment/passive/passive_java.component +++ b/desktop/test/deployment/passive/passive_java.component @@ -31,4 +31,8 @@ + + + diff --git a/desktop/test/deployment/passive/passive_native.component b/desktop/test/deployment/passive/passive_native.component index 7b0c314628a6..c14fd7ff0062 100644 --- a/desktop/test/deployment/passive/passive_native.component +++ b/desktop/test/deployment/passive/passive_native.component @@ -31,4 +31,8 @@ + + + diff --git a/desktop/test/deployment/passive/passive_native.cxx b/desktop/test/deployment/passive/passive_native.cxx index 66a49251d81c..39101257ad67 100644 --- a/desktop/test/deployment/passive/passive_native.cxx +++ b/desktop/test/deployment/passive/passive_native.cxx @@ -44,6 +44,7 @@ #include "com/sun/star/lang/XComponent.hpp" #include "com/sun/star/lang/XMultiComponentFactory.hpp" #include "com/sun/star/lang/XServiceInfo.hpp" +#include "com/sun/star/uno/DeploymentException.hpp" #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/RuntimeException.hpp" @@ -52,7 +53,7 @@ #include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/util/URL.hpp" #include "cppuhelper/factory.hxx" -#include "cppuhelper/implbase3.hxx" +#include "cppuhelper/implbase2.hxx" #include "cppuhelper/implementationentry.hxx" #include "cppuhelper/weak.hxx" #include "osl/diagnose.h" @@ -65,17 +66,16 @@ namespace { namespace css = com::sun::star; -class Service: - public cppu::WeakImplHelper3< - css::lang::XServiceInfo, css::frame::XDispatchProvider, - css::frame::XDispatch >, +class Provider: + public cppu::WeakImplHelper2< + css::lang::XServiceInfo, css::frame::XDispatchProvider >, private boost::noncopyable { public: static css::uno::Reference< css::uno::XInterface > SAL_CALL static_create( css::uno::Reference< css::uno::XComponentContext > const & xContext) SAL_THROW((css::uno::Exception)) - { return static_cast< cppu::OWeakObject * >(new Service(xContext)); } + { return static_cast< cppu::OWeakObject * >(new Provider(xContext)); } static rtl::OUString SAL_CALL static_getImplementationName(); @@ -83,10 +83,11 @@ public: static_getSupportedServiceNames(); private: - Service(css::uno::Reference< css::uno::XComponentContext > const & context): + Provider( + css::uno::Reference< css::uno::XComponentContext > const & context): context_(context) { OSL_ASSERT(context.is()); } - virtual ~Service() {} + virtual ~Provider() {} virtual rtl::OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException) @@ -102,14 +103,105 @@ private: virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( css::util::URL const &, rtl::OUString const &, sal_Int32) - throw (css::uno::RuntimeException) - { return this; } + throw (css::uno::RuntimeException); virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) throw (css::uno::RuntimeException); + css::uno::Reference< css::uno::XComponentContext > context_; +}; + +rtl::OUString Provider::static_getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.test.deployment.passive_native")); +} + +css::uno::Sequence< rtl::OUString > Provider::static_getSupportedServiceNames() +{ + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.test.deployment.passive_native")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +css::uno::Reference< css::frame::XDispatch > Provider::queryDispatch( + css::util::URL const &, rtl::OUString const &, sal_Int32) + throw (css::uno::RuntimeException) +{ + css::uno::Reference< css::frame::XDispatch > dispatch; + if (!(context_->getValueByName( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "/singletons/com.sun.star.test.deployment." + "passive_native_singleton"))) >>= + dispatch) || + !dispatch.is()) + { + throw css::uno::DeploymentException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "component context fails to supply singleton" + " com.sun.star.test.deployment.passive_native_singleton of" + " type com.sun.star.frame.XDispatch")), + context_); + } + return dispatch; +} + +css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > +Provider::queryDispatches( + css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) + throw (css::uno::RuntimeException) +{ + css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > s( + Requests.getLength()); + for (sal_Int32 i = 0; i < s.getLength(); ++i) { + s[i] = queryDispatch( + Requests[i].FeatureURL, Requests[i].FrameName, + Requests[i].SearchFlags); + } + return s; +} + +class Dispatch: + public cppu::WeakImplHelper2< + css::lang::XServiceInfo, css::frame::XDispatch >, + private boost::noncopyable +{ +public: + static css::uno::Reference< css::uno::XInterface > SAL_CALL static_create( + css::uno::Reference< css::uno::XComponentContext > const & xContext) + SAL_THROW((css::uno::Exception)) + { return static_cast< cppu::OWeakObject * >(new Dispatch(xContext)); } + + static rtl::OUString SAL_CALL static_getImplementationName(); + + static css::uno::Sequence< rtl::OUString > SAL_CALL + static_getSupportedServiceNames() + { return css::uno::Sequence< rtl::OUString >(); } + +private: + Dispatch( + css::uno::Reference< css::uno::XComponentContext > const & context): + context_(context) { OSL_ASSERT(context.is()); } + + virtual ~Dispatch() {} + + virtual rtl::OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException) + { return static_getImplementationName(); } + + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const &) + throw (css::uno::RuntimeException) + { return false; } //TODO + + virtual css::uno::Sequence< rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (css::uno::RuntimeException) + { return static_getSupportedServiceNames(); } + virtual void SAL_CALL dispatch( css::util::URL const &, css::uno::Sequence< css::beans::PropertyValue > const &) @@ -130,35 +222,13 @@ private: css::uno::Reference< css::uno::XComponentContext > context_; }; -rtl::OUString Service::static_getImplementationName() { +rtl::OUString Dispatch::static_getImplementationName() { return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.test.deployment.passive_native")); + "com.sun.star.comp.test.deployment.passive_native_singleton")); } -css::uno::Sequence< rtl::OUString > Service::static_getSupportedServiceNames() { - rtl::OUString name( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.test.deployment.passive_native")); - return css::uno::Sequence< rtl::OUString >(&name, 1); -} - -css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > -Service::queryDispatches( - css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) - throw (css::uno::RuntimeException) -{ - css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > s( - Requests.getLength()); - for (sal_Int32 i = 0; i < s.getLength(); ++i) { - s[i] = queryDispatch( - Requests[i].FeatureURL, Requests[i].FrameName, - Requests[i].SearchFlags); - } - return s; -} - -void Service::dispatch( +void Dispatch::dispatch( css::util::URL const &, css::uno::Sequence< css::beans::PropertyValue > const &) throw (css::uno::RuntimeException) @@ -194,8 +264,11 @@ void Service::dispatch( } static cppu::ImplementationEntry const services[] = { - { &Service::static_create, &Service::static_getImplementationName, - &Service::static_getSupportedServiceNames, + { &Provider::static_create, &Provider::static_getImplementationName, + &Provider::static_getSupportedServiceNames, + &cppu::createSingleComponentFactory, 0, 0 }, + { &Dispatch::static_create, &Dispatch::static_getImplementationName, + &Dispatch::static_getSupportedServiceNames, &cppu::createSingleComponentFactory, 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; diff --git a/desktop/test/deployment/passive/passive_python.component b/desktop/test/deployment/passive/passive_python.component index 3a0bea4b5296..ea7a1992b534 100644 --- a/desktop/test/deployment/passive/passive_python.component +++ b/desktop/test/deployment/passive/passive_python.component @@ -31,4 +31,8 @@ + + + diff --git a/desktop/test/deployment/passive/passive_python.py b/desktop/test/deployment/passive/passive_python.py index 183cbdc899c3..dda68cccdb2f 100644 --- a/desktop/test/deployment/passive/passive_python.py +++ b/desktop/test/deployment/passive/passive_python.py @@ -33,24 +33,49 @@ from com.sun.star.awt.MessageBoxButtons import BUTTONS_OK from com.sun.star.frame import XDispatch, XDispatchProvider from com.sun.star.lang import XServiceInfo -implementationName = "com.sun.star.comp.test.deployment.passive_python" -serviceNames = ("com.sun.star.test.deployment.passive_python",) +class Provider(unohelper.Base, XServiceInfo, XDispatchProvider): + implementationName = "com.sun.star.comp.test.deployment.passive_python" + + serviceNames = ("com.sun.star.test.deployment.passive_python",) -class Service(unohelper.Base, XServiceInfo, XDispatchProvider, XDispatch): def __init__(self, context): self.context = context def getImplementationName(self): - return implementationName + return self.implementationName def supportsService(self, ServiceName): - return ServiceName in serviceNames + return ServiceName in self.serviceNames def getSupportedServiceNames(self): - return serviceNames + return self.serviceNames def queryDispatch(self, URL, TargetFrame, SearchFlags): - return self + return self.context.getValueByName( \ + "/singletons/com.sun.star.test.deployment.passive_python_singleton") + + def queryDispatches(self, Requests): + tuple( \ + self.queryDispatch(i.FeatureURL, i.FrameName, i.SearchFlags) \ + for i in Requests) + +class Dispatch(unohelper.Base, XServiceInfo, XDispatch): + implementationName = \ + "com.sun.star.comp.test.deployment.passive_python_singleton" + + serviceNames = () + + def __init__(self, context): + self.context = context + + def getImplementationName(self): + return self.implementationName + + def supportsService(self, ServiceName): + return ServiceName in self.serviceNames + + def getSupportedServiceNames(self): + return self.serviceNames def dispatch(self, URL, Arguments): smgr = self.context.getServiceManager() @@ -71,4 +96,6 @@ class Service(unohelper.Base, XServiceInfo, XDispatchProvider, XDispatch): g_ImplementationHelper = unohelper.ImplementationHelper() g_ImplementationHelper.addImplementation( \ - Service, implementationName, serviceNames,) + Provider, Provider.implementationName, Provider.serviceNames) +g_ImplementationHelper.addImplementation( \ + Dispatch, Dispatch.implementationName, Dispatch.serviceNames) From 9f4cadedecbd1464ce6d229e324df78b7cc11c75 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 21 Oct 2010 13:49:31 +0200 Subject: [PATCH 195/279] dockingwindows: Fix several issues regarding UNO API and toggleFloatingMode() --- .../source/layoutmanager/layoutmanager.cxx | 43 +- .../layoutmanager/toolbarlayoutmanager.cxx | 399 +++++++----------- .../layoutmanager/toolbarlayoutmanager.hxx | 2 + 3 files changed, 187 insertions(+), 257 deletions(-) diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 3d39c3218246..8342f9069eca 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -2051,8 +2051,19 @@ throw (RuntimeException) parseResourceURL( aName, aElementType, aElementName ); if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) - m_pToolbarManager->dockToolbar( aName, DockingArea, Pos ); + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< uno::XInterface > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + aReadLock.unlock(); + if ( pToolbarManager ) + { + pToolbarManager->dockToolbar( aName, DockingArea, Pos ); + if ( pToolbarManager->isLayoutDirty() ) + doLayout(); + } + } return sal_False; } @@ -2065,7 +2076,11 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) + { bResult = pToolbarManager->dockAllToolbars(); + if ( pToolbarManager->isLayoutDirty() ) + doLayout(); + } return bResult; } @@ -2081,7 +2096,11 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) + { bResult = pToolbarManager->floatToolbar( aName ); + if ( pToolbarManager->isLayoutDirty() ) + doLayout(); + } } return bResult; } @@ -2098,7 +2117,11 @@ throw (uno::RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) + { bResult = pToolbarManager->lockToolbar( aName ); + if ( pToolbarManager->isLayoutDirty() ) + doLayout(); + } } return bResult; } @@ -2115,7 +2138,11 @@ throw (uno::RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) + { bResult = pToolbarManager->unlockToolbar( aName ); + if ( pToolbarManager->isLayoutDirty() ) + doLayout(); + } } return bResult; } @@ -2131,7 +2158,11 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) + { pToolbarManager->setToolbarSize( aName, aSize ); + if ( pToolbarManager->isLayoutDirty() ) + doLayout(); + } } } @@ -2146,7 +2177,11 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) + { pToolbarManager->setToolbarPos( aName, aPos ); + if ( pToolbarManager->isLayoutDirty() ) + doLayout(); + } } } @@ -2161,7 +2196,11 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) + { pToolbarManager->setToolbarPosSize( aName, aPos, aSize ); + if ( pToolbarManager->isLayoutDirty() ) + doLayout(); + } } } @@ -2281,7 +2320,7 @@ throw (uno::RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - pToolbarManager->isToolbarLocked( aName ); + return pToolbarManager->isToolbarLocked( aName ); } return sal_False; diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index ccaadab2a2bb..d551eefb994f 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -253,13 +253,13 @@ bool ToolbarLayoutManager::isLayoutDirty() void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) { WriteGuard aWriteLock( m_aLock ); - - if ( m_bLayoutInProgress ) - return; - + bool bLayoutInProgress( m_bLayoutInProgress ); m_bLayoutInProgress = true; aWriteLock.unlock(); + if ( bLayoutInProgress ) + return; + // Retrieve row/column dependent data from all docked user-interface elements for ( sal_Int32 i = 0; i < DOCKINGAREAS_COUNT; i++ ) { @@ -522,9 +522,7 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) xWindow->removeWindowListener( uno::Reference< awt::XWindowListener >( static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); } - catch( uno::Exception& ) - { - } + catch( uno::Exception& ) {} try { @@ -532,9 +530,7 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) xDockWindow->removeDockableWindowListener( uno::Reference< awt::XDockableWindowListener >( static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); } - catch ( uno::Exception& ) - { - } + catch ( uno::Exception& ) {} } else { @@ -690,8 +686,10 @@ void ToolbarLayoutManager::setVisible( bool bVisible ) UIElementVector aUIElementVector; WriteGuard aWriteLock( m_aLock ); - aUIElementVector = m_aUIElements; - m_bLayoutDirty = true; + aUIElementVector = m_aUIElements; + m_bLayoutDirty = true; + bool bLayoutInProgress = m_bLayoutInProgress; + m_bLayoutInProgress = true; aWriteLock.unlock(); UIElementVector::iterator pIter; @@ -709,6 +707,9 @@ void ToolbarLayoutManager::setVisible( bool bVisible ) if ( !bVisible ) resetDockingArea(); + + aWriteLock.lock(); + m_bLayoutInProgress = bLayoutInProgress; } bool ToolbarLayoutManager::dockToolbar( @@ -750,8 +751,7 @@ bool ToolbarLayoutManager::dockToolbar( } } - if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) || - ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) || ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) { // Docking on its default position without a preset position - // we have to find a good place for it. @@ -779,7 +779,8 @@ bool ToolbarLayoutManager::dockToolbar( if ( xDockWindow->isFloating() ) { - // Will call toggle floating mode which will do the rest! + // ATTENTION: This will call toggleFloatingMode() via notifications! + // Sets the floating member of UIElement correctly! xWindow->setVisible( sal_False ); xDockWindow->setFloatingMode( sal_False ); xWindow->setVisible( sal_True ); @@ -796,9 +797,7 @@ bool ToolbarLayoutManager::dockToolbar( return true; } } - catch ( lang::DisposedException& ) - { - } + catch ( lang::DisposedException& ) {} } return false; @@ -882,10 +881,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) { aListenerArray[i]->functionExecute( aToolbarName, aCommand ); } - catch ( uno::RuntimeException& e ) - { - throw e; - } + catch ( uno::RuntimeException& ) { throw; } catch ( uno::Exception& ) {} } } @@ -939,7 +935,6 @@ void ToolbarLayoutManager::setParentWindow( uno::Reference< awt::XWindow > xRightDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); uno::Reference< awt::XWindow > xBottomDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_xContainerWindow = uno::Reference< awt::XWindow2 >( xParentWindow, uno::UNO_QUERY ); @@ -948,7 +943,6 @@ void ToolbarLayoutManager::setParentWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] = xRightDockingWindow; m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] = xBottomDockingWindow; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( xParentWindow.is() ) implts_reparentToolbars(); @@ -1035,9 +1029,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() if ( xWindow.is() ) xWindow->addWindowListener( uno::Reference< awt::XWindowListener >( static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); } - catch ( uno::Exception& ) - { - } + catch ( uno::Exception& ) {} } ::rtl::OUString aGenericAddonTitle = implts_generateGenericAddonToolbarTitle( i+1 ); @@ -1058,7 +1050,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() { // Create new UI element and try to read its state data UIElement aNewToolbar( aAddonToolBarName, aElementType, xUIElement ); - aNewToolbar.m_bFloating = sal_True; + aNewToolbar.m_bFloating = true; implts_readWindowStateData( aAddonToolBarName, aNewToolbar ); implts_setElementData( aNewToolbar, xDockWindow ); if ( aNewToolbar.m_aUIName.getLength() == 0 ) @@ -1085,12 +1077,8 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() } } } - catch ( container::NoSuchElementException& ) - { - } - catch ( lang::IllegalArgumentException& ) - { - } + catch ( container::NoSuchElementException& ) {} + catch ( lang::IllegalArgumentException& ) {} } } @@ -1187,13 +1175,8 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } } - catch ( uno::RuntimeException& e ) - { - throw e; - } - catch ( uno::Exception& ) - { - } + catch ( uno::RuntimeException& ) { throw; } + catch ( uno::Exception& ) {} if ( !aMakeVisibleToolbars.empty() ) ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &ToolbarLayoutManager::requestToolbar, this,_1 )); @@ -1267,13 +1250,8 @@ void ToolbarLayoutManager::implts_reparentToolbars() // possible that all elements have been disposed! xWindow = uno::Reference< awt::XWindow >( xUIElement->getRealInterface(), uno::UNO_QUERY ); } - catch ( uno::RuntimeException& ) - { - throw; - } - catch ( uno::Exception& ) - { - } + catch ( uno::RuntimeException& ) { throw; } + catch ( uno::Exception& ) {} Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow ) @@ -1300,13 +1278,11 @@ void ToolbarLayoutManager::implts_reparentToolbars() void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, bool& bNotify, uno::Reference< ui::XUIElement >& rUIElement ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Reference< frame::XFrame > xFrame( m_xFrame ); uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ bNotify = false; @@ -1317,7 +1293,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b if ( !aToolbarElement.m_xUIElement.is() ) { uno::Reference< ui::XUIElement > xUIElement = implts_createElement( aName ); - sal_Bool bVisible( sal_False ); + bool bVisible( false ); if ( xUIElement.is() ) { rUIElement = xUIElement; @@ -1334,9 +1310,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b static_cast< OWeakObject * >( this ), uno::UNO_QUERY )); xDockWindow->enableDocking( sal_True ); } - catch ( uno::Exception& ) - { - } + catch ( uno::Exception& ) {} } /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -1390,7 +1364,6 @@ uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( con { uno::Reference< ui::XUIElement > xUIElement; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Sequence< beans::PropertyValue > aPropSeq( 2 ); aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); @@ -1403,12 +1376,8 @@ uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( con if ( m_xUIElementFactoryManager.is() ) xUIElement = m_xUIElementFactoryManager->createUIElement( aName, aPropSeq ); } - catch ( container::NoSuchElementException& ) - { - } - catch ( lang::IllegalArgumentException& ) - { - } + catch ( container::NoSuchElementException& ) {} + catch ( lang::IllegalArgumentException& ) {} return xUIElement; } @@ -1416,14 +1385,14 @@ uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( con void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno::Reference< awt::XDockableWindow >& rDockWindow ) { ReadGuard aReadLock( m_aLock ); - sal_Bool bShowElement( rElement.m_bVisible && !rElement.m_bMasterHide && implts_isParentWindowVisible() ); + bool bShowElement( rElement.m_bVisible && !rElement.m_bMasterHide && implts_isParentWindowVisible() ); aReadLock.unlock(); uno::Reference< awt::XDockableWindow > xDockWindow( rDockWindow ); uno::Reference< awt::XWindow2 > xWindow( xDockWindow, uno::UNO_QUERY ); - Window* pWindow( 0 ); - ToolBox* pToolBox( 0 ); + Window* pWindow( 0 ); + ToolBox* pToolBox( 0 ); if ( xDockWindow.is() && xWindow.is() ) { @@ -1442,10 +1411,9 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno } if ( pToolBox ) { - if (( rElement.m_nStyle < 0 ) || - ( rElement.m_nStyle > BUTTON_SYMBOLTEXT )) + if (( rElement.m_nStyle < 0 ) || ( rElement.m_nStyle > BUTTON_SYMBOLTEXT )) rElement.m_nStyle = BUTTON_SYMBOL; - pToolBox->SetButtonType( (ButtonType)rElement.m_nStyle ); + pToolBox->SetButtonType( (ButtonType)rElement.m_nStyle ); if ( rElement.m_bNoClose ) pToolBox->SetFloatStyle( pToolBox->GetFloatStyle() & ~WB_CLOSEABLE ); } @@ -1463,11 +1431,11 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno ::Point aPos( rElement.m_aFloatingData.m_aPos.X(), rElement.m_aFloatingData.m_aPos.Y() ); - sal_Bool bWriteData( sal_False ); - sal_Bool bUndefPos = ( rElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || - rElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); - sal_Bool bSetSize = ( rElement.m_aFloatingData.m_aSize.Width() != 0 && - rElement.m_aFloatingData.m_aSize.Height() != 0 ); + bool bWriteData( false ); + bool bUndefPos = ( rElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || + rElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); + bool bSetSize = ( rElement.m_aFloatingData.m_aSize.Width() != 0 && + rElement.m_aFloatingData.m_aSize.Height() != 0 ); xDockWindow->setFloatingMode( sal_True ); if ( bUndefPos ) { @@ -1483,7 +1451,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno if( pToolBox ) { // set an optimal initial floating size - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); ::Size aSize( pToolBox->CalcFloatingWindowSizePixel() ); pToolBox->SetOutputSizePixel( aSize ); } @@ -1497,8 +1465,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno // we resize the toolbar with the new (wrong) position. // To fix this problem we have to set the size BEFORE the // position. - xWindow->setPosSize( aPos.X(), aPos.Y(), 0, 0, - css::awt::PosSize::POS ); + xWindow->setPosSize( aPos.X(), aPos.Y(), 0, 0, awt::PosSize::POS ); if ( bWriteData ) implts_writeWindowStateData( rElement ); @@ -1510,10 +1477,10 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno } else { - ::Point aDockPos; - ::Point aPixelPos; - sal_Bool bSetSize( sal_False ); - ::Size aSize; + bool bSetSize( false ); + ::Point aDockPos; + ::Point aPixelPos; + ::Size aSize; if ( pToolBox ) { @@ -1523,7 +1490,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno if ( rElement.m_aDockedData.m_bLocked ) xDockWindow->lock(); aSize = pToolBox->CalcWindowSizePixel(); - bSetSize = sal_True; + bSetSize = true; if (( rElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && ( rElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) @@ -1539,7 +1506,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno xWindow->setPosSize( aPixelPos.X(), aPixelPos.Y(), 0, 0, - css::awt::PosSize::POS ); + awt::PosSize::POS ); if( bSetSize ) xWindow->setOutputSize( AWTSize( aSize) ); @@ -1554,7 +1521,6 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno void ToolbarLayoutManager::implts_destroyDockingAreaWindows() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); uno::Reference< awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; uno::Reference< awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; @@ -1565,7 +1531,6 @@ void ToolbarLayoutManager::implts_destroyDockingAreaWindows() m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT].clear(); m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM].clear(); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ // destroy windows xTopDockingWindow->dispose(); @@ -1580,19 +1545,15 @@ void ToolbarLayoutManager::implts_destroyDockingAreaWindows() sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ) { - sal_Bool bGetSettingsState( sal_False ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); + bool bGetSettingsState( false ); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( xPersistentWindowState.is() ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteLock.lock(); - sal_Bool bGlobalSettings( m_bGlobalSettings ); + bool bGlobalSettings( m_bGlobalSettings ); GlobalSettings* pGlobalSettings( 0 ); if ( m_pGlobalSettings == 0 ) { @@ -1601,7 +1562,6 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& } pGlobalSettings = m_pGlobalSettings; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ try { @@ -1717,9 +1677,7 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& return sal_True; } - catch ( container::NoSuchElementException& ) - { - } + catch ( container::NoSuchElementException& ) {} } return sal_False; @@ -1727,14 +1685,10 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElementData ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - - // set flag to determine that we triggered the notification - m_bStoreWindowState = true; + m_bStoreWindowState = true; // set flag to determine that we triggered the notification aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ sal_Bool bPersistent( sal_False ); uno::Reference< beans::XPropertySet > xPropSet( rElementData.m_xUIElement, uno::UNO_QUERY ); @@ -1747,12 +1701,9 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen } catch ( beans::UnknownPropertyException ) { - // Non-configurable elements should at least store their dimension/position - bPersistent = sal_True; - } - catch ( lang::WrappedTargetException ) - { + bPersistent = sal_True; // Non-configurable elements should at least store their dimension/position } + catch ( lang::WrappedTargetException ) {} } if ( bPersistent && xPersistentWindowState.is() ) @@ -1802,17 +1753,13 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen xInsert->insertByName( aName, uno::makeAny( aWindowState )); } } - catch ( uno::Exception& ) - { - } + catch ( uno::Exception& ) {} } // Reset flag - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteLock.lock(); m_bStoreWindowState = false; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } void ToolbarLayoutManager::implts_writeNewWindowStateData( const rtl::OUString aName, const uno::Reference< awt::XWindow >& xWindow ) @@ -1994,13 +1941,11 @@ void ToolbarLayoutManager::implts_setToolbar( const UIElement& rUIElement ) const sal_Int32 nCascadeIndentX = 15; const sal_Int32 nCascadeIndentY = 15; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Reference< awt::XWindow2 > xContainerWindow = m_xContainerWindow; uno::Reference< awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; uno::Reference< awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ::Point aStartPos( nCascadeIndentX, nCascadeIndentY ); ::Point aCurrPos( aStartPos ); @@ -2056,7 +2001,6 @@ void ToolbarLayoutManager::implts_setToolbar( const UIElement& rUIElement ) void ToolbarLayoutManager::implts_sortUIElements() { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); UIElementVector::iterator pIterStart = m_aUIElements.begin(); UIElementVector::iterator pIterEnd = m_aUIElements.end(); @@ -2068,7 +2012,6 @@ void ToolbarLayoutManager::implts_sortUIElements() for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) pIter->m_bUserActive = sal_False; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } ::Size ToolbarLayoutManager::implts_getTopBottomDockingAreaSizes() @@ -2077,12 +2020,10 @@ void ToolbarLayoutManager::implts_sortUIElements() uno::Reference< awt::XWindow > xTopDockingAreaWindow; uno::Reference< awt::XWindow > xBottomDockingAreaWindow; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); xTopDockingAreaWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; xBottomDockingAreaWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( xTopDockingAreaWindow.is() ) aSize.Width() = xTopDockingAreaWindow->getPosSize().Height; @@ -2287,8 +2228,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D ( eDockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) eDockingArea = ui::DockingArea_DOCKINGAREA_TOP; - sal_Bool bHorzDockArea = (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + bool bHorzDockArea = (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); @@ -2298,9 +2238,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D { if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea ) { - sal_Bool bSameRowCol = bHorzDockArea ? - ( pIter->m_aDockedData.m_aPos.Y() == nRowCol ) : - ( pIter->m_aDockedData.m_aPos.X() == nRowCol ); + bool bSameRowCol = bHorzDockArea ? ( pIter->m_aDockedData.m_aPos.Y() == nRowCol ) : ( pIter->m_aDockedData.m_aPos.X() == nRowCol ); uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); if ( bSameRowCol && xUIElement.is() ) @@ -2312,10 +2250,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( pWindow && pIter->m_bVisible && xDockWindow.is() && !pIter->m_bFloating ) - { - // docked windows - aWindowVector.push_back( *pIter ); - } + aWindowVector.push_back( *pIter ); // docked windows } } } @@ -2348,8 +2283,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D continue; sal_Int32 nSpace; - if (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) { nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); @@ -2415,12 +2349,10 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D return aWinRect; else { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Reference< awt::XWindow2 > xContainerWindow = m_xContainerWindow; uno::Reference< awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[DockingArea]; aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -2517,16 +2449,13 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Reference< awt::XWindow > xDockingWindow = m_xDockAreaWindows[DockingArea]; ::Size aDockingWinSize; Window* pDockingWindow( 0 ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) + if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) DockingArea = ui::DockingArea_DOCKINGAREA_TOP; { @@ -2811,11 +2740,9 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( } } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); Window* pDockAreaWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[nDockingArea] ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ sal_Int32 nCurrPos( 0 ); sal_Int32 nStartOffset( 0 ); @@ -2877,6 +2804,12 @@ void ToolbarLayoutManager::implts_setLayoutDirty() m_bLayoutDirty = true; } +void ToolbarLayoutManager::implts_setLayoutInProgress( bool bInProgress ) +{ + WriteGuard aWriteLock( m_aLock ); + m_bLayoutInProgress = bInProgress; +} + ::Rectangle ToolbarLayoutManager::implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ) { ::Rectangle aRect( rRect ); @@ -2895,14 +2828,18 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( ::Rectangle& rTrackingRect, const Point& rMousePos ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); ::Size aContainerWinSize; Window* pContainerWindow( 0 ); ::Rectangle aDockingAreaOffsets( m_aDockingAreaOffsets ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + + if ( !rUIElement.m_xUIElement.is() ) + { + rTrackingRect = ::Rectangle(); + return; + } { // Retrieve output size from container Window @@ -2911,12 +2848,6 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( aContainerWinSize = pContainerWindow->GetOutputSizePixel(); } - if ( !rUIElement.m_xUIElement.is() ) - { - rTrackingRect = ::Rectangle(); - return; - } - Window* pDockWindow( 0 ); Window* pDockingAreaWindow( 0 ); ToolBox* pToolBox( 0 ); @@ -2926,7 +2857,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( ui::DockingArea eDockedArea( (::com::sun::star::ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); - sal_Bool bHorizontalDockArea(( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || + bool bHorizontalDockArea(( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); sal_Int32 nMaxLeftRightDockAreaSize = aContainerWinSize.Height() - nTopDockingAreaSize - @@ -2935,11 +2866,9 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( aDockingAreaOffsets.Bottom(); ::Rectangle aDockingAreaRect; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aReadLock.lock(); xDockingAreaWindow = m_xDockAreaWindows[eDockedArea]; aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ { vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -2958,7 +2887,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( } // default docking operation, dock on the given row/column - sal_Bool bOpOutsideOfDockingArea( !aDockingAreaRect.IsInside( rMousePos )); + bool bOpOutsideOfDockingArea( !aDockingAreaRect.IsInside( rMousePos )); std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; rDockingOperation = DOCKOP_ON_COLROW; @@ -2998,7 +2927,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); } - sal_Bool bIsInsideRowCol( aRect.IsInside( rMousePos ) ); + bool bIsInsideRowCol( aRect.IsInside( rMousePos ) ); if ( bIsInsideRowCol ) { nIndex = i; @@ -3324,15 +3253,11 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d const ::Rectangle& rRowColumnRect, const ::Size& rContainerWinSize ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadGuard( m_aLock ); ::Rectangle aDockingAreaOffsets( m_aDockingAreaOffsets ); aReadGuard.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - - sal_Bool bHorizontalDockArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + bool bHorizontalDockArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); @@ -3406,9 +3331,7 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d void ToolbarLayoutManager::implts_setTrackingRect( ui::DockingArea eDockingArea, const ::Point& rMousePos, ::Rectangle& rTrackingRect ) { - sal_Bool bHorizontalDockArea( ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); - + bool bHorizontalDockArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); ::Point aPoint = rTrackingRect.TopLeft(); if ( bHorizontalDockArea ) aPoint.X() = rMousePos.X(); @@ -3423,14 +3346,11 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( DockingOperation /*eDockingOperation*/, const UIElement& rUIElement ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - sal_Bool bHorzDockingArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + bool bHorzDockingArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); sal_Int32 nRowCol( bHorzDockingArea ? rUIElement.m_aDockedData.m_aPos.Y() : rUIElement.m_aDockedData.m_aPos.X() ); @@ -3502,15 +3422,11 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( xReplace->replaceByName( aWindowElements[i], makeAny( aPropValueSeq )); } } - catch ( uno::Exception& ) - { - } + catch ( uno::Exception& ) {} } } } - catch ( uno::Exception& ) - { - } + catch ( uno::Exception& ) {} } } @@ -3523,7 +3439,7 @@ throw( css::uno::RuntimeException ) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); bool bLocked( m_bDockingInProgress ); - bool bDoLayout( m_bLayoutInProgress ); + bool bLayoutInProgress( m_bLayoutInProgress ); aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -3531,7 +3447,7 @@ throw( css::uno::RuntimeException ) // operations. We will store the new position and size in the docking handlers. // Do not do anything if we are in the middle of our layouting process. We will adapt the position // and size of the user interface elements. - if ( !bLocked && !bDoLayout ) + if ( !bLocked && !bLayoutInProgress ) { bool bNotify( false ); uno::Reference< css::awt::XWindow > xWindow( aEvent.Source, uno::UNO_QUERY ); @@ -3559,12 +3475,8 @@ throw( css::uno::RuntimeException ) } else { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - aWriteLock.lock(); - m_bLayoutDirty = true; - bNotify = true; - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + implts_setLayoutDirty(); + bNotify = true; } } @@ -3591,18 +3503,15 @@ throw( css::uno::RuntimeException ) //--------------------------------------------------------------------------------------------------------- // XDockableWindowListener //--------------------------------------------------------------------------------------------------------- -void SAL_CALL ToolbarLayoutManager::startDocking( - const awt::DockingEvent& e ) +void SAL_CALL ToolbarLayoutManager::startDocking( const awt::DockingEvent& e ) throw (uno::RuntimeException) { bool bWinFound( false ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadGuard( m_aLock ); uno::Reference< css::awt::XWindow2 > xContainerWindow( m_xContainerWindow ); uno::Reference< css::awt::XWindow2 > xWindow( e.Source, uno::UNO_QUERY ); aReadGuard.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ Window* pContainerWindow( 0 ); Window* pWindow( 0 ); @@ -3626,17 +3535,17 @@ throw (uno::RuntimeException) awt::Rectangle aPos = xWindow->getPosSize(); awt::Size aSize = xWindow->getOutputSize(); - aUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); - aUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); + aUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); + aUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); vos::OGuard aGuard( Application::GetSolarMutex() ); pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { ToolBox* pToolBox = (ToolBox *)pWindow; - aUIElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + aUIElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); + aUIElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || + ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); } } } @@ -3644,7 +3553,7 @@ throw (uno::RuntimeException) WriteGuard aWriteLock( m_aLock ); m_bDockingInProgress = bWinFound; m_aDockUIElement = aUIElement; - m_aDockUIElement.m_bUserActive = sal_True; + m_aDockUIElement.m_bUserActive = true; m_aStartDockMousePos = aMousePos; aWriteLock.unlock(); } @@ -3655,36 +3564,22 @@ throw (uno::RuntimeException) const sal_Int32 MAGNETIC_DISTANCE_UNDOCK = 25; const sal_Int32 MAGNETIC_DISTANCE_DOCK = 20; + ReadGuard aReadLock( m_aLock ); awt::DockingData aDockingData; uno::Reference< awt::XDockableWindow > xDockWindow( e.Source, uno::UNO_QUERY ); uno::Reference< awt::XWindow > xWindow( e.Source, uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xTopDockingWindow; - uno::Reference< awt::XWindow > xLeftDockingWindow; - uno::Reference< awt::XWindow > xRightDockingWindow; - uno::Reference< awt::XWindow > xBottomDockingWindow; - uno::Reference< awt::XWindow2 > xContainerWindow; - UIElement aUIDockingElement; + uno::Reference< awt::XWindow > xTopDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); + uno::Reference< awt::XWindow > xLeftDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); + uno::Reference< awt::XWindow > xRightDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] ); + uno::Reference< awt::XWindow > xBottomDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); + uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); + UIElement aUIDockingElement( m_aDockUIElement ); DockingOperation eDockingOperation( DOCKOP_ON_COLROW ); + bool bDockingInProgress = m_bDockingInProgress; + aReadLock.unlock(); - sal_Bool bDockingInProgress; - - { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; - if ( bDockingInProgress ) - { - xContainerWindow = m_xContainerWindow; - xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; - xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; - xRightDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; - xBottomDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; - aUIDockingElement = m_aDockUIElement; - - aDockingData.TrackingRectangle = e.TrackingRectangle; - } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - } + if ( bDockingInProgress ) + aDockingData.TrackingRectangle = e.TrackingRectangle; if ( bDockingInProgress && xDockWindow.is() && xWindow.is() ) { @@ -3750,25 +3645,25 @@ throw (uno::RuntimeException) if ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) { aUIDockingElement.m_aDockedData.m_nDockedArea = ui::DockingArea_DOCKINGAREA_TOP; - aUIDockingElement.m_bFloating = sal_False; + aUIDockingElement.m_bFloating = false; pDockingAreaWindow = VCLUnoHelper::GetWindow( xTopDockingWindow ); } else if ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) { aUIDockingElement.m_aDockedData.m_nDockedArea = ui::DockingArea_DOCKINGAREA_BOTTOM; - aUIDockingElement.m_bFloating = sal_False; + aUIDockingElement.m_bFloating = false; pDockingAreaWindow = VCLUnoHelper::GetWindow( xBottomDockingWindow ); } else if ( eDockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) { aUIDockingElement.m_aDockedData.m_nDockedArea = ui::DockingArea_DOCKINGAREA_LEFT; - aUIDockingElement.m_bFloating = sal_False; + aUIDockingElement.m_bFloating = false; pDockingAreaWindow = VCLUnoHelper::GetWindow( xLeftDockingWindow ); } else if ( eDockingArea == ui::DockingArea_DOCKINGAREA_RIGHT ) { aUIDockingElement.m_aDockedData.m_nDockedArea = ui::DockingArea_DOCKINGAREA_RIGHT; - aUIDockingElement.m_bFloating = sal_False; + aUIDockingElement.m_bFloating = false; pDockingAreaWindow = VCLUnoHelper::GetWindow( xRightDockingWindow ); } @@ -3779,17 +3674,16 @@ throw (uno::RuntimeException) implts_calcDockingPosSize( aUIDockingElement, eDockingOperation, aNewDockingRect, aMousePos ); ::Point aScreenPos = pContainerWindow->OutputToScreenPixel( aNewDockingRect.TopLeft() ); - aNewTrackingRect = css::awt::Rectangle( aScreenPos.X(), - aScreenPos.Y(), - aNewDockingRect.getWidth(), - aNewDockingRect.getHeight() ); + aNewTrackingRect = awt::Rectangle( aScreenPos.X(), + aScreenPos.Y(), + aNewDockingRect.getWidth(), + aNewDockingRect.getHeight() ); aDockingData.TrackingRectangle = aNewTrackingRect; } else if ( pToolBox && bDockingInProgress ) { - sal_Bool bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); - ::Size aFloatSize = aUIDockingElement.m_aFloatingData.m_aSize; + bool bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + ::Size aFloatSize = aUIDockingElement.m_aFloatingData.m_aSize; if ( aFloatSize.Width() > 0 && aFloatSize.Height() > 0 ) { aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( @@ -3841,9 +3735,7 @@ throw (uno::RuntimeException) aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } - catch ( uno::Exception& ) - { - } + catch ( uno::Exception& ) {} } return aDockingData; @@ -3852,9 +3744,9 @@ throw (uno::RuntimeException) void SAL_CALL ToolbarLayoutManager::endDocking( const awt::EndDockingEvent& e ) throw (uno::RuntimeException) { - bool bDockingInProgress( false ); - bool bStartDockFloated( false ); - bool bFloating( false ); + bool bDockingInProgress( false ); + bool bStartDockFloated( false ); + bool bFloating( false ); UIElement aUIDockingElement; /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -3950,7 +3842,7 @@ throw (uno::RuntimeException) sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( const lang::EventObject& e ) throw (uno::RuntimeException) { - sal_Bool bDockingInProgress( sal_False ); + bool bDockingInProgress( false ); ReadGuard aReadLock( m_aLock ); bDockingInProgress = m_bDockingInProgress; @@ -3995,11 +3887,10 @@ throw (uno::RuntimeException) return sal_True; } -void SAL_CALL ToolbarLayoutManager::toggleFloatingMode( - const lang::EventObject& e ) +void SAL_CALL ToolbarLayoutManager::toggleFloatingMode( const lang::EventObject& e ) throw (uno::RuntimeException) { - sal_Bool bDockingInProgress( sal_False ); + bool bDockingInProgress( false ); UIElement aUIDockingElement; ReadGuard aReadLock( m_aLock ); @@ -4029,9 +3920,9 @@ throw (uno::RuntimeException) if ( bWinFound && xWindow.is() ) { aUIDockingElement.m_bFloating = !aUIDockingElement.m_bFloating; - aUIDockingElement.m_bUserActive = sal_True; + aUIDockingElement.m_bUserActive = true; - implts_setLayoutDirty(); + implts_setLayoutInProgress( true ); if ( aUIDockingElement.m_bFloating ) { vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -4044,10 +3935,8 @@ throw (uno::RuntimeException) pToolBox->SetAlign( WINDOWALIGN_LEFT ); } - sal_Bool bUndefPos = ( aUIDockingElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || - aUIDockingElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); - sal_Bool bSetSize = ( aUIDockingElement.m_aFloatingData.m_aSize.Width() != 0 && - aUIDockingElement.m_aFloatingData.m_aSize.Height() != 0 ); + bool bUndefPos = ( aUIDockingElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || aUIDockingElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); + bool bSetSize = ( aUIDockingElement.m_aFloatingData.m_aSize.Width() != 0 && aUIDockingElement.m_aFloatingData.m_aSize.Height() != 0 ); if ( bUndefPos ) aUIDockingElement.m_aFloatingData.m_aPos = implts_findNextCascadeFloatingPos(); @@ -4062,13 +3951,12 @@ throw (uno::RuntimeException) xWindow->setPosSize( aUIDockingElement.m_aFloatingData.m_aPos.X(), aUIDockingElement.m_aFloatingData.m_aPos.Y(), - 0, 0, css::awt::PosSize::POS ); + 0, 0, awt::PosSize::POS ); xWindow->setOutputSize( AWTSize( aUIDockingElement.m_aFloatingData.m_aSize ) ); } else { - if (( aUIDockingElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && - ( aUIDockingElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + if (( aUIDockingElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && ( aUIDockingElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) { // Docking on its default position without a preset position - // we have to find a good place for it. @@ -4102,10 +3990,18 @@ throw (uno::RuntimeException) } } + implts_setLayoutInProgress( false ); implts_setToolbar( aUIDockingElement ); implts_writeWindowStateData( aUIDockingElement ); implts_sortUIElements(); implts_setLayoutDirty(); + + aReadLock.lock(); + ILayoutNotifications* pParentLayouter( m_pParentLayouter ); + aReadLock.unlock(); + + if ( pParentLayouter ) + pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); } } else @@ -4182,15 +4078,9 @@ throw (uno::RuntimeException) if ( xPropSet.is() ) xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= aUIName; } - catch ( container::NoSuchElementException& ) - { - } - catch ( beans::UnknownPropertyException& ) - { - } - catch ( lang::WrappedTargetException& ) - { - } + catch ( container::NoSuchElementException& ) {} + catch ( beans::UnknownPropertyException& ) {} + catch ( lang::WrappedTargetException& ) {} { vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -4282,12 +4172,12 @@ throw (uno::RuntimeException) xElementSettings->updateSettings(); WriteGuard aWriteLock( m_aLock ); - bool bDirty = !aUIElement.m_bFloating; - m_bLayoutDirty = bDirty; + bool bNotify = !aUIElement.m_bFloating; + m_bLayoutDirty = bNotify; ILayoutNotifications* pParentLayouter( m_pParentLayouter ); aWriteLock.unlock(); - if ( bDirty && pParentLayouter ) + if ( bNotify && pParentLayouter ) pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); } } @@ -4318,7 +4208,6 @@ uno::Sequence< uno::Reference< ui::XUIElement > > ToolbarLayoutManager::getToolb } } } - aReadLock.unlock(); return aSeq; } @@ -4334,7 +4223,7 @@ bool ToolbarLayoutManager::floatToolbar( const ::rtl::OUString& rResourceURL ) uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( xWindow.is() && xWindow->isVisible() && xDockWindow.is() && !xDockWindow->isFloating() ) { - aUIElement.m_aDockedData.m_bLocked = true; + aUIElement.m_bFloating = true; implts_writeWindowStateData( aUIElement ); xDockWindow->setFloatingMode( true ); @@ -4410,7 +4299,7 @@ bool ToolbarLayoutManager::isToolbarVisible( const ::rtl::OUString& rResourceURL bool ToolbarLayoutManager::isToolbarFloating( const ::rtl::OUString& rResourceURL ) { uno::Reference< awt::XDockableWindow > xDockWindow( implts_getXWindow( rResourceURL ), uno::UNO_QUERY ); - return ( xDockWindow.is() && !xDockWindow->isFloating() ); + return ( xDockWindow.is() && xDockWindow->isFloating() ); } bool ToolbarLayoutManager::isToolbarDocked( const ::rtl::OUString& rResourceURL ) @@ -4421,7 +4310,7 @@ bool ToolbarLayoutManager::isToolbarDocked( const ::rtl::OUString& rResourceURL bool ToolbarLayoutManager::isToolbarLocked( const ::rtl::OUString& rResourceURL ) { uno::Reference< awt::XDockableWindow > xDockWindow( implts_getXWindow( rResourceURL ), uno::UNO_QUERY ); - return ( xDockWindow.is() && !xDockWindow->isLocked() ); + return ( xDockWindow.is() && xDockWindow->isLocked() ); } awt::Size ToolbarLayoutManager::getToolbarSize( const ::rtl::OUString& rResourceURL ) @@ -4468,13 +4357,13 @@ awt::Point ToolbarLayoutManager::getToolbarPos( const ::rtl::OUString& rResource void ToolbarLayoutManager::setToolbarSize( const ::rtl::OUString& rResourceURL, const awt::Size& aSize ) { - uno::Reference< awt::XWindow > xWindow( implts_getXWindow( rResourceURL )); + uno::Reference< awt::XWindow2 > xWindow( implts_getXWindow( rResourceURL ), uno::UNO_QUERY ); uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); UIElement aUIElement = implts_findToolbar( rResourceURL ); if ( xWindow.is() && xDockWindow.is() && xDockWindow->isFloating() ) { - xWindow->setPosSize( 0, 0, aSize.Width, aSize.Height, awt::PosSize::SIZE ); + xWindow->setOutputSize( aSize ); aUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); implts_setToolbar( aUIElement ); implts_writeWindowStateData( aUIElement ); diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index 4357b9bd34be..db5ef0ba2b0a 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -238,6 +238,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a SingleRowColumnWindowData& rRowColumnWindowData, const ::Size& rContainerSize ); void implts_setLayoutDirty(); + void implts_setLayoutInProgress( bool bInProgress = true ); + bool implts_isLayoutInProgress() const { return m_bLayoutInProgress; } //--------------------------------------------------------------------------------------------------------- // lookup/container methods From 8bba589bec0a3811fc7f1f60985152ec01ccd084 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 21 Oct 2010 15:45:06 +0200 Subject: [PATCH 196/279] sb131: #i114962# active.oxt to complement passive.oxt --- desktop/prj/build.lst | 1 + desktop/test/deployment/active/Addons.xcu | 67 ++++ desktop/test/deployment/active/Dispatch.java | 101 ++++++ desktop/test/deployment/active/MANIFEST.MF | 3 + .../deployment/active/ProtocolHandler.xcu | 48 +++ desktop/test/deployment/active/Provider.java | 81 +++++ desktop/test/deployment/active/Services.java | 72 ++++ .../test/deployment/active/active_native.cxx | 320 ++++++++++++++++++ .../test/deployment/active/active_python.py | 120 +++++++ .../test/deployment/active/description.xml | 37 ++ desktop/test/deployment/active/makefile.mk | 84 +++++ desktop/test/deployment/active/manifest.xml | 43 +++ .../passive/{manifest.mf => MANIFEST.MF} | 0 desktop/test/deployment/passive/makefile.mk | 6 +- desktop/test/deployment/passive/manifest.xml | 3 - 15 files changed, 980 insertions(+), 6 deletions(-) create mode 100644 desktop/test/deployment/active/Addons.xcu create mode 100644 desktop/test/deployment/active/Dispatch.java create mode 100644 desktop/test/deployment/active/MANIFEST.MF create mode 100644 desktop/test/deployment/active/ProtocolHandler.xcu create mode 100644 desktop/test/deployment/active/Provider.java create mode 100644 desktop/test/deployment/active/Services.java create mode 100644 desktop/test/deployment/active/active_native.cxx create mode 100644 desktop/test/deployment/active/active_python.py create mode 100644 desktop/test/deployment/active/description.xml create mode 100644 desktop/test/deployment/active/makefile.mk create mode 100644 desktop/test/deployment/active/manifest.xml rename desktop/test/deployment/passive/{manifest.mf => MANIFEST.MF} (100%) diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index 3937ff47072f..a09472f067dc 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -41,5 +41,6 @@ dt desktop\registry\data\org\openoffice\Office nmake - a dt desktop\source\registration\com\sun\star\servicetag\resources get - all sn_svctagres NULL dt desktop\source\registration\com\sun\star\servicetag nmake - all sn_svctag NULL dt desktop\source\registration\com\sun\star\registration nmake - all sn_regjob sn_svctag NULL +dt desktop\test\deployment\active nmake - all dt_test_deployment_active NULL dt desktop\test\deployment\boxt nmake - all dt_test_deployment_boxt NULL dt desktop\test\deployment\passive nmake - all dt_test_deployment_passive NULL diff --git a/desktop/test/deployment/active/Addons.xcu b/desktop/test/deployment/active/Addons.xcu new file mode 100644 index 000000000000..cc75f2ab8f64 --- /dev/null +++ b/desktop/test/deployment/active/Addons.xcu @@ -0,0 +1,67 @@ + + + + + + + + + active + + + + + vnd.org.openoffice.test.desktop.deployment.active_native: + + + native + + + + + vnd.org.openoffice.test.desktop.deployment.active_java: + + + java + + + + + vnd.org.openoffice.test.desktop.deployment.active_python: + + + python + + + + + + + diff --git a/desktop/test/deployment/active/Dispatch.java b/desktop/test/deployment/active/Dispatch.java new file mode 100644 index 000000000000..25443f96e092 --- /dev/null +++ b/desktop/test/deployment/active/Dispatch.java @@ -0,0 +1,101 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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 +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +package com.sun.star.comp.test.deployment.active_java; + +import com.sun.star.awt.MessageBoxButtons; +import com.sun.star.awt.Rectangle; +import com.sun.star.awt.XMessageBox; +import com.sun.star.awt.XMessageBoxFactory; +import com.sun.star.awt.XWindowPeer; +import com.sun.star.beans.PropertyValue; +import com.sun.star.frame.DispatchDescriptor; +import com.sun.star.frame.XDesktop; +import com.sun.star.frame.XDispatch; +import com.sun.star.frame.XStatusListener; +import com.sun.star.lang.WrappedTargetRuntimeException; +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XMultiComponentFactory; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lib.uno.helper.WeakBase; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XComponentContext; +import com.sun.star.util.URL; + +public final class Dispatch extends WeakBase implements XServiceInfo, XDispatch +{ + public Dispatch(XComponentContext context) { + this.context = context; + } + + public String getImplementationName() { return implementationName; } + + public boolean supportsService(String ServiceName) { + return false; //TODO + } + + public String[] getSupportedServiceNames() { + return serviceNames; + } + + public void dispatch(URL URL, PropertyValue[] Arguments) { + try { + XMultiComponentFactory smgr = UnoRuntime.queryInterface( + XMultiComponentFactory.class, context.getServiceManager()); + XMessageBox box = UnoRuntime.queryInterface( + XMessageBoxFactory.class, + smgr.createInstanceWithContext( + "com.sun.star.awt.Toolkit", context)). + createMessageBox( + UnoRuntime.queryInterface( + XWindowPeer.class, + (UnoRuntime.queryInterface( + XDesktop.class, + smgr.createInstanceWithContext( + "com.sun.star.frame.Desktop", context)). + getCurrentFrame().getComponentWindow())), + new Rectangle(), "infobox", MessageBoxButtons.BUTTONS_OK, + "active", "java"); + box.execute(); + UnoRuntime.queryInterface(XComponent.class, box).dispose(); + } catch (com.sun.star.uno.RuntimeException e) { + throw e; + } catch (com.sun.star.uno.Exception e) { + throw new WrappedTargetRuntimeException( + "wrapped: " + e.getMessage(), this, e); + } + } + + public void addStatusListener(XStatusListener Control, URL URL) {} + + public void removeStatusListener(XStatusListener Control, URL URL) {} + + private final XComponentContext context; + + static final String implementationName = + "com.sun.star.comp.test.deployment.active_java_singleton"; + + static final String[] serviceNames = new String[0]; +} diff --git a/desktop/test/deployment/active/MANIFEST.MF b/desktop/test/deployment/active/MANIFEST.MF new file mode 100644 index 000000000000..63480874dd55 --- /dev/null +++ b/desktop/test/deployment/active/MANIFEST.MF @@ -0,0 +1,3 @@ +Sealed: true +RegistrationClassName: com.sun.star.comp.test.deployment.active_java.Services +UNO-Type-Path: diff --git a/desktop/test/deployment/active/ProtocolHandler.xcu b/desktop/test/deployment/active/ProtocolHandler.xcu new file mode 100644 index 000000000000..017bdea72bea --- /dev/null +++ b/desktop/test/deployment/active/ProtocolHandler.xcu @@ -0,0 +1,48 @@ + + + + + + + + vnd.org.openoffice.test.desktop.deployment.active_native:* + + + + + vnd.org.openoffice.test.desktop.deployment.active_java:* + + + + + vnd.org.openoffice.test.desktop.deployment.active_python:* + + + + diff --git a/desktop/test/deployment/active/Provider.java b/desktop/test/deployment/active/Provider.java new file mode 100644 index 000000000000..df31979f4b9d --- /dev/null +++ b/desktop/test/deployment/active/Provider.java @@ -0,0 +1,81 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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 +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +package com.sun.star.comp.test.deployment.active_java; + +import com.sun.star.frame.DispatchDescriptor; +import com.sun.star.frame.XDispatch; +import com.sun.star.frame.XDispatchProvider; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lib.uno.helper.WeakBase; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XComponentContext; +import com.sun.star.util.URL; + +public final class Provider extends WeakBase + implements XServiceInfo, XDispatchProvider +{ + public Provider(XComponentContext context) { + this.context = context; + } + + public String getImplementationName() { return implementationName; } + + public boolean supportsService(String ServiceName) { + return ServiceName.equals(getSupportedServiceNames()[0]); //TODO + } + + public String[] getSupportedServiceNames() { + return serviceNames; + } + + public XDispatch queryDispatch( + URL URL, String TargetFrameName, int SearchFlags) + { + return UnoRuntime.queryInterface( + XDispatch.class, + context.getValueByName( + "/singletons/" + + "com.sun.star.test.deployment.active_java_singleton")); + } + + public XDispatch[] queryDispatches(DispatchDescriptor[] Requests) { + XDispatch[] s = new XDispatch[Requests.length]; + for (int i = 0; i < s.length; ++i) { + s[i] = queryDispatch( + Requests[i].FeatureURL, Requests[i].FrameName, + Requests[i].SearchFlags); + } + return s; + } + + private final XComponentContext context; + + static final String implementationName = + "com.sun.star.comp.test.deployment.active_java"; + + static final String[] serviceNames = new String[] { + "com.sun.star.test.deployment.active_java" }; +} diff --git a/desktop/test/deployment/active/Services.java b/desktop/test/deployment/active/Services.java new file mode 100644 index 000000000000..4ea19f4b7a71 --- /dev/null +++ b/desktop/test/deployment/active/Services.java @@ -0,0 +1,72 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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 +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +package com.sun.star.comp.test.deployment.active_java; + +import com.sun.star.lang.XSingleComponentFactory; +import com.sun.star.lib.uno.helper.Factory; +import com.sun.star.registry.InvalidRegistryException; +import com.sun.star.registry.XRegistryKey; + +public final class Services { + private Services() {} + + public static XSingleComponentFactory __getComponentFactory( + String implementation) + { + if (implementation.equals(Dispatch.implementationName)) { + return Factory.createComponentFactory( + Dispatch.class, Dispatch.implementationName, + Dispatch.serviceNames); + } else if (implementation.equals(Provider.implementationName)) { + return Factory.createComponentFactory( + Provider.class, Provider.implementationName, + Provider.serviceNames); + } else { + return null; + } + } + + public static boolean __writeRegistryServiceInfo(XRegistryKey key) { + if (!(Factory.writeRegistryServiceInfo( + Dispatch.implementationName, Dispatch.serviceNames, key) && + Factory.writeRegistryServiceInfo( + Provider.implementationName, Provider.serviceNames, key))) + { + return false; + } + try { + key. + createKey( + "/" + Dispatch.implementationName + + "/UNO/SINGLETONS/" + + "com.sun.star.test.deployment.active_java_singleton"). + setStringValue(Dispatch.implementationName); + } catch (InvalidRegistryException e) { + return false; + } + return true; + } +} diff --git a/desktop/test/deployment/active/active_native.cxx b/desktop/test/deployment/active/active_native.cxx new file mode 100644 index 000000000000..a34d8de88a61 --- /dev/null +++ b/desktop/test/deployment/active/active_native.cxx @@ -0,0 +1,320 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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 +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "precompiled_desktop.hxx" +#include "sal/config.h" + +#include "boost/noncopyable.hpp" +#include "com/sun/star/awt/MessageBoxButtons.hpp" +#include "com/sun/star/awt/Rectangle.hpp" +#include "com/sun/star/awt/XMessageBox.hpp" +#include "com/sun/star/awt/XMessageBoxFactory.hpp" +#include "com/sun/star/awt/XWindowPeer.hpp" +#include "com/sun/star/beans/PropertyValue.hpp" +#include "com/sun/star/frame/DispatchDescriptor.hpp" +#include "com/sun/star/frame/XDesktop.hpp" +#include "com/sun/star/frame/XDispatch.hpp" +#include "com/sun/star/frame/XDispatchProvider.hpp" +#include "com/sun/star/frame/XFrame.hpp" +#include "com/sun/star/frame/XStatusListener.hpp" +#include "com/sun/star/lang/XComponent.hpp" +#include "com/sun/star/lang/XMultiComponentFactory.hpp" +#include "com/sun/star/lang/XServiceInfo.hpp" +#include "com/sun/star/registry/XRegistryKey.hpp" +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/util/URL.hpp" +#include "cppuhelper/factory.hxx" +#include "cppuhelper/implbase2.hxx" +#include "cppuhelper/implementationentry.hxx" +#include "cppuhelper/weak.hxx" +#include "osl/diagnose.h" +#include "rtl/textenc.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "uno/lbnames.h" + +namespace { + +namespace css = com::sun::star; + +class Provider: + public cppu::WeakImplHelper2< + css::lang::XServiceInfo, css::frame::XDispatchProvider >, + private boost::noncopyable +{ +public: + static css::uno::Reference< css::uno::XInterface > SAL_CALL static_create( + css::uno::Reference< css::uno::XComponentContext > const & xContext) + SAL_THROW((css::uno::Exception)) + { return static_cast< cppu::OWeakObject * >(new Provider(xContext)); } + + static rtl::OUString SAL_CALL static_getImplementationName(); + + static css::uno::Sequence< rtl::OUString > SAL_CALL + static_getSupportedServiceNames(); + +private: + Provider( + css::uno::Reference< css::uno::XComponentContext > const & context): + context_(context) { OSL_ASSERT(context.is()); } + + virtual ~Provider() {} + + virtual rtl::OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException) + { return static_getImplementationName(); } + + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) + throw (css::uno::RuntimeException) + { return ServiceName == getSupportedServiceNames()[0]; } //TODO + + virtual css::uno::Sequence< rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (css::uno::RuntimeException) + { return static_getSupportedServiceNames(); } + + virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( + css::util::URL const &, rtl::OUString const &, sal_Int32) + throw (css::uno::RuntimeException); + + virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > + SAL_CALL queryDispatches( + css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) + throw (css::uno::RuntimeException); + + css::uno::Reference< css::uno::XComponentContext > context_; +}; + +rtl::OUString Provider::static_getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.test.deployment.active_native")); +} + +css::uno::Sequence< rtl::OUString > Provider::static_getSupportedServiceNames() +{ + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.test.deployment.active_native")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +css::uno::Reference< css::frame::XDispatch > Provider::queryDispatch( + css::util::URL const &, rtl::OUString const &, sal_Int32) + throw (css::uno::RuntimeException) +{ + css::uno::Reference< css::frame::XDispatch > dispatch; + if (!(context_->getValueByName( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "/singletons/com.sun.star.test.deployment." + "active_native_singleton"))) >>= + dispatch) || + !dispatch.is()) + { + throw css::uno::DeploymentException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "component context fails to supply singleton" + " com.sun.star.test.deployment.active_native_singleton of" + " type com.sun.star.frame.XDispatch")), + context_); + } + return dispatch; +} + +css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > +Provider::queryDispatches( + css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) + throw (css::uno::RuntimeException) +{ + css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > s( + Requests.getLength()); + for (sal_Int32 i = 0; i < s.getLength(); ++i) { + s[i] = queryDispatch( + Requests[i].FeatureURL, Requests[i].FrameName, + Requests[i].SearchFlags); + } + return s; +} + +class Dispatch: + public cppu::WeakImplHelper2< + css::lang::XServiceInfo, css::frame::XDispatch >, + private boost::noncopyable +{ +public: + static css::uno::Reference< css::uno::XInterface > SAL_CALL static_create( + css::uno::Reference< css::uno::XComponentContext > const & xContext) + SAL_THROW((css::uno::Exception)) + { return static_cast< cppu::OWeakObject * >(new Dispatch(xContext)); } + + static rtl::OUString SAL_CALL static_getImplementationName(); + + static css::uno::Sequence< rtl::OUString > SAL_CALL + static_getSupportedServiceNames() + { return css::uno::Sequence< rtl::OUString >(); } + +private: + Dispatch( + css::uno::Reference< css::uno::XComponentContext > const & context): + context_(context) { OSL_ASSERT(context.is()); } + + virtual ~Dispatch() {} + + virtual rtl::OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException) + { return static_getImplementationName(); } + + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const &) + throw (css::uno::RuntimeException) + { return false; } //TODO + + virtual css::uno::Sequence< rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (css::uno::RuntimeException) + { return static_getSupportedServiceNames(); } + + virtual void SAL_CALL dispatch( + css::util::URL const &, + css::uno::Sequence< css::beans::PropertyValue > const &) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL addStatusListener( + css::uno::Reference< css::frame::XStatusListener > const &, + css::util::URL const &) + throw (css::uno::RuntimeException) + {} + + virtual void SAL_CALL removeStatusListener( + css::uno::Reference< css::frame::XStatusListener > const &, + css::util::URL const &) + throw (css::uno::RuntimeException) + {} + + css::uno::Reference< css::uno::XComponentContext > context_; +}; + +rtl::OUString Dispatch::static_getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.test.deployment.active_native_singleton")); +} + +void Dispatch::dispatch( + css::util::URL const &, + css::uno::Sequence< css::beans::PropertyValue > const &) + throw (css::uno::RuntimeException) +{ + css::uno::Reference< css::lang::XMultiComponentFactory > smgr( + context_->getServiceManager(), css::uno::UNO_SET_THROW); + css::uno::Reference< css::awt::XMessageBox > box( + css::uno::Reference< css::awt::XMessageBoxFactory >( + smgr->createInstanceWithContext( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.awt.Toolkit")), context_), + css::uno::UNO_QUERY_THROW)->createMessageBox( + css::uno::Reference< css::awt::XWindowPeer >( + css::uno::Reference< css::frame::XFrame >( + css::uno::Reference< css::frame::XDesktop >( + smgr->createInstanceWithContext( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.frame.Desktop")), + context_), + css::uno::UNO_QUERY_THROW)->getCurrentFrame(), + css::uno::UNO_SET_THROW)->getComponentWindow(), + css::uno::UNO_QUERY_THROW), + css::awt::Rectangle(), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("infobox")), + css::awt::MessageBoxButtons::BUTTONS_OK, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("active")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("native"))), + css::uno::UNO_SET_THROW); + box->execute(); + css::uno::Reference< css::lang::XComponent >( + box, css::uno::UNO_QUERY_THROW)->dispose(); +} + +static cppu::ImplementationEntry const services[] = { + { &Provider::static_create, &Provider::static_getImplementationName, + &Provider::static_getSupportedServiceNames, + &cppu::createSingleComponentFactory, 0, 0 }, + { &Dispatch::static_create, &Dispatch::static_getImplementationName, + &Dispatch::static_getSupportedServiceNames, + &cppu::createSingleComponentFactory, 0, 0 }, + { 0, 0, 0, 0, 0, 0 } +}; + +} + +extern "C" void * SAL_CALL component_getFactory( + char const * pImplName, void * pServiceManager, void * pRegistryKey) +{ + return cppu::component_getFactoryHelper( + pImplName, pServiceManager, pRegistryKey, services); +} + +extern "C" void SAL_CALL component_getImplementationEnvironment( + char const ** ppEnvTypeName, uno_Environment **) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} + +extern "C" sal_Bool SAL_CALL component_writeInfo( + void * pServiceManager, void * pRegistryKey) +{ + if (!component_writeInfoHelper(pServiceManager, pRegistryKey, services)) { + return false; + } + try { + css::uno::Reference< css::registry::XRegistryKey >( + (css::uno::Reference< css::registry::XRegistryKey >( + static_cast< css::registry::XRegistryKey * >(pRegistryKey))-> + createKey( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + + Dispatch::static_getImplementationName() + + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "/UNO/SINGLETONS/com.sun.star.test.deployment." + "active_native_singleton")))), + css::uno::UNO_SET_THROW)-> + setStringValue(Dispatch::static_getImplementationName()); + } catch (css::uno::Exception & e) { + (void) e; + OSL_TRACE( + "active_native component_writeInfo exception: %s", + rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); + return false; + } + return true; +} diff --git a/desktop/test/deployment/active/active_python.py b/desktop/test/deployment/active/active_python.py new file mode 100644 index 000000000000..8ba0947b6bf8 --- /dev/null +++ b/desktop/test/deployment/active/active_python.py @@ -0,0 +1,120 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +import uno +import unohelper + +from com.sun.star.awt import Rectangle +from com.sun.star.awt.MessageBoxButtons import BUTTONS_OK +from com.sun.star.frame import XDispatch, XDispatchProvider +from com.sun.star.lang import XServiceInfo +from com.sun.star.registry import InvalidRegistryException + +class Provider(unohelper.Base, XServiceInfo, XDispatchProvider): + implementationName = "com.sun.star.comp.test.deployment.active_python" + + serviceNames = ("com.sun.star.test.deployment.active_python",) + + def __init__(self, context): + self.context = context + + def getImplementationName(self): + return self.implementationName + + def supportsService(self, ServiceName): + return ServiceName in self.serviceNames + + def getSupportedServiceNames(self): + return self.serviceNames + + def queryDispatch(self, URL, TargetFrame, SearchFlags): + return self.context.getValueByName( \ + "/singletons/com.sun.star.test.deployment.active_python_singleton") + + def queryDispatches(self, Requests): + tuple( \ + self.queryDispatch(i.FeatureURL, i.FrameName, i.SearchFlags) \ + for i in Requests) + +class Dispatch(unohelper.Base, XServiceInfo, XDispatch): + implementationName = \ + "com.sun.star.comp.test.deployment.active_python_singleton" + + serviceNames = () + + def __init__(self, context): + self.context = context + + def getImplementationName(self): + return self.implementationName + + def supportsService(self, ServiceName): + return ServiceName in self.serviceNames + + def getSupportedServiceNames(self): + return self.serviceNames + + def dispatch(self, URL, Arguments): + smgr = self.context.getServiceManager() + box = smgr.createInstanceWithContext( \ + "com.sun.star.awt.Toolkit", self.context).createMessageBox( \ + smgr.createInstanceWithContext( \ + "com.sun.star.frame.Desktop", self.context). \ + getCurrentFrame().getComponentWindow(), \ + Rectangle(), "infobox", BUTTONS_OK, "active", "python") + box.execute(); + box.dispose(); + + def addStatusListener(self, Control, URL): + pass + + def removeStatusListener(self, Control, URL): + pass + +def getComponentFactory(implementationName, smgr, regKey): + if implementationName == Provider.implementationName: + return unohelper.createSingleServiceFactory( \ + Provider, Provider.implementationName, Provider.serviceNames) + elif implementationName == Dispatch.implementationName: + return unohelper.createSingleServiceFactory( \ + Dispatch, Dispatch.implementationName, Dispatch.serviceNames) + else: + return None + +def writeRegistryInfo(smgr, regKey): + try: + for i in (Provider, Dispatch): + key = regKey.createKey("/" + i.implementationName + "/UNO") + for j in i.serviceNames: + key.createKey("/SERVICES/" + j); + regKey.createKey( \ + "/" + Dispatch.implementationName + "/UNO/SINGLETONS/" \ + "com.sun.star.test.deployment.active_python_singleton"). \ + setStringValue(Dispatch.implementationName) + except InvalidRegistryException: + return False + return True diff --git a/desktop/test/deployment/active/description.xml b/desktop/test/deployment/active/description.xml new file mode 100644 index 000000000000..f5675533cd05 --- /dev/null +++ b/desktop/test/deployment/active/description.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/desktop/test/deployment/active/makefile.mk b/desktop/test/deployment/active/makefile.mk new file mode 100644 index 000000000000..fe31bd66db0e --- /dev/null +++ b/desktop/test/deployment/active/makefile.mk @@ -0,0 +1,84 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +PRJ = ../../.. +PRJNAME = desktop +TARGET = test_deployment_active + +ENABLE_EXCEPTIONS = TRUE + +PACKAGE = com/sun/star/comp/test/deployment/active_java +JAVAFILES = Dispatch.java Provider.java Services.java +JARFILES = juh.jar ridl.jar unoil.jar + +.INCLUDE: settings.mk + +DLLPRE = + +SLOFILES = $(SHL1OBJS) + +SHL1TARGET = active_native.uno +SHL1OBJS = $(SLO)/active_native.obj +SHL1RPATH = OXT +SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) +SHL1VERSIONMAP = $(SOLARENV)/src/reg-component.map +DEF1NAME = $(SHL1TARGET) + +.INCLUDE: target.mk + +ALLTAR : $(MISC)/active.oxt + +$(MISC)/active.oxt : manifest.xml description.xml Addons.xcu \ + ProtocolHandler.xcu $(SHL1TARGETN) $(MISC)/$(TARGET)/active_java.jar \ + active_python.py + $(RM) $@ + $(RM) -r $(MISC)/$(TARGET)/active.oxt-zip + $(MKDIR) $(MISC)/$(TARGET)/active.oxt-zip + $(MKDIRHIER) $(MISC)/$(TARGET)/active.oxt-zip/META-INF + $(SED) -e 's|@PATH@|$(SHL1TARGETN:f)|g' < manifest.xml \ + > $(MISC)/$(TARGET)/active.oxt-zip/META-INF/manifest.xml + $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' < description.xml \ + > $(MISC)/$(TARGET)/active.oxt-zip/description.xml + $(COPY) Addons.xcu ProtocolHandler.xcu $(SHL1TARGETN) \ + $(MISC)/$(TARGET)/active_java.jar active_python.py \ + $(MISC)/$(TARGET)/active.oxt-zip/ + cd $(MISC)/$(TARGET)/active.oxt-zip && zip ../../active.oxt \ + META-INF/manifest.xml description.xml Addons.xcu ProtocolHandler.xcu \ + $(SHL1TARGETN:f) active_java.jar active_python.py + +$(MISC)/$(TARGET)/active_java.jar : MANIFEST.MF $(JAVATARGET) + $(MKDIRHIER) $(@:d) + $(RM) $@ + $(RM) -r $(MISC)/$(TARGET)/active_java.jar-zip + $(MKDIR) $(MISC)/$(TARGET)/active_java.jar-zip + $(MKDIRHIER) $(MISC)/$(TARGET)/active_java.jar-zip/META-INF \ + $(MISC)/$(TARGET)/active_java.jar-zip/$(PACKAGE) + $(COPY) MANIFEST.MF $(MISC)/$(TARGET)/active_java.jar-zip/META-INF/ + $(COPY) $(foreach,i,$(JAVAFILES:b) $(CLASSDIR)/$(PACKAGE)/$i.class) \ + $(MISC)/$(TARGET)/active_java.jar-zip/$(PACKAGE)/ + cd $(MISC)/$(TARGET)/active_java.jar-zip && zip ../active_java.jar \ + META-INF/MANIFEST.MF $(foreach,i,$(JAVAFILES:b) $(PACKAGE)/$i.class) diff --git a/desktop/test/deployment/active/manifest.xml b/desktop/test/deployment/active/manifest.xml new file mode 100644 index 000000000000..1256da145a93 --- /dev/null +++ b/desktop/test/deployment/active/manifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + diff --git a/desktop/test/deployment/passive/manifest.mf b/desktop/test/deployment/passive/MANIFEST.MF similarity index 100% rename from desktop/test/deployment/passive/manifest.mf rename to desktop/test/deployment/passive/MANIFEST.MF diff --git a/desktop/test/deployment/passive/makefile.mk b/desktop/test/deployment/passive/makefile.mk index 2d75d1d253d4..0f24faf56554 100644 --- a/desktop/test/deployment/passive/makefile.mk +++ b/desktop/test/deployment/passive/makefile.mk @@ -105,15 +105,15 @@ $(MISC)/$(TARGET)/passive_python.component : \ '$(COMPONENTPREFIX_EXTENSION)passive_python.py' -o $@ \ $(SOLARENV)/bin/createcomponent.xslt passive_python.component -$(MISC)/$(TARGET)/passive_java.jar : manifest.mf $(JAVATARGET) +$(MISC)/$(TARGET)/passive_java.jar : MANIFEST.MF $(JAVATARGET) $(MKDIRHIER) $(@:d) $(RM) $@ $(RM) -r $(MISC)/$(TARGET)/passive_java.jar-zip $(MKDIR) $(MISC)/$(TARGET)/passive_java.jar-zip $(MKDIRHIER) $(MISC)/$(TARGET)/passive_java.jar-zip/META-INF \ $(MISC)/$(TARGET)/passive_java.jar-zip/$(PACKAGE) - $(COPY) manifest.mf $(MISC)/$(TARGET)/passive_java.jar-zip/META-INF/ + $(COPY) MANIFEST.MF $(MISC)/$(TARGET)/passive_java.jar-zip/META-INF/ $(COPY) $(foreach,i,$(JAVAFILES:b) $(CLASSDIR)/$(PACKAGE)/$i.class) \ $(MISC)/$(TARGET)/passive_java.jar-zip/$(PACKAGE)/ cd $(MISC)/$(TARGET)/passive_java.jar-zip && zip ../passive_java.jar \ - META-INF/manifest.mf $(foreach,i,$(JAVAFILES:b) $(PACKAGE)/$i.class) + META-INF/MANIFEST.MF $(foreach,i,$(JAVAFILES:b) $(PACKAGE)/$i.class) diff --git a/desktop/test/deployment/passive/manifest.xml b/desktop/test/deployment/passive/manifest.xml index eb7588e15511..c686c6c14e97 100644 --- a/desktop/test/deployment/passive/manifest.xml +++ b/desktop/test/deployment/passive/manifest.xml @@ -34,7 +34,4 @@ - From df1215ca45a16852d1ae4333417d9db575c03d1c Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 21 Oct 2010 15:47:12 +0200 Subject: [PATCH 197/279] sb131: #i114962# live deployment of passive UNO components in extensions --- .../registry/component/dp_component.cxx | 602 ++++++++++-------- 1 file changed, 335 insertions(+), 267 deletions(-) diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index dea59c5de152..d1511952a92a 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -65,6 +65,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using ::rtl::OUString; +namespace css = com::sun::star; namespace dp_registry { namespace backend { @@ -121,14 +122,15 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend BackendImpl * getMyBackend() const; const OUString m_loader; - ComponentBackendDb::Data m_registeredComponentsDb; enum reg { REG_UNINIT, REG_VOID, REG_REGISTERED, REG_NOT_REGISTERED, REG_MAYBE_REGISTERED } m_registered; - Reference getComponentInfo( - t_stringlist * pImplNames, t_stringpairvec * pSingletons, + void getComponentInfo( + ComponentBackendDb::Data * data, + std::vector< css::uno::Reference< css::uno::XInterface > > * + factories, Reference const & xContext ); virtual void SAL_CALL disposing(); @@ -297,7 +299,25 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend Reference const & xCmdEnv ); bool hasInUnoRc( RcItem kind, OUString const & url ); + css::uno::Reference< css::registry::XRegistryKey > openRegistryKey( + css::uno::Reference< css::registry::XRegistryKey > const & base, + rtl::OUString const & path); + void extractComponentData( + css::uno::Reference< css::uno::XComponentContext > const & context, + css::uno::Reference< css::registry::XRegistryKey > const & registry, + ComponentBackendDb::Data * data, + std::vector< css::uno::Reference< css::uno::XInterface > > * factories, + css::uno::Reference< css::loader::XImplementationLoader > const * + componentLoader, + rtl::OUString const * componentUrl); + + void componentLiveInsertion( + ComponentBackendDb::Data const & data, + std::vector< css::uno::Reference< css::uno::XInterface > > const & + factories); + + void componentLiveRemoval(ComponentBackendDb::Data const & data); public: BackendImpl( Sequence const & args, @@ -328,13 +348,7 @@ BackendImpl::ComponentPackageImpl::ComponentPackageImpl( xPackageType, bRemoved, identifier), m_loader( loader ), m_registered( REG_UNINIT ) -{ - if (bRemoved) - { - m_registeredComponentsDb = getMyBackend()->readDataFromDb(url); - } -} - +{} const Reference BackendImpl::ComponentPackageImpl::getRDB() const @@ -1104,14 +1118,207 @@ bool BackendImpl::hasInUnoRc( return ::std::find( rSet.begin(), rSet.end(), rcterm ) != rSet.end(); } +css::uno::Reference< css::registry::XRegistryKey > BackendImpl::openRegistryKey( + css::uno::Reference< css::registry::XRegistryKey > const & base, + rtl::OUString const & path) +{ + OSL_ASSERT(base.is()); + css::uno::Reference< css::registry::XRegistryKey > key(base->openKey(path)); + if (!key.is()) { + throw css::deployment::DeploymentException( + (rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("missing registry entry ")) + + path + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" under ")) + + base->getKeyName()), + static_cast< OWeakObject * >(this), Any()); + } + return key; +} + +void BackendImpl::extractComponentData( + css::uno::Reference< css::uno::XComponentContext > const & context, + css::uno::Reference< css::registry::XRegistryKey > const & registry, + ComponentBackendDb::Data * data, + std::vector< css::uno::Reference< css::uno::XInterface > > * factories, + css::uno::Reference< css::loader::XImplementationLoader > const * + componentLoader, + rtl::OUString const * componentUrl) +{ + OSL_ASSERT(context.is() && registry.is() && data != 0 && factories != 0); + rtl::OUString registryName(registry->getKeyName()); + sal_Int32 prefix = registryName.getLength(); + if (!registryName.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM("/"))) { + prefix += RTL_CONSTASCII_LENGTH("/"); + } + css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > > + keys(registry->openKeys()); + css::uno::Reference< css::lang::XMultiComponentFactory > smgr( + context->getServiceManager(), css::uno::UNO_QUERY_THROW); + for (sal_Int32 i = 0; i < keys.getLength(); ++i) { + rtl::OUString name(keys[i]->getKeyName().copy(prefix)); + data->implementationNames.push_back(name); + css::uno::Reference< css::registry::XRegistryKey > singletons( + keys[i]->openKey( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UNO/SINGLETONS")))); + if (singletons.is()) { + sal_Int32 prefix2 = keys[i]->getKeyName().getLength() + + RTL_CONSTASCII_LENGTH("/UNO/SINGLETONS/"); + css::uno::Sequence< + css::uno::Reference< css::registry::XRegistryKey > > + singletonKeys(singletons->openKeys()); + for (sal_Int32 j = 0; j < singletonKeys.getLength(); ++j) { + data->singletons.push_back( + std::pair< rtl::OUString, rtl::OUString >( + singletonKeys[j]->getKeyName().copy(prefix2), name)); + } + } + css::uno::Reference< css::loader::XImplementationLoader > loader; + if (componentLoader == 0) { + rtl::OUString activator( + openRegistryKey( + keys[i], + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("UNO/ACTIVATOR")))-> + getAsciiValue()); + loader.set( + smgr->createInstanceWithContext(activator, context), + css::uno::UNO_QUERY); + if (!loader.is()) { + throw css::deployment::DeploymentException( + (rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "cannot instantiate loader ")) + + activator), + static_cast< OWeakObject * >(this), Any()); + } + } else { + OSL_ASSERT(componentLoader->is()); + loader = *componentLoader; + } + factories->push_back( + loader->activate( + name, rtl::OUString(), + (componentUrl == 0 + ? (openRegistryKey( + keys[i], + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("UNO/LOCATION")))-> + getAsciiValue()) + : *componentUrl), + keys[i])); + } +} + +void BackendImpl::componentLiveInsertion( + ComponentBackendDb::Data const & data, + std::vector< css::uno::Reference< css::uno::XInterface > > const & + factories) +{ + css::uno::Reference< css::container::XSet > set( + getComponentContext()->getServiceManager(), css::uno::UNO_QUERY_THROW); + std::vector< css::uno::Reference< css::uno::XInterface > >::const_iterator + factory(factories.begin()); + for (t_stringlist::const_iterator i(data.implementationNames.begin()); + i != data.implementationNames.end(); ++i) + { + try { + set->insert(css::uno::Any(*factory++)); + } catch (container::ElementExistException &) { + OSL_TRACE( + "implementation %s already registered", + rtl::OUStringToOString(*i, RTL_TEXTENCODING_UTF8).getStr()); + } + } + if (!data.singletons.empty()) { + css::uno::Reference< css::container::XNameContainer > + rootContext( + getComponentContext()->getValueByName( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_root"))), + css::uno::UNO_QUERY); + if (rootContext.is()) { + for (t_stringpairvec::const_iterator i(data.singletons.begin()); + i != data.singletons.end(); ++i) + { + rtl::OUString name( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/")) + + i->first); + try { + rootContext->removeByName( + name + + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("/arguments"))); + } catch (container::NoSuchElementException &) {} + try { + rootContext->insertByName( + (name + + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("/service"))), + css::uno::Any(i->second)); + } catch (container::ElementExistException &) { + rootContext->replaceByName( + (name + + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("/service"))), + css::uno::Any(i->second)); + } + try { + rootContext->insertByName(name, css::uno::Any()); + } catch (container::ElementExistException &) { + OSL_TRACE( + "singleton %s already registered", + rtl::OUStringToOString( + i->first, RTL_TEXTENCODING_UTF8).getStr()); + rootContext->replaceByName(name, css::uno::Any()); + } + } + } + } +} + +void BackendImpl::componentLiveRemoval(ComponentBackendDb::Data const & data) { + css::uno::Reference< css::container::XSet > set( + getComponentContext()->getServiceManager(), css::uno::UNO_QUERY_THROW); + for (t_stringlist::const_iterator i(data.implementationNames.begin()); + i != data.implementationNames.end(); ++i) + { + try { + set->remove(css::uno::Any(*i)); + } catch (css::container::NoSuchElementException &) { + // ignore if factory has not been live deployed + } + } + if (!data.singletons.empty()) { + css::uno::Reference< css::container::XNameContainer > rootContext( + getComponentContext()->getValueByName( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_root"))), + css::uno::UNO_QUERY); + if (rootContext.is()) { + for (t_stringpairvec::const_iterator i(data.singletons.begin()); + i != data.singletons.end(); ++i) + { + rtl::OUString name( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/")) + + i->first); + try { + rootContext->removeByName( + name + + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("/arguments"))); + rootContext->removeByName( + name + + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/service"))); + rootContext->removeByName(name); + } catch (container::NoSuchElementException &) {} + } + } + } +} + //______________________________________________________________________________ void BackendImpl::releaseObject( OUString const & id ) { const ::osl::MutexGuard guard( getMutex() ); - if ( m_backendObjects.erase( id ) != 1 ) - { - OSL_ASSERT( false ); - } + m_backendObjects.erase( id ); } //______________________________________________________________________________ @@ -1194,62 +1401,38 @@ Reference raise_uno_process( } //------------------------------------------------------------------------------ -Reference -BackendImpl::ComponentPackageImpl::getComponentInfo( - t_stringlist * pImplNames, t_stringpairvec * pSingletons, +void BackendImpl::ComponentPackageImpl::getComponentInfo( + ComponentBackendDb::Data * data, + std::vector< css::uno::Reference< css::uno::XInterface > > * factories, Reference const & xContext ) { const Reference xLoader( xContext->getServiceManager()->createInstanceWithContext( m_loader, xContext ), UNO_QUERY ); if (! xLoader.is()) - return Reference(); + { + throw css::deployment::DeploymentException( + (rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("cannot instantiate loader ")) + + m_loader), + static_cast< OWeakObject * >(this), Any()); + } // HACK: highly dependent on stoc/source/servicemanager // and stoc/source/implreg implementation which rely on the same // services.rdb format! - + // .../UNO/LOCATION and .../UNO/ACTIVATOR appear not to be written by + // writeRegistryInfo, however, but are knwon, fixed values here, so + // can be passed into extractComponentData + rtl::OUString url(getURL()); const Reference xMemReg( xContext->getServiceManager()->createInstanceWithContext( OUSTR("com.sun.star.registry.SimpleRegistry"), xContext ), UNO_QUERY_THROW ); xMemReg->open( OUString() /* in mem */, false, true ); - xLoader->writeRegistryInfo( xMemReg->getRootKey(), OUString(), getURL() ); - - const Sequence< Reference > keys( - xMemReg->getRootKey()->openKeys() ); - for ( sal_Int32 pos = keys.getLength(); pos--; ) - { - Reference const & xImplKey = keys[ pos ]; - const OUString implName( - xImplKey->getKeyName().copy( 1 /*leading slash*/ ) ); - - // check for singletons: - const Reference xSingletonKey( - xImplKey->openKey( OUSTR("UNO/SINGLETONS") ) ); - if (xSingletonKey.is() && xSingletonKey->isValid()) - { - const Sequence< Reference > singletonKeys( - xSingletonKey->openKeys() ); - for ( sal_Int32 i = singletonKeys.getLength(); i--; ) - { - Reference const & xSingleton = - singletonKeys[ i ]; - pSingletons->push_back( - ::std::pair( - xSingleton->getKeyName().copy( - implName.getLength() + - sizeof ("//UNO/SINGLETONS/") - 1 ), - xSingleton->getStringValue() ) ); - } - } - else - { - pImplNames->push_back( implName ); - } - } - - return xLoader; + xLoader->writeRegistryInfo( xMemReg->getRootKey(), OUString(), url ); + getMyBackend()->extractComponentData( + xContext, xMemReg->getRootKey(), data, factories, &xLoader, &url); } // Package @@ -1340,223 +1523,74 @@ void BackendImpl::ComponentPackageImpl::processPackage_( Reference const & xCmdEnv ) { BackendImpl * that = getMyBackend(); - - - const bool java = m_loader.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.loader.Java2") ); - const OUString url( getURL() ); - bool isJavaTypelib; - if (m_bRemoved) - isJavaTypelib = m_registeredComponentsDb.javaTypeLibrary; - else - isJavaTypelib = java && - !jarManifestHeaderPresent( url, OUSTR("UNO-Type-Path"), xCmdEnv ); - - ComponentBackendDb::Data data; - data.javaTypeLibrary = isJavaTypelib; - if (doRegisterPackage) - { - Reference context(that->getComponentContext()); - if (! startup) - { - context.set( - that->getObject( url ), UNO_QUERY ); - - if (! context.is()) { + rtl::OUString url(getURL()); + if (doRegisterPackage) { + ComponentBackendDb::Data data; + css::uno::Reference< css::uno::XComponentContext > context; + if (startup) { + context = that->getComponentContext(); + } else { + context.set(that->getObject(url), css::uno::UNO_QUERY); + if (!context.is()) { context.set( - that->insertObject( url, raise_uno_process( - that->getComponentContext(), - abortChannel ) ), - UNO_QUERY_THROW ); + that->insertObject( + url, + raise_uno_process( + that->getComponentContext(), abortChannel)), + css::uno::UNO_QUERY_THROW); } } - - const Reference xServicesRDB( getRDB() ); - const Reference xImplReg( + css::uno::Reference< css::registry::XImplementationRegistration>( context->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star.registry.ImplementationRegistration"), - context ), UNO_QUERY_THROW ); - - xImplReg->registerImplementation( m_loader, url, xServicesRDB ); - //only write to unorc if registration was successful. - //It may fail if there is no suitable java. - if (isJavaTypelib) + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.registry.ImplementationRegistration")), + context), + css::uno::UNO_QUERY_THROW)->registerImplementation( + m_loader, url, getRDB()); + // Only write to unorc after successful registration; it may fail if + // there is no suitable java + if (m_loader.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("com.sun.star.loader.Java2")) && + !jarManifestHeaderPresent(url, OUSTR("UNO-Type-Path"), xCmdEnv)) { - that->addToUnoRc( RCITEM_JAR_TYPELIB, url, xCmdEnv ); + that->addToUnoRc(RCITEM_JAR_TYPELIB, url, xCmdEnv); data.javaTypeLibrary = true; } - - t_stringlist implNames; - t_stringpairvec singletons; - const Reference xLoader( - getComponentInfo( &implNames, &singletons, context ) ); - data.implementationNames = implNames; - data.singletons = singletons; - - if (!startup) - { - // factories live insertion: - const Reference xSet( - that->getComponentContext()->getServiceManager(), UNO_QUERY_THROW ); - for ( t_stringlist::const_iterator iPos( implNames.begin() ); - iPos != implNames.end(); ++iPos ) - { - checkAborted( abortChannel ); - OUString const & implName = *iPos; - // activate factory: - const Reference xFactory( - xLoader->activate( - implName, OUString(), url, - xServicesRDB->getRootKey()->openKey( - OUSTR("/IMPLEMENTATIONS/") + implName ) ) ); - try { - xSet->insert( Any(xFactory) ); - } // ignore if factory has already been inserted: - catch (container::ElementExistException &) { - OSL_ENSURE( 0, "### factory already registered?" ); - } - } - - if (! singletons.empty()) - { - // singletons live insertion: - const Reference xRootContext( - that->getComponentContext()->getValueByName( - OUSTR("_root") ), UNO_QUERY ); - if (xRootContext.is()) - { - for ( t_stringpairvec::const_iterator iPos( - singletons.begin() ); - iPos != singletons.end(); ++iPos ) - { - ::std::pair const & sp = *iPos; - const OUString name( OUSTR("/singletons/") + sp.first ); - // assure no arguments: - try { - xRootContext->removeByName( name + OUSTR("/arguments")); - } catch (container::NoSuchElementException &) {} - // used service: - try { - xRootContext->insertByName( - name + OUSTR("/service"), Any(sp.second) ); - } catch (container::ElementExistException &) { - xRootContext->replaceByName( - name + OUSTR("/service"), Any(sp.second) ); - } - // singleton entry: - try { - xRootContext->insertByName( name, Any() ); - } catch (container::ElementExistException & exc) { - (void) exc; // avoid warnings - OSL_ENSURE( - 0, OUStringToOString( - exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); - xRootContext->replaceByName( name, Any() ); - } - } - } - } + std::vector< css::uno::Reference< css::uno::XInterface > > factories; + getComponentInfo(&data, &factories, context); + if (!startup) { + that->componentLiveInsertion(data, factories); } - m_registered = REG_REGISTERED; - getMyBackend()->addDataToDb(url, data); - } - else // revokePackage() - { - // set to VOID during revocation process: + that->addDataToDb(url, data); + } else { // revoke m_registered = REG_VOID; - - //get the remote context. If it does not exist then use the local one - Reference xContext( - that->getObject( url ), UNO_QUERY ); - bool bRemoteContext = false; - if (!xContext.is()) - xContext = that->getComponentContext(); - else - bRemoteContext = true; - - t_stringlist implNames; - t_stringpairvec singletons; - if (m_bRemoved) - { - implNames = m_registeredComponentsDb.implementationNames; - singletons = m_registeredComponentsDb.singletons; + ComponentBackendDb::Data data(that->readDataFromDb(url)); + css::uno::Reference< css::uno::XComponentContext > context( + that->getObject(url), css::uno::UNO_QUERY); + bool remoteContext = context.is(); + if (!remoteContext) { + context = that->getComponentContext(); } - else - { - getComponentInfo( &implNames, &singletons, xContext ); + if (!startup) { + that->componentLiveRemoval(data); } - - if (!startup) - { - // factories live removal: - const Reference xSet( - that->getComponentContext()->getServiceManager(), UNO_QUERY_THROW ); - for ( t_stringlist::const_iterator iPos( implNames.begin() ); - iPos != implNames.end(); ++iPos ) - { - OUString const & implName = *iPos; - try { - xSet->remove( Any(implName) ); - } // ignore if factory has not been live deployed: - catch (container::NoSuchElementException &) { - } - } - - if (! singletons.empty()) - { - // singletons live removal: - const Reference xRootContext( - that->getComponentContext()->getValueByName( - OUSTR("_root") ), UNO_QUERY ); - if (xRootContext.is()) - { - for ( t_stringpairvec::const_iterator iPos( - singletons.begin() ); - iPos != singletons.end(); ++iPos ) - { - ::std::pair const & sp = *iPos; - const OUString name( OUSTR("/singletons/") + sp.first ); - // arguments: - try { - xRootContext->removeByName( name + OUSTR("/arguments")); - } - catch (container::NoSuchElementException &) {} - // used service: - try { - xRootContext->removeByName( name + OUSTR("/service") ); - } - catch (container::NoSuchElementException &) {} - // singleton entry: - try { - xRootContext->removeByName( name ); - } - catch (container::NoSuchElementException & exc) { - (void) exc; // avoid warnings - OSL_ENSURE( - 0, OUStringToOString( - exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); - } - } - } - } + css::uno::Reference< css::registry::XImplementationRegistration >( + context->getServiceManager()->createInstanceWithContext( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.registry.ImplementationRegistration")), + context), + css::uno::UNO_QUERY_THROW)->revokeImplementation(url, getRDB()); + if (data.javaTypeLibrary) { + that->removeFromUnoRc(RCITEM_JAR_TYPELIB, url, xCmdEnv); + } + if (remoteContext) { + that->releaseObject(url); } - - const Reference xServicesRDB( getRDB() ); - const Reference xImplReg( - xContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star.registry.ImplementationRegistration"), - xContext ), UNO_QUERY_THROW ); - xImplReg->revokeImplementation( url, xServicesRDB ); - - if (isJavaTypelib) - that->removeFromUnoRc( RCITEM_JAR_TYPELIB, url, xCmdEnv ); - - if (bRemoteContext) - that->releaseObject( url ); - m_registered = REG_NOT_REGISTERED; - getMyBackend()->deleteDataFromDb(url); + that->deleteDataFromDb(url); } } @@ -1721,21 +1755,55 @@ BackendImpl::ComponentsPackageImpl::isRegistered_( void BackendImpl::ComponentsPackageImpl::processPackage_( ::osl::ResettableMutexGuard &, bool doRegisterPackage, - bool, - ::rtl::Reference const &, + bool startup, + ::rtl::Reference const & abortChannel, Reference const & xCmdEnv ) { BackendImpl * that = getMyBackend(); rtl::OUString url(getURL()); - if (doRegisterPackage) - { - //TODO + if (doRegisterPackage) { + ComponentBackendDb::Data data; + data.javaTypeLibrary = false; + std::vector< css::uno::Reference< css::uno::XInterface > > factories; + css::uno::Reference< css::uno::XComponentContext > context( + that->getObject(url), css::uno::UNO_QUERY); + if (!context.is()) { + context.set( + that->insertObject( + url, + raise_uno_process( + that->getComponentContext(), abortChannel)), + css::uno::UNO_QUERY_THROW); + } + css::uno::Reference< css::registry::XSimpleRegistry > registry( + css::uno::Reference< css::lang::XMultiComponentFactory >( + that->getComponentContext()->getServiceManager(), + css::uno::UNO_SET_THROW)->createInstanceWithContext( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.registry.SimpleRegistry")), + that->getComponentContext()), + css::uno::UNO_QUERY_THROW); + registry->open(expandUnoRcUrl(url), true, false); + getMyBackend()->extractComponentData( + context, + that->openRegistryKey( + registry->getRootKey(), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IMPLEMENTATIONS"))), + &data, &factories, 0, 0); + registry->close(); + if (!startup) { + that->componentLiveInsertion(data, factories); + } + that->addDataToDb(url, data); that->addToUnoRc(RCITEM_COMPONENTS, url, xCmdEnv); - } - else // revoke - { + } else { // revoke that->removeFromUnoRc(RCITEM_COMPONENTS, url, xCmdEnv); - //TODO + if (!startup) { + that->componentLiveRemoval(that->readDataFromDb(url)); + } + that->releaseObject(url); + that->deleteDataFromDb(url); } } From 3f2ff25d286a2d751292e567850e2810061a1c85 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Thu, 21 Oct 2010 17:46:55 +0200 Subject: [PATCH 198/279] #i114622# - Reverted wrong optimization. --- ucb/source/ucp/webdav/webdavcontent.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index b679b81b5d52..c58ba207199f 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -1395,7 +1395,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // For DAV resources we only know the Title, for non-DAV // resources we additionally know that it is a document. - else if ( rType == DAV ) + + if ( rType == DAV ) { //xProps.reset( // new ContentProperties( aUnescapedTitle ) ); From 82bfeb3e88121190b6ffc777b360af6d7ff87e48 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 22 Oct 2010 07:43:02 +0200 Subject: [PATCH 199/279] #i115132# ItemCommand added to replaced menu items --- sfx2/source/view/viewsh.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 5c65c967434f..c3a3eeb49f4e 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -2054,6 +2054,7 @@ void Change( Menu* pMenu, SfxViewShell* pView ) if ( pSlot ) { pMenu->InsertItem( pSlot->GetSlotId(), pMenu->GetItemText( nId ), pMenu->GetItemBits( nId ), nPos ); + pMenu->SetItemCommand( pSlot->GetSlotId(), aCmd ); pMenu->RemoveItem( nPos+1 ); break; } From 1885dddbdd2382f95aef15df15d4cd110f8d7854 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 22 Oct 2010 10:37:46 +0200 Subject: [PATCH 200/279] sb131: #i115124# $(XSLTPROC) implies LIBXSLT:libxslt --- avmedia/prj/build.lst | 2 +- basic/prj/build.lst | 2 +- configmgr/prj/build.lst | 2 +- connectivity/prj/build.lst | 2 +- desktop/prj/build.lst | 2 +- embeddedobj/prj/build.lst | 2 +- eventattacher/prj/build.lst | 2 +- fileaccess/prj/build.lst | 2 +- formula/prj/build.lst | 2 +- fpicker/prj/build.lst | 2 +- framework/prj/build.lst | 2 +- linguistic/prj/build.lst | 2 +- scripting/prj/build.lst | 2 +- sfx2/prj/build.lst | 2 +- shell/prj/build.lst | 2 +- svx/prj/build.lst | 2 +- ucb/prj/build.lst | 2 +- uui/prj/build.lst | 2 +- vbahelper/prj/build.lst | 2 +- xmloff/prj/build.lst | 2 +- xmlscript/prj/build.lst | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) mode change 100755 => 100644 basic/prj/build.lst mode change 100755 => 100644 scripting/prj/build.lst diff --git a/avmedia/prj/build.lst b/avmedia/prj/build.lst index 6651d9d74f8f..2348b606dcab 100644 --- a/avmedia/prj/build.lst +++ b/avmedia/prj/build.lst @@ -1,4 +1,4 @@ -av avmedia : l10n tools sfx2 NULL +av avmedia : l10n tools sfx2 LIBXSLT:libxslt NULL av avmedia usr1 - all av_mkout NULL av avmedia\prj get - all av_prj NULL av avmedia\inc get - all av_inv NULL diff --git a/basic/prj/build.lst b/basic/prj/build.lst old mode 100755 new mode 100644 index c00a3d8412d3..8eab007313ec --- a/basic/prj/build.lst +++ b/basic/prj/build.lst @@ -1,4 +1,4 @@ -sb basic : l10n offuh oovbaapi svtools xmlscript framework salhelper NULL +sb basic : l10n offuh oovbaapi svtools xmlscript framework salhelper LIBXSLT:libxslt NULL sb basic usr1 - all sb_mkout NULL sb basic\inc nmake - all sb_inc NULL sb basic\source\app nmake - all sb_app sb_class sb_inc NULL diff --git a/configmgr/prj/build.lst b/configmgr/prj/build.lst index bbd0d7f34a9a..6043290f0914 100644 --- a/configmgr/prj/build.lst +++ b/configmgr/prj/build.lst @@ -1,4 +1,4 @@ -cg configmgr : BOOST:boost comphelper cppu cppuhelper offuh sal salhelper stlport xmlreader NULL +cg configmgr : BOOST:boost LIBXSLT:libxslt comphelper cppu cppuhelper offuh sal salhelper stlport xmlreader NULL cg configmgr\inc nmake - all cg_inc NULL cg configmgr\source nmake - all cg_source cg_inc NULL cg configmgr\qa\unoapi nmake - all cg_qa_unoapi NULL diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst index 0b15c06acf15..6d70bc71c97c 100644 --- a/connectivity/prj/build.lst +++ b/connectivity/prj/build.lst @@ -1,4 +1,4 @@ -cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss NULL +cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss LIBXSLT:libxslt NULL cn connectivity usr1 - all cn_mkout NULL cn connectivity\inc nmake - all cn_inc NULL cn connectivity\com\sun\star\sdbcx\comp\hsqldb nmake - all cn_jhsqldbdb cn_hsqldb cn_inc NULL diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index a0a1e09efaf1..146579cab8bc 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -1,4 +1,4 @@ -dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter NULL +dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter LIBXSLT:libxslt NULL dt desktop usr1 - all dt_mkout NULL dt desktop\inc nmake - all dt_inc NULL dt desktop\prj get - all dt_prj NULL diff --git a/embeddedobj/prj/build.lst b/embeddedobj/prj/build.lst index a61305e19221..c2f366c4deec 100644 --- a/embeddedobj/prj/build.lst +++ b/embeddedobj/prj/build.lst @@ -1,4 +1,4 @@ -eo embeddedobj : offuh sal cppu cppuhelper comphelper tools unotools vos NULL +eo embeddedobj : offuh sal cppu cppuhelper comphelper tools unotools vos LIBXSLT:libxslt NULL eo embeddedobj usr1 - all eo_mkout NULL eo embeddedobj\inc nmake - all eo_inc NULL eo embeddedobj\source\commonembedding nmake - all eo_commonembed eo_inc NULL diff --git a/eventattacher/prj/build.lst b/eventattacher/prj/build.lst index aa931705fd75..dda1cd7a4893 100644 --- a/eventattacher/prj/build.lst +++ b/eventattacher/prj/build.lst @@ -1,4 +1,4 @@ -ea eventattacher : offapi cppuhelper vos NULL +ea eventattacher : offapi cppuhelper vos LIBXSLT:libxslt NULL ea eventattacher usr1 - all ea_mkout NULL ea eventattacher\prj get - all ea_prj NULL ea eventattacher\source nmake - all ea_source NULL diff --git a/fileaccess/prj/build.lst b/fileaccess/prj/build.lst index a60a92e9c12b..0349810c3838 100644 --- a/fileaccess/prj/build.lst +++ b/fileaccess/prj/build.lst @@ -1,3 +1,3 @@ -fa fileaccess : unotools rdbmaker tools ucbhelper NULL +fa fileaccess : unotools rdbmaker tools ucbhelper LIBXSLT:libxslt NULL fa fileaccess usr1 - all fa_mkout NULL fa fileaccess\source nmake - all fa_src NULL diff --git a/formula/prj/build.lst b/formula/prj/build.lst index f26377c4578d..109a798ea3eb 100644 --- a/formula/prj/build.lst +++ b/formula/prj/build.lst @@ -1,4 +1,4 @@ -fml formula : BOOST:boost comphelper svx NULL +fml formula : BOOST:boost LIBXSLT:libxslt comphelper svx NULL fml formula usr1 - all fml_mkout NULL fml formula\inc nmake - all fml_inc NULL fml formula\source\core\api nmake - all fml_api fml_inc NULL diff --git a/fpicker/prj/build.lst b/fpicker/prj/build.lst index 434f22660f33..52d99ec0759a 100644 --- a/fpicker/prj/build.lst +++ b/fpicker/prj/build.lst @@ -1,4 +1,4 @@ -fp fpicker : l10n rdbmaker svtools NULL +fp fpicker : LIBXSLT:libxslt l10n rdbmaker svtools NULL fp fpicker\inc nmake - all fp_inc NULL fp fpicker\source\generic nmake - all fp_generic fp_inc NULL fp fpicker\source\office nmake - all fp_office fp_inc NULL diff --git a/framework/prj/build.lst b/framework/prj/build.lst index cf994604699a..f84378540f8e 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,4 +1,4 @@ -fr framework : l10n svtools NULL +fr framework : LIBXSLT:libxslt l10n svtools NULL fr framework usr1 - all fr_mkout NULL fr framework\inc nmake - all fr_inc NULL fr framework\source\constant nmake - all fr_constant fr_inc NULL diff --git a/linguistic/prj/build.lst b/linguistic/prj/build.lst index b85d4cfd9d73..0043eaffc6ed 100644 --- a/linguistic/prj/build.lst +++ b/linguistic/prj/build.lst @@ -1,4 +1,4 @@ -lg linguistic : svl xmloff ucbhelper vos comphelper ICU:icu NULL +lg linguistic : svl xmloff ucbhelper vos comphelper ICU:icu LIBXSLT:libxslt NULL lg linguistic usr1 - all lg_mkout NULL lg linguistic\prj get - all lg_prj NULL lg linguistic\inc nmake - all lg_inc NULL diff --git a/scripting/prj/build.lst b/scripting/prj/build.lst old mode 100755 new mode 100644 index 7d5162173eae..d0ceb4cb818c --- a/scripting/prj/build.lst +++ b/scripting/prj/build.lst @@ -1,4 +1,4 @@ -tc scripting : oovbaapi vbahelper bridges rdbmaker vcl xmlscript basic sfx2 rhino BSH:beanshell javaunohelper NULL +tc scripting : oovbaapi vbahelper bridges rdbmaker vcl xmlscript basic sfx2 rhino BSH:beanshell javaunohelper LIBXSLT:libxslt NULL tc scripting usr1 - all tc1_mkout NULL tc scripting\inc nmake - all tc1_inc NULL tc scripting\source\provider nmake - all tc1_scriptingprovider tc1_inc NULL diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index 1e471312c6cf..e75b328c5930 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -1,4 +1,4 @@ -sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL +sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL sf sfx2 usr1 - all sf_mkout NULL sf sfx2\inc nmake - all sf_inc NULL sf sfx2\prj get - all sf_prj NULL diff --git a/shell/prj/build.lst b/shell/prj/build.lst index 9a5bf35dde3f..ad157a677bff 100755 --- a/shell/prj/build.lst +++ b/shell/prj/build.lst @@ -1,4 +1,4 @@ -sl shell : l10n offuh rdbmaker tools sal EXPAT:expat NULL +sl shell : l10n offuh rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt NULL sl shell\inc nmake - all sl_inc NULL sl shell\source\win32 nmake - w sl_win32 sl_inc NULL sl shell\source\win32\simplemail nmake - w sl_win32_simplemail sl_inc NULL diff --git a/svx/prj/build.lst b/svx/prj/build.lst index 9f7597488644..536d7cc29fc8 100644 --- a/svx/prj/build.lst +++ b/svx/prj/build.lst @@ -1,4 +1,4 @@ -sx svx : sfx2 l10n oovbaapi connectivity xmloff linguistic jvmfwk avmedia drawinglayer editeng NULL +sx svx : sfx2 l10n oovbaapi connectivity xmloff linguistic jvmfwk avmedia drawinglayer editeng LIBXSLT:libxslt NULL sx svx usr1 - all sx_mkout NULL sx svx\inc nmake - all sx_inc NULL sx svx\uiconfig\layout nmake - all sx_layout NULL diff --git a/ucb/prj/build.lst b/ucb/prj/build.lst index 8d8c87f3ae4b..6f2d146aabbf 100644 --- a/ucb/prj/build.lst +++ b/ucb/prj/build.lst @@ -1,4 +1,4 @@ -uc ucb : cppuhelper CURL:curl OPENSSL:openssl NEON:neon LIBXML2:libxml2 offapi sal salhelper ucbhelper udkapi comphelper tools NULL +uc ucb : cppuhelper CURL:curl OPENSSL:openssl NEON:neon LIBXML2:libxml2 LIBXSLT:libxslt offapi sal salhelper ucbhelper udkapi comphelper tools NULL uc ucb usr1 - all uc_mkout NULL uc ucb\inc nmake - all uc_inc NULL uc ucb\source\regexp nmake - all uc_regexp uc_inc NULL diff --git a/uui/prj/build.lst b/uui/prj/build.lst index dbe31cb1b57e..6816f8416bdf 100644 --- a/uui/prj/build.lst +++ b/uui/prj/build.lst @@ -1,4 +1,4 @@ -uu uui : l10n vcl svtools NULL +uu uui : l10n vcl svtools LIBXSLT:libxslt NULL uu uui usr1 - all uu_mkout NULL uu uui\source nmake - all uu_source NULL uu uui\util nmake - all uu_util uu_source NULL diff --git a/vbahelper/prj/build.lst b/vbahelper/prj/build.lst index 20001db859c8..3f3e89bf5b83 100644 --- a/vbahelper/prj/build.lst +++ b/vbahelper/prj/build.lst @@ -1,4 +1,4 @@ -vba vbahelper : oovbaapi basic sfx2 svx filter cppuhelper vcl comphelper svtools tools sal NULL +vba vbahelper : oovbaapi basic sfx2 svx filter cppuhelper vcl comphelper svtools tools sal LIBXSLT:libxslt NULL vba vbahelper usr1 - all vba_mkout NULL #vba vbahelper\inc nmake - all vba_inc NULL vba vbahelper\source\vbahelper nmake - all vba_vbahelper NULL diff --git a/xmloff/prj/build.lst b/xmloff/prj/build.lst index 7b68ed08ff82..b6c6eda1a7f5 100644 --- a/xmloff/prj/build.lst +++ b/xmloff/prj/build.lst @@ -1,4 +1,4 @@ -xo xmloff : offapi svl vos NULL +xo xmloff : LIBXSLT:libxslt offapi svl vos NULL xo xmloff usr1 - all xo_mkout NULL xo xmloff\prj get - all xo_prj NULL xo xmloff\inc nmake - all xo_inc NULL diff --git a/xmlscript/prj/build.lst b/xmlscript/prj/build.lst index f3410c668633..388a59f134ff 100644 --- a/xmlscript/prj/build.lst +++ b/xmlscript/prj/build.lst @@ -1,4 +1,4 @@ -xt xmlscript : comphelper tools offapi NULL +xt xmlscript : comphelper tools offapi LIBXSLT:libxslt NULL xt xmlscript usr1 - all xt_mkout NULL xt xmlscript\inc nmake - all xt_inc NULL xt xmlscript\source\xml_helper nmake - all xt_xml_helper xt_inc NULL From 9d524cafb689ae3ef9c151eb9280e4dce3f86862 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 22 Oct 2010 13:00:24 +0200 Subject: [PATCH 201/279] fwk149: #i115194# Command line arguments that won't open/create/load documents don't hinder to show the Start Center on startup --- desktop/source/app/app.cxx | 119 +++--------- desktop/source/app/cmdlineargs.cxx | 281 ++++++++++++++++------------- desktop/source/app/cmdlineargs.hxx | 129 ++++++------- 3 files changed, 253 insertions(+), 276 deletions(-) diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index e0f976df34ed..22f67a214a55 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -121,6 +121,7 @@ #include #include #include +#include #include #include #include @@ -347,10 +348,8 @@ CommandLineArgs* Desktop::GetCommandLineArgs() { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); if ( !pArgs ) - { pArgs = new CommandLineArgs; } - } return pArgs; } @@ -1561,7 +1560,7 @@ void Desktop::Main() Reference< ::com::sun::star::task::XRestartManager > xRestartManager; sal_Bool bRestartRequested( sal_False ); sal_Bool bUseSystemFileDialog(sal_True); - int nAcquireCount( 0 ); + int nAcquireCount( 0 ); Reference < css::document::XEventListener > xGlobalBroadcaster; try { @@ -1628,25 +1627,6 @@ void Desktop::Main() } String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String(); delete pLabelResMgr; -/* - // locale and UI locale in AppSettings are now retrieved from configuration or system directly via SvtSysLocale - // no reason to set while starting - // set UI language and locale - RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ set locale settings" ); - //LanguageSelection langselect; - OUString aUILocaleString = LanguageSelection::getLanguageString(); - Locale aUILocale = LanguageSelection::IsoStringToLocale(aUILocaleString); - LanguageType eLanguage = SvtSysLocale().GetLanguage(); - - // #i39040#, do not call anything between GetSettings and SetSettings that might have - // a side effect on the settings (like, eg, SvtSysLocaleOptions().GetLocaleLanguageType(), - // which changes the MiscSettings !!! ) - AllSettings aSettings( Application::GetSettings() ); - aSettings.SetUILocale( aUILocale ); - aSettings.SetLanguage( eLanguage ); - Application::SetSettings( aSettings ); - RTL_LOGFILE_CONTEXT_TRACE( aLog, "} set locale settings" ); -*/ // Check for StarOffice/Suite specific extensions runs also with OpenOffice installation sets OUString aTitleString( aTitle ); @@ -1666,12 +1646,9 @@ void Desktop::Main() #endif SetDisplayName( aTitle ); -// SetSplashScreenProgress(30); RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create SvtPathOptions and SvtLanguageOptions" ); pPathOptions.reset( new SvtPathOptions); -// SetSplashScreenProgress(40); -// pLanguageOptions = new SvtLanguageOptions(sal_True); -// SetSplashScreenProgress(45); + SetSplashScreenProgress(40); RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" ); // Check special env variable #111015# @@ -1753,6 +1730,7 @@ void Desktop::Main() } SetSplashScreenProgress(50); + // Backing Component sal_Bool bCrashed = sal_False; sal_Bool bExistsRecoveryData = sal_False; @@ -1782,43 +1760,37 @@ void Desktop::Main() if ( !bRestartRequested ) { - if ( - (pCmdLineArgs->IsEmptyOrAcceptOnly() ) && + if ((!pCmdLineArgs->WantsToLoadDocument() ) && (SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) && (!bExistsRecoveryData ) && (!bExistsSessionData ) && - (!Application::AnyInput( INPUT_APPEVENT ) ) - ) + (!Application::AnyInput( INPUT_APPEVENT ) )) { - RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" ); - Reference< XFrame > xDesktopFrame( xSMgr->createInstance( - OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY ); - if (xDesktopFrame.is()) - { - // SetSplashScreenProgress(60); - Reference< XFrame > xBackingFrame; - Reference< ::com::sun::star::awt::XWindow > xContainerWindow; + RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" ); + Reference< XFrame > xDesktopFrame( xSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY ); + if (xDesktopFrame.is()) + { + Reference< XFrame > xBackingFrame; + Reference< ::com::sun::star::awt::XWindow > xContainerWindow; - xBackingFrame = xDesktopFrame->findFrame(OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0); - if (xBackingFrame.is()) - xContainerWindow = xBackingFrame->getContainerWindow(); - if (xContainerWindow.is()) - { - // set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank" - // frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior, - // otherwise documents loaded into this frame will later on miss functionality depending on the style. - Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" ); - pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT ); + xBackingFrame = xDesktopFrame->findFrame(OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0); + if (xBackingFrame.is()) + xContainerWindow = xBackingFrame->getContainerWindow(); + if (xContainerWindow.is()) + { + // set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank" + // frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior, + // otherwise documents loaded into this frame will later on miss functionality depending on the style. + Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" ); + pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT ); - SetSplashScreenProgress(75); - Sequence< Any > lArgs(1); - lArgs[0] <<= xContainerWindow; + SetSplashScreenProgress(75); + Sequence< Any > lArgs(1); + lArgs[0] <<= xContainerWindow; - Reference< XController > xBackingComp( - xSMgr->createInstanceWithArguments(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.StartModule") ), lArgs), - UNO_QUERY); - // SetSplashScreenProgress(80); + Reference< XController > xBackingComp( + xSMgr->createInstanceWithArguments(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.StartModule") ), lArgs), UNO_QUERY); if (xBackingComp.is()) { Reference< ::com::sun::star::awt::XWindow > xBackingWin(xBackingComp, UNO_QUERY); @@ -1849,16 +1821,6 @@ void Desktop::Main() FatalError( MakeStartupErrorMessage(e.Message) ); return; } - /* - catch ( ... ) - { - FatalError( MakeStartupErrorMessage( - OUString::createFromAscii( - "Unknown error during startup (Office wrapper service).\nInstallation could be damaged."))); - return; - } - */ -// SetSplashScreenProgress(55); SvtFontSubstConfig().Apply(); @@ -1867,7 +1829,6 @@ void Desktop::Main() aAppearanceCfg.SetApplicationDefaults( this ); SvtAccessibilityOptions aOptions; aOptions.SetVCLSettings(); -// SetSplashScreenProgress(60); if ( !bRestartRequested ) { @@ -1901,15 +1862,6 @@ void Desktop::Main() FatalError( MakeStartupErrorMessage(e.Message) ); return; } - /* - catch ( ... ) - { - FatalError( MakeStartupErrorMessage( - OUString::createFromAscii( - "Unknown error during startup (TD/Desktop service).\nInstallation could be damaged."))); - return; - } - */ // Post user event to startup first application component window // We have to send this OpenClients message short before execute() to @@ -2211,12 +2163,7 @@ IMPL_LINK( Desktop, OpenClients_Impl, void*, EMPTYARG ) // CloseStartupScreen(); CloseSplashScreen(); - CheckFirstRun( ); - - // allow ipc interaction -// OfficeIPCThread::SetReady(); - EnableOleAutomation(); if (getenv ("OOO_EXIT_POST_STARTUP")) @@ -2713,16 +2660,6 @@ void Desktop::OpenClients() if ( ! bAllowRecoveryAndSessionManagement ) { - /* - ::comphelper::ConfigurationHelper::writeDirectKey( - ::comphelper::getProcessServiceFactory(), - ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery"), - ::rtl::OUString::createFromAscii("AutoSave"), - ::rtl::OUString::createFromAscii("Enabled"), - ::com::sun::star::uno::makeAny(sal_False), - ::comphelper::ConfigurationHelper::E_STANDARD); - - */ try { Reference< XDispatch > xRecovery( diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 0625191ee2ea..14b4fd1d6ddc 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -142,15 +142,16 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) UNO_QUERY); // parse command line arguments - sal_Bool bPrintEvent = sal_False; - sal_Bool bOpenEvent = sal_True; - sal_Bool bViewEvent = sal_False; - sal_Bool bStartEvent = sal_False; - sal_Bool bPrintToEvent = sal_False; - sal_Bool bPrinterName = sal_False; - sal_Bool bForceOpenEvent = sal_False; - sal_Bool bForceNewEvent = sal_False; - sal_Bool bDisplaySpec = sal_False; + bool bOpenEvent(true); + bool bPrintEvent(false); + bool bViewEvent(false); + bool bStartEvent(false); + bool bPrintToEvent(false); + bool bPrinterName(false); + bool bForceOpenEvent(false); + bool bForceNewEvent(false); + bool bDisplaySpec(false); + bool bOpenDoc(false); m_eArgumentCount = NONE; @@ -169,8 +170,8 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) if (tmp.getLength() > 0) aArg = tmp; } - String aArgStr = aArg; + String aArgStr = aArg; if ( aArg.getLength() > 0 ) { m_eArgumentCount = m_eArgumentCount == NONE ? ONE : MANY; @@ -182,98 +183,98 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) if ( aArgStr.EqualsIgnoreCaseAscii( "-n" )) { // force new documents based on the following documents - bForceNewEvent = sal_True; - bOpenEvent = sal_False; - bForceOpenEvent = sal_False; - bPrintToEvent = sal_False; - bPrintEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; - } + bForceNewEvent = true; + bOpenEvent = false; + bForceOpenEvent = false; + bPrintToEvent = false; + bPrintEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; + } else if ( aArgStr.EqualsIgnoreCaseAscii( "-o" )) { - // force open documents regards if they are templates or not - bForceOpenEvent = sal_True; - bOpenEvent = sal_False; - bForceNewEvent = sal_False; - bPrintToEvent = sal_False; - bPrintEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; - } + // force open documents regardless if they are templates or not + bForceOpenEvent = true; + bOpenEvent = false; + bForceNewEvent = false; + bPrintToEvent = false; + bPrintEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; + } else if ( aArgStr.EqualsIgnoreCaseAscii( "-pt" )) { // Print to special printer - bPrintToEvent = sal_True; - bPrinterName = sal_True; - bPrintEvent = sal_False; - bOpenEvent = sal_False; - bForceNewEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; - bForceOpenEvent = sal_False; - } - else if ( aArgStr.EqualsIgnoreCaseAscii( "-p" )) - { + bPrintToEvent = true; + bPrinterName = true; + bPrintEvent = false; + bOpenEvent = false; + bForceNewEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; + bForceOpenEvent = false; + } + else if ( aArgStr.EqualsIgnoreCaseAscii( "-p" )) + { // Print to default printer - bPrintEvent = sal_True; - bPrintToEvent = sal_False; - bOpenEvent = sal_False; - bForceNewEvent = sal_False; - bForceOpenEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; - } - else if ( aArgStr.EqualsIgnoreCaseAscii( "-view" )) - { + bPrintEvent = true; + bPrintToEvent = false; + bOpenEvent = false; + bForceNewEvent = false; + bForceOpenEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; + } + else if ( aArgStr.EqualsIgnoreCaseAscii( "-view" )) + { // open in viewmode - bOpenEvent = sal_False; - bPrintEvent = sal_False; - bPrintToEvent = sal_False; - bForceNewEvent = sal_False; - bForceOpenEvent = sal_False; - bViewEvent = sal_True; - bStartEvent = sal_False; - bDisplaySpec = sal_False; - } + bOpenEvent = false; + bPrintEvent = false; + bPrintToEvent = false; + bForceNewEvent = false; + bForceOpenEvent = false; + bViewEvent = true; + bStartEvent = false; + bDisplaySpec = false; + } else if ( aArgStr.EqualsIgnoreCaseAscii( "-show" )) { // open in viewmode - bOpenEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_True; - bPrintEvent = sal_False; - bPrintToEvent = sal_False; - bForceNewEvent = sal_False; - bForceOpenEvent = sal_False; - bDisplaySpec = sal_False; + bOpenEvent = false; + bViewEvent = false; + bStartEvent = true; + bPrintEvent = false; + bPrintToEvent = false; + bForceNewEvent = false; + bForceOpenEvent = false; + bDisplaySpec = false; } else if ( aArgStr.EqualsIgnoreCaseAscii( "-display" )) { // set display - bOpenEvent = sal_False; - bPrintEvent = sal_False; - bForceOpenEvent = sal_False; - bPrintToEvent = sal_False; - bForceNewEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_True; + bOpenEvent = false; + bPrintEvent = false; + bForceOpenEvent = false; + bPrintToEvent = false; + bForceNewEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = true; } else if ( aArgStr.EqualsIgnoreCaseAscii( "-language" )) { - bOpenEvent = sal_False; - bPrintEvent = sal_False; - bForceOpenEvent = sal_False; - bPrintToEvent = sal_False; - bForceNewEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; + bOpenEvent = false; + bPrintEvent = false; + bForceOpenEvent = false; + bPrintToEvent = false; + bForceNewEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; } #ifdef MACOSX @@ -285,14 +286,14 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) else if ( aArgStr.CompareToAscii( "-psn", 4 ) == COMPARE_EQUAL ) { // finder argument from MacOSX - bOpenEvent = sal_False; - bPrintEvent = sal_False; - bForceOpenEvent = sal_False; - bPrintToEvent = sal_False; - bForceNewEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; + bOpenEvent = false; + bPrintEvent = false; + bForceOpenEvent = false; + bPrintToEvent = false; + bForceNewEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; } #endif } @@ -308,29 +309,54 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) { // handle this argument as a filename if ( bOpenEvent ) + { AddStringListParam_Impl( CMD_STRINGPARAM_OPENLIST, aArgStr ); + bOpenDoc = true; + } else if ( bViewEvent ) + { AddStringListParam_Impl( CMD_STRINGPARAM_VIEWLIST, aArgStr ); + bOpenDoc = true; + } else if ( bStartEvent ) + { AddStringListParam_Impl( CMD_STRINGPARAM_STARTLIST, aArgStr ); + bOpenDoc = true; + } else if ( bPrintEvent ) + { AddStringListParam_Impl( CMD_STRINGPARAM_PRINTLIST, aArgStr ); + bOpenDoc = true; + } else if ( bPrintToEvent ) + { AddStringListParam_Impl( CMD_STRINGPARAM_PRINTTOLIST, aArgStr ); + bOpenDoc = true; + } else if ( bForceNewEvent ) + { AddStringListParam_Impl( CMD_STRINGPARAM_FORCENEWLIST, aArgStr ); + bOpenDoc = true; + } else if ( bForceOpenEvent ) + { AddStringListParam_Impl( CMD_STRINGPARAM_FORCEOPENLIST, aArgStr ); - else if ( bDisplaySpec ){ + bOpenDoc = true; + } + else if ( bDisplaySpec ) + { AddStringListParam_Impl( CMD_STRINGPARAM_DISPLAY, aArgStr ); - bDisplaySpec = sal_False; // only one display, not a lsit - bOpenEvent = sal_True; // set back to standard + bDisplaySpec = false; // only one display, not a lsit + bOpenEvent = true; // set back to standard } } } } } } + + if ( bOpenDoc ) + m_bDocumentArgs = true; } void CommandLineArgs::AddStringListParam_Impl( StringParam eParam, const rtl::OUString& aParam ) @@ -432,8 +458,8 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& return sal_True; } else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-help" )) - || aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" )) - || aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-?" ))) + || aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" )) + || aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-?" ))) { SetBoolParam_Impl( CMD_BOOLPARAM_HELP, sal_True ); return sal_True; @@ -473,18 +499,18 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& SetBoolParam_Impl( CMD_BOOLPARAM_HELPMATH, sal_True ); return sal_True; } - #ifdef MACOSX - /* #i84053# ignore -psn on Mac - Platform dependent #ifdef here is ugly, however this is currently - the only platform dependent parameter. Should more appear - we should find a better solution - */ +#ifdef MACOSX + /* #i84053# ignore -psn on Mac + Platform dependent #ifdef here is ugly, however this is currently + the only platform dependent parameter. Should more appear + we should find a better solution + */ else if ( aArg.compareToAscii( "-psn", 4 ) == 0 ) { SetBoolParam_Impl( CMD_BOOLPARAM_PSN, sal_True ); return sal_True; } - #endif +#endif else if ( aArgStr.Copy(0, 8).EqualsIgnoreCaseAscii( "-accept=" )) { AddStringListParam_Impl( CMD_STRINGPARAM_ACCEPT, aArgStr.Copy( 8 ) ); @@ -496,7 +522,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& return sal_True; } else if ( aArgStr.CompareIgnoreCaseToAscii( "-portal," , - RTL_CONSTASCII_LENGTH( "-portal," )) == COMPARE_EQUAL ) + RTL_CONSTASCII_LENGTH( "-portal," )) == COMPARE_EQUAL ) { AddStringListParam_Impl( CMD_STRINGPARAM_PORTAL, aArgStr.Copy( RTL_CONSTASCII_LENGTH( "-portal," )) ); return sal_True; @@ -504,13 +530,10 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& else if ( aArgStr.Copy( 0, 7 ).EqualsIgnoreCaseAscii( "-userid" )) { if ( aArgStr.Len() > 8 ) - { - rtl::OUString aUserDir = aArgStr; - AddStringListParam_Impl( - CMD_STRINGPARAM_USERDIR, - ::rtl::Uri::decode( aUserDir.copy( 8 ), - rtl_UriDecodeWithCharset, - RTL_TEXTENCODING_UTF8 ) ); + { + rtl::OUString aUserDir = aArgStr; + AddStringListParam_Impl( CMD_STRINGPARAM_USERDIR, + ::rtl::Uri::decode( aUserDir.copy( 8 ), rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ) ); } return sal_True; } @@ -533,56 +556,64 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_WRITER ); if ( !bAlreadySet ) - SetBoolParam_Impl( CMD_BOOLPARAM_WRITER, sal_True ); + SetBoolParam_Impl( CMD_BOOLPARAM_WRITER, sal_True ); + m_bDocumentArgs = true; return sal_True; } else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-calc" )) == sal_True ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_CALC ); if ( !bAlreadySet ) - SetBoolParam_Impl( CMD_BOOLPARAM_CALC, sal_True ); + SetBoolParam_Impl( CMD_BOOLPARAM_CALC, sal_True ); + m_bDocumentArgs = true; return sal_True; } else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-draw" )) == sal_True ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_DRAW ); if ( !bAlreadySet ) - SetBoolParam_Impl( CMD_BOOLPARAM_DRAW, sal_True ); + SetBoolParam_Impl( CMD_BOOLPARAM_DRAW, sal_True ); + m_bDocumentArgs = true; return sal_True; } else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-impress" )) == sal_True ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_IMPRESS ); if ( !bAlreadySet ) - SetBoolParam_Impl( CMD_BOOLPARAM_IMPRESS, sal_True ); + SetBoolParam_Impl( CMD_BOOLPARAM_IMPRESS, sal_True ); + m_bDocumentArgs = true; return sal_True; } else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-base" )) == sal_True ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_BASE ); if ( !bAlreadySet ) - SetBoolParam_Impl( CMD_BOOLPARAM_BASE, sal_True ); + SetBoolParam_Impl( CMD_BOOLPARAM_BASE, sal_True ); + m_bDocumentArgs = true; return sal_True; } else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-global" )) == sal_True ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_GLOBAL ); if ( !bAlreadySet ) - SetBoolParam_Impl( CMD_BOOLPARAM_GLOBAL, sal_True ); + SetBoolParam_Impl( CMD_BOOLPARAM_GLOBAL, sal_True ); + m_bDocumentArgs = true; return sal_True; } else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-math" )) == sal_True ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_MATH ); if ( !bAlreadySet ) - SetBoolParam_Impl( CMD_BOOLPARAM_MATH, sal_True ); + SetBoolParam_Impl( CMD_BOOLPARAM_MATH, sal_True ); + m_bDocumentArgs = true; return sal_True; } else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-web" )) == sal_True ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_WEB ); if ( !bAlreadySet ) - SetBoolParam_Impl( CMD_BOOLPARAM_WEB, sal_True ); + SetBoolParam_Impl( CMD_BOOLPARAM_WEB, sal_True ); + m_bDocumentArgs = true; return sal_True; } @@ -605,12 +636,12 @@ sal_Bool CommandLineArgs::CheckGroupMembers( GroupParamId nGroupId, BoolParam nE void CommandLineArgs::ResetParamValues() { int i; - for ( i = 0; i < CMD_BOOLPARAM_COUNT; i++ ) m_aBoolParams[i] = sal_False; for ( i = 0; i < CMD_STRINGPARAM_COUNT; i++ ) m_aStrSetParams[i] = sal_False; m_eArgumentCount = NONE; + m_bDocumentArgs = false; } void CommandLineArgs::SetBoolParam( BoolParam eParam, sal_Bool bNewValue ) @@ -897,4 +928,10 @@ sal_Bool CommandLineArgs::IsEmptyOrAcceptOnly() const ( ( m_eArgumentCount == ONE ) && m_aBoolParams[ CMD_BOOLPARAM_PSN ] ); } +sal_Bool CommandLineArgs::WantsToLoadDocument() const +{ + osl::MutexGuard aMutexGuard( m_aMutex ); + return m_bDocumentArgs; +} + } // namespace desktop diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx index 615577098c2d..a1c70bf5df72 100644 --- a/desktop/source/app/cmdlineargs.hxx +++ b/desktop/source/app/cmdlineargs.hxx @@ -38,7 +38,7 @@ namespace desktop class CommandLineArgs { public: - enum BoolParam // must be zero based! + enum BoolParam // must be zero based! { CMD_BOOLPARAM_MINIMIZED, CMD_BOOLPARAM_INVISIBLE, @@ -71,7 +71,7 @@ class CommandLineArgs CMD_BOOLPARAM_HELPIMPRESS, CMD_BOOLPARAM_HELPBASE, CMD_BOOLPARAM_PSN, - CMD_BOOLPARAM_COUNT // must be last element! + CMD_BOOLPARAM_COUNT // must be last element! }; enum StringParam // must be zero based! @@ -92,7 +92,7 @@ class CommandLineArgs CMD_STRINGPARAM_PRINTERNAME, CMD_STRINGPARAM_DISPLAY, CMD_STRINGPARAM_LANGUAGE, - CMD_STRINGPARAM_COUNT // must be last element! + CMD_STRINGPARAM_COUNT // must be last element! }; enum GroupParamId @@ -101,7 +101,8 @@ class CommandLineArgs CMD_GRPID_COUNT }; - struct Supplier { + struct Supplier + { // Thrown from constructors and next: class Exception { public: @@ -122,86 +123,88 @@ class CommandLineArgs boost::optional< rtl::OUString > getCwdUrl() const { return m_cwdUrl; } // generic methods to access parameter - void SetBoolParam( BoolParam eParam, sal_Bool bNewValue ); + void SetBoolParam( BoolParam eParam, sal_Bool bNewValue ); // Access to bool parameters - sal_Bool IsMinimized() const; - sal_Bool IsInvisible() const; - sal_Bool IsNoRestore() const; - sal_Bool IsNoDefault() const; - sal_Bool IsBean() const; - sal_Bool IsServer() const; - sal_Bool IsHeadless() const; - sal_Bool IsQuickstart() const; - sal_Bool IsNoQuickstart() const; - sal_Bool IsTerminateAfterInit() const; - sal_Bool IsNoFirstStartWizard() const; - sal_Bool IsNoLogo() const; - sal_Bool IsNoLockcheck() const; - sal_Bool IsHelp() const; - sal_Bool IsHelpWriter() const; - sal_Bool IsHelpCalc() const; - sal_Bool IsHelpDraw() const; - sal_Bool IsHelpImpress() const; - sal_Bool IsHelpBase() const; - sal_Bool IsHelpMath() const; - sal_Bool IsHelpBasic() const; - sal_Bool IsWriter() const; - sal_Bool IsCalc() const; - sal_Bool IsDraw() const; - sal_Bool IsImpress() const; - sal_Bool IsBase() const; - sal_Bool IsGlobal() const; - sal_Bool IsMath() const; - sal_Bool IsWeb() const; - sal_Bool HasModuleParam() const; + sal_Bool IsMinimized() const; + sal_Bool IsInvisible() const; + sal_Bool IsNoRestore() const; + sal_Bool IsNoDefault() const; + sal_Bool IsBean() const; + sal_Bool IsServer() const; + sal_Bool IsHeadless() const; + sal_Bool IsQuickstart() const; + sal_Bool IsNoQuickstart() const; + sal_Bool IsTerminateAfterInit() const; + sal_Bool IsNoFirstStartWizard() const; + sal_Bool IsNoLogo() const; + sal_Bool IsNoLockcheck() const; + sal_Bool IsHelp() const; + sal_Bool IsHelpWriter() const; + sal_Bool IsHelpCalc() const; + sal_Bool IsHelpDraw() const; + sal_Bool IsHelpImpress() const; + sal_Bool IsHelpBase() const; + sal_Bool IsHelpMath() const; + sal_Bool IsHelpBasic() const; + sal_Bool IsWriter() const; + sal_Bool IsCalc() const; + sal_Bool IsDraw() const; + sal_Bool IsImpress() const; + sal_Bool IsBase() const; + sal_Bool IsGlobal() const; + sal_Bool IsMath() const; + sal_Bool IsWeb() const; + sal_Bool HasModuleParam() const; + sal_Bool WantsToLoadDocument() const; // Access to string parameters - sal_Bool GetPortalConnectString( ::rtl::OUString& rPara) const; - sal_Bool GetAcceptString( ::rtl::OUString& rPara) const; - sal_Bool GetUnAcceptString( ::rtl::OUString& rPara) const; - sal_Bool GetOpenList( ::rtl::OUString& rPara) const; - sal_Bool GetViewList( ::rtl::OUString& rPara) const; - sal_Bool GetStartList( ::rtl::OUString& rPara) const; - sal_Bool GetForceOpenList( ::rtl::OUString& rPara) const; - sal_Bool GetForceNewList( ::rtl::OUString& rPara) const; - sal_Bool GetPrintList( ::rtl::OUString& rPara) const; - sal_Bool GetPrintToList( ::rtl::OUString& rPara ) const; - sal_Bool GetPrinterName( ::rtl::OUString& rPara ) const; - sal_Bool GetLanguage( ::rtl::OUString& rPara ) const; + sal_Bool GetPortalConnectString( ::rtl::OUString& rPara) const; + sal_Bool GetAcceptString( ::rtl::OUString& rPara) const; + sal_Bool GetUnAcceptString( ::rtl::OUString& rPara) const; + sal_Bool GetOpenList( ::rtl::OUString& rPara) const; + sal_Bool GetViewList( ::rtl::OUString& rPara) const; + sal_Bool GetStartList( ::rtl::OUString& rPara) const; + sal_Bool GetForceOpenList( ::rtl::OUString& rPara) const; + sal_Bool GetForceNewList( ::rtl::OUString& rPara) const; + sal_Bool GetPrintList( ::rtl::OUString& rPara) const; + sal_Bool GetPrintToList( ::rtl::OUString& rPara ) const; + sal_Bool GetPrinterName( ::rtl::OUString& rPara ) const; + sal_Bool GetLanguage( ::rtl::OUString& rPara ) const; // Special analyzed states (does not match directly to a command line parameter!) - sal_Bool IsPrinting() const; - sal_Bool IsEmpty() const; - sal_Bool IsEmptyOrAcceptOnly() const; + sal_Bool IsPrinting() const; + sal_Bool IsEmpty() const; + sal_Bool IsEmptyOrAcceptOnly() const; private: enum Count { NONE, ONE, MANY }; struct GroupDefinition { - sal_Int32 nCount; - BoolParam* pGroupMembers; + sal_Int32 nCount; + BoolParam* pGroupMembers; }; // no copy and operator= CommandLineArgs( const CommandLineArgs& ); CommandLineArgs operator=( const CommandLineArgs& ); - sal_Bool InterpretCommandLineParameter( const ::rtl::OUString& ); - void ParseCommandLine_Impl( Supplier& supplier ); - void ResetParamValues(); - sal_Bool CheckGroupMembers( GroupParamId nGroup, BoolParam nExcludeMember ) const; + sal_Bool InterpretCommandLineParameter( const ::rtl::OUString& ); + void ParseCommandLine_Impl( Supplier& supplier ); + void ResetParamValues(); + sal_Bool CheckGroupMembers( GroupParamId nGroup, BoolParam nExcludeMember ) const; - void AddStringListParam_Impl( StringParam eParam, const rtl::OUString& aParam ); - void SetBoolParam_Impl( BoolParam eParam, sal_Bool bValue ); + void AddStringListParam_Impl( StringParam eParam, const rtl::OUString& aParam ); + void SetBoolParam_Impl( BoolParam eParam, sal_Bool bValue ); boost::optional< rtl::OUString > m_cwdUrl; - sal_Bool m_aBoolParams[ CMD_BOOLPARAM_COUNT ]; // Stores boolean parameters - rtl::OUString m_aStrParams[ CMD_STRINGPARAM_COUNT ]; // Stores string parameters - sal_Bool m_aStrSetParams[ CMD_STRINGPARAM_COUNT ]; // Stores if string parameters are provided on cmdline - Count m_eArgumentCount; // Number of Args - mutable ::osl::Mutex m_aMutex; + sal_Bool m_aBoolParams[ CMD_BOOLPARAM_COUNT ]; // Stores boolean parameters + rtl::OUString m_aStrParams[ CMD_STRINGPARAM_COUNT ]; // Stores string parameters + sal_Bool m_aStrSetParams[ CMD_STRINGPARAM_COUNT ]; // Stores if string parameters are provided on cmdline + Count m_eArgumentCount; // Number of Args + bool m_bDocumentArgs; // A document creation/open/load arg is used + mutable ::osl::Mutex m_aMutex; // static definition for groups where only one member can be true static GroupDefinition m_pGroupDefinitions[ CMD_GRPID_COUNT ]; From cc065c4937433f944cd7f6e4332f599d5346a5e9 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 25 Oct 2010 13:41:57 +0200 Subject: [PATCH 202/279] sb132: #i112107# getImplementationName should not throw --- configmgr/source/access.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index eda60e6d612a..3602f3cd73c5 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -909,11 +909,8 @@ rtl::OUString Access::getImplementationName() throw (css::uno::RuntimeException) OSL_ASSERT(thisIs(IS_ANY)); osl::MutexGuard g(lock); checkLocalizedPropertyAccess(); - throw css::uno::RuntimeException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "configmgr Access has no service implementation name")), - static_cast< cppu::OWeakObject * >(this)); + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("org.openoffice-configmgr::Access")); } sal_Bool Access::supportsService(rtl::OUString const & ServiceName) From 7e5eda3334b1fb465e957e00c11c26f0375ce1ca Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 25 Oct 2010 14:43:41 +0200 Subject: [PATCH 203/279] sb132: #i115142# component factories should implement XServiceInfo --- configmgr/source/configurationprovider.cxx | 18 +++++- configmgr/source/configurationregistry.cxx | 58 +----------------- configmgr/source/configurationregistry.hxx | 22 +++---- configmgr/source/defaultprovider.cxx | 68 ++-------------------- configmgr/source/defaultprovider.hxx | 22 +++---- configmgr/source/services.cxx | 15 +++-- configmgr/source/update.cxx | 56 +----------------- configmgr/source/update.hxx | 22 +++---- 8 files changed, 66 insertions(+), 215 deletions(-) diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx index 3cd58b145bff..d636737a299e 100644 --- a/configmgr/source/configurationprovider.cxx +++ b/configmgr/source/configurationprovider.cxx @@ -55,7 +55,7 @@ #include "cppu/unotype.hxx" #include "cppuhelper/compbase5.hxx" #include "cppuhelper/factory.hxx" -#include "cppuhelper/implbase1.hxx" +#include "cppuhelper/implbase2.hxx" #include "cppuhelper/interfacecontainer.hxx" #include "cppuhelper/weak.hxx" #include "osl/diagnose.h" @@ -127,7 +127,6 @@ private: virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) { return configuration_provider::getSupportedServiceNames(); } - //TODO: DefaultProvider? virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( rtl::OUString const & aServiceSpecifier) @@ -395,7 +394,8 @@ void Service::flushModifications() const { } class Factory: - public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, + public cppu::WeakImplHelper2< + css::lang::XSingleComponentFactory, css::lang::XServiceInfo >, private boost::noncopyable { public: @@ -414,6 +414,18 @@ private: css::uno::Sequence< css::uno::Any > const & Arguments, css::uno::Reference< css::uno::XComponentContext > const & Context) throw (css::uno::Exception, css::uno::RuntimeException); + + virtual rtl::OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException) + { return configuration_provider::getImplementationName(); } + + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) + throw (css::uno::RuntimeException) + { return ServiceName == getSupportedServiceNames()[0]; } //TODO + + virtual css::uno::Sequence< rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (css::uno::RuntimeException) + { return configuration_provider::getSupportedServiceNames(); } }; css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext( diff --git a/configmgr/source/configurationregistry.cxx b/configmgr/source/configurationregistry.cxx index ffd7174c0ad7..f4810eb34ff8 100644 --- a/configmgr/source/configurationregistry.cxx +++ b/configmgr/source/configurationregistry.cxx @@ -36,7 +36,6 @@ #include "com/sun/star/lang/XMultiComponentFactory.hpp" #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/lang/XServiceInfo.hpp" -#include "com/sun/star/lang/XSingleComponentFactory.hpp" #include "com/sun/star/registry/InvalidRegistryException.hpp" #include "com/sun/star/registry/InvalidValueException.hpp" #include "com/sun/star/registry/MergeConflictException.hpp" @@ -56,13 +55,11 @@ #include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/util/XFlushable.hpp" #include "cppu/unotype.hxx" -#include "cppuhelper/factory.hxx" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/implbase3.hxx" #include "cppuhelper/weak.hxx" #include "osl/diagnose.h" #include "osl/mutex.hxx" -#include "rtl/unload.h" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -877,53 +874,12 @@ rtl::OUString RegistryKey::getResolvedName(rtl::OUString const & aKeyName) return aKeyName; } -class Factory: - public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, - private boost::noncopyable -{ -public: - Factory() {} - -private: - virtual ~Factory() {} - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithContext( - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any > const & Arguments, - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); -}; - -css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext( - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) -{ - return createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any >(), Context); } -css::uno::Reference< css::uno::XInterface > -Factory::createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any > const & Arguments, - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) +css::uno::Reference< css::uno::XInterface > create( + css::uno::Reference< css::uno::XComponentContext > const & context) { - if (Arguments.getLength() != 0) { - throw css::uno::Exception( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationRegistry must be" - " instantiated without arguments")), - static_cast< cppu::OWeakObject * >(this)); - } - return static_cast< cppu::OWeakObject * >(new Service(Context)); -} - + return static_cast< cppu::OWeakObject * >(new Service(context)); } rtl::OUString getImplementationName() { @@ -939,12 +895,4 @@ css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { return css::uno::Sequence< rtl::OUString >(&name, 1); } -css::uno::Reference< css::lang::XSingleComponentFactory > createFactory( - cppu::ComponentFactoryFunc, rtl::OUString const &, - css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) - SAL_THROW(()) -{ - return new Factory; -} - } } diff --git a/configmgr/source/configurationregistry.hxx b/configmgr/source/configurationregistry.hxx index 6cba122188b1..417c519b97f4 100644 --- a/configmgr/source/configurationregistry.hxx +++ b/configmgr/source/configurationregistry.hxx @@ -30,28 +30,28 @@ #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/Sequence.hxx" -#include "cppuhelper/factory.hxx" -#include "rtl/unload.h" #include "sal/types.h" -namespace com { namespace sun { namespace star { namespace lang { - class XSingleComponentFactory; -} } } } +namespace com { namespace sun { namespace star { + namespace uno { + class XComponentContext; + class XInterface; + } +} } } namespace rtl { class OUString; } namespace configmgr { namespace configuration_registry { +com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL +create( + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + const & context); + rtl::OUString SAL_CALL getImplementationName(); com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(); -com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory > -SAL_CALL createFactory( - cppu::ComponentFactoryFunc, rtl::OUString const &, - com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) - SAL_THROW(()); - } } #endif diff --git a/configmgr/source/defaultprovider.cxx b/configmgr/source/defaultprovider.cxx index d069663290e8..9079d4736a6c 100644 --- a/configmgr/source/defaultprovider.cxx +++ b/configmgr/source/defaultprovider.cxx @@ -28,24 +28,16 @@ #include "precompiled_configmgr.hxx" #include "sal/config.h" -#include "boost/noncopyable.hpp" -#include "com/sun/star/lang/XSingleComponentFactory.hpp" -#include "com/sun/star/uno/Any.hxx" -#include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" -#include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" -#include "cppuhelper/factory.hxx" -#include "cppuhelper/implbase1.hxx" -#include "cppuhelper/weak.hxx" -#include "sal/types.h" -#include "rtl/unload.h" +#include "osl/mutex.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "configurationprovider.hxx" +#include "defaultprovider.hxx" #include "lock.hxx" namespace configmgr { namespace default_provider { @@ -54,58 +46,17 @@ namespace { namespace css = com::sun::star; -class Factory: - public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, - private boost::noncopyable -{ -public: - Factory() {} - -private: - virtual ~Factory() {} - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithContext( - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any > const & Arguments, - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); -}; - -css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext( - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) -{ - return createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any >(), Context); } -css::uno::Reference< css::uno::XInterface > -Factory::createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any > const & Arguments, - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) +css::uno::Reference< css::uno::XInterface > create( + css::uno::Reference< css::uno::XComponentContext > const & context) { - if (Arguments.getLength() != 0) { - throw css::uno::Exception( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.DefaultProvider must be" - " instantiated without arguments")), - static_cast< cppu::OWeakObject * >(this)); - } osl::MutexGuard guard(lock); static css::uno::Reference< css::uno::XInterface > singleton( - configuration_provider::createDefault(Context)); + configuration_provider::createDefault(context)); return singleton; } -} - rtl::OUString getImplementationName() { return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -119,13 +70,4 @@ css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { return css::uno::Sequence< rtl::OUString >(&name, 1); } -css::uno::Reference< css::lang::XSingleComponentFactory > -SAL_CALL createFactory( - cppu::ComponentFactoryFunc, rtl::OUString const &, - css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) - SAL_THROW(()) -{ - return new Factory; -} - } } diff --git a/configmgr/source/defaultprovider.hxx b/configmgr/source/defaultprovider.hxx index 7b267a80b42e..f678931d35fe 100644 --- a/configmgr/source/defaultprovider.hxx +++ b/configmgr/source/defaultprovider.hxx @@ -32,28 +32,28 @@ #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/Sequence.hxx" -#include "cppuhelper/factory.hxx" -#include "rtl/unload.h" #include "sal/types.h" -namespace com { namespace sun { namespace star { namespace lang { - class XSingleComponentFactory; -} } } } +namespace com { namespace sun { namespace star { + namespace uno { + class XComponentContext; + class XInterface; + } +} } } namespace rtl { class OUString; } namespace configmgr { namespace default_provider { +com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL +create( + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + const & context); + rtl::OUString SAL_CALL getImplementationName(); com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(); -com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory > -SAL_CALL createFactory( - cppu::ComponentFactoryFunc, rtl::OUString const &, - com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) - SAL_THROW(()); - } } #endif diff --git a/configmgr/source/services.cxx b/configmgr/source/services.cxx index b1ef8d2169bb..dd01189be6e2 100644 --- a/configmgr/source/services.cxx +++ b/configmgr/source/services.cxx @@ -32,6 +32,7 @@ #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" +#include "cppuhelper/factory.hxx" #include "cppuhelper/implementationentry.hxx" #include "osl/diagnose.h" #include "uno/lbnames.h" @@ -58,15 +59,17 @@ static cppu::ImplementationEntry const services[] = { { &dummy, &configmgr::configuration_provider::getImplementationName, &configmgr::configuration_provider::getSupportedServiceNames, &configmgr::configuration_provider::createFactory, 0, 0 }, - { &dummy, &configmgr::default_provider::getImplementationName, + { &configmgr::default_provider::create, + &configmgr::default_provider::getImplementationName, &configmgr::default_provider::getSupportedServiceNames, - &configmgr::default_provider::createFactory, 0, 0 }, - { &dummy, &configmgr::configuration_registry::getImplementationName, + &cppu::createSingleComponentFactory, 0, 0 }, + { &configmgr::configuration_registry::create, + &configmgr::configuration_registry::getImplementationName, &configmgr::configuration_registry::getSupportedServiceNames, - &configmgr::configuration_registry::createFactory, 0, 0 }, - { &dummy, &configmgr::update::getImplementationName, + &cppu::createSingleComponentFactory, 0, 0 }, + { &configmgr::update::create, &configmgr::update::getImplementationName, &configmgr::update::getSupportedServiceNames, - &configmgr::update::createFactory, 0, 0 }, + &cppu::createSingleComponentFactory, 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx index 403b761a5abd..73074aa7c338 100644 --- a/configmgr/source/update.cxx +++ b/configmgr/source/update.cxx @@ -32,20 +32,15 @@ #include "boost/noncopyable.hpp" #include "com/sun/star/configuration/XUpdate.hpp" -#include "com/sun/star/lang/XSingleComponentFactory.hpp" -#include "com/sun/star/uno/Any.hxx" -#include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" -#include "cppuhelper/factory.hxx" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/weak.hxx" #include "osl/mutex.hxx" #include "rtl/ref.hxx" -#include "rtl/unload.h" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -155,55 +150,14 @@ void Service::insertModificationXcuFile( bc.send(); } -class Factory: - public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, - private boost::noncopyable -{ -public: - Factory() {} - -private: - virtual ~Factory() {} - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithContext( - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); - - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL - createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any > const & Arguments, - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException); -}; - -css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext( - css::uno::Reference< css::uno::XComponentContext > const & Context) - throw (css::uno::Exception, css::uno::RuntimeException) -{ - return createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any >(), Context); } -css::uno::Reference< css::uno::XInterface > -Factory::createInstanceWithArgumentsAndContext( - css::uno::Sequence< css::uno::Any > const & Arguments, +css::uno::Reference< css::uno::XInterface > create( css::uno::Reference< css::uno::XComponentContext > const &) - throw (css::uno::Exception, css::uno::RuntimeException) { - if (Arguments.getLength() != 0) { - throw css::uno::Exception( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.configuration.Update must be" - " instantiated without arguments")), - static_cast< cppu::OWeakObject * >(this)); - } return static_cast< cppu::OWeakObject * >(new Service); } -} - rtl::OUString getImplementationName() { return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.Update")); @@ -216,12 +170,4 @@ css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { return css::uno::Sequence< rtl::OUString >(&name, 1); } -css::uno::Reference< css::lang::XSingleComponentFactory > createFactory( - cppu::ComponentFactoryFunc, rtl::OUString const &, - css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) - SAL_THROW(()) -{ - return new Factory; -} - } } diff --git a/configmgr/source/update.hxx b/configmgr/source/update.hxx index faa5c86b15fa..a60264e67ac3 100644 --- a/configmgr/source/update.hxx +++ b/configmgr/source/update.hxx @@ -32,28 +32,28 @@ #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/Sequence.hxx" -#include "cppuhelper/factory.hxx" -#include "rtl/unload.h" #include "sal/types.h" -namespace com { namespace sun { namespace star { namespace lang { - class XSingleComponentFactory; -} } } } +namespace com { namespace sun { namespace star { + namespace uno { + class XComponentContext; + class XInterface; + } +} } } namespace rtl { class OUString; } namespace configmgr { namespace update { +com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL +create( + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + const &); + rtl::OUString SAL_CALL getImplementationName(); com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(); -com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory > -SAL_CALL createFactory( - cppu::ComponentFactoryFunc, rtl::OUString const &, - com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) - SAL_THROW(()); - } } #endif From bf0d13c61c57e21589c5589f97ab17a6c151ea03 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 25 Oct 2010 16:28:23 +0200 Subject: [PATCH 204/279] sb131: #i114962# test uno-components;platform= feature in passive.oxt (and adapt active.oxt similarly, for consistency) --- .../test/deployment/active/description.xml | 1 - desktop/test/deployment/active/makefile.mk | 7 ++- desktop/test/deployment/active/manifest.xml | 2 +- .../test/deployment/passive/description.xml | 1 - desktop/test/deployment/passive/makefile.mk | 49 +++++++++++++------ desktop/test/deployment/passive/manifest.xml | 5 +- 6 files changed, 41 insertions(+), 24 deletions(-) diff --git a/desktop/test/deployment/active/description.xml b/desktop/test/deployment/active/description.xml index f5675533cd05..fd7049e0cc3d 100644 --- a/desktop/test/deployment/active/description.xml +++ b/desktop/test/deployment/active/description.xml @@ -30,7 +30,6 @@ - diff --git a/desktop/test/deployment/active/makefile.mk b/desktop/test/deployment/active/makefile.mk index fe31bd66db0e..5511a39c8baf 100644 --- a/desktop/test/deployment/active/makefile.mk +++ b/desktop/test/deployment/active/makefile.mk @@ -59,11 +59,10 @@ $(MISC)/active.oxt : manifest.xml description.xml Addons.xcu \ $(RM) -r $(MISC)/$(TARGET)/active.oxt-zip $(MKDIR) $(MISC)/$(TARGET)/active.oxt-zip $(MKDIRHIER) $(MISC)/$(TARGET)/active.oxt-zip/META-INF - $(SED) -e 's|@PATH@|$(SHL1TARGETN:f)|g' < manifest.xml \ + $(SED) -e 's|@PATH@|$(SHL1TARGETN:f)|g' \ + -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' < manifest.xml \ > $(MISC)/$(TARGET)/active.oxt-zip/META-INF/manifest.xml - $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' < description.xml \ - > $(MISC)/$(TARGET)/active.oxt-zip/description.xml - $(COPY) Addons.xcu ProtocolHandler.xcu $(SHL1TARGETN) \ + $(COPY) description.xml Addons.xcu ProtocolHandler.xcu $(SHL1TARGETN) \ $(MISC)/$(TARGET)/active_java.jar active_python.py \ $(MISC)/$(TARGET)/active.oxt-zip/ cd $(MISC)/$(TARGET)/active.oxt-zip && zip ../../active.oxt \ diff --git a/desktop/test/deployment/active/manifest.xml b/desktop/test/deployment/active/manifest.xml index 1256da145a93..4f076696663b 100644 --- a/desktop/test/deployment/active/manifest.xml +++ b/desktop/test/deployment/active/manifest.xml @@ -32,7 +32,7 @@ - diff --git a/desktop/test/deployment/passive/makefile.mk b/desktop/test/deployment/passive/makefile.mk index 0f24faf56554..019e5dcab837 100644 --- a/desktop/test/deployment/passive/makefile.mk +++ b/desktop/test/deployment/passive/makefile.mk @@ -35,7 +35,8 @@ PACKAGE = com/sun/star/comp/test/deployment/passive_java JAVAFILES = Dispatch.java Provider.java Services.java JARFILES = juh.jar ridl.jar unoil.jar -my_components = passive_native passive_java passive_python +my_platform_components = passive_native +my_generic_components = passive_java passive_python .INCLUDE: settings.mk @@ -55,34 +56,50 @@ DEF1NAME = $(SHL1TARGET) ALLTAR : $(MISC)/passive.oxt $(MISC)/passive.oxt : manifest.xml description.xml Addons.xcu \ - ProtocolHandler.xcu $(MISC)/$(TARGET)/uno.components $(SHL1TARGETN) \ + ProtocolHandler.xcu $(MISC)/$(TARGET)/platform.components \ + $(MISC)/$(TARGET)/generic.components $(SHL1TARGETN) \ $(MISC)/$(TARGET)/passive_java.jar passive_python.py $(RM) $@ $(RM) -r $(MISC)/$(TARGET)/passive.oxt-zip $(MKDIR) $(MISC)/$(TARGET)/passive.oxt-zip $(MKDIRHIER) $(MISC)/$(TARGET)/passive.oxt-zip/META-INF - $(COPY) manifest.xml $(MISC)/$(TARGET)/passive.oxt-zip/META-INF/ - $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' < description.xml \ - > $(MISC)/$(TARGET)/passive.oxt-zip/description.xml - $(COPY) Addons.xcu ProtocolHandler.xcu $(MISC)/$(TARGET)/uno.components \ - $(SHL1TARGETN) $(MISC)/$(TARGET)/passive_java.jar passive_python.py \ + $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' < manifest.xml \ + > $(MISC)/$(TARGET)/passive.oxt-zip/META-INF/manifest.xml + $(COPY) description.xml Addons.xcu ProtocolHandler.xcu \ + $(MISC)/$(TARGET)/platform.components \ + $(MISC)/$(TARGET)/generic.components $(SHL1TARGETN) \ + $(MISC)/$(TARGET)/passive_java.jar passive_python.py \ $(MISC)/$(TARGET)/passive.oxt-zip/ cd $(MISC)/$(TARGET)/passive.oxt-zip && zip ../../passive.oxt \ META-INF/manifest.xml description.xml Addons.xcu ProtocolHandler.xcu \ - uno.components $(SHL1TARGETN:f) passive_java.jar passive_python.py + platform.components generic.components $(SHL1TARGETN:f) \ + passive_java.jar passive_python.py -$(MISC)/$(TARGET)/uno.components : $(SOLARENV)/bin/packcomponents.xslt \ - $(MISC)/$(TARGET)/uno.components.input \ - $(my_components:^"$(MISC)/$(TARGET)/":+".component") +$(MISC)/$(TARGET)/platform.components : $(SOLARENV)/bin/packcomponents.xslt \ + $(MISC)/$(TARGET)/platform.components.input \ + $(my_platform_components:^"$(MISC)/$(TARGET)/":+".component") $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/$(TARGET)/ -o $@ \ $(SOLARENV)/bin/packcomponents.xslt \ - $(MISC)/$(TARGET)/uno.components.input + $(MISC)/$(TARGET)/platform.components.input -$(MISC)/$(TARGET)/uno.components.input : +$(MISC)/$(TARGET)/platform.components.input : $(MKDIRHIER) $(@:d) - echo \ - '$(my_components:^"":+".component")' \ - > $@ + echo '' \ + '$(my_platform_components:^"":+".component")' \ + '' > $@ + +$(MISC)/$(TARGET)/generic.components : $(SOLARENV)/bin/packcomponents.xslt \ + $(MISC)/$(TARGET)/generic.components.input \ + $(my_generic_components:^"$(MISC)/$(TARGET)/":+".component") + $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/$(TARGET)/ -o $@ \ + $(SOLARENV)/bin/packcomponents.xslt \ + $(MISC)/$(TARGET)/generic.components.input + +$(MISC)/$(TARGET)/generic.components.input : + $(MKDIRHIER) $(@:d) + echo '' \ + '$(my_generic_components:^"":+".component")' \ + '' > $@ $(MISC)/$(TARGET)/passive_native.component : \ $(SOLARENV)/bin/createcomponent.xslt passive_native.component diff --git a/desktop/test/deployment/passive/manifest.xml b/desktop/test/deployment/passive/manifest.xml index c686c6c14e97..5b8ac8419bb9 100644 --- a/desktop/test/deployment/passive/manifest.xml +++ b/desktop/test/deployment/passive/manifest.xml @@ -31,7 +31,10 @@ m:full-path="Addons.xcu"/> + + m:full-path="generic.components"/> From 10ab6463a189a22b6059a2fafeed414ef50dbf1c Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 26 Oct 2010 09:25:45 +0200 Subject: [PATCH 205/279] sb131: #i114962# removed unused type name to conveniently avoid compiler warning about shadowed identifier in a derived class --- desktop/source/deployment/registry/inc/dp_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h index 3d3bf7cf912c..3e6bd95c6c77 100644 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -294,7 +294,7 @@ protected: ::rtl::OUString m_context; // currently only for library containers: - enum context { + enum { CONTEXT_UNKNOWN, CONTEXT_USER, CONTEXT_SHARED,CONTEXT_BUNDLED, CONTEXT_TMP, CONTEXT_DOCUMENT From 7cd05cb69a4f49a84c4cfadb0f36943350f8e783 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 26 Oct 2010 14:58:05 +0200 Subject: [PATCH 206/279] #i112595# Fixed problems with sub-toolbars and docking --- framework/source/layoutmanager/helpers.cxx | 38 +- framework/source/layoutmanager/helpers.hxx | 24 +- .../layoutmanager/toolbarlayoutmanager.cxx | 327 +++++++++--------- 3 files changed, 183 insertions(+), 206 deletions(-) diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index e144519b5e0c..63ea64b996c5 100755 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -31,18 +31,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ - +// my own includes #include "helpers.hxx" #include #include -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ - +// interface includes #include #include #include @@ -51,24 +45,36 @@ #include #include -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ - +// other includes #include #include #include #include -//_________________________________________________________________________________________________________________ -// namespace -//_________________________________________________________________________________________________________________ - +// namespace using namespace com::sun::star; namespace framework { +bool isToolboxHorizontalAligned( ToolBox* pToolBox ) +{ + if ( pToolBox ) + return (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + return false; +} + +bool isHorizontalDockingArea( const sal_Int16 nDockArea ) +{ + ::ui::DockingArea nDockingArea = (ui::DockingArea)nDockArea; + return (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); +} + +bool isHorizontalDockingArea( const ui::DockingArea& nDockingArea ) +{ + return (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); +} + ::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow ) { ::rtl::OUString aToolbarName; diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx index f7f0b3f4ca5c..5a5f851f597d 100755 --- a/framework/source/layoutmanager/helpers.hxx +++ b/framework/source/layoutmanager/helpers.hxx @@ -31,40 +31,27 @@ #ifndef __FRAMEWORK_LAYOUTMANAGER_HELPERS_HXX_ #define __FRAMEWORK_LAYOUTMANAGER_HELPERS_HXX_ -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ - +// my own includes #include #include #include -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ - +// interface includes #include #include #include #include #include +#include -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ - +// other includes #include #include -//_________________________________________________________________________________________________________________ -// namespace -//_________________________________________________________________________________________________________________ - #define UIRESOURCE_PROTOCO_ASCII "private:" #define UIRESOURCE_RESOURCE_ASCII "resource" #define UIRESOURCE_URL_ASCII "private:resource" #define UIRESOURCE_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( UIRESOURCE_URL_ASCII )) - #define UIRESOURCETYPE_TOOLBAR "toolbar" #define UIRESOURCETYPE_STATUSBAR "statusbar" #define UIRESOURCETYPE_MENUBAR "menubar" @@ -72,6 +59,9 @@ namespace framework { +bool isToolboxHorizontalAligned( ToolBox* pToolBox ); +bool isHorizontalDockingArea( const sal_Int16 nDockArea ); +bool isHorizontalDockingArea( const ::com::sun::star::ui::DockingArea& nDockArea ); ::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow ); ToolBox* getToolboxPtr( Window* pWindow ); Window* getWindowFromXUIElement( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement ); diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index d551eefb994f..f7d1565c12bb 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -31,10 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ - +// my own includes #include #include #include @@ -42,10 +39,7 @@ #include #include -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ - +// interface includes #include #include #include @@ -53,10 +47,7 @@ #include #include -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ - +// other includes #include #include #include @@ -98,7 +89,7 @@ ToolbarLayoutManager::ToolbarLayoutManager( setZeroRectangle( m_aDockingArea ); // create toolkit object - m_xToolkit = uno::Reference< css::awt::XToolkit >( m_xSMGR->createInstance( SERVICENAME_VCLTOOLKIT ), uno::UNO_QUERY ); + m_xToolkit = uno::Reference< awt::XToolkit >( m_xSMGR->createInstance( SERVICENAME_VCLTOOLKIT ), uno::UNO_QUERY ); } ToolbarLayoutManager::~ToolbarLayoutManager() @@ -122,9 +113,9 @@ uno::Any SAL_CALL ToolbarLayoutManager::queryInterface( const uno::Type & rType { uno::Any a = ::cppu::queryInterface( rType, - SAL_STATIC_CAST( ::com::sun::star::awt::XDockableWindowListener*, this ), - SAL_STATIC_CAST( ::com::sun::star::ui::XUIConfigurationListener*, this ), - SAL_STATIC_CAST( ::com::sun::star::awt::XWindowListener*, this )); + SAL_STATIC_CAST( awt::XDockableWindowListener*, this ), + SAL_STATIC_CAST( ui::XUIConfigurationListener*, this ), + SAL_STATIC_CAST( awt::XWindowListener*, this )); if ( a.hasValue() ) return a; @@ -142,7 +133,7 @@ void SAL_CALL ToolbarLayoutManager::disposing( const lang::EventObject& aEvent ) } } -::com::sun::star::awt::Rectangle ToolbarLayoutManager::getDockingArea() +awt::Rectangle ToolbarLayoutManager::getDockingArea() { WriteGuard aWriteLock( m_aLock ); Rectangle aNewDockingArea( m_aDockingArea ); @@ -170,7 +161,7 @@ void ToolbarLayoutManager::setDockingArea( const awt::Rectangle& rDockingArea ) void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangle& rBorderSpace ) { - uno::Reference< css::awt::XWindow2 > xContainerWindow; + uno::Reference< awt::XWindow2 > xContainerWindow; ReadGuard aReadLock( m_aLock ); xContainerWindow = m_xContainerWindow; @@ -322,7 +313,7 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea() uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( xWindow.is() && xDockWindow.is() ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && pWindow->IsVisible() && !xDockWindow->isFloating() ) @@ -339,8 +330,7 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea() if ( pConstIter->m_aDockedData.m_nDockedArea == nCurrDockingArea ) { - if (( pConstIter->m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( pConstIter->m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( pConstIter->m_aDockedData.m_nDockedArea )) { if ( pConstIter->m_aDockedData.m_aPos.Y() > nCurrPos ) { @@ -600,6 +590,7 @@ bool ToolbarLayoutManager::showToolbar( const ::rtl::OUString& rResourceURL ) aUIElement.m_bVisible = true; implts_writeWindowStateData( aUIElement ); + implts_setToolbar( aUIElement ); return true; } @@ -623,6 +614,7 @@ bool ToolbarLayoutManager::hideToolbar( const ::rtl::OUString& rResourceURL ) aUIElement.m_bVisible = false; implts_writeWindowStateData( aUIElement ); + implts_setToolbar( aUIElement ); return true; } @@ -712,10 +704,7 @@ void ToolbarLayoutManager::setVisible( bool bVisible ) m_bLayoutInProgress = bLayoutInProgress; } -bool ToolbarLayoutManager::dockToolbar( - const ::rtl::OUString& rResourceURL, - ::com::sun::star::ui::DockingArea eDockingArea, - const ::com::sun::star::awt::Point& aPos ) +bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& rResourceURL, ui::DockingArea eDockingArea, const awt::Point& aPos ) { UIElement aUIElement = implts_findToolbar( rResourceURL ); @@ -767,10 +756,7 @@ bool ToolbarLayoutManager::dockToolbar( ::Point aPixelPos; ::Point aDockPos; - implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); + implts_findNextDockingPos((ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea, aSize, aDockPos, aPixelPos ); aUIElement.m_aDockedData.m_aPos = aDockPos; } } @@ -857,7 +843,6 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) if (( aToolbarName.getLength() > 0 ) && ( aCommand.getLength() > 0 )) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); ::std::vector< uno::Reference< ui::XUIFunctionListener > > aListenerArray; UIElementVector::iterator pIter; @@ -872,15 +857,11 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) } } aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ const sal_uInt32 nCount = aListenerArray.size(); for ( sal_uInt32 i = 0; i < nCount; ++i ) { - try - { - aListenerArray[i]->functionExecute( aToolbarName, aCommand ); - } + try { aListenerArray[i]->functionExecute( aToolbarName, aCommand ); } catch ( uno::RuntimeException& ) { throw; } catch ( uno::Exception& ) {} } @@ -1182,7 +1163,7 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &ToolbarLayoutManager::requestToolbar, this,_1 )); } -void ToolbarLayoutManager::implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aTbxSeqSeq ) +void ToolbarLayoutManager::implts_createCustomToolBars( const uno::Sequence< uno::Sequence< beans::PropertyValue > >& aTbxSeqSeq ) { const uno::Sequence< beans::PropertyValue >* pTbxSeq = aTbxSeqSeq.getConstArray(); for ( sal_Int32 i = 0; i < aTbxSeqSeq.getLength(); i++ ) @@ -1334,10 +1315,13 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b implts_insertToolbar( aNewToolbar ); bVisible = aNewToolbar.m_bVisible; } + aWriteLock.unlock(); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ // set toolbar menu style according to customize command state SvtCommandOptions aCmdOptions; + vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { @@ -1348,9 +1332,6 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b else pToolbar->SetMenuType( nMenuType | TOOLBOX_MENUTYPE_CUSTOMIZE ); } - - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } implts_sortUIElements(); @@ -1369,7 +1350,7 @@ uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( con aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); aPropSeq[0].Value <<= m_xFrame; aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" )); - aPropSeq[1].Value <<= sal_True; + aPropSeq[1].Value <<= true; try { @@ -1441,7 +1422,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno { aPos = implts_findNextCascadeFloatingPos(); rElement.m_aFloatingData.m_aPos = aPos; // set new cascaded position - bWriteData = sal_True; + bWriteData = true; } if( bSetSize ) @@ -1487,6 +1468,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno vos::OGuard aGuard( Application::GetSolarMutex() ); pToolBox->SetAlign( ImplConvertAlignment(rElement.m_aDockedData.m_nDockedArea ) ); pToolBox->SetLineCount( 1 ); + xDockWindow->setFloatingMode( sal_False ); if ( rElement.m_aDockedData.m_bLocked ) xDockWindow->lock(); aSize = pToolBox->CalcWindowSizePixel(); @@ -1510,10 +1492,13 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno if( bSetSize ) xWindow->setOutputSize( AWTSize( aSize) ); - if ( bShowElement && pWindow ) + if ( pWindow ) { vos::OGuard aGuard( Application::GetSolarMutex() ); - pWindow->Show( sal_True ); + if ( bShowElement ) + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + else + pWindow->Hide(); } } } @@ -1558,7 +1543,7 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& if ( m_pGlobalSettings == 0 ) { m_pGlobalSettings = new GlobalSettings( m_xSMGR ); - bGetSettingsState = sal_True; + bGetSettingsState = true; } pGlobalSettings = m_pGlobalSettings; aWriteLock.unlock(); @@ -1656,11 +1641,11 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& if ( pGlobalSettings->HasStatesInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR )) { WriteGuard aWriteLock2( m_aLock ); - m_bGlobalSettings = sal_True; + m_bGlobalSettings = true; aWriteLock2.unlock(); - css::uno::Any aValue; - sal_Bool bValue = sal_Bool(); + uno::Any aValue; + sal_Bool bValue = sal_Bool(); if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR, GlobalSettings::STATEINFO_LOCKED, aValue )) @@ -1690,7 +1675,7 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen m_bStoreWindowState = true; // set flag to determine that we triggered the notification aWriteLock.unlock(); - sal_Bool bPersistent( sal_False ); + bool bPersistent( sal_False ); uno::Reference< beans::XPropertySet > xPropSet( rElementData.m_xUIElement, uno::UNO_QUERY ); if ( xPropSet.is() ) { @@ -1701,7 +1686,7 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen } catch ( beans::UnknownPropertyException ) { - bPersistent = sal_True; // Non-configurable elements should at least store their dimension/position + bPersistent = true; // Non-configurable elements should at least store their dimension/position } catch ( lang::WrappedTargetException ) {} } @@ -1783,7 +1768,6 @@ void ToolbarLayoutManager::implts_writeNewWindowStateData( const rtl::OUString a bVisible = xWindow2->isVisible(); } - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); UIElement& rUIElement = impl_findToolbar( aName ); if ( rUIElement.m_xUIElement.is() ) @@ -1796,11 +1780,8 @@ void ToolbarLayoutManager::implts_writeNewWindowStateData( const rtl::OUString a rUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); } } - implts_writeWindowStateData( rUIElement ); - aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } } @@ -1813,7 +1794,6 @@ UIElement& ToolbarLayoutManager::impl_findToolbar( const rtl::OUString& aName ) static UIElement aEmptyElement; UIElementVector::iterator pIter; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) { @@ -1822,7 +1802,6 @@ UIElement& ToolbarLayoutManager::impl_findToolbar( const rtl::OUString& aName ) } return aEmptyElement; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } UIElement ToolbarLayoutManager::implts_findToolbar( const rtl::OUString& aName ) @@ -1949,7 +1928,7 @@ void ToolbarLayoutManager::implts_setToolbar( const UIElement& rUIElement ) ::Point aStartPos( nCascadeIndentX, nCascadeIndentY ); ::Point aCurrPos( aStartPos ); - css::awt::Rectangle aRect; + awt::Rectangle aRect; Window* pContainerWindow( 0 ); if ( xContainerWindow.is() ) @@ -1961,8 +1940,8 @@ void ToolbarLayoutManager::implts_setToolbar( const UIElement& rUIElement ) } // Determine size of top and left docking area - css::awt::Rectangle aTopRect = xTopDockingWindow->getPosSize(); - css::awt::Rectangle aLeftRect = xLeftDockingWindow->getPosSize(); + awt::Rectangle aTopRect = xTopDockingWindow->getPosSize(); + awt::Rectangle aLeftRect = xLeftDockingWindow->getPosSize(); aStartPos.X() += aLeftRect.Width + nCascadeIndentX; aStartPos.Y() += aTopRect.Height + nCascadeIndentY; @@ -1982,7 +1961,7 @@ void ToolbarLayoutManager::implts_setToolbar( const UIElement& rUIElement ) Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && pWindow->IsVisible() ) { - css::awt::Rectangle aFloatRect = xWindow->getPosSize(); + awt::Rectangle aFloatRect = xWindow->getPosSize(); if ((( aFloatRect.X - nHotZoneX ) <= aCurrPos.X() ) && ( aFloatRect.X >= aCurrPos.X() ) && (( aFloatRect.Y - nHotZoneY ) <= aCurrPos.Y() ) && @@ -2055,8 +2034,8 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); if ( xUIElement.is() ) { - uno::Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( xDockWindow.is() ) { // docked windows @@ -2100,8 +2079,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD if ( !lcl_checkUIElement(xUIElement,aPosSize,xWindow) ) continue; - if (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( eDockingArea )) { if ( nCurrPos == -1 ) { @@ -2145,18 +2123,18 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); + awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Height ) rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Height; if ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, nLastRowColPixelPos, - aDockAreaRect.Width, aPosSize.Height ); + rRowColumnsWindowData[nIndex].aRowColumnRect = awt::Rectangle( 0, nLastRowColPixelPos, + aDockAreaRect.Width, aPosSize.Height ); else - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( 0, ( nLastRowColPixelPos - aPosSize.Height ), - aDockAreaRect.Width, aPosSize.Height ); + rRowColumnsWindowData[nIndex].aRowColumnRect = awt::Rectangle( 0, ( nLastRowColPixelPos - aPosSize.Height ), + aDockAreaRect.Width, aPosSize.Height ); rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Width + nSpace; } else @@ -2203,18 +2181,18 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); + awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Width ) rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Width; if ( eDockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( nLastRowColPixelPos, 0, - aPosSize.Width, aDockAreaRect.Height ); + rRowColumnsWindowData[nIndex].aRowColumnRect = awt::Rectangle( nLastRowColPixelPos, 0, + aPosSize.Width, aDockAreaRect.Height ); else - rRowColumnsWindowData[nIndex].aRowColumnRect = css::awt::Rectangle( ( nLastRowColPixelPos - aPosSize.Width ), 0, - aPosSize.Width, aDockAreaRect.Height ); + rRowColumnsWindowData[nIndex].aRowColumnRect = awt::Rectangle( ( nLastRowColPixelPos - aPosSize.Width ), 0, + aPosSize.Width, aDockAreaRect.Height ); rRowColumnsWindowData[nIndex].nVarSize += aPosSize.Height + nSpace; } } @@ -2283,7 +2261,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D continue; sal_Int32 nSpace; - if (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( eDockingArea )) { nSpace = ( rElement.m_aDockedData.m_aPos.X() - nLastPos ); @@ -2297,10 +2275,10 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D rRowColumnWindowData.aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); + awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); if ( rRowColumnWindowData.nStaticSize < aPosSize.Height ) rRowColumnWindowData.nStaticSize = aPosSize.Height; rRowColumnWindowData.nVarSize += aPosSize.Width; @@ -2317,10 +2295,10 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; rRowColumnWindowData.aRowColumnWindowSizes.push_back( - css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); + awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), + rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, + aPosSize.Height )); if ( rRowColumnWindowData.nStaticSize < aPosSize.Width ) rRowColumnWindowData.nStaticSize = aPosSize.Width; rRowColumnWindowData.nVarSize += aPosSize.Height; @@ -2393,9 +2371,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D { SingleRowColumnWindowData aRowColumnWindowData; - sal_Bool bHorzDockArea = (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); - + sal_Bool bHorzDockArea = ( isHorizontalDockingArea( eDockingArea )); implts_getDockingAreaElementInfoOnSingleRowCol( eDockingArea, nRowCol, aRowColumnWindowData ); if ( aRowColumnWindowData.aRowColumnWindows.empty() ) return rMovedElementRect; @@ -2471,17 +2447,16 @@ void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingAre sal_Int32 nNeededSpace( 0 ); sal_Int32 nTopDockingAreaSize( 0 ); - if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( DockingArea )) { nMaxSpace = aDockingWinSize.Width(); nNeededSpace = aUIElementSize.Width(); } else { - nMaxSpace = aDockingWinSize.Height(); - nNeededSpace = aUIElementSize.Height(); - nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); + nMaxSpace = aDockingWinSize.Height(); + nNeededSpace = aUIElementSize.Height(); + nTopDockingAreaSize = implts_getTopBottomDockingAreaSizes().Width(); } std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; @@ -2505,10 +2480,9 @@ void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingAre const sal_uInt32 nWindowSizesCount = rRowColumnWindowData.aRowColumnWindowSizes.size(); for ( sal_uInt32 j = 0; j < nWindowSizesCount; j++ ) { - css::awt::Rectangle rRect = rRowColumnWindowData.aRowColumnWindowSizes[j]; - sal_Int32& rSpace = rRowColumnWindowData.aRowColumnSpace[j]; - if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + awt::Rectangle rRect = rRowColumnWindowData.aRowColumnWindowSizes[j]; + sal_Int32& rSpace = rRowColumnWindowData.aRowColumnSpace[j]; + if ( isHorizontalDockingArea( DockingArea )) { if ( rSpace >= nNeededSpace ) { @@ -2538,8 +2512,7 @@ void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingAre if (( nCurrPos + nNeededSpace ) <= nMaxSpace ) { - if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( DockingArea )) { rVirtualPos = ::Point( nCurrPos, rRowColumnWindowData.nRowColumn ); if ( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) @@ -2580,8 +2553,7 @@ void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingAre nFreeRowColPixelPos = aDockingWinSize.Width() - aUIElementSize.Width(); } - if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( DockingArea )) { rVirtualPos = ::Point( 0, nNextFreeRowCol ); if ( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) @@ -2611,8 +2583,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( if ( rRowColumnWindowData.aRowColumnWindows.empty() ) return; - if (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( nDockingArea )) { nContainerClientSize = rContainerSize.Width(); nDiff = nContainerClientSize - rRowColumnWindowData.nVarSize; @@ -2635,9 +2606,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nSpace = rRowColumnWindowData.aRowColumnSpace[i]; if ( nSpace >= -nDiff ) { - - if (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( nDockingArea )) { // Try to move this and all user elements behind with the calculated difference for ( sal_uInt32 j = i; j < nCount ; j++ ) @@ -2655,8 +2624,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( } else if ( nSpace > 0 ) { - if (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( nDockingArea )) { // Try to move this and all user elements behind with the calculated difference for ( sal_uInt32 j = i; j < nCount; j++ ) @@ -2681,8 +2649,8 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 i = sal_Int32( nCount - 1 ); while ( i >= 0 ) { - css::awt::Rectangle& rWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; - ::Size aMinSize; + awt::Rectangle& rWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; + ::Size aMinSize; vos::OGuard aGuard( Application::GetSolarMutex() ); { @@ -2694,8 +2662,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( if (( aMinSize.Width() > 0 ) && ( aMinSize.Height() > 0 )) { - if (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( nDockingArea )) { sal_Int32 nMaxReducation = ( rWinRect.Width - aMinSize.Width() ); if ( nMaxReducation >= -nDiff ) @@ -2854,7 +2821,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( uno::Reference< awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); uno::Reference< awt::XWindow > xDockingAreaWindow; ::Rectangle aTrackingRect( rTrackingRect ); - ui::DockingArea eDockedArea( (::com::sun::star::ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); + ui::DockingArea eDockedArea( (ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); bool bHorizontalDockArea(( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || @@ -3047,7 +3014,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( { if ((( nRowCol == nMinRowCol ) && ( rDockingOperation == DOCKOP_BEFORE_COLROW )) || (( nRowCol == nMaxRowCol ) && ( rDockingOperation == DOCKOP_AFTER_COLROW ))) - bOpOutsideOfDockingArea = sal_True; + bOpOutsideOfDockingArea = true; else { // handle docking before/after a row @@ -3215,8 +3182,7 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d if ( rRowColRect.IsInside( rMousePos )) { - if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )) + if ( isHorizontalDockingArea( DockingArea )) { sal_Int32 nRegion = rRowColRect.getHeight() / nHorzVerticalRegionSize; sal_Int32 nPosY = rRowColRect.Top() + nRegion; @@ -3257,7 +3223,7 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d ::Rectangle aDockingAreaOffsets( m_aDockingAreaOffsets ); aReadGuard.unlock(); - bool bHorizontalDockArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + bool bHorizontalDockArea( isHorizontalDockingArea( eDockingArea )); sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); @@ -3303,12 +3269,10 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d aTrackingRect.setWidth( rRowColumnRect.getWidth() ); aTrackingRect.setHeight( nSize ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aReadGuard.lock(); uno::Reference< awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[eDockingArea]; uno::Reference< awt::XWindow2 > xContainerWindow = m_xContainerWindow; aReadGuard.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ sal_Int32 nDockPosY( 0 ); Window* pDockingAreaWindow( 0 ); @@ -3331,7 +3295,7 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d void ToolbarLayoutManager::implts_setTrackingRect( ui::DockingArea eDockingArea, const ::Point& rMousePos, ::Rectangle& rTrackingRect ) { - bool bHorizontalDockArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + bool bHorizontalDockArea( isHorizontalDockingArea( eDockingArea )); ::Point aPoint = rTrackingRect.TopLeft(); if ( bHorizontalDockArea ) aPoint.X() = rMousePos.X(); @@ -3350,7 +3314,7 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); aReadLock.unlock(); - bool bHorzDockingArea(( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + bool bHorzDockingArea( isHorizontalDockingArea( eDockingArea )); sal_Int32 nRowCol( bHorzDockingArea ? rUIElement.m_aDockedData.m_aPos.Y() : rUIElement.m_aDockedData.m_aPos.X() ); @@ -3433,15 +3397,13 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( //--------------------------------------------------------------------------------------------------------- // XWindowListener //--------------------------------------------------------------------------------------------------------- -void SAL_CALL ToolbarLayoutManager::windowResized( const css::awt::WindowEvent& aEvent ) -throw( css::uno::RuntimeException ) +void SAL_CALL ToolbarLayoutManager::windowResized( const awt::WindowEvent& aEvent ) +throw( uno::RuntimeException ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); bool bLocked( m_bDockingInProgress ); bool bLayoutInProgress( m_bLayoutInProgress ); aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ // Do not do anything if we are in the middle of a docking process. This would interfere all other // operations. We will store the new position and size in the docking handlers. @@ -3449,15 +3411,15 @@ throw( css::uno::RuntimeException ) // and size of the user interface elements. if ( !bLocked && !bLayoutInProgress ) { - bool bNotify( false ); - uno::Reference< css::awt::XWindow > xWindow( aEvent.Source, uno::UNO_QUERY ); + bool bNotify( false ); + uno::Reference< awt::XWindow > xWindow( aEvent.Source, uno::UNO_QUERY ); UIElement aUIElement = implts_findToolbar( aEvent.Source ); if ( aUIElement.m_xUIElement.is() ) { if ( aUIElement.m_bFloating ) { - uno::Reference< css::awt::XWindow2 > xWindow2( xWindow, uno::UNO_QUERY ); + uno::Reference< awt::XWindow2 > xWindow2( xWindow, uno::UNO_QUERY ); if( xWindow2.is() ) { @@ -3485,18 +3447,18 @@ throw( css::uno::RuntimeException ) } } -void SAL_CALL ToolbarLayoutManager::windowMoved( const css::awt::WindowEvent& /*aEvent*/ ) -throw( css::uno::RuntimeException ) +void SAL_CALL ToolbarLayoutManager::windowMoved( const awt::WindowEvent& /*aEvent*/ ) +throw( uno::RuntimeException ) { } -void SAL_CALL ToolbarLayoutManager::windowShown( const css::lang::EventObject& /*aEvent*/ ) -throw( css::uno::RuntimeException ) +void SAL_CALL ToolbarLayoutManager::windowShown( const lang::EventObject& /*aEvent*/ ) +throw( uno::RuntimeException ) { } -void SAL_CALL ToolbarLayoutManager::windowHidden( const css::lang::EventObject& /*aEvent*/ ) -throw( css::uno::RuntimeException ) +void SAL_CALL ToolbarLayoutManager::windowHidden( const lang::EventObject& /*aEvent*/ ) +throw( uno::RuntimeException ) { } @@ -3509,8 +3471,8 @@ throw (uno::RuntimeException) bool bWinFound( false ); ReadGuard aReadGuard( m_aLock ); - uno::Reference< css::awt::XWindow2 > xContainerWindow( m_xContainerWindow ); - uno::Reference< css::awt::XWindow2 > xWindow( e.Source, uno::UNO_QUERY ); + uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); + uno::Reference< awt::XWindow2 > xWindow( e.Source, uno::UNO_QUERY ); aReadGuard.unlock(); Window* pContainerWindow( 0 ); @@ -3529,7 +3491,7 @@ throw (uno::RuntimeException) awt::Rectangle aRect; bWinFound = true; - uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( xDockWindow->isFloating() ) { awt::Rectangle aPos = xWindow->getPosSize(); @@ -3544,8 +3506,7 @@ throw (uno::RuntimeException) { ToolBox* pToolBox = (ToolBox *)pWindow; aUIElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + aUIElement.m_aFloatingData.m_bIsHorizontal = isToolboxHorizontalAligned( pToolBox ); } } } @@ -3590,8 +3551,7 @@ throw (uno::RuntimeException) sal_Int16 eDockingArea( -1 ); // none sal_Int32 nMagneticZone( aUIDockingElement.m_bFloating ? MAGNETIC_DISTANCE_DOCK : MAGNETIC_DISTANCE_UNDOCK ); awt::Rectangle aNewTrackingRect; - ::Rectangle aTrackingRect( e.TrackingRectangle.X, - e.TrackingRectangle.Y, + ::Rectangle aTrackingRect( e.TrackingRectangle.X, e.TrackingRectangle.Y, ( e.TrackingRectangle.X + e.TrackingRectangle.Width ), ( e.TrackingRectangle.Y + e.TrackingRectangle.Height )); @@ -3670,7 +3630,7 @@ throw (uno::RuntimeException) ::Point aOutputPos = pContainerWindow->ScreenToOutputPixel( aTrackingRect.TopLeft() ); aTrackingRect.SetPos( aOutputPos ); - ::Rectangle aNewDockingRect( aTrackingRect ); + ::Rectangle aNewDockingRect( aTrackingRect ); implts_calcDockingPosSize( aUIDockingElement, eDockingOperation, aNewDockingRect, aMousePos ); ::Point aScreenPos = pContainerWindow->OutputToScreenPixel( aNewDockingRect.TopLeft() ); @@ -3682,7 +3642,7 @@ throw (uno::RuntimeException) } else if ( pToolBox && bDockingInProgress ) { - bool bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + bool bIsHorizontal = isToolboxHorizontalAligned( pToolBox ); ::Size aFloatSize = aUIDockingElement.m_aFloatingData.m_aSize; if ( aFloatSize.Width() > 0 && aFloatSize.Height() > 0 ) { @@ -3708,12 +3668,10 @@ throw (uno::RuntimeException) // For the first time we don't have any data about the floating size of a toolbar. // We calculate it and store it for later use. - aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel( - ::Point( e.MousePos.X, e.MousePos.Y )); + aUIDockingElement.m_aFloatingData.m_aPos = pContainerWindow->ScreenToOutputPixel(::Point( e.MousePos.X, e.MousePos.Y )); aUIDockingElement.m_aFloatingData.m_aSize = aFloatSize; aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + aUIDockingElement.m_aFloatingData.m_bIsHorizontal = isToolboxHorizontalAligned( pToolBox ); } aDockingData.TrackingRectangle.X = e.MousePos.X; aDockingData.TrackingRectangle.Y = e.MousePos.Y; @@ -3722,7 +3680,6 @@ throw (uno::RuntimeException) aDockingData.bFloating = ( eDockingArea == -1 ); // Write current data to the member docking progress data - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); m_aDockUIElement.m_bFloating = aDockingData.bFloating; if ( !aDockingData.bFloating ) @@ -3733,7 +3690,6 @@ throw (uno::RuntimeException) else m_aDockUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } catch ( uno::Exception& ) {} } @@ -3776,15 +3732,13 @@ throw (uno::RuntimeException) if ( m_eDockOperation != DOCKOP_ON_COLROW ) { // we have to renumber our row/column data to insert a new row/column - implts_renumberRowColumnData( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, - m_eDockOperation, - aUIDockingElement ); + implts_renumberRowColumnData((ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, m_eDockOperation, aUIDockingElement ); } } bStartDockFloated = rUIElement.m_bFloating; rUIElement.m_bFloating = m_aDockUIElement.m_bFloating; - rUIElement.m_bUserActive = sal_True; + rUIElement.m_bUserActive = true; } // reset member for next docking operation @@ -3871,8 +3825,7 @@ throw (uno::RuntimeException) aUIDockingElement.m_aFloatingData.m_aPos = pToolBox->GetPosPixel(); aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->GetOutputSizePixel(); aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIDockingElement.m_aFloatingData.m_bIsHorizontal = (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || - ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM )); + aUIDockingElement.m_aFloatingData.m_bIsHorizontal = isToolboxHorizontalAligned( pToolBox ); } } } @@ -3972,10 +3925,7 @@ throw (uno::RuntimeException) aSize = pWindow->GetSizePixel(); } - implts_findNextDockingPos( (::com::sun::star::ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); + implts_findNextDockingPos((ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, aSize, aDockPos, aPixelPos ); aUIDockingElement.m_aDockedData.m_aPos = aDockPos; } @@ -3985,7 +3935,7 @@ throw (uno::RuntimeException) pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); ::Size aSize = pToolBox->CalcWindowSizePixel( 1 ); awt::Rectangle aRect = xWindow->getPosSize(); - xWindow->setPosSize( aRect.X, aRect.Y, 0, 0, css::awt::PosSize::POS ); + xWindow->setPosSize( aRect.X, aRect.Y, 0, 0, awt::PosSize::POS ); xWindow->setOutputSize( AWTSize( aSize ) ); } } @@ -4024,9 +3974,43 @@ throw (uno::RuntimeException) } } -void SAL_CALL ToolbarLayoutManager::closed( const lang::EventObject& /*e*/ ) +void SAL_CALL ToolbarLayoutManager::closed( const lang::EventObject& e ) throw (uno::RuntimeException) { + rtl::OUString aName; + UIElement aUIElement; + UIElementVector::iterator pIter; + + WriteGuard aWriteLock( m_aLock ); + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + { + uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); + if ( xUIElement.is() ) + { + uno::Reference< uno::XInterface > xIfac( xUIElement->getRealInterface(), uno::UNO_QUERY ); + if ( xIfac == e.Source ) + { + aName = pIter->m_aName; + + // user closes a toolbar => + // context sensitive toolbar: only destroy toolbar and store state. + // context sensitive toolbar: make it invisible, store state and destroy it. + if ( !pIter->m_bContextSensitive ) + pIter->m_bVisible = sal_False; + + aUIElement = *pIter; + break; + } + } + } + aWriteLock.unlock(); + + // destroy element + if ( aName.getLength() > 0 ) + { + implts_writeWindowStateData( aUIElement ); + destroyToolbar( aName ); + } } void SAL_CALL ToolbarLayoutManager::endPopupMode( const awt::EndPopupModeEvent& /*e*/ ) @@ -4219,9 +4203,8 @@ bool ToolbarLayoutManager::floatToolbar( const ::rtl::OUString& rResourceURL ) { try { - uno::Reference< awt::XWindow2 > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); - if ( xWindow.is() && xWindow->isVisible() && xDockWindow.is() && !xDockWindow->isFloating() ) + uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + if ( xDockWindow.is() && !xDockWindow->isFloating() ) { aUIElement.m_bFloating = true; implts_writeWindowStateData( aUIElement ); @@ -4245,9 +4228,8 @@ bool ToolbarLayoutManager::lockToolbar( const ::rtl::OUString& rResourceURL ) { try { - uno::Reference< awt::XWindow2 > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); - if ( xWindow.is() && xWindow->isVisible() && xDockWindow.is() && !xDockWindow->isFloating() && !xDockWindow->isLocked() ) + uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + if ( xDockWindow.is() && !xDockWindow->isFloating() && !xDockWindow->isLocked() ) { aUIElement.m_aDockedData.m_bLocked = true; implts_writeWindowStateData( aUIElement ); @@ -4271,9 +4253,8 @@ bool ToolbarLayoutManager::unlockToolbar( const ::rtl::OUString& rResourceURL ) { try { - uno::Reference< awt::XWindow2 > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< css::awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); - if ( xWindow.is() && xWindow->isVisible() && xDockWindow.is() && !xDockWindow->isFloating() && xDockWindow->isLocked() ) + uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + if ( xDockWindow.is() && !xDockWindow->isFloating() && xDockWindow->isLocked() ) { aUIElement.m_aDockedData.m_bLocked = false; implts_writeWindowStateData( aUIElement ); From 3314bec88951b91c102fb26780cbb30d571b2a3f Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 26 Oct 2010 14:59:02 +0200 Subject: [PATCH 207/279] #i112595# Transition from sal_Bool to bool --- framework/inc/uielement/uielement.hxx | 100 +++++++++++++------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/framework/inc/uielement/uielement.hxx b/framework/inc/uielement/uielement.hxx index 98e65d5c5a93..b4ad9e2cbb6d 100755 --- a/framework/inc/uielement/uielement.hxx +++ b/framework/inc/uielement/uielement.hxx @@ -60,83 +60,83 @@ struct DockedData { DockedData() : m_aPos( LONG_MAX, LONG_MAX ), m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ), - m_bLocked( sal_False ) {} + m_bLocked( false ) {} - Point m_aPos; - Size m_aSize; - sal_Int16 m_nDockedArea; - sal_Bool m_bLocked; + Point m_aPos; + Size m_aSize; + sal_Int16 m_nDockedArea; + bool m_bLocked; }; struct FloatingData { FloatingData() : m_aPos( LONG_MAX, LONG_MAX ), m_nLines( 1 ), - m_bIsHorizontal( sal_True ) {} + m_bIsHorizontal( true ) {} - Point m_aPos; - Size m_aSize; - sal_Int16 m_nLines; - sal_Bool m_bIsHorizontal; + Point m_aPos; + Size m_aSize; + sal_Int16 m_nLines; + bool m_bIsHorizontal; }; struct UIElement { - UIElement() : m_bFloating( sal_False ), - m_bVisible( sal_True ), - m_bUserActive( sal_False ), - m_bCreateNewRowCol0( sal_False ), - m_bDeactiveHide( sal_False ), - m_bMasterHide( sal_False ), - m_bContextSensitive( sal_False ), - m_bContextActive( sal_True ), - m_bNoClose( sal_False ), - m_bSoftClose( sal_False ), - m_bStateRead( sal_False ), + UIElement() : m_bFloating( false ), + m_bVisible( true ), + m_bUserActive( false ), + m_bCreateNewRowCol0( false ), + m_bDeactiveHide( false ), + m_bMasterHide( false ), + m_bContextSensitive( false ), + m_bContextActive( true ), + m_bNoClose( false ), + m_bSoftClose( false ), + m_bStateRead( false ), m_nStyle( BUTTON_SYMBOL ) {} UIElement( const rtl::OUString& rName, const rtl::OUString& rType, const com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement, - sal_Bool bFloating = sal_False + bool bFloating = false ) : m_aType( rType ), m_aName( rName ), m_xUIElement( rUIElement ), m_bFloating( bFloating ), - m_bVisible( sal_True ), - m_bUserActive( sal_False ), - m_bCreateNewRowCol0( sal_False ), - m_bDeactiveHide( sal_False ), - m_bMasterHide( sal_False ), - m_bContextSensitive( sal_False ), - m_bContextActive( sal_True ), - m_bNoClose( sal_False ), - m_bSoftClose( sal_False ), - m_bStateRead( sal_False ), + m_bVisible( true ), + m_bUserActive( false ), + m_bCreateNewRowCol0( false ), + m_bDeactiveHide( false ), + m_bMasterHide( false ), + m_bContextSensitive( false ), + m_bContextActive( true ), + m_bNoClose( false ), + m_bSoftClose( false ), + m_bStateRead( false ), m_nStyle( BUTTON_SYMBOL ) {} bool operator< ( const UIElement& aUIElement ) const; UIElement& operator=( const UIElement& rUIElement ); - rtl::OUString m_aType; - rtl::OUString m_aName; - rtl::OUString m_aUIName; - com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement; - sal_Bool m_bFloating, - m_bVisible, - m_bUserActive, - m_bCreateNewRowCol0, - m_bDeactiveHide, - m_bMasterHide, - m_bContextSensitive, - m_bContextActive; - sal_Bool m_bNoClose, - m_bSoftClose, - m_bStateRead; - sal_Int16 m_nStyle; - DockedData m_aDockedData; - FloatingData m_aFloatingData; + rtl::OUString m_aType; + rtl::OUString m_aName; + rtl::OUString m_aUIName; + com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement; + bool m_bFloating, + m_bVisible, + m_bUserActive, + m_bCreateNewRowCol0, + m_bDeactiveHide, + m_bMasterHide, + m_bContextSensitive, + m_bContextActive; + bool m_bNoClose, + m_bSoftClose, + m_bStateRead; + sal_Int16 m_nStyle; + DockedData m_aDockedData; + FloatingData m_aFloatingData; }; typedef std::vector< UIElement > UIElementVector; From 1d6df0d19d9fccc559c91dfb864d5cb2b38d864a Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 27 Oct 2010 14:09:04 +0200 Subject: [PATCH 208/279] dockingwindows: #i112595# Improve layout function so docking areas are now only shown when completely layouted. No more overlay effects or other artifacts visible --- framework/source/layoutmanager/helpers.cxx | 21 ++++--- framework/source/layoutmanager/helpers.hxx | 1 + .../source/layoutmanager/layoutmanager.cxx | 6 +- .../layoutmanager/toolbarlayoutmanager.cxx | 56 +++++++------------ 4 files changed, 36 insertions(+), 48 deletions(-) diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index 63ea64b996c5..be81119382e7 100755 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -57,6 +57,13 @@ using namespace com::sun::star; namespace framework { +bool isReverseOrderDockingArea( const sal_Int16 nDockArea ) +{ + ui::DockingArea eDockArea = (ui::DockingArea)nDockArea; + return (( eDockArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) || + ( eDockArea == ui::DockingArea_DOCKINGAREA_RIGHT )); +} + bool isToolboxHorizontalAligned( ToolBox* pToolBox ) { if ( pToolBox ) @@ -64,15 +71,15 @@ bool isToolboxHorizontalAligned( ToolBox* pToolBox ) return false; } -bool isHorizontalDockingArea( const sal_Int16 nDockArea ) -{ - ::ui::DockingArea nDockingArea = (ui::DockingArea)nDockArea; - return (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); -} - bool isHorizontalDockingArea( const ui::DockingArea& nDockingArea ) { - return (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + return (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || + ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); +} + +bool isHorizontalDockingArea( const sal_Int16 nDockArea ) +{ + return isHorizontalDockingArea((ui::DockingArea)nDockArea ); } ::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow ) diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx index 5a5f851f597d..c2b9695dd9f2 100755 --- a/framework/source/layoutmanager/helpers.hxx +++ b/framework/source/layoutmanager/helpers.hxx @@ -60,6 +60,7 @@ namespace framework { bool isToolboxHorizontalAligned( ToolBox* pToolBox ); +bool isReverseOrderDockingArea( const sal_Int16 nDockArea ); bool isHorizontalDockingArea( const sal_Int16 nDockArea ); bool isHorizontalDockingArea( const ::com::sun::star::ui::DockingArea& nDockArea ); ::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow ); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 8342f9069eca..55d3b2335299 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -2507,11 +2507,7 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ // if we did not do an container window resize, or it failed, then use the DockingAcceptor as usual if ( !bGotRequestedBorderSpace ) - { bGotRequestedBorderSpace = xDockingAreaAcceptor->requestDockingAreaSpace( aBorderSpace ); - if ( bGotRequestedBorderSpace ) - xDockingAreaAcceptor->setDockingAreaSpace( aBorderSpace ); - } if ( bGotRequestedBorderSpace ) { @@ -2547,6 +2543,8 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ ::Size( aContainerSize.Width(),aStatusBarSize.Height() )); } + xDockingAreaAcceptor->setDockingAreaSpace( aBorderSpace ); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteGuard.lock(); m_bDoLayout = sal_False; diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index f7d1565c12bb..a098871d4266 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -155,8 +155,6 @@ void ToolbarLayoutManager::setDockingArea( const awt::Rectangle& rDockingArea ) m_aDockingArea = putAWTToRectangle( rDockingArea ); m_bLayoutDirty = true; aWriteLock.unlock(); - - implts_setDockingAreaWindowSizes( rDockingArea ); } void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangle& rBorderSpace ) @@ -246,6 +244,7 @@ void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) WriteGuard aWriteLock( m_aLock ); bool bLayoutInProgress( m_bLayoutInProgress ); m_bLayoutInProgress = true; + awt::Rectangle aDockingArea = putRectangleValueToAWT( m_aDockingArea ); aWriteLock.unlock(); if ( bLayoutInProgress ) @@ -254,6 +253,7 @@ void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) // Retrieve row/column dependent data from all docked user-interface elements for ( sal_Int32 i = 0; i < DOCKINGAREAS_COUNT; i++ ) { + bool bReverse( isReverseOrderDockingArea( i )); std::vector< SingleRowColumnWindowData > aRowColumnsWindowData; implts_getDockingAreaElementInfos( (ui::DockingArea)i, aRowColumnsWindowData ); @@ -262,11 +262,14 @@ void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) const sal_uInt32 nCount = aRowColumnsWindowData.size(); for ( sal_uInt32 j = 0; j < nCount; ++j ) { - implts_calcWindowPosSizeOnSingleRowColumn( i, nOffset, aRowColumnsWindowData[j], aContainerSize ); + sal_uInt32 nIndex = bReverse ? nCount-j-1 : j; + implts_calcWindowPosSizeOnSingleRowColumn( i, nOffset, aRowColumnsWindowData[nIndex], aContainerSize ); nOffset += aRowColumnsWindowData[j].nStaticSize; } } + implts_setDockingAreaWindowSizes( aDockingArea ); + aWriteLock.lock(); m_bLayoutDirty = false; m_bLayoutInProgress = false; @@ -581,12 +584,13 @@ bool ToolbarLayoutManager::showToolbar( const ::rtl::OUString& rResourceURL ) Window* pWindow = getWindowFromXUIElement( aUIElement.m_xUIElement ); if ( pWindow ) { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); if ( !aUIElement.m_bFloating ) { WriteGuard aWriteLock( m_aLock ); m_bLayoutDirty = true; } + else + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); aUIElement.m_bVisible = true; implts_writeWindowStateData( aUIElement ); @@ -637,7 +641,10 @@ void ToolbarLayoutManager::refreshToolbarsVisibility() if ( pWindow ) { if ( pIter->m_bVisible && !pIter->m_bMasterHide ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + { + if ( pIter->m_bFloating ) + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + } else pWindow->Show( FALSE ); @@ -693,7 +700,7 @@ void ToolbarLayoutManager::setVisible( bool bVisible ) pIter->m_bMasterHide = !bVisible; Window* pWindow = getWindowFromXUIElement( pIter->m_xUIElement ); - if ( pWindow ) + if ( pWindow && pIter->m_bFloating ) pWindow->Show(bVisible & bToolbarVisible, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } @@ -1485,19 +1492,14 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno } } - xWindow->setPosSize( aPixelPos.X(), - aPixelPos.Y(), - 0, 0, - awt::PosSize::POS ); + xWindow->setPosSize( aPixelPos.X(), aPixelPos.Y(), 0, 0, awt::PosSize::POS ); if( bSetSize ) xWindow->setOutputSize( AWTSize( aSize) ); if ( pWindow ) { vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( bShowElement ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - else + if ( !bShowElement ) pWindow->Hide(); } } @@ -2712,14 +2714,8 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( aReadLock.unlock(); sal_Int32 nCurrPos( 0 ); - sal_Int32 nStartOffset( 0 ); vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( nDockingArea == ui::DockingArea_DOCKINGAREA_RIGHT ) - nStartOffset = pDockAreaWindow->GetSizePixel().Width() - rRowColumnWindowData.nStaticSize; - else if ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) - nStartOffset = pDockAreaWindow->GetSizePixel().Height() - rRowColumnWindowData.nStaticSize; - for ( sal_uInt32 i = 0; i < nCount; i++ ) { uno::Reference< awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i]; @@ -2730,36 +2726,22 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( pWindow->SetParent( pDockAreaWindow ); awt::Rectangle aWinRect = rRowColumnWindowData.aRowColumnWindowSizes[i]; - if ( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) + if ( isHorizontalDockingArea( nDockingArea )) { if ( aWinRect.X < nCurrPos ) aWinRect.X = nCurrPos; pWindow->SetPosSizePixel( ::Point( aWinRect.X, nOffset ), ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; } - else if ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) - { - if ( aWinRect.X < nCurrPos ) - aWinRect.X = nCurrPos; - pWindow->SetPosSizePixel( ::Point( aWinRect.X, nStartOffset - nOffset ), - ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); - nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; - } - else if ( nDockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) + else { if ( aWinRect.Y < nCurrPos ) aWinRect.Y = nCurrPos; pWindow->SetPosSizePixel( ::Point( nOffset, aWinRect.Y ), ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); - nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; - } - else if ( nDockingArea == ui::DockingArea_DOCKINGAREA_RIGHT ) - { - if ( aWinRect.Y < nCurrPos ) - aWinRect.Y = nCurrPos; - pWindow->SetPosSizePixel( ::Point( nStartOffset - nOffset, aWinRect.Y ), - ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); + pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; } } From 77d58672c644bc403721dccf3baa7fcae8720ed8 Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Thu, 28 Oct 2010 11:15:18 +0200 Subject: [PATCH 209/279] #dv22#i115288# Allow user to ignore updates for an extension --- desktop/source/deployment/gui/dp_gui.hrc | 7 +- .../source/deployment/gui/dp_gui_dialog2.cxx | 0 .../deployment/gui/dp_gui_extlistbox.cxx | 0 .../deployment/gui/dp_gui_extlistbox.hxx | 0 .../deployment/gui/dp_gui_updatedata.hxx | 5 + .../deployment/gui/dp_gui_updatedialog.cxx | 826 +++++++++++------- .../deployment/gui/dp_gui_updatedialog.hxx | 55 +- .../deployment/gui/dp_gui_updatedialog.src | 16 +- .../openoffice/Office/UI/GenericCommands.xcu | 110 +-- .../openoffice/Office/ExtensionManager.xcs | 70 +- .../schema/org/openoffice/Office/Jobs.xcs | 0 11 files changed, 670 insertions(+), 419 deletions(-) mode change 100644 => 100755 desktop/source/deployment/gui/dp_gui.hrc mode change 100755 => 100644 desktop/source/deployment/gui/dp_gui_dialog2.cxx mode change 100755 => 100644 desktop/source/deployment/gui/dp_gui_extlistbox.cxx mode change 100755 => 100644 desktop/source/deployment/gui/dp_gui_extlistbox.hxx mode change 100644 => 100755 desktop/source/deployment/gui/dp_gui_updatedata.hxx mode change 100644 => 100755 desktop/source/deployment/gui/dp_gui_updatedialog.cxx mode change 100644 => 100755 desktop/source/deployment/gui/dp_gui_updatedialog.hxx mode change 100644 => 100755 desktop/source/deployment/gui/dp_gui_updatedialog.src mode change 100644 => 100755 officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs mode change 100644 => 100755 officecfg/registry/schema/org/openoffice/Office/Jobs.xcs diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc old mode 100644 new mode 100755 index af9a9e7686ec..dcde55654a30 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -106,7 +106,7 @@ #define RID_DLG_UPDATE_LINE 8 #define RID_DLG_UPDATE_HELP 9 #define RID_DLG_UPDATE_OK 10 -#define RID_DLG_UPDATE_CANCEL 11 +#define RID_DLG_UPDATE_CLOSE 11 #define RID_DLG_UPDATE_NORMALALERT 12 #define RID_DLG_UPDATE_HIGHCONTRASTALERT 13 #define RID_DLG_UPDATE_ERROR 14 @@ -127,6 +127,11 @@ #define RID_DLG_UPDATE_RELEASENOTES_LINK 29 #define RID_DLG_UPDATE_NOUPDATE 30 #define RID_DLG_UPDATE_VERSION 31 +#define RID_DLG_UPDATE_IGNORE 32 +#define RID_DLG_UPDATE_ENABLE 33 +#define RID_DLG_UPDATE_IGNORE_ALL 34 +#define RID_DLG_UPDATE_IGNORED_UPDATE 35 + #define RID_DLG_UPDATEINSTALL (RID_DEPLOYMENT_GUI_START + 20) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx old mode 100755 new mode 100644 diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx old mode 100755 new mode 100644 diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx old mode 100755 new mode 100644 diff --git a/desktop/source/deployment/gui/dp_gui_updatedata.hxx b/desktop/source/deployment/gui/dp_gui_updatedata.hxx old mode 100644 new mode 100755 index 76eb8af31e8e..1112de0b34e8 --- a/desktop/source/deployment/gui/dp_gui_updatedata.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedata.hxx @@ -28,6 +28,7 @@ #define INCLUDED_DP_GUI_UPDATEDATA_HXX #include "sal/config.h" +#include "tools/solar.h" #include "rtl/ustring.hxx" #include "com/sun/star/uno/Reference.hxx" @@ -80,6 +81,10 @@ struct UpdateData //are to be ignored. ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > aUpdateSource; + + // ID to find this entry in the update listbox + USHORT m_nID; + bool m_bIgnored; }; } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx old mode 100644 new mode 100755 index b27cd8da81fe..45a514a3511c --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -50,7 +50,9 @@ #include "com/sun/star/beans/NamedValue.hpp" #include "com/sun/star/beans/Optional.hpp" #include "com/sun/star/beans/PropertyValue.hpp" +#include "com/sun/star/beans/XPropertySet.hpp" #include "com/sun/star/container/XNameAccess.hpp" +#include "com/sun/star/container/XNameContainer.hpp" #include "com/sun/star/deployment/DeploymentException.hpp" #include "com/sun/star/deployment/UpdateInformationProvider.hpp" #include "com/sun/star/deployment/XPackage.hpp" @@ -62,6 +64,7 @@ #include "com/sun/star/frame/XDispatchProvider.hpp" #include "com/sun/star/lang/IllegalArgumentException.hpp" #include "com/sun/star/lang/XMultiComponentFactory.hpp" +#include "com/sun/star/lang/XSingleServiceFactory.hpp" #include "com/sun/star/system/SystemShellExecuteFlags.hpp" #include "com/sun/star/system/XSystemShellExecute.hpp" #include "com/sun/star/task/XAbortChannel.hpp" @@ -76,6 +79,7 @@ #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/util/URL.hpp" +#include "com/sun/star/util/XChangesBatch.hpp" #include "com/sun/star/util/XURLTransformer.hpp" #include "com/sun/star/xml/dom/XElement.hpp" #include "com/sun/star/xml/dom/XNode.hpp" @@ -129,16 +133,23 @@ namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } } -namespace css = ::com::sun::star; - +using namespace ::com::sun::star; using dp_gui::UpdateDialog; namespace { static sal_Unicode const LF = 0x000A; static sal_Unicode const CR = 0x000D; +static const USHORT CMD_ENABLE_UPDATE = 1; +static const USHORT CMD_IGNORE_UPDATE = 2; +static const USHORT CMD_IGNORE_ALL_UPDATES = 3; -enum Kind { ENABLED_UPDATE, DISABLED_UPDATE, GENERAL_ERROR, SPECIFIC_ERROR }; +#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) + +#define IGNORED_UPDATES OUSTR("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/IgnoredUpdates") +#define PROPERTY_VERSION OUSTR("Version") + +enum Kind { ENABLED_UPDATE, DISABLED_UPDATE, SPECIFIC_ERROR }; rtl::OUString confineToParagraph(rtl::OUString const & text) { // Confine arbitrary text to a single paragraph in a dp_gui::AutoScrollEdit. @@ -151,86 +162,64 @@ rtl::OUString confineToParagraph(rtl::OUString const & text) { struct UpdateDialog::DisabledUpdate { rtl::OUString name; - css::uno::Sequence< rtl::OUString > unsatisfiedDependencies; + uno::Sequence< rtl::OUString > unsatisfiedDependencies; // We also want to show release notes and publisher for disabled updates ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XNode > aUpdateInfo; + USHORT m_nID; }; struct UpdateDialog::SpecificError { rtl::OUString name; rtl::OUString message; + USHORT m_nID; }; -union UpdateDialog::IndexUnion{ - std::vector< dp_gui::UpdateData >::size_type enabledUpdate; - std::vector< UpdateDialog::DisabledUpdate >::size_type disabledUpdate; - std::vector< rtl::OUString >::size_type generalError; - std::vector< UpdateDialog::SpecificError >::size_type specificError; +//------------------------------------------------------------------------------ +struct UpdateDialog::IgnoredUpdate { + rtl::OUString sExtensionID; + rtl::OUString sVersion; + bool bRemoved; + + IgnoredUpdate( const rtl::OUString &rExtensionID, const rtl::OUString &rVersion ); }; -struct UpdateDialog::Index { - static std::auto_ptr< UpdateDialog::Index const > newEnabledUpdate( - std::vector< dp_gui::UpdateData >::size_type n); +//------------------------------------------------------------------------------ +UpdateDialog::IgnoredUpdate::IgnoredUpdate( const rtl::OUString &rExtensionID, const rtl::OUString &rVersion ): + sExtensionID( rExtensionID ), + sVersion( rVersion ), + bRemoved( false ) +{} - static std::auto_ptr< UpdateDialog::Index const > newDisabledUpdate( - std::vector< UpdateDialog::DisabledUpdate >::size_type n); +//------------------------------------------------------------------------------ +struct UpdateDialog::Index +{ + Kind m_eKind; + bool m_bIgnored; + USHORT m_nID; + USHORT m_nIndex; + rtl::OUString m_aName; - static std::auto_ptr< UpdateDialog::Index const > newGeneralError( - std::vector< rtl::OUString >::size_type n); - - static std::auto_ptr< UpdateDialog::Index const > newSpecificError( - std::vector< UpdateDialog::SpecificError >::size_type n); - - Kind kind; - IndexUnion index; - -private: - explicit Index(Kind theKind); + Index( Kind theKind, USHORT nID, USHORT nIndex, const rtl::OUString &rName ); }; -std::auto_ptr< UpdateDialog::Index const > -UpdateDialog::Index::newEnabledUpdate( - std::vector< dp_gui::UpdateData >::size_type n) -{ - UpdateDialog::Index * p = new UpdateDialog::Index(ENABLED_UPDATE); - p->index.enabledUpdate = n; - return std::auto_ptr< UpdateDialog::Index const >(p); -} - -std::auto_ptr< UpdateDialog::Index const > -UpdateDialog::Index::newDisabledUpdate( - std::vector< UpdateDialog::DisabledUpdate >::size_type n) -{ - UpdateDialog::Index * p = new UpdateDialog::Index(DISABLED_UPDATE); - p->index.disabledUpdate = n; - return std::auto_ptr< UpdateDialog::Index const >(p); -} - -std::auto_ptr< UpdateDialog::Index const > UpdateDialog::Index::newGeneralError( - std::vector< rtl::OUString >::size_type n) -{ - UpdateDialog::Index * p = new UpdateDialog::Index(GENERAL_ERROR); - p->index.generalError = n; - return std::auto_ptr< UpdateDialog::Index const >(p); -} - -std::auto_ptr< UpdateDialog::Index const > -UpdateDialog::Index::newSpecificError( - std::vector< UpdateDialog::SpecificError >::size_type n) -{ - UpdateDialog::Index * p = new UpdateDialog::Index(SPECIFIC_ERROR); - p->index.specificError = n; - return std::auto_ptr< UpdateDialog::Index const >(p); -} - -UpdateDialog::Index::Index(Kind theKind): kind(theKind) {} +//------------------------------------------------------------------------------ +UpdateDialog::Index::Index( Kind theKind, USHORT nID, USHORT nIndex, const rtl::OUString &rName ): + m_eKind( theKind ), + m_bIgnored( false ), + m_nID( nID ), + m_nIndex( nIndex ), + m_aName( rName ) +{} +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ class UpdateDialog::Thread: public dp_gui::Thread { public: Thread( - css::uno::Reference< css::uno::XComponentContext > const & context, + uno::Reference< uno::XComponentContext > const & context, UpdateDialog & dialog, - const std::vector< css::uno::Reference< css::deployment::XPackage > > & vExtensionList); + const std::vector< uno::Reference< deployment::XPackage > > & vExtensionList); void stop(); @@ -240,16 +229,16 @@ private: struct Entry { explicit Entry( - css::uno::Reference< css::deployment::XPackage > const & thePackage, + uno::Reference< deployment::XPackage > const & thePackage, rtl::OUString const & theVersion); - css::uno::Reference< css::deployment::XPackage > package; + uno::Reference< deployment::XPackage > package; rtl::OUString version; //Indicates that the extension provides its own update URLs. //If this is true, then we must not use the default update //URL to find the update information. bool bProvidesOwnUpdate; - css::uno::Reference< css::xml::dom::XNode > info; + uno::Reference< xml::dom::XNode > info; UpdateDialog::DisabledUpdate disableUpdate; dp_gui::UpdateData updateData; }; @@ -261,20 +250,20 @@ private: virtual void execute(); #if 0 - void handleGeneralError(css::uno::Any const & exception) const; + void handleGeneralError(uno::Any const & exception) const; #endif void handleSpecificError( - css::uno::Reference< css::deployment::XPackage > const & package, - css::uno::Any const & exception) const; + uno::Reference< deployment::XPackage > const & package, + uno::Any const & exception) const; - css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > > + uno::Sequence< uno::Reference< xml::dom::XElement > > getUpdateInformation( - css::uno::Reference< css::deployment::XPackage > const & package, - css::uno::Sequence< rtl::OUString > const & urls, + uno::Reference< deployment::XPackage > const & package, + uno::Sequence< rtl::OUString > const & urls, rtl::OUString const & identifier) const; void getOwnUpdateInformation( - css::uno::Reference< css::deployment::XPackage > const & package, + uno::Reference< deployment::XPackage > const & package, Map * map); ::rtl::OUString getUpdateDisplayString( @@ -286,40 +275,40 @@ private: dp_gui::UpdateData & out_data) const; bool update( - UpdateDialog::DisabledUpdate const & du, - dp_gui::UpdateData const & data) const; + UpdateDialog::DisabledUpdate & du, + dp_gui::UpdateData & data) const; - css::uno::Reference< css::uno::XComponentContext > m_context; + uno::Reference< uno::XComponentContext > m_context; UpdateDialog & m_dialog; - std::vector< css::uno::Reference< css::deployment::XPackage > > m_vExtensionList; - css::uno::Reference< css::deployment::XUpdateInformationProvider > m_updateInformation; - css::uno::Reference< css::task::XInteractionHandler > m_xInteractionHdl; + std::vector< uno::Reference< deployment::XPackage > > m_vExtensionList; + uno::Reference< deployment::XUpdateInformationProvider > m_updateInformation; + uno::Reference< task::XInteractionHandler > m_xInteractionHdl; // guarded by Application::GetSolarMutex(): - css::uno::Reference< css::task::XAbortChannel > m_abort; + uno::Reference< task::XAbortChannel > m_abort; bool m_stop; }; UpdateDialog::Thread::Thread( - css::uno::Reference< css::uno::XComponentContext > const & context, + uno::Reference< uno::XComponentContext > const & context, UpdateDialog & dialog, - const std::vector< css::uno::Reference< css::deployment::XPackage > > &vExtensionList): + const std::vector< uno::Reference< deployment::XPackage > > &vExtensionList): m_context(context), m_dialog(dialog), m_vExtensionList(vExtensionList), m_updateInformation( - css::deployment::UpdateInformationProvider::create(context)), + deployment::UpdateInformationProvider::create(context)), m_stop(false) { if( m_context.is() ) { - css::uno::Reference< css::lang::XMultiComponentFactory > xServiceManager( m_context->getServiceManager() ); + uno::Reference< lang::XMultiComponentFactory > xServiceManager( m_context->getServiceManager() ); if( xServiceManager.is() ) { - m_xInteractionHdl = css::uno::Reference< css::task::XInteractionHandler > ( + m_xInteractionHdl = uno::Reference< task::XInteractionHandler > ( xServiceManager->createInstanceWithContext( OUSTR( "com.sun.star.task.InteractionHandler" ), m_context), - css::uno::UNO_QUERY ); + uno::UNO_QUERY ); if ( m_xInteractionHdl.is() ) m_updateInformation->setInteractionHandler( m_xInteractionHdl ); } @@ -327,7 +316,7 @@ UpdateDialog::Thread::Thread( } void UpdateDialog::Thread::stop() { - css::uno::Reference< css::task::XAbortChannel > abort; + uno::Reference< task::XAbortChannel > abort; { vos::OGuard g(Application::GetSolarMutex()); abort = m_abort; @@ -340,7 +329,7 @@ void UpdateDialog::Thread::stop() { } UpdateDialog::Thread::Entry::Entry( - css::uno::Reference< css::deployment::XPackage > const & thePackage, + uno::Reference< deployment::XPackage > const & thePackage, rtl::OUString const & theVersion): package(thePackage), @@ -353,7 +342,7 @@ UpdateDialog::Thread::Entry::Entry( UpdateDialog::Thread::~Thread() { if ( m_xInteractionHdl.is() ) - m_updateInformation->setInteractionHandler( css::uno::Reference< css::task::XInteractionHandler > () ); + m_updateInformation->setInteractionHandler( uno::Reference< task::XInteractionHandler > () ); } void UpdateDialog::Thread::execute() @@ -364,16 +353,16 @@ void UpdateDialog::Thread::execute() return; } } - css::uno::Reference extMgr = - css::deployment::ExtensionManager::get(m_context); + uno::Reference extMgr = + deployment::ExtensionManager::get(m_context); - std::vector, css::uno::Any > > errors; + std::vector, uno::Any > > errors; dp_misc::UpdateInfoMap updateInfoMap = dp_misc::getOnlineUpdateInfos( m_context, extMgr, m_updateInformation, &m_vExtensionList, errors); - typedef std::vector, - css::uno::Any> >::const_iterator ITERROR; + typedef std::vector, + uno::Any> >::const_iterator ITERROR; for (ITERROR ite = errors.begin(); ite != errors.end(); ite ++) handleSpecificError(ite->first, ite->second); @@ -392,12 +381,12 @@ void UpdateDialog::Thread::execute() rtl::OUString sVersionUser; rtl::OUString sVersionShared; rtl::OUString sVersionBundled; - css::uno::Sequence< css::uno::Reference< css::deployment::XPackage> > extensions; + uno::Sequence< uno::Reference< deployment::XPackage> > extensions; try { extensions = extMgr->getExtensionsWithSameIdentifier( dp_misc::getIdentifier(info.extension), info.extension->getName(), - css::uno::Reference()); - } catch (css::lang::IllegalArgumentException& ) { + uno::Reference()); + } catch (lang::IllegalArgumentException& ) { OSL_ASSERT(0); } OSL_ASSERT(extensions.getLength() == 3); @@ -415,7 +404,7 @@ void UpdateDialog::Thread::execute() dp_misc::UPDATE_SOURCE sourceShared = dp_misc::isUpdateSharedExtension( bSharedReadOnly, sVersionShared, sVersionBundled, sOnlineVersion); - css::uno::Reference updateSource; + uno::Reference updateSource; if (sourceUser != dp_misc::UPDATE_SOURCE_NONE) { if (sourceUser == dp_misc::UPDATE_SOURCE_SHARED) @@ -452,11 +441,11 @@ void UpdateDialog::Thread::execute() } } #if 0 -void UpdateDialog::Thread::handleGeneralError(css::uno::Any const & exception) +void UpdateDialog::Thread::handleGeneralError(uno::Any const & exception) const { rtl::OUString message; - css::uno::Exception e; + uno::Exception e; if (exception >>= e) { message = e.Message; } @@ -468,13 +457,13 @@ void UpdateDialog::Thread::handleGeneralError(css::uno::Any const & exception) #endif //Parameter package can be null void UpdateDialog::Thread::handleSpecificError( - css::uno::Reference< css::deployment::XPackage > const & package, - css::uno::Any const & exception) const + uno::Reference< deployment::XPackage > const & package, + uno::Any const & exception) const { UpdateDialog::SpecificError data; if (package.is()) data.name = package->getDisplayName(); - css::uno::Exception e; + uno::Exception e; if (exception >>= e) { data.message = e.Message; } @@ -516,7 +505,7 @@ void UpdateDialog::Thread::handleSpecificError( /** out_data will only be filled if all dependencies are ok. */ void UpdateDialog::Thread::prepareUpdateData( - css::uno::Reference< css::xml::dom::XNode > const & updateInfo, + uno::Reference< xml::dom::XNode > const & updateInfo, UpdateDialog::DisabledUpdate & out_du, dp_gui::UpdateData & out_data) const { @@ -524,7 +513,7 @@ void UpdateDialog::Thread::prepareUpdateData( return; dp_misc::DescriptionInfoset infoset(m_context, updateInfo); OSL_ASSERT(infoset.getVersion().getLength() != 0); - css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > > ds( + uno::Sequence< uno::Reference< xml::dom::XElement > > ds( dp_misc::Dependencies::check(infoset)); out_du.aUpdateInfo = updateInfo; @@ -547,8 +536,8 @@ void UpdateDialog::Thread::prepareUpdateData( } bool UpdateDialog::Thread::update( - UpdateDialog::DisabledUpdate const & du, - dp_gui::UpdateData const & data) const + UpdateDialog::DisabledUpdate & du, + dp_gui::UpdateData & data) const { bool ret = false; if (du.unsatisfiedDependencies.getLength() == 0) @@ -570,9 +559,9 @@ bool UpdateDialog::Thread::update( // UpdateDialog ---------------------------------------------------------- UpdateDialog::UpdateDialog( - css::uno::Reference< css::uno::XComponentContext > const & context, + uno::Reference< uno::XComponentContext > const & context, Window * parent, - const std::vector > &vExtensionList, + const std::vector > &vExtensionList, std::vector< dp_gui::UpdateData > * updateData): ModalDialog(parent,DpGuiResId(RID_DLG_UPDATE)), m_context(context), @@ -592,7 +581,7 @@ UpdateDialog::UpdateDialog( m_line(this, DpGuiResId(RID_DLG_UPDATE_LINE)), m_help(this, DpGuiResId(RID_DLG_UPDATE_HELP)), m_ok(this, DpGuiResId(RID_DLG_UPDATE_OK)), - m_cancel(this, DpGuiResId(RID_DLG_UPDATE_CANCEL)), + m_close(this, DpGuiResId(RID_DLG_UPDATE_CLOSE)), m_error(String(DpGuiResId(RID_DLG_UPDATE_ERROR))), m_none(String(DpGuiResId(RID_DLG_UPDATE_NONE))), m_noInstallable(String(DpGuiResId(RID_DLG_UPDATE_NOINSTALLABLE))), @@ -604,71 +593,84 @@ UpdateDialog::UpdateDialog( m_noDependencyCurVer(String(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY_CUR_VER))), m_browserbased(String(DpGuiResId(RID_DLG_UPDATE_BROWSERBASED))), m_version(String(DpGuiResId(RID_DLG_UPDATE_VERSION))), + m_ignoredUpdate(String(DpGuiResId(RID_DLG_UPDATE_IGNORED_UPDATE))), m_updateData(*updateData), m_thread( new UpdateDialog::Thread( context, *this, vExtensionList)), m_nFirstLineDelta(0), - m_nOneLineMissing(0) + m_nOneLineMissing(0), + m_nLastID(1), + m_bModified( false ) // TODO: check! // , // m_extensionManagerDialog(extensionManagerDialog) { OSL_ASSERT(updateData != NULL); - m_xExtensionManager = css::deployment::ExtensionManager::get( context ); + m_xExtensionManager = deployment::ExtensionManager::get( context ); - css::uno::Reference< css::awt::XToolkit > toolkit; + uno::Reference< awt::XToolkit > toolkit; try { - toolkit = css::uno::Reference< css::awt::XToolkit >( - (css::uno::Reference< css::lang::XMultiComponentFactory >( + toolkit = uno::Reference< awt::XToolkit >( + (uno::Reference< lang::XMultiComponentFactory >( m_context->getServiceManager(), - css::uno::UNO_QUERY_THROW)-> + uno::UNO_QUERY_THROW)-> createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")), m_context)), - css::uno::UNO_QUERY_THROW); - } catch (css::uno::RuntimeException &) { + uno::UNO_QUERY_THROW); + } catch (uno::RuntimeException &) { throw; - } catch (css::uno::Exception & e) { - throw css::uno::RuntimeException(e.Message, e.Context); + } catch (uno::Exception & e) { + throw uno::RuntimeException(e.Message, e.Context); } Control c(this, DpGuiResId(RID_DLG_UPDATE_THROBBER)); Point pos(c.GetPosPixel()); Size size(c.GetSizePixel()); try { - m_throbber = css::uno::Reference< css::awt::XThrobber >( + m_throbber = uno::Reference< awt::XThrobber >( toolkit->createWindow( - css::awt::WindowDescriptor( - css::awt::WindowClass_SIMPLE, + awt::WindowDescriptor( + awt::WindowClass_SIMPLE, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Throbber")), GetComponentInterface(), 0, - css::awt::Rectangle( + awt::Rectangle( pos.X(), pos.Y(), size.Width(), size.Height()), - css::awt::WindowAttribute::SHOW)), - css::uno::UNO_QUERY_THROW); - } catch (css::lang::IllegalArgumentException & e) { - throw css::uno::RuntimeException(e.Message, e.Context); + awt::WindowAttribute::SHOW)), + uno::UNO_QUERY_THROW); + } catch (lang::IllegalArgumentException & e) { + throw uno::RuntimeException(e.Message, e.Context); } m_updates.SetSelectHdl(LINK(this, UpdateDialog, selectionHandler)); m_all.SetToggleHdl(LINK(this, UpdateDialog, allHandler)); m_ok.SetClickHdl(LINK(this, UpdateDialog, okHandler)); - m_cancel.SetClickHdl(LINK(this, UpdateDialog, cancelHandler)); + m_close.SetClickHdl(LINK(this, UpdateDialog, closeHandler)); if ( ! dp_misc::office_is_running()) m_help.Disable(); FreeResource(); initDescription(); + getIgnoredUpdates(); } -UpdateDialog::~UpdateDialog() { - for (USHORT i = 0; i < m_updates.getItemCount(); ++i) { - delete static_cast< UpdateDialog::Index const * >( - m_updates.GetEntryData(i)); +//------------------------------------------------------------------------------ +UpdateDialog::~UpdateDialog() +{ + storeIgnoredUpdates(); + + for ( std::vector< UpdateDialog::Index* >::iterator i( m_ListboxEntries.begin() ); i != m_ListboxEntries.end(); ++i ) + { + delete (*i); + } + for ( std::vector< UpdateDialog::IgnoredUpdate* >::iterator i( m_ignoredUpdates.begin() ); i != m_ignoredUpdates.end(); ++i ) + { + delete (*i); } } +//------------------------------------------------------------------------------ BOOL UpdateDialog::Close() { m_thread->stop(); return ModalDialog::Close(); @@ -680,29 +682,45 @@ short UpdateDialog::Execute() { return ModalDialog::Execute(); } -UpdateDialog::CheckListBox::CheckListBox( - UpdateDialog & dialog, ResId const & resource, - Image const & normalStaticImage, Image const & highContrastStaticImage): - SvxCheckListBox( - &dialog, resource, normalStaticImage, highContrastStaticImage), +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +UpdateDialog::CheckListBox::CheckListBox( UpdateDialog & dialog, ResId const & resource, + Image const & normalStaticImage, + Image const & highContrastStaticImage ): + SvxCheckListBox( &dialog, resource, normalStaticImage, highContrastStaticImage ), + m_ignoreUpdate( String( DpGuiResId( RID_DLG_UPDATE_IGNORE ) ) ), + m_ignoreAllUpdates( String( DpGuiResId( RID_DLG_UPDATE_IGNORE_ALL ) ) ), + m_enableUpdate( String( DpGuiResId( RID_DLG_UPDATE_ENABLE ) ) ), m_dialog(dialog) {} +//------------------------------------------------------------------------------ UpdateDialog::CheckListBox::~CheckListBox() {} +//------------------------------------------------------------------------------ USHORT UpdateDialog::CheckListBox::getItemCount() const { ULONG i = GetEntryCount(); OSL_ASSERT(i <= std::numeric_limits< USHORT >::max()); return sal::static_int_cast< USHORT >(i); } -void UpdateDialog::CheckListBox::MouseButtonDown(MouseEvent const & event) { +//------------------------------------------------------------------------------ +void UpdateDialog::CheckListBox::MouseButtonDown( MouseEvent const & event ) +{ // When clicking on a selected entry in an SvxCheckListBox, the entry's // checkbox is toggled on mouse button down: - SvxCheckListBox::MouseButtonDown(event); + SvxCheckListBox::MouseButtonDown( event ); + + if ( event.IsRight() ) + { + handlePopupMenu( event.GetPosPixel() ); + } + m_dialog.enableOk(); } +//------------------------------------------------------------------------------ void UpdateDialog::CheckListBox::MouseButtonUp(MouseEvent const & event) { // When clicking on an entry's checkbox in an SvxCheckListBox, the entry's // checkbox is toggled on mouse button up: @@ -715,25 +733,82 @@ void UpdateDialog::CheckListBox::KeyInput(KeyEvent const & event) { m_dialog.enableOk(); } -void UpdateDialog::insertItem( - rtl::OUString const & name, USHORT position, - std::auto_ptr< UpdateDialog::Index const > index, SvLBoxButtonKind kind) +//------------------------------------------------------------------------------ +void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos ) { - m_updates.InsertEntry( - name, position, - const_cast< void * >(static_cast< void const * >(index.release())), - kind); - //TODO #i72487#: UpdateDialog::Index potentially leaks as the exception - // behavior of SvxCheckListBox::InsertEntry is unspecified + SvListEntry *pData = GetEntry( rPos ); + + if ( pData ) + { + USHORT nEntryPos = GetSelectEntryPos(); + UpdateDialog::Index * p = static_cast< UpdateDialog::Index * >( GetEntryData( nEntryPos ) ); + + if ( ( p->m_eKind == ENABLED_UPDATE ) || ( p->m_eKind == DISABLED_UPDATE ) ) + { + PopupMenu aPopup; + + if ( p->m_bIgnored ) + aPopup.InsertItem( CMD_ENABLE_UPDATE, m_enableUpdate ); + else + { + aPopup.InsertItem( CMD_IGNORE_UPDATE, m_ignoreUpdate ); + aPopup.InsertItem( CMD_IGNORE_ALL_UPDATES, m_ignoreAllUpdates ); + } + + USHORT aCmd = aPopup.Execute( this, rPos ); + if ( ( aCmd == CMD_IGNORE_UPDATE ) || ( aCmd == CMD_IGNORE_ALL_UPDATES ) ) + { + p->m_bIgnored = true; + if ( p->m_eKind == ENABLED_UPDATE ) + { + RemoveEntry( nEntryPos ); + m_dialog.addAdditional( p, SvLBoxButtonKind_disabledCheckbox ); + } + if ( aCmd == CMD_IGNORE_UPDATE ) + m_dialog.setIgnoredUpdate( p, true, false ); + else + m_dialog.setIgnoredUpdate( p, true, true ); + // TODO: reselect entry to display new description! + } + else if ( aCmd == CMD_ENABLE_UPDATE ) + { + p->m_bIgnored = false; + if ( p->m_eKind == ENABLED_UPDATE ) + { + RemoveEntry( nEntryPos ); + m_dialog.insertItem( p, SvLBoxButtonKind_enabledCheckbox ); + } + m_dialog.setIgnoredUpdate( p, false, false ); + } + } + } } -void UpdateDialog::addAdditional( - rtl::OUString const & name, USHORT position, - std::auto_ptr< UpdateDialog::Index const > index, SvLBoxButtonKind kind) +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +USHORT UpdateDialog::insertItem( UpdateDialog::Index *pEntry, SvLBoxButtonKind kind ) +{ + m_updates.InsertEntry( pEntry->m_aName, LISTBOX_APPEND, static_cast< void * >( pEntry ), kind ); + + for ( USHORT i = m_updates.getItemCount(); i != 0 ; ) + { + i -= 1; + UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_updates.GetEntryData( i ) ); + if ( p == pEntry ) + return i; + } + OSL_ASSERT(0); + return 0; +} + +//------------------------------------------------------------------------------ +void UpdateDialog::addAdditional( UpdateDialog::Index * index, SvLBoxButtonKind kind ) { m_all.Enable(); - if (m_all.IsChecked()) { - insertItem(name, position, index, kind); + if (m_all.IsChecked()) + { + insertItem( index, kind ); m_update.Enable(); m_updates.Enable(); m_description.Enable(); @@ -741,71 +816,79 @@ void UpdateDialog::addAdditional( } } -void UpdateDialog::addEnabledUpdate( - rtl::OUString const & name, dp_gui::UpdateData const & data) +//------------------------------------------------------------------------------ +void UpdateDialog::addEnabledUpdate( rtl::OUString const & name, + dp_gui::UpdateData & data ) { - std::vector< dp_gui::UpdateData >::size_type n = m_enabledUpdates.size(); - m_enabledUpdates.push_back(data); - insertItem( - name, sal::static_int_cast< USHORT >(n), - UpdateDialog::Index::newEnabledUpdate(n), - SvLBoxButtonKind_enabledCheckbox); - // position overflow is rather harmless - m_updates.CheckEntryPos(sal::static_int_cast< USHORT >(n)); - //TODO #i72487#: fragile computation; insertItem should instead return - // pos + USHORT nIndex = sal::static_int_cast< USHORT >( m_enabledUpdates.size() ); + UpdateDialog::Index *pEntry = new UpdateDialog::Index( ENABLED_UPDATE, m_nLastID, nIndex, name ); + + data.m_nID = m_nLastID; + m_nLastID += 1; + + m_enabledUpdates.push_back( data ); + m_ListboxEntries.push_back( pEntry ); + + if ( ! isIgnoredUpdate( pEntry ) ) + { + USHORT nPos = insertItem( pEntry, SvLBoxButtonKind_enabledCheckbox ); + m_updates.CheckEntryPos( nPos ); + } + else + addAdditional( pEntry, SvLBoxButtonKind_disabledCheckbox ); + m_update.Enable(); m_updates.Enable(); m_description.Enable(); m_descriptions.Enable(); } -void UpdateDialog::addDisabledUpdate(UpdateDialog::DisabledUpdate const & data) +//------------------------------------------------------------------------------ +void UpdateDialog::addDisabledUpdate( UpdateDialog::DisabledUpdate & data ) { - std::vector< UpdateDialog::DisabledUpdate >::size_type n = - m_disabledUpdates.size(); - m_disabledUpdates.push_back(data); - addAdditional( - data.name, sal::static_int_cast< USHORT >(m_enabledUpdates.size() + n), - UpdateDialog::Index::newDisabledUpdate(n), - SvLBoxButtonKind_disabledCheckbox); - // position overflow is rather harmless + USHORT nIndex = sal::static_int_cast< USHORT >( m_disabledUpdates.size() ); + UpdateDialog::Index *pEntry = new UpdateDialog::Index( DISABLED_UPDATE, m_nLastID, nIndex, data.name ); + + data.m_nID = m_nLastID; + m_nLastID += 1; + + m_disabledUpdates.push_back( data ); + m_ListboxEntries.push_back( pEntry ); + + isIgnoredUpdate( pEntry ); + addAdditional( pEntry, SvLBoxButtonKind_disabledCheckbox ); } -#if 0 -void UpdateDialog::addGeneralError(rtl::OUString const & message) { - std::vector< rtl::OUString >::size_type n = m_generalErrors.size(); - m_generalErrors.push_back(message); - addAdditional( - m_error, - sal::static_int_cast< USHORT >( - m_enabledUpdates.size() + m_disabledUpdates.size() + n), - UpdateDialog::Index::newGeneralError(n), SvLBoxButtonKind_staticImage); - // position overflow is rather harmless -} -#endif -void UpdateDialog::addSpecificError(UpdateDialog::SpecificError const & data) { - std::vector< UpdateDialog::SpecificError >::size_type n = - m_specificErrors.size(); - m_specificErrors.push_back(data); - addAdditional( - data.name, LISTBOX_APPEND, UpdateDialog::Index::newSpecificError(n), - SvLBoxButtonKind_staticImage); + +//------------------------------------------------------------------------------ +void UpdateDialog::addSpecificError( UpdateDialog::SpecificError & data ) +{ + USHORT nIndex = sal::static_int_cast< USHORT >( m_specificErrors.size() ); + UpdateDialog::Index *pEntry = new UpdateDialog::Index( DISABLED_UPDATE, m_nLastID, nIndex, data.name ); + + data.m_nID = m_nLastID; + m_nLastID += 1; + + m_specificErrors.push_back( data ); + m_ListboxEntries.push_back( pEntry ); + + addAdditional( pEntry, SvLBoxButtonKind_staticImage); } void UpdateDialog::checkingDone() { m_checking.Hide(); m_throbber->stop(); - css::uno::Reference< css::awt::XWindow >( - m_throbber, css::uno::UNO_QUERY_THROW)->setVisible(false); + uno::Reference< awt::XWindow >( + m_throbber, uno::UNO_QUERY_THROW)->setVisible(false); if (m_updates.getItemCount() == 0) { clearDescription(); m_description.Enable(); m_descriptions.Enable(); showDescription( - ( m_disabledUpdates.empty() && m_generalErrors.empty() && m_specificErrors.empty() ) + ( m_disabledUpdates.empty() && m_specificErrors.empty() ) ? m_none : m_noInstallable, false ); } + // TODO: show special message, when only ignored updates available enableOk(); } @@ -817,7 +900,7 @@ void UpdateDialog::enableOk() { // ********************************************************************************* void UpdateDialog::createNotifyJob( bool bPrepareOnly, - css::uno::Sequence< css::uno::Sequence< rtl::OUString > > &rItemList ) + uno::Sequence< uno::Sequence< rtl::OUString > > &rItemList ) { if ( !dp_misc::office_is_running() ) return; @@ -825,51 +908,51 @@ void UpdateDialog::createNotifyJob( bool bPrepareOnly, // notify update check job try { - css::uno::Reference< css::lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - css::uno::Reference< css::lang::XMultiServiceFactory > xConfigProvider( + uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); + uno::Reference< lang::XMultiServiceFactory > xConfigProvider( xFactory->createInstance( OUSTR( "com.sun.star.configuration.ConfigurationProvider" )), - css::uno::UNO_QUERY_THROW); + uno::UNO_QUERY_THROW); - css::beans::PropertyValue aProperty; + beans::PropertyValue aProperty; aProperty.Name = OUSTR( "nodepath" ); - aProperty.Value = css::uno::makeAny( OUSTR("org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob") ); + aProperty.Value = uno::makeAny( OUSTR("org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob") ); - css::uno::Sequence< css::uno::Any > aArgumentList( 1 ); - aArgumentList[0] = css::uno::makeAny( aProperty ); + uno::Sequence< uno::Any > aArgumentList( 1 ); + aArgumentList[0] = uno::makeAny( aProperty ); - css::uno::Reference< css::container::XNameAccess > xNameAccess( + uno::Reference< container::XNameAccess > xNameAccess( xConfigProvider->createInstanceWithArguments( OUSTR("com.sun.star.configuration.ConfigurationAccess"), aArgumentList ), - css::uno::UNO_QUERY_THROW ); + uno::UNO_QUERY_THROW ); - css::util::URL aURL; + util::URL aURL; xNameAccess->getByName(OUSTR("URL")) >>= aURL.Complete; - css::uno::Reference < css::util::XURLTransformer > xTransformer( xFactory->createInstance( OUSTR( "com.sun.star.util.URLTransformer" ) ), - css::uno::UNO_QUERY_THROW ); + uno::Reference < util::XURLTransformer > xTransformer( xFactory->createInstance( OUSTR( "com.sun.star.util.URLTransformer" ) ), + uno::UNO_QUERY_THROW ); xTransformer->parseStrict(aURL); - css::uno::Reference < css::frame::XDesktop > xDesktop( xFactory->createInstance( OUSTR( "com.sun.star.frame.Desktop" ) ), - css::uno::UNO_QUERY_THROW ); - css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xDesktop->getCurrentFrame(), - css::uno::UNO_QUERY_THROW ); - css::uno::Reference< css::frame::XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL, rtl::OUString(), 0); + uno::Reference < frame::XDesktop > xDesktop( xFactory->createInstance( OUSTR( "com.sun.star.frame.Desktop" ) ), + uno::UNO_QUERY_THROW ); + uno::Reference< frame::XDispatchProvider > xDispatchProvider( xDesktop->getCurrentFrame(), + uno::UNO_QUERY_THROW ); + uno::Reference< frame::XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL, rtl::OUString(), 0); if( xDispatch.is() ) { - css::uno::Sequence< css::beans::PropertyValue > aPropList(2); + uno::Sequence< beans::PropertyValue > aPropList(2); aProperty.Name = OUSTR( "updateList" ); - aProperty.Value = css::uno::makeAny( rItemList ); + aProperty.Value = uno::makeAny( rItemList ); aPropList[0] = aProperty; aProperty.Name = OUSTR( "prepareOnly" ); - aProperty.Value = css::uno::makeAny( bPrepareOnly ); + aProperty.Value = uno::makeAny( bPrepareOnly ); aPropList[1] = aProperty; xDispatch->dispatch(aURL, aPropList ); } } - catch( const css::uno::Exception& e ) + catch( const uno::Exception& e ) { dp_misc::TRACE( OUSTR("Caught exception: ") + e.Message + OUSTR("\n thread terminated.\n\n")); @@ -882,26 +965,26 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly ) if ( !dp_misc::office_is_running() ) return; - css::uno::Sequence< css::uno::Sequence< rtl::OUString > > aItemList; + uno::Sequence< uno::Sequence< rtl::OUString > > aItemList; sal_Int32 nCount = 0; if ( ! bRecheckOnly ) { for ( sal_Int16 i = 0; i < m_updates.getItemCount(); ++i ) { - css::uno::Sequence< rtl::OUString > aItem(2); + uno::Sequence< rtl::OUString > aItem(2); UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >(m_updates.GetEntryData(i)); - if ( p->kind == ENABLED_UPDATE ) + if ( p->m_eKind == ENABLED_UPDATE ) { - dp_gui::UpdateData aUpdData = m_enabledUpdates[ p->index.enabledUpdate ]; + dp_gui::UpdateData aUpdData = m_enabledUpdates[ p->m_nIndex ]; aItem[0] = dp_misc::getIdentifier( aUpdData.aInstalledPackage ); dp_misc::DescriptionInfoset aInfoset( m_context, aUpdData.aUpdateInfo ); aItem[1] = aInfoset.getVersion(); } - else if ( p->kind == DISABLED_UPDATE ) + else if ( p->m_eKind == DISABLED_UPDATE ) continue; else continue; @@ -911,6 +994,8 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly ) nCount += 1; } } + + storeIgnoredUpdates(); createNotifyJob( bPrepareOnly, aItemList ); } @@ -984,17 +1069,17 @@ void UpdateDialog::clearDescription() m_descriptions.SetPosSizePixel( m_aFirstLinePos, m_aFirstLineSize ); } -bool UpdateDialog::showDescription(css::uno::Reference< css::xml::dom::XNode > const & aUpdateInfo) +bool UpdateDialog::showDescription(uno::Reference< xml::dom::XNode > const & aUpdateInfo) { dp_misc::DescriptionInfoset infoset(m_context, aUpdateInfo); return showDescription(infoset.getLocalizedPublisherNameAndURL(), infoset.getLocalizedReleaseNotesURL()); } -bool UpdateDialog::showDescription(css::uno::Reference< css::deployment::XPackage > const & aExtension) +bool UpdateDialog::showDescription(uno::Reference< deployment::XPackage > const & aExtension) { OSL_ASSERT(aExtension.is()); - css::beans::StringPair pubInfo = aExtension->getPublisherInfo(); + beans::StringPair pubInfo = aExtension->getPublisherInfo(); return showDescription(std::make_pair(pubInfo.First, pubInfo.Second), OUSTR("")); } @@ -1057,7 +1142,7 @@ bool UpdateDialog::showDescription( const String& rDescription, bool bWithPublis return true; } -bool UpdateDialog::isReadOnly( const css::uno::Reference< css::deployment::XPackage > &xPackage ) const +bool UpdateDialog::isReadOnly( const uno::Reference< deployment::XPackage > &xPackage ) const { if ( m_xExtensionManager.is() && xPackage.is() ) { @@ -1067,6 +1152,162 @@ bool UpdateDialog::isReadOnly( const css::uno::Reference< css::deployment::XPack return true; } +//------------------------------------------------------------------------------ +void UpdateDialog::getIgnoredUpdates() +{ + uno::Reference< lang::XMultiServiceFactory > xConfig( m_context->getServiceManager()->createInstanceWithContext( + OUSTR("com.sun.star.configuration.ConfigurationProvider"), m_context ), uno::UNO_QUERY_THROW); + beans::NamedValue aValue( OUSTR("nodepath"), uno::Any( IGNORED_UPDATES ) ); + uno::Sequence< uno::Any > args(1); + args[0] <<= aValue; + + uno::Reference< container::XNameAccess > xNameAccess( xConfig->createInstanceWithArguments( OUSTR("com.sun.star.configuration.ConfigurationAccess"), args), uno::UNO_QUERY_THROW ); + uno::Sequence< rtl::OUString > aElementNames = xNameAccess->getElementNames(); + + for ( sal_Int32 i = 0; i < aElementNames.getLength(); i++ ) + { + ::rtl::OUString aIdentifier = aElementNames[i]; + ::rtl::OUString aVersion; + + uno::Any aValue( uno::Reference< beans::XPropertySet >( xNameAccess->getByName( aIdentifier ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); + aValue >>= aVersion; + IgnoredUpdate *pData = new IgnoredUpdate( aIdentifier, aVersion ); + m_ignoredUpdates.push_back( pData ); + } +} + +//------------------------------------------------------------------------------ +void UpdateDialog::storeIgnoredUpdates() +{ + if ( m_bModified && ( m_ignoredUpdates.size() != 0 ) ) + { + uno::Reference< lang::XMultiServiceFactory > xConfig( m_context->getServiceManager()->createInstanceWithContext( + OUSTR("com.sun.star.configuration.ConfigurationProvider"), m_context ), uno::UNO_QUERY_THROW ); + beans::NamedValue aValue( OUSTR("nodepath"), uno::Any( IGNORED_UPDATES ) ); + uno::Sequence< uno::Any > args(1); + args[0] <<= aValue; + + uno::Reference< container::XNameContainer > xNameContainer( xConfig->createInstanceWithArguments( + OUSTR("com.sun.star.configuration.ConfigurationUpdateAccess"), args ), uno::UNO_QUERY_THROW ); + + for ( std::vector< UpdateDialog::IgnoredUpdate* >::iterator i( m_ignoredUpdates.begin() ); i != m_ignoredUpdates.end(); ++i ) + { + if ( xNameContainer->hasByName( (*i)->sExtensionID ) ) + { + if ( (*i)->bRemoved ) + xNameContainer->removeByName( (*i)->sExtensionID ); + else + uno::Reference< beans::XPropertySet >( xNameContainer->getByName( (*i)->sExtensionID ), uno::UNO_QUERY_THROW )->setPropertyValue( PROPERTY_VERSION, uno::Any( (*i)->sVersion ) ); + } + else if ( ! (*i)->bRemoved ) + { + uno::Reference< beans::XPropertySet > elem( uno::Reference< lang::XSingleServiceFactory >( xNameContainer, uno::UNO_QUERY_THROW )->createInstance(), uno::UNO_QUERY_THROW ); + elem->setPropertyValue( PROPERTY_VERSION, uno::Any( (*i)->sVersion ) ); + xNameContainer->insertByName( (*i)->sExtensionID, uno::Any( elem ) ); + } + } + + uno::Reference< util::XChangesBatch > xChangesBatch( xNameContainer, uno::UNO_QUERY ); + if ( xChangesBatch.is() && xChangesBatch->hasPendingChanges() ) + xChangesBatch->commitChanges(); + } + + m_bModified = false; +} + +//------------------------------------------------------------------------------ +bool UpdateDialog::isIgnoredUpdate( UpdateDialog::Index * index ) +{ + bool bIsIgnored = false; + + if ( m_ignoredUpdates.size() != 0 ) + { + rtl::OUString aExtensionID; + rtl::OUString aVersion; + + if ( index->m_eKind == ENABLED_UPDATE ) + { + dp_gui::UpdateData aUpdData = m_enabledUpdates[ index->m_nIndex ]; + aExtensionID = dp_misc::getIdentifier( aUpdData.aInstalledPackage ); + aVersion = aUpdData.updateVersion; + } + else if ( index->m_eKind == DISABLED_UPDATE ) + { + DisabledUpdate &rData = m_disabledUpdates[ index->m_nIndex ]; + dp_misc::DescriptionInfoset aInfoset( m_context, rData.aUpdateInfo ); + ::boost::optional< ::rtl::OUString > aID( aInfoset.getIdentifier() ); + if ( aID ) + aExtensionID = *aID; + aVersion = aInfoset.getVersion(); + } + + for ( std::vector< UpdateDialog::IgnoredUpdate* >::iterator i( m_ignoredUpdates.begin() ); i != m_ignoredUpdates.end(); ++i ) + { + if ( (*i)->sExtensionID == aExtensionID ) + { + if ( ( (*i)->sVersion.getLength() == 0 ) || ( (*i)->sVersion == aVersion ) ) + { + bIsIgnored = true; + index->m_bIgnored = true; + } + else // when we find another update of an ignored version, we will remove the old one to keep the ignored list small + (*i)->bRemoved = true; + break; + } + } + } + + return bIsIgnored; +} + +//------------------------------------------------------------------------------ +void UpdateDialog::setIgnoredUpdate( UpdateDialog::Index *pIndex, bool bIgnore, bool bIgnoreAll ) +{ + rtl::OUString aExtensionID; + rtl::OUString aVersion; + + m_bModified = true; + + if ( pIndex->m_eKind == ENABLED_UPDATE ) + { + dp_gui::UpdateData aUpdData = m_enabledUpdates[ pIndex->m_nIndex ]; + aExtensionID = dp_misc::getIdentifier( aUpdData.aInstalledPackage ); + if ( !bIgnoreAll ) + aVersion = aUpdData.updateVersion; + } + else if ( pIndex->m_eKind == DISABLED_UPDATE ) + { + DisabledUpdate &rData = m_disabledUpdates[ pIndex->m_nIndex ]; + dp_misc::DescriptionInfoset aInfoset( m_context, rData.aUpdateInfo ); + ::boost::optional< ::rtl::OUString > aID( aInfoset.getIdentifier() ); + if ( aID ) + aExtensionID = *aID; + if ( !bIgnoreAll ) + aVersion = aInfoset.getVersion(); + } + + if ( aExtensionID.getLength() ) + { + bool bFound = false; + for ( std::vector< UpdateDialog::IgnoredUpdate* >::iterator i( m_ignoredUpdates.begin() ); i != m_ignoredUpdates.end(); ++i ) + { + if ( (*i)->sExtensionID == aExtensionID ) + { + (*i)->sVersion = aVersion; + (*i)->bRemoved = !bIgnore; + bFound = true; + break; + } + } + if ( bIgnore && !bFound ) + { + IgnoredUpdate *pData = new IgnoredUpdate( aExtensionID, aVersion ); + m_ignoredUpdates.push_back( pData ); + } + } +} + +//------------------------------------------------------------------------------ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) { rtl::OUStringBuffer b; @@ -1075,38 +1316,36 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) m_updates.GetEntryData(m_updates.GetSelectEntryPos())); clearDescription(); - if (p != NULL) + if ( p != NULL ) { - //When the index is greater or equal than the amount of enabled updates then the "Show all" - //button is probably checked. Then we show first all enabled and then the disabled - //updates. - USHORT pos = m_updates.GetSelectEntryPos(); - const std::vector< dp_gui::UpdateData >::size_type sizeEnabled = - m_enabledUpdates.size(); - const std::vector< UpdateDialog::DisabledUpdate >::size_type sizeDisabled = - m_disabledUpdates.size(); - if (pos < sizeEnabled) - { - if (m_enabledUpdates[pos].aUpdateSource.is()) - bInserted = showDescription(m_enabledUpdates[pos].aUpdateSource); - else - bInserted = showDescription(m_enabledUpdates[pos].aUpdateInfo); - } - else if (pos >= sizeEnabled - && pos < (sizeEnabled + sizeDisabled)) - bInserted = showDescription(m_disabledUpdates[pos - sizeEnabled].aUpdateInfo); + USHORT pos = p->m_nIndex; - switch (p->kind) + switch (p->m_eKind) { case ENABLED_UPDATE: { - b.append(m_noDescription); + if ( m_enabledUpdates[ pos ].aUpdateSource.is() ) + bInserted = showDescription( m_enabledUpdates[ pos ].aUpdateSource ); + else + bInserted = showDescription( m_enabledUpdates[ pos ].aUpdateInfo ); + + if ( p->m_bIgnored ) + b.append( m_ignoredUpdate ); + else + b.append( m_noDescription ); + break; } case DISABLED_UPDATE: { - UpdateDialog::DisabledUpdate & data = m_disabledUpdates[ - p->index.disabledUpdate]; + bInserted = showDescription( m_disabledUpdates[pos].aUpdateInfo ); + + if ( p->m_bIgnored ) + b.append( m_ignoredUpdate ); + else + b.append( m_noDescription ); + + UpdateDialog::DisabledUpdate & data = m_disabledUpdates[ pos ]; if (data.unsatisfiedDependencies.getLength() != 0) { // create error string for version mismatch @@ -1139,23 +1378,12 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) } break; } - case GENERAL_ERROR: - { - rtl::OUString & msg = m_generalErrors[p->index.generalError]; - b.append(m_failure); - b.append(LF); - b.append(msg.getLength() == 0 ? m_unknownError : msg); - break; - } case SPECIFIC_ERROR: { - UpdateDialog::SpecificError & data = m_specificErrors[ - p->index.specificError]; + UpdateDialog::SpecificError & data = m_specificErrors[ pos ]; b.append(m_failure); b.append(LF); - b.append( - data.message.getLength() == 0 - ? m_unknownError : data.message); + b.append( data.message.getLength() == 0 ? m_unknownError : data.message ); break; } default: @@ -1168,52 +1396,30 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) return 0; } -IMPL_LINK(UpdateDialog, allHandler, void *, EMPTYARG) { - if (m_all.IsChecked()) { +IMPL_LINK(UpdateDialog, allHandler, void *, EMPTYARG) +{ + if (m_all.IsChecked()) + { m_update.Enable(); m_updates.Enable(); m_description.Enable(); m_descriptions.Enable(); - std::vector< UpdateDialog::DisabledUpdate >::size_type n1 = 0; - for (std::vector< UpdateDialog::DisabledUpdate >::iterator i( - m_disabledUpdates.begin()); - i != m_disabledUpdates.end(); ++i) + + for (std::vector< UpdateDialog::Index* >::iterator i( m_ListboxEntries.begin() ); + i != m_ListboxEntries.end(); ++i ) { - insertItem( - i->name, LISTBOX_APPEND, - UpdateDialog::Index::newDisabledUpdate(n1++), - SvLBoxButtonKind_disabledCheckbox); + if ( (*i)->m_bIgnored || ( (*i)->m_eKind != ENABLED_UPDATE ) ) + insertItem( (*i), SvLBoxButtonKind_disabledCheckbox ); } - std::vector< rtl::OUString >::size_type n2 = 0; - for (std::vector< rtl::OUString >::iterator i(m_generalErrors.begin()); - i != m_generalErrors.end(); ++i) + } + else + { + for ( USHORT i = 0; i < m_updates.getItemCount(); ) { - insertItem( - m_error, LISTBOX_APPEND, - UpdateDialog::Index::newGeneralError(n2++), - SvLBoxButtonKind_staticImage); - } - std::vector< UpdateDialog::SpecificError >::size_type n3 = 0; - for (std::vector< UpdateDialog::SpecificError >::iterator i( - m_specificErrors.begin()); - i != m_specificErrors.end(); ++i) - { - insertItem( - i->name, LISTBOX_APPEND, - UpdateDialog::Index::newSpecificError(n3++), - SvLBoxButtonKind_staticImage); - } - } else { - for (USHORT i = 0; i < m_updates.getItemCount();) { - UpdateDialog::Index const * p = - static_cast< UpdateDialog::Index const * >( - m_updates.GetEntryData(i)); - if (p->kind != ENABLED_UPDATE) { + UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_updates.GetEntryData(i) ); + if ( p->m_bIgnored || ( p->m_eKind != ENABLED_UPDATE ) ) + { m_updates.RemoveEntry(i); - //TODO #i72487#: UpdateDialog::Index potentially leaks as - // SvxCheckListBox::RemoveEntry's exception behavior is - // unspecified - delete p; } else { ++i; } @@ -1260,8 +1466,8 @@ IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG) UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_updates.GetEntryData(i)); - if (p->kind == ENABLED_UPDATE && m_updates.IsChecked(i)) { - m_updateData.push_back(m_enabledUpdates[p->index.enabledUpdate]); + if (p->m_eKind == ENABLED_UPDATE && m_updates.IsChecked(i)) { + m_updateData.push_back( m_enabledUpdates[ p->m_nIndex ] ); } } @@ -1269,7 +1475,7 @@ IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG) return 0; } -IMPL_LINK(UpdateDialog, cancelHandler, void *, EMPTYARG) { +IMPL_LINK(UpdateDialog, closeHandler, void *, EMPTYARG) { m_thread->stop(); EndDialog(RET_CANCEL); return 0; @@ -1285,15 +1491,15 @@ IMPL_LINK( UpdateDialog, hyperlink_clicked, svt::FixedHyperlink*, pHyperlink ) try { - css::uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute( + uno::Reference< system::XSystemShellExecute > xSystemShellExecute( m_context->getServiceManager()->createInstanceWithContext( OUSTR( "com.sun.star.system.SystemShellExecute" ), - m_context), css::uno::UNO_QUERY_THROW); - //throws css::lang::IllegalArgumentException, css::system::SystemShellExecuteException + m_context), uno::UNO_QUERY_THROW); + //throws lang::IllegalArgumentException, system::SystemShellExecuteException xSystemShellExecute->execute( - sURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::DEFAULTS); + sURL, ::rtl::OUString(), system::SystemShellExecuteFlags::DEFAULTS); } - catch (css::uno::Exception& ) + catch (uno::Exception& ) { } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx old mode 100644 new mode 100755 index 32c317cb8735..54e645f195d8 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -112,8 +112,7 @@ private: struct DisabledUpdate; struct SpecificError; - union IndexUnion; - friend union IndexUnion; + struct IgnoredUpdate; struct Index; friend struct Index; class Thread; @@ -135,40 +134,36 @@ private: void operator =(UpdateDialog::CheckListBox &); // not defined virtual void MouseButtonDown(MouseEvent const & event); - virtual void MouseButtonUp(MouseEvent const & event); - virtual void KeyInput(KeyEvent const & event); + void handlePopupMenu( const Point &rPos ); + + rtl::OUString m_ignoreUpdate; + rtl::OUString m_ignoreAllUpdates; + rtl::OUString m_enableUpdate; UpdateDialog & m_dialog; }; friend class CheckListBox; - void insertItem( - rtl::OUString const & name, USHORT position, - std::auto_ptr< UpdateDialog::Index const > index, - SvLBoxButtonKind kind); + USHORT insertItem( UpdateDialog::Index *pIndex, SvLBoxButtonKind kind ); + void addAdditional( UpdateDialog::Index *pIndex, SvLBoxButtonKind kind ); + bool isIgnoredUpdate( UpdateDialog::Index *pIndex ); + void setIgnoredUpdate( UpdateDialog::Index *pIndex, bool bIgnore, bool bIgnoreAll ); - void addAdditional( - rtl::OUString const & name, USHORT position, - std::auto_ptr< UpdateDialog::Index const > index, - SvLBoxButtonKind kind); - - void addEnabledUpdate( - rtl::OUString const & name, dp_gui::UpdateData const & data); - - void addDisabledUpdate(UpdateDialog::DisabledUpdate const & data); -#if 0 - void addGeneralError(rtl::OUString const & message); -#endif - void addSpecificError(UpdateDialog::SpecificError const & data); + void addEnabledUpdate( rtl::OUString const & name, dp_gui::UpdateData & data ); + void addDisabledUpdate( UpdateDialog::DisabledUpdate & data ); + void addSpecificError( UpdateDialog::SpecificError & data ); void checkingDone(); void enableOk(); + void getIgnoredUpdates(); + void storeIgnoredUpdates(); + void initDescription(); void clearDescription(); bool showDescription(::com::sun::star::uno::Reference< @@ -183,7 +178,7 @@ private: DECL_LINK(selectionHandler, void *); DECL_LINK(allHandler, void *); DECL_LINK(okHandler, void *); - DECL_LINK(cancelHandler, void *); + DECL_LINK(closeHandler, void *); DECL_LINK(hyperlink_clicked, svt::FixedHyperlink *); com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > @@ -202,7 +197,7 @@ private: FixedLine m_line; HelpButton m_help; PushButton m_ok; - CancelButton m_cancel; + PushButton m_close; rtl::OUString m_error; rtl::OUString m_none; rtl::OUString m_noInstallable; @@ -214,18 +209,22 @@ private: rtl::OUString m_noDependencyCurVer; rtl::OUString m_browserbased; rtl::OUString m_version; + rtl::OUString m_ignoredUpdate; std::vector< dp_gui::UpdateData > m_enabledUpdates; std::vector< UpdateDialog::DisabledUpdate > m_disabledUpdates; - std::vector< rtl::OUString > m_generalErrors; std::vector< UpdateDialog::SpecificError > m_specificErrors; + std::vector< UpdateDialog::IgnoredUpdate* > m_ignoredUpdates; + std::vector< Index* > m_ListboxEntries; std::vector< dp_gui::UpdateData > & m_updateData; rtl::Reference< UpdateDialog::Thread > m_thread; ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XExtensionManager > m_xExtensionManager; - Point m_aFirstLinePos; - Size m_aFirstLineSize; - long m_nFirstLineDelta; - long m_nOneLineMissing; + Point m_aFirstLinePos; + Size m_aFirstLineSize; + long m_nFirstLineDelta; + long m_nOneLineMissing; + USHORT m_nLastID; + bool m_bModified; }; } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src old mode 100644 new mode 100755 index 325d98c88d48..45438461ff76 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.src +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src @@ -196,7 +196,7 @@ ModalDialog RID_DLG_UPDATE { Text[en-US] = "~Install"; DefButton = TRUE; }; - CancelButton RID_DLG_UPDATE_CANCEL { + PushButton RID_DLG_UPDATE_CLOSE { Pos = MAP_APPFONT( RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH - RSC_CD_PUSHBUTTON_WIDTH, (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + @@ -205,6 +205,7 @@ ModalDialog RID_DLG_UPDATE { RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT2 + RSC_SP_FLGR_SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_SPACE_Y)); Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT); + Text[en-US] = "Close"; }; Image RID_DLG_UPDATE_NORMALALERT { @@ -247,10 +248,21 @@ ModalDialog RID_DLG_UPDATE { String RID_DLG_UPDATE_BROWSERBASED { Text[en-US] = "browser based update"; }; - String RID_DLG_UPDATE_VERSION { Text[en-US] = "Version"; }; + String RID_DLG_UPDATE_IGNORE { + Text[en-US] = "Ignore this Update"; + }; + String RID_DLG_UPDATE_IGNORE_ALL { + Text[en-US] = "Ignore all Updates"; + }; + String RID_DLG_UPDATE_ENABLE { + Text[en-US] = "Enable Updates"; + }; + String RID_DLG_UPDATE_IGNORED_UPDATE { + Text[en-US] = "This update will be ignored.\n"; + }; }; WarningBox RID_WARNINGBOX_UPDATE_SHARED_EXTENSION diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 479827565775..5966eadcf3e7 100755 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -29,13 +29,13 @@ - + Vorschau in Web-Browser Preview in Web Browser - + New Presentation @@ -2117,9 +2117,9 @@ - - Language Status - + + Language Status + @@ -3006,7 +3006,7 @@ ~Spelling and Grammar... - 1 + 1 @@ -3461,12 +3461,12 @@ 9 - - - Task Pane - - - + + + Task Pane + + + Restore Editing View @@ -3480,10 +3480,10 @@ Fit to Frame - - 8 - - + + 8 + + ImageMap @@ -3740,10 +3740,10 @@ Flash - - 8 - - + + 8 + + Edit Macros @@ -4047,12 +4047,12 @@ - As~ian phonetic guide... + As~ian phonetic guide... - - 8 - - + + 8 + + S~pecial Character... @@ -4149,10 +4149,10 @@ Status ~Bar - - 8 - - + + 8 + + Macro Toolbar On/Off @@ -5121,16 +5121,16 @@ ~Extension Manager... - - - Digital Signatu~res... - - - - - Digital Signature... - - + + + Digital Signatu~res... + + + + + Digital Signature... + + Left @@ -5187,22 +5187,22 @@ Find --> - - - Delete All Comments - - - - - Delete All Comments by This Author - - - - - Delete Comment - - - + + + Delete All Comments + + + + + Delete All Comments by This Author + + + + + Delete Comment + + + diff --git a/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs b/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs old mode 100644 new mode 100755 index de26a3ae14eb..819290c3c283 --- a/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs @@ -26,28 +26,52 @@ * ************************************************************************ --> - - - JL - Contains information for the Extension Manager. - - - - - Information about repositories for extensions. - - - - - This links is used from the Extension Manager. A user can click on the &Download extensions...& - control so that a browser is opened which displayed the website to which directs this URL. - - - - - - - - + + + JL + Contains information for the Extension Manager. + + + + + Holds the information about updates for extensions. + + + + The version of the extension + + + + + + + + Information about repositories for extensions. + + + + This links is used from the Extension Manager. A user can click on the &Download extensions...& + control so that a browser is opened which displayed the website to which directs this URL. + + + + + + + + Contains inforamtion about availabe or ignored updates for extensions." + + + + This set lists all known updates for extensions, which where not applied yet. + + + + + This set lists all updates for extensions which the user wanted to ignore. + + + + diff --git a/officecfg/registry/schema/org/openoffice/Office/Jobs.xcs b/officecfg/registry/schema/org/openoffice/Office/Jobs.xcs old mode 100644 new mode 100755 From 30404a1cea9999f7be7904fd2627162d02793e00 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 28 Oct 2010 14:13:05 +0200 Subject: [PATCH 210/279] dockingwindows: #i112595# Fix problem using dockWindow() and toolbar is not correctly shown. Further code cleanup. --- framework/source/layoutmanager/helpers.cxx | 20 + framework/source/layoutmanager/helpers.hxx | 5 + .../source/layoutmanager/layoutmanager.cxx | 3 - .../layoutmanager/toolbarlayoutmanager.cxx | 381 +++++++----------- 4 files changed, 163 insertions(+), 246 deletions(-) diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index be81119382e7..d9da9f6ddefe 100755 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -57,6 +57,26 @@ using namespace com::sun::star; namespace framework { +bool hasEmptySize( const:: Size& aSize ) +{ + return ( aSize.Width() == 0 ) && ( aSize.Height() == 0 ); +} + +bool hasDefaultPosValue( const ::Point& aPos ) +{ + return (( aPos.X() == SAL_MAX_INT32 ) || ( aPos.Y() == SAL_MAX_INT32 )); +} + +bool isDefaultPos( const ::com::sun::star::awt::Point& aPos ) +{ + return (( aPos.X == SAL_MAX_INT32 ) && ( aPos.Y == SAL_MAX_INT32 )); +} + +bool isDefaultPos( const ::Point& aPos ) +{ + return (( aPos.X() == SAL_MAX_INT32 ) && ( aPos.Y() == SAL_MAX_INT32 )); +} + bool isReverseOrderDockingArea( const sal_Int16 nDockArea ) { ui::DockingArea eDockArea = (ui::DockingArea)nDockArea; diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx index c2b9695dd9f2..f2d5f1de15d5 100755 --- a/framework/source/layoutmanager/helpers.hxx +++ b/framework/source/layoutmanager/helpers.hxx @@ -43,6 +43,7 @@ #include #include #include +#include // other includes #include @@ -59,6 +60,10 @@ namespace framework { +bool hasEmptySize( const:: Size& aSize ); +bool hasDefaultPosValue( const ::Point& aPos ); +bool isDefaultPos( const ::com::sun::star::awt::Point& aPos ); +bool isDefaultPos( const ::Point& aPos ); bool isToolboxHorizontalAligned( ToolBox* pToolBox ); bool isReverseOrderDockingArea( const sal_Int16 nDockArea ); bool isHorizontalDockingArea( const sal_Int16 nDockArea ); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 55d3b2335299..7706acf09047 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -2920,10 +2920,7 @@ void SAL_CALL LayoutManager::windowHidden( const lang::EventObject& aEvent ) thr IMPL_LINK( LayoutManager, AsyncLayoutHdl, Timer *, EMPTYARG ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); - - // Request to set docking area space again. m_aAsyncLayoutTimer.Stop(); if( !m_xContainerWindow.is() ) diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index a098871d4266..7837cc9154d3 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -111,11 +111,10 @@ void SAL_CALL ToolbarLayoutManager::release() throw() uno::Any SAL_CALL ToolbarLayoutManager::queryInterface( const uno::Type & rType ) throw( uno::RuntimeException ) { - uno::Any a = - ::cppu::queryInterface( rType, - SAL_STATIC_CAST( awt::XDockableWindowListener*, this ), - SAL_STATIC_CAST( ui::XUIConfigurationListener*, this ), - SAL_STATIC_CAST( awt::XWindowListener*, this )); + uno::Any a = ::cppu::queryInterface( rType, + SAL_STATIC_CAST( awt::XDockableWindowListener*, this ), + SAL_STATIC_CAST( ui::XUIConfigurationListener*, this ), + SAL_STATIC_CAST( awt::XWindowListener*, this )); if ( a.hasValue() ) return a; @@ -159,11 +158,13 @@ void ToolbarLayoutManager::setDockingArea( const awt::Rectangle& rDockingArea ) void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangle& rBorderSpace ) { - uno::Reference< awt::XWindow2 > xContainerWindow; - ReadGuard aReadLock( m_aLock ); - xContainerWindow = m_xContainerWindow; Rectangle aDockOffsets = m_aDockingAreaOffsets; + uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); + uno::Reference< awt::XWindow > xTopDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); + uno::Reference< awt::XWindow > xBottomDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); + uno::Reference< awt::XWindow > xLeftDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); + uno::Reference< awt::XWindow > xRightDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] ); aReadLock.unlock(); uno::Reference< awt::XDevice > xDevice( xContainerWindow, uno::UNO_QUERY ); @@ -179,12 +180,8 @@ void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangl if ( rBorderSpace.Y >= 0 ) { // Top docking area window - aReadLock.lock(); - uno::Reference< awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); - aReadLock.unlock(); - - xDockAreaWindow->setPosSize( 0, 0, aContainerClientSize.Width, rBorderSpace.Y, awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); + xTopDockAreaWindow->setPosSize( 0, 0, aContainerClientSize.Width, rBorderSpace.Y, awt::PosSize::POSSIZE ); + xTopDockAreaWindow->setVisible( sal_True ); nLeftRightDockingAreaHeight -= rBorderSpace.Y; } @@ -194,12 +191,8 @@ void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangl sal_Int32 nBottomPos = std::max( sal_Int32( aContainerClientSize.Height - rBorderSpace.Height - aStatusBarHeight ), sal_Int32( 0 )); sal_Int32 nHeight = ( nBottomPos == 0 ) ? 0 : rBorderSpace.Height; - aReadLock.lock(); - uno::Reference< awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); - aReadLock.unlock(); - - xDockAreaWindow->setPosSize( 0, nBottomPos, aContainerClientSize.Width, nHeight, awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); + xBottomDockAreaWindow->setPosSize( 0, nBottomPos, aContainerClientSize.Width, nHeight, awt::PosSize::POSSIZE ); + xBottomDockAreaWindow->setVisible( sal_True ); nLeftRightDockingAreaHeight -= nHeight; } @@ -207,30 +200,22 @@ void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangl if ( rBorderSpace.X >= 0 || nLeftRightDockingAreaHeight > 0 ) { // Left docking area window - aReadLock.lock(); - uno::Reference< awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); - aReadLock.unlock(); - // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); - xDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); + xLeftDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, awt::PosSize::POSSIZE ); + xLeftDockAreaWindow->setVisible( sal_True ); } if ( rBorderSpace.Width >= 0 || nLeftRightDockingAreaHeight > 0 ) { // Right docking area window - aReadLock.lock(); - uno::Reference< awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] ); - aReadLock.unlock(); - // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! - sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width )); - sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); - sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width; + sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width )); + sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); + sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width; - xDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, awt::PosSize::POSSIZE ); - xDockAreaWindow->setVisible( sal_True ); + xRightDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, awt::PosSize::POSSIZE ); + xRightDockAreaWindow->setVisible( sal_True ); } } @@ -278,9 +263,8 @@ void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) bool ToolbarLayoutManager::implts_isParentWindowVisible() const { - bool bVisible( false ); - ReadGuard aReadLock( m_aLock ); + bool bVisible( false ); if ( m_xContainerWindow.is() ) bVisible = m_xContainerWindow->isVisible(); @@ -324,9 +308,9 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea() awt::Rectangle aPosSize = xWindow->getPosSize(); if ( pConstIter->m_aDockedData.m_nDockedArea != nCurrDockingArea ) { - nCurrDockingArea = pConstIter->m_aDockedData.m_nDockedArea; - nCurrRowColumn = 0; - nCurrPos = 0; + nCurrDockingArea = pConstIter->m_aDockedData.m_nDockedArea; + nCurrRowColumn = 0; + nCurrPos = 0; aRowColumnSizes[nCurrDockingArea].clear(); aRowColumnSizes[nCurrDockingArea].push_back( 0 ); } @@ -390,8 +374,8 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea() void ToolbarLayoutManager::reset() { WriteGuard aWriteLock( m_aLock ); - uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr = m_xModuleCfgMgr; - uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr = m_xDocCfgMgr; + uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr ); + uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr ); m_xModuleCfgMgr.clear(); m_xDocCfgMgr.clear(); m_bComponentAttached = false; @@ -417,7 +401,6 @@ void ToolbarLayoutManager::attach( m_xDocCfgMgr = xDocCfgMgr; m_xPersistentWindowState = xPersistentWindowState; m_bComponentAttached = true; - aWriteLock.unlock(); } void ToolbarLayoutManager::createStaticToolbars() @@ -431,8 +414,8 @@ void ToolbarLayoutManager::createStaticToolbars() bool ToolbarLayoutManager::requestToolbar( const ::rtl::OUString& rResourceURL ) { - bool bNotify( false ); - bool bMustCallCreate( false ); + bool bNotify( false ); + bool bMustCallCreate( false ); uno::Reference< ui::XUIElement > xUIElement; UIElement aRequestedToolbar = impl_findToolbar( rResourceURL ); @@ -449,18 +432,13 @@ bool ToolbarLayoutManager::requestToolbar( const ::rtl::OUString& rResourceURL ) if ( !xUIElement.is() ) bMustCallCreate = true; - bool bCreateOrShowToolbar = aRequestedToolbar.m_bVisible & !aRequestedToolbar.m_bMasterHide; + bool bCreateOrShowToolbar( aRequestedToolbar.m_bVisible & !aRequestedToolbar.m_bMasterHide ); uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow, uno::UNO_QUERY ); if ( xContainerWindow.is() && aRequestedToolbar.m_bFloating ) - bCreateOrShowToolbar = ( bCreateOrShowToolbar && xContainerWindow->isActive() ); + bCreateOrShowToolbar &= xContainerWindow->isActive(); if ( bCreateOrShowToolbar ) - { - if ( bMustCallCreate ) - bNotify = createToolbar( rResourceURL ); - else - bNotify = showToolbar( rResourceURL ); - } + bNotify = ( bMustCallCreate ) ? createToolbar( rResourceURL ) : showToolbar( rResourceURL ); return bNotify; } @@ -481,10 +459,10 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) UIElementVector::iterator pIter; uno::Reference< lang::XComponent > xComponent; - bool bMustBeDestroyed( rResourceURL.indexOf( aAddonTbResourceName ) != 0 ); - bool bMustBeSorted( false ); bool bNotify( false ); + bool bMustBeSorted( false ); bool bMustLayouted( false ); + bool bMustBeDestroyed( rResourceURL.indexOf( aAddonTbResourceName ) != 0 ); WriteGuard aWriteLock( m_aLock ); for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) @@ -545,11 +523,7 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) } if ( bMustLayouted ) - { - aWriteLock.lock(); - m_bLayoutDirty = true; - aWriteLock.unlock(); - } + implts_setLayoutDirty(); if ( bMustBeSorted ) implts_sortUIElements(); @@ -585,10 +559,7 @@ bool ToolbarLayoutManager::showToolbar( const ::rtl::OUString& rResourceURL ) if ( pWindow ) { if ( !aUIElement.m_bFloating ) - { - WriteGuard aWriteLock( m_aLock ); - m_bLayoutDirty = true; - } + implts_setLayoutDirty(); else pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); @@ -611,10 +582,7 @@ bool ToolbarLayoutManager::hideToolbar( const ::rtl::OUString& rResourceURL ) { pWindow->Show( FALSE ); if ( !aUIElement.m_bFloating ) - { - WriteGuard aWriteLock( m_aLock ); - m_bLayoutDirty = true; - } + implts_setLayoutDirty(); aUIElement.m_bVisible = false; implts_writeWindowStateData( aUIElement ); @@ -631,7 +599,6 @@ void ToolbarLayoutManager::refreshToolbarsVisibility() UIElementVector aUIElementVector = m_aUIElements; aReadLock.unlock(); - bool bLayoutDirty( false ); UIElementVector::iterator pIter; vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -644,22 +611,19 @@ void ToolbarLayoutManager::refreshToolbarsVisibility() { if ( pIter->m_bFloating ) pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + else + implts_setLayoutDirty(); } else pWindow->Show( FALSE ); - - if ( !pIter->m_bFloating ) - bLayoutDirty = true; } } } void ToolbarLayoutManager::setFloatingToolbarsVisibility( bool bVisible ) { - UIElementVector aUIElementVector; - WriteGuard aWriteLock( m_aLock ); - aUIElementVector = m_aUIElements; + UIElementVector aUIElementVector( m_aUIElements ); aWriteLock.unlock(); UIElementVector::iterator pIter; @@ -682,12 +646,10 @@ void ToolbarLayoutManager::setFloatingToolbarsVisibility( bool bVisible ) void ToolbarLayoutManager::setVisible( bool bVisible ) { - UIElementVector aUIElementVector; - WriteGuard aWriteLock( m_aLock ); - aUIElementVector = m_aUIElements; - m_bLayoutDirty = true; + UIElementVector aUIElementVector( m_aUIElements ); bool bLayoutInProgress = m_bLayoutInProgress; + m_bLayoutDirty = true; m_bLayoutInProgress = true; aWriteLock.unlock(); @@ -726,7 +688,7 @@ bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& rResourceURL, ui: if ( eDockingArea != ui::DockingArea_DOCKINGAREA_DEFAULT ) aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( eDockingArea ); - if (( aPos.X != SAL_MAX_INT32 ) && ( aPos.Y != SAL_MAX_INT32 )) + if ( !isDefaultPos( aPos )) aUIElement.m_aDockedData.m_aPos = ::Point( aPos.X, aPos.Y ); if ( !xDockWindow->isFloating() ) @@ -747,7 +709,7 @@ bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& rResourceURL, ui: } } - if (( aUIElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) || ( aUIElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + if ( hasDefaultPosValue( aUIElement.m_aDockedData.m_aPos )) { // Docking on its default position without a preset position - // we have to find a good place for it. @@ -772,11 +734,9 @@ bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& rResourceURL, ui: if ( xDockWindow->isFloating() ) { - // ATTENTION: This will call toggleFloatingMode() via notifications! - // Sets the floating member of UIElement correctly! - xWindow->setVisible( sal_False ); + // ATTENTION: This will call toggleFloatingMode() via notifications which + // sets the floating member of the UIElement correctly! xDockWindow->setFloatingMode( sal_False ); - xWindow->setVisible( sal_True ); } else { @@ -786,7 +746,6 @@ bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& rResourceURL, ui: if ( aUIElement.m_bVisible ) implts_setLayoutDirty(); } - return true; } } @@ -800,17 +759,15 @@ bool ToolbarLayoutManager::dockAllToolbars() { std::vector< ::rtl::OUString > aToolBarNameVector; - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - UIElementVector::iterator pIter; + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; ReadGuard aReadLock( m_aLock ); + UIElementVector::iterator pIter; for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) { - if ( pIter->m_aType.equalsAscii( "toolbar" ) && - pIter->m_xUIElement.is() && - pIter->m_bFloating && - pIter->m_bVisible ) + if ( pIter->m_aType.equalsAscii( "toolbar" ) && pIter->m_xUIElement.is() && + pIter->m_bFloating && pIter->m_bVisible ) aToolBarNameVector.push_back( pIter->m_aName ); } aReadLock.unlock(); @@ -925,7 +882,6 @@ void ToolbarLayoutManager::setParentWindow( WriteGuard aWriteLock( m_aLock ); m_xContainerWindow = uno::Reference< awt::XWindow2 >( xParentWindow, uno::UNO_QUERY ); - m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] = xTopDockingWindow; m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] = xLeftDockingWindow; m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] = xRightDockingWindow; @@ -1214,12 +1170,12 @@ void ToolbarLayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbx void ToolbarLayoutManager::implts_reparentToolbars() { WriteGuard aWriteLock( m_aLock ); - UIElementVector aUIElementVector = m_aUIElements; - Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); - Window* pTopDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); - Window* pBottomDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); - Window* pLeftDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); - Window* pRightDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] ); + UIElementVector aUIElementVector = m_aUIElements; + Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); + Window* pTopDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); + Window* pBottomDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); + Window* pLeftDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); + Window* pRightDockWindow = VCLUnoHelper::GetWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] ); aWriteLock.unlock(); vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -1352,17 +1308,19 @@ uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( con { uno::Reference< ui::XUIElement > xUIElement; - ReadGuard aReadLock( m_aLock ); + ReadGuard aReadLock( m_aLock ); uno::Sequence< beans::PropertyValue > aPropSeq( 2 ); aPropSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); aPropSeq[0].Value <<= m_xFrame; aPropSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" )); aPropSeq[1].Value <<= true; + uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); + aReadLock.unlock(); try { - if ( m_xUIElementFactoryManager.is() ) - xUIElement = m_xUIElementFactoryManager->createUIElement( aName, aPropSeq ); + if ( xUIElementFactory.is() ) + xUIElement = xUIElementFactory->createUIElement( aName, aPropSeq ); } catch ( container::NoSuchElementException& ) {} catch ( lang::IllegalArgumentException& ) {} @@ -1420,8 +1378,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno ::Point aPos( rElement.m_aFloatingData.m_aPos.X(), rElement.m_aFloatingData.m_aPos.Y() ); bool bWriteData( false ); - bool bUndefPos = ( rElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || - rElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); + bool bUndefPos = hasDefaultPosValue( rElement.m_aFloatingData.m_aPos ); bool bSetSize = ( rElement.m_aFloatingData.m_aSize.Width() != 0 && rElement.m_aFloatingData.m_aSize.Height() != 0 ); xDockWindow->setFloatingMode( sal_True ); @@ -1481,13 +1438,9 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno aSize = pToolBox->CalcWindowSizePixel(); bSetSize = true; - if (( rElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && - ( rElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + if ( isDefaultPos( rElement.m_aDockedData.m_aPos )) { - implts_findNextDockingPos( (ui::DockingArea)rElement.m_aDockedData.m_nDockedArea, - aSize, - aDockPos, - aPixelPos ); + implts_findNextDockingPos( (ui::DockingArea)rElement.m_aDockedData.m_nDockedArea, aSize, aDockPos, aPixelPos ); rElement.m_aDockedData.m_aPos = aDockPos; } } @@ -1509,10 +1462,10 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno void ToolbarLayoutManager::implts_destroyDockingAreaWindows() { WriteGuard aWriteLock( m_aLock ); - uno::Reference< awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; - uno::Reference< awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; - uno::Reference< awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; - uno::Reference< awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; + uno::Reference< awt::XWindow > xTopDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); + uno::Reference< awt::XWindow > xLeftDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); + uno::Reference< awt::XWindow > xRightDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] ); + uno::Reference< awt::XWindow > xBottomDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP].clear(); m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT].clear(); m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT].clear(); @@ -1703,7 +1656,6 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen aWindowState[0].Value = ::uno::makeAny( sal_Bool( !rElementData.m_bFloating )); aWindowState[1].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_VISIBLE ); aWindowState[1].Value = uno::makeAny( sal_Bool( rElementData.m_bVisible )); - aWindowState[2].Name = ::rtl::OUString::createFromAscii( WINDOWSTATE_PROPERTY_DOCKINGAREA ); aWindowState[2].Value = uno::makeAny( static_cast< ui::DockingArea >( rElementData.m_aDockedData.m_nDockedArea ) ); @@ -1751,10 +1703,10 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen void ToolbarLayoutManager::implts_writeNewWindowStateData( const rtl::OUString aName, const uno::Reference< awt::XWindow >& xWindow ) { + bool bVisible( false ); + bool bFloating( true ); awt::Rectangle aPos; awt::Size aSize; - bool bVisible( false ); - bool bFloating( true ); if ( xWindow.is() ) { @@ -1808,21 +1760,14 @@ UIElement& ToolbarLayoutManager::impl_findToolbar( const rtl::OUString& aName ) UIElement ToolbarLayoutManager::implts_findToolbar( const rtl::OUString& aName ) { - UIElement aEmptyElement; - UIElementVector::iterator pIter; - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName ) - return *pIter; - } + UIElement aElement = impl_findToolbar( aName ); + aReadLock.unlock(); - return aEmptyElement; + return aElement; } -UIElement ToolbarLayoutManager::implts_findToolbar( - const uno::Reference< uno::XInterface >& xToolbar ) +UIElement ToolbarLayoutManager::implts_findToolbar( const uno::Reference< uno::XInterface >& xToolbar ) { UIElement aToolbar; UIElementVector::const_iterator pIter; @@ -1864,19 +1809,8 @@ uno::Reference< awt::XWindow > ToolbarLayoutManager::implts_getXWindow( const :: Window* ToolbarLayoutManager::implts_getWindow( const ::rtl::OUString& aName ) { - UIElementVector::iterator pIter; - Window* pWindow( 0 ); - - ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) - { - if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) - { - uno::Reference< awt::XWindow > xWindow( pIter->m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - pWindow = VCLUnoHelper::GetWindow( xWindow ); - break; - } - } + uno::Reference< awt::XWindow > xWindow = implts_getXWindow( aName ); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); return pWindow; } @@ -1923,9 +1857,9 @@ void ToolbarLayoutManager::implts_setToolbar( const UIElement& rUIElement ) const sal_Int32 nCascadeIndentY = 15; ReadGuard aReadLock( m_aLock ); - uno::Reference< awt::XWindow2 > xContainerWindow = m_xContainerWindow; - uno::Reference< awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; - uno::Reference< awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; + uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); + uno::Reference< awt::XWindow > xTopDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); + uno::Reference< awt::XWindow > xLeftDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); aReadLock.unlock(); ::Point aStartPos( nCascadeIndentX, nCascadeIndentY ); @@ -1942,8 +1876,8 @@ void ToolbarLayoutManager::implts_setToolbar( const UIElement& rUIElement ) } // Determine size of top and left docking area - awt::Rectangle aTopRect = xTopDockingWindow->getPosSize(); - awt::Rectangle aLeftRect = xLeftDockingWindow->getPosSize(); + awt::Rectangle aTopRect( xTopDockingWindow->getPosSize() ); + awt::Rectangle aLeftRect( xLeftDockingWindow->getPosSize() ); aStartPos.X() += aLeftRect.Width + nCascadeIndentX; aStartPos.Y() += aTopRect.Height + nCascadeIndentY; @@ -2002,8 +1936,8 @@ void ToolbarLayoutManager::implts_sortUIElements() uno::Reference< awt::XWindow > xBottomDockingAreaWindow; ReadGuard aReadLock( m_aLock ); - xTopDockingAreaWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; - xBottomDockingAreaWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; + xTopDockingAreaWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; + xBottomDockingAreaWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; aReadLock.unlock(); if ( xTopDockingAreaWindow.is() ) @@ -2018,8 +1952,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD { std::vector< UIElement > aWindowVector; - if (( eDockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) + if (( eDockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) eDockingArea = ui::DockingArea_DOCKINGAREA_TOP; uno::Reference< awt::XWindow > xDockAreaWindow; @@ -2204,11 +2137,10 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D { std::vector< UIElement > aWindowVector; - if (( eDockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) + if (( eDockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) eDockingArea = ui::DockingArea_DOCKINGAREA_TOP; - bool bHorzDockArea = (( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); + bool bHorzDockArea = isHorizontalDockingArea( eDockingArea ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); @@ -2277,10 +2209,8 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D rRowColumnWindowData.aRowColumnWindowSizes.push_back( - awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); + awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, aPosSize.Height )); if ( rRowColumnWindowData.nStaticSize < aPosSize.Height ) rRowColumnWindowData.nStaticSize = aPosSize.Height; rRowColumnWindowData.nVarSize += aPosSize.Width; @@ -2297,10 +2227,8 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; rRowColumnWindowData.aRowColumnWindowSizes.push_back( - awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), - rElement.m_aDockedData.m_aPos.Y(), - aPosSize.Width, - aPosSize.Height )); + awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), rElement.m_aDockedData.m_aPos.Y(), + aPosSize.Width, aPosSize.Height )); if ( rRowColumnWindowData.nStaticSize < aPosSize.Width ) rRowColumnWindowData.nStaticSize = aPosSize.Width; rRowColumnWindowData.nVarSize += aPosSize.Height; @@ -2321,8 +2249,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D { ::Rectangle aWinRect; - if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) + if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) DockingArea = ui::DockingArea_DOCKINGAREA_TOP; if ( rRowColumnWindowData.aRowColumnWindows.empty() ) @@ -2330,16 +2257,14 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D else { ReadGuard aReadLock( m_aLock ); - uno::Reference< awt::XWindow2 > xContainerWindow = m_xContainerWindow; - uno::Reference< awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[DockingArea]; + Window* pContainerWindow( VCLUnoHelper::GetWindow( m_xContainerWindow )); + Window* pDockingAreaWindow( VCLUnoHelper::GetWindow( m_xDockAreaWindows[DockingArea] )); aReadLock.unlock(); // Calc correct position of the column/row rectangle to be able to compare it with mouse pos/tracking rect vos::OGuard aGuard( Application::GetSolarMutex() ); // Retrieve output size from container Window - Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow )); - Window* pDockingAreaWindow( VCLUnoHelper::GetWindow( xDockingAreaWindow )); if ( pDockingAreaWindow && pContainerWindow ) { const sal_uInt32 nCount = rRowColumnWindowData.aRowColumnWindows.size(); @@ -2373,7 +2298,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D { SingleRowColumnWindowData aRowColumnWindowData; - sal_Bool bHorzDockArea = ( isHorizontalDockingArea( eDockingArea )); + sal_Bool bHorzDockArea( isHorizontalDockingArea( eDockingArea )); implts_getDockingAreaElementInfoOnSingleRowCol( eDockingArea, nRowCol, aRowColumnWindowData ); if ( aRowColumnWindowData.aRowColumnWindows.empty() ) return rMovedElementRect; @@ -2428,7 +2353,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ) { ReadGuard aReadLock( m_aLock ); - uno::Reference< awt::XWindow > xDockingWindow = m_xDockAreaWindows[DockingArea]; + uno::Reference< awt::XWindow > xDockingWindow( m_xDockAreaWindows[DockingArea] ); ::Size aDockingWinSize; Window* pDockingWindow( 0 ); aReadLock.unlock(); @@ -2535,8 +2460,7 @@ void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingAre } } - if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( DockingArea == ui::DockingArea_DOCKINGAREA_LEFT )) + if (( DockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( DockingArea == ui::DockingArea_DOCKINGAREA_LEFT )) nPixelPos += rRowColumnWindowData.nStaticSize; } @@ -2576,11 +2500,11 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( SingleRowColumnWindowData& rRowColumnWindowData, const ::Size& rContainerSize ) { - sal_Int32 nDiff( 0 ); - sal_Int32 nRCSpace( rRowColumnWindowData.nSpace ); - sal_Int32 nTopDockingAreaSize; - sal_Int32 nBottomDockingAreaSize; - sal_Int32 nContainerClientSize; + sal_Int32 nDiff(0); + sal_Int32 nRCSpace( rRowColumnWindowData.nSpace ); + sal_Int32 nTopDockingAreaSize(0); + sal_Int32 nBottomDockingAreaSize(0); + sal_Int32 nContainerClientSize(0); if ( rRowColumnWindowData.aRowColumnWindows.empty() ) return; @@ -2730,8 +2654,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( { if ( aWinRect.X < nCurrPos ) aWinRect.X = nCurrPos; - pWindow->SetPosSizePixel( ::Point( aWinRect.X, nOffset ), - ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); + pWindow->SetPosSizePixel( ::Point( aWinRect.X, nOffset ), ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; } @@ -2739,8 +2662,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( { if ( aWinRect.Y < nCurrPos ) aWinRect.Y = nCurrPos; - pWindow->SetPosSizePixel( ::Point( nOffset, aWinRect.Y ), - ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); + pWindow->SetPosSizePixel( ::Point( nOffset, aWinRect.Y ), ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; } @@ -3014,8 +2936,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( if ( rDockingOperation == DOCKOP_BEFORE_COLROW ) { - if (( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || - ( eDockedArea == ui::DockingArea_DOCKINGAREA_LEFT )) + if (( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || ( eDockedArea == ui::DockingArea_DOCKINGAREA_LEFT )) { // Docking before/after means move track rectangle half column/row. // As left and top are ordered 0...n instead of right and bottom @@ -3026,8 +2947,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( } else { - if (( eDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) || - ( eDockedArea == ui::DockingArea_DOCKINGAREA_RIGHT )) + if (( eDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) || ( eDockedArea == ui::DockingArea_DOCKINGAREA_RIGHT )) { // Docking before/after means move track rectangle half column/row. // As left and top are ordered 0...n instead of right and bottom @@ -3105,9 +3025,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( } else { - sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), - sal_Int32( nMaxLeftRightDockAreaSize )); - + sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), sal_Int32( nMaxLeftRightDockAreaSize )); sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) nPosY = std::min( nPosY, @@ -3252,8 +3170,8 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d aTrackingRect.setHeight( nSize ); aReadGuard.lock(); - uno::Reference< awt::XWindow > xDockingAreaWindow = m_xDockAreaWindows[eDockingArea]; - uno::Reference< awt::XWindow2 > xContainerWindow = m_xContainerWindow; + uno::Reference< awt::XWindow > xDockingAreaWindow( m_xDockAreaWindows[eDockingArea] ); + uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); aReadGuard.unlock(); sal_Int32 nDockPosY( 0 ); @@ -3263,8 +3181,7 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d vos::OGuard aGuard( Application::GetSolarMutex() ); pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); - nDockPosY = pDockingAreaWindow->ScreenToOutputPixel( - pContainerWindow->OutputToScreenPixel( ::Point( 0, nPosY ))).Y(); + nDockPosY = pDockingAreaWindow->ScreenToOutputPixel( pContainerWindow->OutputToScreenPixel( ::Point( 0, nPosY ))).Y(); } // Set virtual position @@ -3277,13 +3194,11 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d void ToolbarLayoutManager::implts_setTrackingRect( ui::DockingArea eDockingArea, const ::Point& rMousePos, ::Rectangle& rTrackingRect ) { - bool bHorizontalDockArea( isHorizontalDockingArea( eDockingArea )); - ::Point aPoint = rTrackingRect.TopLeft(); - if ( bHorizontalDockArea ) + ::Point aPoint( rTrackingRect.TopLeft()); + if ( isHorizontalDockingArea( eDockingArea )) aPoint.X() = rMousePos.X(); else aPoint.Y() = rMousePos.Y(); - rTrackingRect.SetPos( aPoint ); } @@ -3297,24 +3212,20 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( aReadLock.unlock(); bool bHorzDockingArea( isHorizontalDockingArea( eDockingArea )); - sal_Int32 nRowCol( bHorzDockingArea ? rUIElement.m_aDockedData.m_aPos.Y() : - rUIElement.m_aDockedData.m_aPos.X() ); + sal_Int32 nRowCol( bHorzDockingArea ? rUIElement.m_aDockedData.m_aPos.Y() : rUIElement.m_aDockedData.m_aPos.X() ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); UIElementVector::iterator pIter; for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) { - if (( pIter->m_aDockedData.m_nDockedArea == sal_Int16( eDockingArea )) && - ( pIter->m_aName != rUIElement.m_aName )) + if (( pIter->m_aDockedData.m_nDockedArea == sal_Int16( eDockingArea )) && ( pIter->m_aName != rUIElement.m_aName )) { // Don't change toolbars without a valid docking position! - if (( pIter->m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && - ( pIter->m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + if ( isDefaultPos( pIter->m_aDockedData.m_aPos )) continue; - sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? - pIter->m_aDockedData.m_aPos.Y() : pIter->m_aDockedData.m_aPos.X(); + sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? pIter->m_aDockedData.m_aPos.Y() : pIter->m_aDockedData.m_aPos.X(); if ( nWindowRowCol >= nRowCol ) { if ( bHorzDockingArea ) @@ -3353,7 +3264,7 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( } // Don't change toolbars without a valid docking position! - if (( aDockedPos.X == SAL_MAX_INT32 ) && ( aDockedPos.Y == SAL_MAX_INT32 )) + if ( isDefaultPos( aDockedPos )) continue; sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? aDockedPos.Y : aDockedPos.X; @@ -3518,7 +3429,7 @@ throw (uno::RuntimeException) uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); UIElement aUIDockingElement( m_aDockUIElement ); DockingOperation eDockingOperation( DOCKOP_ON_COLROW ); - bool bDockingInProgress = m_bDockingInProgress; + bool bDockingInProgress( m_bDockingInProgress ); aReadLock.unlock(); if ( bDockingInProgress ) @@ -3616,10 +3527,8 @@ throw (uno::RuntimeException) implts_calcDockingPosSize( aUIDockingElement, eDockingOperation, aNewDockingRect, aMousePos ); ::Point aScreenPos = pContainerWindow->OutputToScreenPixel( aNewDockingRect.TopLeft() ); - aNewTrackingRect = awt::Rectangle( aScreenPos.X(), - aScreenPos.Y(), - aNewDockingRect.getWidth(), - aNewDockingRect.getHeight() ); + aNewTrackingRect = awt::Rectangle( aScreenPos.X(), aScreenPos.Y(), + aNewDockingRect.getWidth(), aNewDockingRect.getHeight() ); aDockingData.TrackingRectangle = aNewTrackingRect; } else if ( pToolBox && bDockingInProgress ) @@ -3666,8 +3575,8 @@ throw (uno::RuntimeException) m_aDockUIElement.m_bFloating = aDockingData.bFloating; if ( !aDockingData.bFloating ) { - m_aDockUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; - m_eDockOperation = eDockingOperation; + m_aDockUIElement.m_aDockedData = aUIDockingElement.m_aDockedData; + m_eDockOperation = eDockingOperation; } else m_aDockUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData; @@ -3778,10 +3687,8 @@ throw (uno::RuntimeException) sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( const lang::EventObject& e ) throw (uno::RuntimeException) { - bool bDockingInProgress( false ); - ReadGuard aReadLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; + bool bDockingInProgress = m_bDockingInProgress; aReadLock.unlock(); UIElement aUIDockingElement = implts_findToolbar( e.Source ); @@ -3799,16 +3706,13 @@ throw (uno::RuntimeException) { vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { - if ( pWindow->GetType() == WINDOW_TOOLBOX ) - { - ToolBox* pToolBox = (ToolBox *)pWindow; - aUIDockingElement.m_aFloatingData.m_aPos = pToolBox->GetPosPixel(); - aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->GetOutputSizePixel(); - aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); - aUIDockingElement.m_aFloatingData.m_bIsHorizontal = isToolboxHorizontalAligned( pToolBox ); - } + ToolBox* pToolBox = static_cast< ToolBox *>( pWindow ); + aUIDockingElement.m_aFloatingData.m_aPos = pToolBox->GetPosPixel(); + aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->GetOutputSizePixel(); + aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); + aUIDockingElement.m_aFloatingData.m_bIsHorizontal = isToolboxHorizontalAligned( pToolBox ); } } @@ -3825,11 +3729,10 @@ throw (uno::RuntimeException) void SAL_CALL ToolbarLayoutManager::toggleFloatingMode( const lang::EventObject& e ) throw (uno::RuntimeException) { - bool bDockingInProgress( false ); UIElement aUIDockingElement; ReadGuard aReadLock( m_aLock ); - bDockingInProgress = m_bDockingInProgress; + bool bDockingInProgress( m_bDockingInProgress ); if ( bDockingInProgress ) aUIDockingElement = m_aDockUIElement; aReadLock.unlock(); @@ -3870,8 +3773,8 @@ throw (uno::RuntimeException) pToolBox->SetAlign( WINDOWALIGN_LEFT ); } - bool bUndefPos = ( aUIDockingElement.m_aFloatingData.m_aPos.X() == SAL_MAX_INT32 || aUIDockingElement.m_aFloatingData.m_aPos.Y() == SAL_MAX_INT32 ); - bool bSetSize = ( aUIDockingElement.m_aFloatingData.m_aSize.Width() != 0 && aUIDockingElement.m_aFloatingData.m_aSize.Height() != 0 ); + bool bUndefPos = hasDefaultPosValue( aUIDockingElement.m_aFloatingData.m_aPos ); + bool bSetSize = !hasEmptySize( aUIDockingElement.m_aFloatingData.m_aSize ); if ( bUndefPos ) aUIDockingElement.m_aFloatingData.m_aPos = implts_findNextCascadeFloatingPos(); @@ -3891,7 +3794,7 @@ throw (uno::RuntimeException) } else { - if (( aUIDockingElement.m_aDockedData.m_aPos.X() == SAL_MAX_INT32 ) && ( aUIDockingElement.m_aDockedData.m_aPos.Y() == SAL_MAX_INT32 )) + if ( isDefaultPos( aUIDockingElement.m_aDockedData.m_aPos )) { // Docking on its default position without a preset position - // we have to find a good place for it. @@ -3949,9 +3852,7 @@ throw (uno::RuntimeException) pToolBox->SetAlign( WINDOWALIGN_LEFT ); } else - { pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) ); - } } } } @@ -4006,9 +3907,7 @@ throw (uno::RuntimeException) void SAL_CALL ToolbarLayoutManager::elementInserted( const ui::ConfigurationEvent& rEvent ) throw (uno::RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - UIElement aUIElement = implts_findToolbar( rEvent.ResourceURL ); + UIElement aUIElement = implts_findToolbar( rEvent.ResourceURL ); uno::Reference< ui::XUIElementSettings > xElementSettings( aUIElement.m_xUIElement, uno::UNO_QUERY ); if ( xElementSettings.is() ) @@ -4024,6 +3923,8 @@ throw (uno::RuntimeException) } else { + ::rtl::OUString aElementType; + ::rtl::OUString aElementName; parseResourceURL( rEvent.ResourceURL, aElementType, aElementName ); if ( aElementName.indexOf( m_aCustomTbxPrefix ) != -1 ) { @@ -4064,9 +3965,6 @@ throw (uno::RuntimeException) void SAL_CALL ToolbarLayoutManager::elementRemoved( const ui::ConfigurationEvent& rEvent ) throw (uno::RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - ReadGuard aReadLock( m_aLock ); uno::Reference< awt::XWindow > xContainerWindow( m_xContainerWindow, uno::UNO_QUERY ); uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr ); @@ -4115,9 +4013,7 @@ throw (uno::RuntimeException) void SAL_CALL ToolbarLayoutManager::elementReplaced( const ui::ConfigurationEvent& rEvent ) throw (uno::RuntimeException) { - ::rtl::OUString aElementType; - ::rtl::OUString aElementName; - UIElement aUIElement = implts_findToolbar( rEvent.ResourceURL ); + UIElement aUIElement = implts_findToolbar( rEvent.ResourceURL ); uno::Reference< ui::XUIElementSettings > xElementSettings( aUIElement.m_xUIElement, uno::UNO_QUERY ); if ( xElementSettings.is() ) @@ -4159,10 +4055,9 @@ uno::Sequence< uno::Reference< ui::XUIElement > > ToolbarLayoutManager::getToolb uno::Sequence< uno::Reference< ui::XUIElement > > aSeq; ReadGuard aReadLock( m_aLock ); - sal_uInt32 nCount = m_aUIElements.size(); - if ( nCount > 0 ) + if ( m_aUIElements.size() > 0 ) { - nCount = 0; + sal_uInt32 nCount(0); UIElementVector::iterator pIter; for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) { From 9bb0061938a0c76a1b221a214dff8afe0bcdcb4e Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 28 Oct 2010 16:37:27 +0200 Subject: [PATCH 211/279] sb132: #i114877# combined configmgr::Components::{init,get}Singleton --- configmgr/source/components.cxx | 6 +---- configmgr/source/components.hxx | 4 +-- configmgr/source/configurationprovider.cxx | 6 ++--- configmgr/source/update.cxx | 30 ++++++++++++++-------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 32478e96813d..2d148959edfc 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -214,7 +214,7 @@ void Components::WriteThread::run() { reference_->clear(); } -void Components::initSingleton( +Components & Components::getSingleton( css::uno::Reference< css::uno::XComponentContext > const & context) { OSL_ASSERT(context.is()); @@ -223,10 +223,6 @@ void Components::initSingleton( static Components theSingleton(context); singleton = &theSingleton; } -} - -Components & Components::getSingleton() { - OSL_ASSERT(singletonCreated); if (singleton == 0) { throw css::uno::RuntimeException( rtl::OUString( diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx index 1c735efca6ba..34b693c7e585 100644 --- a/configmgr/source/components.hxx +++ b/configmgr/source/components.hxx @@ -65,12 +65,10 @@ class RootAccess; class Components: private boost::noncopyable { public: - static void initSingleton( + static Components & getSingleton( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context); - static Components & getSingleton(); - static bool allLocales(rtl::OUString const & locale); rtl::Reference< Node > resolvePathRepresentation( diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx index d636737a299e..999253118f11 100644 --- a/configmgr/source/configurationprovider.cxx +++ b/configmgr/source/configurationprovider.cxx @@ -275,8 +275,7 @@ Service::createInstanceWithArguments( static_cast< cppu::OWeakObject * >(this)); } osl::MutexGuard guard(lock); - Components::initSingleton(context_); - Components & components = Components::getSingleton(); + Components & components = Components::getSingleton(context_); rtl::Reference< RootAccess > root( new RootAccess(components, nodepath, locale, update)); if (root->isValue()) { @@ -387,8 +386,7 @@ void Service::flushModifications() const { Components * components; { osl::MutexGuard guard(lock); - Components::initSingleton(context_); - components = &Components::getSingleton(); + components = &Components::getSingleton(context_); } components->flushModifications(); } diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx index 73074aa7c338..258765158aa3 100644 --- a/configmgr/source/update.cxx +++ b/configmgr/source/update.cxx @@ -71,7 +71,11 @@ class Service: private boost::noncopyable { public: - Service() {} + Service(css::uno::Reference< css::uno::XComponentContext > const context): + context_(context) + { + OSL_ASSERT(context.is()); + } private: virtual ~Service() {} @@ -92,6 +96,8 @@ private: css::uno::Sequence< rtl::OUString > const & includedPaths, css::uno::Sequence< rtl::OUString > const & excludedPaths) throw (css::uno::RuntimeException); + + css::uno::Reference< css::uno::XComponentContext > context_; }; void Service::insertExtensionXcsFile( @@ -99,7 +105,7 @@ void Service::insertExtensionXcsFile( throw (css::uno::RuntimeException) { osl::MutexGuard g(lock); - Components::getSingleton().insertExtensionXcsFile(shared, fileUri); + Components::getSingleton(context_).insertExtensionXcsFile(shared, fileUri); } void Service::insertExtensionXcuFile( @@ -109,10 +115,10 @@ void Service::insertExtensionXcuFile( Broadcaster bc; { osl::MutexGuard g(lock); + Components & components = Components::getSingleton(context_); Modifications mods; - Components::getSingleton().insertExtensionXcuFile( - shared, fileUri, &mods); - Components::getSingleton().initGlobalBroadcaster( + components.insertExtensionXcuFile(shared, fileUri, &mods); + components.initGlobalBroadcaster( mods, rtl::Reference< RootAccess >(), &bc); } bc.send(); @@ -124,9 +130,10 @@ void Service::removeExtensionXcuFile(rtl::OUString const & fileUri) Broadcaster bc; { osl::MutexGuard g(lock); + Components & components = Components::getSingleton(context_); Modifications mods; - Components::getSingleton().removeExtensionXcuFile(fileUri, &mods); - Components::getSingleton().initGlobalBroadcaster( + components.removeExtensionXcuFile(fileUri, &mods); + components.initGlobalBroadcaster( mods, rtl::Reference< RootAccess >(), &bc); } bc.send(); @@ -141,10 +148,11 @@ void Service::insertModificationXcuFile( Broadcaster bc; { osl::MutexGuard g(lock); + Components & components = Components::getSingleton(context_); Modifications mods; - Components::getSingleton().insertModificationXcuFile( + components.insertModificationXcuFile( fileUri, seqToSet(includedPaths), seqToSet(excludedPaths), &mods); - Components::getSingleton().initGlobalBroadcaster( + components.initGlobalBroadcaster( mods, rtl::Reference< RootAccess >(), &bc); } bc.send(); @@ -153,9 +161,9 @@ void Service::insertModificationXcuFile( } css::uno::Reference< css::uno::XInterface > create( - css::uno::Reference< css::uno::XComponentContext > const &) + css::uno::Reference< css::uno::XComponentContext > const & context) { - return static_cast< cppu::OWeakObject * >(new Service); + return static_cast< cppu::OWeakObject * >(new Service(context)); } rtl::OUString getImplementationName() { From 9640687d784626529912225efae4a8df49f94748 Mon Sep 17 00:00:00 2001 From: sj Date: Fri, 29 Oct 2010 13:23:16 +0200 Subject: [PATCH 212/279] fixed build problem --- xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index a5de333ee9f6..92aa1ce17140 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -115,7 +115,7 @@ void XMLGraphicsDefaultStyle::SetDefaults() ((nUPD == 300) && (nBuild <= 9535)) || ((nUPD > 300) && (nUPD <= 330)) - ) + ) ) bWordWrapDefault = sal_False; xDefaults->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextWordWrap" ) ), Any( bWordWrapDefault ) ); From 4f40fd2727a826d5d0b06617e5179829d66df5d2 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 29 Oct 2010 15:36:30 +0200 Subject: [PATCH 213/279] CWS gnumake2: resolve conflicts and make sources buildable on Linux --- basic/prj/d.lst | 35 +----------------- framework/Library_fwe.mk | 1 + framework/Library_fwi.mk | 1 - framework/Package_inc.mk | 1 + .../framelistanalyzer.hxx | 4 +- framework/prj/build.lst | 26 ------------- framework/prj/d.lst | 22 +---------- framework/source/dispatch/closedispatcher.cxx | 2 +- .../source/dispatch/startmoduledispatcher.cxx | 2 +- .../classes/framelistanalyzer.cxx | 2 +- framework/source/loadenv/loadenv.cxx | 2 +- framework/source/services/frame.cxx | 2 +- framework/util/makefile.mk | 27 +------------- linguistic/prj/d.lst | 6 +-- sfx2/Library_sfx2.mk | 1 - sfx2/inc/sfx2/viewfac.hxx | 13 ------- sfx2/inc/sfx2/viewsh.hxx | 9 ----- sfx2/prj/build.lst | 31 +--------------- sfx2/source/appl/sfxhelp.cxx | 4 -- sfx2/source/view/viewfac.cxx | 8 ---- sfx2/source/view/viewfrm.cxx | 6 --- svx/source/form/filtnav.src | 31 ---------------- .../sdr/contact/viewcontactofsdrpage.cxx | 4 +- .../transform/XMLFilterRegistration.cxx | 37 ------------------- 24 files changed, 18 insertions(+), 259 deletions(-) rename framework/inc/{classes => framework}/framelistanalyzer.hxx (99%) rename framework/source/{fwi => fwe}/classes/framelistanalyzer.cxx (99%) diff --git a/basic/prj/d.lst b/basic/prj/d.lst index 52f4afe902c0..41d1a59550f0 100644 --- a/basic/prj/d.lst +++ b/basic/prj/d.lst @@ -24,39 +24,6 @@ mkdir: %_DEST%\inc%_EXT%\basic ..\inc\basic\*.hrc %_DEST%\inc%_EXT%\basic\*.hrc ..\inc\basic\*.h %_DEST%\inc%_EXT%\basic\*.h -<<<<<<< local -======= -..\inc\basic\sbdef.hxx %_DEST%\inc%_EXT%\basic\sbdef.hxx -..\inc\basic\sbmod.hxx %_DEST%\inc%_EXT%\basic\sbmod.hxx -..\inc\basic\sbjsmod.hxx %_DEST%\inc%_EXT%\basic\sbjsmod.hxx -..\inc\basic\sbmeth.hxx %_DEST%\inc%_EXT%\basic\sbmeth.hxx -..\inc\basic\sbprop.hxx %_DEST%\inc%_EXT%\basic\sbprop.hxx -..\inc\basic\sbstar.hxx %_DEST%\inc%_EXT%\basic\sbstar.hxx -..\inc\basic\sbuno.hxx %_DEST%\inc%_EXT%\basic\sbuno.hxx -..\inc\basic\basmgr.hxx %_DEST%\inc%_EXT%\basic\basmgr.hxx -..\inc\basic\sberrors.hxx %_DEST%\inc%_EXT%\basic\sberrors.hxx -..\inc\basic\basrdll.hxx %_DEST%\inc%_EXT%\basic\basrdll.hxx -..\inc\basic\sbstdobj.hxx %_DEST%\inc%_EXT%\basic\sbstdobj.hxx -..\inc\basic\process.hxx %_DEST%\inc%_EXT%\basic\process.hxx -..\inc\basic\mybasic.hxx %_DEST%\inc%_EXT%\basic\mybasic.hxx -..\inc\basic\testtool.hxx %_DEST%\inc%_EXT%\basic\testtool.hxx -..\inc\basic\basicrt.hxx %_DEST%\inc%_EXT%\basic\basicrt.hxx -..\inc\basic\dispdefs.hxx %_DEST%\inc%_EXT%\basic\dispdefs.hxx -..\inc\basic\ttstrhlp.hxx %_DEST%\inc%_EXT%\basic\ttstrhlp.hxx - -..\inc\basic\sbx.hxx %_DEST%\inc%_EXT%\basic\sbx.hxx -..\inc\basic\sbxcore.hxx %_DEST%\inc%_EXT%\basic\sbxcore.hxx -..\inc\basic\sbxdef.hxx %_DEST%\inc%_EXT%\basic\sbxdef.hxx -..\inc\basic\sbxform.hxx %_DEST%\inc%_EXT%\basic\sbxform.hxx -..\inc\basic\sbxmeth.hxx %_DEST%\inc%_EXT%\basic\sbxmeth.hxx -..\inc\basic\sbxobj.hxx %_DEST%\inc%_EXT%\basic\sbxobj.hxx -..\inc\basic\sbxprop.hxx %_DEST%\inc%_EXT%\basic\sbxprop.hxx -..\inc\basic\sbxvar.hxx %_DEST%\inc%_EXT%\basic\sbxvar.hxx -..\inc\basic\sbxbase.hxx %_DEST%\inc%_EXT%\basic\sbxbase.hxx -..\inc\basic\sbxfac.hxx %_DEST%\inc%_EXT%\basic\sbxfac.hxx -..\inc\basic\sbxmstrm.hxx %_DEST%\inc%_EXT%\basic\sbxmstrm.hxx - -..\inc\basic\basicmanagerrepository.hxx %_DEST%\inc%_EXT%\basic\basicmanagerrepository.hxx ..\inc\modsizeexceeded.hxx %_DEST%\inc%_EXT%\basic\modsizeexceeded.hxx ..\%__SRC%\misc\sb.component %_DEST%\xml%_EXT%\sb.component ->>>>>>> other + diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk index a8bcd7d40bf4..9dd3643681b5 100644 --- a/framework/Library_fwe.mk +++ b/framework/Library_fwe.mk @@ -65,6 +65,7 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\ framework/source/fwe/classes/addonsoptions \ framework/source/fwe/classes/bmkmenu \ framework/source/fwe/classes/fwkresid \ + framework/source/fwe/classes/framelistanalyzer \ framework/source/fwe/classes/imagewrapper \ framework/source/fwe/classes/menuextensionsupplier \ framework/source/fwe/classes/rootactiontriggercontainer \ diff --git a/framework/Library_fwi.mk b/framework/Library_fwi.mk index e320e5cfbc9b..568f0a1eb22a 100644 --- a/framework/Library_fwi.mk +++ b/framework/Library_fwi.mk @@ -62,7 +62,6 @@ $(eval $(call gb_Library_add_linked_libs,fwi,\ $(eval $(call gb_Library_add_exception_objects,fwi,\ framework/source/fwi/classes/converter \ - framework/source/fwi/classes/framelistanalyzer \ framework/source/fwi/classes/propertysethelper \ framework/source/fwi/classes/protocolhandlercache \ framework/source/fwi/helper/mischelper \ diff --git a/framework/Package_inc.mk b/framework/Package_inc.mk index 8cb41e542265..adefc3ccbd56 100644 --- a/framework/Package_inc.mk +++ b/framework/Package_inc.mk @@ -33,6 +33,7 @@ $(eval $(call gb_Package_add_file,framework_inc,inc/framework/addonsoptions.hxx, $(eval $(call gb_Package_add_file,framework_inc,inc/framework/bmkmenu.hxx,framework/bmkmenu.hxx)) $(eval $(call gb_Package_add_file,framework_inc,inc/framework/configimporter.hxx,framework/configimporter.hxx)) $(eval $(call gb_Package_add_file,framework_inc,inc/framework/eventsconfiguration.hxx,framework/eventsconfiguration.hxx)) +$(eval $(call gb_Package_add_file,framework_inc,inc/framework/framelistanalyzer.hxx,framework/framelistanalyzer.hxx)) $(eval $(call gb_Package_add_file,framework_inc,inc/framework/imageproducer.hxx,framework/imageproducer.hxx)) $(eval $(call gb_Package_add_file,framework_inc,inc/framework/imagesconfiguration.hxx,framework/imagesconfiguration.hxx)) $(eval $(call gb_Package_add_file,framework_inc,inc/framework/interaction.hxx,framework/interaction.hxx)) diff --git a/framework/inc/classes/framelistanalyzer.hxx b/framework/inc/framework/framelistanalyzer.hxx similarity index 99% rename from framework/inc/classes/framelistanalyzer.hxx rename to framework/inc/framework/framelistanalyzer.hxx index 745eabafb73a..d6f2cd734237 100644 --- a/framework/inc/classes/framelistanalyzer.hxx +++ b/framework/inc/framework/framelistanalyzer.hxx @@ -34,7 +34,7 @@ //_______________________________________________ // other includes -#include +#include //_______________________________________________ // namespace @@ -54,7 +54,7 @@ namespace framework{ to switch into the backing mode, close the current active frame only or exit the whole application explicitly or implicitly. */ -class FWI_DLLPUBLIC FrameListAnalyzer +class FWE_DLLPUBLIC FrameListAnalyzer { //_______________________________________ // types diff --git a/framework/prj/build.lst b/framework/prj/build.lst index be5c4d4f5968..f409c6380db6 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,31 +1,6 @@ -<<<<<<< local fr framework : l10n svtools NULL fr framework usr1 - all fr_mkout NULL fr framework\prj nmake - all fr_all NULL -======= -fr framework : l10n svtools NULL -fr framework usr1 - all fr_mkout NULL -fr framework\inc nmake - all fr_inc NULL -fr framework\source\constant nmake - all fr_constant fr_inc NULL -fr framework\source\threadhelp nmake - all fr_threadhelp fr_constant fr_inc NULL -fr framework\source\loadenv nmake - all fr_loadenv fr_threadhelp fr_constant fr_inc NULL -fr framework\source\classes nmake - all fr_classes fr_threadhelp fr_constant fr_inc NULL -fr framework\source\jobs nmake - all fr_jobs fr_threadhelp fr_constant fr_inc NULL -fr framework\source\interaction nmake - all fr_interaction fr_threadhelp fr_constant fr_inc NULL -fr framework\source\helper nmake - all fr_helper fr_threadhelp fr_constant fr_inc NULL -fr framework\source\dispatch nmake - all fr_dispatch fr_threadhelp fr_constant fr_inc NULL -fr framework\source\services nmake - all fr_services fr_threadhelp fr_constant fr_inc NULL -fr framework\source\register nmake - all fr_register fr_threadhelp fr_constant fr_inc NULL -fr framework\source\recording nmake - all fr_recording fr_threadhelp fr_constant fr_inc NULL -fr framework\source\xml nmake - all fr_xml fr_threadhelp fr_inc NULL -fr framework\source\layoutmanager nmake - all fr_layoutmanager fr_threadhelp fr_inc NULL -fr framework\source\uielement nmake - all fr_uielement fr_threadhelp fr_inc NULL -fr framework\source\uifactory nmake - all fr_uifactory fr_threadhelp fr_inc NULL -fr framework\source\uiconfiguration nmake - all fr_uiconfiguration fr_threadhelp fr_inc NULL -fr framework\source\accelerators nmake - all fr_accelerators fr_threadhelp fr_inc NULL -fr framework\source\tabwin nmake - all fr_tabwin fr_threadhelp fr_inc NULL -fr framework\util nmake - all fr_util fr_constant fr_threadhelp fr_classes fr_loadenv fr_jobs fr_interaction fr_helper fr_dispatch fr_services fr_register fr_recording fr_layoutmanager fr_uielement fr_uifactory fr_xml fr_uiconfiguration fr_accelerators fr_tabwin NULL -fr framework\qa\unoapi nmake - all fr_qa_unoapi NULL # complex tests # fails on unxsoli4 @@ -60,4 +35,3 @@ fr framework\qa\unoapi nmake - all fr_qa_unoapi NULL # fr framework\qa\complex\path_settings nmake - all fr_qa_complex_path_settings NULL # fr framework\qa\complex\path_substitution nmake - all fr_qa_complex_path_substitution NULL ->>>>>>> other diff --git a/framework/prj/d.lst b/framework/prj/d.lst index acf00070496d..74a6a768d41b 100644 --- a/framework/prj/d.lst +++ b/framework/prj/d.lst @@ -25,29 +25,8 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar ..\%__SRC%\lib\ifwe.lib %_DEST%\lib%_EXT%\ifwe.lib ..\%__SRC%\lib\ifwi.lib %_DEST%\lib%_EXT%\ifwi.lib -<<<<<<< local ..\inc\framework/*.h %_DEST%\inc%_EXT%\framework\*.h ..\inc\framework/*.hxx %_DEST%\inc%_EXT%\framework\*.hxx -======= -..\inc\helper\imageproducer.hxx %_DEST%\inc%_EXT%\framework\imageproducer.hxx -..\inc\helper\acceleratorinfo.hxx %_DEST%\inc%_EXT%\framework\acceleratorinfo.hxx -..\inc\helper\actiontriggerhelper.hxx %_DEST%\inc%_EXT%\framework\actiontriggerhelper.hxx -..\inc\xml\menuconfiguration.hxx %_DEST%\inc%_EXT%\framework\menuconfiguration.hxx -..\inc\classes\bmkmenu.hxx %_DEST%\inc%_EXT%\framework\bmkmenu.hxx -..\inc\xml\toolboxconfiguration.hxx %_DEST%\inc%_EXT%\framework\toolboxconfiguration.hxx -..\inc\xml\statusbarconfiguration.hxx %_DEST%\inc%_EXT%\framework\statusbarconfiguration.hxx -..\inc\xml\eventsconfiguration.hxx %_DEST%\inc%_EXT%\framework\eventsconfiguration.hxx -..\inc\xml\imagesconfiguration.hxx %_DEST%\inc%_EXT%\framework\imagesconfiguration.hxx -..\inc\classes\addonsoptions.hxx %_DEST%\inc%_EXT%\framework\addonsoptions.hxx -..\inc\dispatch\interaction.hxx %_DEST%\inc%_EXT%\framework\interaction.hxx -..\inc\classes\addonmenu.hxx %_DEST%\inc%_EXT%\framework\addonmenu.hxx -..\inc\classes\sfxhelperfunctions.hxx %_DEST%\inc%_EXT%\framework\sfxhelperfunctions.hxx -..\inc\helper\configimporter.hxx %_DEST%\inc%_EXT%\framework\configimporter.hxx -..\inc\classes\menuextensionsupplier.hxx %_DEST%\inc%_EXT%\framework\menuextensionsupplier.hxx -..\inc\interaction\preventduplicateinteraction.hxx %_DEST%\inc%_EXT%\framework\preventduplicateinteraction.hxx -..\inc\helper\titlehelper.hxx %_DEST%\inc%_EXT%\framework\titlehelper.hxx -..\inc\classes\framelistanalyzer.hxx %_DEST%\inc%_EXT%\framework\framelistanalyzer.hxx ->>>>>>> other ..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml ..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml @@ -58,3 +37,4 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar ..\%__SRC%\misc\fwk.component %_DEST%\xml%_EXT%\fwk.component ..\%__SRC%\misc\fwl.component %_DEST%\xml%_EXT%\fwl.component ..\%__SRC%\misc\fwm.component %_DEST%\xml%_EXT%\fwm.component + diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index ee84de9d7dd4..57355eaa6398 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include diff --git a/framework/source/dispatch/startmoduledispatcher.cxx b/framework/source/dispatch/startmoduledispatcher.cxx index 40def3f98488..0e49b2818e56 100644 --- a/framework/source/dispatch/startmoduledispatcher.cxx +++ b/framework/source/dispatch/startmoduledispatcher.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/framework/source/fwi/classes/framelistanalyzer.cxx b/framework/source/fwe/classes/framelistanalyzer.cxx similarity index 99% rename from framework/source/fwi/classes/framelistanalyzer.cxx rename to framework/source/fwe/classes/framelistanalyzer.cxx index 22f019e78df5..1a33ebf91d7e 100644 --- a/framework/source/fwi/classes/framelistanalyzer.cxx +++ b/framework/source/fwe/classes/framelistanalyzer.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include "classes/framelistanalyzer.hxx" +#include "framework/framelistanalyzer.hxx" //_______________________________________________ // my own includes diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index d4fb22c4f7f8..cf37e1d8129f 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -34,7 +34,7 @@ #ifndef __FRAMEWORK_LOADENV_TARGETHELPER_HXX_ #include #endif -#include +#include #ifndef __FRAMEWORK_CONSTANT_FRAMELOADER_HXX_ #include diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index dfc6225b4572..a6567b218369 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index 10e3a614f5e1..6b7bf5937b00 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -45,7 +45,6 @@ SHL3USE_EXPORTS=name SHL4USE_EXPORTS=name SHL5USE_EXPORTS=name - # --- internal import ------------------------------------------------- LIB1TARGET= $(SLB)$/fwiobj.lib @@ -362,30 +361,6 @@ SHL5DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) .INCLUDE : target.mk -<<<<<<< local -======= -$(MISC)$/$(SHL1TARGET).flt: makefile.mk - @echo ------------------------------ - @echo Making: $@ - @echo _Impl>$@ - @echo WEP>>$@ - @echo m_pLoader>$@ - @echo _TI2>>$@ - @echo _TI3>>$@ - @echo LIBMAIN>>$@ - @echo LibMain>>$@ - @echo _STL::pair>>$@ - -$(MISC)$/$(SHL2TARGET).flt: makefile.mk - @echo ------------------------------ - @echo Making: $@ - @echo _Impl>$@ - @echo WEP>>$@ - @echo m_pLoader>$@ - @echo _TI2>>$@ - @echo LIBMAIN>>$@ - @echo LibMain>>$@ - ALLTAR : $(MISC)/fwk.component $(MISC)/fwl.component $(MISC)/fwm.component $(MISC)/fwk.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ @@ -405,4 +380,4 @@ $(MISC)/fwm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ $(XSLTPROC) --nonet --stringparam uri \ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL5TARGETN:f)' -o $@ \ $(SOLARENV)/bin/createcomponent.xslt fwm.component ->>>>>>> other + diff --git a/linguistic/prj/d.lst b/linguistic/prj/d.lst index 4b2e240ef2ef..03237f925764 100644 --- a/linguistic/prj/d.lst +++ b/linguistic/prj/d.lst @@ -7,9 +7,7 @@ ..\xml\*.xml %_DEST%\xml%_EXT%\*.xml mkdir: %_DEST%\inc%_EXT%\linguistic -<<<<<<< local ..\inc\linguistic\*.hxx %_DEST%\inc%_EXT%\linguistic\*.hxx -======= -..\inc\*.hxx %_DEST%\inc%_EXT%\linguistic\*.hxx + ..\%__SRC%\misc\lng.component %_DEST%\xml%_EXT%\lng.component ->>>>>>> other + diff --git a/sfx2/Library_sfx2.mk b/sfx2/Library_sfx2.mk index 3c607647b26f..fbe4fb4c5926 100644 --- a/sfx2/Library_sfx2.mk +++ b/sfx2/Library_sfx2.mk @@ -114,7 +114,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/appl/module \ sfx2/source/appl/newhelp \ sfx2/source/appl/opengrf \ - sfx2/source/appl/sfxdll \ sfx2/source/appl/sfxhelp \ sfx2/source/appl/sfxpicklist \ sfx2/source/appl/shutdownicon \ diff --git a/sfx2/inc/sfx2/viewfac.hxx b/sfx2/inc/sfx2/viewfac.hxx index cfe2ff0fb855..420a44440aae 100644 --- a/sfx2/inc/sfx2/viewfac.hxx +++ b/sfx2/inc/sfx2/viewfac.hxx @@ -30,9 +30,7 @@ #include "sal/config.h" #include "sfx2/dllapi.h" #include -#ifndef _RESID_HXX //autogen #include -#endif class SfxViewFrame; class SfxViewShell; @@ -45,20 +43,12 @@ typedef void (*SfxViewInit)(); class SFX2_DLLPUBLIC SfxViewFactory { public: -<<<<<<< local - SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, USHORT nOrdinal ); -======= SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, USHORT nOrdinal, const sal_Char* asciiViewName ); ->>>>>>> other ~SfxViewFactory(); SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh); void InitFactory(); -<<<<<<< local -======= - ->>>>>>> other USHORT GetOrdinal() const { return nOrd; } /// returns a legacy view name. This is "view" with an appended ordinal/ID. @@ -75,10 +65,7 @@ private: SfxViewCtor fnCreate; SfxViewInit fnInit; USHORT nOrd; -<<<<<<< local -======= const String m_sViewName; ->>>>>>> other }; #endif diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx index 22e873aea097..bbd627a39ad6 100644 --- a/sfx2/inc/sfx2/viewsh.hxx +++ b/sfx2/inc/sfx2/viewsh.hxx @@ -123,21 +123,13 @@ public: \ static SfxViewFactory&Factory() { return *pFactory; } \ static void InitFactory() -<<<<<<< local -#define SFX_IMPL_VIEWFACTORY(Class) \ -======= #define SFX_IMPL_NAMED_VIEWFACTORY(Class, AsciiViewName) \ ->>>>>>> other SfxViewFactory* Class::pFactory; \ SfxViewShell* __EXPORT Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView) \ { return new Class(pFrame, pOldView); } \ void Class::RegisterFactory( USHORT nPrio ) \ { \ -<<<<<<< local - pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio);\ -======= pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio,AsciiViewName);\ ->>>>>>> other InitFactory(); \ } \ void Class::InitFactory() @@ -388,4 +380,3 @@ inline SfxViewFrame* SfxViewShell::GetViewFrame() const #endif // #ifndef _SFXVIEWSH_HXX - diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index d3f687fbc4af..85763aab9258 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -1,38 +1,11 @@ sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL sf sfx2 usr1 - all sf_mkout NULL -<<<<<<< local sf sfx2\prj nmake - all sf_prj NULL -======= -sf sfx2\inc nmake - all sf_inc NULL -sf sfx2\prj get - all sf_prj NULL -sf sfx2\mac\res get - all sf_mres NULL -sf sfx2\source\inc get - all sf_sinc NULL -sf sfx2\sdi nmake - all sf_sdi NULL -sf sfx2\source\appl nmake - all sf_appl sf_sdi sf_inc NULL -sf sfx2\source\view nmake - all sf_view sf_sdi sf_inc NULL -sf sfx2\source\bastyp nmake - all sf_bast sf_sdi sf_inc NULL -sf sfx2\source\config nmake - all sf_cnfg sf_sdi sf_inc NULL -sf sfx2\source\control nmake - all sf_ctrl sf_sdi sf_inc NULL -sf sfx2\source\dialog nmake - all sf_dlg sf_sdi sf_inc NULL -sf sfx2\source\doc nmake - all sf_doc sf_sdi sf_inc NULL -sf sfx2\source\layout nmake - all sf_layout sf_sdi sf_inc NULL -sf sfx2\source\menu nmake - all sf_menu sf_sdi sf_inc NULL -sf sfx2\source\notify nmake - all sf_noti sf_sdi sf_inc NULL -sf sfx2\source\statbar nmake - all sf_sbar sf_sdi sf_inc NULL -sf sfx2\source\toolbox nmake - all sf_tbox sf_sdi sf_inc NULL -sf sfx2\source\inet nmake - all sf_inet sf_sdi sf_inc NULL -sf sfx2\source\explorer nmake - all sf_expl sf_sdi sf_inc NULL -sf sfx2\workben\custompanel nmake - all sf_wb_custompanel NULL -sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL -sf sfx2\qa\unoapi nmake - all sf_qa_unoapi NULL -sf sfx2\qa\cppunit nmake - all sf_qa_cppunit sf_util NULL ->>>>>>> other -<<<<<<< local -======= + # fails on unxsoli4 # sf sfx2\qa\complex\standalonedocumentinfo nmake - all sf_qa_complex_standalonedocumentinfo sf_util NULL # sf sfx2\qa\complex\framework nmake - all sf_qa_complex_framework sf_qa_complex_framework_dochelper NULL # sf sfx2\qa\complex\docinfo nmake - all sf_qa_complex_docinfo sf_util NULL ->>>>>>> other + diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 9c25006b611c..bab37281cb05 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -28,13 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -<<<<<<< local #include "sfx2/sfxhelp.hxx" -======= -#include "sfxhelp.hxx" #include ->>>>>>> other #include #include #include diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx index 85f7c7f3745d..3eed678420dd 100644 --- a/sfx2/source/view/viewfac.cxx +++ b/sfx2/source/view/viewfac.cxx @@ -70,20 +70,12 @@ String SfxViewFactory::GetAPIViewName() const // CTOR / DTOR ----------------------------------------------------------- -<<<<<<< local -SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, USHORT nOrdinal ): -======= SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, USHORT nOrdinal, const sal_Char* asciiViewName ): ->>>>>>> other fnCreate(fnC), fnInit(fnI), -<<<<<<< local - nOrd(nOrdinal) -======= nOrd(nOrdinal), m_sViewName( String::CreateFromAscii( asciiViewName ) ) ->>>>>>> other { DBG_CTOR(SfxViewFactory, 0); } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 55521b026fdc..dbadbc54ebd4 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -92,12 +92,9 @@ #include #include #include -<<<<<<< local #include #include -======= #include ->>>>>>> other #include @@ -112,9 +109,6 @@ using ::com::sun::star::document::XViewDataSupplier; using ::com::sun::star::container::XIndexContainer; namespace css = ::com::sun::star; -#ifndef GCC -#endif - // wg. ViewFrame::Current #include "appdata.hxx" #include diff --git a/svx/source/form/filtnav.src b/svx/source/form/filtnav.src index 5a0fd1cb273c..3d9eff3de4e8 100644 --- a/svx/source/form/filtnav.src +++ b/svx/source/form/filtnav.src @@ -26,13 +26,9 @@ ************************************************************************/ #include -<<<<<<< local #include "svx/fmresids.hrc" -======= -#include "fmresids.hrc" #include "fmhelp.hrc" ->>>>>>> other Menu RID_FM_FILTER_MENU { ItemList = @@ -64,30 +60,3 @@ Menu RID_FM_FILTER_MENU }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index ad65b647001e..abe30839aa43 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -45,8 +45,8 @@ #include #include #include -#include "svdstr.hrc" -#include "svdglob.hxx" +#include +#include #include #include diff --git a/xmloff/source/transform/XMLFilterRegistration.cxx b/xmloff/source/transform/XMLFilterRegistration.cxx index fb67c6d32be5..f201474015fc 100644 --- a/xmloff/source/transform/XMLFilterRegistration.cxx +++ b/xmloff/source/transform/XMLFilterRegistration.cxx @@ -146,44 +146,7 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -<<<<<<< local -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) -{ - if( pRegistryKey ) - { - try - { - uno::Reference< registry::XRegistryKey > xMasterKey( reinterpret_cast< registry::XRegistryKey * >( pRegistryKey ) ); - - const ServiceDescriptor* pDescriptor = getServiceDescriptors(); - while ( pDescriptor->getImplementationName ) - { - ::rtl::OUString sNewKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - sNewKeyName += pDescriptor->getImplementationName(); - sNewKeyName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - uno::Reference< registry::XRegistryKey > xNewKey( xMasterKey->createKey( sNewKeyName ) ); - - uno::Sequence< ::rtl::OUString > aServices = pDescriptor->getSupportedServiceNames(); - const ::rtl::OUString* pServices = aServices.getConstArray(); - for( sal_Int32 i = 0; i < aServices.getLength(); ++i, ++pServices ) - xNewKey->createKey( *pServices); - - ++pDescriptor; - } - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "xof::component_writeInfo: InvalidRegistryException!" ); - } - } - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) -======= -void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) ->>>>>>> other { void * pRet = NULL; if( pServiceManager ) From d0b76582f778a739980d747c861e06af0774541b Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Fri, 29 Oct 2010 16:02:46 +0200 Subject: [PATCH 214/279] dv22:#i112913# Use only one file with version info --- desktop/util/ooverinfo2.rc | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) mode change 100644 => 100755 desktop/util/ooverinfo2.rc diff --git a/desktop/util/ooverinfo2.rc b/desktop/util/ooverinfo2.rc old mode 100644 new mode 100755 index 8bc39767f04a..17af6818551e --- a/desktop/util/ooverinfo2.rc +++ b/desktop/util/ooverinfo2.rc @@ -25,21 +25,7 @@ * *************************************************************************/ -#define VERSION 3 -#define SUBVERSION 3 -//#define VERVARIANT 0 -// .0 + VER_CONCEPT -// .100 + VER_ALPHA -// .200 + VER_BETA -// .300 + VER_GAMMA -// .500 + VER_FINAL -//#define VER_CONCEPT 0 -//#define VER_BETA 6 -#define VER_FINAL 0 - -#define VER_DAY 1 -#define VER_MONTH 1 -#define VER_YEAR 2010 +#include "version.hrc" // ----------------------------------------------------------------------- From 998b68d0b3a5f7d94decf7ea2aa9473c04178902 Mon Sep 17 00:00:00 2001 From: Juergen Schmidt Date: Mon, 1 Nov 2010 11:07:18 +0100 Subject: [PATCH 215/279] jsc331: i115237: add missing not operator --- basic/source/sbx/sbxbool.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx index 3216e401b707..c3ed0d09b134 100644 --- a/basic/source/sbx/sbxbool.cxx +++ b/basic/source/sbx/sbxbool.cxx @@ -91,7 +91,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p ) { if( p->pOUString->equalsIgnoreAsciiCase( SbxRes( STRING_TRUE ) ) ) nRes = SbxTRUE; - else if( p->pOUString->equalsIgnoreAsciiCase( SbxRes( STRING_FALSE ) ) ) + else if( !p->pOUString->equalsIgnoreAsciiCase( SbxRes( STRING_FALSE ) ) ) { // Jetzt kann es noch in eine Zahl konvertierbar sein BOOL bError = TRUE; From 98a64d26435b2e9a40e158f17f22641423e10183 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 11:34:47 +0100 Subject: [PATCH 216/279] dba34a: s_propertyMetaData should not be a global static, as it uses other global statics for initialization, which makes proper initialization dependent on module-load-order --- xmloff/source/forms/elementimport.cxx | 8 +++++ xmloff/source/forms/property_meta_data.cxx | 40 +++++++++++++--------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 1f1c28d579cf..eb6dd0965e76 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -880,6 +880,7 @@ namespace xmloff ++aValueProps ) { + bool bSuccess = false; switch (aValueProps->Handle) { case PROPID_VALUE: @@ -889,6 +890,7 @@ namespace xmloff if (!bRetrievedValues) { getValuePropertyNames(m_eElementType, nClassId, pCurrentValueProperty, pValueProperty); + ENSURE_OR_BREAK( pCurrentValueProperty && pValueProperty, "OControlImport::StartElement: illegal value property names!" ); bRetrievedValues = sal_True; } OSL_ENSURE((PROPID_VALUE != aValueProps->Handle) || pValueProperty, @@ -901,6 +903,7 @@ namespace xmloff aValueProps->Name = ::rtl::OUString::createFromAscii(pValueProperty); else aValueProps->Name = ::rtl::OUString::createFromAscii(pCurrentValueProperty); + bSuccess = true; } break; case PROPID_MIN_VALUE: @@ -910,6 +913,7 @@ namespace xmloff if (!bRetrievedValueLimits) { getValueLimitPropertyNames(nClassId, pMinValueProperty, pMaxValueProperty); + ENSURE_OR_BREAK( pMinValueProperty && pMaxValueProperty, "OControlImport::StartElement: illegal value limit property names!" ); bRetrievedValueLimits = sal_True; } OSL_ENSURE((PROPID_MIN_VALUE != aValueProps->Handle) || pMinValueProperty, @@ -922,10 +926,14 @@ namespace xmloff aValueProps->Name = ::rtl::OUString::createFromAscii(pMinValueProperty); else aValueProps->Name = ::rtl::OUString::createFromAscii(pMaxValueProperty); + bSuccess = true; } break; } + if ( !bSuccess ) + continue; + // translate the value implTranslateValueProperty(m_xInfo, *aValueProps); // add the property to the base class' array diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx index a907112dbe58..7f058d14b9b7 100755 --- a/xmloff/source/forms/property_meta_data.cxx +++ b/xmloff/source/forms/property_meta_data.cxx @@ -51,19 +51,26 @@ namespace xmloff { namespace metadata //= property meta data //================================================================================================================== //------------------------------------------------------------------------------------------------------------------ - static const PropertyDescription s_propertyMetaData[] = + namespace { - FORM_SINGLE_PROPERTY( DATE_MIN, XML_MIN_VALUE ), - FORM_SINGLE_PROPERTY( DATE_MAX, XML_MAX_VALUE ), - FORM_SINGLE_PROPERTY( DEFAULT_DATE, XML_VALUE ), - FORM_SINGLE_PROPERTY( DATE, XML_CURRENT_VALUE ), - FORM_SINGLE_PROPERTY( TIME_MIN, XML_MIN_VALUE ), - FORM_SINGLE_PROPERTY( TIME_MAX, XML_MAX_VALUE ), - FORM_SINGLE_PROPERTY( DEFAULT_TIME, XML_VALUE ), - FORM_SINGLE_PROPERTY( TIME, XML_CURRENT_VALUE ), + const PropertyDescription* lcl_getPropertyMetaData() + { + static const PropertyDescription s_propertyMetaData[] = + { + FORM_SINGLE_PROPERTY( DATE_MIN, XML_MIN_VALUE ), + FORM_SINGLE_PROPERTY( DATE_MAX, XML_MAX_VALUE ), + FORM_SINGLE_PROPERTY( DEFAULT_DATE, XML_VALUE ), + FORM_SINGLE_PROPERTY( DATE, XML_CURRENT_VALUE ), + FORM_SINGLE_PROPERTY( TIME_MIN, XML_MIN_VALUE ), + FORM_SINGLE_PROPERTY( TIME_MAX, XML_MAX_VALUE ), + FORM_SINGLE_PROPERTY( DEFAULT_TIME, XML_VALUE ), + FORM_SINGLE_PROPERTY( TIME, XML_CURRENT_VALUE ), - PropertyDescription() - }; + PropertyDescription() + }; + return s_propertyMetaData; + } + } //------------------------------------------------------------------------------------------------------------------ namespace @@ -85,7 +92,7 @@ namespace xmloff { namespace metadata static DescriptionsByName s_propertyDescriptionsByName; if ( s_propertyDescriptionsByName.empty() ) { - const PropertyDescription* desc = s_propertyMetaData; + const PropertyDescription* desc = lcl_getPropertyMetaData(); while ( desc->propertyName.getLength() != 0 ) { s_propertyDescriptionsByName[ desc->propertyName ] = desc; @@ -105,7 +112,7 @@ namespace xmloff { namespace metadata static IndexedPropertyGroups s_indexedPropertyGroups; if ( s_indexedPropertyGroups.empty() ) { - const PropertyDescription* desc = s_propertyMetaData; + const PropertyDescription* desc = lcl_getPropertyMetaData(); while ( desc->propertyName.getLength() != 0 ) { if ( desc->propertyGroup != NO_GROUP ) @@ -126,7 +133,7 @@ namespace xmloff { namespace metadata static ReverseTokenLookup s_reverseTokenLookup; if ( s_reverseTokenLookup.empty() ) { - const PropertyDescription* desc = s_propertyMetaData; + const PropertyDescription* desc = lcl_getPropertyMetaData(); while ( desc->propertyName.getLength() != 0 ) { s_reverseTokenLookup[ token::GetXMLToken( desc->attribute.attributeToken ) ] = desc->attribute.attributeToken; @@ -155,7 +162,7 @@ namespace xmloff { namespace metadata static AttributeGroups s_attributeGroups; if ( s_attributeGroups.empty() ) { - const PropertyDescription* desc = s_propertyMetaData; + const PropertyDescription* desc = lcl_getPropertyMetaData(); while ( desc->propertyName.getLength() != 0 ) { if ( desc->propertyGroup != NO_GROUP ) @@ -176,7 +183,7 @@ namespace xmloff { namespace metadata static AttributesWithoutGroup s_attributesWithoutGroup; if ( s_attributesWithoutGroup.empty() ) { - const PropertyDescription* desc = s_propertyMetaData; + const PropertyDescription* desc = lcl_getPropertyMetaData(); while ( desc->propertyName.getLength() != 0 ) { if ( desc->propertyGroup == NO_GROUP ) @@ -248,7 +255,6 @@ namespace xmloff { namespace metadata AttributeDescription getAttributeDescription( const sal_uInt16 i_namespacePrefix, const ::rtl::OUString& i_attributeName ) { AttributeDescription attribute; - const ReverseTokenLookup& rTokenLookup( getReverseTokenLookup() ); const ReverseTokenLookup::const_iterator pos = rTokenLookup.find( i_attributeName ); if ( pos != rTokenLookup.end() ) From c070ae66b97fc0662e97a96048741b0f56a5157a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 12:05:01 +0100 Subject: [PATCH 217/279] dba34a: during #i115312#: getFastPropertyValue( FILTER ): don't deliver an invalid filter when one predicate string cannot be generated, instead just skip this particular string --- svx/source/form/formcontroller.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index b2c79c9cd9bc..8bc10453b55f 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -865,15 +865,13 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons if ( aFilter.getLength() ) aFilter.appendAscii( " OR " ); - aFilter.appendAscii( "( " ); + ::rtl::OUStringBuffer aRowFilter; for ( FmFilterRow::const_iterator condition = rRow.begin(); condition != rRow.end(); ++condition ) { // get the field of the controls map Reference< XControl > xControl( condition->first, UNO_QUERY_THROW ); Reference< XPropertySet > xModelProps( xControl->getModel(), UNO_QUERY_THROW ); Reference< XPropertySet > xField( xModelProps->getPropertyValue( FM_PROP_BOUNDFIELD ), UNO_QUERY_THROW ); - if ( condition != rRow.begin() ) - aFilter.appendAscii( " AND " ); sal_Int32 nDataType = DataType::OTHER; OSL_VERIFY( xField->getPropertyValue( FM_PROP_FIELDTYPE ) >>= nDataType ); @@ -897,10 +895,17 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons { // don't use a parse context here, we need it unlocalized xParseNode->parseNodeToStr( sCriteria, xConnection, NULL ); - aFilter.append( sCriteria ); + if ( condition != rRow.begin() ) + aRowFilter.appendAscii( " AND " ); + aRowFilter.append( sCriteria ); } } - aFilter.appendAscii( " )" ); + if ( aRowFilter.getLength() > 0 ) + { + aFilter.appendAscii( "( " ); + aFilter.append( aRowFilter.makeStringAndClear() ); + aFilter.appendAscii( " )" ); + } } } catch( const Exception& ) From 4451fc307f9bb4bc0e989a9cb4a7788c9cf1e4fa Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 12:37:19 +0100 Subject: [PATCH 218/279] dba34a: #i115312# partly reverted the fix for issue #i114403#: don't quote string literals in the form controller, this is the responsibility of the filter control, which can decide much better in which situations this is necessary --- svx/source/form/formcontroller.cxx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 8bc10453b55f..09ee74afaf85 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -873,23 +873,11 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons Reference< XPropertySet > xModelProps( xControl->getModel(), UNO_QUERY_THROW ); Reference< XPropertySet > xField( xModelProps->getPropertyValue( FM_PROP_BOUNDFIELD ), UNO_QUERY_THROW ); - sal_Int32 nDataType = DataType::OTHER; - OSL_VERIFY( xField->getPropertyValue( FM_PROP_FIELDTYPE ) >>= nDataType ); - const bool isTextColumn = ( ( nDataType == DataType::CHAR ) - || ( nDataType == DataType::VARCHAR ) - || ( nDataType == DataType::LONGVARCHAR ) - ); - - ::rtl::OUStringBuffer aPredicateValue; - if ( isTextColumn ) - aPredicateValue.append( sal_Unicode( '\'' ) ); - aPredicateValue.append( condition->second ); - if ( isTextColumn ) - aPredicateValue.append( sal_Unicode( '\'' ) ); + ::rtl::OUString sFilterValue( condition->second ); ::rtl::OUString sErrorMsg, sCriteria; const ::rtl::Reference< ISQLParseNode > xParseNode = - predicateTree( sErrorMsg, aPredicateValue.makeStringAndClear(), xFormatter, xField ); + predicateTree( sErrorMsg, sFilterValue, xFormatter, xField ); OSL_ENSURE( xParseNode.is(), "FormController::getFastPropertyValue: could not parse the field value predicate!" ); if ( xParseNode.is() ) { From 11e03877e276f9ffc1b2d849f9684303f722852e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 12:50:56 +0100 Subject: [PATCH 219/279] dba34a: properly append the OR when retrieving the filter clause --- svx/source/form/formcontroller.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 09ee74afaf85..f43233ae08ba 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -862,9 +862,6 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons if ( rRow.empty() ) continue; - if ( aFilter.getLength() ) - aFilter.appendAscii( " OR " ); - ::rtl::OUStringBuffer aRowFilter; for ( FmFilterRow::const_iterator condition = rRow.begin(); condition != rRow.end(); ++condition ) { @@ -890,6 +887,9 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons } if ( aRowFilter.getLength() > 0 ) { + if ( aFilter.getLength() ) + aFilter.appendAscii( " OR " ); + aFilter.appendAscii( "( " ); aFilter.append( aRowFilter.makeStringAndClear() ); aFilter.appendAscii( " )" ); From 560e5132f606b1fcd790e3cf97d665cec8c442fc Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 1 Nov 2010 13:29:26 +0100 Subject: [PATCH 220/279] dockingwindows: #i112595# Fixed problem related to changes for better layouting. Further code rework --- framework/source/layoutmanager/helpers.cxx | 8 +- framework/source/layoutmanager/helpers.hxx | 4 +- .../source/layoutmanager/layoutmanager.cxx | 405 +++++++----------- .../layoutmanager/toolbarlayoutmanager.cxx | 166 +++---- .../layoutmanager/toolbarlayoutmanager.hxx | 1 + 5 files changed, 251 insertions(+), 333 deletions(-) diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index d9da9f6ddefe..476ea4072acc 100755 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -77,9 +77,9 @@ bool isDefaultPos( const ::Point& aPos ) return (( aPos.X() == SAL_MAX_INT32 ) && ( aPos.Y() == SAL_MAX_INT32 )); } -bool isReverseOrderDockingArea( const sal_Int16 nDockArea ) +bool isReverseOrderDockingArea( const sal_Int32 nDockArea ) { - ui::DockingArea eDockArea = (ui::DockingArea)nDockArea; + ui::DockingArea eDockArea = static_cast< ui::DockingArea >( nDockArea ); return (( eDockArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) || ( eDockArea == ui::DockingArea_DOCKINGAREA_RIGHT )); } @@ -97,9 +97,9 @@ bool isHorizontalDockingArea( const ui::DockingArea& nDockingArea ) ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM )); } -bool isHorizontalDockingArea( const sal_Int16 nDockArea ) +bool isHorizontalDockingArea( const sal_Int32 nDockArea ) { - return isHorizontalDockingArea((ui::DockingArea)nDockArea ); + return isHorizontalDockingArea(static_cast< ui::DockingArea >( nDockArea )); } ::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow ) diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx index f2d5f1de15d5..d4e9ce313d0e 100755 --- a/framework/source/layoutmanager/helpers.hxx +++ b/framework/source/layoutmanager/helpers.hxx @@ -65,8 +65,8 @@ bool hasDefaultPosValue( const ::Point& aPos ); bool isDefaultPos( const ::com::sun::star::awt::Point& aPos ); bool isDefaultPos( const ::Point& aPos ); bool isToolboxHorizontalAligned( ToolBox* pToolBox ); -bool isReverseOrderDockingArea( const sal_Int16 nDockArea ); -bool isHorizontalDockingArea( const sal_Int16 nDockArea ); +bool isReverseOrderDockingArea( const sal_Int32 nDockArea ); +bool isHorizontalDockingArea( const sal_Int32 nDockArea ); bool isHorizontalDockingArea( const ::com::sun::star::ui::DockingArea& nDockArea ); ::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow ); ToolBox* getToolboxPtr( Window* pWindow ); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 7706acf09047..d609e05c8fe5 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -// my own includes +// my own includes #include #include #include @@ -47,7 +47,7 @@ #include #include -// interface includes +// interface includes #include #include #include @@ -71,7 +71,7 @@ #include #include -// other includes +// other includes #include #include #include @@ -91,7 +91,7 @@ #include #include -// using namespace +// using namespace using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -123,21 +123,21 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM , m_xURLTransformer( xServiceManager->createInstance( SERVICENAME_URLTRANSFORMER ), UNO_QUERY ) , m_xDisplayAccess( xServiceManager->createInstance( SERVICENAME_DISPLAYACCESS ), UNO_QUERY ) , m_nLockCount( 0 ) - , m_bActive( sal_False ) - , m_bInplaceMenuSet( sal_False ) - , m_bDockingInProgress( sal_False ) - , m_bMenuVisible( sal_True ) - , m_bComponentAttached( sal_False ) - , m_bDoLayout( sal_False ) - , m_bVisible( sal_True ) - , m_bParentWindowVisible( sal_False ) - , m_bMustDoLayout( sal_True ) - , m_bAutomaticToolbars( sal_True ) - , m_bStoreWindowState( sal_False ) + , m_bActive( false ) + , m_bInplaceMenuSet( false ) + , m_bDockingInProgress( false ) + , m_bMenuVisible( true ) + , m_bComponentAttached( false ) + , m_bDoLayout( false ) + , m_bVisible( true ) + , m_bParentWindowVisible( false ) + , m_bMustDoLayout( true ) + , m_bAutomaticToolbars( true ) + , m_bStoreWindowState( false ) , m_bHideCurrentUI( false ) - , m_bGlobalSettings( sal_False ) + , m_bGlobalSettings( false ) , m_bPreserveContentSize( false ) - , m_bMenuBarCloser( sal_False ) + , m_bMenuBarCloser( false ) , m_pInplaceMenuBar( NULL ) , m_xModuleManager( Reference< XModuleManager >( xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY )) , m_xUIElementFactoryManager( Reference< ui::XUIElementFactory >( @@ -200,9 +200,9 @@ void LayoutManager::impl_clearUpMenuBar() SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); if ( pSysWindow ) - { + { MenuBar* pSetMenuBar = 0; - if ( m_xInplaceMenuBar.is() ) + if ( m_xInplaceMenuBar.is() ) pSetMenuBar = (MenuBar *)m_pInplaceMenuBar->GetMenuBar(); else { @@ -215,12 +215,8 @@ void LayoutManager::impl_clearUpMenuBar() { xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar; } - catch ( beans::UnknownPropertyException ) - { - } - catch ( lang::WrappedTargetException ) - { - } + catch ( beans::UnknownPropertyException ) {} + catch ( lang::WrappedTargetException ) {} } VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); @@ -228,9 +224,9 @@ void LayoutManager::impl_clearUpMenuBar() pSetMenuBar = (MenuBar*)pAwtMenuBar->GetMenu(); } - MenuBar* pTopMenuBar = pSysWindow->GetMenuBar(); - if ( pSetMenuBar == pTopMenuBar ) - pSysWindow->SetMenuBar( 0 ); + MenuBar* pTopMenuBar = pSysWindow->GetMenuBar(); + if ( pSetMenuBar == pTopMenuBar ) + pSysWindow->SetMenuBar( 0 ); } } @@ -292,9 +288,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) { aModuleIdentifier = m_xModuleManager->identify( Reference< XInterface >( xFrame, UNO_QUERY ) ); } - catch( Exception& ) - { - } + catch( Exception& ) {} if ( aModuleIdentifier.getLength() && aOldModuleIdentifier != aModuleIdentifier ) { @@ -310,9 +304,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) // Remove listener to old module ui configuration manager xModuleCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } - catch ( Exception& ) - { - } + catch ( Exception& ) {} } try @@ -322,9 +314,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) if ( xModuleCfgMgr.is() ) xModuleCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } - catch ( Exception& ) - { - } + catch ( Exception& ) {} try { @@ -332,12 +322,8 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) if ( xPersistentWindowStateSupplier.is() ) xPersistentWindowStateSupplier->getByName( aModuleIdentifier ) >>= xPersistentWindowState; } - catch ( NoSuchElementException& ) - { - } - catch ( WrappedTargetException& ) - { - } + catch ( NoSuchElementException& ) {} + catch ( WrappedTargetException& ) {} } xModel = impl_getModelFromFrame( xFrame ); @@ -353,9 +339,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) // Remove listener to old ui configuration manager xDocCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } - catch ( Exception& ) - { - } + catch ( Exception& ) {} } try @@ -364,9 +348,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) if ( xDocCfgMgr.is() ) xDocCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } - catch ( Exception& ) - { - } + catch ( Exception& ) {} } } } @@ -380,9 +362,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) xModuleCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } - catch ( Exception& ) - { - } + catch ( Exception& ) {} } if ( xDocCfgMgr.is() ) @@ -392,9 +372,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) xDocCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } - catch ( Exception& ) - { - } + catch ( Exception& ) {} } // Release references to our configuration managers as we currently don't have @@ -421,22 +399,22 @@ void LayoutManager::implts_reset( sal_Bool bAttached ) aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - // reset/notify toolbar layout manager - if ( pToolbarManager ) + // reset/notify toolbar layout manager + if ( pToolbarManager ) { - if ( bAttached ) - { - pToolbarManager->attach( xFrame, xModCfgMgr, xDokCfgMgr, xPersistentWindowState ); - uno::Reference< awt::XWindowPeer > xParent( xContainerWindow, UNO_QUERY ); - pToolbarManager->setParentWindow( xParent ); - if ( bAutomaticToolbars ) - pToolbarManager->createStaticToolbars(); - } - else - { - pToolbarManager->reset(); - implts_destroyElements(); - } + if ( bAttached ) + { + pToolbarManager->attach( xFrame, xModCfgMgr, xDokCfgMgr, xPersistentWindowState ); + uno::Reference< awt::XWindowPeer > xParent( xContainerWindow, UNO_QUERY ); + pToolbarManager->setParentWindow( xParent ); + if ( bAutomaticToolbars ) + pToolbarManager->createStaticToolbars(); + } + else + { + pToolbarManager->reset(); + implts_destroyElements(); + } } } @@ -517,46 +495,6 @@ UIElement& LayoutManager::impl_findElement( const rtl::OUString& aName ) return aEmptyElement; } -void LayoutManager::implts_writeNewStateData( const rtl::OUString aName, const Reference< awt::XWindow >& xWindow ) -{ - awt::Rectangle aPos; - awt::Size aSize; - sal_Bool bVisible( sal_False ); - sal_Bool bFloating( sal_True ); - - if ( xWindow.is() ) - { - Reference< awt::XDockableWindow > xDockWindow( xWindow, UNO_QUERY ); - if ( xDockWindow.is() ) - bFloating = xDockWindow->isFloating(); - - Reference< awt::XWindow2 > xWindow2( xWindow, UNO_QUERY ); - if( xWindow2.is() ) - { - aPos = xWindow2->getPosSize(); - aSize = xWindow2->getOutputSize(); // always use output size for consistency - bVisible = xWindow2->isVisible(); - } - } - - WriteGuard aWriteLock( m_aLock ); - UIElement& rUIElement = impl_findElement( aName ); - if ( rUIElement.m_xUIElement.is() && xWindow.is() ) - { - rUIElement.m_bVisible = bVisible; - rUIElement.m_bFloating = bFloating; - if ( bFloating ) - { - rUIElement.m_aFloatingData.m_aPos = ::Point( aPos.X, aPos.Y ); - rUIElement.m_aFloatingData.m_aSize = ::Size( aSize.Width, aSize.Height ); - } - } - - implts_writeWindowStateData( aName, rUIElement ); - - aWriteLock.unlock(); -} - sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, UIElement& rElementData ) { sal_Bool bGetSettingsState( sal_False ); @@ -692,9 +630,7 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, return sal_True; } - catch ( NoSuchElementException& ) - { - } + catch ( NoSuchElementException& ) {} } return sal_False; @@ -723,9 +659,7 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con // Non-configurable elements should at least store their dimension/position bPersistent = sal_True; } - catch ( lang::WrappedTargetException ) - { - } + catch ( lang::WrappedTargetException ) {} } if ( bPersistent && xPersistentWindowState.is() ) @@ -774,9 +708,7 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con xInsert->insertByName( aName, makeAny( aWindowState )); } } - catch ( Exception& ) - { - } + catch ( Exception& ) {} } // Reset flag @@ -814,12 +746,8 @@ Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString { xUIElement = m_xUIElementFactoryManager->createUIElement( aName, aPropSeq ); } - catch ( NoSuchElementException& ) - { - } - catch ( IllegalArgumentException& ) - { - } + catch ( NoSuchElementException& ) {} + catch ( IllegalArgumentException& ) {} return xUIElement; } @@ -844,14 +772,13 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) std::vector< Reference< awt::XWindow > > aWinVector; WriteGuard aWriteLock( m_aLock ); - bool bOld( m_bDoLayout ); Reference< XUIElement > xMenuBar( m_xMenuBar, UNO_QUERY ); Reference< awt::XWindow > xContainerWindow( m_xContainerWindow ); Reference< XComponent > xInplaceMenuBar( m_xInplaceMenuBar ); MenuBarManager* pInplaceMenuBar( m_pInplaceMenuBar ); - m_bDoLayout = sal_True; aWriteLock.unlock(); + bool bMustDoLayout(false); if (( xMenuBar.is() || xInplaceMenuBar.is() ) && xContainerWindow.is() ) { vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -872,36 +799,29 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) pSysWindow->SetMenuBar( pMenuBar ); else pSysWindow->SetMenuBar( 0 ); + bMustDoLayout = true; } } // Hide/show the statusbar according to bSetVisible if ( bSetVisible ) - implts_showStatusBar(); + bMustDoLayout = !implts_showStatusBar(); else - implts_hideStatusBar(); + bMustDoLayout = !implts_hideStatusBar(); - if ( !bOld ) + aWriteLock.lock(); + uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); + aWriteLock.unlock(); + + if ( pToolbarManager ) { - aWriteLock.lock(); - m_bDoLayout = sal_False; - aWriteLock.unlock(); + pToolbarManager->setVisible( bSetVisible ); + bMustDoLayout = pToolbarManager->isLayoutDirty(); } - if ( bSetVisible ) - { - uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager ); - if ( xThis.is() ) - m_pToolbarManager->setVisible(bSetVisible); + if ( bMustDoLayout ) implts_doLayout_notify( sal_False ); - } - else - { - aWriteLock.lock(); - m_aDockingArea = awt::Rectangle(); - m_bMustDoLayout = sal_True; - aWriteLock.unlock(); - } } void LayoutManager::implts_setCurrentUIVisibility( sal_Bool bShow ) @@ -990,7 +910,7 @@ void LayoutManager::implts_createProgressBar() { Reference< awt::XWindow > xStatusBarWindow = pWrapper->getStatusBar(); - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pStatusBarWnd = VCLUnoHelper::GetWindow( xStatusBarWindow ); if ( !pStatusBarWnd ) { @@ -1080,7 +1000,7 @@ void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Siz if ( xWindow.is() ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pParentWindow = VCLUnoHelper::GetWindow( xContainerWindow ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pParentWindow && ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR )) @@ -1168,8 +1088,7 @@ sal_Bool LayoutManager::implts_hideProgressBar() vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() && - ( bHideStatusBar || bInternalStatusBar )) + if ( pWindow && pWindow->IsVisible() && ( bHideStatusBar || bInternalStatusBar )) { implts_setOffset( 0 ); pWindow->Hide(); @@ -1192,7 +1111,7 @@ sal_Bool LayoutManager::implts_showStatusBar( sal_Bool bStoreState ) { Reference< awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && !pWindow->IsVisible() ) { @@ -1218,7 +1137,7 @@ sal_Bool LayoutManager::implts_hideStatusBar( sal_Bool bStoreState ) { Reference< awt::XWindow > xWindow( xStatusBar->getRealInterface(), UNO_QUERY ); - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && pWindow->IsVisible() ) { @@ -1272,9 +1191,9 @@ throw (uno::RuntimeException) SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); if ( pSysWindow ) - pSysWindow->SetMenuBar( pMenuBar ); + pSysWindow->SetMenuBar( pMenuBar ); - m_bInplaceMenuSet = sal_True; + m_bInplaceMenuSet = sal_True; m_xInplaceMenuBar = Reference< XComponent >( (OWeakObject *)m_pInplaceMenuBar, UNO_QUERY ); } @@ -1295,15 +1214,15 @@ throw (uno::RuntimeException) // if ( m_xMenuBar.is() && if ( m_xContainerWindow.is() ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, m_xMenuBar.get() ); SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); if ( pSysWindow ) { if ( pMenuBarWrapper ) - pSysWindow->SetMenuBar( (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar() ); - else - pSysWindow->SetMenuBar( 0 ); + pSysWindow->SetMenuBar( (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar() ); + else + pSysWindow->SetMenuBar( 0 ); } } @@ -1402,7 +1321,7 @@ throw ( RuntimeException ) if ( !xDockingAreaAcceptor.is() ) m_aAsyncLayoutTimer.Stop(); - // Remove listener from old docking area acceptor + // Remove listener from old docking area acceptor if ( m_xDockingAreaAcceptor.is() ) { Reference< awt::XWindow > xWindow( m_xDockingAreaAcceptor->getContainerWindow() ); @@ -1411,7 +1330,7 @@ throw ( RuntimeException ) m_aDockingArea = awt::Rectangle(); if ( pToolbarManager ) - pToolbarManager->reset(); + pToolbarManager->reset(); Window* pContainerWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pContainerWindow ) @@ -1457,7 +1376,7 @@ throw ( RuntimeException ) if ( xDockingAreaAcceptor.is() ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); // Add layout manager as listener to get notifications about toolbar button activties Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); @@ -1503,18 +1422,13 @@ void LayoutManager::implts_reparentChildWindows() { xStatusBarWindow = Reference< awt::XWindow >( aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY ); } - catch ( RuntimeException& ) - { - throw; - } - catch ( Exception& ) - { - } + catch ( RuntimeException& ) { throw; } + catch ( Exception& ) {} } if ( xStatusBarWindow.is() ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); Window* pWindow = VCLUnoHelper::GetWindow( xStatusBarWindow ); if ( pWindow && pContainerWindow ) @@ -1534,13 +1448,20 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) { long nResult( 1 ); - ReadGuard aReadLock( m_aLock ); - uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager ); - ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); - aReadLock.unlock(); + if ( pEvent && pEvent->ISA( VclWindowEvent )) + { + Window* pWindow = static_cast< VclWindowEvent* >(pEvent)->GetWindow(); + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) + { + ReadGuard aReadLock( m_aLock ); + uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager( m_pToolbarManager ); + aReadLock.unlock(); - if ( pToolbarManager ) - nResult = pToolbarManager->childWindowEvent( pEvent ); + if ( pToolbarManager ) + nResult = pToolbarManager->childWindowEvent( pEvent ); + } + } return nResult; } @@ -1579,12 +1500,11 @@ throw (RuntimeException) bNotify = m_pToolbarManager->createToolbar( aName ); bMustBeLayouted = m_pToolbarManager->isLayoutDirty(); } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) { // PB 2004-12-15 #i38743# don't create a menubar if frame isn't top if ( !bInPlaceMenu && !m_xMenuBar.is() && implts_isFrameOrWindowTop( xFrame )) - { + { m_xMenuBar = implts_createElement( aName ); if ( m_xMenuBar.is() ) { @@ -1592,7 +1512,7 @@ throw (RuntimeException) SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); if ( pSysWindow ) - { + { Reference< awt::XMenuBar > xMenuBar; Reference< XPropertySet > xPropSet( m_xMenuBar, UNO_QUERY ); @@ -1602,27 +1522,23 @@ throw (RuntimeException) { xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar; } - catch ( beans::UnknownPropertyException ) - { - } - catch ( lang::WrappedTargetException ) - { - } + catch ( beans::UnknownPropertyException ) {} + catch ( lang::WrappedTargetException ) {} } if ( xMenuBar.is() ) { - VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); - if ( pAwtMenuBar ) + VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); + if ( pAwtMenuBar ) { MenuBar* pMenuBar = (MenuBar*)pAwtMenuBar->GetMenu(); if ( pMenuBar ) { - pSysWindow->SetMenuBar( pMenuBar ); + pSysWindow->SetMenuBar( pMenuBar ); pMenuBar->SetDisplayable( m_bMenuVisible ); - if ( m_bMenuVisible ) + if ( m_bMenuVisible ) bNotify = sal_True; - implts_updateMenuBarClose(); + implts_updateMenuBarClose(); } } } @@ -1636,9 +1552,7 @@ throw (RuntimeException) implts_createStatusBar( aName ); bNotify = sal_True; } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) && - implts_isFrameOrWindowTop(xFrame) ) + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) && implts_isFrameOrWindowTop(xFrame) ) { implts_createProgressBar(); bNotify = sal_True; @@ -1657,7 +1571,7 @@ throw (RuntimeException) // The docking window is created by a factory method located in the sfx2 library. // CreateDockingWindow( xFrame, aElementName ); - } + } } if ( bMustBeLayouted ) @@ -1765,8 +1679,8 @@ throw (uno::RuntimeException) implts_readStatusBarState( rResourceURL ); if ( m_aStatusBarElement.m_bVisible && !m_aStatusBarElement.m_bMasterHide ) { - aWriteLock.unlock(); - createElement( rResourceURL ); + aWriteLock.unlock(); + createElement( rResourceURL ); // There are some situation where we are not able to create an element. // Therefore we have to check the reference before further action. @@ -1775,7 +1689,7 @@ throw (uno::RuntimeException) if ( xUIElement.is() ) { // we need VCL here to pass special flags to Show() - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Reference< awt::XWindow > xWindow( xUIElement->getRealInterface(), UNO_QUERY ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow ) @@ -1796,8 +1710,7 @@ throw (uno::RuntimeException) bNotify = true; bDoLayout = true; } - else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR ) && - m_bParentWindowVisible && m_bVisible ) + else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR ) && m_bVisible ) { bool bComponentAttached( m_aModuleIdentifier.getLength() > 0 ); uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY ); @@ -1806,9 +1719,9 @@ throw (uno::RuntimeException) if ( pToolbarManager && bComponentAttached ) { - bNotify = pToolbarManager->requestToolbar( rResourceURL ); + bNotify = pToolbarManager->requestToolbar( rResourceURL ); bDoLayout = true; - } + } } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) { @@ -1931,9 +1844,9 @@ throw (RuntimeException) if ( pToolbarManager ) { - bNotify = pToolbarManager->showToolbar( aName ); + bNotify = pToolbarManager->showToolbar( aName ); bMustLayout = pToolbarManager->isLayoutDirty(); - } + } } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) { @@ -2079,7 +1992,7 @@ throw (RuntimeException) { bResult = pToolbarManager->dockAllToolbars(); if ( pToolbarManager->isLayoutDirty() ) - doLayout(); + doLayout(); } return bResult; } @@ -2096,10 +2009,10 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - { + { bResult = pToolbarManager->floatToolbar( aName ); if ( pToolbarManager->isLayoutDirty() ) - doLayout(); + doLayout(); } } return bResult; @@ -2117,10 +2030,10 @@ throw (uno::RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - { + { bResult = pToolbarManager->lockToolbar( aName ); if ( pToolbarManager->isLayoutDirty() ) - doLayout(); + doLayout(); } } return bResult; @@ -2138,10 +2051,10 @@ throw (uno::RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - { + { bResult = pToolbarManager->unlockToolbar( aName ); if ( pToolbarManager->isLayoutDirty() ) - doLayout(); + doLayout(); } } return bResult; @@ -2158,10 +2071,10 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - { + { pToolbarManager->setToolbarSize( aName, aSize ); if ( pToolbarManager->isLayoutDirty() ) - doLayout(); + doLayout(); } } } @@ -2177,10 +2090,10 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - { + { pToolbarManager->setToolbarPos( aName, aPos ); if ( pToolbarManager->isLayoutDirty() ) - doLayout(); + doLayout(); } } } @@ -2196,11 +2109,11 @@ throw (RuntimeException) aReadLock.unlock(); if ( pToolbarManager ) - { + { pToolbarManager->setToolbarPosSize( aName, aPos, aSize ); if ( pToolbarManager->isLayoutDirty() ) - doLayout(); - } + doLayout(); + } } } @@ -2402,15 +2315,15 @@ throw (RuntimeException) // conform to documentation: unlock with lock count == 0 means force a layout WriteGuard aWriteLock( m_aLock ); - if ( bDoLayout ) - m_aAsyncLayoutTimer.Stop(); - aWriteLock.unlock(); + if ( bDoLayout ) + m_aAsyncLayoutTimer.Stop(); + aWriteLock.unlock(); Any a( nLockCount ); implts_notifyListeners( frame::LayoutManagerEvents::UNLOCK, a ); if ( bDoLayout ) - implts_doLayout_notify( sal_True ); + implts_doLayout_notify( sal_True ); } void SAL_CALL LayoutManager::doLayout() @@ -2462,15 +2375,13 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ { bLayouted = sal_True; - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteGuard( m_aLock ); m_bDoLayout = sal_True; aWriteGuard.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - awt::Rectangle aDockSpace( implts_calcDockingAreaSizes() ); - awt::Rectangle aBorderSpace( aDockSpace ); - sal_Bool bGotRequestedBorderSpace( sal_True ); + awt::Rectangle aDockSpace( implts_calcDockingAreaSizes() ); + awt::Rectangle aBorderSpace( aDockSpace ); + sal_Bool bGotRequestedBorderSpace( sal_True ); // We have to add the height of a possible status bar aBorderSpace.Height += implts_getStatusBarSize().Height(); @@ -2545,11 +2456,9 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ xDockingAreaAcceptor->setDockingAreaSpace( aBorderSpace ); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aWriteGuard.lock(); m_bDoLayout = sal_False; aWriteGuard.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } } @@ -2559,14 +2468,12 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_ sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContainerSize, const awt::Point& rComponentPos ) { - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); Reference< awt::XWindow > xContainerWindow = m_xContainerWindow; Reference< awt::XTopWindow2 > xContainerTopWindow = m_xContainerTopWindow; Reference< awt::XWindow > xComponentWindow = m_xFrame->getComponentWindow(); Reference< container::XIndexAccess > xDisplayAccess = m_xDisplayAccess; aReadLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ // calculate the maximum size we have for the container window awt::Rectangle aWorkArea; @@ -2685,7 +2592,7 @@ void LayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangle& /*rB } //--------------------------------------------------------------------------------------------------------- -// XMenuCloser +// XMenuCloser //--------------------------------------------------------------------------------------------------------- void LayoutManager::implts_updateMenuBarClose() { @@ -2696,12 +2603,12 @@ void LayoutManager::implts_updateMenuBarClose() if ( xContainerWindow.is() ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); SystemWindow* pSysWindow = getTopSystemWindow( xContainerWindow ); if ( pSysWindow ) - { - MenuBar* pMenuBar = pSysWindow->GetMenuBar(); + { + MenuBar* pMenuBar = pSysWindow->GetMenuBar(); if ( pMenuBar ) { // TODO remove link on FALSE ?! @@ -2817,7 +2724,7 @@ void LayoutManager::implts_notifyListeners( short nEvent, uno::Any aInfoParam ) } //--------------------------------------------------------------------------------------------------------- -// XWindowListener +// XWindowListener //--------------------------------------------------------------------------------------------------------- void SAL_CALL LayoutManager::windowResized( const awt::WindowEvent& aEvent ) throw( uno::RuntimeException ) @@ -2940,7 +2847,7 @@ IMPL_LINK( LayoutManager, AsyncLayoutHdl, Timer *, EMPTYARG ) } //--------------------------------------------------------------------------------------------------------- -// XFrameActionListener +// XFrameActionListener //--------------------------------------------------------------------------------------------------------- void SAL_CALL LayoutManager::frameAction( const FrameActionEvent& aEvent ) throw ( RuntimeException ) @@ -3020,9 +2927,7 @@ throw( RuntimeException ) xModuleCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } - catch ( Exception& ) - { - } + catch ( Exception& ) {} } if ( m_xDocCfgMgr.is() ) @@ -3033,9 +2938,7 @@ throw( RuntimeException ) xDocCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } - catch ( Exception& ) - { - } + catch ( Exception& ) {} } m_xDocCfgMgr.clear(); @@ -3043,7 +2946,7 @@ throw( RuntimeException ) m_xFrame.clear(); delete m_pGlobalSettings; m_pGlobalSettings = 0; - m_xDockingAreaAcceptor = Reference< ui::XDockingAreaAcceptor >(); + m_xDockingAreaAcceptor = Reference< ui::XDockingAreaAcceptor >(); bDisposeAndClear = sal_True; } @@ -3053,10 +2956,10 @@ throw( RuntimeException ) uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; if ( pToolbarManager ) - { - uno::Reference< awt::XWindowPeer > aEmptyWindowPeer; + { + uno::Reference< awt::XWindowPeer > aEmptyWindowPeer; pToolbarManager->setParentWindow( aEmptyWindowPeer ); - } + } impl_clearUpMenuBar(); m_xMenuBar.clear(); if ( m_xInplaceMenuBar.is() ) @@ -3194,7 +3097,7 @@ void SAL_CALL LayoutManager::elementRemoved( const ui::ConfigurationEvent& Event } // No settings anymore, element must be destroyed - if ( xContainerWindow.is() && bNoSettings ) + if ( xContainerWindow.is() && bNoSettings ) { if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" )) { @@ -3234,13 +3137,13 @@ void SAL_CALL LayoutManager::elementReplaced( const ui::ConfigurationEvent& Even parseResourceURL( Event.ResourceURL, aElementType, aElementName ); if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) - { - if ( xToolbarManager.is() ) + { + if ( xToolbarManager.is() ) { xToolbarManager->elementReplaced( Event ); bRefreshLayout = pToolbarManager->isLayoutDirty(); } - } + } else { Reference< XUIElement > xUIElement = implts_findElement( Event.ResourceURL ); @@ -3269,7 +3172,7 @@ void SAL_CALL LayoutManager::elementReplaced( const ui::ConfigurationEvent& Even } //--------------------------------------------------------------------------------------------------------- -// OPropertySetHelper +// OPropertySetHelper //--------------------------------------------------------------------------------------------------------- sal_Bool SAL_CALL LayoutManager::convertFastPropertyValue( Any& aConvertedValue, Any& aOldValue, diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 7837cc9154d3..e9d118a211f3 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -247,7 +247,7 @@ void ToolbarLayoutManager::doLayout(const ::Size& aContainerSize) const sal_uInt32 nCount = aRowColumnsWindowData.size(); for ( sal_uInt32 j = 0; j < nCount; ++j ) { - sal_uInt32 nIndex = bReverse ? nCount-j-1 : j; + sal_uInt32 nIndex = bReverse ? nCount-j-1 : j; implts_calcWindowPosSizeOnSingleRowColumn( i, nOffset, aRowColumnsWindowData[nIndex], aContainerSize ); nOffset += aRowColumnsWindowData[j].nStaticSize; } @@ -300,10 +300,10 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea() uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( xWindow.is() && xDockWindow.is() ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow && pWindow->IsVisible() && !xDockWindow->isFloating() ) + if ( pWindow && !xDockWindow->isFloating() && pConstIter->m_bVisible ) { awt::Rectangle aPosSize = xWindow->getPosSize(); if ( pConstIter->m_aDockedData.m_nDockedArea != nCurrDockingArea ) @@ -317,7 +317,7 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea() if ( pConstIter->m_aDockedData.m_nDockedArea == nCurrDockingArea ) { - if ( isHorizontalDockingArea( pConstIter->m_aDockedData.m_nDockedArea )) + if ( isHorizontalDockingArea( pConstIter->m_aDockedData.m_nDockedArea )) { if ( pConstIter->m_aDockedData.m_aPos.Y() > nCurrPos ) { @@ -435,7 +435,7 @@ bool ToolbarLayoutManager::requestToolbar( const ::rtl::OUString& rResourceURL ) bool bCreateOrShowToolbar( aRequestedToolbar.m_bVisible & !aRequestedToolbar.m_bMasterHide ); uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow, uno::UNO_QUERY ); if ( xContainerWindow.is() && aRequestedToolbar.m_bFloating ) - bCreateOrShowToolbar &= xContainerWindow->isActive(); + bCreateOrShowToolbar &= bool( xContainerWindow->isActive()); if ( bCreateOrShowToolbar ) bNotify = ( bMustCallCreate ) ? createToolbar( rResourceURL ) : showToolbar( rResourceURL ); @@ -471,10 +471,10 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) { xComponent.set( pIter->m_xUIElement, uno::UNO_QUERY ); if ( bMustBeDestroyed ) - pIter->m_xUIElement.clear(); + pIter->m_xUIElement.clear(); else pIter->m_bVisible = false; - break; + break; } } aWriteLock.unlock(); @@ -486,7 +486,7 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( bMustBeDestroyed ) - { + { try { if ( xWindow.is() ) @@ -505,7 +505,7 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) } else { - if ( xWindow.is() ) + if ( xWindow.is() ) xWindow->setVisible( sal_False ); bNotify = true; } @@ -534,9 +534,9 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL ) void ToolbarLayoutManager::destroyToolbars() { UIElementVector aUIElementVector; + implts_getUIElementVectorCopy( aUIElementVector ); WriteGuard aWriteLock( m_aLock ); - aUIElementVector = m_aUIElements; m_aUIElements.clear(); m_bLayoutDirty = true; aWriteLock.unlock(); @@ -559,7 +559,7 @@ bool ToolbarLayoutManager::showToolbar( const ::rtl::OUString& rResourceURL ) if ( pWindow ) { if ( !aUIElement.m_bFloating ) - implts_setLayoutDirty(); + implts_setLayoutDirty(); else pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); @@ -582,7 +582,7 @@ bool ToolbarLayoutManager::hideToolbar( const ::rtl::OUString& rResourceURL ) { pWindow->Show( FALSE ); if ( !aUIElement.m_bFloating ) - implts_setLayoutDirty(); + implts_setLayoutDirty(); aUIElement.m_bVisible = false; implts_writeWindowStateData( aUIElement ); @@ -595,24 +595,22 @@ bool ToolbarLayoutManager::hideToolbar( const ::rtl::OUString& rResourceURL ) void ToolbarLayoutManager::refreshToolbarsVisibility() { - ReadGuard aReadLock( m_aLock ); - UIElementVector aUIElementVector = m_aUIElements; - aReadLock.unlock(); - - UIElementVector::iterator pIter; + UIElementVector aUIElementVector; + implts_getUIElementVectorCopy( aUIElementVector ); vos::OGuard aGuard( Application::GetSolarMutex() ); + UIElementVector::iterator pIter; for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) { Window* pWindow = getWindowFromXUIElement( pIter->m_xUIElement ); if ( pWindow ) { if ( pIter->m_bVisible && !pIter->m_bMasterHide ) - { - if ( pIter->m_bFloating ) + { + if ( pIter->m_bFloating ) pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); else - implts_setLayoutDirty(); + implts_setLayoutDirty(); } else pWindow->Show( FALSE ); @@ -622,12 +620,11 @@ void ToolbarLayoutManager::refreshToolbarsVisibility() void ToolbarLayoutManager::setFloatingToolbarsVisibility( bool bVisible ) { - WriteGuard aWriteLock( m_aLock ); - UIElementVector aUIElementVector( m_aUIElements ); - aWriteLock.unlock(); + UIElementVector aUIElementVector; + implts_getUIElementVectorCopy( aUIElementVector ); - UIElementVector::iterator pIter; vos::OGuard aGuard( Application::GetSolarMutex() ); + UIElementVector::iterator pIter; for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) { Window* pWindow = getWindowFromXUIElement( pIter->m_xUIElement ); @@ -646,31 +643,32 @@ void ToolbarLayoutManager::setFloatingToolbarsVisibility( bool bVisible ) void ToolbarLayoutManager::setVisible( bool bVisible ) { - WriteGuard aWriteLock( m_aLock ); - UIElementVector aUIElementVector( m_aUIElements ); - bool bLayoutInProgress = m_bLayoutInProgress; - m_bLayoutDirty = true; - m_bLayoutInProgress = true; - aWriteLock.unlock(); - - UIElementVector::iterator pIter; + UIElementVector aUIElementVector; + implts_getUIElementVectorCopy( aUIElementVector ); vos::OGuard aGuard( Application::GetSolarMutex() ); + UIElementVector::iterator pIter; for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) { - bool bToolbarVisible = pIter->m_bVisible; - pIter->m_bMasterHide = !bVisible; Window* pWindow = getWindowFromXUIElement( pIter->m_xUIElement ); - if ( pWindow && pIter->m_bFloating ) - pWindow->Show(bVisible & bToolbarVisible, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + if ( pWindow ) + { + bool bSetVisible( pIter->m_bVisible & bVisible ); + if ( !bSetVisible ) + pWindow->Hide(); + else + { + if ( pIter->m_bFloating ) + pWindow->Show(true, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + else + implts_setLayoutDirty(); + } + } } if ( !bVisible ) resetDockingArea(); - - aWriteLock.lock(); - m_bLayoutInProgress = bLayoutInProgress; } bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& rResourceURL, ui::DockingArea eDockingArea, const awt::Point& aPos ) @@ -681,11 +679,11 @@ bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& rResourceURL, ui: { try { - uno::Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); - uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY ); if ( xDockWindow.is() ) { - if ( eDockingArea != ui::DockingArea_DOCKINGAREA_DEFAULT ) + if ( eDockingArea != ui::DockingArea_DOCKINGAREA_DEFAULT ) aUIElement.m_aDockedData.m_nDockedArea = sal_Int16( eDockingArea ); if ( !isDefaultPos( aPos )) @@ -744,7 +742,7 @@ bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& rResourceURL, ui: implts_sortUIElements(); if ( aUIElement.m_bVisible ) - implts_setLayoutDirty(); + implts_setLayoutDirty(); } return true; } @@ -798,7 +796,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) ToolBox* pToolBox = getToolboxPtr( ((VclWindowEvent*)pEvent)->GetWindow() ); if ( pToolBox ) - { + { aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); USHORT nId = pToolBox->GetCurItemId(); if ( nId > 0 ) @@ -815,7 +813,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) { if ( pIter->m_xUIElement.is() ) { - uno::Reference< ui::XUIFunctionListener > xListener( pIter->m_xUIElement, uno::UNO_QUERY ); + uno::Reference< ui::XUIFunctionListener > xListener( pIter->m_xUIElement, uno::UNO_QUERY ); if ( xListener.is() ) aListenerArray.push_back( xListener ); } @@ -834,16 +832,22 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) else if ( pEvent->GetId() == VCLEVENT_TOOLBOX_FORMATCHANGED ) { ToolBox* pToolBox = getToolboxPtr( ((VclWindowEvent*)pEvent)->GetWindow() ); - if ( pToolBox ) { ::rtl::OUString aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); - if ( aToolbarName.getLength() > 0 ) { - implts_setLayoutDirty(); - m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); - } + ::rtl::OUStringBuffer aBuf(100); + aBuf.appendAscii( "private:resource/toolbar/" ); + aBuf.append( aToolbarName ); + + UIElement aToolbar = implts_findToolbar( aBuf.makeStringAndClear() ); + if ( aToolbar.m_xUIElement.is() && !aToolbar.m_bFloating ) + { + implts_setLayoutDirty(); + m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); + } + } } } } @@ -854,10 +858,10 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) void ToolbarLayoutManager::resetDockingArea() { ReadGuard aReadLock( m_aLock ); - uno::Reference< awt::XWindow > xTopDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP]; - uno::Reference< awt::XWindow > xLeftDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT]; - uno::Reference< awt::XWindow > xRightDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT]; - uno::Reference< awt::XWindow > xBottomDockingWindow = m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM]; + uno::Reference< awt::XWindow > xTopDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); + uno::Reference< awt::XWindow > xLeftDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] ); + uno::Reference< awt::XWindow > xRightDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] ); + uno::Reference< awt::XWindow > xBottomDockingWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); aReadLock.unlock(); if ( xTopDockingWindow.is() ) @@ -1238,6 +1242,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b { uno::Reference< ui::XUIElement > xUIElement = implts_createElement( aName ); bool bVisible( false ); + bool bFloating( false ); if ( xUIElement.is() ) { rUIElement = xUIElement; @@ -1268,6 +1273,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b implts_setElementData( rElement, xDockWindow ); rElement.m_xUIElement = xUIElement; bVisible = rElement.m_bVisible; + bFloating = rElement.m_bFloating; } else { @@ -1277,6 +1283,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b implts_setElementData( aNewToolbar, xDockWindow ); implts_insertToolbar( aNewToolbar ); bVisible = aNewToolbar.m_bVisible; + bFloating = rElement.m_bFloating; } aWriteLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -1295,12 +1302,13 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b else pToolbar->SetMenuType( nMenuType | TOOLBOX_MENUTYPE_CUSTOMIZE ); } + bNotify = true; + + implts_sortUIElements(); + + if ( bVisible && !bFloating ) + implts_setLayoutDirty(); } - - implts_sortUIElements(); - - if ( bVisible ) - implts_setLayoutDirty(); } } @@ -1452,8 +1460,8 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno if ( pWindow ) { vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( !bShowElement ) - pWindow->Hide(); + if ( !bShowElement ) + pWindow->Hide(); } } } @@ -1799,7 +1807,7 @@ uno::Reference< awt::XWindow > ToolbarLayoutManager::implts_getXWindow( const :: { if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) { - xWindow = uno::Reference< awt::XWindow >( pIter->m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + xWindow = uno::Reference< awt::XWindow >( pIter->m_xUIElement->getRealInterface(), uno::UNO_QUERY ); break; } } @@ -1929,6 +1937,12 @@ void ToolbarLayoutManager::implts_sortUIElements() aWriteLock.unlock(); } +void ToolbarLayoutManager::implts_getUIElementVectorCopy( UIElementVector& rCopy ) +{ + ReadGuard aReadLock( m_aLock ); + rCopy = m_aUIElements; +} + ::Size ToolbarLayoutManager::implts_getTopBottomDockingAreaSizes() { ::Size aSize; @@ -2588,7 +2602,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( if (( aMinSize.Width() > 0 ) && ( aMinSize.Height() > 0 )) { - if ( isHorizontalDockingArea( nDockingArea )) + if ( isHorizontalDockingArea( nDockingArea )) { sal_Int32 nMaxReducation = ( rWinRect.Width - aMinSize.Width() ); if ( nMaxReducation >= -nDiff ) @@ -3222,7 +3236,7 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( if (( pIter->m_aDockedData.m_nDockedArea == sal_Int16( eDockingArea )) && ( pIter->m_aName != rUIElement.m_aName )) { // Don't change toolbars without a valid docking position! - if ( isDefaultPos( pIter->m_aDockedData.m_aPos )) + if ( isDefaultPos( pIter->m_aDockedData.m_aPos )) continue; sal_Int32 nWindowRowCol = ( bHorzDockingArea ) ? pIter->m_aDockedData.m_aPos.Y() : pIter->m_aDockedData.m_aPos.X(); @@ -3330,7 +3344,7 @@ throw( uno::RuntimeException ) } else { - implts_setLayoutDirty(); + implts_setLayoutDirty(); bNotify = true; } } @@ -3708,7 +3722,7 @@ throw (uno::RuntimeException) Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { - ToolBox* pToolBox = static_cast< ToolBox *>( pWindow ); + ToolBox* pToolBox = static_cast< ToolBox *>( pWindow ); aUIDockingElement.m_aFloatingData.m_aPos = pToolBox->GetPosPixel(); aUIDockingElement.m_aFloatingData.m_aSize = pToolBox->GetOutputSizePixel(); aUIDockingElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines(); @@ -3794,7 +3808,7 @@ throw (uno::RuntimeException) } else { - if ( isDefaultPos( aUIDockingElement.m_aDockedData.m_aPos )) + if ( isDefaultPos( aUIDockingElement.m_aDockedData.m_aPos )) { // Docking on its default position without a preset position - // we have to find a good place for it. @@ -3831,7 +3845,7 @@ throw (uno::RuntimeException) implts_sortUIElements(); implts_setLayoutDirty(); - aReadLock.lock(); + aReadLock.lock(); ILayoutNotifications* pParentLayouter( m_pParentLayouter ); aReadLock.unlock(); @@ -3870,7 +3884,7 @@ throw (uno::RuntimeException) uno::Reference< ui::XUIElement > xUIElement( pIter->m_xUIElement ); if ( xUIElement.is() ) { - uno::Reference< uno::XInterface > xIfac( xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< uno::XInterface > xIfac( xUIElement->getRealInterface(), uno::UNO_QUERY ); if ( xIfac == e.Source ) { aName = pIter->m_aName; @@ -3990,7 +4004,7 @@ throw (uno::RuntimeException) if ( rEvent.Source == xElementCfgMgr ) { // Same UI configuration manager where our element has its settings - if ( rEvent.Source == uno::Reference< uno::XInterface >( xDocCfgMgr, uno::UNO_QUERY )) + if ( rEvent.Source == uno::Reference< uno::XInterface >( xDocCfgMgr, uno::UNO_QUERY )) { // document settings removed if ( xModuleCfgMgr->hasSettings( rEvent.ResourceURL )) @@ -4006,7 +4020,7 @@ throw (uno::RuntimeException) // No settings anymore, element must be destroyed if ( xContainerWindow.is() && bNoSettings ) - destroyToolbar( rEvent.ResourceURL ); + destroyToolbar( rEvent.ResourceURL ); } } @@ -4063,7 +4077,7 @@ uno::Sequence< uno::Reference< ui::XUIElement > > ToolbarLayoutManager::getToolb { if ( pIter->m_xUIElement.is() ) { - ++nCount; + ++nCount; aSeq.realloc( nCount ); aSeq[nCount-1] = pIter->m_xUIElement; } @@ -4080,7 +4094,7 @@ bool ToolbarLayoutManager::floatToolbar( const ::rtl::OUString& rResourceURL ) { try { - uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); if ( xDockWindow.is() && !xDockWindow->isFloating() ) { aUIElement.m_bFloating = true; @@ -4105,7 +4119,7 @@ bool ToolbarLayoutManager::lockToolbar( const ::rtl::OUString& rResourceURL ) { try { - uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); if ( xDockWindow.is() && !xDockWindow->isFloating() && !xDockWindow->isLocked() ) { aUIElement.m_aDockedData.m_bLocked = true; @@ -4116,7 +4130,7 @@ bool ToolbarLayoutManager::lockToolbar( const ::rtl::OUString& rResourceURL ) implts_setToolbar( aUIElement ); return true; } - } + } catch ( lang::DisposedException& ) {} } @@ -4130,7 +4144,7 @@ bool ToolbarLayoutManager::unlockToolbar( const ::rtl::OUString& rResourceURL ) { try { - uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); + uno::Reference< awt::XDockableWindow > xDockWindow( aUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); if ( xDockWindow.is() && !xDockWindow->isFloating() && xDockWindow->isLocked() ) { aUIElement.m_aDockedData.m_bLocked = false; diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index db5ef0ba2b0a..68ade745efaf 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -252,6 +252,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a bool implts_insertToolbar( const UIElement& rUIElement ); void implts_setToolbar( const UIElement& rUIElement ); ::Size implts_getTopBottomDockingAreaSizes(); + void implts_getUIElementVectorCopy( UIElementVector& rCopy ); //--------------------------------------------------------------------------------------------------------- // internal docking methods From 2b618dc4c93283cd248580ba9822280ca1b0322f Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 1 Nov 2010 16:19:46 +0100 Subject: [PATCH 221/279] dockingwindows: #i112595# Fix issue with setDockingAreaAcceptor(). Added mising SetAlign() calls for DockingAreaWindows. Some cleanup. --- framework/source/layoutmanager/helpers.cxx | 18 ++--- .../source/layoutmanager/layoutmanager.cxx | 22 +++--- .../layoutmanager/toolbarlayoutmanager.cxx | 72 +++++++++++++------ .../layoutmanager/toolbarlayoutmanager.hxx | 3 + 4 files changed, 73 insertions(+), 42 deletions(-) diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index 476ea4072acc..a924a70a6255 100755 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -110,14 +110,14 @@ bool isHorizontalDockingArea( const sal_Int32 nDockArea ) { ToolBox* pToolBox = dynamic_cast( pWindow ); if ( pToolBox ) - { + { aToolbarName = pToolBox->GetSmartHelpId().GetStr(); sal_Int32 i = aToolbarName.lastIndexOf( ':' ); if (( aToolbarName.getLength() > 0 ) && ( i > 0 ) && (( i+ 1 ) < aToolbarName.getLength() )) aToolbarName = aToolbarName.copy( i+1 ); // Remove ".HelpId:" protocol from toolbar name else - aToolbarName = ::rtl::OUString(); - } + aToolbarName = ::rtl::OUString(); + } } return aToolbarName; } @@ -169,7 +169,7 @@ bool lcl_checkUIElement(const uno::Reference< ui::XUIElement >& xUIElement, awt: bool bRet = xUIElement.is(); if ( bRet ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); _xWindow.set( xUIElement->getRealInterface(), uno::UNO_QUERY ); _rPosSize = _xWindow->getPosSize(); @@ -311,12 +311,12 @@ uno::Reference< frame::XModel > impl_getModelFromFrame( const uno::Reference< fr { // Query for the model to get check the context information uno::Reference< frame::XModel > xModel; - if ( rFrame.is() ) - { + if ( rFrame.is() ) + { uno::Reference< frame::XController > xController( rFrame->getController(), uno::UNO_QUERY ); - if ( xController.is() ) - xModel = xController->getModel(); - } + if ( xController.is() ) + xModel = xController->getModel(); + } return xModel; } diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index d609e05c8fe5..9ab558860150 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -1321,7 +1321,7 @@ throw ( RuntimeException ) if ( !xDockingAreaAcceptor.is() ) m_aAsyncLayoutTimer.Stop(); - // Remove listener from old docking area acceptor + // Remove listener from old docking area acceptor if ( m_xDockingAreaAcceptor.is() ) { Reference< awt::XWindow > xWindow( m_xDockingAreaAcceptor->getContainerWindow() ); @@ -1330,15 +1330,11 @@ throw ( RuntimeException ) m_aDockingArea = awt::Rectangle(); if ( pToolbarManager ) - pToolbarManager->reset(); + pToolbarManager->resetDockingArea(); Window* pContainerWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pContainerWindow ) pContainerWindow->RemoveChildEventListener( LINK( this, LayoutManager, WindowEventListener ) ); - - // destroy panel manager - delete m_pPanelManager; - m_pPanelManager = NULL; } Reference< ui::XDockingAreaAcceptor > xOldDockingAreaAcceptor( m_xDockingAreaAcceptor ); @@ -1364,11 +1360,6 @@ throw ( RuntimeException ) } uno::Reference< awt::XWindowPeer > xParent( m_xContainerWindow, UNO_QUERY ); - pToolbarManager->setParentWindow( xParent ); - - // create new panel manager - m_pPanelManager = new PanelManager( m_xSMGR, m_xFrame ); - m_pPanelManager->createPanels(); } aWriteLock.unlock(); @@ -1376,7 +1367,7 @@ throw ( RuntimeException ) if ( xDockingAreaAcceptor.is() ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); // Add layout manager as listener to get notifications about toolbar button activties Window* pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); @@ -1436,6 +1427,13 @@ void LayoutManager::implts_reparentChildWindows() } implts_resetMenuBar(); + + aWriteLock.lock(); + uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); + ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + if ( pToolbarManager ) + pToolbarManager->setParentWindow( uno::Reference< awt::XWindowPeer >( xContainerWindow, uno::UNO_QUERY )); + aWriteLock.unlock(); } uno::Reference< ui::XUIElement > LayoutManager::implts_createDockingWindow( const ::rtl::OUString& aElementName ) diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index e9d118a211f3..5821a6a29d37 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -53,6 +53,7 @@ #include #include #include +#include #include using namespace ::com::sun::star; @@ -79,6 +80,7 @@ ToolbarLayoutManager::ToolbarLayoutManager( m_bDockingInProgress( false ), m_bVisible( true ), m_bLayoutInProgress( false ), + m_bToolbarCreation( false ), m_aFullAddonTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/addon_" )), m_aCustomTbxPrefix( RTL_CONSTASCII_USTRINGPARAM( "custom_" )), m_aCustomizeCmd( RTL_CONSTASCII_USTRINGPARAM( "ConfigureDialog" )), @@ -831,21 +833,24 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) } else if ( pEvent->GetId() == VCLEVENT_TOOLBOX_FORMATCHANGED ) { - ToolBox* pToolBox = getToolboxPtr( ((VclWindowEvent*)pEvent)->GetWindow() ); - if ( pToolBox ) + if ( !implts_isToolbarCreationActive() ) { - ::rtl::OUString aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); - if ( aToolbarName.getLength() > 0 ) + ToolBox* pToolBox = getToolboxPtr( ((VclWindowEvent*)pEvent)->GetWindow() ); + if ( pToolBox ) { - ::rtl::OUStringBuffer aBuf(100); - aBuf.appendAscii( "private:resource/toolbar/" ); - aBuf.append( aToolbarName ); - - UIElement aToolbar = implts_findToolbar( aBuf.makeStringAndClear() ); - if ( aToolbar.m_xUIElement.is() && !aToolbar.m_bFloating ) + ::rtl::OUString aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); + if ( aToolbarName.getLength() > 0 ) { - implts_setLayoutDirty(); - m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); + ::rtl::OUStringBuffer aBuf(100); + aBuf.appendAscii( "private:resource/toolbar/" ); + aBuf.append( aToolbarName ); + + UIElement aToolbar = implts_findToolbar( aBuf.makeStringAndClear() ); + if ( aToolbar.m_xUIElement.is() && !aToolbar.m_bFloating ) + { + implts_setLayoutDirty(); + m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); + } } } } @@ -879,21 +884,32 @@ void ToolbarLayoutManager::setParentWindow( { static const char DOCKINGAREASTRING[] = "dockingarea"; - uno::Reference< awt::XWindow > xTopDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xLeftDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xRightDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xBottomDockingWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xTopDockWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xLeftDockWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xRightDockWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xBottomDockWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xSMGR, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); WriteGuard aWriteLock( m_aLock ); m_xContainerWindow = uno::Reference< awt::XWindow2 >( xParentWindow, uno::UNO_QUERY ); - m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] = xTopDockingWindow; - m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] = xLeftDockingWindow; - m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] = xRightDockingWindow; - m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] = xBottomDockingWindow; + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] = xTopDockWindow; + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] = xLeftDockWindow; + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] = xRightDockWindow; + m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] = xBottomDockWindow; aWriteLock.unlock(); if ( xParentWindow.is() ) + { + vos::OGuard aGuard( Application::GetSolarMutex() ); + ::DockingAreaWindow* pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xTopDockWindow ) ); + if( pWindow ) pWindow->SetAlign( WINDOWALIGN_TOP ); + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xBottomDockWindow ) ); + if( pWindow ) pWindow->SetAlign( WINDOWALIGN_BOTTOM ); + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xLeftDockWindow ) ); + if( pWindow ) pWindow->SetAlign( WINDOWALIGN_LEFT ); + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xRightDockWindow ) ); + if( pWindow ) pWindow->SetAlign( WINDOWALIGN_RIGHT ); implts_reparentToolbars(); + } else { destroyToolbars(); @@ -1224,12 +1240,23 @@ void ToolbarLayoutManager::implts_reparentToolbars() } } +void ToolbarLayoutManager::implts_setToolbarCreation( bool bStart ) +{ + WriteGuard aWriteLock( m_aLock ); + m_bToolbarCreation = bStart; +} + +bool ToolbarLayoutManager::implts_isToolbarCreationActive() +{ + ReadGuard aReadLock( m_aLock ); + return m_bToolbarCreation; +} + void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, bool& bNotify, uno::Reference< ui::XUIElement >& rUIElement ) { ReadGuard aReadLock( m_aLock ); uno::Reference< frame::XFrame > xFrame( m_xFrame ); uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); - uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); aReadLock.unlock(); bNotify = false; @@ -1241,6 +1268,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b if ( !aToolbarElement.m_xUIElement.is() ) { uno::Reference< ui::XUIElement > xUIElement = implts_createElement( aName ); + bool bVisible( false ); bool bFloating( false ); if ( xUIElement.is() ) @@ -1325,6 +1353,7 @@ uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( con uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); aReadLock.unlock(); + implts_setToolbarCreation( true ); try { if ( xUIElementFactory.is() ) @@ -1332,6 +1361,7 @@ uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( con } catch ( container::NoSuchElementException& ) {} catch ( lang::IllegalArgumentException& ) {} + implts_setToolbarCreation( false ); return xUIElement; } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index 68ade745efaf..ebbfe23f1714 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -288,6 +288,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a void implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ); void implts_createToolBar( const ::rtl::OUString& aName, bool& bNotify, ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement ); css::uno::Reference< css::ui::XUIElement > implts_createElement( const ::rtl::OUString& aName ); + void implts_setToolbarCreation( bool bStart = true ); + bool implts_isToolbarCreationActive(); //--------------------------------------------------------------------------------------------------------- // persistence methods @@ -328,6 +330,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a bool m_bDockingInProgress; bool m_bVisible; bool m_bLayoutInProgress; + bool m_bToolbarCreation; ::rtl::OUString m_aFullAddonTbxPrefix; ::rtl::OUString m_aCustomTbxPrefix; From 603a6d30d5288aa9f044ac1fd9694f4aa2c5aecd Mon Sep 17 00:00:00 2001 From: sj Date: Mon, 1 Nov 2010 17:39:15 +0100 Subject: [PATCH 222/279] impress202: #i114961# fixed performance problem with linked graphics --- .../contact/objectcontactofobjlistpainter.hxx | 9 + svx/inc/svx/svdograf.hxx | 3 +- .../contact/objectcontactofobjlistpainter.cxx | 19 ++ .../contact/viewobjectcontactofgraphic.cxx | 36 ++-- svx/source/svdraw/svdograf.cxx | 192 +++++++++++++++--- 5 files changed, 219 insertions(+), 40 deletions(-) diff --git a/svx/inc/svx/sdr/contact/objectcontactofobjlistpainter.hxx b/svx/inc/svx/sdr/contact/objectcontactofobjlistpainter.hxx index 3f7211aa9dc0..870192c9b151 100644 --- a/svx/inc/svx/sdr/contact/objectcontactofobjlistpainter.hxx +++ b/svx/inc/svx/sdr/contact/objectcontactofobjlistpainter.hxx @@ -95,6 +95,15 @@ namespace sdr // Process the whole displaying virtual void ProcessDisplay(DisplayInfo& rDisplayInfo); + // VirtualDevice? Default is false + virtual bool isOutputToVirtualDevice() const; + + // recording MetaFile? Default is false + virtual bool isOutputToRecordingMetaFile() const; + + // pdf export? Default is false + virtual bool isOutputToPDFFile() const; + // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed. virtual OutputDevice* TryToGetOutputDevice() const; }; diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx index 23d9204ca891..1eba8822402a 100644 --- a/svx/inc/svx/svdograf.hxx +++ b/svx/inc/svx/svdograf.hxx @@ -120,7 +120,8 @@ protected: void ImpLinkAnmeldung(); void ImpLinkAbmeldung(); - sal_Bool ImpUpdateGraphicLink() const; + sal_Bool ImpUpdateGraphicLink( sal_Bool bAsynchron = sal_True ) const; + void ImpSetLinkedGraphic( const Graphic& rGraphic ); DECL_LINK( ImpSwapHdl, GraphicObject* ); public: diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx index da8518d7f1a1..c6965fcd40fb 100644 --- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx +++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx @@ -151,6 +151,25 @@ namespace sdr } } + // VirtualDevice? + bool ObjectContactOfObjListPainter::isOutputToVirtualDevice() const + { + return (OUTDEV_VIRDEV == mrTargetOutputDevice.GetOutDevType()); + } + + // recording MetaFile? + bool ObjectContactOfObjListPainter::isOutputToRecordingMetaFile() const + { + GDIMetaFile* pMetaFile = mrTargetOutputDevice.GetConnectMetaFile(); + return (pMetaFile && pMetaFile->IsRecord() && !pMetaFile->IsPause()); + } + + // pdf export? + bool ObjectContactOfObjListPainter::isOutputToPDFFile() const + { + return (0 != mrTargetOutputDevice.GetPDFWriter()); + } + OutputDevice* ObjectContactOfObjListPainter::TryToGetOutputDevice() const { return &mrTargetOutputDevice; diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx index cd2d9670bf7c..110186d41bf4 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx @@ -177,7 +177,7 @@ namespace sdr if(rGrafObj.IsLinkedGraphic()) { // update graphic link - rGrafObj.ImpUpdateGraphicLink(); + rGrafObj.ImpUpdateGraphicLink( sal_False ); } else { @@ -196,7 +196,7 @@ namespace sdr rGrafObj.mbInsidePaint = sal_True; rGrafObj.ForceSwapIn(); rGrafObj.mbInsidePaint = sal_False; - } + } bRetval = true; } @@ -252,19 +252,27 @@ namespace sdr // prepare primitive generation with evtl. loading the graphic when it's swapped out SdrGrafObj& rGrafObj = const_cast< ViewObjectContactOfGraphic* >(this)->getSdrGrafObj(); bool bDoAsynchronGraphicLoading(rGrafObj.GetModel() && rGrafObj.GetModel()->IsSwapGraphics()); - static bool bSuppressAsynchLoading(false); bool bSwapInDone(false); + bool bSwapInExclusive(false); - if(bDoAsynchronGraphicLoading - && rGrafObj.IsSwappedOut() - && rGrafObj.GetPage() - && rGrafObj.GetPage()->IsMasterPage()) + if( bDoAsynchronGraphicLoading && rGrafObj.IsSwappedOut() ) { - // #i102380# force Swap-In for GraphicObjects on MasterPage to have a nicer visualisation - bDoAsynchronGraphicLoading = false; + // sometimes it is needed that each graphic is completely available and swapped in + // for these cases a ForceSwapIn is called later at the graphic object + if ( rGrafObj.GetPage() && rGrafObj.GetPage()->IsMasterPage() ) + { + // #i102380# force Swap-In for GraphicObjects on MasterPage to have a nicer visualisation + bDoAsynchronGraphicLoading = false; + } + else if ( GetObjectContact().isOutputToPrinter() + || GetObjectContact().isOutputToRecordingMetaFile() + || GetObjectContact().isOutputToPDFFile() ) + { + bDoAsynchronGraphicLoading = false; + bSwapInExclusive = true; + } } - - if(bDoAsynchronGraphicLoading && !bSuppressAsynchLoading) + if( bDoAsynchronGraphicLoading ) { bSwapInDone = const_cast< ViewObjectContactOfGraphic* >(this)->impPrepareGraphicWithAsynchroniousLoading(); } @@ -293,10 +301,8 @@ namespace sdr } } - // if swap in was forced only for printing, swap out again - const bool bSwapInExclusiveForPrinting(bSwapInDone && GetObjectContact().isOutputToPrinter()); - - if(bSwapInExclusiveForPrinting) + // if swap in was forced only for printing metafile and pdf, swap out again + if( bSwapInDone && bSwapInExclusive ) { rGrafObj.ForceSwapOut(); } diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index d1f65c30050d..27c96f6c819d 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -45,6 +45,7 @@ #include #include +#include #include #include "svdglob.hxx" #include "svdstr.hrc" @@ -69,6 +70,8 @@ #include #include #include +#include +#include using namespace ::com::sun::star::uno; using namespace ::com::sun::star::io; @@ -80,13 +83,48 @@ using namespace ::com::sun::star::io; #define GRAFSTREAMPOS_INVALID 0xffffffff #define SWAPGRAPHIC_TIMEOUT 5000 + // ------------------ // - SdrGraphicLink - // ------------------ + +const Graphic ImpLoadLinkedGraphic( const String& rFileName, const String& rFilterName ) +{ + Graphic aGraphic; + + SfxMedium xMed( rFileName, STREAM_STD_READ, TRUE ); + xMed.DownLoad(); + + SvStream* pInStrm = xMed.GetInStream(); + if ( pInStrm ) + { + pInStrm->Seek( STREAM_SEEK_TO_BEGIN ); + GraphicFilter* pGF = GraphicFilter::GetGraphicFilter(); + + const USHORT nFilter = rFilterName.Len() && pGF->GetImportFormatCount() + ? pGF->GetImportFormatNumber( rFilterName ) + : GRFILTER_FORMAT_DONTKNOW; + + String aEmptyStr; + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aFilterData( 1 ); + + // Room for improvment: + // As this is a linked graphic the GfxLink is not needed if saving/loading our own format. + // But this link is required by some filters to access the native graphic (pdf export/ms export), + // there we should create a new service to provide this data if needed + aFilterData[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CreateNativeLink" ) ); + aFilterData[ 0 ].Value = Any( sal_True ); + pGF->ImportGraphic( aGraphic, aEmptyStr, *pInStrm, nFilter, NULL, 0, &aFilterData ); + } + return aGraphic; +} + +class SdrGraphicUpdater; class SdrGraphicLink : public sfx2::SvBaseLink { SdrGrafObj* pGrafObj; + SdrGraphicUpdater* pGraphicUpdater; public: SdrGraphicLink(SdrGrafObj* pObj); @@ -95,16 +133,87 @@ public: virtual void Closed(); virtual void DataChanged( const String& rMimeType, const ::com::sun::star::uno::Any & rValue ); + void DataChanged( const Graphic& rGraphic ); BOOL Connect() { return 0 != GetRealObject(); } - void UpdateSynchron(); + void UpdateAsynchron(); + void RemoveGraphicUpdater(); }; +class SdrGraphicUpdater : public ::osl::Thread +{ +public: + SdrGraphicUpdater( const String& rFileName, const String& rFilterName, SdrGraphicLink& ); + virtual ~SdrGraphicUpdater( void ); + + void SAL_CALL Terminate( void ); + + sal_Bool GraphicLinkChanged( const String& rFileName ){ return mrFileName != rFileName; }; + +protected: + + /** is called from the inherited create method and acts as the + main function of this thread. + */ + virtual void SAL_CALL run(void); + + /** Called after the thread is terminated via the terminate + method. Used to kill the thread by calling delete on this. + */ + virtual void SAL_CALL onTerminated(void); + +private: + + ::osl::Mutex maMutex; + const String& mrFileName; + const String& mrFilterName; + SdrGraphicLink& mrGraphicLink; + + volatile bool mbIsTerminated; +}; + +SdrGraphicUpdater::SdrGraphicUpdater( const String& rFileName, const String& rFilterName, SdrGraphicLink& rGraphicLink ) +: mrFileName( rFileName ) +, mrFilterName( rFilterName ) +, mrGraphicLink( rGraphicLink ) +, mbIsTerminated( sal_False ) +{ + create(); +} + +SdrGraphicUpdater::~SdrGraphicUpdater( void ) +{ +} + +void SdrGraphicUpdater::Terminate() +{ + ::osl::MutexGuard aGuard( maMutex ); + mbIsTerminated = sal_True; +} + +void SAL_CALL SdrGraphicUpdater::onTerminated(void) +{ + delete this; +} + +void SAL_CALL SdrGraphicUpdater::run(void) +{ + Graphic aGraphic( ImpLoadLinkedGraphic( mrFileName, mrFilterName ) ); + ::osl::MutexGuard aGuard(maMutex); + vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + if ( !mbIsTerminated ) + { + mrGraphicLink.DataChanged( aGraphic ); + mrGraphicLink.RemoveGraphicUpdater(); + } +} + // ----------------------------------------------------------------------------- -SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj): - ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ), - pGrafObj(pObj) +SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj) +: ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ) +, pGrafObj( pObj ) +, pGraphicUpdater( NULL ) { SetSynchron( FALSE ); } @@ -113,6 +222,22 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj): SdrGraphicLink::~SdrGraphicLink() { + if ( pGraphicUpdater ) + pGraphicUpdater->Terminate(); +} + +// ----------------------------------------------------------------------------- + +void SdrGraphicLink::DataChanged( const Graphic& rGraphic ) +{ + pGrafObj->ImpSetLinkedGraphic( rGraphic ); +} + +// ----------------------------------------------------------------------------- + +void SdrGraphicLink::RemoveGraphicUpdater() +{ + pGraphicUpdater = NULL; } // ----------------------------------------------------------------------------- @@ -135,9 +260,8 @@ void SdrGraphicLink::DataChanged( const String& rMimeType, } else if( SotExchange::GetFormatIdFromMimeType( rMimeType ) != sfx2::LinkManager::RegisterStatusInfoId() ) { - // only repaint, no objectchange - pGrafObj->ActionChanged(); - // pGrafObj->BroadcastObjectChange(); + // broadcasting, to update slidesorter + pGrafObj->BroadcastObjectChange(); } } } @@ -155,14 +279,20 @@ void SdrGraphicLink::Closed() // ----------------------------------------------------------------------------- -void SdrGraphicLink::UpdateSynchron() +void SdrGraphicLink::UpdateAsynchron() { if( GetObj() ) { - String aMimeType( SotExchange::GetFormatMimeType( GetContentType() )); - ::com::sun::star::uno::Any aValue; - GetObj()->GetData( aValue, aMimeType, TRUE ); - DataChanged( aMimeType, aValue ); + if ( pGraphicUpdater ) + { + if ( pGraphicUpdater->GraphicLinkChanged( pGrafObj->GetFileName() ) ) + { + pGraphicUpdater->Terminate(); + pGraphicUpdater = new SdrGraphicUpdater( pGrafObj->GetFileName(), pGrafObj->GetFilterName(), *this ); + } + } + else + pGraphicUpdater = new SdrGraphicUpdater( pGrafObj->GetFileName(), pGrafObj->GetFilterName(), *this ); } } @@ -447,8 +577,10 @@ void SdrGrafObj::ForceSwapIn() const const_cast< SdrGrafObj* >( this )->mbIsPreview = sal_False; } - - pGraphic->FireSwapInRequest(); + if ( pGraphicLink && pGraphic->IsSwappedOut() ) + ImpUpdateGraphicLink( sal_False ); + else + pGraphic->FireSwapInRequest(); if( pGraphic->IsSwappedOut() || ( pGraphic->GetType() == GRAPHIC_NONE ) || @@ -558,24 +690,36 @@ UINT16 SdrGrafObj::GetObjIdentifier() const // ----------------------------------------------------------------------------- -sal_Bool SdrGrafObj::ImpUpdateGraphicLink() const +/* The graphic of the GraphicLink will be loaded. If it is called with + bAsynchron = true then the graphic will be set later via DataChanged +*/ +sal_Bool SdrGrafObj::ImpUpdateGraphicLink( sal_Bool bAsynchron ) const { - sal_Bool bRet = sal_False; - + sal_Bool bRet = sal_False; if( pGraphicLink ) { - const sal_Bool bIsChanged = pModel->IsChanged(); - pGraphicLink->UpdateSynchron(); - pModel->SetChanged( bIsChanged ); - + if ( bAsynchron ) + pGraphicLink->UpdateAsynchron(); + else + pGraphicLink->DataChanged( ImpLoadLinkedGraphic( aFileName, aFilterName ) ); bRet = sal_True; } - return bRet; } // ----------------------------------------------------------------------------- +void SdrGrafObj::ImpSetLinkedGraphic( const Graphic& rGraphic ) +{ + const sal_Bool bIsChanged = GetModel()->IsChanged(); + NbcSetGraphic( rGraphic ); + ActionChanged(); + BroadcastObjectChange(); + GetModel()->SetChanged( bIsChanged ); +} + +// ----------------------------------------------------------------------------- + void SdrGrafObj::TakeObjNameSingul(XubString& rName) const { switch( pGraphic->GetType() ) @@ -1095,7 +1239,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) if( ( pGraphic->HasUserData() || pGraphicLink ) && ( nSwapMode & SDR_SWAPGRAPHICSMODE_PURGE ) ) { - pRet = NULL; + pRet = GRFMGR_AUTOSWAPSTREAM_LINK; } else if( nSwapMode & SDR_SWAPGRAPHICSMODE_TEMP ) { @@ -1180,7 +1324,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) } } } - else if( !ImpUpdateGraphicLink() ) + else if( !ImpUpdateGraphicLink( sal_False ) ) { pRet = GRFMGR_AUTOSWAPSTREAM_TEMP; } From f6281ec4112479b5bdd750be351f4437ecf8a65a Mon Sep 17 00:00:00 2001 From: os Date: Wed, 3 Nov 2010 14:18:15 +0100 Subject: [PATCH 223/279] #i110273# caption order changed for locale hu --- officecfg/registry/data/org/openoffice/Office/Writer.xcu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/officecfg/registry/data/org/openoffice/Office/Writer.xcu b/officecfg/registry/data/org/openoffice/Office/Writer.xcu index b318614ef789..06eff1b079e7 100644 --- a/officecfg/registry/data/org/openoffice/Office/Writer.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Writer.xcu @@ -53,6 +53,9 @@ + + true + From de8fef0d3ff128ca58c1da252f3a1a44931bd9ba Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 3 Nov 2010 16:15:15 +0100 Subject: [PATCH 224/279] sb132: #i112107# handle configmgr::Access::asProperty being called on an access w/o parent --- configmgr/source/access.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 3602f3cd73c5..933a414d331c 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -2089,7 +2089,8 @@ css::beans::Property Access::asProperty() { default: type = cppu::UnoType< css::uno::XInterface >::get(); //TODO: correct? nillable = false; - removable = getParentNode()->kind() == Node::KIND_SET; + rtl::Reference< Node > parent(getParentNode()); + removable = parent.is() && parent->kind() == Node::KIND_SET; break; } return css::beans::Property( From b9caa18efb7011994858a83a59a01b4ed4d34f2f Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Thu, 4 Nov 2010 11:01:57 +0100 Subject: [PATCH 225/279] tl88:#i100744# Better exception handling while retrieving information from packages --- .../deployment/gui/dp_gui_extlistbox.cxx | 48 +++++++++++-------- .../registry/package/dp_package.cxx | 16 ++++--- 2 files changed, 39 insertions(+), 25 deletions(-) mode change 100644 => 100755 desktop/source/deployment/registry/package/dp_package.cxx diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 24b47aa223e3..5f9de3965199 100755 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -71,29 +71,34 @@ Entry_Impl::Entry_Impl( const uno::Reference< deployment::XPackage > &xPackage, m_pPublisher( NULL ), m_xPackage( xPackage ) { - m_sTitle = xPackage->getDisplayName(); - m_sVersion = xPackage->getVersion(); - m_sDescription = xPackage->getDescription(); + try + { + m_sTitle = xPackage->getDisplayName(); + m_sVersion = xPackage->getVersion(); + m_sDescription = xPackage->getDescription(); - beans::StringPair aInfo( m_xPackage->getPublisherInfo() ); - m_sPublisher = aInfo.First; - m_sPublisherURL = aInfo.Second; + beans::StringPair aInfo( m_xPackage->getPublisherInfo() ); + m_sPublisher = aInfo.First; + m_sPublisherURL = aInfo.Second; - // get the icons for the package if there are any - uno::Reference< graphic::XGraphic > xGraphic = xPackage->getIcon( false ); - if ( xGraphic.is() ) - m_aIcon = Image( xGraphic ); + // get the icons for the package if there are any + uno::Reference< graphic::XGraphic > xGraphic = xPackage->getIcon( false ); + if ( xGraphic.is() ) + m_aIcon = Image( xGraphic ); - xGraphic = xPackage->getIcon( true ); - if ( xGraphic.is() ) - m_aIconHC = Image( xGraphic ); - else - m_aIconHC = m_aIcon; + xGraphic = xPackage->getIcon( true ); + if ( xGraphic.is() ) + m_aIconHC = Image( xGraphic ); + else + m_aIconHC = m_aIcon; - if ( eState == AMBIGUOUS ) - m_sErrorText = DialogHelper::getResourceString( RID_STR_ERROR_UNKNOWN_STATUS ); - else if ( eState == NOT_REGISTERED ) - checkDependencies(); + if ( eState == AMBIGUOUS ) + m_sErrorText = DialogHelper::getResourceString( RID_STR_ERROR_UNKNOWN_STATUS ); + else if ( eState == NOT_REGISTERED ) + checkDependencies(); + } + catch (deployment::ExtensionRemovedException &) {} + catch (uno::RuntimeException &) {} } //------------------------------------------------------------------------------ @@ -963,6 +968,11 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > & bool bLocked = m_pManager->isReadOnly( xPackage ); TEntry_Impl pEntry( new Entry_Impl( xPackage, eState, bLocked ) ); + + // Don't add empty entries + if ( ! pEntry->m_sTitle.Len() ) + return 0; + xPackage->addEventListener( uno::Reference< lang::XEventListener > ( m_xRemoveListener, uno::UNO_QUERY ) ); ::osl::ClearableMutexGuard guard(m_entriesMutex); diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx old mode 100644 new mode 100755 index feb55d0af3bf..7f262d66684b --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -986,16 +986,20 @@ OUString BackendImpl::PackageImpl::getDescription() if (sRelativeURL.getLength()) { OUString sURL = m_url_expanded + OUSTR("/") + sRelativeURL; - sDescription = getTextFromURL( - css::uno::Reference< css::ucb::XCommandEnvironment >(), sURL); + try + { + sDescription = getTextFromURL( css::uno::Reference< css::ucb::XCommandEnvironment >(), sURL ); + } + catch ( css::deployment::DeploymentException& ) + { + OSL_ENSURE( 0, ::rtl::OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 ).getStr() ); + } } + if (sDescription.getLength()) return sDescription; - else if(m_oldDescription.getLength()) - return m_oldDescription; - else - return OUString(); + return m_oldDescription; } //______________________________________________________________________________ From ecc7ab4b75d4fe46e4f6d51018506f7ceb745f44 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 4 Nov 2010 15:43:13 +0100 Subject: [PATCH 226/279] fwk160: #i107568# Jobs service enhancement to instantiate services only on matching application module context --- framework/inc/jobs/jobdata.hxx | 10 +++++ framework/inc/jobs/jobdispatch.hxx | 3 ++ framework/inc/jobs/jobexecutor.hxx | 4 ++ framework/source/jobs/jobdata.cxx | 30 ++++++++++++++- framework/source/jobs/jobdispatch.cxx | 37 ++++++++++++++----- framework/source/jobs/jobexecutor.cxx | 18 +++++++++ .../schema/org/openoffice/Office/Jobs.xcs | 5 +++ 7 files changed, 96 insertions(+), 11 deletions(-) diff --git a/framework/inc/jobs/jobdata.hxx b/framework/inc/jobs/jobdata.hxx index 21aa027cc874..e9cc79030770 100644 --- a/framework/inc/jobs/jobdata.hxx +++ b/framework/inc/jobs/jobdata.hxx @@ -80,6 +80,8 @@ class JobData : private ThreadHelpBase static const sal_Char* JOBCFG_PROP_ARGUMENTS; /// define the cfg key "Service" of a job relativ to JOBCFG_ROOT/ static const sal_Char* JOBCFG_PROP_SERVICE; + /// define the cfg key "Context" of a job relativ to JOBCFG_ROOT/ + static const sal_Char* JOBCFG_PROP_CONTEXT; /// specifies the root package and key to find event registrations static const sal_Char* EVENTCFG_ROOT; @@ -105,6 +107,7 @@ class JobData : private ThreadHelpBase static const sal_Char* PROP_FRAME; static const sal_Char* PROP_MODEL; static const sal_Char* PROP_SERVICE; + static const sal_Char* PROP_CONTEXT; //___________________________________ // structs @@ -209,6 +212,12 @@ class JobData : private ThreadHelpBase */ ::rtl::OUString m_sService; + /** + the module context list of this job. + It's readed from the configuration. Don't set it from outside! + */ + ::rtl::OUString m_sContext; + /** a job can be registered for an event. It can be an empty value! But it will be set from outside any times. @@ -255,6 +264,7 @@ class JobData : private ThreadHelpBase css::uno::Sequence< css::beans::NamedValue > getJobConfig () const; sal_Bool hasConfig () const; + sal_Bool hasCorrectContext ( const ::rtl::OUString& rModuleIdent ) const; void setEnvironment ( EEnvironment eEnvironment ); void setAlias ( const ::rtl::OUString& sAlias ); diff --git a/framework/inc/jobs/jobdispatch.hxx b/framework/inc/jobs/jobdispatch.hxx index 85e501e866e1..49b6b31b8cac 100644 --- a/framework/inc/jobs/jobdispatch.hxx +++ b/framework/inc/jobs/jobdispatch.hxx @@ -101,6 +101,9 @@ class JobDispatch : public css::lang::XTypeProvider /** reference to the frame, inside which this dispatch is used */ css::uno::Reference< css::frame::XFrame > m_xFrame; + /** name of module (writer, impress etc.) the frame is for */ + ::rtl::OUString m_sModuleIdentifier; + //___________________________________ // native interface methods diff --git a/framework/inc/jobs/jobexecutor.hxx b/framework/inc/jobs/jobexecutor.hxx index ead1022df2ec..955b2978f791 100644 --- a/framework/inc/jobs/jobexecutor.hxx +++ b/framework/inc/jobs/jobexecutor.hxx @@ -48,6 +48,7 @@ #include #include #include +#include //_______________________________________ // other includes @@ -85,6 +86,9 @@ class JobExecutor : public css::lang::XTypeProvider /** reference to the uno service manager */ css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; + /** reference to the module info service */ + css::uno::Reference< css::frame::XModuleManager > m_xModuleManager; + /** cached list of all registered event names of cfg for call optimization. */ OUStringList m_lEvents; diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index 4acbce44f831..4d7051231513 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -1,4 +1,4 @@ - /************************************************************************* +/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -61,6 +61,7 @@ namespace framework{ const sal_Char* JobData::JOBCFG_ROOT = "/org.openoffice.Office.Jobs/Jobs/" ; const sal_Char* JobData::JOBCFG_PROP_SERVICE = "Service" ; +const sal_Char* JobData::JOBCFG_PROP_CONTEXT = "Context" ; const sal_Char* JobData::JOBCFG_PROP_ARGUMENTS = "Arguments" ; const sal_Char* JobData::EVENTCFG_ROOT = "/org.openoffice.Office.Jobs/Events/" ; @@ -79,6 +80,7 @@ const sal_Char* JobData::PROP_ENVTYPE = "EnvType" const sal_Char* JobData::PROP_FRAME = "Frame" ; const sal_Char* JobData::PROP_MODEL = "Model" ; const sal_Char* JobData::PROP_SERVICE = "Service" ; +const sal_Char* JobData::PROP_CONTEXT = "Context" ; //________________________________ // non exported definitions @@ -139,6 +141,7 @@ void JobData::operator=( const JobData& rCopy ) m_eEnvironment = rCopy.m_eEnvironment ; m_sAlias = rCopy.m_sAlias ; m_sService = rCopy.m_sService ; + m_sContext = rCopy.m_sContext ; m_sEvent = rCopy.m_sEvent ; m_lArguments = rCopy.m_lArguments ; m_aLastExecutionResult = rCopy.m_aLastExecutionResult; @@ -201,6 +204,10 @@ void JobData::setAlias( const ::rtl::OUString& sAlias ) aValue = xJobProperties->getPropertyValue(::rtl::OUString::createFromAscii(JOBCFG_PROP_SERVICE)); aValue >>= m_sService; + // read module context list + aValue = xJobProperties->getPropertyValue(::rtl::OUString::createFromAscii(JOBCFG_PROP_CONTEXT)); + aValue >>= m_sContext; + // read whole argument list aValue = xJobProperties->getPropertyValue(::rtl::OUString::createFromAscii(JOBCFG_PROP_ARGUMENTS)); css::uno::Reference< css::container::XNameAccess > xArgumentList; @@ -477,7 +484,7 @@ css::uno::Sequence< css::beans::NamedValue > JobData::getConfig() const css::uno::Sequence< css::beans::NamedValue > lConfig; if (m_eMode==E_ALIAS) { - lConfig.realloc(2); + lConfig.realloc(3); sal_Int32 i = 0; lConfig[i].Name = ::rtl::OUString::createFromAscii(PROP_ALIAS); @@ -487,6 +494,10 @@ css::uno::Sequence< css::beans::NamedValue > JobData::getConfig() const lConfig[i].Name = ::rtl::OUString::createFromAscii(PROP_SERVICE); lConfig[i].Value <<= m_sService; ++i; + + lConfig[i].Name = ::rtl::OUString::createFromAscii(PROP_CONTEXT); + lConfig[i].Value <<= m_sContext; + ++i; } aReadLock.unlock(); /* } SAFE */ @@ -607,6 +618,20 @@ void JobData::appendEnabledJobsForEvent( const css::uno::Reference< css::lang::X } } +//________________________________ +/** + */ +sal_Bool JobData::hasCorrectContext(const ::rtl::OUString& rModuleIdent) const +{ + if ( m_sContext.getLength() == 0 ) + return sal_True; + + if ( rModuleIdent.getLength() > 0 ) + return ( m_sContext.equals( rModuleIdent )); + + return sal_False; +} + //________________________________ /** */ @@ -705,6 +730,7 @@ void JobData::impl_reset() m_eEnvironment = E_UNKNOWN_ENVIRONMENT; m_sAlias = ::rtl::OUString(); m_sService = ::rtl::OUString(); + m_sContext = ::rtl::OUString(); m_sEvent = ::rtl::OUString(); m_lArguments = css::uno::Sequence< css::beans::NamedValue >(); aWriteLock.unlock(); diff --git a/framework/source/jobs/jobdispatch.cxx b/framework/source/jobs/jobdispatch.cxx index b2c5399d0216..afc0abada7c1 100644 --- a/framework/source/jobs/jobdispatch.cxx +++ b/framework/source/jobs/jobdispatch.cxx @@ -44,6 +44,7 @@ // interface includes #include #include +#include //________________________________ // includes of other projects @@ -145,7 +146,20 @@ void SAL_CALL JobDispatch::initialize( const css::uno::Sequence< css::uno::Any > for (int a=0; a>= m_xFrame; + + css::uno::Reference< css::frame::XModuleManager > xModuleManager( + m_xSMGR->createInstance( + SERVICENAME_MODULEMANAGER ), + css::uno::UNO_QUERY_THROW ); + try + { + m_sModuleIdentifier = xModuleManager->identify( m_xFrame ); + } + catch( css::uno::Exception& ) + {} + } } aWriteLock.unlock(); @@ -289,16 +303,8 @@ void JobDispatch::impl_dispatchEvent( /*IN*/ const ::rtl::OUString& // But a may given listener will know something ... // I think this operaton was finished successfully. // It's not realy an error, if no registered jobs could be located. - if (lJobs.getLength()<1 && xListener.is()) - { - css::frame::DispatchResultEvent aEvent; - aEvent.Source = xThis; - aEvent.State = css::frame::DispatchResultState::SUCCESS; - xListener->dispatchFinished(aEvent); - return; - } - // Step over all found jobs and execute it + int nExecutedJobs=0; for (int j=0; jsetDispatchResultFake(xListener, xThis); pJob->execute(Converter::convert_seqPropVal2seqNamedVal(lArgs)); + ++nExecutedJobs; + } + + if (nExecutedJobs<1 && xListener.is()) + { + css::frame::DispatchResultEvent aEvent; + aEvent.Source = xThis; + aEvent.State = css::frame::DispatchResultState::SUCCESS; + xListener->dispatchFinished(aEvent); } } diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx index e3a6122d4938..f33d88216566 100644 --- a/framework/source/jobs/jobexecutor.cxx +++ b/framework/source/jobs/jobexecutor.cxx @@ -98,6 +98,11 @@ DEFINE_XSERVICEINFO_ONEINSTANCESERVICE( JobExecutor , DEFINE_INIT_SERVICE( JobExecutor, { + m_xModuleManager = css::uno::Reference< css::frame::XModuleManager >( + m_xSMGR->createInstance( + SERVICENAME_MODULEMANAGER ), + css::uno::UNO_QUERY_THROW ); + /*Attention I think we don't need any mutex or lock here ... because we are called by our own static method impl_createInstance() to create a new instance of this class by our own supported service factory. @@ -142,6 +147,7 @@ JobExecutor::JobExecutor( /*IN*/ const css::uno::Reference< css::lang::XMultiSer : ThreadHelpBase (&Application::GetSolarMutex() ) , ::cppu::OWeakObject ( ) , m_xSMGR (xSMGR ) + , m_xModuleManager ( ) , m_aConfig (xSMGR, ::rtl::OUString::createFromAscii(JobData::EVENTCFG_ROOT) ) { // Don't do any reference related code here! Do it inside special @@ -233,6 +239,15 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent // This optimization supress using of the cfg api for getting event and job descriptions. // see using of m_lEvents.find() below ... + // retrieve event context from event source + rtl::OUString aModuleIdentifier; + try + { + aModuleIdentifier = m_xModuleManager->identify( aEvent.Source ); + } + catch( css::uno::Exception& ) + {} + // Special feature: If the events "OnNew" or "OnLoad" occures - we generate our own event "onDocumentOpened". if ( (aEvent.EventName.equals(EVENT_ON_NEW )) || @@ -275,6 +290,9 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent aCfg.setEvent(rBinding.m_sDocEvent, rBinding.m_sJobName); aCfg.setEnvironment(JobData::E_DOCUMENTEVENT); + if (!aCfg.hasCorrectContext(aModuleIdentifier)) + continue; + /*Attention! Jobs implements interfaces and dies by ref count! And freeing of such uno object is done by uno itself. diff --git a/officecfg/registry/schema/org/openoffice/Office/Jobs.xcs b/officecfg/registry/schema/org/openoffice/Office/Jobs.xcs index a9b4cdc70fd7..f5421c8a246f 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Jobs.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Jobs.xcs @@ -40,6 +40,11 @@ Must contain an UNO implementation(!) name of the implemented job component. + + + An property to define the context this event should be active in. It can be empty or a colon separated list of the supported application modules. + + Can be filled with any argument, which is under control of the job component. From cc707fd9b308f07bbebdf83dae3a8b1ef6168d48 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 4 Nov 2010 17:17:08 +0100 Subject: [PATCH 227/279] fwk160: #i107568# Revised hasContext() implementation to fix problem described in the issue --- framework/source/jobs/jobdata.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index 4d7051231513..feb1e4bb52f9 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -623,11 +623,21 @@ void JobData::appendEnabledJobsForEvent( const css::uno::Reference< css::lang::X */ sal_Bool JobData::hasCorrectContext(const ::rtl::OUString& rModuleIdent) const { - if ( m_sContext.getLength() == 0 ) + sal_Int32 nContextLen = m_sContext.getLength(); + sal_Int32 nModuleIdLen = rModuleIdent.getLength(); + + if ( nContextLen == 0 ) return sal_True; - if ( rModuleIdent.getLength() > 0 ) - return ( m_sContext.equals( rModuleIdent )); + if ( nModuleIdLen > 0 ) + { + sal_Int32 nIndex = m_sContext.indexOf( rModuleIdent ); + if ( nIndex >= 0 && ( nIndex+nModuleIdLen <= nContextLen )) + { + ::rtl::OUString sContextModule = m_sContext.copy( nIndex, nModuleIdLen ); + return sContextModule.equals( rModuleIdent ); + } + } return sal_False; } From 34a04ae552339d2b7799806da36a8c2858b9baf7 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 4 Nov 2010 17:56:39 +0100 Subject: [PATCH 228/279] pl08: #163778# use EncryptionData from MediaDescriptor --- sfx2/inc/sfx2/docfile.hxx | 2 +- sfx2/inc/sfx2/sfxsids.hrc | 4 +- sfx2/inc/sfx2/sfxuno.hxx | 3 +- sfx2/sdi/sfx.sdi | 2 +- sfx2/source/appl/appopen.cxx | 53 +++++++++++++++----- sfx2/source/appl/appuno.cxx | 14 ++++++ sfx2/source/dialog/filedlghelper.cxx | 31 ++++++++++-- sfx2/source/dialog/mailmodelapi.cxx | 2 - sfx2/source/dialog/makefile.mk | 1 + sfx2/source/dialog/versdlg.cxx | 8 ++-- sfx2/source/doc/docfile.cxx | 14 ++++-- sfx2/source/doc/guisaveas.cxx | 10 ++-- sfx2/source/doc/objserv.cxx | 4 +- sfx2/source/doc/objstor.cxx | 46 +++++++++++------- sfx2/source/doc/sfxbasemodel.cxx | 72 +++++++++++++++------------- 15 files changed, 178 insertions(+), 88 deletions(-) mode change 100755 => 100644 sfx2/sdi/sfx.sdi diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx index 0cb57e7a414d..35656202650f 100644 --- a/sfx2/inc/sfx2/docfile.hxx +++ b/sfx2/inc/sfx2/docfile.hxx @@ -112,7 +112,7 @@ class SFX2_DLLPUBLIC SfxMedium : public SvRefBase SAL_DLLPRIVATE void CloseStreams_Impl(); DECL_DLLPRIVATE_STATIC_LINK( SfxMedium, UCBHdl_Impl, sal_uInt32 * ); - SAL_DLLPRIVATE void SetPasswordToStorage_Impl(); + SAL_DLLPRIVATE void SetEncryptionDataToStorage_Impl(); #endif public: diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index 26e1991c24b8..42b27c17e767 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -309,7 +309,9 @@ #define SID_DEFAULTFILENAME (SID_SFX_START + 1717) #define SID_MODIFYPASSWORDINFO (SID_SFX_START + 1718) #define SID_RECOMMENDREADONLY (SID_SFX_START + 1719) -#define SID_SFX_free_START (SID_SFX_START + 1720) +#define SID_ENCRYPTIONDATA (SID_SFX_START + 1720) +#define SID_PASSWORDINTERACTION (SID_SFX_START + 1721) +#define SID_SFX_free_START (SID_SFX_START + 1722) #define SID_SFX_free_END (SID_SFX_START + 3999) #define SID_OPEN_NEW_VIEW (SID_SFX_START + 520) diff --git a/sfx2/inc/sfx2/sfxuno.hxx b/sfx2/inc/sfx2/sfxuno.hxx index f9702063713a..691716b70571 100644 --- a/sfx2/inc/sfx2/sfxuno.hxx +++ b/sfx2/inc/sfx2/sfxuno.hxx @@ -37,6 +37,7 @@ #include #include #include +#include //________________________________________________________________________________________________________________________ @@ -104,7 +105,7 @@ SFX2_DLLPUBLIC void TransformItems( sal_uInt16 UNOSEQUENCE< UNOPROPERTYVALUE >& seqArgs , const SfxSlot* pSlot = 0 ); -sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, ::rtl::OUString& rPasswd ); +bool GetEncryptionData_Impl( const SfxItemSet* pSet, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData ); #define FrameSearchFlags sal_Int32 diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi old mode 100755 new mode 100644 index 8ca8645a05ff..2f960e31ba29 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -5317,7 +5317,7 @@ SfxBoolItem SaveAll SID_SAVEDOCS //-------------------------------------------------------------------------- SfxBoolItem SaveAs SID_SAVEASDOC -(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem VersionAuthor SID_DOCINFO_AUTHOR,SfxBoolItem Overwrite SID_OVERWRITE,SfxBoolItem Unpacked SID_UNPACK,SfxBoolItem SaveTo SID_SAVETO) +(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxBoolItem PasswordInteraction SID_PASSWORDINTERACTION,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem VersionAuthor SID_DOCINFO_AUTHOR,SfxBoolItem Overwrite SID_OVERWRITE,SfxBoolItem Unpacked SID_UNPACK,SfxBoolItem SaveTo SID_SAVETO) [ /* flags: */ AutoUpdate = FALSE, diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 89bb5f23f1de..807834ca41a5 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -239,8 +239,7 @@ void SetTemplate_Impl( const String &rFileName, pDoc->ResetFromTemplate( rLongName, rFileName ); } -//-------------------------------------------------------------------- - +//==================================================================== class SfxDocPasswordVerifier : public ::comphelper::IDocPasswordVerifier { public: @@ -248,21 +247,33 @@ public: mxStorage( rxStorage ) {} virtual ::comphelper::DocPasswordVerifierResult - verifyPassword( const ::rtl::OUString& rPassword ); + verifyPassword( const ::rtl::OUString& rPassword, uno::Sequence< beans::NamedValue >& o_rEncryptionData ); + virtual ::comphelper::DocPasswordVerifierResult + verifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData ); + private: Reference< embed::XStorage > mxStorage; }; -::comphelper::DocPasswordVerifierResult SfxDocPasswordVerifier::verifyPassword( const ::rtl::OUString& rPassword ) +//-------------------------------------------------------------------- +::comphelper::DocPasswordVerifierResult SfxDocPasswordVerifier::verifyPassword( const ::rtl::OUString& rPassword, uno::Sequence< beans::NamedValue >& o_rEncryptionData ) +{ + o_rEncryptionData = ::comphelper::OStorageHelper::CreatePackageEncryptionData( rPassword ); + return verifyEncryptionData( o_rEncryptionData ); +} + + +//-------------------------------------------------------------------- +::comphelper::DocPasswordVerifierResult SfxDocPasswordVerifier::verifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData ) { ::comphelper::DocPasswordVerifierResult eResult = ::comphelper::DocPasswordVerifierResult_WRONG_PASSWORD; try { - // check the password - // if the password correct is the stream will be opened successfuly + // check the encryption data + // if the data correct is the stream will be opened successfuly // and immediatelly closed - ::comphelper::OStorageHelper::SetCommonStoragePassword( mxStorage, rPassword ); + ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( mxStorage, rEncryptionData ); mxStorage->openStreamElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "content.xml" ) ), @@ -283,6 +294,8 @@ private: return eResult; } +//==================================================================== + //-------------------------------------------------------------------- sal_uInt32 CheckPasswd_Impl @@ -341,14 +354,28 @@ sal_uInt32 CheckPasswd_Impl if( xInteractionHandler.is() ) { // use the comphelper password helper to request a password - ::rtl::OUString aDocumentName = INetURLObject( pFile->GetOrigURL() ).GetMainURL( INetURLObject::DECODE_WITH_CHARSET ); - SfxDocPasswordVerifier aVerifier( xStorage ); - ::rtl::OUString aPassword = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword( - aVerifier, ::rtl::OUString(), xInteractionHandler, aDocumentName, comphelper::DocPasswordRequestType_STANDARD ); + ::rtl::OUString aPassword; + SFX_ITEMSET_ARG( pSet, pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False); + if ( pPasswordItem ) + aPassword = pPasswordItem->GetValue(); - if ( aPassword.getLength() > 0 ) + uno::Sequence< beans::NamedValue > aEncryptionData; + SFX_ITEMSET_ARG( pSet, pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False); + if ( pEncryptionDataItem ) + pEncryptionDataItem->GetValue() >>= aEncryptionData; + + ::rtl::OUString aDocumentName = INetURLObject( pFile->GetOrigURL() ).GetMainURL( INetURLObject::DECODE_WITH_CHARSET ); + + SfxDocPasswordVerifier aVerifier( xStorage ); + aEncryptionData = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword( + aVerifier, aEncryptionData, aPassword, xInteractionHandler, aDocumentName, comphelper::DocPasswordRequestType_STANDARD ); + + pSet->ClearItem( SID_PASSWORD ); + pSet->ClearItem( SID_ENCRYPTIONDATA ); + + if ( aEncryptionData.getLength() > 0 ) { - pSet->Put( SfxStringItem( SID_PASSWORD, aPassword ) ); + pSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); try { diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index b0aae115aa9b..f1b6b28184fb 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -192,6 +192,7 @@ static char const sUseSystemDialog[] = "UseSystemDialog"; static char const sStandardDir[] = "StandardDir"; static char const sBlackList[] = "BlackList"; static char const sModifyPasswordInfo[] = "ModifyPasswordInfo"; +static char const sEncryptionData[] = "EncryptionData"; void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) { @@ -851,6 +852,10 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { rSet.Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, rProp.Value ) ); } + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sEncryptionData)) ) + { + rSet.Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, rProp.Value ) ); + } #ifdef DBG_UTIL else --nFoundArgs; @@ -1065,6 +1070,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nAdditional++; if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SFX_ITEM_SET ) nAdditional++; + if ( rSet.GetItemState( SID_ENCRYPTIONDATA ) == SFX_ITEM_SET ) + nAdditional++; // consider additional arguments nProps += nAdditional; @@ -1200,6 +1207,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta continue; if ( nId == SID_NOAUTOSAVE ) continue; + if ( nId == SID_ENCRYPTIONDATA ) + continue; // used only internally if ( nId == SID_SAVETO ) @@ -1569,6 +1578,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModifyPasswordInfo)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } + if ( rSet.GetItemState( SID_ENCRYPTIONDATA, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sEncryptionData)); + pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); + } } } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 7198c84b7127..77eece9f231c 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1530,8 +1530,8 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, // check password checkbox if the document had password before if( mbHasPassword ) { - SFX_ITEMSET_ARG( rpSet, pPassItem, SfxStringItem, SID_PASSWORD, FALSE ); - mbPwdCheckBoxState = ( pPassItem != NULL ); + SFX_ITEMSET_ARG( rpSet, pPassItem, SfxBoolItem, SID_PASSWORDINTERACTION, FALSE ); + mbPwdCheckBoxState = ( pPassItem != NULL && pPassItem->GetValue() ); // in case the document has password to modify, the dialog should be shown SFX_ITEMSET_ARG( rpSet, pPassToModifyItem, SfxUnoAnyItem, SID_MODIFYPASSWORDINFO, FALSE ); @@ -1545,7 +1545,9 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, mbSelectionEnabled = sal_False; // the password will be set in case user decide so + rpSet->ClearItem( SID_PASSWORDINTERACTION ); rpSet->ClearItem( SID_PASSWORD ); + rpSet->ClearItem( SID_ENCRYPTIONDATA ); rpSet->ClearItem( SID_RECOMMENDREADONLY ); rpSet->ClearItem( SID_MODIFYPASSWORDINFO ); @@ -1660,7 +1662,30 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, if ( pPasswordRequest->isPassword() ) { if ( pPasswordRequest->getPassword().getLength() ) - rpSet->Put( SfxStringItem( SID_PASSWORD, pPasswordRequest->getPassword() ) ); + { + // TODO/LATER: The filters should show the password dialog themself in future + if ( bMSType ) + { + // all the current MS-filters use MSCodec_Std97 implementation + uno::Sequence< sal_Int8 > aUniqueID = ::comphelper::DocPasswordHelper::GenerateRandomByteSequence( 16 ); + uno::Sequence< sal_Int8 > aEncryptionKey = ::comphelper::DocPasswordHelper::GenerateStd97Key( pPasswordRequest->getPassword(), aUniqueID ); + + if ( aEncryptionKey.getLength() ) + { + ::comphelper::SequenceAsHashMap aHashData; + aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97EncryptionKey" ) ) ] <<= aEncryptionKey; + aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97UniqueID" ) ) ] <<= aUniqueID; + + rpSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aHashData.getAsConstNamedValueList() ) ) ); + } + else + return ERRCODE_IO_NOTSUPPORTED; + } + else + { + rpSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( ::comphelper::OStorageHelper::CreatePackageEncryptionData( pPasswordRequest->getPassword() ) ) ) ); + } + } if ( pPasswordRequest->getRecommendReadOnly() ) rpSet->Put( SfxBoolItem( SID_RECOMMENDREADONLY, sal_True ) ); diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx index 16d12f469205..223807d37b11 100644 --- a/sfx2/source/dialog/mailmodelapi.cxx +++ b/sfx2/source/dialog/mailmodelapi.cxx @@ -79,8 +79,6 @@ #include #include -extern sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, String& rPasswd ); - // -------------------------------------------------------------- using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk index 572053557e00..705a4c040b1a 100644 --- a/sfx2/source/dialog/makefile.mk +++ b/sfx2/source/dialog/makefile.mk @@ -42,6 +42,7 @@ EXCEPTIONSFILES=\ $(SLO)$/itemconnect.obj \ $(SLO)$/mailmodel.obj \ $(SLO)$/partwnd.obj \ + $(SLO)$/passwd.obj \ $(SLO)$/recfloat.obj \ $(SLO)$/templdlg.obj \ $(SLO)$/dinfdlg.obj \ diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index beb43c192810..77d52b814ec1 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -329,13 +329,13 @@ void SfxVersionDialog::Open_Impl() SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") ); SfxStringItem aFile( SID_FILE_NAME, pObjShell->GetMedium()->GetName() ); - ::rtl::OUString aPassString; - if ( GetPasswd_Impl( pObjShell->GetMedium()->GetItemSet(), aPassString ) ) + uno::Sequence< beans::NamedValue > aEncryptionData; + if ( GetEncryptionData_Impl( pObjShell->GetMedium()->GetItemSet(), aEncryptionData ) ) { // there is a password, it should be used during the opening - SfxStringItem aPassItem( SID_PASSWORD, aPassString ); + SfxUnoAnyItem aEncryptionDataItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ); pViewFrame->GetDispatcher()->Execute( - SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, &aPassItem, 0L ); + SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, &aEncryptionDataItem, 0L ); } else pViewFrame->GetDispatcher()->Execute( diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 29081e8e8418..6b9afa136e46 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -881,17 +881,21 @@ uno::Reference < embed::XStorage > SfxMedium::GetOutputStorage() } //------------------------------------------------------------------ -void SfxMedium::SetPasswordToStorage_Impl() +void SfxMedium::SetEncryptionDataToStorage_Impl() { // in case media-descriptor contains password it should be used on opening if ( pImp->xStorage.is() && pSet ) { - ::rtl::OUString aPasswd; - if ( GetPasswd_Impl( pSet, aPasswd ) ) + uno::Sequence< beans::NamedValue > aEncryptionData; + if ( GetEncryptionData_Impl( pSet, aEncryptionData ) ) { + // replace the password with encryption data + pSet->ClearItem( SID_PASSWORD ); + pSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); + try { - ::comphelper::OStorageHelper::SetCommonStoragePassword( pImp->xStorage, aPasswd ); + ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( pImp->xStorage, aEncryptionData ); } catch( uno::Exception& ) { @@ -1326,7 +1330,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf // TODO/LATER: Get versionlist on demand if ( pImp->xStorage.is() ) { - SetPasswordToStorage_Impl(); + SetEncryptionDataToStorage_Impl(); GetVersionList(); } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 3c4df7276d6b..6b2b5dcb8c0b 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -978,12 +978,11 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, NULL ); const SfxPoolItem* pItem = NULL; - if ( bPreselectPassword && aDialogParams.GetItemState( SID_PASSWORD, sal_True, &pItem ) != SFX_ITEM_SET ) + if ( bPreselectPassword && aDialogParams.GetItemState( SID_ENCRYPTIONDATA, sal_True, &pItem ) != SFX_ITEM_SET ) { - // the file dialog preselects the password checkbox if the provided mediadescriptor has password entry - // after dialog execution the password entry will be either removed or replaced with the password - // entered by the user - aDialogParams.Put( SfxStringItem( SID_PASSWORD, String() ) ); + // the file dialog preselects the password checkbox if the provided mediadescriptor has encryption data entry + // after dialog execution the password interaction flag will be either removed or not + aDialogParams.Put( SfxBoolItem( SID_PASSWORDINTERACTION, sal_True ) ); } // aStringTypeFN is a pure output parameter, pDialogParams is an in/out parameter @@ -1590,6 +1589,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& DocumentSettingsGuard aSettingsGuard( aModelData.GetModel(), aModelData.IsRecommendReadOnly(), nStoreMode & EXPORT_REQUESTED ); + OSL_ENSURE( aModelData.GetMediaDescr().find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ) ) == aModelData.GetMediaDescr().end(), "The Password property of MediaDescriptor should not be used here!" ); if ( aOptions.IsDocInfoSave() && ( !aModelData.GetStorable()->hasLocation() || INetURLObject( aModelData.GetStorable()->getLocation() ) != aURL ) ) diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index bb0e6939ead8..ff10b7917142 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -599,8 +599,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // ======================================================================================================== sal_Bool bPreselectPassword = sal_False; - SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldPasswordItem, SfxStringItem, SID_PASSWORD, FALSE ); - if ( pOldPasswordItem ) + SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, FALSE ); + if ( pOldEncryptionDataItem ) bPreselectPassword = sal_True; uno::Sequence< beans::PropertyValue > aDispatchArgs; diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 037493c61252..c3f532ad1ba6 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -202,16 +202,30 @@ sal_Bool SfxObjectShell::QuerySlotExecutable( USHORT /*nSlotId*/ ) //------------------------------------------------------------------------- -sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, ::rtl::OUString& rPasswd ) +bool GetEncryptionData_Impl( const SfxItemSet* pSet, uno::Sequence< beans::NamedValue >& o_rEncryptionData ) { - const SfxPoolItem* pItem = NULL; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_PASSWORD, sal_True, &pItem ) ) + bool bResult = false; + if ( pSet ) { - DBG_ASSERT( pItem->IsA( TYPE(SfxStringItem) ), "wrong item type" ); - rPasswd = ( (const SfxStringItem*)pItem )->GetValue(); - return sal_True; + SFX_ITEMSET_ARG( pSet, pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False); + if ( pEncryptionDataItem ) + { + pEncryptionDataItem->GetValue() >>= o_rEncryptionData; + bResult = true; + } + else + { + SFX_ITEMSET_ARG( pSet, pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False); + if ( pPasswordItem ) + { + ::rtl::OUString aPassword = pPasswordItem->GetValue(); + o_rEncryptionData = ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPassword ); + bResult = true; + } + } } - return sal_False; + + return bResult; } //------------------------------------------------------------------------- @@ -996,15 +1010,15 @@ sal_Bool SfxObjectShell::DoSave() pImp->bIsSaving = sal_True; - ::rtl::OUString aPasswd; + uno::Sequence< beans::NamedValue > aEncryptionData; if ( IsPackageStorageFormat_Impl( *GetMedium() ) ) { - if ( GetPasswd_Impl( GetMedium()->GetItemSet(), aPasswd ) ) + if ( GetEncryptionData_Impl( GetMedium()->GetItemSet(), aEncryptionData ) ) { try { //TODO/MBA: GetOutputStorage?! Special mode, because it's "Save"?! - ::comphelper::OStorageHelper::SetCommonStoragePassword( GetMedium()->GetStorage(), aPasswd ); + ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( GetMedium()->GetStorage(), aEncryptionData ); bOk = sal_True; } catch( uno::Exception& ) @@ -1386,13 +1400,13 @@ sal_Bool SfxObjectShell::SaveTo_Impl } // transfer password from the parameters to the storage - ::rtl::OUString aPasswd; + uno::Sequence< beans::NamedValue > aEncryptionData; sal_Bool bPasswdProvided = sal_False; - if ( GetPasswd_Impl( rMedium.GetItemSet(), aPasswd ) ) + if ( GetEncryptionData_Impl( rMedium.GetItemSet(), aEncryptionData ) ) { bPasswdProvided = sal_True; try { - ::comphelper::OStorageHelper::SetCommonStoragePassword( xMedStorage, aPasswd ); + ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( xMedStorage, aEncryptionData ); bOk = sal_True; } catch( uno::Exception& ) @@ -3154,13 +3168,13 @@ sal_Bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium ) SFX_ITEMSET_ARG( rMedium.GetItemSet(), pPasswdItem, SfxStringItem, SID_PASSWORD, sal_False ); if ( pPasswdItem || ERRCODE_IO_ABORT != CheckPasswd_Impl( this, SFX_APP()->GetPool(), pMedium ) ) { - ::rtl::OUString aPasswd; - if ( GetPasswd_Impl(pMedium->GetItemSet(), aPasswd) ) + uno::Sequence< beans::NamedValue > aEncryptionData; + if ( GetEncryptionData_Impl(pMedium->GetItemSet(), aEncryptionData) ) { try { // the following code must throw an exception in case of failure - ::comphelper::OStorageHelper::SetCommonStoragePassword( xStorage, aPasswd ); + ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( xStorage, aEncryptionData ); } catch( uno::Exception& ) { diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 846cc669b9a7..caf4a26d96e9 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -980,6 +980,8 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString& aArgs.remove( "InputStream" ); aArgs.remove( "URL" ); aArgs.remove( "Frame" ); + aArgs.remove( "Password" ); + aArgs.remove( "EncryptionData" ); // TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here @@ -1633,6 +1635,11 @@ void SAL_CALL SfxBaseModel::storeAsURL( const ::rtl::OUString& uno::Sequence< beans::PropertyValue > aSequence ; TransformItems( SID_OPENDOC, *m_pData->m_pObjectShell->GetMedium()->GetItemSet(), aSequence ); attachResource( rURL, aSequence ); + +#if OSL_DEBUG_LEVEL > 0 + SFX_ITEMSET_ARG( m_pData->m_pObjectShell->GetMedium()->GetItemSet(), pPasswdItem, SfxStringItem, SID_PASSWORD, sal_False); + OSL_ENSURE( !pPasswdItem, "There should be no Password property in the document MediaDescriptor!" ); +#endif } } @@ -1891,6 +1898,11 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >& SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHidItem, SfxBoolItem, SID_HIDDEN, sal_False); if ( pHidItem ) bHidden = pHidItem->GetValue(); + +#if OSL_DEBUG_LEVEL > 0 + SFX_ITEMSET_ARG( pMedium->GetItemSet(), pPasswdItem, SfxStringItem, SID_PASSWORD, sal_False); + OSL_ENSURE( !pPasswdItem, "There should be no Password property in the document MediaDescriptor!" ); +#endif // !TODO: will be done by Framework! pMedium->SetUpdatePickList( !bHidden ); } @@ -2667,49 +2679,41 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL aArgHash.erase( aFilterString ); aArgHash.erase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ) ); - // if the password is changed SaveAs should be done - // no password for encrypted document is also a change here - sal_Bool bPassChanged = sal_False; - - ::comphelper::SequenceAsHashMap::iterator aNewPassIter - = aArgHash.find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ) ); - SFX_ITEMSET_ARG( pMedium->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False ); - if ( pPasswordItem && aNewPassIter != aArgHash.end() ) + try { - ::rtl::OUString aNewPass; - aNewPassIter->second >>= aNewPass; - bPassChanged = !aNewPass.equals( pPasswordItem->GetValue() ); + storeSelf( aArgHash.getAsConstPropertyValueList() ); + bSaved = sal_True; } - else if ( pPasswordItem || aNewPassIter != aArgHash.end() ) - bPassChanged = sal_True; - - if ( !bPassChanged ) + catch( const lang::IllegalArgumentException& ) { - try + // some additional arguments do not allow to use saving, SaveAs should be done + // but only for normal documents, the shared documents would be overwritten in this case + // that would mean an information loss + // TODO/LATER: need a new interaction for this case + if ( m_pData->m_pObjectShell->IsDocShared() ) { - storeSelf( aArgHash.getAsConstPropertyValueList() ); - bSaved = sal_True; - } - catch( const lang::IllegalArgumentException& ) - { - // some additional arguments do not allow to use saving, SaveAs should be done - // but only for normal documents, the shared documents would be overwritten in this case - // that would mean an information loss - // TODO/LATER: need a new interaction for this case - if ( m_pData->m_pObjectShell->IsDocShared() ) - { - m_pData->m_pObjectShell->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Can't store shared document!" ) ) ); - m_pData->m_pObjectShell->StoreLog(); + m_pData->m_pObjectShell->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Can't store shared document!" ) ) ); + m_pData->m_pObjectShell->StoreLog(); + uno::Sequence< beans::NamedValue > aNewEncryptionData = aArgHash.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EncryptionData" ) ), uno::Sequence< beans::NamedValue >() ); + if ( !aNewEncryptionData.getLength() ) + { + ::rtl::OUString aNewPassword = aArgHash.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ), ::rtl::OUString() ); + aNewEncryptionData = ::comphelper::OStorageHelper::CreatePackageEncryptionData( aNewPassword ); + } + + uno::Sequence< beans::NamedValue > aOldEncryptionData; + GetEncryptionData_Impl( pMedium->GetItemSet(), aOldEncryptionData ); + + if ( !aOldEncryptionData.getLength() && !aNewEncryptionData.getLength() ) throw; + else + { + // if the password is changed a special error should be used in case of shared document + throw task::ErrorCodeIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant change password for shared document." ) ), uno::Reference< uno::XInterface >(), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ); } } } - else if ( m_pData->m_pObjectShell->IsDocShared() ) - { - // if the password is changed a special error should be used in case of shared document - throw task::ErrorCodeIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant change password for shared document." ) ), uno::Reference< uno::XInterface >(), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ); - } } } } From d516dcef04404a01573f287526a07e53ace75de7 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 5 Nov 2010 10:23:15 +0100 Subject: [PATCH 229/279] dockingwindows: #i115423# Fix missing component_writeInfo in custom toolpanel extension located in sfx2/workben --- sfx2/workben/custompanel/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfx2/workben/custompanel/makefile.mk b/sfx2/workben/custompanel/makefile.mk index 1eb20ceed35d..2a4704af499a 100644 --- a/sfx2/workben/custompanel/makefile.mk +++ b/sfx2/workben/custompanel/makefile.mk @@ -67,7 +67,7 @@ SHL1STDLIBS= \ $(SALHELPERLIB) \ $(CPPUHELPERLIB) -SHL1VERSIONMAP=$(SOLARSRC)/solenv/src/component.map +SHL1VERSIONMAP=$(SOLARSRC)/solenv/src/reg-component.map SHL1LIBS= $(LIB1TARGET) SHL1DEF= $(MISC)/$(SHL1TARGET).def SHL1RPATH= OXT From ee1eea2290eb17c427efa9deecac83b1c354bca1 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 5 Nov 2010 15:58:35 +0100 Subject: [PATCH 230/279] pl08: #163778# check SID_PASSWORD also here --- sfx2/source/doc/objserv.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index ff10b7917142..b0be3638f2a4 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -600,7 +600,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) sal_Bool bPreselectPassword = sal_False; SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, FALSE ); - if ( pOldEncryptionDataItem ) + SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldPasswordItem, SfxStringItem, SID_PASSWORD, FALSE ); + if ( pOldEncryptionDataItem || pOldPasswordItem ) bPreselectPassword = sal_True; uno::Sequence< beans::PropertyValue > aDispatchArgs; From c095077decb7470df00f343be3068e894a2fd582 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 5 Nov 2010 16:14:26 +0100 Subject: [PATCH 231/279] remove duplicate entry for passwd.obj --- sfx2/source/dialog/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk index 705a4c040b1a..572053557e00 100644 --- a/sfx2/source/dialog/makefile.mk +++ b/sfx2/source/dialog/makefile.mk @@ -42,7 +42,6 @@ EXCEPTIONSFILES=\ $(SLO)$/itemconnect.obj \ $(SLO)$/mailmodel.obj \ $(SLO)$/partwnd.obj \ - $(SLO)$/passwd.obj \ $(SLO)$/recfloat.obj \ $(SLO)$/templdlg.obj \ $(SLO)$/dinfdlg.obj \ From 00b02d6380c5e4b8df7d2241bdb4a129a34c8322 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Sat, 6 Nov 2010 15:58:44 +0100 Subject: [PATCH 232/279] gnumake2: added component registration --- framework/Library_fwk.mk | 2 ++ framework/Library_fwl.mk | 2 ++ framework/Library_fwm.mk | 2 ++ sfx2/{Library_sfx2.mk => Library_sfx.mk} | 2 ++ sfx2/Module_sfx2.mk | 2 +- xmloff/Library_xo.mk | 2 ++ xmloff/Library_xof.mk | 2 ++ 7 files changed, 13 insertions(+), 1 deletion(-) rename sfx2/{Library_sfx2.mk => Library_sfx.mk} (99%) diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index c9f52c1f2699..c0135dc650f0 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -29,6 +29,8 @@ $(eval $(call gb_Library_Library,fwk)) $(eval $(call gb_Library_add_precompiled_header,fwk,$(SRCDIR)/framework/inc/pch/precompiled_framework)) +$(eval $(call gb_Library_set_componentfile,fwk,framework/util/fwk)) + $(eval $(call gb_Library_set_include,fwk,\ -I$(SRCDIR)/framework/inc/pch \ -I$(SRCDIR)/framework/source/inc \ diff --git a/framework/Library_fwl.mk b/framework/Library_fwl.mk index 7af0fef7dd10..ed4cf040b74d 100644 --- a/framework/Library_fwl.mk +++ b/framework/Library_fwl.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,fwl)) +$(eval $(call gb_Library_set_componentfile,fwl,framework/util/fwl)) + $(eval $(call gb_Library_set_include,fwl,\ -I$(SRCDIR)/framework/inc \ -I$(SRCDIR)/framework/inc/pch \ diff --git a/framework/Library_fwm.mk b/framework/Library_fwm.mk index 56a6a9f74f6b..d31b81ffc9ff 100644 --- a/framework/Library_fwm.mk +++ b/framework/Library_fwm.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,fwm)) +$(eval $(call gb_Library_set_componentfile,fwm,framework/util/fwm)) + $(eval $(call gb_Library_set_include,fwm,\ -I$(SRCDIR)/framework/inc/pch \ -I$(SRCDIR)/framework/inc \ diff --git a/sfx2/Library_sfx2.mk b/sfx2/Library_sfx.mk similarity index 99% rename from sfx2/Library_sfx2.mk rename to sfx2/Library_sfx.mk index fbe4fb4c5926..fb88cd015029 100644 --- a/sfx2/Library_sfx2.mk +++ b/sfx2/Library_sfx.mk @@ -36,6 +36,8 @@ $(eval $(call gb_Library_add_precompiled_header,sfx,$(SRCDIR)/sfx2/inc/pch/preco $(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) +$(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx)) + $(eval $(call gb_Library_set_include,sfx,\ -I$(SRCDIR)/sfx2/inc \ -I$(SRCDIR)/sfx2/inc/sfx2 \ diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk index b0c026c3732d..f6ac7c4c053e 100755 --- a/sfx2/Module_sfx2.mk +++ b/sfx2/Module_sfx2.mk @@ -29,7 +29,7 @@ $(eval $(call gb_Module_Module,sfx2)) $(eval $(call gb_Module_add_targets,sfx2,\ AllLangResTarget_sfx2 \ - Library_sfx2 \ + Library_sfx \ Package_inc \ Package_sdi \ )) diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk index 8ebf82b5cf4d..22143b1d2bc8 100644 --- a/xmloff/Library_xo.mk +++ b/xmloff/Library_xo.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,xo)) +$(eval $(call gb_Library_set_componentfile,xo,xmloff/util/xo)) + $(eval $(call gb_Library_add_package_headers,xo,xmloff_inc)) $(eval $(call gb_Library_add_precompiled_header,xo,$(SRCDIR)/xmloff/inc/pch/precompiled_xmloff)) diff --git a/xmloff/Library_xof.mk b/xmloff/Library_xof.mk index 320aafbf12fe..710e836c0950 100644 --- a/xmloff/Library_xof.mk +++ b/xmloff/Library_xof.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,xof)) +$(eval $(call gb_Library_set_componentfile,xof,xmloff/source/transform/xof)) + $(eval $(call gb_Library_set_include,xof,\ -I$(SRCDIR)/xmloff/inc/pch \ -I$(SRCDIR)/xmloff/inc \ From da8aa1f2aa04522f098474fa93898ab8716841d0 Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 8 Nov 2010 10:36:41 +0100 Subject: [PATCH 233/279] masterfix DEV300: #i10000# WaE converting negative value '-0x000000001' to 'USHORT' --- sfx2/source/view/viewsh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 5c41ba167c55..ea92507ba13f 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -252,7 +252,7 @@ SfxViewShell_Impl::SfxViewShell_Impl(USHORT const nFlags) , m_bGotOwnership(false) , m_bGotFrameOwnership(false) , m_eScroll(SCROLLING_DEFAULT) -, m_nFamily(-1) // undefined, default set by TemplateDialog +, m_nFamily(0xFFFF) // undefined, default set by TemplateDialog , m_pController(0) , m_pAccExec(0) {} From 0c8659b5564329aa994ce19fb30859016d185c92 Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Mon, 8 Nov 2010 14:15:53 +0100 Subject: [PATCH 234/279] dv22#i115288# Allow user to ignore updates for an extension --- .../source/deployment/gui/dp_gui_dialog2.cxx | 8 +++++--- .../deployment/gui/dp_gui_updatedialog.cxx | 17 +++++++++-------- .../deployment/gui/dp_gui_updatedialog.src | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) mode change 100644 => 100755 desktop/source/deployment/gui/dp_gui_dialog2.cxx diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx old mode 100644 new mode 100755 index 4efb1e0c202b..8fd0f4c754d0 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -227,13 +227,10 @@ const Size ExtBoxWithBtns_Impl::GetMinOutputSizePixel() const // ----------------------------------------------------------------------- void ExtBoxWithBtns_Impl::RecalcAll() { - ExtensionBox_Impl::RecalcAll(); - const sal_Int32 nActive = getSelIndex(); if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) { - SetButtonPos( GetEntryRect( nActive ) ); SetButtonStatus( GetEntryData( nActive) ); } else @@ -242,6 +239,11 @@ void ExtBoxWithBtns_Impl::RecalcAll() m_pEnableBtn->Hide(); m_pRemoveBtn->Hide(); } + + ExtensionBox_Impl::RecalcAll(); + + if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + SetButtonPos( GetEntryRect( nActive ) ); } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 45a514a3511c..df51d5c1b79c 100755 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -884,11 +884,13 @@ void UpdateDialog::checkingDone() { clearDescription(); m_description.Enable(); m_descriptions.Enable(); - showDescription( - ( m_disabledUpdates.empty() && m_specificErrors.empty() ) - ? m_none : m_noInstallable, false ); + + if ( m_disabledUpdates.empty() && m_specificErrors.empty() && m_ignoredUpdates.empty() ) + showDescription( m_none, false ); + else + showDescription( m_noInstallable, false ); } - // TODO: show special message, when only ignored updates available + enableOk(); } @@ -1331,8 +1333,6 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) if ( p->m_bIgnored ) b.append( m_ignoredUpdate ); - else - b.append( m_noDescription ); break; } @@ -1342,8 +1342,6 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) if ( p->m_bIgnored ) b.append( m_ignoredUpdate ); - else - b.append( m_noDescription ); UpdateDialog::DisabledUpdate & data = m_disabledUpdates[ pos ]; if (data.unsatisfiedDependencies.getLength() != 0) @@ -1392,6 +1390,9 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) } } + if ( b.getLength() == 0 ) + b.append( m_noDescription ); + showDescription( b.makeStringAndClear(), bInserted ); return 0; } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src index 422de5a58dd0..4da431733e31 100755 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.src +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src @@ -228,7 +228,7 @@ ModalDialog RID_DLG_UPDATE { Text[en-US] = "No new updates are available."; }; String RID_DLG_UPDATE_NOINSTALLABLE { - Text[en-US] = "No installable updates are available. To see all updates, mark the check box 'Show all updates'."; + Text[en-US] = "No installable updates are available. To see ignored or disabled updates, mark the check box 'Show all updates'."; }; String RID_DLG_UPDATE_FAILURE { Text[en-US] = "An error occurred:"; @@ -237,7 +237,7 @@ ModalDialog RID_DLG_UPDATE { Text[en-US] = "Unknown error."; }; String RID_DLG_UPDATE_NODESCRIPTION { - Text[en-US] = "No descriptions available for this extension."; + Text[en-US] = "No more details are available for this update."; }; String RID_DLG_UPDATE_NOINSTALL { Text[en-US] = "The extension cannot be updated because:"; From a3a2562211693ce3c2aa5ea2ca084f35edb6d60d Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 9 Nov 2010 10:26:49 +0100 Subject: [PATCH 235/279] cws tlmath01: #i972# adding missing config entry for WriterWeb --- .../registry/schema/org/openoffice/Office/WriterWeb.xcs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs index 8738d9db2112..b92e4684c842 100644 --- a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs @@ -418,6 +418,15 @@ Contains miscellaneous settings. + + + + TL + Automatically align the baseline of Math objects with the baseline of the surrounding text. + + + true + From 750cd2ac9658ccccf379f2d20f2990bbf82e1d64 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 10 Nov 2010 14:08:20 +0100 Subject: [PATCH 236/279] sw33bf12: #i115492# method - ignore svg:d attribute for text documents from OOo version before OOo 3.3 --- xmloff/source/draw/ximpshap.cxx | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index b073e1e28d40..a26806ce6c24 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -1926,7 +1926,35 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA SetLayer(); if ( maPath.hasValue() ) - xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier") ), maPath ); + { + // --> OD #i115492# + // Ignore svg:d attribute for text documents created by OpenOffice.org + // versions before OOo 3.3, because these OOo versions are storing + // svg:d values not using the correct unit. + bool bApplySVGD( true ); + if ( uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() ) + { + sal_Int32 nUPD( 0 ); + sal_Int32 nBuild( 0 ); + const bool bBuildIdFound = GetImport().getBuildIds( nUPD, nBuild ); + if ( GetImport().IsTextDocInOOoFileFormat() || + ( bBuildIdFound && + ( ( nUPD == 641 ) || ( nUPD == 645 ) || // prior OOo 2.0 + ( nUPD == 680 ) || // OOo 2.x + ( nUPD == 300 ) || // OOo 3.0 - OOo 3.0.1 + ( nUPD == 310 ) || // OOo 3.1 - OOo 3.1.1 + ( nUPD == 320 ) ) ) ) // OOo 3.2 - OOo 3.2.1 + { + bApplySVGD = false; + } + } + + if ( bApplySVGD ) + { + xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier") ), maPath ); + } + // <-- + } SdXMLShapeContext::StartElement(xAttrList); } From 534546649af815f149a3b03abdd46a50091b8477 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 10 Nov 2010 15:26:03 +0100 Subject: [PATCH 237/279] gnumake2: first try at local build dirs --- framework/Makefile | 1 + framework/prj/makefile.mk | 2 +- sfx2/Makefile | 1 + sfx2/prj/makefile.mk | 2 +- xmloff/Makefile | 1 + xmloff/prj/makefile.mk | 2 +- 6 files changed, 6 insertions(+), 3 deletions(-) diff --git a/framework/Makefile b/framework/Makefile index c19100ee9a5b..45de5eecabc0 100644 --- a/framework/Makefile +++ b/framework/Makefile @@ -29,6 +29,7 @@ ifeq ($(strip $(SOLARENV)),) $(error No environment set!) endif +gb_PARTITIALBUILD := T include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../SourcePath.mk GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk diff --git a/framework/prj/makefile.mk b/framework/prj/makefile.mk index 3b1b54d4357f..3d495209d74a 100644 --- a/framework/prj/makefile.mk +++ b/framework/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) install diff --git a/sfx2/Makefile b/sfx2/Makefile index c19100ee9a5b..45de5eecabc0 100644 --- a/sfx2/Makefile +++ b/sfx2/Makefile @@ -29,6 +29,7 @@ ifeq ($(strip $(SOLARENV)),) $(error No environment set!) endif +gb_PARTITIALBUILD := T include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../SourcePath.mk GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk diff --git a/sfx2/prj/makefile.mk b/sfx2/prj/makefile.mk index 3b1b54d4357f..3d495209d74a 100644 --- a/sfx2/prj/makefile.mk +++ b/sfx2/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) install diff --git a/xmloff/Makefile b/xmloff/Makefile index c19100ee9a5b..45de5eecabc0 100644 --- a/xmloff/Makefile +++ b/xmloff/Makefile @@ -29,6 +29,7 @@ ifeq ($(strip $(SOLARENV)),) $(error No environment set!) endif +gb_PARTITIALBUILD := T include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../SourcePath.mk GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk diff --git a/xmloff/prj/makefile.mk b/xmloff/prj/makefile.mk index 3b1b54d4357f..3d495209d74a 100644 --- a/xmloff/prj/makefile.mk +++ b/xmloff/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) install From e506ebbc87e7c722d3b674b9b74efc3218bf8294 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 11 Nov 2010 11:46:35 +0100 Subject: [PATCH 238/279] dockingwindows: #i115527# Fixed broken Reset function in View-Toolbars. Refresh method must read persistent state data. --- .../source/layoutmanager/layoutmanager.cxx | 9 ++++--- .../layoutmanager/toolbarlayoutmanager.cxx | 27 ++++++++++++------- .../layoutmanager/toolbarlayoutmanager.hxx | 2 +- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 9ab558860150..e5bf08cf0300 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -3135,13 +3135,13 @@ void SAL_CALL LayoutManager::elementReplaced( const ui::ConfigurationEvent& Even parseResourceURL( Event.ResourceURL, aElementType, aElementName ); if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) - { - if ( xToolbarManager.is() ) + { + if ( xToolbarManager.is() ) { xToolbarManager->elementReplaced( Event ); bRefreshLayout = pToolbarManager->isLayoutDirty(); } - } + } else { Reference< XUIElement > xUIElement = implts_findElement( Event.ResourceURL ); @@ -3200,10 +3200,11 @@ void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32 n ReadGuard aReadLock( m_aLock ); Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager ); ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; + bool bAutomaticToolbars( m_bAutomaticToolbars ); aReadLock.unlock(); if ( pToolbarManager ) - pToolbarManager->refreshToolbarsVisibility(); + pToolbarManager->refreshToolbarsVisibility( bAutomaticToolbars ); } break; } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 5821a6a29d37..559e7707ac36 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -595,27 +595,34 @@ bool ToolbarLayoutManager::hideToolbar( const ::rtl::OUString& rResourceURL ) return false; } -void ToolbarLayoutManager::refreshToolbarsVisibility() +void ToolbarLayoutManager::refreshToolbarsVisibility( bool bAutomaticToolbars ) { UIElementVector aUIElementVector; + + ReadGuard aReadLock( m_aLock ); + bool bVisible( m_bVisible ); + aReadLock.unlock(); + + if ( !bVisible || !bAutomaticToolbars ) + return; + implts_getUIElementVectorCopy( aUIElementVector ); + UIElement aUIElement; vos::OGuard aGuard( Application::GetSolarMutex() ); UIElementVector::iterator pIter; for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) { - Window* pWindow = getWindowFromXUIElement( pIter->m_xUIElement ); - if ( pWindow ) + if ( implts_readWindowStateData( pIter->m_aName, aUIElement ) && + ( pIter->m_bVisible != aUIElement.m_bVisible ) && !pIter->m_bMasterHide ) { - if ( pIter->m_bVisible && !pIter->m_bMasterHide ) + WriteGuard aWriteLock( m_aLock ); + UIElement& rUIElement = impl_findToolbar( pIter->m_aName ); + if ( rUIElement.m_aName == pIter->m_aName ) { - if ( pIter->m_bFloating ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); - else - implts_setLayoutDirty(); + rUIElement.m_bVisible = aUIElement.m_bVisible; + implts_setLayoutDirty(); } - else - pWindow->Show( FALSE ); } } } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index ebbfe23f1714..baf6f088cc2e 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -128,7 +128,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a bool showToolbar( const ::rtl::OUString& rResourceURL ); bool hideToolbar( const ::rtl::OUString& rResourceURL ); - void refreshToolbarsVisibility(); + void refreshToolbarsVisibility( bool bAutomaticToolbars ); void setFloatingToolbarsVisibility( bool bVisible ); void setVisible(bool bVisible); bool isVisible() { return m_bVisible; } From 5749660e98e5f1e6443bc59d28afe4524fdb95fb Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 11 Nov 2010 15:46:29 +0100 Subject: [PATCH 239/279] gnumake2: fix naming for partial build vars --- framework/Makefile | 2 +- sfx2/Makefile | 2 +- xmloff/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/Makefile b/framework/Makefile index b7391a8db240..5002d3f122a1 100644 --- a/framework/Makefile +++ b/framework/Makefile @@ -29,7 +29,7 @@ ifeq ($(strip $(SOLARENV)),) $(error No environment set!) endif -gb_PARTITIALBUILD := T +gb_PARTIALBUILD := T GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk diff --git a/sfx2/Makefile b/sfx2/Makefile index b7391a8db240..5002d3f122a1 100644 --- a/sfx2/Makefile +++ b/sfx2/Makefile @@ -29,7 +29,7 @@ ifeq ($(strip $(SOLARENV)),) $(error No environment set!) endif -gb_PARTITIALBUILD := T +gb_PARTIALBUILD := T GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk diff --git a/xmloff/Makefile b/xmloff/Makefile index b7391a8db240..5002d3f122a1 100644 --- a/xmloff/Makefile +++ b/xmloff/Makefile @@ -29,7 +29,7 @@ ifeq ($(strip $(SOLARENV)),) $(error No environment set!) endif -gb_PARTITIALBUILD := T +gb_PARTIALBUILD := T GBUILDDIR := $(SOLARENV)/gbuild include $(GBUILDDIR)/gbuild.mk From c0398862334d70c0ecd81833569dc279a628b5e6 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Mon, 15 Nov 2010 15:50:02 +0100 Subject: [PATCH 240/279] impress202: #i113748# applied patch to resolv memory leak for XMLTextListAutoStylePoolEntry_Impl --- xmloff/source/text/XMLTextListAutoStylePool.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx index b1b9f039c6b4..f7cbe73acd1b 100644 --- a/xmloff/source/text/XMLTextListAutoStylePool.cxx +++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx @@ -185,7 +185,15 @@ XMLTextListAutoStylePool::XMLTextListAutoStylePool( SvXMLExport& rExp ) : XMLTextListAutoStylePool::~XMLTextListAutoStylePool() { + // The XMLTextListAutoStylePoolEntry_Impl object in the pool need delete explicitly in dtor. + ULONG nCount = pPool->Count(); + while ( nCount-- ) + delete pPool->Remove(nCount); delete pPool; + + nCount = pNames->Count(); + while ( nCount-- ) + delete pNames->Remove(nCount); delete pNames; } From 2a938152b6e75310deb79873f3617e78f88b0b71 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 16 Nov 2010 16:41:12 +0100 Subject: [PATCH 241/279] fwk160: #i113943# catch the exception --- sfx2/source/dialog/filedlghelper.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 02b9003f59d2..8f919a3980ff 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1867,7 +1867,16 @@ void FileDialogHelper_Impl::addFilters( sal_Int64 nFlags, sQuery.appendAscii(":eflags=" ); sQuery.append (::rtl::OUString::valueOf((sal_Int32)m_nDontFlags)); - uno::Reference< XEnumeration > xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery.makeStringAndClear()); + uno::Reference< XEnumeration > xResult; + try + { + xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery.makeStringAndClear()); + } + catch( uno::Exception& ) + { + DBG_ERRORFILE( "Could not get filters from the configuration!" ); + } + TSortedFilterList aIter (xResult); // no matcher any longer used ... From 83efadae3bf8c548b9986e720066f59efcd609db Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 17 Nov 2010 14:33:18 +0100 Subject: [PATCH 242/279] gnumake2: updated license headers --- framework/Makefile | 2 +- sfx2/Makefile | 2 +- xmloff/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/Makefile b/framework/Makefile index 5002d3f122a1..a79aff831024 100644 --- a/framework/Makefile +++ b/framework/Makefile @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # diff --git a/sfx2/Makefile b/sfx2/Makefile index 5002d3f122a1..a79aff831024 100644 --- a/sfx2/Makefile +++ b/sfx2/Makefile @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # diff --git a/xmloff/Makefile b/xmloff/Makefile index 5002d3f122a1..a79aff831024 100644 --- a/xmloff/Makefile +++ b/xmloff/Makefile @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # From 731881b92ce7131aff3f78ee8cd9d7c9c524174e Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 17 Nov 2010 15:16:52 +0100 Subject: [PATCH 243/279] sb136: #i115386# prefer en[-US] over empty xml:lang value, to accomodate existing extensions with bad .xcu content --- configmgr/source/childaccess.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx index c20fa49fb18c..d387f351de30 100644 --- a/configmgr/source/childaccess.cxx +++ b/configmgr/source/childaccess.cxx @@ -282,8 +282,8 @@ css::uno::Any ChildAccess::asValue() { if (!Components::allLocales(locale)) { // Find best match using an adaption of RFC 4647 lookup matching // rules, removing "-" or "_" delimited segments from the end; - // defaults are the empty string locale, the "en-US" locale, the - // "en" locale, the first child (if any), or a nil value (even + // defaults are the "en-US" locale, the "en" locale, the empty + // string locale, the first child (if any), or a nil value (even // though it may be illegal for the given property), in that // order: rtl::Reference< ChildAccess > child; @@ -296,6 +296,9 @@ css::uno::Any ChildAccess::asValue() { while (i > 0 && locale[i] != '-' && locale[i] != '_') { --i; } + if (i == 0) { + break; + } locale = locale.copy(0, i); } if (!child.is()) { @@ -305,10 +308,13 @@ css::uno::Any ChildAccess::asValue() { child = getChild( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"))); if (!child.is()) { - std::vector< rtl::Reference< ChildAccess > > all( - getAllChildren()); - if (!all.empty()) { - child = all.front(); + child = getChild(rtl::OUString()); + if (!child.is()) { + std::vector< rtl::Reference< ChildAccess > > + all(getAllChildren()); + if (!all.empty()) { + child = all.front(); + } } } } From 94753953df87e4d761ff9fa30333dc02994f6d3f Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Wed, 17 Nov 2010 18:31:31 +0100 Subject: [PATCH 244/279] #i115639# --- sfx2/qa/cppunit/makefile.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk index dce0b86a0619..b53a04ec43f9 100644 --- a/sfx2/qa/cppunit/makefile.mk +++ b/sfx2/qa/cppunit/makefile.mk @@ -25,6 +25,10 @@ # #************************************************************************* +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + PRJ=../.. PRJNAME=sfx2 TARGET=qa_cppunit @@ -79,3 +83,4 @@ SLOFILES= \ .INCLUDE : target.mk .INCLUDE : _cppunit.mk +.END From 4b2c8bef449435fdece84ba82830d916d52d25aa Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 18 Nov 2010 13:44:07 +0100 Subject: [PATCH 245/279] fwk160: #i114694# support XDocumentEventBroadcaster --- sfx2/inc/sfx2/event.hxx | 24 ++++++ sfx2/inc/sfx2/sfxbasemodel.hxx | 29 +++++-- sfx2/source/appl/app.cxx | 4 +- sfx2/source/config/evntconf.cxx | 1 + sfx2/source/doc/objmisc.cxx | 4 +- sfx2/source/doc/sfxbasemodel.cxx | 107 +++++++++++++++++++------ sfx2/source/view/frame.cxx | 2 +- sfx2/source/view/sfxbasecontroller.cxx | 4 +- 8 files changed, 138 insertions(+), 37 deletions(-) diff --git a/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx index 71ae9c182fb3..b9beb12bfeff 100644 --- a/sfx2/inc/sfx2/event.hxx +++ b/sfx2/inc/sfx2/event.hxx @@ -36,6 +36,7 @@ #include #include +#include class SfxObjectShell; @@ -67,6 +68,29 @@ public: //------------------------------------------------------------------- +class SFX2_DLLPUBLIC SfxViewEventHint : public SfxEventHint +{ + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 > xViewController; + +public: + TYPEINFO(); + + SfxViewEventHint( USHORT nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) + : SfxEventHint( nId, aName, pObj ) + , xViewController( xController, ::com::sun::star::uno::UNO_QUERY ) + {} + + SfxViewEventHint( USHORT nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController ) + : SfxEventHint( nId, aName, pObj ) + , xViewController( xController ) + {} + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 > GetController() const + { return xViewController; } +}; + +//------------------------------------------------------------------- + class SfxNamedHint : public SfxHint { String _aEventName; diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx index 00ee49a18004..26122419e661 100644 --- a/sfx2/inc/sfx2/sfxbasemodel.hxx +++ b/sfx2/inc/sfx2/sfxbasemodel.hxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -48,6 +48,7 @@ #include #include +#include #include #include #include @@ -96,9 +97,9 @@ #include //________________________________________________________________________________________________________ -#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30) -#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30 -#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 30 +#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_31) +#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_31 +#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 31 #include #endif @@ -143,6 +144,7 @@ #define XDOCUMENTINFO ::com::sun::star::document::XDocumentInfo #define XDOCUMENTINFOSUPPLIER ::com::sun::star::document::XDocumentInfoSupplier #define XEVENTBROADCASTER ::com::sun::star::document::XEventBroadcaster +#define XDOCUMENTEVENTBROADCASTER ::com::sun::star::document::XDocumentEventBroadcaster #define XEVENTSSUPPLIER ::com::sun::star::document::XEventsSupplier #define XEMBEDDEDSCRIPTS ::com::sun::star::document::XEmbeddedScripts #define XSCRIPTINVOCATIONCONTEXT ::com::sun::star::document::XScriptInvocationContext @@ -237,12 +239,13 @@ namespace sfx { namespace intern { SfxListener */ -typedef ::comphelper::WeakImplHelper30 < XCHILD +typedef ::comphelper::WeakImplHelper31 < XCHILD , XDOCUMENTINFOSUPPLIER , ::com::sun::star::document::XDocumentPropertiesSupplier , ::com::sun::star::rdf::XDocumentMetadataAccess , ::com::sun::star::document::XDocumentRecovery , XEVENTBROADCASTER + , XDOCUMENTEVENTBROADCASTER , XEVENTLISTENER , XEVENTSSUPPLIER , XEMBEDDEDSCRIPTS @@ -1249,6 +1252,18 @@ public: virtual void SAL_CALL removeEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION ); + //____________________________________________________________________________________________________ + // XDocumentEventBroadcaster + //____________________________________________________________________________________________________ + + virtual void SAL_CALL addDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& _ViewController, const ::com::sun::star::uno::Any& _Supplement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); + + //____________________________________________________________________________________________________ + // XUnoTunnel + //____________________________________________________________________________________________________ + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); // css.frame.XModule @@ -1531,7 +1546,9 @@ private: SAL_DLLPRIVATE void impl_store( const OUSTRING& sURL , const SEQUENCE< PROPERTYVALUE >& seqArguments , sal_Bool bSaveTo ) ; - SAL_DLLPRIVATE void postEvent_Impl( ::rtl::OUString ); + + SAL_DLLPRIVATE void postEvent_Impl( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >() ); + 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/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 7e4e9921573a..18a0cebb8998 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -493,7 +493,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) if ( pOldContainerFrame ) { if ( bTaskActivate ) - NotifyEvent( SfxEventHint( SFX_EVENT_DEACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_DEACTIVATEDOC), pOldContainerFrame->GetObjectShell() ) ); + NotifyEvent( SfxViewEventHint( SFX_EVENT_DEACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_DEACTIVATEDOC), pOldContainerFrame->GetObjectShell(), pOldContainerFrame->GetFrame().GetController() ) ); pOldContainerFrame->DoDeactivate( bTaskActivate, pFrame ); if( pOldContainerFrame->GetProgress() ) @@ -517,7 +517,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) if ( bTaskActivate && pNewContainerFrame->GetObjectShell() ) { pNewContainerFrame->GetObjectShell()->PostActivateEvent_Impl( pNewContainerFrame ); - NotifyEvent(SfxEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_ACTIVATEDOC), pNewContainerFrame->GetObjectShell() ) ); + NotifyEvent(SfxViewEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_ACTIVATEDOC), pNewContainerFrame->GetObjectShell(), pNewContainerFrame->GetFrame().GetController() ) ); } SfxProgress *pProgress = pNewContainerFrame->GetProgress(); diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx index 9935c3a18c8b..339357294a40 100644 --- a/sfx2/source/config/evntconf.cxx +++ b/sfx2/source/config/evntconf.cxx @@ -68,6 +68,7 @@ // ----------------------------------------------------------------------- TYPEINIT1(SfxEventHint, SfxHint); TYPEINIT1(SfxEventNamesItem, SfxPoolItem); +TYPEINIT1(SfxViewEventHint, SfxHint); using namespace com::sun::star; diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index e386b2382acf..c3d0a2d8a850 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1162,9 +1162,9 @@ void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame ) sal_uInt16 nId = pImp->nEventId; pImp->nEventId = 0; if ( nId == SFX_EVENT_OPENDOC ) - pSfxApp->NotifyEvent(SfxEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_OPENDOC), this ), sal_False); + pSfxApp->NotifyEvent(SfxViewEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_OPENDOC), this, pFrame->GetFrame().GetController() ), sal_False); else if (nId == SFX_EVENT_CREATEDOC ) - pSfxApp->NotifyEvent(SfxEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_CREATEDOC), this ), sal_False); + pSfxApp->NotifyEvent(SfxViewEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_CREATEDOC), this, pFrame->GetFrame().GetController() ), sal_False); } } } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index ee449d15b419..c85a483c64aa 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2373,6 +2373,32 @@ void SAL_CALL SfxBaseModel::removeEventListener( const uno::Reference< XDOCEVENT m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0), aListener ); } +//-------------------------------------------------------------------------------------------------------- +// XDocumentEventBroadcaster +//-------------------------------------------------------------------------------------------------------- +// --------------------------------- +void SAL_CALL SfxBaseModel::addDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& aListener ) + throw ( uno::RuntimeException ) +{ + SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING ); + m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const uno::Reference< document::XDocumentEventListener >*)0), aListener ); +} + +// --------------------------------- +void SAL_CALL SfxBaseModel::removeDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& aListener ) + throw ( uno::RuntimeException ) +{ + SfxModelGuard aGuard( *this ); + m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< document::XDocumentEventListener >*)0), aListener ); +} + +// --------------------------------- +void SAL_CALL SfxBaseModel::notifyDocumentEvent( const ::rtl::OUString& _EventName, const uno::Reference< frame::XController2 >& _ViewController, const uno::Any& _Supplement ) + throw ( lang::IllegalArgumentException, lang::NoSupportException, uno::RuntimeException ) +{ + throw lang::NoSupportException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SfxBaseModel controlls all the sent notifications itself!" ) ), uno::Reference< uno::XInterface >() ); +} + //________________________________________________________________________________________________________ // SfxListener //________________________________________________________________________________________________________ @@ -2516,7 +2542,9 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC , break; } - postEvent_Impl( pNamedHint->GetEventName() ); + + SfxViewEventHint* pViewHint = PTR_CAST( SfxViewEventHint, &rHint ); + postEvent_Impl( pNamedHint->GetEventName(), pViewHint ? pViewHint->GetController() : uno::Reference< frame::XController2 >() ); } if ( pSimpleHint ) @@ -2869,8 +2897,32 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL } //******************************************************************************************************** +namespace { +template< typename ListenerT, typename EventT > +class NotifySingleListenerIgnoreRE +{ +private: + typedef void ( SAL_CALL ListenerT::*NotificationMethod )( const EventT& ); + NotificationMethod m_pMethod; + const EventT& m_rEvent; +public: + NotifySingleListenerIgnoreRE( NotificationMethod method, const EventT& event ) : m_pMethod( method ), m_rEvent( event ) { } -void SfxBaseModel::postEvent_Impl( ::rtl::OUString aName ) + void operator()( const uno::Reference& listener ) const + { + try + { + (listener.get()->*m_pMethod)( m_rEvent ); + } + catch( uno::RuntimeException& ) + { + // this exception is ignored to avoid problems with invalid listeners, the listener should be probably thrown away in future + } + } +}; +} // anonymous namespace + +void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Reference< frame::XController2 >& xController ) { // object already disposed? if ( impl_isDisposed() ) @@ -2880,34 +2932,41 @@ void SfxBaseModel::postEvent_Impl( ::rtl::OUString aName ) if (!aName.getLength()) return; - ::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer( - ::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0) ); - if( pIC ) - + ::cppu::OInterfaceContainerHelper* pIC = + m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XDocumentEventListener >*)0 ) ); + if ( pIC ) { #ifdef DBG_UTIL - ByteString aTmp( "SfxEvent: "); + ByteString aTmp( "SfxDocumentEvent: " ); 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(); - for ( sal_Int32 nElem=0; nElemnotifyEvent( aEvent ); - } - catch( uno::RuntimeException& ) - { - aIt.remove(); - } - } + + document::DocumentEvent aDocumentEvent( (frame::XModel*)this, aName, xController, uno::Any() ); + + pIC->forEach< document::XDocumentEventListener, NotifySingleListenerIgnoreRE< document::XDocumentEventListener, document::DocumentEvent > >( + NotifySingleListenerIgnoreRE< document::XDocumentEventListener, document::DocumentEvent >( + &document::XDocumentEventListener::documentEventOccured, + aDocumentEvent ) ); } + + pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XEventListener >*)0 ) ); + if ( pIC ) + { +#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 ); + + pIC->forEach< document::XEventListener, NotifySingleListenerIgnoreRE< document::XEventListener, document::EventObject > >( + NotifySingleListenerIgnoreRE< document::XEventListener, document::EventObject >( + &document::XEventListener::notifyEvent, + aEvent ) ); + } + } uno::Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData() throw(::com::sun::star::uno::RuntimeException) diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 090e94ecb63f..49deab951843 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -234,7 +234,7 @@ sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing ) bOther = ( &pFrame->GetFrame() != this ); } - SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur) ); + SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur, GetController() ) ); if ( bOther ) // if there are other views only the current view of this frame must be asked diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 19aa4b75ee0f..931aeb64f1cf 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -639,7 +639,7 @@ void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame ConnectSfxFrame_Impl( E_CONNECT ); // attaching the frame to the controller is the last step in the creation of a new view, so notify this - SfxEventHint aHint( SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), m_pData->m_pViewShell->GetObjectShell() ); + SfxViewEventHint aHint( SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), m_pData->m_pViewShell->GetObjectShell(), uno::Reference< frame::XController2 >( this ) ); SFX_APP()->NotifyEvent( aHint ); } } @@ -1069,7 +1069,7 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime pView = SfxViewFrame::GetNext( *pView, pDoc ); } - SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc ) ); + SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc, uno::Reference< frame::XController2 >( this ) ) ); if ( !pView ) SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), pDoc) ); From f580253e94f625e204989fdca1433b322909903d Mon Sep 17 00:00:00 2001 From: sj Date: Thu, 18 Nov 2010 16:11:07 +0100 Subject: [PATCH 246/279] impress202: #i114750# fixed WordWrap also for report Wizard --- xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index 92aa1ce17140..af3a0ce941e5 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -117,7 +117,11 @@ void XMLGraphicsDefaultStyle::SetDefaults() ((nUPD > 300) && (nUPD <= 330)) ) ) bWordWrapDefault = sal_False; - xDefaults->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextWordWrap" ) ), Any( bWordWrapDefault ) ); + + const OUString sTextWordWrap( RTL_CONSTASCII_USTRINGPARAM( "TextWordWrap" ) ); + Reference< XPropertySetInfo > xInfo( xDefaults->getPropertySetInfo() ); + if ( xInfo->hasPropertyByName( sTextWordWrap ) ) + xDefaults->setPropertyValue( sTextWordWrap, Any( bWordWrapDefault ) ); FillPropertySet( xDefaults ); } From 7f79c10b2e750dca09f252e745a4e3d390ba40b3 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 19 Nov 2010 10:50:56 +0100 Subject: [PATCH 247/279] fwk160: #i99833# do not use ftruncate unnecessarily --- ucb/source/ucp/file/shell.cxx | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index f324c93b878f..d045380ae7a1 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -1805,14 +1805,26 @@ shell::write( sal_Int32 CommandId, { aFile.close(); err = aFile.open( OpenFlag_Write ); - } - if( err != osl::FileBase::E_None ) - { - installError( CommandId, - TASKHANDLING_NO_OPEN_FILE_FOR_OVERWRITE, - err ); - return sal_False; + if( err != osl::FileBase::E_None ) + { + installError( CommandId, + TASKHANDLING_NO_OPEN_FILE_FOR_OVERWRITE, + err ); + return sal_False; + } + + // the existing file was just opened and should be overwritten now, + // truncate it first + + err = aFile.setSize( 0 ); + if( err != osl::FileBase::E_None ) + { + installError( CommandId, + TASKHANDLING_FILESIZE_FOR_WRITE, + err ); + return sal_False; + } } } else @@ -1844,7 +1856,6 @@ shell::write( sal_Int32 CommandId, sal_Bool bSuccess = sal_True; - sal_uInt64 nTotalNumberOfBytes = 0; sal_uInt64 nWrittenBytes; sal_Int32 nReadBytes = 0, nRequestedBytes = 32768 /*32k*/; uno::Sequence< sal_Int8 > seq( nRequestedBytes ); @@ -1901,20 +1912,9 @@ shell::write( sal_Int32 CommandId, bSuccess = sal_False; break; } - - nTotalNumberOfBytes += nWrittenBytes; } } while( nReadBytes == nRequestedBytes ); - err = aFile.setSize( nTotalNumberOfBytes ); - if( err != osl::FileBase::E_None ) - { - installError( CommandId, - TASKHANDLING_FILESIZE_FOR_WRITE, - err ); - bSuccess = sal_False; - } - err = aFile.close(); if( err != osl::FileBase::E_None ) { From a8ca82b94668de6af3d272ba6f6a184c99598cdf Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 19 Nov 2010 10:57:47 +0100 Subject: [PATCH 248/279] fwk160: #i112509# let the string be localized --- uui/source/filechanged.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uui/source/filechanged.src b/uui/source/filechanged.src index fa07c40c0853..74435516a497 100644 --- a/uui/source/filechanged.src +++ b/uui/source/filechanged.src @@ -33,7 +33,7 @@ String STR_FILECHANGED_TITLE { - Text = "Document Has Been Changed by Others"; + Text [ en-US ] = "Document Has Been Changed by Others"; }; String STR_FILECHANGED_MSG { From e8ff22fc99a7807455041f731cd337215a667c7f Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Fri, 19 Nov 2010 11:47:42 +0100 Subject: [PATCH 249/279] gnumake2: clean up d.lst of switched modules; fix svl/Package_inc.mk --- framework/prj/d.lst | 40 -------------------------------- sfx2/prj/d.lst | 33 -------------------------- xmloff/prj/d.lst | 56 --------------------------------------------- 3 files changed, 129 deletions(-) diff --git a/framework/prj/d.lst b/framework/prj/d.lst index 74a6a768d41b..e69de29bb2d1 100644 --- a/framework/prj/d.lst +++ b/framework/prj/d.lst @@ -1,40 +0,0 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %_DEST%\inc%_EXT%\framework -mkdir: %_DEST%\xml%_EXT%\uiconfig -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\*.exe %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\login %_DEST%\bin%_EXT%\login.bin -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__SRC%\lib\lib*.dylib %_DEST%\lib%_EXT% - -..\dtd\menubar.dtd %_DEST%\bin%_EXT%\menubar.dtd -..\dtd\toolbar.dtd %_DEST%\bin%_EXT%\toolbar.dtd -..\dtd\statusbar.dtd %_DEST%\bin%_EXT%\statusbar.dtd -..\dtd\event.dtd %_DEST%\bin%_EXT%\event.dtd -..\dtd\accelerator.dtd %_DEST%\bin%_EXT%\accelerator.dtd -..\dtd\image.dtd %_DEST%\bin%_EXT%\image.dtd -..\dtd\groupuinames.dtd %_DEST%\bin%_EXT%\groupuinames.dtd - -..\%__SRC%\lib\ifwe.lib %_DEST%\lib%_EXT%\ifwe.lib -..\%__SRC%\lib\ifwi.lib %_DEST%\lib%_EXT%\ifwi.lib -..\inc\framework/*.h %_DEST%\inc%_EXT%\framework\*.h -..\inc\framework/*.hxx %_DEST%\inc%_EXT%\framework\*.hxx - -..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml -..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml -..\uiconfig\startmodule\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar\*.xml - -..\source\unotypes\fw?.xml %_DEST%\xml%_EXT%\*.xml - -..\%__SRC%\misc\fwk.component %_DEST%\xml%_EXT%\fwk.component -..\%__SRC%\misc\fwl.component %_DEST%\xml%_EXT%\fwl.component -..\%__SRC%\misc\fwm.component %_DEST%\xml%_EXT%\fwm.component - diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst index 50a7f6134f67..e69de29bb2d1 100644 --- a/sfx2/prj/d.lst +++ b/sfx2/prj/d.lst @@ -1,33 +0,0 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %COMMON_DEST%\res%_EXT% -mkdir: %_DEST%\inc%_EXT%\sfx2 - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\lib\sfx.lib %_DEST%\lib%_EXT%\sfx.lib -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\slb\sfx.lib %_DEST%\lib%_EXT%\xsfx.lib -..\%__SRC%\lib\isfx.lib %_DEST%\lib%_EXT%\isfx.lib -..\%__SRC%\lib\debug.lib %_DEST%\lib%_EXT%\sfxdebug.lib -..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym -..\%__SRC%\bin\sfx?????.dll %_DEST%\bin%_EXT%\sfx?????.dll -..\%__SRC%\bin\sfx*.res %_DEST%\bin%_EXT%\sfx*.res -..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym -..\%__SRC%\misc\sfx?????.map %_DEST%\bin%_EXT%\sfx?????.map -..\%__SRC%\bin\elc?????.dll %_DEST%\bin%_EXT%\elc?????.dll -..\%__SRC%\srs\sfx.srs %_DEST%\res%_EXT%\sfx.srs -..\%COMMON_OUTDIR%\srs\sfx_srs.hid %COMMON_DEST%\res%_EXT%\sfx_srs.hid -..\%__SRC%\srs\sfxslots.srs %_DEST%\res%_EXT%\sfxslots.srs -..\%COMMON_OUTDIR%\srs\sfxslots_srs.hid %COMMON_DEST%\res%_EXT%\sfxslots_srs.hid -..\util\sfx.xml %_DEST%\xml%_EXT%\sfx.xml -..\%__SRC%\misc\sfx2.csv %_DEST%\inc%_EXT%\sfx2.csv - -..\inc\sfx2\*.h %_DEST%\inc%_EXT%\sfx2\*.h -..\inc\sfx2\*.hxx %_DEST%\inc%_EXT%\sfx2\*.hxx -..\inc\sfx2\*.hrc %_DEST%\inc%_EXT%\sfx2\*.hrc - -..\sdi\sfx.sdi %_DEST%\inc%_EXT%\sfx2\sfx.sdi -..\sdi\sfxitems.sdi %_DEST%\inc%_EXT%\sfx2\sfxitems.sdi - -..\%__SRC%\misc\sfx.component %_DEST%\xml%_EXT%\sfx.component diff --git a/xmloff/prj/d.lst b/xmloff/prj/d.lst index c2ab46585c59..e69de29bb2d1 100644 --- a/xmloff/prj/d.lst +++ b/xmloff/prj/d.lst @@ -1,56 +0,0 @@ -mkdir: %_DEST%\inc%_EXT%\xmloff - -..\%__SRC%\misc\*.map %_DEST%\bin%_EXT%\*.map -..\%__SRC%\lib\ixo.lib %_DEST%\lib%_EXT%\ixo.lib -..\%__SRC%\lib\xol.lib %_DEST%\lib%_EXT%\xol.lib -..\%__SRC%\lib\libxol.a %_DEST%\lib%_EXT%\libxol.a -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib - -..\dtd\* %_DEST%\bin%_EXT% - -..\inc\xmloff\odffields.hxx %_DEST%\inc%_EXT%\xmloff\odffields.hxx -..\inc\xmloff\dllapi.h %_DEST%\inc%_EXT%\xmloff\dllapi.h -..\inc\xmloff\attrlist.hxx %_DEST%\inc%_EXT%\xmloff\attrlist.hxx -..\inc\i18nmap.hxx %_DEST%\inc%_EXT%\xmloff\i18nmap.hxx -..\inc\unoatrcn.hxx %_DEST%\inc%_EXT%\xmloff\unoatrcn.hxx -..\inc\xmlkywd.hxx %_DEST%\inc%_EXT%\xmloff\xmlkywd.hxx -..\inc\xmlcnitm.hxx %_DEST%\inc%_EXT%\xmloff\xmlcnitm.hxx -..\inc\xmlnmspe.hxx %_DEST%\inc%_EXT%\xmloff\xmlnmspe.hxx -..\inc\xmlreg.hxx %_DEST%\inc%_EXT%\xmloff\xmlreg.hxx -..\inc\xmltabe.hxx %_DEST%\inc%_EXT%\xmloff\xmltabe.hxx -..\inc\numehelp.hxx %_DEST%\inc%_EXT%\xmloff\numehelp.hxx -..\inc\XMLTextListAutoStylePool.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextListAutoStylePool.hxx -..\inc\functional.hxx %_DEST%\inc%_EXT%\xmloff\functional.hxx -..\inc\VisAreaExport.hxx %_DEST%\inc%_EXT%\xmloff\VisAreaExport.hxx -..\inc\VisAreaContext.hxx %_DEST%\inc%_EXT%\xmloff\VisAreaContext.hxx -..\inc\DashStyle.hxx %_DEST%\inc%_EXT%\xmloff\DashStyle.hxx -..\inc\GradientStyle.hxx %_DEST%\inc%_EXT%\xmloff\GradientStyle.hxx -..\inc\MarkerStyle.hxx %_DEST%\inc%_EXT%\xmloff\MarkerStyle.hxx -..\inc\HatchStyle.hxx %_DEST%\inc%_EXT%\xmloff\HatchStyle.hxx -..\inc\ImageStyle.hxx %_DEST%\inc%_EXT%\xmloff\ImageStyle.hxx -..\source\text\XMLTextShapeImportHelper.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextShapeImportHelper.hxx -..\inc\xmloff\SettingsExportHelper.hxx %_DEST%\inc%_EXT%\xmloff\SettingsExportHelper.hxx -..\inc\xmloff\XMLSettingsExportContext.hxx %_DEST%\inc%_EXT%\xmloff\XMLSettingsExportContext.hxx -..\inc\xmloff\DocumentSettingsContext.hxx %_DEST%\inc%_EXT%\xmloff\DocumentSettingsContext.hxx -..\inc\xmloff\XMLGraphicsDefaultStyle.hxx %_DEST%\inc%_EXT%\xmloff\XMLGraphicsDefaultStyle.hxx -..\inc\XMLEmbeddedObjectExportFilter.hxx %_DEST%\inc%_EXT%\xmloff\XMLEmbeddedObjectExportFilter.hxx -..\inc\XMLFilterServiceNames.h %_DEST%\inc%_EXT%\xmloff\XMLFilterServiceNames.h -..\inc\xmlerror.hxx %_DEST%\inc%_EXT%\xmloff\xmlerror.hxx -..\inc\xformsimport.hxx %_DEST%\inc%_EXT%\xmloff\xformsimport.hxx -..\inc\xformsexport.hxx %_DEST%\inc%_EXT%\xmloff\xformsexport.hxx -..\inc\txtimppr.hxx %_DEST%\inc%_EXT%\xmloff\txtimppr.hxx - -..\inc\xmloff\*.hxx %_DEST%\inc%_EXT%\xmloff\*.hxx -..\inc\xmloff\*.h %_DEST%\inc%_EXT%\xmloff\*.h - -..\xml\components.xml %_DEST%\xml%_EXT%\components.xml - -mkdir: %_DEST%\inc%_EXT%\xmloff\table -..\inc\xmloff\table\XMLTableExport.hxx %_DEST%\inc%_EXT%\xmloff\table\XMLTableExport.hxx -..\inc\xmloff\table\XMLTableImport.hxx %_DEST%\inc%_EXT%\xmloff\table\XMLTableImport.hxx - -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\misc\xo.component %_DEST%\xml%_EXT%\xo.component -..\%__SRC%\misc\xof.component %_DEST%\xml%_EXT%\xof.component From 688cfc2ff1c3a5d56efe1add12f8e0edb0be56bb Mon Sep 17 00:00:00 2001 From: os Date: Fri, 19 Nov 2010 14:24:51 +0100 Subject: [PATCH 250/279] #i112395# rtf import fixed --- editeng/inc/editeng/svxrtf.hxx | 2 +- editeng/source/rtf/rtfitem.cxx | 12 ++++++------ editeng/source/rtf/svxrtf.cxx | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx index 10864b1850f1..62bc6efcd4bf 100644 --- a/editeng/inc/editeng/svxrtf.hxx +++ b/editeng/inc/editeng/svxrtf.hxx @@ -470,7 +470,7 @@ inline const Color& SvxRTFParser::GetColor( size_t nId ) const inline SfxItemSet& SvxRTFParser::GetAttrSet() { SvxRTFItemStackTypePtr pTmp; - if( bNewGroup || 0 == ( pTmp = aAttrStack.back()) ) + if( bNewGroup || 0 == ( pTmp = aAttrStack.empty() ? 0 : aAttrStack.back()) ) pTmp = _GetAttrSet(); return pTmp->aAttrSet; } diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index 3141ab20afcd..58789fab2106 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -228,7 +228,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE; USHORT nFontAlign; - int bChkStkPos = !bNewGroup && aAttrStack.back(); + int bChkStkPos = !bNewGroup && !aAttrStack.empty(); while( bWeiter && IsParserWorking() ) // solange bekannte Attribute erkannt werden { @@ -250,7 +250,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( !bChkStkPos ) break; - SvxRTFItemStackType* pAkt = aAttrStack.back(); + SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); if( !pAkt || (pAkt->pSttNd->GetIdx() == pInsPos->GetNodeIdx() && pAkt->nSttCnt == pInsPos->GetCntIdx() )) break; @@ -269,7 +269,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) // alle bis hierher gueltigen Attribute "setzen" AttrGroupEnd(); - pAkt = aAttrStack.back(); // can be changed after AttrGroupEnd! + pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); // can be changed after AttrGroupEnd! pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 ); aAttrStack.push_back( pNew ); @@ -305,7 +305,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) nStyleNo = -1 == nTokenValue ? 0 : USHORT(nTokenValue); // setze am akt. auf dem AttrStack stehenden Style die // StyleNummer - SvxRTFItemStackType* pAkt = aAttrStack.back(); + SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); if( !pAkt ) break; @@ -1869,7 +1869,7 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet, // pard / plain abarbeiten void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) { - if( !bNewGroup && aAttrStack.back() ) // not at the beginning of a new group + if( !bNewGroup && !aAttrStack.empty() ) // not at the beginning of a new group { SvxRTFItemStackType* pAkt = aAttrStack.back(); @@ -1887,7 +1887,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) // alle bis hierher gueltigen Attribute "setzen" AttrGroupEnd(); - pAkt = aAttrStack.back(); // can be changed after AttrGroupEnd! + pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); // can be changed after AttrGroupEnd! pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 ); aAttrStack.push_back( pNew ); pAkt = pNew; diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 14b17807a0ea..2788d2fd4b10 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -875,7 +875,7 @@ const Font& SvxRTFParser::GetFont( USHORT nId ) SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr ) { - SvxRTFItemStackType* pAkt = aAttrStack.back(); + SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); SvxRTFItemStackType* pNew; if( pAkt ) pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, bCopyAttr ); @@ -941,9 +941,9 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen { if( !aAttrStack.empty() ) { - SvxRTFItemStackType *pOld = aAttrStack.back(); + SvxRTFItemStackType *pOld = aAttrStack.empty() ? 0 : aAttrStack.back(); aAttrStack.pop_back(); - SvxRTFItemStackType *pAkt = aAttrStack.back(); + SvxRTFItemStackType *pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); do { // middle check loop ULONG nOldSttNdIdx = pOld->pSttNd->GetIdx(); @@ -1118,7 +1118,7 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen // alle bis hierher gueltigen Attribute "setzen" AttrGroupEnd(); - pAkt = aAttrStack.back(); // can be changed after AttrGroupEnd! + pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); // can be changed after AttrGroupEnd! pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 ); aAttrStack.push_back( pNew ); pAkt = pNew; @@ -1181,7 +1181,7 @@ void SvxRTFParser::SetAttrSet( SvxRTFItemStackType &rSet ) // Is text wasn't inserted? (Get SttPos from the top of stack!) int SvxRTFParser::IsAttrSttPos() { - SvxRTFItemStackType* pAkt = aAttrStack.back(); + SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); return !pAkt || (pAkt->pSttNd->GetIdx() == pInsPos->GetNodeIdx() && pAkt->nSttCnt == pInsPos->GetCntIdx()); } From a7b7800e6df9bf1f0b343f5340ff058d7d0f531e Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Fri, 19 Nov 2010 15:23:52 +0100 Subject: [PATCH 251/279] gnumake2: undo toolpanel header move --- sfx2/Package_inc.mk | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk index dd836b286f8b..cbd3b94f9ff9 100644 --- a/sfx2/Package_inc.mk +++ b/sfx2/Package_inc.mk @@ -26,10 +26,6 @@ #************************************************************************* $(eval $(call gb_Package_Package,sfx2_inc,$(SRCDIR)/sfx2/inc)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/appuno.hxx,sfx2/appuno.hxx)) @@ -57,6 +53,7 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docmacromode.hxx,sfx2/docmac $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docstoragemodifylistener.hxx,sfx2/docstoragemodifylistener.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctdlg.hxx,sfx2/doctdlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctempl.hxx,sfx2/doctempl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/event.hxx,sfx2/event.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/evntconf.hxx,sfx2/evntconf.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/fcontnr.hxx,sfx2/fcontnr.hxx)) @@ -67,21 +64,23 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtml.hxx,sfx2/frmhtml.hxx $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtmlw.hxx,sfx2/frmhtmlw.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/genlink.hxx,sfx2/genlink.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/hintpost.hxx,sfx2/hintpost.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/htmlmode.hxx,sfx2/htmlmode.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imagemgr.hxx,sfx2/imagemgr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgdef.hxx,sfx2/imgdef.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgmgr.hxx,sfx2/imgmgr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ipclient.hxx,sfx2/ipclient.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemconnect.hxx,sfx2/itemconnect.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemwrapper.hxx,sfx2/itemwrapper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-post.hxx,sfx2/layout-post.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-pre.hxx,sfx2/layout-pre.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-tabdlg.hxx,sfx2/layout-tabdlg.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linkmgr.hxx,sfx2/linkmgr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linksrc.hxx,sfx2/linksrc.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/lnkbase.hxx,sfx2/lnkbase.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/macrconf.hxx,sfx2/macrconf.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mailmodelapi.hxx,sfx2/mailmodelapi.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mgetempl.hxx,sfx2/mgetempl.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mieclip.hxx,sfx2/mieclip.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minarray.hxx,sfx2/minarray.hxx)) @@ -104,14 +103,16 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printer.hxx,sfx2/printer.hxx $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printopt.hxx,sfx2/printopt.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/prnmon.hxx,sfx2/prnmon.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/progress.hxx,sfx2/progress.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/querystatus.hxx,sfx2/querystatus.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/request.hxx,sfx2/request.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfx.hrc,sfx2/sfx.hrc)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasecontroller.hxx,sfx2/sfxbasecontroller.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasemodel.hxx,sfx2/sfxbasemodel.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxcommands.h,sfx2/sfxcommands.h)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdefs.hxx,sfx2/sfxdefs.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdlg.hxx,sfx2/sfxdlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhelp.hxx,sfx2/sfxhelp.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfx.hrc,sfx2/sfx.hrc)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhtml.hxx,sfx2/sfxhtml.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxmodelfactory.hxx,sfx2/sfxmodelfactory.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxresid.hxx,sfx2/sfxresid.hxx)) @@ -132,23 +133,4 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sf $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfac.hxx,sfx2/viewfac.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfrm.hxx,sfx2/viewfrm.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewsh.hxx,sfx2/viewsh.hxx)) - - - - - - - - - - - - - - - - - - - - +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx)) From 59f729d2c032196c720aa58e0fb439ab332accc4 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Fri, 19 Nov 2010 17:14:27 +0100 Subject: [PATCH 252/279] gnumake2: last bunch of missing headers --- sfx2/Package_inc.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk index cbd3b94f9ff9..ed6f95b11d62 100644 --- a/sfx2/Package_inc.mk +++ b/sfx2/Package_inc.mk @@ -125,8 +125,10 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/stbitem.hxx,sfx2/stbitem.hxx $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styfitem.hxx,sfx2/styfitem.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styledlg.hxx,sfx2/styledlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tabdlg.hxx,sfx2/tabdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/taskpane.hxx,sfx2/taskpane.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tbxctrl.hxx,sfx2/tbxctrl.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templdlg.hxx,sfx2/templdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/titledockwin.hxx,sfx2/titledockwin.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tplpitem.hxx,sfx2/tplpitem.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/unoctitm.hxx,sfx2/unoctitm.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sfx2/userinputinterception.hxx)) From c05087b295acf86ce13105b0cc67b82feb92f45a Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 19 Nov 2010 21:45:41 +0100 Subject: [PATCH 253/279] gnumake2: removing old dmake file in migrated modules --- framework/inc/makefile.mk | 47 --- .../qa/complex/ModuleManager/makefile.mk | 60 --- .../XUserInputInterception/makefile.mk | 133 ------ .../complex/accelerators/helper/makefile.mk | 46 --- framework/qa/complex/accelerators/makefile.mk | 67 --- framework/qa/complex/api_internal/makefile.mk | 63 --- .../qa/complex/broken_document/makefile.mk | 65 --- .../contextMenuInterceptor/makefile.mk | 63 --- framework/qa/complex/desktop/makefile.mk | 62 --- .../qa/complex/dispatches/helper/makefile.mk | 47 --- framework/qa/complex/dispatches/makefile.mk | 131 ------ framework/qa/complex/disposing/makefile.mk | 61 --- .../qa/complex/framework/autosave/makefile.mk | 127 ------ .../qa/complex/framework/recovery/makefile.mk | 103 ----- .../imageManager/interfaces/makefile.mk | 63 --- framework/qa/complex/imageManager/makefile.mk | 123 ------ .../loadAllDocuments/helper/makefile.mk | 47 --- .../qa/complex/loadAllDocuments/makefile.mk | 134 ------ .../qa/complex/path_settings/makefile.mk | 62 --- .../qa/complex/path_substitution/makefile.mk | 122 ------ framework/qa/unoapi/makefile.mk | 48 --- framework/source/accelerators/makefile.mk | 52 --- framework/source/application/makefile.mk | 45 -- framework/source/classes/makefile.mk | 54 --- framework/source/constant/makefile.mk | 45 -- framework/source/dispatch/makefile.mk | 62 --- framework/source/fwe/classes/makefile.mk | 58 --- framework/source/fwe/dispatch/makefile.mk | 48 --- framework/source/fwe/helper/makefile.mk | 55 --- framework/source/fwe/interaction/makefile.mk | 48 --- framework/source/fwe/xml/makefile.mk | 59 --- framework/source/fwi/classes/makefile.mk | 50 --- framework/source/fwi/helper/makefile.mk | 51 --- framework/source/fwi/jobs/makefile.mk | 48 --- framework/source/fwi/threadhelp/makefile.mk | 45 -- framework/source/fwi/uielement/makefile.mk | 48 --- framework/source/helper/makefile.mk | 70 ---- framework/source/interaction/makefile.mk | 48 --- framework/source/jobs/makefile.mk | 51 --- framework/source/layoutmanager/makefile.mk | 47 --- framework/source/loadenv/makefile.mk | 46 --- framework/source/recording/makefile.mk | 47 --- framework/source/register/makefile.mk | 50 --- framework/source/services/makefile.mk | 64 --- framework/source/tabwin/makefile.mk | 48 --- framework/source/uiconfiguration/makefile.mk | 54 --- framework/source/uielement/makefile.mk | 84 ---- framework/source/uifactory/makefile.mk | 54 --- framework/source/xml/makefile.mk | 58 --- framework/test/makefile.mk | 94 ----- framework/test/threadtest/makefile.mk | 67 --- framework/test/typecfg/makefile.mk | 73 ---- framework/util/guiapps/makefile.mk | 67 --- framework/util/makefile.mk | 383 ------------------ sfx2/inc/makefile.mk | 48 --- sfx2/qa/complex/docinfo/makefile.mk | 63 --- .../complex/framework/DocHelper/makefile.mk | 49 --- sfx2/qa/complex/framework/makefile.mk | 65 --- .../standalonedocumentinfo/makefile.mk | 56 --- sfx2/qa/cppunit/makefile.mk | 81 ---- sfx2/qa/unoapi/makefile.mk | 48 --- sfx2/sdi/makefile.mk | 59 --- sfx2/source/appl/makefile.mk | 159 -------- sfx2/source/bastyp/makefile.mk | 66 --- sfx2/source/config/makefile.mk | 47 --- sfx2/source/control/makefile.mk | 73 ---- sfx2/source/dialog/makefile.mk | 117 ------ sfx2/source/doc/makefile.mk | 103 ----- sfx2/source/explorer/makefile.mk | 47 --- sfx2/source/inet/makefile.mk | 48 --- sfx2/source/layout/makefile.mk | 56 --- sfx2/source/menu/makefile.mk | 55 --- sfx2/source/notify/makefile.mk | 49 --- sfx2/source/statbar/makefile.mk | 47 --- sfx2/source/toolbox/makefile.mk | 48 --- sfx2/source/view/makefile.mk | 65 --- sfx2/util/makefile.mk | 172 -------- sfx2/workben/custompanel/makefile.mk | 120 ------ xmloff/inc/makefile.mk | 48 --- xmloff/qa/unoapi/makefile.mk | 48 --- xmloff/source/chart/makefile.mk | 70 ---- xmloff/source/core/makefile.mk | 76 ---- xmloff/source/draw/makefile.mk | 85 ---- xmloff/source/forms/makefile.mk | 70 ---- xmloff/source/meta/makefile.mk | 53 --- xmloff/source/script/makefile.mk | 56 --- xmloff/source/style/makefile.mk | 219 ---------- xmloff/source/table/makefile.mk | 48 --- xmloff/source/text/makefile.mk | 127 ------ xmloff/source/transform/makefile.mk | 103 ----- xmloff/source/xforms/makefile.mk | 58 --- xmloff/util/makefile.mk | 96 ----- 92 files changed, 6745 deletions(-) delete mode 100644 framework/inc/makefile.mk delete mode 100644 framework/qa/complex/ModuleManager/makefile.mk delete mode 100644 framework/qa/complex/XUserInputInterception/makefile.mk delete mode 100644 framework/qa/complex/accelerators/helper/makefile.mk delete mode 100644 framework/qa/complex/accelerators/makefile.mk delete mode 100755 framework/qa/complex/api_internal/makefile.mk delete mode 100755 framework/qa/complex/broken_document/makefile.mk delete mode 100644 framework/qa/complex/contextMenuInterceptor/makefile.mk delete mode 100755 framework/qa/complex/desktop/makefile.mk delete mode 100644 framework/qa/complex/dispatches/helper/makefile.mk delete mode 100644 framework/qa/complex/dispatches/makefile.mk delete mode 100755 framework/qa/complex/disposing/makefile.mk delete mode 100644 framework/qa/complex/framework/autosave/makefile.mk delete mode 100755 framework/qa/complex/framework/recovery/makefile.mk delete mode 100755 framework/qa/complex/imageManager/interfaces/makefile.mk delete mode 100755 framework/qa/complex/imageManager/makefile.mk delete mode 100644 framework/qa/complex/loadAllDocuments/helper/makefile.mk delete mode 100644 framework/qa/complex/loadAllDocuments/makefile.mk delete mode 100755 framework/qa/complex/path_settings/makefile.mk delete mode 100755 framework/qa/complex/path_substitution/makefile.mk delete mode 100755 framework/qa/unoapi/makefile.mk delete mode 100644 framework/source/accelerators/makefile.mk delete mode 100644 framework/source/application/makefile.mk delete mode 100644 framework/source/classes/makefile.mk delete mode 100644 framework/source/constant/makefile.mk delete mode 100644 framework/source/dispatch/makefile.mk delete mode 100644 framework/source/fwe/classes/makefile.mk delete mode 100644 framework/source/fwe/dispatch/makefile.mk delete mode 100644 framework/source/fwe/helper/makefile.mk delete mode 100644 framework/source/fwe/interaction/makefile.mk delete mode 100644 framework/source/fwe/xml/makefile.mk delete mode 100644 framework/source/fwi/classes/makefile.mk delete mode 100644 framework/source/fwi/helper/makefile.mk delete mode 100644 framework/source/fwi/jobs/makefile.mk delete mode 100644 framework/source/fwi/threadhelp/makefile.mk delete mode 100644 framework/source/fwi/uielement/makefile.mk delete mode 100644 framework/source/helper/makefile.mk delete mode 100644 framework/source/interaction/makefile.mk delete mode 100644 framework/source/jobs/makefile.mk delete mode 100644 framework/source/layoutmanager/makefile.mk delete mode 100644 framework/source/loadenv/makefile.mk delete mode 100644 framework/source/recording/makefile.mk delete mode 100644 framework/source/register/makefile.mk delete mode 100644 framework/source/services/makefile.mk delete mode 100644 framework/source/tabwin/makefile.mk delete mode 100644 framework/source/uiconfiguration/makefile.mk delete mode 100644 framework/source/uielement/makefile.mk delete mode 100644 framework/source/uifactory/makefile.mk delete mode 100644 framework/source/xml/makefile.mk delete mode 100644 framework/test/makefile.mk delete mode 100644 framework/test/threadtest/makefile.mk delete mode 100644 framework/test/typecfg/makefile.mk delete mode 100644 framework/util/guiapps/makefile.mk delete mode 100644 framework/util/makefile.mk delete mode 100644 sfx2/inc/makefile.mk delete mode 100644 sfx2/qa/complex/docinfo/makefile.mk delete mode 100644 sfx2/qa/complex/framework/DocHelper/makefile.mk delete mode 100644 sfx2/qa/complex/framework/makefile.mk delete mode 100644 sfx2/qa/complex/standalonedocumentinfo/makefile.mk delete mode 100644 sfx2/qa/cppunit/makefile.mk delete mode 100644 sfx2/qa/unoapi/makefile.mk delete mode 100644 sfx2/sdi/makefile.mk delete mode 100644 sfx2/source/appl/makefile.mk delete mode 100644 sfx2/source/bastyp/makefile.mk delete mode 100644 sfx2/source/config/makefile.mk delete mode 100644 sfx2/source/control/makefile.mk delete mode 100755 sfx2/source/dialog/makefile.mk delete mode 100644 sfx2/source/doc/makefile.mk delete mode 100644 sfx2/source/explorer/makefile.mk delete mode 100644 sfx2/source/inet/makefile.mk delete mode 100644 sfx2/source/layout/makefile.mk delete mode 100644 sfx2/source/menu/makefile.mk delete mode 100644 sfx2/source/notify/makefile.mk delete mode 100644 sfx2/source/statbar/makefile.mk delete mode 100644 sfx2/source/toolbox/makefile.mk delete mode 100644 sfx2/source/view/makefile.mk delete mode 100644 sfx2/util/makefile.mk delete mode 100644 sfx2/workben/custompanel/makefile.mk delete mode 100644 xmloff/inc/makefile.mk delete mode 100644 xmloff/qa/unoapi/makefile.mk delete mode 100644 xmloff/source/chart/makefile.mk delete mode 100644 xmloff/source/core/makefile.mk delete mode 100644 xmloff/source/draw/makefile.mk delete mode 100644 xmloff/source/forms/makefile.mk delete mode 100644 xmloff/source/meta/makefile.mk delete mode 100644 xmloff/source/script/makefile.mk delete mode 100644 xmloff/source/style/makefile.mk delete mode 100644 xmloff/source/table/makefile.mk delete mode 100644 xmloff/source/text/makefile.mk delete mode 100644 xmloff/source/transform/makefile.mk delete mode 100644 xmloff/source/xforms/makefile.mk delete mode 100644 xmloff/util/makefile.mk diff --git a/framework/inc/makefile.mk b/framework/inc/makefile.mk deleted file mode 100644 index e2f1bedf4e98..000000000000 --- a/framework/inc/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=framework -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/framework/qa/complex/ModuleManager/makefile.mk b/framework/qa/complex/ModuleManager/makefile.mk deleted file mode 100644 index 4ad6d8929030..000000000000 --- a/framework/qa/complex/ModuleManager/makefile.mk +++ /dev/null @@ -1,60 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_ModuleManager - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/ModuleManager - -# here store only Files which contain a @Test -JAVATESTFILES = \ - CheckXModuleManager.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - diff --git a/framework/qa/complex/XUserInputInterception/makefile.mk b/framework/qa/complex/XUserInputInterception/makefile.mk deleted file mode 100644 index 8b08bec171ee..000000000000 --- a/framework/qa/complex/XUserInputInterception/makefile.mk +++ /dev/null @@ -1,133 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -# we don't want something like this. -# .IF "$(OS)"=="LINUX" -# nothing .PHONY: -# @echo "Test marked as failed on this platform" -# .END - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_xuserinputinterception - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/XUserInputInterception - -# here store only Files which contain a @Test -JAVATESTFILES = \ - EventTest.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - -# -# -# -# PRJ = ..$/..$/.. -# TARGET = EventTest -# PRJNAME = framework -# PACKAGE = complex$/XUserInputInterception -# -# # --- Settings ----------------------------------------------------- -# .INCLUDE: settings.mk -# -# -# #----- compile .java files ----------------------------------------- -# -# JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar \ -# OOoRunner.jar mysql.jar -# JAVAFILES = EventTest.java -# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) -# -# #----- make a jar from compiled files ------------------------------ -# -# MAXLINELENGTH = 100000 -# -# JARCLASSDIRS = $(PACKAGE) -# JARTARGET = $(TARGET).jar -# JARCOMPRESS = TRUE -# -# # --- Parameters for the test -------------------------------------- -# -# # start an office if the parameter is set for the makefile -# .IF "$(OFFICE)" == "" -# CT_APPEXECCOMMAND = -# .ELSE -# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" -# .ENDIF -# -# # test base is java complex -# CT_TESTBASE = -TestBase java_complex -# -# # test looks something like the.full.package.TestName -# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b) -# -# # start the runner application -# CT_APP = org.openoffice.Runner -# -# # --- Targets ------------------------------------------------------ -# -# .IF "$(depend)" == "" -# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLTAR -# .ELSE -# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLDEP -# .ENDIF -# -# .INCLUDE : target.mk -# -# #$(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : $(JAVAFILES:b).props -# # cp $(JAVAFILES:b).props $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props -# # jar uf $(CLASSDIR)$/$(JARTARGET) -C $(CLASSDIR) $(PACKAGE)$/$(JAVAFILES:b).props -# -# RUN: run -# -# run: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST) -# -# -# diff --git a/framework/qa/complex/accelerators/helper/makefile.mk b/framework/qa/complex/accelerators/helper/makefile.mk deleted file mode 100644 index 189a5fddba77..000000000000 --- a/framework/qa/complex/accelerators/helper/makefile.mk +++ /dev/null @@ -1,46 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ../../../.. -TARGET = AcceleratorsConfigurationTest -PRJNAME = framework -PACKAGE = complex/accelerators/helper - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - - -#----- compile .java files ----------------------------------------- - -JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar \ - Generator.jar OOoRunner.jar -JAVAFILES = KeyMapping.java -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -MAXLINELENGTH = 100000 - -.INCLUDE : target.mk diff --git a/framework/qa/complex/accelerators/makefile.mk b/framework/qa/complex/accelerators/makefile.mk deleted file mode 100644 index 7d5460324849..000000000000 --- a/framework/qa/complex/accelerators/makefile.mk +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_accelerators - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/accelerators - -# here store only Files which contain a @Test -JAVATESTFILES = \ - AcceleratorsConfigurationTest.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) \ - KeyMapping.java - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -#JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar \ -# OOoRunner.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - - - - - diff --git a/framework/qa/complex/api_internal/makefile.mk b/framework/qa/complex/api_internal/makefile.mk deleted file mode 100755 index f1a22011a8e7..000000000000 --- a/framework/qa/complex/api_internal/makefile.mk +++ /dev/null @@ -1,63 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_api_internal - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/api_internal - -# here store only Files which contain a @Test -JAVATESTFILES = \ - CheckAPI.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -#JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar \ -# OOoRunner.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - diff --git a/framework/qa/complex/broken_document/makefile.mk b/framework/qa/complex/broken_document/makefile.mk deleted file mode 100755 index 8b1cf2ac3bfd..000000000000 --- a/framework/qa/complex/broken_document/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_broken_document - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/broken_document - -# here store only Files which contain a @Test -JAVATESTFILES = \ - LoadDocument.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) \ - TestDocument.java - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -#JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar \ -# OOoRunner.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - diff --git a/framework/qa/complex/contextMenuInterceptor/makefile.mk b/framework/qa/complex/contextMenuInterceptor/makefile.mk deleted file mode 100644 index 574d98641468..000000000000 --- a/framework/qa/complex/contextMenuInterceptor/makefile.mk +++ /dev/null @@ -1,63 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_contextMenuInterceptor - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/contextMenuInterceptor - -# here store only Files which contain a @Test -JAVATESTFILES = \ - CheckContextMenuInterceptor.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) \ - ContextMenuInterceptor.java - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -#JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar \ -# OOoRunner.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/framework/qa/complex/desktop/makefile.mk b/framework/qa/complex/desktop/makefile.mk deleted file mode 100755 index 74db8d34e160..000000000000 --- a/framework/qa/complex/desktop/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_desktop - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/desktop - -# here store only Files which contain a @Test -JAVATESTFILES = \ - DesktopTerminate.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -#JARFILES = ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar \ -# OOoRunner.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/framework/qa/complex/dispatches/helper/makefile.mk b/framework/qa/complex/dispatches/helper/makefile.mk deleted file mode 100644 index 2b2ccab5ebef..000000000000 --- a/framework/qa/complex/dispatches/helper/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ = ../../../.. -TARGET = checkdispatchapi -PRJNAME = framework -PACKAGE = complex/dispatches/helper - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - - -#----- compile .java files ----------------------------------------- - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar Generator.jar -JAVAFILES = Interceptor.java -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class) - -MAXLINELENGTH = 100000 - -.INCLUDE : target.mk - - - diff --git a/framework/qa/complex/dispatches/makefile.mk b/framework/qa/complex/dispatches/makefile.mk deleted file mode 100644 index 6a5ff79dd793..000000000000 --- a/framework/qa/complex/dispatches/makefile.mk +++ /dev/null @@ -1,131 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_dispatches - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/dispatches - -# here store only Files which contain a @Test -JAVATESTFILES = \ - checkdispatchapi.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) \ - Interceptor.java - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar ConnectivityTools.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - - - - -# PRJ = ..$/..$/.. -# TARGET = checkdispatchapi -# PRJNAME = framework -# PACKAGE = complex$/dispatches -# -# # --- Settings ----------------------------------------------------- -# .INCLUDE: settings.mk -# -# -# #----- compile .java files ----------------------------------------- -# -# JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar \ -# OOoRunner.jar mysql.jar ConnectivityTools.jar -# JAVAFILES = checkdispatchapi.java -# -# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) -# -# SUBDIRS=helper -# -# #----- make a jar from compiled files ------------------------------ -# -# MAXLINELENGTH = 100000 -# -# JARCLASSDIRS = $(PACKAGE) -# JARTARGET = $(TARGET).jar -# JARCOMPRESS = TRUE -# -# # --- Parameters for the test -------------------------------------- -# -# # start an office if the parameter is set for the makefile -# .IF "$(OFFICE)" == "" -# CT_APPEXECCOMMAND = -# .ELSE -# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" -# .ENDIF -# -# # test base is java complex -# CT_TESTBASE = -TestBase java_complex -# -# # test looks something like the.full.package.TestName -# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b) -# -# # start the runner application -# CT_APP = org.openoffice.Runner -# -# # --- Targets ------------------------------------------------------ -# -# .IF "$(depend)" == "" -# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLTAR -# .ELSE -# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLDEP -# .ENDIF -# -# .INCLUDE : target.mk -# -# #$(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : $(JAVAFILES:b).props -# # cp $(JAVAFILES:b).props $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props -# # jar uf $(CLASSDIR)$/$(JARTARGET) -C $(CLASSDIR) $(PACKAGE)$/$(JAVAFILES:b).props -# -# RUN: run -# -# run: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST) -# -# -# diff --git a/framework/qa/complex/disposing/makefile.mk b/framework/qa/complex/disposing/makefile.mk deleted file mode 100755 index f24960421f21..000000000000 --- a/framework/qa/complex/disposing/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_disposing - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/disposing - -# here store only Files which contain a @Test -JAVATESTFILES = \ - GetServiceWhileDisposingOffice.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - diff --git a/framework/qa/complex/framework/autosave/makefile.mk b/framework/qa/complex/framework/autosave/makefile.mk deleted file mode 100644 index 2e8e3dca1f76..000000000000 --- a/framework/qa/complex/framework/autosave/makefile.mk +++ /dev/null @@ -1,127 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../../.. -PRJNAME = framework -TARGET = qa_complex_framework_autosave - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/framework/autosave - -# here store only Files which contain a @Test -JAVATESTFILES = \ - AutoSave.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) \ - ConfigHelper.java \ - Protocol.java - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - -# -# PRJ = ..$/..$/..$/.. -# TARGET = AutoSave -# PRJNAME = framework -# PACKAGE = complex$/framework$/autosave -# -# # --- Settings ----------------------------------------------------- -# .INCLUDE: settings.mk -# -# -# #----- compile .java files ----------------------------------------- -# -# JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar \ -# OOoRunner.jar mysql.jar -# JAVAFILES = AutoSave.java ConfigHelper.java Protocol.java -# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) -# -# #----- make a jar from compiled files ------------------------------ -# -# MAXLINELENGTH = 100000 -# -# JARCLASSDIRS = $(PACKAGE) -# JARTARGET = $(TARGET).jar -# JARCOMPRESS = TRUE -# -# # --- Parameters for the test -------------------------------------- -# -# # start an office if the parameter is set for the makefile -# .IF "$(OFFICE)" == "" -# CT_APPEXECCOMMAND = -# .ELSE -# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" -# .ENDIF -# -# # test base is java complex -# CT_TESTBASE = -TestBase java_complex -# -# # test looks something like the.full.package.TestName -# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b) -# -# # start the runner application -# CT_APP = org.openoffice.Runner -# -# # --- Targets ------------------------------------------------------ -# -# .IF "$(depend)" == "" -# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLTAR -# .ELSE -# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLDEP -# .ENDIF -# -# .INCLUDE : target.mk -# -# #$(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : $(JAVAFILES:b).props -# # cp $(JAVAFILES:b).props $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props -# # jar uf $(CLASSDIR)$/$(JARTARGET) -C $(CLASSDIR) $(PACKAGE)$/$(JAVAFILES:b).props -# -# RUN: run -# -# run: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST) -# -# -# diff --git a/framework/qa/complex/framework/recovery/makefile.mk b/framework/qa/complex/framework/recovery/makefile.mk deleted file mode 100755 index 4a9f80b4b2a5..000000000000 --- a/framework/qa/complex/framework/recovery/makefile.mk +++ /dev/null @@ -1,103 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ..$/..$/..$/.. -TARGET = RecoveryTest -PRJNAME = framework -PACKAGE = complex$/framework$/recovery - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - - -#----- compile .java files ----------------------------------------- - -JARFILES = mysql.jar mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar -JAVAFILES = RecoveryTest.java RecoveryTools.java CrashThread.java TimeoutThread.java KlickButtonThread.java -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -#----- make a jar from compiled files ------------------------------ - -MAXLINELENGTH = 100000 - -JARCLASSDIRS = $(PACKAGE) -JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE - -#------ some information how to run the test ----------------------- - -MYTAR: ALLTAR - @echo - @echo ########################### N O T E ###################################### - @echo - @echo To run the test successfully you have to extend your LD_LIBRARY_PATH - @echo to your office program directory! - @echo Example: - @echo setenv LD_LIBRARY_PATH /myOffice/program:\$$LD_LIBRARY_PATH - @echo - @echo To run the you have to use the parameter cmd: - @echo cmd="PATH_TO_OFFICE_BINARY -accept=socket,host=localhost,port=8100;urp;" - @echo - @echo Example: - @echo dmake run cmd="/myOffice/program/soffice -accept=socket,host=localhost,port=8100;urp;" - @echo - - -# --- Parameters for the test -------------------------------------- - -# start an office if the parameter is set for the makefile -.IF "$(cmd)" == "" -CT_APPEXECCOMMAND = -.ELSE -CT_APPEXECCOMMAND = -cmd "$(cmd)" -#CT_APPEXECCOMMAND = -AppExecutionCommand \ -# "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" -.ENDIF - -# test base is java complex -CT_TESTBASE = -TestBase java_complex - -# replace $/ with . in package name -CT_PACKAGE = -o $(PACKAGE:s\$/\.\) - -# start the runner application -CT_APP = org.openoffice.Runner - -CT_NOOFFICE = -NoOffice true -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -RUN: run -# muss noch angepasst werden: es soll auf -AppExecutionCommand und -NoOffice gepr??ft werden -#.IF "$(OFFICE)" == "" -#run: -# @echo Exit -#.ELSE -run: - +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_NOOFFICE) $(CT_PACKAGE).RecoveryTest - diff --git a/framework/qa/complex/imageManager/interfaces/makefile.mk b/framework/qa/complex/imageManager/interfaces/makefile.mk deleted file mode 100755 index f7b6f5ebf035..000000000000 --- a/framework/qa/complex/imageManager/interfaces/makefile.mk +++ /dev/null @@ -1,63 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ../../../.. -TARGET = ImageManager -PRJNAME = framework -PACKAGE = complex/imageManager/interfaces - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - - -#----- compile .java files ----------------------------------------- - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar - -JAVAFILES = \ -_XComponent.java \ -_XUIConfiguration.java \ -_XImageManager.java \ -_XUIConfigurationPersistence.java \ -_XInitialization.java \ -_XTypeProvider.java - -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class) - -#----- make a jar from compiled files ------------------------------ - -MAXLINELENGTH = 100000 - -JARCLASSDIRS = $(PACKAGE) -JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - diff --git a/framework/qa/complex/imageManager/makefile.mk b/framework/qa/complex/imageManager/makefile.mk deleted file mode 100755 index 133e522b13b4..000000000000 --- a/framework/qa/complex/imageManager/makefile.mk +++ /dev/null @@ -1,123 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_imageManager - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/imageManager - -# here store only Files which contain a @Test -JAVATESTFILES = \ - CheckImageManager.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) \ - _XComponent.java \ - _XImageManager.java \ - _XInitialization.java \ - _XTypeProvider.java \ - _XUIConfiguration.java \ - _XUIConfigurationPersistence.java - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - - - -# -# -# PRJ = ..$/..$/.. -# TARGET = ImageManager -# PRJNAME = framework -# PACKAGE = imageManager -# -# # --- Settings ----------------------------------------------------- -# .INCLUDE: settings.mk -# -# -# #----- compile .java files ----------------------------------------- -# -# JARFILES = mysql.jar mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar -# JAVAFILES = CheckImageManager.java -# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) -# -# #----- make a jar from compiled files ------------------------------ -# -# MAXLINELENGTH = 100000 -# -# JARCLASSDIRS = $(PACKAGE) -# JARTARGET = $(TARGET).jar -# JARCOMPRESS = TRUE -# -# # --- Parameters for the test -------------------------------------- -# -# # start an office if the parameter is set for the makefile -# .IF "$(OFFICE)" == "" -# CT_APPEXECCOMMAND = -# .ELSE -# CT_APPEXECCOMMAND = -AppExecutionCommand \ -# "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" -# .ENDIF -# -# # test base is java complex -# CT_TESTBASE = -TestBase java_complex -# -# # replace $/ with . in package name -# CT_PACKAGE = -o $(PACKAGE:s\$/\.\) -# -# # start the runner application -# CT_APP = org.openoffice.Runner -# -# # --- Targets ------------------------------------------------------ -# -# .INCLUDE : target.mk -# -# RUN: run -# -# run: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_PACKAGE).CheckImageManager -# -# diff --git a/framework/qa/complex/loadAllDocuments/helper/makefile.mk b/framework/qa/complex/loadAllDocuments/helper/makefile.mk deleted file mode 100644 index 05a3c7a997ea..000000000000 --- a/framework/qa/complex/loadAllDocuments/helper/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ = ../../../.. -TARGET = CheckXComponentLoader -PRJNAME = framework -PACKAGE = complex/loadAllDocuments/helper - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - - -#----- compile .java files ----------------------------------------- - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar -JAVAFILES = InteractionHandler.java StatusIndicator.java StreamSimulator.java -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class) - -MAXLINELENGTH = 100000 - -.INCLUDE : target.mk - - - diff --git a/framework/qa/complex/loadAllDocuments/makefile.mk b/framework/qa/complex/loadAllDocuments/makefile.mk deleted file mode 100644 index ebf0265620bf..000000000000 --- a/framework/qa/complex/loadAllDocuments/makefile.mk +++ /dev/null @@ -1,134 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_loadAllDocuments - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/loadAllDocuments - -# here store only Files which contain a @Test -JAVATESTFILES = \ - CheckXComponentLoader.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) \ - InteractionHandler.java \ - StatusIndicator.java \ - StreamSimulator.java \ - TestDocument.java - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - - - -# -# -# PRJ = ..$/..$/.. -# TARGET = CheckXComponentLoader -# PRJNAME = framework -# PACKAGE = complex$/loadAllDocuments -# -# # --- Settings ----------------------------------------------------- -# .INCLUDE: settings.mk -# -# -# #----- compile .java files ----------------------------------------- -# -# JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar \ -# OOoRunner.jar mysql.jar -# JAVAFILES = -# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) -# -# SUBDIRS = helper -# -# #----- make a jar from compiled files ------------------------------ -# -# MAXLINELENGTH = 100000 -# -# JARCLASSDIRS = $(PACKAGE) -# JARTARGET = $(TARGET).jar -# JARCOMPRESS = TRUE -# -# # --- Parameters for the test -------------------------------------- -# -# # start an office if the parameter is set for the makefile -# .IF "$(OFFICE)" == "" -# CT_APPEXECCOMMAND = -# .ELSE -# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" -# .ENDIF -# -# # test base is java complex -# CT_TESTBASE = -TestBase java_complex -# -# # test looks something like the.full.package.TestName -# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b) -# -# # start the runner application -# CT_APP = org.openoffice.Runner -# -# # --- Targets ------------------------------------------------------ -# -# .IF "$(depend)" == "" -# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLTAR -# .ELSE -# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLDEP -# .ENDIF -# -# .INCLUDE : target.mk -# -# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : $(JAVAFILES:b).props -# cp $(JAVAFILES:b).props $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props -# jar uf $(CLASSDIR)$/$(JARTARGET) -C $(CLASSDIR) $(PACKAGE)$/$(JAVAFILES:b).props -# -# RUN: run -# -# run: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST) -tdoc $(PWD)$/testdocuments -# -# -# diff --git a/framework/qa/complex/path_settings/makefile.mk b/framework/qa/complex/path_settings/makefile.mk deleted file mode 100755 index 05900d46e190..000000000000 --- a/framework/qa/complex/path_settings/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -# @echo "OOO_SUBSEQUENT_TESTS not set, do nothing." -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_path_settings - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/path_settings - -# here store only Files which contain a @Test -JAVATESTFILES = \ - PathSettingsTest.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - diff --git a/framework/qa/complex/path_substitution/makefile.mk b/framework/qa/complex/path_substitution/makefile.mk deleted file mode 100755 index 338affbf70d7..000000000000 --- a/framework/qa/complex/path_substitution/makefile.mk +++ /dev/null @@ -1,122 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = framework -TARGET = qa_complex_path_substitution - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/path_substitution - -# here store only Files which contain a @Test -JAVATESTFILES = \ - PathSubstitutionTest.java - -# put here all other files -JAVAFILES = $(JAVATESTFILES) - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - - -# -# -# -# -# PRJ = ..$/..$/.. -# TARGET = PathSubstitution -# PRJNAME = $(TARGET) -# PACKAGE = complex$/path_substitution -# -# # --- Settings ----------------------------------------------------- -# .INCLUDE: settings.mk -# -# -# #----- compile .java files ----------------------------------------- -# -# JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar -# JAVAFILES = PathSubstitutionTest.java -# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) -# -# #----- make a jar from compiled files ------------------------------ -# -# MAXLINELENGTH = 100000 -# -# JARCLASSDIRS = $(PACKAGE) -# JARTARGET = $(TARGET).jar -# JARCOMPRESS = TRUE -# -# # --- Parameters for the test -------------------------------------- -# -# # start an office if the parameter is set for the makefile -# .IF "$(OFFICE)" == "" -# CT_APPEXECCOMMAND = -# .ELSE -# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" -# .ENDIF -# -# # test base is java complex -# CT_TESTBASE = -TestBase java_complex -# -# # test looks something like the.full.package.TestName -# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b) -# -# # start the runner application -# CT_APP = org.openoffice.Runner -# -# # --- Targets ------------------------------------------------------ -# -# .IF "$(depend)" == "" -# ALL : ALLTAR -# .ELSE -# ALL: ALLDEP -# .ENDIF -# -# .INCLUDE : target.mk -# -# RUN: run -# -# run: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_TEST) -# diff --git a/framework/qa/unoapi/makefile.mk b/framework/qa/unoapi/makefile.mk deleted file mode 100755 index 38a6cf7cced8..000000000000 --- a/framework/qa/unoapi/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -#***********************************************************************/ - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../.. -PRJNAME = framework -TARGET = qa_unoapi - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = org/openoffice/framework/qa/unoapi -JAVATESTFILES = Test.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/framework/source/accelerators/makefile.mk b/framework/source/accelerators/makefile.mk deleted file mode 100644 index 23a60dd1870e..000000000000 --- a/framework/source/accelerators/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_accelerators -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/keymapping.obj \ - $(SLO)$/storageholder.obj \ - $(SLO)$/presethandler.obj \ - $(SLO)$/acceleratorcache.obj \ - $(SLO)$/acceleratorconfiguration.obj \ - $(SLO)$/globalacceleratorconfiguration.obj \ - $(SLO)$/moduleacceleratorconfiguration.obj \ - $(SLO)$/documentacceleratorconfiguration.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/application/makefile.mk b/framework/source/application/makefile.mk deleted file mode 100644 index 96bd84de2373..000000000000 --- a/framework/source/application/makefile.mk +++ /dev/null @@ -1,45 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= framework -LIBTARGET= NO -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/login.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/classes/makefile.mk b/framework/source/classes/makefile.mk deleted file mode 100644 index 458aa328ac32..000000000000 --- a/framework/source/classes/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_classes -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/droptargetlistener.obj \ - $(SLO)$/framecontainer.obj \ - $(SLO)$/fwktabwindow.obj \ - $(SLO)$/fwlresid.obj \ - $(SLO)$/menumanager.obj \ - $(SLO)$/taskcreator.obj \ - -SRS1NAME=$(TARGET) -SRC1FILES =\ - resource.src - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/constant/makefile.mk b/framework/source/constant/makefile.mk deleted file mode 100644 index 05fc28870d0a..000000000000 --- a/framework/source/constant/makefile.mk +++ /dev/null @@ -1,45 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. -PRJNAME= framework -TARGET= fwk_constant -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= $(SLO)$/frameloader.obj \ - $(SLO)$/contenthandler.obj \ - $(SLO)$/containerquery.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/dispatch/makefile.mk b/framework/source/dispatch/makefile.mk deleted file mode 100644 index f1215216a585..000000000000 --- a/framework/source/dispatch/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_dispatch -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- defines ------------------------------------------------------ - -CDEFS+=-DCOMPMOD_NAMESPACE=framework - -# --- Generate ----------------------------------------------------- - -SLOFILES=\ - $(SLO)$/closedispatcher.obj \ - $(SLO)$/dispatchinformationprovider.obj \ - $(SLO)$/dispatchprovider.obj \ - $(SLO)$/helpagentdispatcher.obj \ - $(SLO)$/interceptionhelper.obj \ - $(SLO)$/loaddispatcher.obj \ - $(SLO)$/mailtodispatcher.obj \ - $(SLO)$/menudispatcher.obj \ - $(SLO)$/oxt_handler.obj \ - $(SLO)$/popupmenudispatcher.obj \ - $(SLO)$/servicehandler.obj \ - $(SLO)$/systemexec.obj \ - $(SLO)$/windowcommanddispatch.obj \ - $(SLO)$/startmoduledispatcher.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/fwe/classes/makefile.mk b/framework/source/fwe/classes/makefile.mk deleted file mode 100644 index b5743577c993..000000000000 --- a/framework/source/fwe/classes/makefile.mk +++ /dev/null @@ -1,58 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_fweclasses -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CDEFS+=-DFWE_DLLIMPLEMENTATION - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/actiontriggercontainer.obj \ - $(SLO)$/actiontriggerpropertyset.obj \ - $(SLO)$/actiontriggerseparatorpropertyset.obj \ - $(SLO)$/addonmenu.obj \ - $(SLO)$/addonsoptions.obj \ - $(SLO)$/bmkmenu.obj \ - $(SLO)$/fwkresid.obj \ - $(SLO)$/imagewrapper.obj \ - $(SLO)$/menuextensionsupplier.obj \ - $(SLO)$/rootactiontriggercontainer.obj \ - $(SLO)$/sfxhelperfunctions.obj \ - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/fwe/dispatch/makefile.mk b/framework/source/fwe/dispatch/makefile.mk deleted file mode 100644 index 2529236ceaa6..000000000000 --- a/framework/source/fwe/dispatch/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_fwedispatch -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- defines ------------------------------------------------------ - -CDEFS+=-DCOMPMOD_NAMESPACE=framework -DFWE_DLLIMPLEMENTATION - -# --- Generate ----------------------------------------------------- - -SLOFILES=\ - $(SLO)$/interaction.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/fwe/helper/makefile.mk b/framework/source/fwe/helper/makefile.mk deleted file mode 100644 index 75bbb9b476fa..000000000000 --- a/framework/source/fwe/helper/makefile.mk +++ /dev/null @@ -1,55 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_fwehelper -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- defines ------------------------------------------------------ - -CDEFS+=-DCOMPMOD_NAMESPACE=framework -DFWE_DLLIMPLEMENTATION - -# --- Generate ----------------------------------------------------- - -SLOFILES=\ -$(SLO)$/acceleratorinfo.obj \ -$(SLO)$/actiontriggerhelper.obj \ -$(SLO)$/configimporter.obj \ -$(SLO)$/imageproducer.obj \ -$(SLO)$/propertysetcontainer.obj \ -$(SLO)$/titlehelper.obj \ -$(SLO)$/uiconfigelementwrapperbase.obj \ -$(SLO)$/uielementwrapperbase.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/fwe/interaction/makefile.mk b/framework/source/fwe/interaction/makefile.mk deleted file mode 100644 index c9d1e4304ecc..000000000000 --- a/framework/source/fwe/interaction/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_fweinteraction -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- defines ------------------------------------------------------ - -CDEFS+=-DCOMPMOD_NAMESPACE=framework -DFWE_DLLIMPLEMENTATION - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/preventduplicateinteraction.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/fwe/xml/makefile.mk b/framework/source/fwe/xml/makefile.mk deleted file mode 100644 index 8870189b4b8e..000000000000 --- a/framework/source/fwe/xml/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_fwexml -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CDEFS += -DFWE_DLLIMPLEMENTATION - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/eventsconfiguration.obj \ - $(SLO)$/eventsdocumenthandler.obj \ - $(SLO)$/imagesconfiguration.obj \ - $(SLO)$/imagesdocumenthandler.obj \ - $(SLO)$/menuconfiguration.obj \ - $(SLO)$/menudocumenthandler.obj \ - $(SLO)$/saxnamespacefilter.obj \ - $(SLO)$/statusbarconfiguration.obj \ - $(SLO)$/statusbardocumenthandler.obj \ - $(SLO)$/toolboxconfiguration.obj \ - $(SLO)$/toolboxdocumenthandler.obj \ - $(SLO)$/toolboxlayoutdocumenthandler.obj \ - $(SLO)$/xmlnamespaces.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/fwi/classes/makefile.mk b/framework/source/fwi/classes/makefile.mk deleted file mode 100644 index 0da8940139ee..000000000000 --- a/framework/source/fwi/classes/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_fwiclasses -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CDEFS+=-DFWI_DLLIMPLEMENTATION - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/converter.obj \ - $(SLO)$/framelistanalyzer.obj \ - $(SLO)$/propertysethelper.obj \ - $(SLO)$/protocolhandlercache.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/fwi/helper/makefile.mk b/framework/source/fwi/helper/makefile.mk deleted file mode 100644 index c44bef68037c..000000000000 --- a/framework/source/fwi/helper/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_fwihelper -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- defines ------------------------------------------------------ - -CDEFS+=-DCOMPMOD_NAMESPACE=framework -DFWI_DLLIMPLEMENTATION - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/mischelper.obj \ - $(SLO)$/networkdomain.obj \ - $(SLO)$/popupmenucontrollerbase.obj \ - $(SLO)$/shareablemutex.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/fwi/jobs/makefile.mk b/framework/source/fwi/jobs/makefile.mk deleted file mode 100644 index 8e707bd780fe..000000000000 --- a/framework/source/fwi/jobs/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_fwijobs -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CDEFS += -DFWI_DLLIMPLEMENTATION - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/jobconst.obj \ - $(SLO)$/configaccess.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/fwi/threadhelp/makefile.mk b/framework/source/fwi/threadhelp/makefile.mk deleted file mode 100644 index bea08c6db7e2..000000000000 --- a/framework/source/fwi/threadhelp/makefile.mk +++ /dev/null @@ -1,45 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_threadhelp -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CDEFS += -DFWI_DLLIMPLEMENTATION -# --- Generate ----------------------------------------------------- - -SLOFILES= $(SLO)$/lockhelper.obj \ - $(SLO)$/transactionmanager.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/fwi/uielement/makefile.mk b/framework/source/fwi/uielement/makefile.mk deleted file mode 100644 index 68d0df5740eb..000000000000 --- a/framework/source/fwi/uielement/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= framework -TARGET= fwk_fwiuielement -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CDEFS += -DFWI_DLLIMPLEMENTATION - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/constitemcontainer.obj \ - $(SLO)$/itemcontainer.obj \ - $(SLO)$/rootitemcontainer.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/helper/makefile.mk b/framework/source/helper/makefile.mk deleted file mode 100644 index 556a9829d27c..000000000000 --- a/framework/source/helper/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_helper -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- defines ------------------------------------------------------ - -CDEFS+=-DCOMPMOD_NAMESPACE=framework - -# --- Generate ----------------------------------------------------- - -SLOFILES= $(SLO)$/ocomponentaccess.obj \ - $(SLO)$/ocomponentenumeration.obj \ - $(SLO)$/oframes.obj \ - $(SLO)$/statusindicatorfactory.obj \ - $(SLO)$/statusindicator.obj \ - $(SLO)$/imageproducer.obj \ - $(SLO)$/propertysetcontainer.obj \ - $(SLO)$/actiontriggerhelper.obj \ - $(SLO)$/persistentwindowstate.obj \ - $(SLO)$/networkdomain.obj \ - $(SLO)$/acceleratorinfo.obj \ - $(SLO)$/uielementwrapperbase.obj \ - $(SLO)$/popupmenucontrollerbase.obj \ - $(SLO)$/dockingareadefaultacceptor.obj \ - $(SLO)$/uiconfigelementwrapperbase.obj \ - $(SLO)$/shareablemutex.obj \ - $(SLO)$/vclstatusindicator.obj \ - $(SLO)$/wakeupthread.obj \ - $(SLO)$/configimporter.obj \ - $(SLO)$/tagwindowasmodified.obj \ - $(SLO)$/titlebarupdate.obj \ - $(SLO)$/titlehelper.obj \ - $(SLO)$/mischelper.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/interaction/makefile.mk b/framework/source/interaction/makefile.mk deleted file mode 100644 index ce1deef15724..000000000000 --- a/framework/source/interaction/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_interaction -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- defines ------------------------------------------------------ - -CDEFS+=-DCOMPMOD_NAMESPACE=framework - -# --- Generate ----------------------------------------------------- - -SLOFILES= $(SLO)$/quietinteraction.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/jobs/makefile.mk b/framework/source/jobs/makefile.mk deleted file mode 100644 index 1846e3d1ffd9..000000000000 --- a/framework/source/jobs/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_jobs -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= $(SLO)$/jobexecutor.obj \ - $(SLO)$/jobdispatch.obj \ - $(SLO)$/job.obj \ - $(SLO)$/jobdata.obj \ - $(SLO)$/jobresult.obj \ - $(SLO)$/joburl.obj \ - $(SLO)$/helponstartup.obj \ - $(SLO)$/shelljob.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/layoutmanager/makefile.mk b/framework/source/layoutmanager/makefile.mk deleted file mode 100644 index 70215a36578d..000000000000 --- a/framework/source/layoutmanager/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_layout -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -VISIBILITY_HIDDEN = TRUE - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/layoutmanager.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/loadenv/makefile.mk b/framework/source/loadenv/makefile.mk deleted file mode 100644 index c68ad8d304cb..000000000000 --- a/framework/source/loadenv/makefile.mk +++ /dev/null @@ -1,46 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_loadenv -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/loadenv.obj \ - $(SLO)$/targethelper.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/recording/makefile.mk b/framework/source/recording/makefile.mk deleted file mode 100644 index a13eb7b91202..000000000000 --- a/framework/source/recording/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=framework -TARGET=recording -ENABLE_EXCEPTIONS=TRUE -NO_BSYMBOLIC=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -SLOFILES =\ - $(SLO)$/dispatchrecordersupplier.obj\ - $(SLO)$/dispatchrecorder.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/register/makefile.mk b/framework/source/register/makefile.mk deleted file mode 100644 index 2920cb283018..000000000000 --- a/framework/source/register/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_register -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE -LIBTARGET= NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -VISIBILITY_HIDDEN = TRUE - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/registerservices.obj \ - $(SLO)$/registertemp.obj \ - $(SLO)$/register3rdcomponents.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/services/makefile.mk b/framework/source/services/makefile.mk deleted file mode 100644 index 2978d9aacf5e..000000000000 --- a/framework/source/services/makefile.mk +++ /dev/null @@ -1,64 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_services -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES=\ - $(SLO)$/desktop.obj \ - $(SLO)$/frame.obj \ - $(SLO)$/urltransformer.obj \ - $(SLO)$/mediatypedetectionhelper.obj \ - $(SLO)$/substitutepathvars.obj \ - $(SLO)$/pathsettings.obj \ - $(SLO)$/backingcomp.obj \ - $(SLO)$/backingwindow.obj \ - $(SLO)$/dispatchhelper.obj \ - $(SLO)$/license.obj \ - $(SLO)$/modulemanager.obj \ - $(SLO)$/autorecovery.obj \ - $(SLO)$/sessionlistener.obj \ - $(SLO)$/taskcreatorsrv.obj \ - $(SLO)$/uriabbreviation.obj \ - $(SLO)$/tabwindowservice.obj - -SRS1NAME=$(TARGET) -SRC1FILES= fwk_services.src - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/tabwin/makefile.mk b/framework/source/tabwin/makefile.mk deleted file mode 100644 index 6147672bdc73..000000000000 --- a/framework/source/tabwin/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_tabwin -USE_DEFFILE= TRUE -NO_BSYMBOLIC= TRUE -ENABLE_EXCEPTIONS= TRUE -BOOTSTRAP_SERVICE= FALSE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/tabwinfactory.obj \ - $(SLO)$/tabwindow.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/uiconfiguration/makefile.mk b/framework/source/uiconfiguration/makefile.mk deleted file mode 100644 index ef82e2da76c6..000000000000 --- a/framework/source/uiconfiguration/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ - -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_uiconfiguration -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/uiconfigurationmanager.obj \ - $(SLO)$/moduleuiconfigurationmanager.obj \ - $(SLO)$/moduleuicfgsupplier.obj \ - $(SLO)$/windowstateconfiguration.obj \ - $(SLO)$/moduleimagemanager.obj \ - $(SLO)$/imagemanager.obj \ - $(SLO)$/imagemanagerimpl.obj \ - $(SLO)$/graphicnameaccess.obj \ - $(SLO)$/uicategorydescription.obj \ - $(SLO)$/globalsettings.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/uielement/makefile.mk b/framework/source/uielement/makefile.mk deleted file mode 100644 index 367ba52a3fdc..000000000000 --- a/framework/source/uielement/makefile.mk +++ /dev/null @@ -1,84 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_uielement -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/addonstoolbarmanager.obj \ - $(SLO)$/addonstoolbarwrapper.obj \ - $(SLO)$/buttontoolbarcontroller.obj \ - $(SLO)$/comboboxtoolbarcontroller.obj \ - $(SLO)$/complextoolbarcontroller.obj \ - $(SLO)$/controlmenucontroller.obj \ - $(SLO)$/dropdownboxtoolbarcontroller.obj \ - $(SLO)$/edittoolbarcontroller.obj \ - $(SLO)$/fontmenucontroller.obj \ - $(SLO)$/fontsizemenucontroller.obj \ - $(SLO)$/footermenucontroller.obj \ - $(SLO)$/generictoolbarcontroller.obj \ - $(SLO)$/headermenucontroller.obj \ - $(SLO)$/imagebuttontoolbarcontroller.obj \ - $(SLO)$/langselectionmenucontroller.obj \ - $(SLO)$/langselectionstatusbarcontroller.obj \ - $(SLO)$/logoimagestatusbarcontroller.obj \ - $(SLO)$/logotextstatusbarcontroller.obj \ - $(SLO)$/macrosmenucontroller.obj \ - $(SLO)$/menubarmanager.obj \ - $(SLO)$/menubarmerger.obj \ - $(SLO)$/menubarwrapper.obj \ - $(SLO)$/newmenucontroller.obj \ - $(SLO)$/objectmenucontroller.obj \ - $(SLO)$/progressbarwrapper.obj \ - $(SLO)$/recentfilesmenucontroller.obj \ - $(SLO)$/simpletextstatusbarcontroller.obj \ - $(SLO)$/spinfieldtoolbarcontroller.obj \ - $(SLO)$/statusbar.obj \ - $(SLO)$/statusbarmanager.obj \ - $(SLO)$/statusbarwrapper.obj \ - $(SLO)$/statusindicatorinterfacewrapper.obj \ - $(SLO)$/togglebuttontoolbarcontroller.obj \ - $(SLO)$/toolbar.obj \ - $(SLO)$/toolbarmanager.obj \ - $(SLO)$/toolbarmerger.obj \ - $(SLO)$/toolbarsmenucontroller.obj \ - $(SLO)$/toolbarwrapper.obj \ - $(SLO)$/popupmenucontroller.obj \ - $(SLO)$/uicommanddescription.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/framework/source/uifactory/makefile.mk b/framework/source/uifactory/makefile.mk deleted file mode 100644 index cf820e98738f..000000000000 --- a/framework/source/uifactory/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=framework -TARGET= fwk_uifactory -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/popupmenucontrollerfactory.obj \ - $(SLO)$/uielementfactorymanager.obj \ - $(SLO)$/menubarfactory.obj \ - $(SLO)$/toolboxfactory.obj \ - $(SLO)$/addonstoolboxfactory.obj \ - $(SLO)$/toolbarcontrollerfactory.obj \ - $(SLO)$/statusbarfactory.obj \ - $(SLO)$/statusbarcontrollerfactory.obj \ - $(SLO)$/factoryconfiguration.obj \ - $(SLO)$/windowcontentfactorymanager.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/source/xml/makefile.mk b/framework/source/xml/makefile.mk deleted file mode 100644 index a4f18a555ab3..000000000000 --- a/framework/source/xml/makefile.mk +++ /dev/null @@ -1,58 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= fwk_xml -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -SLOFILES= \ - $(SLO)$/eventsconfiguration.obj \ - $(SLO)$/eventsdocumenthandler.obj \ - $(SLO)$/imagesconfiguration.obj \ - $(SLO)$/imagesdocumenthandler.obj \ - $(SLO)$/menuconfiguration.obj \ - $(SLO)$/menudocumenthandler.obj \ - $(SLO)$/statusbarconfiguration.obj \ - $(SLO)$/statusbardocumenthandler.obj \ - $(SLO)$/toolboxconfiguration.obj \ - $(SLO)$/toolboxdocumenthandler.obj \ - $(SLO)$/saxnamespacefilter.obj \ - $(SLO)$/xmlnamespaces.obj \ - $(SLO)$/acceleratorconfigurationreader.obj \ - $(SLO)$/acceleratorconfigurationwriter.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/test/makefile.mk b/framework/test/makefile.mk deleted file mode 100644 index 6764af8dd091..000000000000 --- a/framework/test/makefile.mk +++ /dev/null @@ -1,94 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME= framework -TARGET= test -LIBTARGET= NO -ENABLE_EXCEPTIONS= TRUE -USE_DEFFILE= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- applikation: "test" -------------------------------------------------- - -#APP1TARGET= test - -#APP1OBJS= $(SLO)$/test.obj -#DEPOBJFILES+= $(APP1OBJS) - -#APP1LIBS= $(SLB)$/fwk_classes.lib \ -# $(SLB)$/fwk_helper.lib - -#APP1STDLIBS= $(CPPULIB) \ -# $(CPPUHELPERLIB) \ -# $(SALLIB) \ -# $(VOSLIB) \ -# $(TOOLSLIB) \ -# $(SVTOOLLIB) \ -# $(TKLIB) \ -# $(COMPHELPERLIB) \ -# $(VCLLIB) - -#APP1DEPN= $(SLB)$/fwk_helper.lib \ -# $(SLB)$/fwk_classes.lib - -# --- application: "threadtest" -------------------------------------------------- - -APP2TARGET= threadtest - -APP2OBJS= $(SLO)$/threadtest.obj \ - $(SLO)$/transactionmanager.obj \ - $(SLO)$/transactionguard.obj \ - $(SLO)$/fairrwlock.obj \ - $(SLO)$/resetableguard.obj \ - $(SLO)$/gate.obj \ - $(SLO)$/readguard.obj \ - $(SLO)$/writeguard.obj - -DEPOBJFILES+= $(APP2OBJS) - -APP2STDLIBS= $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(VOSLIB) \ - $(VCLLIB) - -APP2DEPN= $(SLO)$/fairrwlock.obj \ - $(SLO)$/transactionmanager.obj \ - $(SLO)$/transactionguard.obj \ - $(SLO)$/resetableguard.obj \ - $(SLO)$/gate.obj \ - $(SLO)$/readguard.obj \ - $(SLO)$/writeguard.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/test/threadtest/makefile.mk b/framework/test/threadtest/makefile.mk deleted file mode 100644 index 833c328dc8a8..000000000000 --- a/framework/test/threadtest/makefile.mk +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= threadtest -LIBTARGET= NO -ENABLE_EXCEPTIONS= TRUE -USE_DEFFILE= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- application: "threadtest" -------------------------------------------------- - -APP1TARGET= threadtest - -APP1OBJS= $(SLO)$/threadtest.obj \ - $(SLO)$/lockhelper.obj - -DEPOBJFILES=$(APP1OBJS) - -# [ed] 6/16/02 Add the transaction manager library on OS X - -APP1STDLIBS= $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(VOSLIB) \ - $(VCLLIB) - -APP1DEPN= $(INC)$/threadhelp$/threadhelpbase.hxx \ - $(INC)$/threadhelp$/transactionbase.hxx \ - $(INC)$/threadhelp$/transactionmanager.hxx \ - $(INC)$/threadhelp$/transactionguard.hxx \ - $(INC)$/threadhelp$/resetableguard.hxx \ - $(INC)$/threadhelp$/readguard.hxx \ - $(INC)$/threadhelp$/writeguard.hxx - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/test/typecfg/makefile.mk b/framework/test/typecfg/makefile.mk deleted file mode 100644 index 83782fdc4d74..000000000000 --- a/framework/test/typecfg/makefile.mk +++ /dev/null @@ -1,73 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= typecfg -LIBTARGET= NO -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- applikation: "xml2xcd" -------------------------------------------------- - -# --- applikation: "cfgview" -------------------------------------------------- - -APP2TARGET= cfgview - -APP2OBJS= $(SLO)$/cfgview.obj \ - $(SLO)$/servicemanager.obj \ - $(SLO)$/filtercachedata.obj \ - $(SLO)$/filtercache.obj \ - $(SLO)$/wildcard.obj \ - $(SLO)$/lockhelper.obj - -DEPOBJFILES=$(APP2OBJS) - -APP2STDLIBS= $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(VOSLIB) \ - $(TOOLSLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(COMPHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(VCLLIB) - -APP2DEPN= $(SLO)$/servicemanager.obj \ - $(SLO)$/filtercachedata.obj \ - $(SLO)$/filtercache.obj \ - $(SLO)$/wildcard.obj \ - $(SLO)$/lockhelper.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/framework/util/guiapps/makefile.mk b/framework/util/guiapps/makefile.mk deleted file mode 100644 index efa5fc3fd88e..000000000000 --- a/framework/util/guiapps/makefile.mk +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME= framework -TARGET= framework_guiapp -TARGETTYPE=GUI - -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE -GEN_HID= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- login applikation ------------------------------------------------------- - -APP1TARGET= login - -APP1OBJS= $(SLO)$/login.obj \ - $(SLO)$/servicemanager.obj \ - $(SLO)$/lockhelper.obj \ - $(SLO)$/transactionmanager.obj - -DEPOBJFILES=$(APP1OBJS) - -APP1STDLIBS= $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(VOSLIB) \ - $(TOOLSLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(COMPHELPERLIB) \ - $(VCLLIB) - -APP1DEPN= $(SLO)$/servicemanager.obj - -# --- Targets ----------------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk deleted file mode 100644 index 6b7bf5937b00..000000000000 --- a/framework/util/makefile.mk +++ /dev/null @@ -1,383 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME= framework -TARGET= framework - -ENABLE_EXCEPTIONS= TRUE -NO_BSYMBOLIC= TRUE -GEN_HID= TRUE -GEN_HID_OTHER= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -USE_DEFFILE= -SHL1USE_EXPORTS=name -SHL2USE_EXPORTS=name -SHL3USE_EXPORTS=name -SHL4USE_EXPORTS=name -SHL5USE_EXPORTS=name - -# --- internal import ------------------------------------------------- - -LIB1TARGET= $(SLB)$/fwiobj.lib -LIB1OBJFILES= \ - $(SLO)$/converter.obj \ - $(SLO)$/lockhelper.obj \ - $(SLO)$/transactionmanager.obj \ - $(SLO)$/protocolhandlercache.obj \ - $(SLO)$/networkdomain.obj \ - $(SLO)$/configaccess.obj \ - $(SLO)$/shareablemutex.obj \ - $(SLO)$/itemcontainer.obj \ - $(SLO)$/rootitemcontainer.obj \ - $(SLO)$/constitemcontainer.obj \ - $(SLO)$/jobconst.obj \ - $(SLO)$/mischelper.obj \ - $(SLO)$/propertysethelper.obj - - - -# --- export library for sfx2 ------------------------------------------------- - -LIB2TARGET= $(SLB)$/fweobj.lib -LIB2OBJFILES= \ - $(SLO)$/bmkmenu.obj \ - $(SLO)$/eventsconfiguration.obj \ - $(SLO)$/eventsdocumenthandler.obj \ - $(SLO)$/imageproducer.obj \ - $(SLO)$/menuconfiguration.obj \ - $(SLO)$/menudocumenthandler.obj \ - $(SLO)$/saxnamespacefilter.obj \ - $(SLO)$/statusbarconfiguration.obj \ - $(SLO)$/statusbardocumenthandler.obj \ - $(SLO)$/toolboxconfiguration.obj \ - $(SLO)$/toolboxdocumenthandler.obj \ - $(SLO)$/imagesconfiguration.obj \ - $(SLO)$/imagesdocumenthandler.obj \ - $(SLO)$/xmlnamespaces.obj \ - $(SLO)$/actiontriggerpropertyset.obj \ - $(SLO)$/actiontriggerseparatorpropertyset.obj \ - $(SLO)$/actiontriggercontainer.obj \ - $(SLO)$/propertysetcontainer.obj \ - $(SLO)$/rootactiontriggercontainer.obj \ - $(SLO)$/actiontriggerhelper.obj \ - $(SLO)$/imagewrapper.obj \ - $(SLO)$/interaction.obj \ - $(SLO)$/addonmenu.obj \ - $(SLO)$/addonsoptions.obj \ - $(SLO)$/fwkresid.obj \ - $(SLO)$/acceleratorinfo.obj \ - $(SLO)$/sfxhelperfunctions.obj \ - $(SLO)$/uielementwrapperbase.obj \ - $(SLO)$/uiconfigelementwrapperbase.obj \ - $(SLO)$/configimporter.obj \ - $(SLO)$/menuextensionsupplier.obj \ - $(SLO)$/preventduplicateinteraction.obj \ - $(SLO)$/framelistanalyzer.obj \ - $(SLO)$/titlehelper.obj - -# --- import classes library --------------------------------------------------- - -SHL1TARGET= fwi$(DLLPOSTFIX) -SHL1IMPLIB= ifwi -SHL1LIBS= $(LIB1TARGET) -SHL1STDLIBS= \ - $(UNOTOOLSLIB) \ - $(CPPUHELPERLIB) \ - $(TOOLSLIB) \ - $(SVTOOLLIB) \ - $(SVLLIB) \ - $(I18NISOLANGLIB) \ - $(VOSLIB) \ - $(VCLLIB) \ - $(TKLIB) \ - $(CPPULIB) \ - $(SALLIB) - -.IF "$(GUI)"=="WNT" -SHL1STDLIBS+=\ - $(UWINAPILIB) \ - $(UNICOWSLIB) \ - $(ADVAPI32LIB) \ - $(KERNEL32LIB) -.ENDIF - -# --- export classes library --------------------------------------------------- - -SHL2TARGET= fwe$(DLLPOSTFIX) -SHL2IMPLIB= ifwe -SHL2LIBS= $(LIB2TARGET) -SHL2STDLIBS= \ - $(FWILIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SVTOOLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) - -# --- light services library ---------------------------------------------------- - -SHL3TARGET= fwl$(DLLPOSTFIX) -SHL3IMPLIB= ifwl -SHL3OBJS= $(SLO)$/mediatypedetectionhelper.obj\ - $(SLO)$/registertemp.obj \ - $(SLO)$/mailtodispatcher.obj \ - $(SLO)$/oxt_handler.obj \ - $(SLO)$/toolbarsmenucontroller.obj \ - $(SLO)$/newmenucontroller.obj \ - $(SLO)$/macrosmenucontroller.obj \ - $(SLO)$/langselectionmenucontroller.obj \ - $(SLO)$/headermenucontroller.obj \ - $(SLO)$/footermenucontroller.obj \ - $(SLO)$/fontsizemenucontroller.obj \ - $(SLO)$/fontmenucontroller.obj \ - $(SLO)$/tabwindowservice.obj \ - $(SLO)$/fwktabwindow.obj \ - $(SLO)$/logotextstatusbarcontroller.obj \ - $(SLO)$/fwlresid.obj \ - $(SLO)$/logoimagestatusbarcontroller.obj \ - $(SLO)$/simpletextstatusbarcontroller.obj \ - $(SLO)$/uriabbreviation.obj \ - $(SLO)$/servicehandler.obj \ - $(SLO)$/license.obj \ - $(SLO)$/dispatchrecorder.obj \ - $(SLO)$/dispatchrecordersupplier.obj\ - $(SLO)$/dispatchhelper.obj \ - $(SLO)$/popupmenudispatcher.obj \ - -SHL3STDLIBS= \ - $(FWILIB) \ - $(FWELIB) \ - $(SVLLIB) \ - $(TKLIB) \ - $(SVTOOLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPULIB) \ - $(VCLLIB) \ - $(SALLIB) - -# --- services library ---------------------------------------------------- - -SHL4TARGET= fwk$(DLLPOSTFIX) -SHL4IMPLIB= ifwk -SHL4OBJS= \ - $(SLO)$/acceleratorcache.obj \ - $(SLO)$/acceleratorconfiguration.obj \ - $(SLO)$/acceleratorconfigurationreader.obj \ - $(SLO)$/acceleratorconfigurationwriter.obj \ - $(SLO)$/addonstoolbarmanager.obj \ - $(SLO)$/addonstoolbarwrapper.obj \ - $(SLO)$/addonstoolboxfactory.obj \ - $(SLO)$/autorecovery.obj \ - $(SLO)$/backingcomp.obj \ - $(SLO)$/backingwindow.obj \ - $(SLO)$/buttontoolbarcontroller.obj \ - $(SLO)$/closedispatcher.obj \ - $(SLO)$/comboboxtoolbarcontroller.obj \ - $(SLO)$/complextoolbarcontroller.obj \ - $(SLO)$/containerquery.obj \ - $(SLO)$/contenthandler.obj \ - $(SLO)$/controlmenucontroller.obj \ - $(SLO)$/desktop.obj \ - $(SLO)$/dispatchinformationprovider.obj \ - $(SLO)$/dispatchprovider.obj \ - $(SLO)$/dockingareadefaultacceptor.obj \ - $(SLO)$/documentacceleratorconfiguration.obj \ - $(SLO)$/dropdownboxtoolbarcontroller.obj \ - $(SLO)$/droptargetlistener.obj \ - $(SLO)$/edittoolbarcontroller.obj \ - $(SLO)$/factoryconfiguration.obj \ - $(SLO)$/filter.obj \ - $(SLO)$/framecontainer.obj \ - $(SLO)$/frameloader.obj \ - $(SLO)$/frame.obj \ - $(SLO)$/generictoolbarcontroller.obj \ - $(SLO)$/globalacceleratorconfiguration.obj \ - $(SLO)$/globalsettings.obj \ - $(SLO)$/graphicnameaccess.obj \ - $(SLO)$/helpagentdispatcher.obj \ - $(SLO)$/imagebuttontoolbarcontroller.obj \ - $(SLO)$/imagemanager.obj \ - $(SLO)$/imagemanagerimpl.obj \ - $(SLO)$/interceptionhelper.obj \ - $(SLO)$/jobdata.obj \ - $(SLO)$/jobdispatch.obj \ - $(SLO)$/jobexecutor.obj \ - $(SLO)$/job.obj \ - $(SLO)$/jobresult.obj \ - $(SLO)$/joburl.obj \ - $(SLO)$/keymapping.obj \ - $(SLO)$/langselectionstatusbarcontroller.obj \ - $(SLO)$/layoutmanager.obj \ - $(SLO)$/loaddispatcher.obj \ - $(SLO)$/loadenv.obj \ - $(SLO)$/menubarfactory.obj \ - $(SLO)$/menubarmanager.obj \ - $(SLO)$/menubarmerger.obj \ - $(SLO)$/menubarwrapper.obj \ - $(SLO)$/menudispatcher.obj \ - $(SLO)$/menumanager.obj \ - $(SLO)$/moduleacceleratorconfiguration.obj \ - $(SLO)$/moduleimagemanager.obj \ - $(SLO)$/modulemanager.obj \ - $(SLO)$/moduleuicfgsupplier.obj \ - $(SLO)$/moduleuiconfigurationmanager.obj \ - $(SLO)$/objectmenucontroller.obj \ - $(SLO)$/ocomponentaccess.obj \ - $(SLO)$/ocomponentenumeration.obj \ - $(SLO)$/oframes.obj \ - $(SLO)$/pathsettings.obj \ - $(SLO)$/persistentwindowstate.obj \ - $(SLO)$/popupmenucontrollerfactory.obj\ - $(SLO)$/presethandler.obj \ - $(SLO)$/progressbarwrapper.obj \ - $(SLO)$/recentfilesmenucontroller.obj \ - $(SLO)$/registerservices.obj \ - $(SLO)$/sessionlistener.obj \ - $(SLO)$/spinfieldtoolbarcontroller.obj \ - $(SLO)$/statusbarcontrollerfactory.obj\ - $(SLO)$/statusbarfactory.obj \ - $(SLO)$/statusbarmanager.obj \ - $(SLO)$/statusbar.obj \ - $(SLO)$/statusbarwrapper.obj \ - $(SLO)$/statusindicatorfactory.obj \ - $(SLO)$/statusindicatorinterfacewrapper.obj \ - $(SLO)$/statusindicator.obj \ - $(SLO)$/quietinteraction.obj \ - $(SLO)$/storageholder.obj \ - $(SLO)$/substitutepathvars.obj \ - $(SLO)$/tagwindowasmodified.obj \ - $(SLO)$/targethelper.obj \ - $(SLO)$/taskcreator.obj \ - $(SLO)$/taskcreatorsrv.obj \ - $(SLO)$/titlebarupdate.obj \ - $(SLO)$/togglebuttontoolbarcontroller.obj \ - $(SLO)$/toolbarcontrollerfactory.obj\ - $(SLO)$/toolbarmanager.obj \ - $(SLO)$/toolbarmerger.obj \ - $(SLO)$/toolbar.obj \ - $(SLO)$/toolbarwrapper.obj \ - $(SLO)$/toolboxfactory.obj \ - $(SLO)$/uicategorydescription.obj \ - $(SLO)$/uicommanddescription.obj \ - $(SLO)$/uiconfigurationmanager.obj \ - $(SLO)$/uielementfactorymanager.obj \ - $(SLO)$/urltransformer.obj \ - $(SLO)$/vclstatusindicator.obj \ - $(SLO)$/wakeupthread.obj \ - $(SLO)$/windowcommanddispatch.obj \ - $(SLO)$/windowstateconfiguration.obj \ - $(SLO)$/windowcontentfactorymanager.obj \ - $(SLO)$/startmoduledispatcher.obj - -SHL4STDLIBS= \ - $(FWILIB) \ - $(FWELIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) \ - $(UCBHELPERLIB) \ - $(I18NISOLANGLIB) - -# --- services library ---------------------------------------------------- - -SHL5TARGET= fwm$(DLLPOSTFIX) -SHL5IMPLIB= ifwm -SHL5OBJS= \ - $(SLO)$/helponstartup.obj \ - $(SLO)$/tabwinfactory.obj \ - $(SLO)$/tabwindow.obj \ - $(SLO)$/systemexec.obj \ - $(SLO)$/shelljob.obj \ - $(SLO)$/register3rdcomponents.obj - -SHL5STDLIBS= \ - $(FWILIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -RESLIB1NAME= fwe -RESLIB1IMAGES= $(PRJ)$/res -RESLIB1SRSFILES= $(SRS)$/fwk_classes.srs \ - $(SRS)$/fwk_services.srs \ - -SHL2DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) -SHL3DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2TARGETN) -SHL4DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN) -SHL5DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) - -# --- Targets ----------------------------------------------------------------- - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/fwk.component $(MISC)/fwl.component $(MISC)/fwm.component - -$(MISC)/fwk.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - fwk.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL4TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt fwk.component - -$(MISC)/fwl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - fwl.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt fwl.component - -$(MISC)/fwm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - fwm.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL5TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt fwm.component - diff --git a/sfx2/inc/makefile.mk b/sfx2/inc/makefile.mk deleted file mode 100644 index b7aa547e2c79..000000000000 --- a/sfx2/inc/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=sfx2 -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/sfx2/qa/complex/docinfo/makefile.mk b/sfx2/qa/complex/docinfo/makefile.mk deleted file mode 100644 index 626b648a6d06..000000000000 --- a/sfx2/qa/complex/docinfo/makefile.mk +++ /dev/null @@ -1,63 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = sfx2 -TARGET = qa_complex_docinfo - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/docinfo -JAVATESTFILES = \ - DocumentProperties.java - -JAVAFILES = $(JAVATESTFILES) - - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - - - - - diff --git a/sfx2/qa/complex/framework/DocHelper/makefile.mk b/sfx2/qa/complex/framework/DocHelper/makefile.mk deleted file mode 100644 index ad614cfca3f8..000000000000 --- a/sfx2/qa/complex/framework/DocHelper/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ../../../.. -TARGET = DocHelper -PRJNAME = $(TARGET) -PACKAGE = complex/framework/dochelper - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - - -#----- compile .java files ----------------------------------------- - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar -JAVAFILES = \ - DialogThread.java \ - WriterHelper.java - -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/sfx2/qa/complex/framework/makefile.mk b/sfx2/qa/complex/framework/makefile.mk deleted file mode 100644 index 325135b9133c..000000000000 --- a/sfx2/qa/complex/framework/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = sfx2 -TARGET = qa_complex_framework - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/framework -JAVATESTFILES = \ - DocumentPropertiesTest.java \ - DocumentMetadataAccessTest.java \ - CheckGlobalEventBroadcaster_writer1.java - -JAVAFILES = $(JAVATESTFILES) \ - TestDocument.java \ - WriterHelper.java \ - DialogThread.java - - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - - diff --git a/sfx2/qa/complex/standalonedocumentinfo/makefile.mk b/sfx2/qa/complex/standalonedocumentinfo/makefile.mk deleted file mode 100644 index aade48dbd789..000000000000 --- a/sfx2/qa/complex/standalonedocumentinfo/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = sfx2 -TARGET = qa_complex_standalonedocumentinfo - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/standalonedocumentinfo -JAVATESTFILES = \ - StandaloneDocumentInfoUnitTest.java - -JAVAFILES = $(JAVATESTFILES) \ - StandaloneDocumentInfoTest.java \ - Test01.java \ - TestHelper.java - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk deleted file mode 100644 index dce0b86a0619..000000000000 --- a/sfx2/qa/cppunit/makefile.mk +++ /dev/null @@ -1,81 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=../.. -PRJNAME=sfx2 -TARGET=qa_cppunit - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -#building with stlport, but cppunit was not built with stlport -.IF "$(USE_SYSTEM_STL)"!="YES" -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGSCXX+=-DADAPT_EXT_STL -.ENDIF -.ENDIF - -CFLAGSCXX += $(CPPUNIT_CFLAGS) -DLLPRE = # no leading "lib" on .so files - -# --- Libs --------------------------------------------------------- - -SHL1OBJS= \ - $(SLO)/test_metadatable.obj \ - - -SHL1STDLIBS= \ - $(CPPUNITLIB) \ - $(SALLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(VCLLIB) \ - $(SFXLIB) \ - - -SHL1TARGET= test_metadatable -SHL1RPATH = NONE -SHL1IMPLIB= i$(SHL1TARGET) -# SHL1DEF= $(MISC)/$(SHL1TARGET).def -DEF1NAME=$(SHL1TARGET) -# DEF1EXPORTFILE= export.exp -SHL1VERSIONMAP= version.map - -# --- All object files --------------------------------------------- - -SLOFILES= \ - $(SHL1OBJS) \ - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : _cppunit.mk - diff --git a/sfx2/qa/unoapi/makefile.mk b/sfx2/qa/unoapi/makefile.mk deleted file mode 100644 index ea91ba4d1c44..000000000000 --- a/sfx2/qa/unoapi/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -#***********************************************************************/ - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../.. -PRJNAME = sfx2 -TARGET = qa_unoapi - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = org/openoffice/sfx2/qa/unoapi -JAVATESTFILES = Test.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/sfx2/sdi/makefile.mk b/sfx2/sdi/makefile.mk deleted file mode 100644 index c02e51eb6998..000000000000 --- a/sfx2/sdi/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=sfx2 -TARGET=sfxslots - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(L10N_framework)"=="" - -SDI1NAME=$(TARGET) -SDI1EXPORT=sfx -#SIDHRCNAME=sfx.hrc unused??? - -.ENDIF -# --- Files -------------------------------------------------------- - -SVSDI1DEPEND= \ - $(PRJ)$/inc$/sfx2$/sfxsids.hrc \ - sfx.sdi \ - appslots.sdi \ - sfxslots.sdi \ - docslots.sdi \ - viwslots.sdi \ - frmslots.sdi - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk deleted file mode 100644 index 536167abd016..000000000000 --- a/sfx2/source/appl/makefile.mk +++ /dev/null @@ -1,159 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=appl -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# w.g. compilerbugs -.IF "$(GUI)"=="WNT" -.IF "$(COM)"!="GCC" -CFLAGS+=-Od -CFLAGS+=-DENABLE_QUICKSTART_APPLET -.ENDIF -.ENDIF - -.IF "$(GUIBASE)"=="aqua" -CFLAGS+=-DENABLE_QUICKSTART_APPLET -.ENDIF - -.IF "$(GUI)"=="UNX" - CDEFS+=-DDLL_NAME=libsfx$(DLLPOSTFIX)$(DLLPOST) -.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE" - PKGCONFIG_MODULES=gtk+-2.0 - .INCLUDE: pkg_config.mk - CFLAGS+=$(PKGCONFIG_CFLAGS) - CFLAGS+=-DENABLE_QUICKSTART_APPLET -# definition moved to shutdownicon.cxx -# CDEFS+=-DPLUGIN_NAME=libqstart_gtk$(DLLPOSTFIX)$(DLLPOST) -.ENDIF # "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -.ELSE - CDEFS+=-DDLL_NAME=sfx$(DLLPOSTFIX)$(DLLPOST) -.ENDIF - -# --- Files -------------------------------------------------------- - -SRS1NAME=appl -SRC1FILES = \ - app.src newhelp.src dde.src - -SRS2NAME=sfx -SRC2FILES = \ - sfx.src - -SFX_OBJECTS = \ - $(SLO)$/app.obj \ - $(SLO)$/appbas.obj \ - $(SLO)$/appcfg.obj \ - $(SLO)$/appchild.obj \ - $(SLO)$/appdata.obj \ - $(SLO)$/appdde.obj \ - $(SLO)$/appinit.obj \ - $(SLO)$/appmain.obj \ - $(SLO)$/appmisc.obj \ - $(SLO)$/appopen.obj \ - $(SLO)$/appquit.obj \ - $(SLO)$/appreg.obj \ - $(SLO)$/appserv.obj \ - $(SLO)$/appuno.obj \ - $(SLO)$/appbaslib.obj \ - $(SLO)$/childwin.obj \ - $(SLO)$/fileobj.obj \ - $(SLO)$/helpdispatch.obj \ - $(SLO)$/helpinterceptor.obj \ - $(SLO)$/imagemgr.obj\ - $(SLO)$/imestatuswindow.obj \ - $(SLO)$/impldde.obj \ - $(SLO)$/linkmgr2.obj \ - $(SLO)$/linksrc.obj \ - $(SLO)$/lnkbase2.obj \ - $(SLO)$/module.obj \ - $(SLO)$/newhelp.obj \ - $(SLO)$/opengrf.obj \ - $(SLO)$/sfxhelp.obj \ - $(SLO)$/sfxpicklist.obj \ - $(SLO)$/shutdownicon.obj \ - $(SLO)$/shutdowniconw32.obj \ - $(SLO)$/workwin.obj \ - $(SLO)$/xpackcreator.obj \ - $(SLO)$/fwkhelper.obj - -.IF "$(GUI)"=="OS2" -SFX_OBJECTS += $(SLO)$/shutdowniconOs2.obj -.ENDIF - -.IF "$(GUIBASE)"=="aqua" -SFX_OBJECTS += $(SLO)$/shutdowniconaqua.obj -.ENDIF - -SLOFILES = $(SFX_OBJECTS) -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1OBJFILES= $(SFX_OBJECTS) - -.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -QUICKSTART_OBJECTS = $(SLO)$/shutdowniconunx.obj -SLOFILES += $(QUICKSTART_OBJECTS) - -LIB2TARGET= $(SLB)$/quickstart.lib -LIB2OBJFILES= $(QUICKSTART_OBJECTS) -.ENDIF - -.IF "$(GUI)"=="OS2" -SLOFILES += $(SLO)$/shutdowniconOs2.obj -.ENDIF - -EXCEPTIONSFILES=\ - $(SLO)$/imagemgr.obj \ - $(SLO)$/appopen.obj \ - $(SLO)$/appmain.obj \ - $(SLO)$/appmisc.obj \ - $(SLO)$/appinit.obj \ - $(SLO)$/appcfg.obj \ - $(SLO)$/fileobj.obj \ - $(SLO)$/helpinterceptor.obj \ - $(SLO)$/newhelp.obj \ - $(SLO)$/opengrf.obj \ - $(SLO)$/sfxhelp.obj \ - $(SLO)$/shutdownicon.obj \ - $(SLO)$/shutdowniconw32.obj \ - $(SLO)$/sfxpicklist.obj \ - $(SLO)$/helpdispatch.obj \ - $(SLO)$/xpackcreator.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/bastyp/makefile.mk b/sfx2/source/bastyp/makefile.mk deleted file mode 100644 index 75c0cace40d6..000000000000 --- a/sfx2/source/bastyp/makefile.mk +++ /dev/null @@ -1,66 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=bastyp -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES =\ - $(SLO)$/sfxhtml.obj \ - $(SLO)$/frmhtml.obj \ - $(SLO)$/frmhtmlw.obj \ - $(SLO)$/misc.obj \ - $(SLO)$/progress.obj \ - $(SLO)$/sfxresid.obj \ - $(SLO)$/bitset.obj \ - $(SLO)$/minarray.obj \ - $(SLO)$/fltfnc.obj \ - $(SLO)$/mieclip.obj \ - $(SLO)$/fltlst.obj \ - $(SLO)$/helper.obj - -SRS1NAME=$(TARGET) -SRC1FILES =\ - fltfnc.src \ - bastyp.src - -EXCEPTIONSFILES =\ - $(SLO)$/helper.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/config/makefile.mk b/sfx2/source/config/makefile.mk deleted file mode 100644 index d090babd1505..000000000000 --- a/sfx2/source/config/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=config -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/evntconf.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/control/makefile.mk b/sfx2/source/control/makefile.mk deleted file mode 100644 index 86797589e3aa..000000000000 --- a/sfx2/source/control/makefile.mk +++ /dev/null @@ -1,73 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=control -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# w.g. compilerbugs -.IF "$(GUI)"=="WNT" -.IF "$(COM)"!="GCC" -CFLAGS+=-Od -.ENDIF -.ENDIF - -.IF "$(COM)"=="GCC" -CFLAGS+=-O0 -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/bindings.obj \ - $(SLO)$/ctrlitem.obj \ - $(SLO)$/dispatch.obj \ - $(SLO)$/macrconf.obj \ - $(SLO)$/macro.obj \ - $(SLO)$/minfitem.obj \ - $(SLO)$/msg.obj \ - $(SLO)$/msgpool.obj \ - $(SLO)$/objface.obj \ - $(SLO)$/querystatus.obj \ - $(SLO)$/request.obj \ - $(SLO)$/sfxstatuslistener.obj \ - $(SLO)$/shell.obj \ - $(SLO)$/sorgitm.obj \ - $(SLO)$/statcach.obj \ - $(SLO)$/unoctitm.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk deleted file mode 100755 index 26acd12c1413..000000000000 --- a/sfx2/source/dialog/makefile.mk +++ /dev/null @@ -1,117 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=dialog - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------------- - -EXCEPTIONSFILES=\ - $(SLO)$/filedlghelper.obj \ - $(SLO)$/filtergrouping.obj \ - $(SLO)$/itemconnect.obj \ - $(SLO)$/mailmodel.obj \ - $(SLO)$/partwnd.obj \ - $(SLO)$/recfloat.obj \ - $(SLO)$/templdlg.obj \ - $(SLO)$/dinfdlg.obj \ - $(SLO)$/dockwin.obj \ - $(SLO)$/taskpane.obj - -SLOFILES =\ - $(EXCEPTIONSFILES) \ - $(SLO)$/about.obj \ - $(SLO)$/alienwarn.obj \ - $(SLO)$/basedlgs.obj \ - $(SLO)$/dinfedt.obj \ - $(SLO)$/intro.obj \ - $(SLO)$/mgetempl.obj \ - $(SLO)$/navigat.obj \ - $(SLO)$/newstyle.obj \ - $(SLO)$/passwd.obj \ - $(SLO)$/printopt.obj \ - $(SLO)$/sfxdlg.obj \ - $(SLO)$/splitwin.obj \ - $(SLO)$/srchdlg.obj \ - $(SLO)$/styfitem.obj \ - $(SLO)$/styledlg.obj \ - $(SLO)$/tabdlg.obj \ - $(SLO)$/tplcitem.obj \ - $(SLO)$/tplpitem.obj \ - $(SLO)$/versdlg.obj \ - $(SLO)$/securitypage.obj \ - $(SLO)$/titledockwin.obj - -SRS1NAME=$(TARGET) -SRC1FILES =\ - recfloat.src \ - alienwarn.src \ - dialog.src \ - dinfdlg.src \ - dinfedt.src \ - filedlghelper.src \ - mailwindow.src \ - mgetempl.src \ - newstyle.src \ - passwd.src \ - templdlg.src \ - versdlg.src \ - printopt.src \ - srchdlg.src \ - securitypage.src \ - titledockwin.src \ - taskpane.src - -.IF "$(BUILD_VER_STRING)"!="" -.IF "$(GUI)"=="UNX" -CFLAGS+=-DBUILD_VER_STRING='"$(BUILD_VER_STRING)"' -.ELSE # "$(GUI)"=="UNX" -CFLAGS+=-DBUILD_VER_STRING="$(subst,",\" "$(BUILD_VER_STRING)")" -.ENDIF # "$(GUI)"=="UNX" -.ENDIF - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SLO)$/about.obj : $(INCCOM)$/aboutbmpnames.hxx - -.INCLUDE .IGNORE : $(MISC)$/about_bmp_names.mk - -.IF "$(ABOUT_BITMAPS:f)"!="$(LASTTIME_ABOUT_BITMAPS)" -DO_PHONY=.PHONY -.ENDIF # "$(ABOUT_BITMAPS:f)"!="$(LASTTIME_ABOUT_BITMAPS)" - -$(INCCOM)$/aboutbmpnames.hxx $(DO_PHONY): - echo const char ABOUT_BITMAP_STRINGLIST[]=$(EMQ)"$(ABOUT_BITMAPS:f:t",")$(EMQ)"$(EMQ); > $@ - echo LASTTIME_ABOUT_BITMAPS=$(ABOUT_BITMAPS:f) > $(MISC)$/about_bmp_names.mk diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk deleted file mode 100644 index d663d34cf5ba..000000000000 --- a/sfx2/source/doc/makefile.mk +++ /dev/null @@ -1,103 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=doc -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(SYSTEM_LIBXML)" == "YES" -CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS) -.ENDIF - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - doc.src new.src doctdlg.src docvor.src doctempl.src graphhelp.src - -SLOFILES = \ - $(SLO)$/printhelper.obj \ - $(SLO)$/docinf.obj \ - $(SLO)$/oleprops.obj \ - $(SLO)$/iframe.obj \ - $(SLO)$/plugin.obj \ - $(SLO)$/docfile.obj \ - $(SLO)$/objuno.obj \ - $(SLO)$/frmdescr.obj \ - $(SLO)$/objxtor.obj \ - $(SLO)$/objmisc.obj \ - $(SLO)$/objstor.obj \ - $(SLO)$/objcont.obj \ - $(SLO)$/objserv.obj \ - $(SLO)$/objitem.obj \ - $(SLO)$/ownsubfilterservice.obj \ - $(SLO)$/docfac.obj \ - $(SLO)$/docfilt.obj \ - $(SLO)$/doctempl.obj \ - $(SLO)$/doctemplates.obj \ - $(SLO)$/doctemplateslocal.obj \ - $(SLO)$/docvor.obj \ - $(SLO)$/new.obj \ - $(SLO)$/doctdlg.obj \ - $(SLO)$/sfxbasemodel.obj \ - $(SLO)$/guisaveas.obj\ - $(SLO)$/objembed.obj\ - $(SLO)$/graphhelp.obj \ - $(SLO)$/QuerySaveDocument.obj \ - $(SLO)$/docinsert.obj \ - $(SLO)$/docmacromode.obj \ - $(SLO)$/SfxDocumentMetaData.obj \ - $(SLO)$/DocumentMetadataAccess.obj \ - $(SLO)$/Metadatable.obj \ - $(SLO)$/sfxmodelfactory.obj \ - $(SLO)$/sfxacldetect.obj \ - $(SLO)$/docstoragemodifylistener.obj \ - $(SLO)$/querytemplate.obj \ - $(SLO)$/syspath.obj \ - $(SLO)$/syspathw32.obj - -.IF "$(GUI)" == "WNT" - -#HACK TO DISABLE PCH -NOOPTFILES= \ - $(SLO)$/sfxacldetect.obj \ - $(SLO)$/syspathw32.obj -.ENDIF - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - - diff --git a/sfx2/source/explorer/makefile.mk b/sfx2/source/explorer/makefile.mk deleted file mode 100644 index 75a15ebdb862..000000000000 --- a/sfx2/source/explorer/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=explorer -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/nochaos.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/sfx2/source/inet/makefile.mk b/sfx2/source/inet/makefile.mk deleted file mode 100644 index 9347e68a2cdb..000000000000 --- a/sfx2/source/inet/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=inet -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - - -SLOFILES = \ - $(SLO)$/inettbc.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/layout/makefile.mk b/sfx2/source/layout/makefile.mk deleted file mode 100644 index a11ba76a15bd..000000000000 --- a/sfx2/source/layout/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=layout -ENABLE_EXCEPTIONS=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(ENABLE_LAYOUT)" == "TRUE" - -SLOFILES = \ - $(SLO)$/sfxdialog.obj -# - -SLOFILES += $(SLO)$/sfxtabdialog.obj \ - $(SLO)$/factory.obj \ - $(SLO)$/sfxtabpage.obj - -.ENDIF # ENABLE_LAYOUT == TRUE - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/menu/makefile.mk b/sfx2/source/menu/makefile.mk deleted file mode 100644 index 8b55bd0840ea..000000000000 --- a/sfx2/source/menu/makefile.mk +++ /dev/null @@ -1,55 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - - -PRJNAME=sfx2 -TARGET=menu -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = menu.src - -SLOFILES = \ - $(SLO)$/mnuitem.obj \ - $(SLO)$/mnumgr.obj \ - $(SLO)$/objmnctl.obj \ - $(SLO)$/thessubmenu.obj \ - $(SLO)$/virtmenu.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/notify/makefile.mk b/sfx2/source/notify/makefile.mk deleted file mode 100644 index e2ddde40f936..000000000000 --- a/sfx2/source/notify/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=notify - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/eventsupplier.obj \ - $(SLO)$/hintpost.obj - -EXCEPTIONSFILES = \ - $(SLO)$/eventsupplier.obj -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/statbar/makefile.mk b/sfx2/source/statbar/makefile.mk deleted file mode 100644 index f99c8fcdaa1e..000000000000 --- a/sfx2/source/statbar/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=statbar -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/stbitem.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/toolbox/makefile.mk b/sfx2/source/toolbox/makefile.mk deleted file mode 100644 index ce4f011e6044..000000000000 --- a/sfx2/source/toolbox/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=toolbox -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/tbxitem.obj \ - $(SLO)$/imgmgr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/view/makefile.mk b/sfx2/source/view/makefile.mk deleted file mode 100644 index 9c257f4c9f75..000000000000 --- a/sfx2/source/view/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - - -PRJ=..$/.. - -PRJNAME= sfx2 -TARGET= view -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - view.src - -SLOFILES = \ - $(SLO)$/ipclient.obj \ - $(SLO)$/viewsh.obj \ - $(SLO)$/frmload.obj \ - $(SLO)$/frame.obj \ - $(SLO)$/frame2.obj \ - $(SLO)$/printer.obj \ - $(SLO)$/viewprn.obj \ - $(SLO)$/viewfac.obj \ - $(SLO)$/orgmgr.obj \ - $(SLO)$/viewfrm.obj \ - $(SLO)$/viewfrm2.obj \ - $(SLO)$/sfxbasecontroller.obj \ - $(SLO)$/userinputinterception.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/util/makefile.mk b/sfx2/util/makefile.mk deleted file mode 100644 index f520e2097e7e..000000000000 --- a/sfx2/util/makefile.mk +++ /dev/null @@ -1,172 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -ENABLE_EXCEPTIONS=TRUE -PRJNAME=sfx2 -TARGET=sfx -#sfx.hid generieren -GEN_HID=TRUE -GEN_HID_OTHER=TRUE -USE_DEFFILE=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Allgemein ---------------------------------------------------- - -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1FILES= $(SLB)$/appl.lib \ - $(SLB)$/explorer.lib \ - $(SLB)$/doc.lib \ - $(SLB)$/view.lib \ - $(SLB)$/control.lib \ - $(SLB)$/notify.lib \ - $(SLB)$/menu.lib \ - $(SLB)$/inet.lib \ - $(SLB)$/toolbox.lib \ - $(SLB)$/statbar.lib \ - $(SLB)$/dialog.lib \ - $(SLB)$/bastyp.lib \ - $(SLB)$/config.lib - -.IF "$(ENABLE_LAYOUT)" == "TRUE" -LIB1FILES += $(SLB)$/layout.lib -.ENDIF # ENABLE_LAYOUT == TRUE - -HELPIDFILES=\ - ..\inc\sfx2\sfxsids.hrc \ - ..\source\inc\helpid.hrc - -.IF "$(GUI)"!="UNX" -LIB2TARGET= $(LB)$/$(TARGET).lib -LIB2FILES= $(LB)$/isfx.lib -LIB2DEPN=$(SHL1TARGETN) -.ENDIF - -SHL1TARGET= sfx$(DLLPOSTFIX) -SHL1IMPLIB= isfx -SHL1USE_EXPORTS=name - -SHL1STDLIBS+=\ - $(FWELIB) \ - $(BASICLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(SAXLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(LIBXML2LIB) \ - - -.IF "$(GUI)"=="WNT" - -SHL1STDLIBS+=\ - $(UWINAPILIB) \ - $(ADVAPI32LIB) \ - $(SHELL32LIB) \ - $(GDI32LIB) \ - $(OLE32LIB) \ - $(UUIDLIB) -.ELSE # WNT -.IF "$(OS)" == "MACOSX" -SHL1STDLIBS+= -framework Cocoa -.ENDIF # MACOSX -.ENDIF # WNT - - -SHL1DEPN += $(shell @$(FIND) $(SLO) -type f -name "*.OBJ" -print) - -SHL1LIBS= $(LIB1TARGET) - -#SHL1OBJS= $(SLO)$/sfxdll.obj - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME =$(SHL1TARGET) -DEFLIB1NAME =sfx -DEF1DES =Sfx - -SFXSRSLIST=\ - $(SRS)$/appl.srs \ - $(SRS)$/sfx.srs \ - $(SRS)$/doc.srs \ - $(SRS)$/view.srs \ - $(SRS)$/menu.srs \ - $(SRS)$/dialog.srs \ - $(SRS)$/bastyp.srs - -RESLIB1NAME=$(TARGET) -RESLIB1IMAGES=$(PRJ)$/res -RESLIB1SRSFILES=$(SFXSRSLIST) - -# gtk quick-starter -.IF "$(GUI)"=="UNX" -.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -PKGCONFIG_MODULES=gtk+-2.0 -.INCLUDE: pkg_config.mk -CFLAGS+=$(PKGCONFIG_CFLAGS) - -SHL3TARGET=qstart_gtk$(DLLPOSTFIX) -SHL3LIBS=$(SLB)$/quickstart.lib -SHL3DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) -# libs for gtk plugin -SHL3STDLIBS=$(SHL1STDLIBS) $(SFX2LIB) $(EGGTRAYLIB) -SHL3STDLIBS+=$(PKGCONFIG_LIBS:s/ -lpangoxft-1.0//) -# hack for faked SO environment -.IF "$(PKGCONFIG_ROOT)"!="" -SHL3SONAME+=-z nodefs -SHL3NOCHECK=TRUE -.ENDIF # "$(PKGCONFIG_ROOT)"!="" -.ENDIF # "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -.ENDIF # "$(GUI)"=="UNX" - -# --- Targets ------------------------------------------------------ - - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/sfx.component - -$(MISC)/sfx.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - sfx.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt sfx.component diff --git a/sfx2/workben/custompanel/makefile.mk b/sfx2/workben/custompanel/makefile.mk deleted file mode 100644 index 1eb20ceed35d..000000000000 --- a/sfx2/workben/custompanel/makefile.mk +++ /dev/null @@ -1,120 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=../.. -PRJNAME=sfx2 - -TARGET=custompanel -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=NO -EXTENSIONNAME:=custom-tool-panel - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -#------------------------------------------------------------------- - -#---- extension version -EXTENSION_VERSION_BASE=0.1 -.IF ( "$(CWS_WORK_STAMP)" == "" ) || ( "$(UPDATER)" == "YES" ) - EXTENSION_VERSION=$(EXTENSION_VERSION_BASE) -.ELSE - EXTENSION_VERSION=$(EXTENSION_VERSION_BASE).cws.$(CWS_WORK_STAMP) -.ENDIF - -#---- extension title package name -EXTENSION_TITLE=Custom Tool Panel Example -EXTENSION_ZIPNAME=$(EXTENSIONNAME)-$(EXTENSION_VERSION_BASE)-$(RTL_OS:l)-$(RTL_ARCH:l) - -#-------------------------------------------------- - -SHL1DLLPRE= -SHL1TARGET=$(TARGET).uno -LIB1TARGET=$(SLB)/$(SHL1TARGET).lib -LIB1OBJFILES= \ - $(SLO)/ctp_factory.obj \ - $(SLO)/ctp_services.obj \ - $(SLO)/ctp_panel.obj - -SHL1STDLIBS= \ - $(CPPULIB) \ - $(SALLIB) \ - $(SALHELPERLIB) \ - $(CPPUHELPERLIB) - -SHL1VERSIONMAP=$(SOLARSRC)/solenv/src/component.map -SHL1LIBS= $(LIB1TARGET) -SHL1DEF= $(MISC)/$(SHL1TARGET).def -SHL1RPATH= OXT -DEF1NAME= $(SHL1TARGET) - -# create Extension ----------------------------- - -COMPONENT_CONFIGDEST=. - -COMPONENT_XCU = \ - $(EXTENSIONDIR)/WriterWindowState.xcu \ - $(EXTENSIONDIR)/CalcWindowState.xcu \ - $(EXTENSIONDIR)/DrawWindowState.xcu \ - $(EXTENSIONDIR)/ImpressWindowState.xcu \ - $(EXTENSIONDIR)/Factories.xcu - -COMPONENT_LIBRARIES = \ - $(EXTENSIONDIR)/$(SHL1TARGET)$(DLLPOST) - -COMPONENT_IMAGES= \ - $(EXTENSIONDIR)/panel.png - -# ........ dependencies for packaging the extension ........ -EXTENSION_PACKDEPS=makefile.mk $(COMPONENT_IMAGES) - -# --- Targets ------------------------------------------------------ -.INCLUDE : extension_pre.mk -.INCLUDE : target.mk -.INCLUDE : extension_post.mk - -$(EXTENSIONDIR)/%.png : ./%.png - @@-$(MKDIRHIER) $(@:d) - @$(COPY) $< $@ > $(NULLDEV) - -$(EXTENSIONDIR)/WriterWindowState.xcu: ./WriterWindowState.xcu - @@-$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)$(TYPE) ./WriterWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/WriterWindowState.xcu - -$(EXTENSIONDIR)/CalcWindowState.xcu: ./CalcWindowState.xcu - @@-$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)$(TYPE) ./CalcWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/CalcWindowState.xcu - -$(EXTENSIONDIR)/DrawWindowState.xcu: ./DrawWindowState.xcu - @@-$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)$(TYPE) ./DrawWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/DrawWindowState.xcu - -$(EXTENSIONDIR)/ImpressWindowState.xcu: ./ImpressWindowState.xcu - @@-$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)$(TYPE) ./ImpressWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/ImpressWindowState.xcu - diff --git a/xmloff/inc/makefile.mk b/xmloff/inc/makefile.mk deleted file mode 100644 index db706e293088..000000000000 --- a/xmloff/inc/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=xmloff -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/xmloff/qa/unoapi/makefile.mk b/xmloff/qa/unoapi/makefile.mk deleted file mode 100644 index 3cbbc5f2a797..000000000000 --- a/xmloff/qa/unoapi/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -#***********************************************************************/ - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../.. -PRJNAME = xmloff -TARGET = qa_unoapi - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = org/openoffice/xmloff/qa/unoapi -JAVATESTFILES = Test.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/xmloff/source/chart/makefile.mk b/xmloff/source/chart/makefile.mk deleted file mode 100644 index bfdc9aeb5e22..000000000000 --- a/xmloff/source/chart/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ..$/.. -PRJNAME = xmloff -TARGET = chart -AUTOSEG = true -ENABLE_EXCEPTIONS = TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = $(SLO)$/ColorPropertySet.obj \ - $(SLO)$/SchXMLTools.obj \ - $(SLO)$/SchXMLExport.obj \ - $(SLO)$/SchXMLImport.obj \ - $(SLO)$/contexts.obj \ - $(SLO)$/SchXMLTableContext.obj \ - $(SLO)$/SchXMLChartContext.obj \ - $(SLO)$/SchXMLPlotAreaContext.obj \ - $(SLO)$/SchXMLParagraphContext.obj \ - $(SLO)$/SchXMLTextListContext.obj \ - $(SLO)$/SchXMLSeriesHelper.obj \ - $(SLO)$/SchXMLSeries2Context.obj \ - $(SLO)$/PropertyMaps.obj \ - $(SLO)$/XMLChartStyleContext.obj \ - $(SLO)$/XMLErrorIndicatorPropertyHdl.obj \ - $(SLO)$/XMLErrorBarStylePropertyHdl.obj \ - $(SLO)$/SchXMLAutoStylePoolP.obj \ - $(SLO)$/XMLChartPropertyContext.obj \ - $(SLO)$/XMLSymbolImageContext.obj \ - $(SLO)$/XMLLabelSeparatorContext.obj \ - $(SLO)$/XMLTextOrientationHdl.obj \ - $(SLO)$/XMLSymbolTypePropertyHdl.obj \ - $(SLO)$/XMLAxisPositionPropertyHdl.obj \ - $(SLO)$/SchXMLCalculationSettingsContext.obj \ - $(SLO)$/transporttypes.obj - -# --- Targets -------------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/xmloff/source/core/makefile.mk b/xmloff/source/core/makefile.mk deleted file mode 100644 index 4d663d3218d8..000000000000 --- a/xmloff/source/core/makefile.mk +++ /dev/null @@ -1,76 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=xmloff -TARGET=core -AUTOSEG=true - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/unointerfacetouniqueidentifiermapper.obj \ - $(SLO)$/facreg.obj \ - $(SLO)$/xmlcnitm.obj \ - $(SLO)$/attrlist.obj \ - $(SLO)$/i18nmap.obj \ - $(SLO)$/nmspmap.obj \ - $(SLO)$/unoatrcn.obj \ - $(SLO)$/xmlehelp.obj \ - $(SLO)$/xmlerror.obj \ - $(SLO)$/xmlexp.obj \ - $(SLO)$/xmlictxt.obj \ - $(SLO)$/xmlimp.obj \ - $(SLO)$/xmltkmap.obj \ - $(SLO)$/xmltoken.obj \ - $(SLO)$/xmluconv.obj \ - $(SLO)$/DomBuilderContext.obj \ - $(SLO)$/DomExport.obj \ - $(SLO)$/ProgressBarHelper.obj \ - $(SLO)$/PropertySetMerger.obj \ - $(SLO)$/SettingsExportHelper.obj \ - $(SLO)$/DocumentSettingsContext.obj \ - $(SLO)$/XMLEmbeddedObjectExportFilter.obj \ - $(SLO)$/XMLEmbeddedObjectImportContext.obj \ - $(SLO)$/XMLBase64Export.obj \ - $(SLO)$/XMLBase64ImportContext.obj \ - $(SLO)$/XMLBasicExportFilter.obj \ - $(SLO)$/RDFaImportHelper.obj \ - $(SLO)$/RDFaExportHelper.obj \ - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/xmloff/source/draw/makefile.mk b/xmloff/source/draw/makefile.mk deleted file mode 100644 index 3c9f7ae024f9..000000000000 --- a/xmloff/source/draw/makefile.mk +++ /dev/null @@ -1,85 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=xmloff -TARGET=draw -AUTOSEG=true -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/animationexport.obj\ - $(SLO)$/animationimport.obj\ - $(SLO)$/XMLNumberStyles.obj\ - $(SLO)$/XMLGraphicsDefaultStyle.obj\ - $(SLO)$/viewcontext.obj\ - $(SLO)$/eventimp.obj\ - $(SLO)$/layerexp.obj\ - $(SLO)$/layerimp.obj\ - $(SLO)$/ximpshow.obj\ - $(SLO)$/animimp.obj\ - $(SLO)$/animexp.obj\ - $(SLO)$/numithdl.obj\ - $(SLO)$/sdxmlimp.obj \ - $(SLO)$/sdxmlexp.obj \ - $(SLO)$/ximpstyl.obj \ - $(SLO)$/ximpbody.obj \ - $(SLO)$/ximpshap.obj \ - $(SLO)$/ximpgrp.obj \ - $(SLO)$/ximp3dscene.obj \ - $(SLO)$/ximp3dobject.obj \ - $(SLO)$/ximpnote.obj \ - $(SLO)$/sdpropls.obj \ - $(SLO)$/propimp0.obj \ - $(SLO)$/xexptran.obj \ - $(SLO)$/shapeexport.obj \ - $(SLO)$/shapeexport2.obj \ - $(SLO)$/shapeexport3.obj \ - $(SLO)$/shapeexport4.obj \ - $(SLO)$/shapeimport.obj \ - $(SLO)$/XMLImageMapExport.obj \ - $(SLO)$/XMLImageMapContext.obj \ - $(SLO)$/XMLShapePropertySetContext.obj \ - $(SLO)$/XMLShapeStyleContext.obj \ - $(SLO)$/ximppage.obj \ - $(SLO)$/ximpcustomshape.obj \ - $(SLO)$/EnhancedCustomShapeToken.obj \ - $(SLO)$/XMLReplacementImageContext.obj \ - $(SLO)$/descriptionimp.obj \ - $(SLO)$/ximplink.obj - -# --- Targets -------------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/xmloff/source/forms/makefile.mk b/xmloff/source/forms/makefile.mk deleted file mode 100644 index 8c46a4fbf3c9..000000000000 --- a/xmloff/source/forms/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=xmloff -TARGET=forms - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/officeforms.obj \ - $(SLO)$/formevents.obj \ - $(SLO)$/eventimport.obj \ - $(SLO)$/eventexport.obj \ - $(SLO)$/controlpropertyhdl.obj \ - $(SLO)$/controlpropertymap.obj \ - $(SLO)$/valueproperties.obj \ - $(SLO)$/attriblistmerge.obj \ - $(SLO)$/controlelement.obj \ - $(SLO)$/formlayerexport.obj \ - $(SLO)$/layerexport.obj \ - $(SLO)$/elementexport.obj \ - $(SLO)$/propertyexport.obj \ - $(SLO)$/elementimport.obj \ - $(SLO)$/layerimport.obj \ - $(SLO)$/propertyimport.obj \ - $(SLO)$/formlayerimport.obj \ - $(SLO)$/formattributes.obj \ - $(SLO)$/formenums.obj \ - $(SLO)$/formsimp.obj \ - $(SLO)$/strings.obj \ - $(SLO)$/logging.obj \ - $(SLO)$/formcellbinding.obj \ - $(SLO)$/gridcolumnproptranslator.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/xmloff/source/meta/makefile.mk b/xmloff/source/meta/makefile.mk deleted file mode 100644 index 5efb538c9856..000000000000 --- a/xmloff/source/meta/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=xmloff -TARGET=meta -AUTOSEG=true - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/xmlmetae.obj \ - $(SLO)$/xmlmetai.obj \ - $(SLO)$/MetaExportComponent.obj \ - $(SLO)$/MetaImportComponent.obj \ - $(SLO)$/xmlversion.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/xmloff/source/script/makefile.mk b/xmloff/source/script/makefile.mk deleted file mode 100644 index 4109ae6fc554..000000000000 --- a/xmloff/source/script/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=xmloff -TARGET=script - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/XMLEventExport.obj \ - $(SLO)$/XMLEventImportHelper.obj \ - $(SLO)$/XMLEventsImportContext.obj \ - $(SLO)$/XMLScriptContextFactory.obj \ - $(SLO)$/XMLScriptExportHandler.obj \ - $(SLO)$/XMLStarBasicContextFactory.obj \ - $(SLO)$/XMLStarBasicExportHandler.obj \ - $(SLO)$/xmlscripti.obj \ - $(SLO)$/xmlbasici.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/xmloff/source/style/makefile.mk b/xmloff/source/style/makefile.mk deleted file mode 100644 index 3436b33b654b..000000000000 --- a/xmloff/source/style/makefile.mk +++ /dev/null @@ -1,219 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=xmloff -TARGET=style - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - XMLPercentOrMeasurePropertyHandler.cxx \ - XMLIsPercentagePropertyHandler.cxx \ - XMLRectangleMembersHandler.cxx \ - adjushdl.cxx \ - backhdl.cxx \ - bordrhdl.cxx \ - breakhdl.cxx \ - cdouthdl.cxx \ - chrhghdl.cxx \ - chrlohdl.cxx \ - csmaphdl.cxx \ - escphdl.cxx \ - fonthdl.cxx \ - impastp1.cxx \ - impastp2.cxx \ - impastp3.cxx \ - impastp4.cxx \ - kernihdl.cxx \ - lspachdl.cxx \ - numehelp.cxx \ - opaquhdl.cxx \ - postuhdl.cxx \ - prhdlfac.cxx \ - prstylei.cxx \ - shadwhdl.cxx \ - shdwdhdl.cxx \ - styleexp.cxx \ - tabsthdl.cxx \ - undlihdl.cxx \ - uniref.cxx \ - weighhdl.cxx \ - xmlaustp.cxx \ - xmlbahdl.cxx \ - xmlexppr.cxx \ - xmlimppr.cxx \ - xmlnume.cxx \ - xmlnumfe.cxx \ - xmlnumfi.cxx \ - xmlnumi.cxx \ - xmlprcon.cxx \ - xmlprhdl.cxx \ - xmlprmap.cxx \ - xmlstyle.cxx \ - xmltabe.cxx \ - xmltabi.cxx \ - DashStyle.cxx \ - EnumPropertyHdl.cxx \ - FillStyleContext.cxx \ - GradientStyle.cxx \ - HatchStyle.cxx \ - ImageStyle.cxx \ - MarkerStyle.cxx \ - MultiPropertySetHelper.cxx \ - SinglePropertySetInfoCache.cxx \ - DashStyle.cxx \ - AttributeContainerHandler.cxx \ - NamedBoolPropertyHdl.cxx \ - TransGradientStyle.cxx \ - XMLBackgroundImageContext.cxx \ - XMLBackgroundImageExport.cxx \ - XMLClipPropertyHandler.cxx \ - XMLConstantsPropertyHandler.cxx \ - XMLElementPropertyContext.cxx \ - XMLFootnoteSeparatorExport.cxx \ - XMLFootnoteSeparatorImport.cxx \ - XMLFontAutoStylePool.cxx \ - XMLFontStylesContext.cxx \ - XMLPageExport.cxx \ - PageMasterPropHdl.cxx \ - PageMasterPropHdlFactory.cxx \ - PageMasterStyleMap.cxx \ - PageMasterPropMapper.cxx \ - PageMasterExportPropMapper.cxx \ - PageMasterImportPropMapper.cxx \ - PageMasterImportContext.cxx \ - PagePropertySetContext.cxx \ - PageHeaderFooterContext.cxx \ - StyleMap.cxx \ - XMLBitmapRepeatOffsetPropertyHandler.cxx \ - XMLFillBitmapSizePropertyHandler.cxx \ - XMLBitmapLogicalSizePropertyHandler.cxx \ - durationhdl.cxx \ - VisAreaExport.cxx \ - VisAreaContext.cxx \ - DrawAspectHdl.cxx - - -SLOFILES = \ - $(SLO)$/XMLPercentOrMeasurePropertyHandler.obj \ - $(SLO)$/XMLIsPercentagePropertyHandler.obj \ - $(SLO)$/XMLRectangleMembersHandler.obj \ - $(SLO)$/adjushdl.obj \ - $(SLO)$/backhdl.obj \ - $(SLO)$/bordrhdl.obj \ - $(SLO)$/breakhdl.obj \ - $(SLO)$/cdouthdl.obj \ - $(SLO)$/chrhghdl.obj \ - $(SLO)$/chrlohdl.obj \ - $(SLO)$/csmaphdl.obj \ - $(SLO)$/escphdl.obj \ - $(SLO)$/fonthdl.obj \ - $(SLO)$/impastp1.obj \ - $(SLO)$/impastp2.obj \ - $(SLO)$/impastp3.obj \ - $(SLO)$/impastp4.obj \ - $(SLO)$/kernihdl.obj \ - $(SLO)$/lspachdl.obj \ - $(SLO)$/numehelp.obj \ - $(SLO)$/opaquhdl.obj \ - $(SLO)$/postuhdl.obj \ - $(SLO)$/prhdlfac.obj \ - $(SLO)$/prstylei.obj \ - $(SLO)$/shadwhdl.obj \ - $(SLO)$/shdwdhdl.obj \ - $(SLO)$/styleexp.obj \ - $(SLO)$/tabsthdl.obj \ - $(SLO)$/undlihdl.obj \ - $(SLO)$/uniref.obj \ - $(SLO)$/weighhdl.obj \ - $(SLO)$/xmlaustp.obj \ - $(SLO)$/xmlbahdl.obj \ - $(SLO)$/xmlexppr.obj \ - $(SLO)$/xmlimppr.obj \ - $(SLO)$/xmlnume.obj \ - $(SLO)$/xmlnumfe.obj \ - $(SLO)$/xmlnumfi.obj \ - $(SLO)$/xmlnumi.obj \ - $(SLO)$/xmlprcon.obj \ - $(SLO)$/xmlprhdl.obj \ - $(SLO)$/xmlprmap.obj \ - $(SLO)$/xmlstyle.obj \ - $(SLO)$/xmltabe.obj \ - $(SLO)$/xmltabi.obj \ - $(SLO)$/DashStyle.obj \ - $(SLO)$/EnumPropertyHdl.obj \ - $(SLO)$/FillStyleContext.obj \ - $(SLO)$/GradientStyle.obj \ - $(SLO)$/HatchStyle.obj \ - $(SLO)$/ImageStyle.obj \ - $(SLO)$/MarkerStyle.obj \ - $(SLO)$/MultiPropertySetHelper.obj \ - $(SLO)$/SinglePropertySetInfoCache.obj \ - $(SLO)$/NamedBoolPropertyHdl.obj \ - $(SLO)$/TransGradientStyle.obj \ - $(SLO)$/XMLBackgroundImageContext.obj \ - $(SLO)$/XMLBackgroundImageExport.obj \ - $(SLO)$/XMLClipPropertyHandler.obj \ - $(SLO)$/XMLConstantsPropertyHandler.obj \ - $(SLO)$/AttributeContainerHandler.obj \ - $(SLO)$/XMLElementPropertyContext.obj \ - $(SLO)$/XMLFootnoteSeparatorExport.obj \ - $(SLO)$/XMLFootnoteSeparatorImport.obj \ - $(SLO)$/XMLFontAutoStylePool.obj \ - $(SLO)$/XMLFontStylesContext.obj \ - $(SLO)$/XMLPageExport.obj \ - $(SLO)$/PageMasterPropHdl.obj \ - $(SLO)$/PageMasterPropHdlFactory.obj \ - $(SLO)$/PageMasterStyleMap.obj \ - $(SLO)$/PageMasterPropMapper.obj \ - $(SLO)$/PageMasterExportPropMapper.obj \ - $(SLO)$/PageMasterImportPropMapper.obj \ - $(SLO)$/PageMasterImportContext.obj \ - $(SLO)$/PagePropertySetContext.obj \ - $(SLO)$/PageHeaderFooterContext.obj \ - $(SLO)$/StyleMap.obj \ - $(SLO)$/WordWrapPropertyHdl.obj \ - $(SLO)$/XMLBitmapRepeatOffsetPropertyHandler.obj \ - $(SLO)$/XMLFillBitmapSizePropertyHandler.obj \ - $(SLO)$/XMLBitmapLogicalSizePropertyHandler.obj \ - $(SLO)$/durationhdl.obj \ - $(SLO)$/VisAreaExport.obj \ - $(SLO)$/VisAreaContext.obj \ - $(SLO)$/DrawAspectHdl.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/xmloff/source/table/makefile.mk b/xmloff/source/table/makefile.mk deleted file mode 100644 index 6f8c8efab7b6..000000000000 --- a/xmloff/source/table/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=xmloff -TARGET=table -AUTOSEG=true -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/XMLTableExport.obj\ - $(SLO)$/XMLTableImport.obj - -# --- Targets -------------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/xmloff/source/text/makefile.mk b/xmloff/source/text/makefile.mk deleted file mode 100644 index 658de220445f..000000000000 --- a/xmloff/source/text/makefile.mk +++ /dev/null @@ -1,127 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=xmloff -TARGET=text - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - - -SLOFILES = \ - $(SLO)$/txtdrope.obj \ - $(SLO)$/txtdropi.obj \ - $(SLO)$/txtexppr.obj \ - $(SLO)$/txtflde.obj \ - $(SLO)$/txtfldi.obj \ - $(SLO)$/txtftne.obj \ - $(SLO)$/txtimp.obj \ - $(SLO)$/txtimppr.obj \ - $(SLO)$/txtlists.obj \ - $(SLO)$/txtparae.obj \ - $(SLO)$/txtparai.obj \ - $(SLO)$/txtprhdl.obj \ - $(SLO)$/txtprmap.obj \ - $(SLO)$/txtsecte.obj \ - $(SLO)$/txtstyle.obj \ - $(SLO)$/txtstyli.obj \ - $(SLO)$/txtvfldi.obj \ - $(SLO)$/XMLAutoMarkFileContext.obj \ - $(SLO)$/XMLAutoTextEventExport.obj \ - $(SLO)$/XMLAutoTextEventImport.obj \ - $(SLO)$/XMLAutoTextContainerEventImport.obj \ - $(SLO)$/XMLChangedRegionImportContext.obj \ - $(SLO)$/XMLChangeElementImportContext.obj \ - $(SLO)$/XMLChangeInfoContext.obj \ - $(SLO)$/XMLFootnoteBodyImportContext.obj \ - $(SLO)$/XMLFootnoteConfigurationImportContext.obj \ - $(SLO)$/XMLFootnoteImportContext.obj \ - $(SLO)$/XMLIndexAlphabeticalSourceContext.obj \ - $(SLO)$/XMLIndexBodyContext.obj \ - $(SLO)$/XMLIndexBibliographyConfigurationContext.obj \ - $(SLO)$/XMLIndexBibliographyEntryContext.obj \ - $(SLO)$/XMLIndexBibliographySourceContext.obj \ - $(SLO)$/XMLIndexChapterInfoEntryContext.obj \ - $(SLO)$/XMLIndexIllustrationSourceContext.obj \ - $(SLO)$/XMLIndexMarkExport.obj \ - $(SLO)$/XMLIndexObjectSourceContext.obj \ - $(SLO)$/XMLIndexSimpleEntryContext.obj \ - $(SLO)$/XMLIndexSpanEntryContext.obj \ - $(SLO)$/XMLIndexSourceBaseContext.obj \ - $(SLO)$/XMLIndexTOCContext.obj \ - $(SLO)$/XMLIndexTOCSourceContext.obj \ - $(SLO)$/XMLIndexTOCStylesContext.obj \ - $(SLO)$/XMLIndexTableSourceContext.obj \ - $(SLO)$/XMLIndexTabStopEntryContext.obj \ - $(SLO)$/XMLIndexTemplateContext.obj \ - $(SLO)$/XMLIndexTitleTemplateContext.obj \ - $(SLO)$/XMLIndexUserSourceContext.obj \ - $(SLO)$/XMLLineNumberingExport.obj \ - $(SLO)$/XMLLineNumberingImportContext.obj \ - $(SLO)$/XMLLineNumberingSeparatorImportContext.obj \ - $(SLO)$/XMLPropertyBackpatcher.obj \ - $(SLO)$/XMLRedlineExport.obj \ - $(SLO)$/XMLSectionExport.obj \ - $(SLO)$/XMLSectionFootnoteConfigExport.obj \ - $(SLO)$/XMLSectionFootnoteConfigImport.obj \ - $(SLO)$/XMLSectionImportContext.obj \ - $(SLO)$/XMLSectionSourceDDEImportContext.obj \ - $(SLO)$/XMLSectionSourceImportContext.obj \ - $(SLO)$/XMLTextCharStyleNamesElementExport.obj \ - $(SLO)$/XMLTextColumnsContext.obj \ - $(SLO)$/XMLTextColumnsExport.obj \ - $(SLO)$/XMLTextFrameContext.obj \ - $(SLO)$/XMLTextFrameHyperlinkContext.obj \ - $(SLO)$/XMLTextHeaderFooterContext.obj \ - $(SLO)$/XMLTextListAutoStylePool.obj \ - $(SLO)$/XMLTextListBlockContext.obj \ - $(SLO)$/XMLTextListItemContext.obj \ - $(SLO)$/XMLTextMarkImportContext.obj \ - $(SLO)$/XMLTextMasterPageContext.obj \ - $(SLO)$/XMLTextMasterPageExport.obj \ - $(SLO)$/XMLTextMasterStylesContext.obj \ - $(SLO)$/XMLTextNumRuleInfo.obj \ - $(SLO)$/XMLTextPropertySetContext.obj \ - $(SLO)$/XMLTextShapeImportHelper.obj \ - $(SLO)$/XMLTextShapeStyleContext.obj \ - $(SLO)$/XMLTextTableContext.obj \ - $(SLO)$/XMLChangeImportContext.obj \ - $(SLO)$/XMLStringBufferImportContext.obj \ - $(SLO)$/XMLTrackedChangesImportContext.obj \ - $(SLO)$/XMLCalculationSettingsContext.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/xmloff/source/transform/makefile.mk b/xmloff/source/transform/makefile.mk deleted file mode 100644 index 031549fcb39b..000000000000 --- a/xmloff/source/transform/makefile.mk +++ /dev/null @@ -1,103 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ := ..$/.. -PRJNAME := xmloff -TARGET := xof -LIBTARGET=NO -ENABLE_EXCEPTIONS := TRUE - -.INCLUDE: settings.mk - -SHL1TARGET = $(TARGET)$(DLLPOSTFIX) -SHL1OBJS = \ - $(SLO)$/ChartOASISTContext.obj \ - $(SLO)$/ChartOOoTContext.obj \ - $(SLO)$/ChartPlotAreaOASISTContext.obj \ - $(SLO)$/ChartPlotAreaOOoTContext.obj \ - $(SLO)$/ControlOASISTContext.obj \ - $(SLO)$/ControlOOoTContext.obj \ - $(SLO)$/CreateElemTContext.obj \ - $(SLO)$/DeepTContext.obj \ - $(SLO)$/DlgOASISTContext.obj \ - $(SLO)$/DocumentTContext.obj \ - $(SLO)$/EventMap.obj \ - $(SLO)$/EventOASISTContext.obj \ - $(SLO)$/EventOOoTContext.obj \ - $(SLO)$/FlatTContext.obj \ - $(SLO)$/FormPropOASISTContext.obj \ - $(SLO)$/FormPropOOoTContext.obj \ - $(SLO)$/FrameOASISTContext.obj \ - $(SLO)$/FrameOOoTContext.obj \ - $(SLO)$/IgnoreTContext.obj \ - $(SLO)$/MergeElemTContext.obj \ - $(SLO)$/MetaTContext.obj \ - $(SLO)$/MutableAttrList.obj \ - $(SLO)$/NotesTContext.obj \ - $(SLO)$/OOo2Oasis.obj \ - $(SLO)$/Oasis2OOo.obj \ - $(SLO)$/PersAttrListTContext.obj \ - $(SLO)$/PersMixedContentTContext.obj \ - $(SLO)$/ProcAddAttrTContext.obj \ - $(SLO)$/ProcAttrTContext.obj \ - $(SLO)$/PropertyActionsOASIS.obj \ - $(SLO)$/PropertyActionsOOo.obj \ - $(SLO)$/RenameElemTContext.obj \ - $(SLO)$/StyleOASISTContext.obj \ - $(SLO)$/StyleOOoTContext.obj \ - $(SLO)$/TransformerActions.obj \ - $(SLO)$/TransformerBase.obj \ - $(SLO)$/TransformerContext.obj \ - $(SLO)$/TransformerTokenMap.obj \ - $(SLO)$/XMLFilterRegistration.obj - -SHL1STDLIBS = \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALHELPERLIB) \ - $(SALLIB) -.IF ("$(GUI)"=="UNX" || "$(COM)"=="GCC") && "$(GUI)"!="OS2" - SHL1STDLIBS += -lxo$(DLLPOSTFIX) -.ELSE - SHL1STDLIBS += ixo.lib -.ENDIF -SHL1VERSIONMAP = $(SOLARENV)/src/component.map -SHL1IMPLIB = i$(SHL1TARGET) -DEF1NAME = $(SHL1TARGET) - -SLOFILES = $(SHL1OBJS) - -.INCLUDE: target.mk - -ALLTAR : $(MISC)/xof.component - -$(MISC)/xof.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - xof.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt xof.component diff --git a/xmloff/source/xforms/makefile.mk b/xmloff/source/xforms/makefile.mk deleted file mode 100644 index f1238a6036bb..000000000000 --- a/xmloff/source/xforms/makefile.mk +++ /dev/null @@ -1,58 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=xmloff -TARGET=xforms -AUTOSEG=true - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/xformsapi.obj \ - $(SLO)$/XFormsBindContext.obj \ - $(SLO)$/xformsimport.obj \ - $(SLO)$/XFormsModelContext.obj \ - $(SLO)$/XFormsInstanceContext.obj \ - $(SLO)$/XFormsSubmissionContext.obj \ - $(SLO)$/SchemaContext.obj \ - $(SLO)$/SchemaRestrictionContext.obj \ - $(SLO)$/SchemaSimpleTypeContext.obj \ - $(SLO)$/TokenContext.obj \ - $(SLO)$/xformsexport.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/xmloff/util/makefile.mk b/xmloff/util/makefile.mk deleted file mode 100644 index 857067985c50..000000000000 --- a/xmloff/util/makefile.mk +++ /dev/null @@ -1,96 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=xmloff -TARGET=xo -USE_DEFFILE=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Allgemein ---------------------------------------------------- -.IF "$(L10N_framework)"=="" -LIB1TARGET= $(SLB)$/xo.lib -LIB1FILES= \ - $(SLB)$/core.lib \ - $(SLB)$/meta.lib \ - $(SLB)$/script.lib \ - $(SLB)$/style.lib \ - $(SLB)$/text.lib \ - $(SLB)$/draw.lib \ - $(SLB)$/chart.lib \ - $(SLB)$/forms.lib \ - $(SLB)$/xforms.lib \ - $(SLB)$/table.lib - -# --- Shared-Library ----------------------------------------------- - -SHL1TARGET= xo$(DLLPOSTFIX) -SHL1IMPLIB= i$(TARGET) -SHL1USE_EXPORTS=name - -SHL1STDLIBS= \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(VOSLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB)\ - $(COMPHELPERLIB)\ - $(SVLLIB) \ - $(SALLIB) \ - $(UNOTOOLSLIB) \ - $(BASEGFXLIB) - -# SCO: the linker does know about weak symbols, but we can't ignore multiple defined symbols -.IF "(OS)"=="SCO" -SHL1STDLIBS+=-licg617mxp -.ENDIF - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1LIBS= $(LIB1TARGET) - -# --- Def-File --------------------------------------------------------- - -DEF1NAME =$(SHL1TARGET) -DEFLIB1NAME =xo -DEF1DES =XML Office Lib - -# --- Targets ---------------------------------------------------------- -.ENDIF -.INCLUDE : target.mk - -ALLTAR : $(MISC)/xo.component - -$(MISC)/xo.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - xo.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt xo.component From e5acb08b930bba27e371164c16a19c9336d5b745 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 19 Nov 2010 22:11:42 +0100 Subject: [PATCH 254/279] gnumake2: cleared migrated build.lst --- framework/prj/build.lst | 35 ----------------------------------- xmloff/prj/build.lst | 1 - 2 files changed, 36 deletions(-) diff --git a/framework/prj/build.lst b/framework/prj/build.lst index f409c6380db6..afdad4072f93 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,37 +1,2 @@ fr framework : l10n svtools NULL -fr framework usr1 - all fr_mkout NULL fr framework\prj nmake - all fr_all NULL - -# complex tests -# fails on unxsoli4 -# fr framework\qa\complex\ModuleManager nmake - all fr_qa_complex_modulemanager NULL -# fr framework\qa\complex\XUserInputInterception nmake - all fr_qa_complex_xuserinputinterception NULL - -# fr framework\qa\complex\accelerators nmake - all fr_qa_complex_accel fr_qa_complex_accel_helper NULL - -# unclear should be remove -# fr framework\qa\complex\api_internal nmake - all fr_qa_complex_api_internal NULL - -# BUG! opens an error box -# fr framework\qa\complex\broken_document nmake - all fr_qa_complex_broken_doc NULL - -# failed: -# fr framework\qa\complex\desktop nmake - all fr_qa_complex_desktop NULL - -# fr framework\qa\complex\dispatches nmake - all fr_qa_complex_dispatches fr_qa_complex_dispatches_helper NULL -# fr framework\qa\complex\disposing nmake - all fr_qa_complex_disposing NULL - -# GPF -# fr framework\qa\complex\framework\autosave nmake - all fr_qa_complex_framework_autosave NULL - -# much too complex, will not change to new junit -# fr framework\qa\complex\framework\recovery nmake - all fr_qa_complex_framework_recovery NULL - -# fr framework\qa\complex\imageManager nmake - all fr_qa_complex_imageManager fr_qa_complex_imageManager_interfaces NULL - -# fr framework\qa\complex\loadAllDocuments nmake - all fr_qa_complex_loadAllDocuments fr_qa_complex_loadAllDocuments_helper NULL - -# need cleanups -# fr framework\qa\complex\path_settings nmake - all fr_qa_complex_path_settings NULL -# fr framework\qa\complex\path_substitution nmake - all fr_qa_complex_path_substitution NULL - diff --git a/xmloff/prj/build.lst b/xmloff/prj/build.lst index 4dcebafb0386..d87932306614 100644 --- a/xmloff/prj/build.lst +++ b/xmloff/prj/build.lst @@ -1,4 +1,3 @@ xo xmloff : offapi svl vos NULL -xo xmloff usr1 - all xo_mkout NULL xo xmloff\prj nmake - all xo_prj NULL From 892e4b46d856af0bdc7d065ac22b7f21e2a97cb1 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Mon, 22 Nov 2010 13:40:19 +0100 Subject: [PATCH 255/279] gnumake2: getting rid of obsolete install and uninstall targets --- framework/prj/makefile.mk | 2 +- sfx2/prj/makefile.mk | 2 +- xmloff/prj/makefile.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/prj/makefile.mk b/framework/prj/makefile.mk index 3d495209d74a..3b1b54d4357f 100644 --- a/framework/prj/makefile.mk +++ b/framework/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) install + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) diff --git a/sfx2/prj/makefile.mk b/sfx2/prj/makefile.mk index 3d495209d74a..3b1b54d4357f 100644 --- a/sfx2/prj/makefile.mk +++ b/sfx2/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) install + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) diff --git a/xmloff/prj/makefile.mk b/xmloff/prj/makefile.mk index 3d495209d74a..3b1b54d4357f 100644 --- a/xmloff/prj/makefile.mk +++ b/xmloff/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) install + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) From 722bf9e9299d4c45dc540b94825cc2d1a2172f29 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 22 Nov 2010 16:21:58 +0100 Subject: [PATCH 256/279] fwk160: #i106223# replace pkg: protocol with zip: if necessary --- desktop/source/deployment/registry/help/dp_help.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 5a5efe825cfb..53a7ba1c316d 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -450,7 +450,7 @@ void BackendImpl::implProcessHelp aJarFile, rtl_UriCharClassPchar, rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8 ); - rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.pkg://" ); + rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.zip://" ); aDestBasePath += aEncodedJarFilePath; aDestBasePath += rtl::OUString::createFromAscii( "/" ); From 1d93737ff8a4ad7ddee057cb6a30286bf4e6ff6b Mon Sep 17 00:00:00 2001 From: sj Date: Mon, 22 Nov 2010 18:56:17 +0100 Subject: [PATCH 257/279] os145: #b7001888# fixing small svm problem --- .../source/primitive2d/metafileprimitive2d.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 0d57e566ef8a..73683884e2bd 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -248,9 +248,12 @@ namespace if(nPushFlags) { OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)"); - PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back()); - pNew->setPushFlags(nPushFlags); - maPropertyHolders.push_back(pNew); + if ( !maPropertyHolders.empty() ) + { + PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back()); + pNew->setPushFlags(nPushFlags); + maPropertyHolders.push_back(pNew); + } } } @@ -354,8 +357,9 @@ namespace PropertyHolder& Current() { + static PropertyHolder aDummy; OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: CURRENT with no property holders (!)"); - return *maPropertyHolders.back(); + return maPropertyHolders.empty() ? aDummy : *maPropertyHolders.back(); } ~PropertyHolders() From 4791068063b3fa2ce656e09b106cc9ee2c927ca1 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Tue, 23 Nov 2010 14:24:46 +0100 Subject: [PATCH 258/279] gnumake2: enable packmodule in setsolar mws builds --- framework/prj/makefile.mk | 2 +- sfx2/prj/makefile.mk | 2 +- xmloff/prj/makefile.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/prj/makefile.mk b/framework/prj/makefile.mk index 3b1b54d4357f..c73a3d944bbf 100644 --- a/framework/prj/makefile.mk +++ b/framework/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/sfx2/prj/makefile.mk b/sfx2/prj/makefile.mk index 3b1b54d4357f..c73a3d944bbf 100644 --- a/sfx2/prj/makefile.mk +++ b/sfx2/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/xmloff/prj/makefile.mk b/xmloff/prj/makefile.mk index 3b1b54d4357f..c73a3d944bbf 100644 --- a/xmloff/prj/makefile.mk +++ b/xmloff/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) From 8b8ffa54a73587bfb28eab13126e2bb3295a2389 Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Wed, 24 Nov 2010 09:43:50 +0100 Subject: [PATCH 259/279] dv22: fixed linux compile problems --- desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index df51d5c1b79c..44f335dd509d 100755 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -1171,8 +1171,8 @@ void UpdateDialog::getIgnoredUpdates() ::rtl::OUString aIdentifier = aElementNames[i]; ::rtl::OUString aVersion; - uno::Any aValue( uno::Reference< beans::XPropertySet >( xNameAccess->getByName( aIdentifier ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); - aValue >>= aVersion; + uno::Any aPropValue( uno::Reference< beans::XPropertySet >( xNameAccess->getByName( aIdentifier ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); + aPropValue >>= aVersion; IgnoredUpdate *pData = new IgnoredUpdate( aIdentifier, aVersion ); m_ignoredUpdates.push_back( pData ); } @@ -1492,13 +1492,13 @@ IMPL_LINK( UpdateDialog, hyperlink_clicked, svt::FixedHyperlink*, pHyperlink ) try { - uno::Reference< system::XSystemShellExecute > xSystemShellExecute( + uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( m_context->getServiceManager()->createInstanceWithContext( OUSTR( "com.sun.star.system.SystemShellExecute" ), m_context), uno::UNO_QUERY_THROW); //throws lang::IllegalArgumentException, system::SystemShellExecuteException xSystemShellExecute->execute( - sURL, ::rtl::OUString(), system::SystemShellExecuteFlags::DEFAULTS); + sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS); } catch (uno::Exception& ) { From 406dec43952fa9a7afa55738c6e7df317ad26275 Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 25 Nov 2010 11:51:51 +0100 Subject: [PATCH 260/279] masterfix OOO330: #i115774# crash in FR version when typing / as first character --- editeng/source/misc/svxacorr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index f969a8033f08..b7124881c90e 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -701,7 +701,7 @@ BOOL SvxAutoCorrect::FnAddNonBrkSpace( bRunNext = true; } } - else if ( cChar == '/' ) + else if ( cChar == '/' && nEndPos > 1 && rTxt.Len() > (nEndPos - 1) ) { // Remove the hardspace right before to avoid formatting URLs sal_Unicode cPrevChar = rTxt.GetChar( nEndPos - 1 ); From 1e3c61ddbb54a7bd0adc9fd1c147f646db19f6d2 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 26 Nov 2010 13:37:22 +0100 Subject: [PATCH 261/279] gnumake2: sorting all lists in makefiles --- framework/Library_fwe.mk | 2 +- framework/Library_fwk.mk | 6 +- framework/Library_fwl.mk | 6 +- framework/Library_fwm.mk | 6 +- sfx2/AllLangResTarget_sfx2.mk | 20 +- sfx2/Library_qstart.mk | 4 +- sfx2/Package_inc.mk | 12 +- xmloff/Library_xo.mk | 594 +++++++++++++++++----------------- xmloff/Library_xof.mk | 64 ++-- xmloff/Package_inc.mk | 192 +++++------ 10 files changed, 453 insertions(+), 453 deletions(-) diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk index 9dd3643681b5..33d8959a474e 100644 --- a/framework/Library_fwe.mk +++ b/framework/Library_fwe.mk @@ -64,8 +64,8 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\ framework/source/fwe/classes/addonmenu \ framework/source/fwe/classes/addonsoptions \ framework/source/fwe/classes/bmkmenu \ - framework/source/fwe/classes/fwkresid \ framework/source/fwe/classes/framelistanalyzer \ + framework/source/fwe/classes/fwkresid \ framework/source/fwe/classes/imagewrapper \ framework/source/fwe/classes/menuextensionsupplier \ framework/source/fwe/classes/rootactiontriggercontainer \ diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index c0135dc650f0..1f6d114fe1cb 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -43,9 +43,12 @@ $(eval $(call gb_Library_set_include,fwk,\ $(eval $(call gb_Library_add_linked_libs,fwk,\ comphelper \ + cppu \ + cppuhelper \ fwe \ fwi \ i18nisolang1 \ + sal \ sot \ stl \ svl \ @@ -53,9 +56,6 @@ $(eval $(call gb_Library_add_linked_libs,fwk,\ tk \ tl \ ucbhelper \ - cppu \ - cppuhelper \ - sal \ utl \ vcl \ )) diff --git a/framework/Library_fwl.mk b/framework/Library_fwl.mk index ed4cf040b74d..1169bb750883 100644 --- a/framework/Library_fwl.mk +++ b/framework/Library_fwl.mk @@ -41,17 +41,17 @@ $(eval $(call gb_Library_set_include,fwl,\ $(eval $(call gb_Library_add_linked_libs,fwl,\ comphelper \ + cppu \ + cppuhelper \ fwe \ fwi \ i18nisolang1 \ + sal \ stl \ svl \ svt \ tk \ tl \ - cppu \ - cppuhelper \ - sal \ utl \ vcl \ )) diff --git a/framework/Library_fwm.mk b/framework/Library_fwm.mk index d31b81ffc9ff..9ff49719148a 100644 --- a/framework/Library_fwm.mk +++ b/framework/Library_fwm.mk @@ -41,15 +41,15 @@ $(eval $(call gb_Library_set_include,fwm,\ $(eval $(call gb_Library_add_linked_libs,fwm,\ comphelper \ + cppu \ + cppuhelper \ fwi \ + sal \ stl \ svl \ svt \ tk \ tl \ - cppu \ - cppuhelper \ - sal \ utl \ vcl \ vos3 \ diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk index b51079559e82..6148e23a5b35 100644 --- a/sfx2/AllLangResTarget_sfx2.mk +++ b/sfx2/AllLangResTarget_sfx2.mk @@ -47,16 +47,11 @@ $(eval $(call gb_SrsTarget_set_include,sfx/res,\ $(eval $(call gb_SrsTarget_add_files,sfx/res,\ sfx2/source/appl/app.src \ - sfx2/source/appl/newhelp.src \ sfx2/source/appl/dde.src \ + sfx2/source/appl/newhelp.src \ sfx2/source/appl/sfx.src \ - sfx2/source/doc/doc.src \ - sfx2/source/doc/new.src \ - sfx2/source/doc/doctdlg.src \ - sfx2/source/doc/doctempl.src \ - sfx2/source/doc/graphhelp.src \ - sfx2/source/menu/menu.src \ - sfx2/source/view/view.src \ + sfx2/source/bastyp/bastyp.src \ + sfx2/source/bastyp/fltfnc.src \ sfx2/source/dialog/alienwarn.src \ sfx2/source/dialog/dialog.src \ sfx2/source/dialog/dinfdlg.src \ @@ -71,8 +66,13 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\ sfx2/source/dialog/srchdlg.src \ sfx2/source/dialog/templdlg.src \ sfx2/source/dialog/versdlg.src \ - sfx2/source/bastyp/bastyp.src \ - sfx2/source/bastyp/fltfnc.src \ + sfx2/source/doc/doc.src \ + sfx2/source/doc/doctdlg.src \ + sfx2/source/doc/doctempl.src \ + sfx2/source/doc/graphhelp.src \ + sfx2/source/doc/new.src \ + sfx2/source/menu/menu.src \ + sfx2/source/view/view.src \ )) diff --git a/sfx2/Library_qstart.mk b/sfx2/Library_qstart.mk index e6a6bc900201..6ed99271d353 100755 --- a/sfx2/Library_qstart.mk +++ b/sfx2/Library_qstart.mk @@ -58,7 +58,6 @@ $(eval $(call gb_Library_add_linked_libs,qstart_gtk,\ comphelper \ cppu \ cppuhelper \ - eggtray \ fwe \ i18nisolang1 \ sal \ @@ -75,12 +74,13 @@ $(eval $(call gb_Library_add_linked_libs,qstart_gtk,\ vcl \ vos3 \ xml2 \ + eggtray \ sfx \ )) $(eval $(call gb_Library_add_linked_system_libs,qstart_gtk,\ - icuuc \ dl \ + icuuc \ m \ pthread \ )) diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk index ed6f95b11d62..6ad8b0209c4e 100644 --- a/sfx2/Package_inc.mk +++ b/sfx2/Package_inc.mk @@ -26,6 +26,10 @@ #************************************************************************* $(eval $(call gb_Package_Package,sfx2_inc,$(SRCDIR)/sfx2/inc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/appuno.hxx,sfx2/appuno.hxx)) @@ -53,7 +57,6 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docmacromode.hxx,sfx2/docmac $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docstoragemodifylistener.hxx,sfx2/docstoragemodifylistener.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctdlg.hxx,sfx2/doctdlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctempl.hxx,sfx2/doctempl.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/event.hxx,sfx2/event.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/evntconf.hxx,sfx2/evntconf.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/fcontnr.hxx,sfx2/fcontnr.hxx)) @@ -71,16 +74,15 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgmgr.hxx,sfx2/imgmgr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ipclient.hxx,sfx2/ipclient.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemconnect.hxx,sfx2/itemconnect.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemwrapper.hxx,sfx2/itemwrapper.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-post.hxx,sfx2/layout-post.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-pre.hxx,sfx2/layout-pre.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-tabdlg.hxx,sfx2/layout-tabdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linkmgr.hxx,sfx2/linkmgr.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linksrc.hxx,sfx2/linksrc.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/lnkbase.hxx,sfx2/lnkbase.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/macrconf.hxx,sfx2/macrconf.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mailmodelapi.hxx,sfx2/mailmodelapi.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mgetempl.hxx,sfx2/mgetempl.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mieclip.hxx,sfx2/mieclip.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minarray.hxx,sfx2/minarray.hxx)) @@ -103,16 +105,15 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printer.hxx,sfx2/printer.hxx $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printopt.hxx,sfx2/printopt.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/prnmon.hxx,sfx2/prnmon.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/progress.hxx,sfx2/progress.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/querystatus.hxx,sfx2/querystatus.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/request.hxx,sfx2/request.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfx.hrc,sfx2/sfx.hrc)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasecontroller.hxx,sfx2/sfxbasecontroller.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasemodel.hxx,sfx2/sfxbasemodel.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxcommands.h,sfx2/sfxcommands.h)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdefs.hxx,sfx2/sfxdefs.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdlg.hxx,sfx2/sfxdlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhelp.hxx,sfx2/sfxhelp.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfx.hrc,sfx2/sfx.hrc)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhtml.hxx,sfx2/sfxhtml.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxmodelfactory.hxx,sfx2/sfxmodelfactory.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxresid.hxx,sfx2/sfxresid.hxx)) @@ -135,4 +136,3 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sf $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfac.hxx,sfx2/viewfac.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfrm.hxx,sfx2/viewfrm.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewsh.hxx,sfx2/viewsh.hxx)) -$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx)) diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk index 22143b1d2bc8..1bb5c43f6813 100644 --- a/xmloff/Library_xo.mk +++ b/xmloff/Library_xo.mk @@ -64,321 +64,321 @@ $(eval $(call gb_Library_add_linked_libs,xo,\ )) $(eval $(call gb_Library_add_exception_objects,xo,\ - xmloff/source/draw/ximpshap \ - xmloff/source/draw/ximppage \ - xmloff/source/draw/ximpstyl \ - xmloff/source/draw/XMLShapeStyleContext \ - xmloff/source/draw/sdxmlimp \ - xmloff/source/draw/shapeimport \ - xmloff/source/draw/ximplink \ - xmloff/source/draw/propimp0 \ - xmloff/source/draw/ximpbody \ - xmloff/source/draw/eventimp \ - xmloff/source/draw/layerimp \ - xmloff/source/draw/shapeexport2 \ - xmloff/source/draw/animimp \ - xmloff/source/draw/ximp3dscene \ - xmloff/source/draw/ximpgrp \ - xmloff/source/draw/XMLImageMapExport \ - xmloff/source/draw/numithdl \ - xmloff/source/draw/XMLReplacementImageContext \ - xmloff/source/draw/ximpshow \ - xmloff/source/draw/descriptionimp \ - xmloff/source/draw/xexptran \ - xmloff/source/draw/animationexport \ - xmloff/source/draw/viewcontext \ - xmloff/source/draw/sdpropls \ - xmloff/source/draw/shapeexport3 \ - xmloff/source/draw/ximp3dobject \ - xmloff/source/draw/EnhancedCustomShapeToken \ - xmloff/source/draw/ximpcustomshape \ - xmloff/source/draw/shapeexport4 \ - xmloff/source/draw/animationimport \ - xmloff/source/draw/XMLGraphicsDefaultStyle \ - xmloff/source/draw/ximpnote \ - xmloff/source/draw/shapeexport \ - xmloff/source/draw/XMLImageMapContext \ - xmloff/source/draw/sdxmlexp \ - xmloff/source/draw/animexp \ - xmloff/source/draw/layerexp \ - xmloff/source/draw/XMLNumberStyles \ - xmloff/source/draw/XMLShapePropertySetContext \ - xmloff/source/chart/SchXMLImport \ - xmloff/source/chart/XMLErrorIndicatorPropertyHdl \ - xmloff/source/chart/PropertyMaps \ xmloff/source/chart/ColorPropertySet \ - xmloff/source/chart/transporttypes \ - xmloff/source/chart/XMLSymbolImageContext \ + xmloff/source/chart/PropertyMaps \ + xmloff/source/chart/SchXMLAutoStylePoolP \ + xmloff/source/chart/SchXMLCalculationSettingsContext \ + xmloff/source/chart/SchXMLChartContext \ + xmloff/source/chart/SchXMLExport \ + xmloff/source/chart/SchXMLImport \ + xmloff/source/chart/SchXMLParagraphContext \ + xmloff/source/chart/SchXMLPlotAreaContext \ + xmloff/source/chart/SchXMLSeries2Context \ + xmloff/source/chart/SchXMLSeriesHelper \ + xmloff/source/chart/SchXMLTableContext \ xmloff/source/chart/SchXMLTextListContext \ xmloff/source/chart/SchXMLTools \ - xmloff/source/chart/XMLLabelSeparatorContext \ - xmloff/source/chart/XMLChartPropertyContext \ - xmloff/source/chart/SchXMLSeriesHelper \ - xmloff/source/chart/SchXMLSeries2Context \ - xmloff/source/chart/SchXMLPlotAreaContext \ - xmloff/source/chart/contexts \ - xmloff/source/chart/XMLErrorBarStylePropertyHdl \ xmloff/source/chart/XMLAxisPositionPropertyHdl \ - xmloff/source/chart/SchXMLParagraphContext \ - xmloff/source/chart/XMLTextOrientationHdl \ - xmloff/source/chart/XMLSymbolTypePropertyHdl \ - xmloff/source/chart/SchXMLChartContext \ + xmloff/source/chart/XMLChartPropertyContext \ xmloff/source/chart/XMLChartStyleContext \ - xmloff/source/chart/SchXMLAutoStylePoolP \ - xmloff/source/chart/SchXMLTableContext \ - xmloff/source/chart/SchXMLCalculationSettingsContext \ - xmloff/source/chart/SchXMLExport \ - xmloff/source/text/XMLChangedRegionImportContext \ - xmloff/source/text/XMLIndexUserSourceContext \ - xmloff/source/text/txtfldi \ - xmloff/source/text/XMLTextShapeImportHelper \ - xmloff/source/text/XMLIndexTOCStylesContext \ - xmloff/source/text/XMLIndexSimpleEntryContext \ - xmloff/source/text/txtftne \ - xmloff/source/text/XMLTextColumnsExport \ - xmloff/source/text/XMLChangeImportContext \ - xmloff/source/text/XMLSectionSourceImportContext \ - xmloff/source/text/XMLIndexAlphabeticalSourceContext \ - xmloff/source/text/txtparae \ - xmloff/source/text/XMLIndexTabStopEntryContext \ - xmloff/source/text/XMLTextMasterPageContext \ - xmloff/source/text/XMLTextHeaderFooterContext \ - xmloff/source/text/XMLIndexBibliographyEntryContext \ - xmloff/source/text/XMLIndexTOCContext \ - xmloff/source/text/XMLSectionImportContext \ - xmloff/source/text/XMLStringBufferImportContext \ - xmloff/source/text/XMLTextShapeStyleContext \ - xmloff/source/text/XMLSectionFootnoteConfigImport \ - xmloff/source/text/txtparai \ - xmloff/source/text/XMLIndexIllustrationSourceContext \ - xmloff/source/text/txtprmap \ - xmloff/source/text/XMLRedlineExport \ - xmloff/source/text/XMLTextMasterPageExport \ - xmloff/source/text/XMLIndexTableSourceContext \ - xmloff/source/text/XMLLineNumberingExport \ - xmloff/source/text/XMLSectionExport \ - xmloff/source/text/XMLTextMasterStylesContext \ - xmloff/source/text/XMLTextFrameContext \ - xmloff/source/text/XMLFootnoteImportContext \ - xmloff/source/text/txtvfldi \ - xmloff/source/text/txtdropi \ - xmloff/source/text/XMLTextListAutoStylePool \ - xmloff/source/text/XMLIndexTitleTemplateContext \ - xmloff/source/text/XMLChangeElementImportContext \ - xmloff/source/text/XMLIndexSourceBaseContext \ - xmloff/source/text/XMLTextNumRuleInfo \ - xmloff/source/text/XMLSectionFootnoteConfigExport \ - xmloff/source/text/XMLFootnoteConfigurationImportContext \ - xmloff/source/text/XMLIndexTOCSourceContext \ - xmloff/source/text/txtlists \ - xmloff/source/text/XMLLineNumberingSeparatorImportContext \ - xmloff/source/text/XMLLineNumberingImportContext \ - xmloff/source/text/XMLIndexMarkExport \ - xmloff/source/text/XMLSectionSourceDDEImportContext \ - xmloff/source/text/XMLFootnoteBodyImportContext \ - xmloff/source/text/XMLTextColumnsContext \ - xmloff/source/text/XMLAutoTextContainerEventImport \ - xmloff/source/text/XMLAutoMarkFileContext \ - xmloff/source/text/txtflde \ - xmloff/source/text/txtstyli \ - xmloff/source/text/txtsecte \ - xmloff/source/text/XMLPropertyBackpatcher \ - xmloff/source/text/XMLChangeInfoContext \ - xmloff/source/text/XMLCalculationSettingsContext \ - xmloff/source/text/XMLIndexBodyContext \ - xmloff/source/text/XMLTextFrameHyperlinkContext \ - xmloff/source/text/txtexppr \ - xmloff/source/text/XMLTextCharStyleNamesElementExport \ - xmloff/source/text/XMLAutoTextEventExport \ - xmloff/source/text/txtdrope \ - xmloff/source/text/XMLIndexSpanEntryContext \ - xmloff/source/text/XMLIndexChapterInfoEntryContext \ - xmloff/source/text/XMLTextListItemContext \ - xmloff/source/text/XMLIndexTemplateContext \ - xmloff/source/text/XMLAutoTextEventImport \ - xmloff/source/text/txtstyle \ - xmloff/source/text/XMLTrackedChangesImportContext \ - xmloff/source/text/XMLTextTableContext \ - xmloff/source/text/XMLIndexBibliographyConfigurationContext \ - xmloff/source/text/txtprhdl \ - xmloff/source/text/txtimppr \ - xmloff/source/text/XMLTextMarkImportContext \ - xmloff/source/text/XMLIndexBibliographySourceContext \ - xmloff/source/text/txtimp \ - xmloff/source/text/XMLIndexObjectSourceContext \ - xmloff/source/text/XMLTextPropertySetContext \ - xmloff/source/text/XMLTextListBlockContext \ - xmloff/source/script/XMLEventImportHelper \ - xmloff/source/script/xmlscripti \ - xmloff/source/script/XMLStarBasicExportHandler \ - xmloff/source/script/XMLScriptExportHandler \ - xmloff/source/script/XMLEventsImportContext \ - xmloff/source/script/xmlbasici \ - xmloff/source/script/XMLEventExport \ - xmloff/source/script/XMLScriptContextFactory \ - xmloff/source/script/XMLStarBasicContextFactory \ - xmloff/source/table/XMLTableImport \ - xmloff/source/table/XMLTableExport \ - xmloff/source/xforms/XFormsSubmissionContext \ - xmloff/source/xforms/SchemaRestrictionContext \ - xmloff/source/xforms/XFormsInstanceContext \ - xmloff/source/xforms/SchemaContext \ - xmloff/source/xforms/XFormsBindContext \ - xmloff/source/xforms/xformsexport \ - xmloff/source/xforms/xformsimport \ - xmloff/source/xforms/SchemaSimpleTypeContext \ - xmloff/source/xforms/TokenContext \ - xmloff/source/xforms/XFormsModelContext \ - xmloff/source/xforms/xformsapi \ - xmloff/source/forms/controlelement \ - xmloff/source/forms/formcellbinding \ - xmloff/source/forms/elementexport \ - xmloff/source/forms/eventimport \ - xmloff/source/forms/layerimport \ - xmloff/source/forms/elementimport \ - xmloff/source/forms/formattributes \ - xmloff/source/forms/formlayerimport \ - xmloff/source/forms/officeforms \ - xmloff/source/forms/layerexport \ - xmloff/source/forms/formlayerexport \ - xmloff/source/forms/eventexport \ - xmloff/source/forms/formenums \ - xmloff/source/forms/valueproperties \ - xmloff/source/forms/formstyles \ - xmloff/source/forms/controlpropertyhdl \ - xmloff/source/forms/propertyexport \ - xmloff/source/forms/gridcolumnproptranslator \ - xmloff/source/forms/propertyimport \ - xmloff/source/forms/controlpropertymap \ - xmloff/source/forms/formevents \ - xmloff/source/forms/strings \ + xmloff/source/chart/XMLErrorBarStylePropertyHdl \ + xmloff/source/chart/XMLErrorIndicatorPropertyHdl \ + xmloff/source/chart/XMLLabelSeparatorContext \ + xmloff/source/chart/XMLSymbolImageContext \ + xmloff/source/chart/XMLSymbolTypePropertyHdl \ + xmloff/source/chart/XMLTextOrientationHdl \ + xmloff/source/chart/contexts \ + xmloff/source/chart/transporttypes \ + xmloff/source/core/DocumentSettingsContext \ + xmloff/source/core/DomBuilderContext \ + xmloff/source/core/DomExport \ + xmloff/source/core/ProgressBarHelper \ + xmloff/source/core/PropertySetMerger \ + xmloff/source/core/RDFaExportHelper \ + xmloff/source/core/RDFaImportHelper \ + xmloff/source/core/SettingsExportHelper \ + xmloff/source/core/XMLBase64Export \ + xmloff/source/core/XMLBase64ImportContext \ + xmloff/source/core/XMLBasicExportFilter \ + xmloff/source/core/XMLEmbeddedObjectExportFilter \ + xmloff/source/core/XMLEmbeddedObjectImportContext \ + xmloff/source/core/attrlist \ + xmloff/source/core/facreg \ + xmloff/source/core/i18nmap \ + xmloff/source/core/nmspmap \ + xmloff/source/core/unoatrcn \ + xmloff/source/core/unointerfacetouniqueidentifiermapper \ + xmloff/source/core/xmlcnitm \ + xmloff/source/core/xmlehelp \ + xmloff/source/core/xmlerror \ + xmloff/source/core/xmlexp \ + xmloff/source/core/xmlictxt \ + xmloff/source/core/xmlimp \ + xmloff/source/core/xmltkmap \ + xmloff/source/core/xmltoken \ + xmloff/source/core/xmluconv \ + xmloff/source/draw/EnhancedCustomShapeToken \ + xmloff/source/draw/XMLGraphicsDefaultStyle \ + xmloff/source/draw/XMLImageMapContext \ + xmloff/source/draw/XMLImageMapExport \ + xmloff/source/draw/XMLNumberStyles \ + xmloff/source/draw/XMLReplacementImageContext \ + xmloff/source/draw/XMLShapePropertySetContext \ + xmloff/source/draw/XMLShapeStyleContext \ + xmloff/source/draw/animationexport \ + xmloff/source/draw/animationimport \ + xmloff/source/draw/animexp \ + xmloff/source/draw/animimp \ + xmloff/source/draw/descriptionimp \ + xmloff/source/draw/eventimp \ + xmloff/source/draw/layerexp \ + xmloff/source/draw/layerimp \ + xmloff/source/draw/numithdl \ + xmloff/source/draw/propimp0 \ + xmloff/source/draw/sdpropls \ + xmloff/source/draw/sdxmlexp \ + xmloff/source/draw/sdxmlimp \ + xmloff/source/draw/shapeexport \ + xmloff/source/draw/shapeexport2 \ + xmloff/source/draw/shapeexport3 \ + xmloff/source/draw/shapeexport4 \ + xmloff/source/draw/shapeimport \ + xmloff/source/draw/viewcontext \ + xmloff/source/draw/xexptran \ + xmloff/source/draw/ximp3dobject \ + xmloff/source/draw/ximp3dscene \ + xmloff/source/draw/ximpbody \ + xmloff/source/draw/ximpcustomshape \ + xmloff/source/draw/ximpgrp \ + xmloff/source/draw/ximplink \ + xmloff/source/draw/ximpnote \ + xmloff/source/draw/ximppage \ + xmloff/source/draw/ximpshap \ + xmloff/source/draw/ximpshow \ + xmloff/source/draw/ximpstyl \ xmloff/source/forms/attriblistmerge \ - xmloff/source/forms/logging \ + xmloff/source/forms/controlelement \ + xmloff/source/forms/controlpropertyhdl \ + xmloff/source/forms/controlpropertymap \ + xmloff/source/forms/elementexport \ + xmloff/source/forms/elementimport \ + xmloff/source/forms/eventexport \ + xmloff/source/forms/eventimport \ + xmloff/source/forms/formattributes \ + xmloff/source/forms/formcellbinding \ + xmloff/source/forms/formenums \ + xmloff/source/forms/formevents \ + xmloff/source/forms/formlayerexport \ + xmloff/source/forms/formlayerimport \ xmloff/source/forms/formsimp \ - xmloff/source/style/opaquhdl \ - xmloff/source/style/impastp4 \ - xmloff/source/style/PageMasterImportContext \ - xmloff/source/style/DashStyle \ - xmloff/source/style/MultiPropertySetHelper \ - xmloff/source/style/PageMasterStyleMap \ - xmloff/source/style/WordWrapPropertyHdl \ - xmloff/source/style/XMLConstantsPropertyHandler \ - xmloff/source/style/xmltabi \ - xmloff/source/style/MarkerStyle \ - xmloff/source/style/XMLElementPropertyContext \ - xmloff/source/style/VisAreaExport \ - xmloff/source/style/undlihdl \ - xmloff/source/style/XMLIsPercentagePropertyHandler \ - xmloff/source/style/EnumPropertyHdl \ - xmloff/source/style/durationhdl \ - xmloff/source/style/XMLFontAutoStylePool \ - xmloff/source/style/shadwhdl \ - xmloff/source/style/xmlaustp \ - xmloff/source/style/numehelp \ - xmloff/source/style/adjushdl \ - xmloff/source/style/PageMasterExportPropMapper \ - xmloff/source/style/postuhdl \ - xmloff/source/style/TransGradientStyle \ - xmloff/source/style/XMLRectangleMembersHandler \ - xmloff/source/style/xmlbahdl \ - xmloff/source/style/xmlprcon \ - xmloff/source/style/ImageStyle \ - xmloff/source/style/xmlnumi \ - xmloff/source/style/kernihdl \ - xmloff/source/style/XMLBitmapLogicalSizePropertyHandler \ - xmloff/source/style/impastp1 \ - xmloff/source/style/xmlnumfi \ - xmloff/source/style/VisAreaContext \ - xmloff/source/style/bordrhdl \ - xmloff/source/style/prhdlfac \ - xmloff/source/style/xmlnumfe \ - xmloff/source/style/xmlimppr \ - xmloff/source/style/cdouthdl \ - xmloff/source/style/styleexp \ + xmloff/source/forms/formstyles \ + xmloff/source/forms/gridcolumnproptranslator \ + xmloff/source/forms/layerexport \ + xmloff/source/forms/layerimport \ + xmloff/source/forms/logging \ + xmloff/source/forms/officeforms \ + xmloff/source/forms/propertyexport \ + xmloff/source/forms/propertyimport \ + xmloff/source/forms/strings \ + xmloff/source/forms/valueproperties \ + xmloff/source/meta/MetaExportComponent \ + xmloff/source/meta/MetaImportComponent \ + xmloff/source/meta/xmlmetae \ + xmloff/source/meta/xmlmetai \ + xmloff/source/meta/xmlversion \ + xmloff/source/script/XMLEventExport \ + xmloff/source/script/XMLEventImportHelper \ + xmloff/source/script/XMLEventsImportContext \ + xmloff/source/script/XMLScriptContextFactory \ + xmloff/source/script/XMLScriptExportHandler \ + xmloff/source/script/XMLStarBasicContextFactory \ + xmloff/source/script/XMLStarBasicExportHandler \ + xmloff/source/script/xmlbasici \ + xmloff/source/script/xmlscripti \ xmloff/source/style/AttributeContainerHandler \ - xmloff/source/style/PageMasterPropHdl \ - xmloff/source/style/XMLBackgroundImageExport \ - xmloff/source/style/PageMasterPropMapper \ - xmloff/source/style/PagePropertySetContext \ - xmloff/source/style/XMLPercentOrMeasurePropertyHandler \ - xmloff/source/style/XMLBackgroundImageContext \ - xmloff/source/style/prstylei \ - xmloff/source/style/csmaphdl \ - xmloff/source/style/PageHeaderFooterContext \ - xmloff/source/style/XMLFontStylesContext \ - xmloff/source/style/PageMasterImportPropMapper \ - xmloff/source/style/lspachdl \ - xmloff/source/style/StyleMap \ - xmloff/source/style/XMLClipPropertyHandler \ - xmloff/source/style/XMLPageExport \ - xmloff/source/style/PageMasterPropHdlFactory \ - xmloff/source/style/xmlnume \ - xmloff/source/style/NamedBoolPropertyHdl \ - xmloff/source/style/xmlexppr \ - xmloff/source/style/xmltabe \ - xmloff/source/style/chrhghdl \ + xmloff/source/style/DashStyle \ + xmloff/source/style/DrawAspectHdl \ + xmloff/source/style/EnumPropertyHdl \ xmloff/source/style/FillStyleContext \ - xmloff/source/style/breakhdl \ - xmloff/source/style/fonthdl \ - xmloff/source/style/escphdl \ - xmloff/source/style/xmlstyle \ - xmloff/source/style/HatchStyle \ - xmloff/source/style/chrlohdl \ - xmloff/source/style/xmlprhdl \ xmloff/source/style/GradientStyle \ - xmloff/source/style/uniref \ + xmloff/source/style/HatchStyle \ + xmloff/source/style/ImageStyle \ + xmloff/source/style/MarkerStyle \ + xmloff/source/style/MultiPropertySetHelper \ + xmloff/source/style/NamedBoolPropertyHdl \ + xmloff/source/style/PageHeaderFooterContext \ + xmloff/source/style/PageMasterExportPropMapper \ + xmloff/source/style/PageMasterImportContext \ + xmloff/source/style/PageMasterImportPropMapper \ + xmloff/source/style/PageMasterPropHdl \ + xmloff/source/style/PageMasterPropHdlFactory \ + xmloff/source/style/PageMasterPropMapper \ + xmloff/source/style/PageMasterStyleMap \ + xmloff/source/style/PagePropertySetContext \ + xmloff/source/style/SinglePropertySetInfoCache \ + xmloff/source/style/StyleMap \ + xmloff/source/style/TransGradientStyle \ + xmloff/source/style/VisAreaContext \ + xmloff/source/style/VisAreaExport \ + xmloff/source/style/WordWrapPropertyHdl \ + xmloff/source/style/XMLBackgroundImageContext \ + xmloff/source/style/XMLBackgroundImageExport \ + xmloff/source/style/XMLBitmapLogicalSizePropertyHandler \ + xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler \ + xmloff/source/style/XMLClipPropertyHandler \ + xmloff/source/style/XMLConstantsPropertyHandler \ + xmloff/source/style/XMLElementPropertyContext \ + xmloff/source/style/XMLFillBitmapSizePropertyHandler \ + xmloff/source/style/XMLFontAutoStylePool \ + xmloff/source/style/XMLFontStylesContext \ + xmloff/source/style/XMLFootnoteSeparatorExport \ + xmloff/source/style/XMLFootnoteSeparatorImport \ + xmloff/source/style/XMLIsPercentagePropertyHandler \ + xmloff/source/style/XMLPageExport \ + xmloff/source/style/XMLPercentOrMeasurePropertyHandler \ + xmloff/source/style/XMLRectangleMembersHandler \ + xmloff/source/style/adjushdl \ + xmloff/source/style/backhdl \ + xmloff/source/style/bordrhdl \ + xmloff/source/style/breakhdl \ + xmloff/source/style/cdouthdl \ + xmloff/source/style/chrhghdl \ + xmloff/source/style/chrlohdl \ + xmloff/source/style/csmaphdl \ + xmloff/source/style/durationhdl \ + xmloff/source/style/escphdl \ + xmloff/source/style/fonthdl \ + xmloff/source/style/impastp1 \ xmloff/source/style/impastp2 \ xmloff/source/style/impastp3 \ - xmloff/source/style/XMLFootnoteSeparatorExport \ - xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler \ - xmloff/source/style/DrawAspectHdl \ - xmloff/source/style/tabsthdl \ - xmloff/source/style/xmlprmap \ - xmloff/source/style/XMLFillBitmapSizePropertyHandler \ - xmloff/source/style/XMLFootnoteSeparatorImport \ - xmloff/source/style/backhdl \ - xmloff/source/style/weighhdl \ - xmloff/source/style/SinglePropertySetInfoCache \ + xmloff/source/style/impastp4 \ + xmloff/source/style/kernihdl \ + xmloff/source/style/lspachdl \ + xmloff/source/style/numehelp \ + xmloff/source/style/opaquhdl \ + xmloff/source/style/postuhdl \ + xmloff/source/style/prhdlfac \ + xmloff/source/style/prstylei \ + xmloff/source/style/shadwhdl \ xmloff/source/style/shdwdhdl \ - xmloff/source/core/i18nmap \ - xmloff/source/core/xmlimp \ - xmloff/source/core/unointerfacetouniqueidentifiermapper \ - xmloff/source/core/xmlexp \ - xmloff/source/core/XMLEmbeddedObjectExportFilter \ - xmloff/source/core/PropertySetMerger \ - xmloff/source/core/xmltoken \ - xmloff/source/core/xmlerror \ - xmloff/source/core/nmspmap \ - xmloff/source/core/xmluconv \ - xmloff/source/core/XMLBase64Export \ - xmloff/source/core/DomExport \ - xmloff/source/core/RDFaExportHelper \ - xmloff/source/core/xmltkmap \ - xmloff/source/core/DocumentSettingsContext \ - xmloff/source/core/xmlictxt \ - xmloff/source/core/XMLBase64ImportContext \ - xmloff/source/core/xmlehelp \ - xmloff/source/core/XMLEmbeddedObjectImportContext \ - xmloff/source/core/xmlcnitm \ - xmloff/source/core/ProgressBarHelper \ - xmloff/source/core/XMLBasicExportFilter \ - xmloff/source/core/facreg \ - xmloff/source/core/unoatrcn \ - xmloff/source/core/SettingsExportHelper \ - xmloff/source/core/DomBuilderContext \ - xmloff/source/core/attrlist \ - xmloff/source/core/RDFaImportHelper \ - xmloff/source/meta/xmlmetae \ - xmloff/source/meta/xmlversion \ - xmloff/source/meta/MetaImportComponent \ - xmloff/source/meta/xmlmetai \ - xmloff/source/meta/MetaExportComponent \ + xmloff/source/style/styleexp \ + xmloff/source/style/tabsthdl \ + xmloff/source/style/undlihdl \ + xmloff/source/style/uniref \ + xmloff/source/style/weighhdl \ + xmloff/source/style/xmlaustp \ + xmloff/source/style/xmlbahdl \ + xmloff/source/style/xmlexppr \ + xmloff/source/style/xmlimppr \ + xmloff/source/style/xmlnume \ + xmloff/source/style/xmlnumfe \ + xmloff/source/style/xmlnumfi \ + xmloff/source/style/xmlnumi \ + xmloff/source/style/xmlprcon \ + xmloff/source/style/xmlprhdl \ + xmloff/source/style/xmlprmap \ + xmloff/source/style/xmlstyle \ + xmloff/source/style/xmltabe \ + xmloff/source/style/xmltabi \ + xmloff/source/table/XMLTableExport \ + xmloff/source/table/XMLTableImport \ + xmloff/source/text/XMLAutoMarkFileContext \ + xmloff/source/text/XMLAutoTextContainerEventImport \ + xmloff/source/text/XMLAutoTextEventExport \ + xmloff/source/text/XMLAutoTextEventImport \ + xmloff/source/text/XMLCalculationSettingsContext \ + xmloff/source/text/XMLChangeElementImportContext \ + xmloff/source/text/XMLChangeImportContext \ + xmloff/source/text/XMLChangeInfoContext \ + xmloff/source/text/XMLChangedRegionImportContext \ + xmloff/source/text/XMLFootnoteBodyImportContext \ + xmloff/source/text/XMLFootnoteConfigurationImportContext \ + xmloff/source/text/XMLFootnoteImportContext \ + xmloff/source/text/XMLIndexAlphabeticalSourceContext \ + xmloff/source/text/XMLIndexBibliographyConfigurationContext \ + xmloff/source/text/XMLIndexBibliographyEntryContext \ + xmloff/source/text/XMLIndexBibliographySourceContext \ + xmloff/source/text/XMLIndexBodyContext \ + xmloff/source/text/XMLIndexChapterInfoEntryContext \ + xmloff/source/text/XMLIndexIllustrationSourceContext \ + xmloff/source/text/XMLIndexMarkExport \ + xmloff/source/text/XMLIndexObjectSourceContext \ + xmloff/source/text/XMLIndexSimpleEntryContext \ + xmloff/source/text/XMLIndexSourceBaseContext \ + xmloff/source/text/XMLIndexSpanEntryContext \ + xmloff/source/text/XMLIndexTOCContext \ + xmloff/source/text/XMLIndexTOCSourceContext \ + xmloff/source/text/XMLIndexTOCStylesContext \ + xmloff/source/text/XMLIndexTabStopEntryContext \ + xmloff/source/text/XMLIndexTableSourceContext \ + xmloff/source/text/XMLIndexTemplateContext \ + xmloff/source/text/XMLIndexTitleTemplateContext \ + xmloff/source/text/XMLIndexUserSourceContext \ + xmloff/source/text/XMLLineNumberingExport \ + xmloff/source/text/XMLLineNumberingImportContext \ + xmloff/source/text/XMLLineNumberingSeparatorImportContext \ + xmloff/source/text/XMLPropertyBackpatcher \ + xmloff/source/text/XMLRedlineExport \ + xmloff/source/text/XMLSectionExport \ + xmloff/source/text/XMLSectionFootnoteConfigExport \ + xmloff/source/text/XMLSectionFootnoteConfigImport \ + xmloff/source/text/XMLSectionImportContext \ + xmloff/source/text/XMLSectionSourceDDEImportContext \ + xmloff/source/text/XMLSectionSourceImportContext \ + xmloff/source/text/XMLStringBufferImportContext \ + xmloff/source/text/XMLTextCharStyleNamesElementExport \ + xmloff/source/text/XMLTextColumnsContext \ + xmloff/source/text/XMLTextColumnsExport \ + xmloff/source/text/XMLTextFrameContext \ + xmloff/source/text/XMLTextFrameHyperlinkContext \ + xmloff/source/text/XMLTextHeaderFooterContext \ + xmloff/source/text/XMLTextListAutoStylePool \ + xmloff/source/text/XMLTextListBlockContext \ + xmloff/source/text/XMLTextListItemContext \ + xmloff/source/text/XMLTextMarkImportContext \ + xmloff/source/text/XMLTextMasterPageContext \ + xmloff/source/text/XMLTextMasterPageExport \ + xmloff/source/text/XMLTextMasterStylesContext \ + xmloff/source/text/XMLTextNumRuleInfo \ + xmloff/source/text/XMLTextPropertySetContext \ + xmloff/source/text/XMLTextShapeImportHelper \ + xmloff/source/text/XMLTextShapeStyleContext \ + xmloff/source/text/XMLTextTableContext \ + xmloff/source/text/XMLTrackedChangesImportContext \ + xmloff/source/text/txtdrope \ + xmloff/source/text/txtdropi \ + xmloff/source/text/txtexppr \ + xmloff/source/text/txtflde \ + xmloff/source/text/txtfldi \ + xmloff/source/text/txtftne \ + xmloff/source/text/txtimp \ + xmloff/source/text/txtimppr \ + xmloff/source/text/txtlists \ + xmloff/source/text/txtparae \ + xmloff/source/text/txtparai \ + xmloff/source/text/txtprhdl \ + xmloff/source/text/txtprmap \ + xmloff/source/text/txtsecte \ + xmloff/source/text/txtstyle \ + xmloff/source/text/txtstyli \ + xmloff/source/text/txtvfldi \ + xmloff/source/xforms/SchemaContext \ + xmloff/source/xforms/SchemaRestrictionContext \ + xmloff/source/xforms/SchemaSimpleTypeContext \ + xmloff/source/xforms/TokenContext \ + xmloff/source/xforms/XFormsBindContext \ + xmloff/source/xforms/XFormsInstanceContext \ + xmloff/source/xforms/XFormsModelContext \ + xmloff/source/xforms/XFormsSubmissionContext \ + xmloff/source/xforms/xformsapi \ + xmloff/source/xforms/xformsexport \ + xmloff/source/xforms/xformsimport \ )) ifeq ($(OS),LINUX) $(eval $(call gb_Library_add_linked_libs,xo,\ - icuuc \ dl \ + icuuc \ m \ pthread \ )) diff --git a/xmloff/Library_xof.mk b/xmloff/Library_xof.mk index 710e836c0950..6880eb1a1fd9 100644 --- a/xmloff/Library_xof.mk +++ b/xmloff/Library_xof.mk @@ -50,45 +50,45 @@ $(eval $(call gb_Library_add_linked_libs,xof,\ )) $(eval $(call gb_Library_add_exception_objects,xof,\ - xmloff/source/transform/OOo2Oasis \ - xmloff/source/transform/StyleOOoTContext \ - xmloff/source/transform/EventOOoTContext \ - xmloff/source/transform/DocumentTContext \ - xmloff/source/transform/NotesTContext \ - xmloff/source/transform/Oasis2OOo \ - xmloff/source/transform/TransformerContext \ xmloff/source/transform/ChartOASISTContext \ - xmloff/source/transform/PropertyActionsOASIS \ + xmloff/source/transform/ChartOOoTContext \ + xmloff/source/transform/ChartPlotAreaOASISTContext \ + xmloff/source/transform/ChartPlotAreaOOoTContext \ + xmloff/source/transform/ControlOASISTContext \ + xmloff/source/transform/ControlOOoTContext \ + xmloff/source/transform/CreateElemTContext \ xmloff/source/transform/DeepTContext \ xmloff/source/transform/DlgOASISTContext \ - xmloff/source/transform/FormPropOOoTContext \ - xmloff/source/transform/TransformerBase \ - xmloff/source/transform/FormPropOASISTContext \ - xmloff/source/transform/RenameElemTContext \ - xmloff/source/transform/ControlOOoTContext \ - xmloff/source/transform/FrameOASISTContext \ - xmloff/source/transform/EventOASISTContext \ - xmloff/source/transform/TransformerTokenMap \ - xmloff/source/transform/PersMixedContentTContext \ - xmloff/source/transform/ProcAttrTContext \ - xmloff/source/transform/MetaTContext \ - xmloff/source/transform/TransformerActions \ - xmloff/source/transform/ControlOASISTContext \ - xmloff/source/transform/ChartPlotAreaOOoTContext \ - xmloff/source/transform/MutableAttrList \ - xmloff/source/transform/PropertyActionsOOo \ - xmloff/source/transform/ChartOOoTContext \ + xmloff/source/transform/DocumentTContext \ xmloff/source/transform/EventMap \ + xmloff/source/transform/EventOASISTContext \ + xmloff/source/transform/EventOOoTContext \ xmloff/source/transform/FlatTContext \ - xmloff/source/transform/CreateElemTContext \ - xmloff/source/transform/ProcAddAttrTContext \ - xmloff/source/transform/XMLFilterRegistration \ - xmloff/source/transform/MergeElemTContext \ - xmloff/source/transform/PersAttrListTContext \ + xmloff/source/transform/FormPropOASISTContext \ + xmloff/source/transform/FormPropOOoTContext \ + xmloff/source/transform/FrameOASISTContext \ xmloff/source/transform/FrameOOoTContext \ - xmloff/source/transform/ChartPlotAreaOASISTContext \ - xmloff/source/transform/StyleOASISTContext \ xmloff/source/transform/IgnoreTContext \ + xmloff/source/transform/MergeElemTContext \ + xmloff/source/transform/MetaTContext \ + xmloff/source/transform/MutableAttrList \ + xmloff/source/transform/NotesTContext \ + xmloff/source/transform/OOo2Oasis \ + xmloff/source/transform/Oasis2OOo \ + xmloff/source/transform/PersAttrListTContext \ + xmloff/source/transform/PersMixedContentTContext \ + xmloff/source/transform/ProcAddAttrTContext \ + xmloff/source/transform/ProcAttrTContext \ + xmloff/source/transform/PropertyActionsOASIS \ + xmloff/source/transform/PropertyActionsOOo \ + xmloff/source/transform/RenameElemTContext \ + xmloff/source/transform/StyleOASISTContext \ + xmloff/source/transform/StyleOOoTContext \ + xmloff/source/transform/TransformerActions \ + xmloff/source/transform/TransformerBase \ + xmloff/source/transform/TransformerContext \ + xmloff/source/transform/TransformerTokenMap \ + xmloff/source/transform/XMLFilterRegistration \ )) ifeq ($(OS),LINUX) diff --git a/xmloff/Package_inc.mk b/xmloff/Package_inc.mk index cd0500c6b55d..ca2d0abe62e2 100644 --- a/xmloff/Package_inc.mk +++ b/xmloff/Package_inc.mk @@ -26,106 +26,106 @@ #************************************************************************* $(eval $(call gb_Package_Package,xmloff_inc,$(SRCDIR)/xmloff/inc)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/dllapi.h,xmloff/dllapi.h)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLFilterServiceNames.h,xmloff/XMLFilterServiceNames.h)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLEmbeddedObjectExportFilter.hxx,xmloff/XMLEmbeddedObjectExportFilter.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/DocumentSettingsContext.hxx,xmloff/DocumentSettingsContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/contextid.hxx,xmloff/contextid.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlmetai.hxx,xmloff/xmlmetai.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlprmap.hxx,xmloff/xmlprmap.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnumi.hxx,xmloff/xmlnumi.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlement.hxx,xmloff/xmlement.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/nmspmap.hxx,xmloff/nmspmap.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/functional.hxx,xmloff/functional.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtstyle.hxx,xmloff/txtstyle.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtstyli.hxx,xmloff/txtstyli.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SinglePropertySetInfoCache.hxx,xmloff/SinglePropertySetInfoCache.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/VisAreaContext.hxx,xmloff/VisAreaContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLFontStylesContext.hxx,xmloff/XMLFontStylesContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PropertySetInfoHash.hxx,xmloff/PropertySetInfoHash.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltkmap.hxx,xmloff/xmltkmap.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/NamedBoolPropertyHdl.hxx,xmloff/NamedBoolPropertyHdl.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLConstantsPropertyHandler.hxx,xmloff/XMLConstantsPropertyHandler.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnmspe.hxx,xmloff/xmlnmspe.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlprhdl.hxx,xmloff/xmlprhdl.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeimport.hxx,xmloff/shapeimport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/EnumPropertyHdl.hxx,xmloff/EnumPropertyHdl.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLCharContext.hxx,xmloff/XMLCharContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/VisAreaExport.hxx,xmloff/VisAreaExport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/unoatrcn.hxx,xmloff/unoatrcn.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/controlpropertyhdl.hxx,xmloff/controlpropertyhdl.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlimppr.hxx,xmloff/xmlimppr.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltabe.hxx,xmloff/xmltabe.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLEventsImportContext.hxx,xmloff/XMLEventsImportContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PageMasterStyleMap.hxx,xmloff/PageMasterStyleMap.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/families.hxx,xmloff/families.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/attrlist.hxx,xmloff/attrlist.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlreg.hxx,xmloff/xmlreg.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prstylei.hxx,xmloff/prstylei.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlerror.hxx,xmloff/xmlerror.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltoken.hxx,xmloff/xmltoken.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlmetae.hxx,xmloff/xmlmetae.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextMasterPageExport.hxx,xmloff/XMLTextMasterPageExport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeexport.hxx,xmloff/shapeexport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtimppr.hxx,xmloff/txtimppr.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SchXMLImportHelper.hxx,xmloff/SchXMLImportHelper.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/formsimp.hxx,xmloff/formsimp.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/ImageStyle.hxx,xmloff/ImageStyle.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnumfi.hxx,xmloff/xmlnumfi.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/WordWrapPropertyHdl.hxx,xmloff/WordWrapPropertyHdl.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLStringVector.hxx,xmloff/XMLStringVector.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/styleexp.hxx,xmloff/styleexp.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextMasterStylesContext.hxx,xmloff/XMLTextMasterStylesContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlkywd.hxx,xmloff/xmlkywd.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnume.hxx,xmloff/xmlnume.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLEventExport.hxx,xmloff/XMLEventExport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/formlayerexport.hxx,xmloff/formlayerexport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtparae.hxx,xmloff/txtparae.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/ProgressBarHelper.hxx,xmloff/ProgressBarHelper.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlcnitm.hxx,xmloff/xmlcnitm.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextShapeImportHelper.hxx,xmloff/XMLTextShapeImportHelper.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmluconv.hxx,xmloff/xmluconv.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlscripti.hxx,xmloff/xmlscripti.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlaustp.hxx,xmloff/xmlaustp.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnumfe.hxx,xmloff/xmlnumfe.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlevent.hxx,xmloff/xmlevent.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlimp.hxx,xmloff/xmlimp.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PropertySetInfoKey.hxx,xmloff/PropertySetInfoKey.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/formlayerimport.hxx,xmloff/formlayerimport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/i18nmap.hxx,xmloff/i18nmap.hxx)) $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/DashStyle.hxx,xmloff/DashStyle.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLShapeStyleContext.hxx,xmloff/XMLShapeStyleContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prhdlfac.hxx,xmloff/prhdlfac.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLPageExport.hxx,xmloff/XMLPageExport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/MarkerStyle.hxx,xmloff/MarkerStyle.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLBase64ImportContext.hxx,xmloff/XMLBase64ImportContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xformsexport.hxx,xmloff/xformsexport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/uniref.hxx,xmloff/uniref.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtimp.hxx,xmloff/txtimp.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlprcon.hxx,xmloff/xmlprcon.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtprmap.hxx,xmloff/txtprmap.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLFontAutoStylePool.hxx,xmloff/XMLFontAutoStylePool.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlexp.hxx,xmloff/xmlexp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/DocumentSettingsContext.hxx,xmloff/DocumentSettingsContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/EnumPropertyHdl.hxx,xmloff/EnumPropertyHdl.hxx)) $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/GradientStyle.hxx,xmloff/GradientStyle.hxx)) $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/HatchStyle.hxx,xmloff/HatchStyle.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/animexp.hxx,xmloff/animexp.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlcnimp.hxx,xmloff/xmlcnimp.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextMasterPageContext.hxx,xmloff/XMLTextMasterPageContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextListAutoStylePool.hxx,xmloff/XMLTextListAutoStylePool.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextTableContext.hxx,xmloff/XMLTextTableContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/maptype.hxx,xmloff/maptype.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/numehelp.hxx,xmloff/numehelp.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlexppr.hxx,xmloff/xmlexppr.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlstyle.hxx,xmloff/xmlstyle.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextShapeStyleContext.hxx,xmloff/XMLTextShapeStyleContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltypes.hxx,xmloff/xmltypes.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/ImageStyle.hxx,xmloff/ImageStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/MarkerStyle.hxx,xmloff/MarkerStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/NamedBoolPropertyHdl.hxx,xmloff/NamedBoolPropertyHdl.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PageMasterStyleMap.hxx,xmloff/PageMasterStyleMap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/ProgressBarHelper.hxx,xmloff/ProgressBarHelper.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PropertySetInfoHash.hxx,xmloff/PropertySetInfoHash.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PropertySetInfoKey.hxx,xmloff/PropertySetInfoKey.hxx)) $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SchXMLExportHelper.hxx,xmloff/SchXMLExportHelper.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xformsimport.hxx,xmloff/xformsimport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLGraphicsDefaultStyle.hxx,xmloff/XMLGraphicsDefaultStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SchXMLImportHelper.hxx,xmloff/SchXMLImportHelper.hxx)) $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SettingsExportHelper.hxx,xmloff/SettingsExportHelper.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlictxt.hxx,xmloff/xmlictxt.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SinglePropertySetInfoCache.hxx,xmloff/SinglePropertySetInfoCache.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/VisAreaContext.hxx,xmloff/VisAreaContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/VisAreaExport.hxx,xmloff/VisAreaExport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/WordWrapPropertyHdl.hxx,xmloff/WordWrapPropertyHdl.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLBase64ImportContext.hxx,xmloff/XMLBase64ImportContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLCharContext.hxx,xmloff/XMLCharContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLConstantsPropertyHandler.hxx,xmloff/XMLConstantsPropertyHandler.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLEmbeddedObjectExportFilter.hxx,xmloff/XMLEmbeddedObjectExportFilter.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLEventExport.hxx,xmloff/XMLEventExport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLEventsImportContext.hxx,xmloff/XMLEventsImportContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLFilterServiceNames.h,xmloff/XMLFilterServiceNames.h)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLFontAutoStylePool.hxx,xmloff/XMLFontAutoStylePool.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLFontStylesContext.hxx,xmloff/XMLFontStylesContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLGraphicsDefaultStyle.hxx,xmloff/XMLGraphicsDefaultStyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLPageExport.hxx,xmloff/XMLPageExport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLSettingsExportContext.hxx,xmloff/XMLSettingsExportContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLShapeStyleContext.hxx,xmloff/XMLShapeStyleContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLStringVector.hxx,xmloff/XMLStringVector.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextListAutoStylePool.hxx,xmloff/XMLTextListAutoStylePool.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextMasterPageContext.hxx,xmloff/XMLTextMasterPageContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextMasterPageExport.hxx,xmloff/XMLTextMasterPageExport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextMasterStylesContext.hxx,xmloff/XMLTextMasterStylesContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextShapeImportHelper.hxx,xmloff/XMLTextShapeImportHelper.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextShapeImportHelper.hxx,xmloff/XMLTextShapeImportHelper.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextShapeStyleContext.hxx,xmloff/XMLTextShapeStyleContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextTableContext.hxx,xmloff/XMLTextTableContext.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/animexp.hxx,xmloff/animexp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/attrlist.hxx,xmloff/attrlist.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/contextid.hxx,xmloff/contextid.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/controlpropertyhdl.hxx,xmloff/controlpropertyhdl.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/dllapi.h,xmloff/dllapi.h)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/families.hxx,xmloff/families.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/formlayerexport.hxx,xmloff/formlayerexport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/formlayerimport.hxx,xmloff/formlayerimport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/formsimp.hxx,xmloff/formsimp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/functional.hxx,xmloff/functional.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/i18nmap.hxx,xmloff/i18nmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/maptype.hxx,xmloff/maptype.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/nmspmap.hxx,xmloff/nmspmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/numehelp.hxx,xmloff/numehelp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/odffields.hxx,xmloff/odffields.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prhdlfac.hxx,xmloff/prhdlfac.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/prstylei.hxx,xmloff/prstylei.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeexport.hxx,xmloff/shapeexport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/shapeimport.hxx,xmloff/shapeimport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/styleexp.hxx,xmloff/styleexp.hxx)) $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/table/XMLTableExport.hxx,xmloff/table/XMLTableExport.hxx)) $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/table/XMLTableImport.hxx,xmloff/table/XMLTableImport.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLSettingsExportContext.hxx,xmloff/XMLSettingsExportContext.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/XMLTextShapeImportHelper.hxx,xmloff/XMLTextShapeImportHelper.hxx)) -$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/odffields.hxx,xmloff/odffields.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtimp.hxx,xmloff/txtimp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtimppr.hxx,xmloff/txtimppr.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtparae.hxx,xmloff/txtparae.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtprmap.hxx,xmloff/txtprmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtstyle.hxx,xmloff/txtstyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/txtstyli.hxx,xmloff/txtstyli.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/uniref.hxx,xmloff/uniref.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/unoatrcn.hxx,xmloff/unoatrcn.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xformsexport.hxx,xmloff/xformsexport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xformsimport.hxx,xmloff/xformsimport.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlaustp.hxx,xmloff/xmlaustp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlcnimp.hxx,xmloff/xmlcnimp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlcnitm.hxx,xmloff/xmlcnitm.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlement.hxx,xmloff/xmlement.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlerror.hxx,xmloff/xmlerror.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlevent.hxx,xmloff/xmlevent.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlexp.hxx,xmloff/xmlexp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlexppr.hxx,xmloff/xmlexppr.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlictxt.hxx,xmloff/xmlictxt.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlimp.hxx,xmloff/xmlimp.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlimppr.hxx,xmloff/xmlimppr.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlkywd.hxx,xmloff/xmlkywd.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlmetae.hxx,xmloff/xmlmetae.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlmetai.hxx,xmloff/xmlmetai.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnmspe.hxx,xmloff/xmlnmspe.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnume.hxx,xmloff/xmlnume.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnumfe.hxx,xmloff/xmlnumfe.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnumfi.hxx,xmloff/xmlnumfi.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlnumi.hxx,xmloff/xmlnumi.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlprcon.hxx,xmloff/xmlprcon.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlprhdl.hxx,xmloff/xmlprhdl.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlprmap.hxx,xmloff/xmlprmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlreg.hxx,xmloff/xmlreg.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlscripti.hxx,xmloff/xmlscripti.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmlstyle.hxx,xmloff/xmlstyle.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltabe.hxx,xmloff/xmltabe.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltkmap.hxx,xmloff/xmltkmap.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltoken.hxx,xmloff/xmltoken.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmltypes.hxx,xmloff/xmltypes.hxx)) +$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/xmluconv.hxx,xmloff/xmluconv.hxx)) From dac3d8ca475971249a0015cb55207688055b41f5 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 26 Nov 2010 17:32:03 +0100 Subject: [PATCH 262/279] CWS gnumake2: some adaptions to changes on master in removed makefile.mk files --- framework/Library_fwk.mk | 9 +++++++++ xmloff/Library_xo.mk | 1 + 2 files changed, 10 insertions(+) diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index 1f6d114fe1cb..c6bc71fadd6d 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -103,7 +103,12 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/jobs/jobexecutor \ framework/source/jobs/jobresult \ framework/source/jobs/joburl \ + framework/source/layoutmanager/helpers \ framework/source/layoutmanager/layoutmanager \ + framework/source/layoutmanager/panel \ + framework/source/layoutmanager/panelmanager \ + framework/source/layoutmanager/toolbarlayoutmanager \ + framework/source/layoutmanager/uielement \ framework/source/loadenv/loadenv \ framework/source/loadenv/targethelper \ framework/source/register/registerservices \ @@ -112,10 +117,12 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/services/backingwindow \ framework/source/services/desktop \ framework/source/services/frame \ + framework/source/services/modelwinservice \ framework/source/services/modulemanager \ framework/source/services/pathsettings \ framework/source/services/sessionlistener \ framework/source/services/substitutepathvars \ + framework/source/services/tabwindowservice \ framework/source/services/taskcreatorsrv \ framework/source/services/uriabbreviation \ framework/source/services/urltransformer \ @@ -145,6 +152,8 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/uielement/menubarmerger \ framework/source/uielement/menubarwrapper \ framework/source/uielement/objectmenucontroller \ + framework/source/uielement/panelwindow \ + framework/source/uielement/panelwrapper \ framework/source/uielement/progressbarwrapper \ framework/source/uielement/recentfilesmenucontroller \ framework/source/uielement/spinfieldtoolbarcontroller \ diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk index 1bb5c43f6813..4cad926570de 100644 --- a/xmloff/Library_xo.mk +++ b/xmloff/Library_xo.mk @@ -179,6 +179,7 @@ $(eval $(call gb_Library_add_exception_objects,xo,\ xmloff/source/forms/officeforms \ xmloff/source/forms/propertyexport \ xmloff/source/forms/propertyimport \ + xmloff/source/forms/property_meta_data \ xmloff/source/forms/strings \ xmloff/source/forms/valueproperties \ xmloff/source/meta/MetaExportComponent \ From 134f045600ef3394fdde67bcdec079a44e005faf Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 26 Nov 2010 18:19:51 +0100 Subject: [PATCH 263/279] #i115804# Use PostUserEvent to execute code which needs the SolarMutex asynchronously. This prevents deadlocks where we are called from the single thread apartment clipboard code. --- sfx2/inc/sfx2/viewsh.hxx | 2 + sfx2/source/view/viewsh.cxx | 880 +++++++++++++++++++----------------- 2 files changed, 475 insertions(+), 407 deletions(-) diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx index ee8dfb1ca57c..8c6e4e09268d 100644 --- a/sfx2/inc/sfx2/viewsh.hxx +++ b/sfx2/inc/sfx2/viewsh.hxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "shell.hxx" #include @@ -293,6 +294,7 @@ public: void ExecPrint( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool, sal_Bool ); void AddRemoveClipboardListener( const com::sun::star::uno::Reference < com::sun::star::datatransfer::clipboard::XClipboardListener>&, BOOL ); + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardNotifier > GetClipboardNotifier(); #if _SOLAR__PRIVATE SAL_DLLPRIVATE SfxInPlaceClient* GetUIActiveIPClient_Impl() const; diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 968d0cbe8676..eb3a0801c845 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -44,7 +44,6 @@ #include #include #include -#include #include #include @@ -115,7 +114,9 @@ DBG_NAME(SfxViewShell) class SfxClipboardChangeListener : public ::cppu::WeakImplHelper1< datatransfer::clipboard::XClipboardListener > { - SfxViewShell* pViewShell; +public: + SfxClipboardChangeListener( SfxViewShell* pView, const uno::Reference< datatransfer::clipboard::XClipboardNotifier >& xClpbrdNtfr ); + virtual ~SfxClipboardChangeListener(); // XEventListener virtual void SAL_CALL disposing( const lang::EventObject& rEventObject ) @@ -125,21 +126,46 @@ class SfxClipboardChangeListener : public ::cppu::WeakImplHelper1< virtual void SAL_CALL changedContents( const datatransfer::clipboard::ClipboardEvent& rEventObject ) throw ( uno::RuntimeException ); -public: - SfxClipboardChangeListener( SfxViewShell* pView ); - virtual ~SfxClipboardChangeListener(); + void DisconnectViewShell() { m_pViewShell = NULL; } + void ChangedContents(); - void DisconnectViewShell() { pViewShell = NULL; } + enum AsyncExecuteCmd + { + ASYNCEXECUTE_CMD_DISPOSING, + ASYNCEXECUTE_CMD_CHANGEDCONTENTS + }; + + struct AsyncExecuteInfo + { + AsyncExecuteInfo( AsyncExecuteCmd eCmd, uno::Reference< datatransfer::clipboard::XClipboardListener > xThis, SfxClipboardChangeListener* pListener ) : + m_eCmd( eCmd ), m_xThis( xThis ), m_pListener( pListener ) {} + + AsyncExecuteCmd m_eCmd; + uno::Reference< datatransfer::clipboard::XClipboardListener > m_xThis; + SfxClipboardChangeListener* m_pListener; + }; + +private: + SfxViewShell* m_pViewShell; + uno::Reference< datatransfer::clipboard::XClipboardNotifier > m_xClpbrdNtfr; + uno::Reference< lang::XComponent > m_xCtrl; + + DECL_STATIC_LINK( SfxClipboardChangeListener, AsyncExecuteHdl_Impl, AsyncExecuteInfo* ); }; -SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView ) -: pViewShell( 0 ) +SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView, const uno::Reference< datatransfer::clipboard::XClipboardNotifier >& xClpbrdNtfr ) + : m_pViewShell( 0 ), m_xClpbrdNtfr( xClpbrdNtfr ) { - uno::Reference < lang::XComponent > xCtrl( pView->GetController(), uno::UNO_QUERY ); - if ( xCtrl.is() ) + m_xCtrl = uno::Reference < lang::XComponent >( pView->GetController(), uno::UNO_QUERY ); + if ( m_xCtrl.is() ) { - xCtrl->addEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) ); - pViewShell = pView; + m_xCtrl->addEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) ); + m_pViewShell = pView; + } + if ( m_xClpbrdNtfr.is() ) + { + m_xClpbrdNtfr->addClipboardListener( uno::Reference< datatransfer::clipboard::XClipboardListener >( + static_cast< datatransfer::clipboard::XClipboardListener* >( this ))); } } @@ -147,34 +173,68 @@ 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 ) +void SfxClipboardChangeListener::ChangedContents() { const ::vos::OGuard aGuard( Application::GetSolarMutex() ); - if( pViewShell ) + if( m_pViewShell ) { - SfxBindings& rBind = pViewShell->GetViewFrame()->GetBindings(); + SfxBindings& rBind = m_pViewShell->GetViewFrame()->GetBindings(); rBind.Invalidate( SID_PASTE ); rBind.Invalidate( SID_PASTE_SPECIAL ); rBind.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS ); } } +IMPL_STATIC_LINK_NOINSTANCE( SfxClipboardChangeListener, AsyncExecuteHdl_Impl, AsyncExecuteInfo*, pAsyncExecuteInfo ) +{ + if ( pAsyncExecuteInfo ) + { + uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( pAsyncExecuteInfo->m_xThis ); + if ( pAsyncExecuteInfo->m_pListener ) + { + if ( pAsyncExecuteInfo->m_eCmd == ASYNCEXECUTE_CMD_DISPOSING ) + pAsyncExecuteInfo->m_pListener->DisconnectViewShell(); + else if ( pAsyncExecuteInfo->m_eCmd == ASYNCEXECUTE_CMD_CHANGEDCONTENTS ) + pAsyncExecuteInfo->m_pListener->ChangedContents(); + } + } + delete pAsyncExecuteInfo; + + return 0; +} + +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 + uno::Reference< lang::XComponent > xCtrl( m_xCtrl ); + uno::Reference< datatransfer::clipboard::XClipboardNotifier > xNotify( m_xClpbrdNtfr ); + + uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( static_cast< datatransfer::clipboard::XClipboardListener* >( this )); + if ( xCtrl.is() ) + xCtrl->removeEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ))); + if ( xNotify.is() ) + xNotify->removeClipboardListener( xThis ); + + // Make asynchronous call to avoid locking SolarMutex which is the + // root for many deadlocks, especially in conjuction with the "Windows" + // based single thread apartment clipboard code! + AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_DISPOSING, xThis, this ); + Application::PostUserEvent( STATIC_LINK( 0, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo ); +} + +void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::clipboard::ClipboardEvent& ) + throw ( RuntimeException ) +{ + // Make asynchronous call to avoid locking SolarMutex which is the + // root for many deadlocks, especially in conjuction with the "Windows" + // based single thread apartment clipboard code! + uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( static_cast< datatransfer::clipboard::XClipboardListener* >( this )); + AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_CHANGEDCONTENTS, xThis, this ); + Application::PostUserEvent( STATIC_LINK( 0, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo ); +} + +//========================================================================= static ::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& rCommandURL, @@ -260,7 +320,7 @@ SfxViewShell_Impl::SfxViewShell_Impl(USHORT const nFlags) //========================================================================= SFX_IMPL_INTERFACE(SfxViewShell,SfxShell,SfxResId(0)) { - SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN ); + SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN ); } TYPEINIT2(SfxViewShell,SfxShell,SfxListener); @@ -379,27 +439,27 @@ enum ETypeFamily void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) { - const USHORT nId = rReq.GetSlot(); - switch( nId ) - { - case SID_STYLE_FAMILY : + const USHORT nId = rReq.GetSlot(); + switch( nId ) { - SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE); - if (pItem) + case SID_STYLE_FAMILY : + { + SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE); + if (pItem) { pImp->m_nFamily = pItem->GetValue(); } - break; - } + break; + } - case SID_STYLE_CATALOG: - { - SfxTemplateCatalog aCatalog( - SFX_APP()->GetTopWindow(), &GetViewFrame()->GetBindings()); - aCatalog.Execute(); + case SID_STYLE_CATALOG: + { + SfxTemplateCatalog aCatalog( + SFX_APP()->GetTopWindow(), &GetViewFrame()->GetBindings()); + aCatalog.Execute(); rReq.Ignore(); - break; - } + break; + } case SID_ACTIVATE_STYLE_APPLY: { com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame( @@ -459,85 +519,85 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) rReq.Done(); } break; - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_MAIL_SENDDOCASMS: - case SID_MAIL_SENDDOCASOOO: - case SID_MAIL_SENDDOCASPDF: - case SID_MAIL_SENDDOC: + case SID_MAIL_SENDDOCASMS: + case SID_MAIL_SENDDOCASOOO: + case SID_MAIL_SENDDOCASPDF: + case SID_MAIL_SENDDOC: case SID_MAIL_SENDDOCASFORMAT: - { - SfxObjectShell* pDoc = GetObjectShell(); - if ( pDoc && pDoc->QueryHiddenInformation( - WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES ) - break; + { + SfxObjectShell* pDoc = GetObjectShell(); + if ( pDoc && pDoc->QueryHiddenInformation( + WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES ) + break; - if ( SvtInternalOptions().MailUIEnabled() ) + if ( SvtInternalOptions().MailUIEnabled() ) { GetViewFrame()->SetChildWindow( SID_MAIL_CHILDWIN, TRUE ); } else { - SfxMailModel aModel; + SfxMailModel aModel; rtl::OUString aDocType; - SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, FALSE ); - if ( pMailSubject ) - aModel.SetSubject( pMailSubject->GetValue() ); + SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, FALSE ); + if ( pMailSubject ) + aModel.SetSubject( pMailSubject->GetValue() ); - SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, FALSE ); - if ( pMailRecipient ) - { - String aRecipient( pMailRecipient->GetValue() ); - String aMailToStr( String::CreateFromAscii( "mailto:" )); + SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, FALSE ); + if ( pMailRecipient ) + { + String aRecipient( pMailRecipient->GetValue() ); + String aMailToStr( String::CreateFromAscii( "mailto:" )); - if ( aRecipient.Search( aMailToStr ) == 0 ) - aRecipient = aRecipient.Erase( 0, aMailToStr.Len() ); - aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO ); - } + if ( aRecipient.Search( aMailToStr ) == 0 ) + aRecipient = aRecipient.Erase( 0, aMailToStr.Len() ); + aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO ); + } SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, FALSE ); if ( pMailDocType ) aDocType = pMailDocType->GetValue(); uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() ); - SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR; + SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR; if ( nId == SID_MAIL_SENDDOC ) - eResult = aModel.SaveAndSend( xFrame, rtl::OUString() ); - else - if ( nId == SID_MAIL_SENDDOCASPDF ) + eResult = aModel.SaveAndSend( xFrame, rtl::OUString() ); + else + if ( nId == SID_MAIL_SENDDOCASPDF ) eResult = aModel.SaveAndSend( xFrame, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "pdf_Portable_Document_Format" ))); else - if ( nId == SID_MAIL_SENDDOCASMS ) + if ( nId == SID_MAIL_SENDDOCASMS ) { aDocType = impl_searchFormatTypeForApp(xFrame, E_MS_DOC); if (aDocType.getLength() > 0) eResult = aModel.SaveAndSend( xFrame, aDocType ); } else - if ( nId == SID_MAIL_SENDDOCASOOO ) + if ( nId == SID_MAIL_SENDDOCASOOO ) { aDocType = impl_searchFormatTypeForApp(xFrame, E_OOO_DOC); if (aDocType.getLength() > 0) eResult = aModel.SaveAndSend( xFrame, aDocType ); } - if ( eResult == SfxMailModel::SEND_MAIL_ERROR ) - { - InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL )); - aBox.Execute(); + if ( eResult == SfxMailModel::SEND_MAIL_ERROR ) + { + InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL )); + aBox.Execute(); rReq.Ignore(); - } + } else rReq.Done(); - } + } - break; - } + break; + } - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_WEBHTML: - { + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + case SID_WEBHTML: + { static const char HTML_DOCUMENT_TYPE[] = "writer_web_HTML"; static const char HTML_GRAPHIC_TYPE[] = "graphic_HTML"; const sal_Int32 FILTERFLAG_EXPORT = 0x00000002; @@ -657,25 +717,25 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) ::rtl::OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" )), css::uno::UNO_QUERY ); - BOOL bRet( TRUE ); + BOOL bRet( TRUE ); if ( xSystemShellExecute.is() ) { try { - xSystemShellExecute->execute( - aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS ); + xSystemShellExecute->execute( + aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS ); } catch ( uno::Exception& ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Window *pParent = SFX_APP()->GetTopWindow(); - ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute(); + ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute(); bRet = FALSE; } } rReq.Done(bRet); - break; + break; } else { @@ -685,97 +745,97 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_PLUGINS_ACTIVE: - { - SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE); + case SID_PLUGINS_ACTIVE: + { + SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE); bool const bActive = (pShowItem) ? pShowItem->GetValue() : !pImp->m_bPlugInsActive; - // ggf. recorden - if ( !rReq.IsAPI() ) - rReq.AppendItem( SfxBoolItem( nId, bActive ) ); + // ggf. recorden + if ( !rReq.IsAPI() ) + rReq.AppendItem( SfxBoolItem( nId, bActive ) ); - // Jetzt schon DONE aufrufen, da die Argumente evtl. einen Pool - // benutzen, der demn"achst weg ist - rReq.Done(TRUE); + // Jetzt schon DONE aufrufen, da die Argumente evtl. einen Pool + // benutzen, der demn"achst weg ist + rReq.Done(TRUE); - // ausfuehren + // ausfuehren if (!pShowItem || (bActive != pImp->m_bPlugInsActive)) - { - SfxFrame* pTopFrame = &GetFrame()->GetTopFrame(); - if ( pTopFrame != &GetFrame()->GetFrame() ) - { - // FramesetDocument - SfxViewShell *pShell = pTopFrame->GetCurrentViewFrame()->GetViewShell(); - if ( pShell->GetInterface()->GetSlot( nId ) ) - pShell->ExecuteSlot( rReq ); - break; - } - - SfxFrameIterator aIter( *pTopFrame ); - while ( pTopFrame ) - { - if ( pTopFrame->GetCurrentViewFrame() ) - { - SfxViewShell *pView = pTopFrame->GetCurrentViewFrame()->GetViewShell(); - if ( pView ) { + SfxFrame* pTopFrame = &GetFrame()->GetTopFrame(); + if ( pTopFrame != &GetFrame()->GetFrame() ) + { + // FramesetDocument + SfxViewShell *pShell = pTopFrame->GetCurrentViewFrame()->GetViewShell(); + if ( pShell->GetInterface()->GetSlot( nId ) ) + pShell->ExecuteSlot( rReq ); + break; + } + + SfxFrameIterator aIter( *pTopFrame ); + while ( pTopFrame ) + { + if ( pTopFrame->GetCurrentViewFrame() ) + { + SfxViewShell *pView = pTopFrame->GetCurrentViewFrame()->GetViewShell(); + if ( pView ) + { pView->pImp->m_bPlugInsActive = bActive; Rectangle aVisArea = GetObjectShell()->GetVisArea(); VisAreaChanged(aVisArea); - // the plugins might need change in their state - SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(FALSE); - if ( pClients ) - { - for (USHORT n=0; n < pClients->Count(); n++) - { - SfxInPlaceClient* pIPClient = pClients->GetObject(n); - if ( pIPClient ) - pView->CheckIPClient_Impl( pIPClient, aVisArea ); + // the plugins might need change in their state + SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(FALSE); + if ( pClients ) + { + for (USHORT n=0; n < pClients->Count(); n++) + { + SfxInPlaceClient* pIPClient = pClients->GetObject(n); + if ( pIPClient ) + pView->CheckIPClient_Impl( pIPClient, aVisArea ); + } + } + } + } + + if ( !pTopFrame->GetParentFrame() ) + pTopFrame = aIter.FirstFrame(); + else + pTopFrame = aIter.NextFrame( *pTopFrame ); } - } } - } - if ( !pTopFrame->GetParentFrame() ) - pTopFrame = aIter.FirstFrame(); - else - pTopFrame = aIter.NextFrame( *pTopFrame ); + break; } - } - - break; } - } } //-------------------------------------------------------------------- void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) { - DBG_CHKTHIS(SfxViewShell, 0); + DBG_CHKTHIS(SfxViewShell, 0); - SfxWhichIter aIter( rSet ); - for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() ) - { - switch ( nSID ) + SfxWhichIter aIter( rSet ); + for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() ) { - case SID_STYLE_CATALOG: - { + switch ( nSID ) + { + case SID_STYLE_CATALOG: + { if ( !GetViewFrame()->KnowsChildWindow( SID_STYLE_DESIGNER ) ) - rSet.DisableItem( nSID ); - break; - } + rSet.DisableItem( nSID ); + break; + } - // Printer-Funktionen - case SID_PRINTDOC: - case SID_PRINTDOCDIRECT: - case SID_SETUPPRINTER: - case SID_PRINTER_NAME: - { + // Printer-Funktionen + case SID_PRINTDOC: + case SID_PRINTDOCDIRECT: + case SID_SETUPPRINTER: + case SID_PRINTER_NAME: + { bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks; - bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); + bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); if ( bEnabled ) { SfxPrinter *pPrinter = GetPrinter(FALSE); @@ -804,68 +864,68 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) } bEnabled = !pPrinter || !pPrinter->IsPrinting(); } - if ( !bEnabled ) - { - // will now be handled by requeing the request - /* rSet.DisableItem( SID_PRINTDOC ); - rSet.DisableItem( SID_PRINTDOCDIRECT ); - rSet.DisableItem( SID_SETUPPRINTER ); */ - } - break; - } + if ( !bEnabled ) + { + // will now be handled by requeing the request + /* rSet.DisableItem( SID_PRINTDOC ); + rSet.DisableItem( SID_PRINTDOCDIRECT ); + rSet.DisableItem( SID_SETUPPRINTER ); */ + } + break; + } - // Mail-Funktionen - case SID_MAIL_SENDDOCASPDF: - case SID_MAIL_SENDDOC: + // Mail-Funktionen + case SID_MAIL_SENDDOCASPDF: + case SID_MAIL_SENDDOC: case SID_MAIL_SENDDOCASFORMAT: - { + { BOOL bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN ); - if ( !bEnable ) - rSet.DisableItem( nSID ); - break; - } + if ( !bEnable ) + rSet.DisableItem( nSID ); + break; + } - // PlugIns running - case SID_PLUGINS_ACTIVE: - { + // PlugIns running + case SID_PLUGINS_ACTIVE: + { rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE, !pImp->m_bPlugInsActive) ); - break; - } + break; + } /* - // SelectionText - case SID_SELECTION_TEXT: - { - rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) ); - break; - } + // SelectionText + case SID_SELECTION_TEXT: + { + rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) ); + break; + } - // SelectionTextExt - case SID_SELECTION_TEXT_EXT: - { - rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(TRUE) ) ); - break; - } + // SelectionTextExt + case SID_SELECTION_TEXT_EXT: + { + rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(TRUE) ) ); + break; + } */ - case SID_STYLE_FAMILY : - { + case SID_STYLE_FAMILY : + { rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->m_nFamily ) ); - break; - } + break; + } + } } - } } //-------------------------------------------------------------------- void SfxViewShell::SetZoomFactor( const Fraction &rZoomX, - const Fraction &rZoomY ) + const Fraction &rZoomY ) { - DBG_ASSERT( GetWindow(), "no window" ); - MapMode aMap( GetWindow()->GetMapMode() ); - aMap.SetScaleX( rZoomX ); - aMap.SetScaleY( rZoomY ); - GetWindow()->SetMapMode( aMap ); + DBG_ASSERT( GetWindow(), "no window" ); + MapMode aMap( GetWindow()->GetMapMode() ); + aMap.SetScaleX( rZoomX ); + aMap.SetScaleY( rZoomY ); + GetWindow()->SetMapMode( aMap ); } //-------------------------------------------------------------------- @@ -873,37 +933,37 @@ ErrCode SfxViewShell::DoVerb(long /*nVerb*/) /* [Beschreibung] - Virtuelle Methode, um am selektierten Objekt ein Verb auszuf"uhren. + Virtuelle Methode, um am selektierten Objekt ein Verb auszuf"uhren. Da dieses Objekt nur den abgeleiteten Klassen bekannt ist, muss DoVerb dort "uberschrieben werden. */ { - return ERRCODE_SO_NOVERBS; + return ERRCODE_SO_NOVERBS; } //-------------------------------------------------------------------- void SfxViewShell::OutplaceActivated( sal_Bool bActive, SfxInPlaceClient* /*pClient*/ ) { - if ( !bActive ) - GetFrame()->GetFrame().Appear(); + if ( !bActive ) + GetFrame()->GetFrame().Appear(); } //-------------------------------------------------------------------- void SfxViewShell::InplaceActivating( SfxInPlaceClient* /*pClient*/ ) { - // TODO/LATER: painting of the bitmap can be stopped, it is required if CLIPCHILDREN problem #i25788# is not solved, - // but may be the bug will not affect the real office vcl windows, then it is not required + // TODO/LATER: painting of the bitmap can be stopped, it is required if CLIPCHILDREN problem #i25788# is not solved, + // but may be the bug will not affect the real office vcl windows, then it is not required } //-------------------------------------------------------------------- void SfxViewShell::InplaceDeactivated( SfxInPlaceClient* /*pClient*/ ) { - // TODO/LATER: paint the replacement image in normal way if the painting was stopped + // TODO/LATER: paint the replacement image in normal way if the painting was stopped } //-------------------------------------------------------------------- @@ -943,26 +1003,26 @@ SfxInPlaceClient* SfxViewShell::FindIPClient ) const { SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE); - if ( !pClients ) - return 0; + if ( !pClients ) + return 0; - if( !pObjParentWin ) - pObjParentWin = GetWindow(); - for (USHORT n=0; n < pClients->Count(); n++) - { - SfxInPlaceClient *pIPClient = (SfxInPlaceClient*) pClients->GetObject(n); + if( !pObjParentWin ) + pObjParentWin = GetWindow(); + for (USHORT n=0; n < pClients->Count(); n++) + { + SfxInPlaceClient *pIPClient = (SfxInPlaceClient*) pClients->GetObject(n); if ( pIPClient->GetObject() == xObj && pIPClient->GetEditWin() == pObjParentWin ) - return pIPClient; - } + return pIPClient; + } - return 0; + return 0; } //-------------------------------------------------------------------- SfxInPlaceClient* SfxViewShell::GetIPClient() const { - return GetUIActiveClient(); + return GetUIActiveClient(); } //-------------------------------------------------------------------- @@ -971,15 +1031,15 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const { // this method is needed as long as SFX still manages the border space for ChildWindows (see SfxFrame::Resize) SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE); - if ( !pClients ) - return 0; + if ( !pClients ) + return 0; - for (USHORT n=0; n < pClients->Count(); n++) - { + for (USHORT n=0; n < pClients->Count(); n++) + { SfxInPlaceClient* pIPClient = pClients->GetObject(n); if ( pIPClient->IsUIActive() ) return pIPClient; - } + } return NULL; } @@ -987,15 +1047,15 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const { SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE); - if ( !pClients ) - return 0; + if ( !pClients ) + return 0; - for (USHORT n=0; n < pClients->Count(); n++) - { + for (USHORT n=0; n < pClients->Count(); n++) + { SfxInPlaceClient* pIPClient = pClients->GetObject(n); if ( pIPClient->IsObjectUIActive() ) return pIPClient; - } + } return NULL; } @@ -1004,34 +1064,34 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const void SfxViewShell::Activate( BOOL bMDI ) { - DBG_CHKTHIS(SfxViewShell, 0); - if ( bMDI ) - { - SfxObjectShell *pSh = GetViewFrame()->GetObjectShell(); - if ( pSh->GetModel().is() ) - pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame().GetController() ); + DBG_CHKTHIS(SfxViewShell, 0); + if ( bMDI ) + { + SfxObjectShell *pSh = GetViewFrame()->GetObjectShell(); + if ( pSh->GetModel().is() ) + pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame().GetController() ); SetCurrentDocument(); - } + } } //-------------------------------------------------------------------- void SfxViewShell::Deactivate(BOOL /*bMDI*/) { - DBG_CHKTHIS(SfxViewShell, 0); + DBG_CHKTHIS(SfxViewShell, 0); } //-------------------------------------------------------------------- void SfxViewShell::AdjustPosSizePixel ( - const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window - const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se + const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window + const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se ) { - DBG_CHKTHIS(SfxViewShell, 0); + DBG_CHKTHIS(SfxViewShell, 0); } //-------------------------------------------------------------------- @@ -1040,18 +1100,18 @@ void SfxViewShell::Move() /* [Beschreibung] - Diese virtuelle Methode wird gerufen, wenn das Fenster, in dem die - SfxViewShell dargestellt wird eine StarView-Move() Nachricht erh"alt. + Diese virtuelle Methode wird gerufen, wenn das Fenster, in dem die + SfxViewShell dargestellt wird eine StarView-Move() Nachricht erh"alt. - Die Basisimplementierung braucht nicht gerufen zu werden. + Die Basisimplementierung braucht nicht gerufen zu werden. - [Anmerkung] + [Anmerkung] - Diese Methode kann dazu verwendet werden, eine Selektion abzubrechen, - um durch das Moven des Fensters erzeugte Maus-Bewegungen anzufangen. + Diese Methode kann dazu verwendet werden, eine Selektion abzubrechen, + um durch das Moven des Fensters erzeugte Maus-Bewegungen anzufangen. - Zur Zeit funktioniert die Benachrichtigung nicht In-Place. + Zur Zeit funktioniert die Benachrichtigung nicht In-Place. */ { @@ -1061,102 +1121,102 @@ void SfxViewShell::Move() void SfxViewShell::OuterResizePixel ( - const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window - const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se + const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window + const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se ) /* [Beschreibung] Diese Methode muss ueberladen werden, um auf "Anderungen der Groesse - der View zu reagieren. Dabei definieren wir die View als das Edit-Window - zuz"uglich der um das Edit-Window angeordnenten Tools (z.B. Lineale). + der View zu reagieren. Dabei definieren wir die View als das Edit-Window + zuz"uglich der um das Edit-Window angeordnenten Tools (z.B. Lineale). - Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. + Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. - Die Vis-Area der SfxObjectShell, dessen Skalierung und Position - d"urfen hier ver"andert werden. Der Hauptanwendungsfall ist dabei, - das Ver"andern der Gr"o\se der Vis-Area. + Die Vis-Area der SfxObjectShell, dessen Skalierung und Position + d"urfen hier ver"andert werden. Der Hauptanwendungsfall ist dabei, + das Ver"andern der Gr"o\se der Vis-Area. - "Andert sich durch die neue Berechnung der Border, so mu\s dieser - mit gesetzt werden. - Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von - Tools erlaubt. + "Andert sich durch die neue Berechnung der Border, so mu\s dieser + mit gesetzt werden. + Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von + Tools erlaubt. - [Beispiel] + [Beispiel] - void AppViewSh::OuterViewResizePixel( const Point &rOfs, const Size &rSz ) - { - // Tool-Positionen und Gr"o\sen von au\sen berechnen, NICHT setzen! - // (wegen folgender Border-Berechnung) - Point aHLinPos...; Size aHLinSz...; - ... + void AppViewSh::OuterViewResizePixel( const Point &rOfs, const Size &rSz ) + { + // Tool-Positionen und Gr"o\sen von au\sen berechnen, NICHT setzen! + // (wegen folgender Border-Berechnung) + Point aHLinPos...; Size aHLinSz...; + ... - // Border f"ur Tools passend zu rSize berechnen und setzen - SvBorder aBorder... - SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt + // Border f"ur Tools passend zu rSize berechnen und setzen + SvBorder aBorder... + SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt - // Tools anordnen - pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); - ... - } + // Tools anordnen + pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); + ... + } - [Querverweise] + [Querverweise] - + */ { - DBG_CHKTHIS(SfxViewShell, 0); - SetBorderPixel( SvBorder() ); + DBG_CHKTHIS(SfxViewShell, 0); + SetBorderPixel( SvBorder() ); } //-------------------------------------------------------------------- void SfxViewShell::InnerResizePixel ( - const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window - const Size& /*rSize*/ // dem Edit-Win zur Verf"ugung stehende Gr"o\se + const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window + const Size& /*rSize*/ // dem Edit-Win zur Verf"ugung stehende Gr"o\se ) /* [Beschreibung] Diese Methode muss ueberladen werden, um auf "Anderungen der Groesse - des Edit-Windows zu reagieren. + des Edit-Windows zu reagieren. - Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. - Weder die Vis-Area der SfxObjectShell noch dessen Skalierung oder - Position d"urfen ver"andert werden. + Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. + Weder die Vis-Area der SfxObjectShell noch dessen Skalierung oder + Position d"urfen ver"andert werden. - "Andert sich durch die neue Berechnung der Border, so mu\s dieser - mit gesetzt werden. - Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von - Tools erlaubt. + "Andert sich durch die neue Berechnung der Border, so mu\s dieser + mit gesetzt werden. + Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von + Tools erlaubt. - [Beispiel] + [Beispiel] - void AppViewSh::InnerViewResizePixel( const Point &rOfs, const Size &rSz ) - { - // Tool-Positionen und Gr"o\sen von innen berechnen, NICHT setzen! - // (wegen folgender Border-Berechnung) - Point aHLinPos...; Size aHLinSz...; - ... + void AppViewSh::InnerViewResizePixel( const Point &rOfs, const Size &rSz ) + { + // Tool-Positionen und Gr"o\sen von innen berechnen, NICHT setzen! + // (wegen folgender Border-Berechnung) + Point aHLinPos...; Size aHLinSz...; + ... - // Border f"ur Tools passend zu rSz berechnen und setzen - SvBorder aBorder... - SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt + // Border f"ur Tools passend zu rSz berechnen und setzen + SvBorder aBorder... + SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt - // Tools anordnen - pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); - ... - } + // Tools anordnen + pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); + ... + } - [Querverweise] + [Querverweise] - + */ { @@ -1216,11 +1276,11 @@ void SfxViewShell::SetWindow /* [Beschreibung] - Mit dieser Methode wird der SfxViewShell das Datenfenster mitgeteilt. - Dieses wird f"ur den In-Place-Container und f"ur das korrekte - Wiederherstellen des Focus ben"otigt. + Mit dieser Methode wird der SfxViewShell das Datenfenster mitgeteilt. + Dieses wird f"ur den In-Place-Container und f"ur das korrekte + Wiederherstellen des Focus ben"otigt. - Selbst In-Place-aktiv ist das Umsetzen des ViewPort-Windows verboten. + Selbst In-Place-aktiv ist das Umsetzen des ViewPort-Windows verboten. */ { @@ -1245,9 +1305,9 @@ void SfxViewShell::SetWindow if ( bHadFocus && pWindow ) pWindow->GrabFocus(); - //TODO/CLEANUP - //brauchen wir die Methode doch noch?! - //SFX_APP()->GrabFocus( pWindow ); + //TODO/CLEANUP + //brauchen wir die Methode doch noch?! + //SFX_APP()->GrabFocus( pWindow ); } //-------------------------------------------------------------------- @@ -1262,18 +1322,17 @@ Size SfxViewShell::GetOptimalSizePixel() const SfxViewShell::SfxViewShell ( - SfxViewFrame* pViewFrame, /* , in dem diese View - dargestellt wird */ + SfxViewFrame* pViewFrame, /* , in dem diese View dargestellt wird */ USHORT nFlags /* siehe */ ) : SfxShell(this) , pImp( new SfxViewShell_Impl(nFlags) ) - ,pIPClientList( 0 ) - ,pFrame(pViewFrame) - ,pSubShell(0) - ,pWindow(0) - ,bNoNewWindow( 0 != (nFlags & SFX_VIEW_NO_NEWWINDOW) ) + ,pIPClientList( 0 ) + ,pFrame(pViewFrame) + ,pSubShell(0) + ,pWindow(0) + ,bNoNewWindow( 0 != (nFlags & SFX_VIEW_NO_NEWWINDOW) ) { DBG_CTOR(SfxViewShell, 0); @@ -1382,12 +1441,12 @@ SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController ) SdrView* SfxViewShell::GetDrawView() const -/* [Beschreibung] +/* [Beschreibung] - Diese virtuelle Methode mu\s von den Subklassen "uberladen werden, wenn - der Property-Editor zur Verf"ugung stehen soll. + Diese virtuelle Methode mu\s von den Subklassen "uberladen werden, wenn + der Property-Editor zur Verf"ugung stehen soll. - Die Default-Implementierung liefert immer 0. + Die Default-Implementierung liefert immer 0. */ { @@ -1398,27 +1457,27 @@ SdrView* SfxViewShell::GetDrawView() const String SfxViewShell::GetSelectionText ( - BOOL /*bCompleteWords*/ /* FALSE (default) - Nur der tats"achlich selektierte Text wird - zur"uckgegeben. + BOOL /*bCompleteWords*/ /* FALSE (default) + Nur der tats"achlich selektierte Text wird + zur"uckgegeben. - TRUE - Der selektierte Text wird soweit erweitert, - da\s nur ganze W"orter zur"uckgegeben werden. - Als Worttrenner gelten White-Spaces und die + TRUE + Der selektierte Text wird soweit erweitert, + da\s nur ganze W"orter zur"uckgegeben werden. + Als Worttrenner gelten White-Spaces und die Satzzeichen ".,;" sowie einfache und doppelte - Anf"uhrungszeichen. - */ + Anf"uhrungszeichen. + */ ) /* [Beschreibung] - Diese Methode kann von Anwendungsprogrammierer "uberladen werden, - um einen Text zur"uckzuliefern, der in der aktuellen Selektion - steht. Dieser wird z.B. beim Versenden (email) verwendet. + Diese Methode kann von Anwendungsprogrammierer "uberladen werden, + um einen Text zur"uckzuliefern, der in der aktuellen Selektion + steht. Dieser wird z.B. beim Versenden (email) verwendet. Mit "CompleteWords == TRUE" ger"ufen, reicht z.B. auch der Cursor, - der in einer URL steht, um die gesamte URL zu liefern. + der in einer URL steht, um die gesamte URL zu liefern. */ { @@ -1431,9 +1490,9 @@ BOOL SfxViewShell::HasSelection( BOOL ) const /* [Beschreibung] - Mit dieser virtuellen Methode kann z.B. ein Dialog abfragen, ob in der - aktuellen View etwas selektiert ist. Wenn der Parameter TRUE ist, - wird abgefragt, ob Text selektiert ist. + Mit dieser virtuellen Methode kann z.B. ein Dialog abfragen, ob in der + aktuellen View etwas selektiert ist. Wenn der Parameter TRUE ist, + wird abgefragt, ob Text selektiert ist. */ { @@ -1446,16 +1505,16 @@ void SfxViewShell::SetSubShell( SfxShell *pShell ) /* [Beschreibung] - Mit dieser Methode kann eine Selektions- oder Cursor-Shell angemeldet - werden, die automatisch unmittelbar nach der SfxViewShell auf den - SfxDispatcher gepusht wird, und automatisch umittelbar vor ihr - gepoppt wird. + Mit dieser Methode kann eine Selektions- oder Cursor-Shell angemeldet + werden, die automatisch unmittelbar nach der SfxViewShell auf den + SfxDispatcher gepusht wird, und automatisch umittelbar vor ihr + gepoppt wird. - Ist die SfxViewShell-Instanz bereits gepusht, dann wird pShell - sofort ebenfalls gepusht. Wird mit SetSubShell eine andere SfxShell - Instanz angemeldet, als vorher angemeldet war, wird die zuvor angemeldete - ggf. automatisch gepoppt. Mit pShell==0 kann daher die aktuelle - Sub-Shell abgemeldet werden. + Ist die SfxViewShell-Instanz bereits gepusht, dann wird pShell + sofort ebenfalls gepusht. Wird mit SetSubShell eine andere SfxShell + Instanz angemeldet, als vorher angemeldet war, wird die zuvor angemeldete + ggf. automatisch gepoppt. Mit pShell==0 kann daher die aktuelle + Sub-Shell abgemeldet werden. */ { @@ -1557,6 +1616,7 @@ void SfxViewShell::ReadUserData(const String&, BOOL ) void SfxViewShell::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool ) { } + void SfxViewShell::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool ) { } @@ -1567,8 +1627,8 @@ void SfxViewShell::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::c SfxViewShell* SfxViewShell::GetFirst ( - const TypeId* pType, - BOOL bOnlyVisible + const TypeId* pType, + BOOL bOnlyVisible ) { // search for a SfxViewShell of the specified type @@ -1702,24 +1762,24 @@ FASTBOOL SfxViewShell::KeyInput( const KeyEvent &rKeyEvent ) /* [Beschreibung] - Diese Methode f"uhrt das KeyEvent 'rKeyEvent' "uber die an dieser - SfxViewShell direkt oder indirekt (z.B. via Applikation) konfigurierten - Tasten (Accelerator) aus. + Diese Methode f"uhrt das KeyEvent 'rKeyEvent' "uber die an dieser + SfxViewShell direkt oder indirekt (z.B. via Applikation) konfigurierten + Tasten (Accelerator) aus. - [R"uckgabewert] + [R"uckgabewert] - FASTBOOL TRUE - die Taste ist konfiguriert, der betreffende - Handler wurde gerufen + FASTBOOL TRUE + die Taste ist konfiguriert, der betreffende + Handler wurde gerufen - FALSE - die Taste ist nicht konfiguriert, es konnte - also kein Handler gerufen werden + FALSE + die Taste ist nicht konfiguriert, es konnte + also kein Handler gerufen werden - [Querverweise] - + [Querverweise] + */ { return ExecKey_Impl(rKeyEvent); @@ -1736,9 +1796,9 @@ void SfxViewShell::ShowCursor( FASTBOOL /*bOn*/ ) /* [Beschreibung] - Diese Methode mu\s von Subklassen "uberladen werden, damit vom SFx - aus der Cursor ein- und ausgeschaltet werden kann. Dies geschieht - z.B. bei laufendem . + Diese Methode mu\s von Subklassen "uberladen werden, damit vom SFx + aus der Cursor ein- und ausgeschaltet werden kann. Dies geschieht + z.B. bei laufendem . */ { @@ -1750,15 +1810,15 @@ void SfxViewShell::GotFocus() const /* [Beschreibung] - Diese Methode mu\s vom Applikationsentwickler gerufen werden, wenn - das Edit-Window den Focus erhalten hat. Der SFx hat so z.B. die - M"oglichkeit, den Accelerator einzuschalten. + Diese Methode mu\s vom Applikationsentwickler gerufen werden, wenn + das Edit-Window den Focus erhalten hat. Der SFx hat so z.B. die + M"oglichkeit, den Accelerator einzuschalten. - [Anmerkung] + [Anmerkung] - liefert leider keine M"oglichkeit, solche Events - 'von der Seite' einzuh"angen. + liefert leider keine M"oglichkeit, solche Events + 'von der Seite' einzuh"angen. */ { @@ -1838,10 +1898,10 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan // this method is called when either a client is created or the "Edit/Plugins" checkbox is checked if ( !pIPClient->IsObjectInPlaceActive() && pImp->m_bPlugInsActive ) { - // object in client is currently not active - // check if the object wants to be activated always or when it becomes at least partially visible - // TODO/LATER: maybe we should use the scaled area instead of the ObjArea?! - if ( bAlwaysActive || (bActiveWhenVisible && rVisArea.IsOver(pIPClient->GetObjArea())) ) + // object in client is currently not active + // check if the object wants to be activated always or when it becomes at least partially visible + // TODO/LATER: maybe we should use the scaled area instead of the ObjArea?! + if ( bAlwaysActive || (bActiveWhenVisible && rVisArea.IsOver(pIPClient->GetObjArea())) ) { try { @@ -1854,11 +1914,11 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan } else if (!pImp->m_bPlugInsActive) { - // object in client is currently active and "Edit/Plugins" checkbox is selected - // check if the object wants to be activated always or when it becomes at least partially visible + // object in client is currently active and "Edit/Plugins" checkbox is selected + // check if the object wants to be activated always or when it becomes at least partially visible // in this case selecting of the "Edit/Plugin" checkbox should let such objects deactivate - if ( bAlwaysActive || bActiveWhenVisible ) - pIPClient->GetObject()->changeState( embed::EmbedStates::RUNNING ); + if ( bAlwaysActive || bActiveWhenVisible ) + pIPClient->GetObject()->changeState( embed::EmbedStates::RUNNING ); } } @@ -1874,9 +1934,9 @@ void SfxViewShell::DiscardClients_Impl() /* [Beschreibung] - Diese Methode dient dazu, vor dem Schlie\sen eines Dokuments das - Speichern der Objekte zu verhindern, wenn der Benutzer Schlie\en ohne - Speichern gew"ahlt hatte. + Diese Methode dient dazu, vor dem Schlie\sen eines Dokuments das + Speichern der Objekte zu verhindern, wenn der Benutzer Schlie\en ohne + Speichern gew"ahlt hatte. */ { @@ -1982,9 +2042,9 @@ void SfxViewShell::JumpToMark( const String& rMark ) { SfxStringItem aMarkItem( SID_JUMPTOMARK, rMark ); GetViewFrame()->GetDispatcher()->Execute( - SID_JUMPTOMARK, - SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, - &aMarkItem, 0L ); + SID_JUMPTOMARK, + SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, + &aMarkItem, 0L ); } //------------------------------------------------------------------------ @@ -2005,8 +2065,7 @@ void SfxViewShell::SetController( SfxBaseController* pController ) if ( pImp->xClipboardListener.is() ) pImp->xClipboardListener->DisconnectViewShell(); - pImp->xClipboardListener = new SfxClipboardChangeListener( this ); - AddRemoveClipboardListener( pImp->xClipboardListener.get(), TRUE ); + pImp->xClipboardListener = new SfxClipboardChangeListener( this, GetClipboardNotifier() ); } Reference < XController > SfxViewShell::GetController() @@ -2072,19 +2131,19 @@ void Change( Menu* pMenu, SfxViewShell* pView ) } -BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ::com::sun::star::ui::ContextMenuExecuteEvent aEvent ) +BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ui::ContextMenuExecuteEvent aEvent ) { rpOut = NULL; BOOL bModified = FALSE; // create container from menu - // #110897# + // #110897# // aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu( &rIn ); aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu( ::comphelper::getProcessServiceFactory(), &rIn, &rMenuIdentifier ); // get selection from controller - aEvent.Selection = ::com::sun::star::uno::Reference < ::com::sun::star::view::XSelectionSupplier > ( GetController(), ::com::sun::star::uno::UNO_QUERY ); + aEvent.Selection = uno::Reference < view::XSelectionSupplier > ( GetController(), uno::UNO_QUERY ); // call interceptors ::cppu::OInterfaceIteratorHelper aIt( pImp->aInterceptorContainer ); @@ -2092,22 +2151,22 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& { try { - ::com::sun::star::ui::ContextMenuInterceptorAction eAction = - ((::com::sun::star::ui::XContextMenuInterceptor*)aIt.next())->notifyContextMenuExecute( aEvent ); + ui::ContextMenuInterceptorAction eAction = + ((ui::XContextMenuInterceptor*)aIt.next())->notifyContextMenuExecute( aEvent ); switch ( eAction ) { - case ::com::sun::star::ui::ContextMenuInterceptorAction_CANCELLED : + case ui::ContextMenuInterceptorAction_CANCELLED : // interceptor does not want execution return FALSE; - case ::com::sun::star::ui::ContextMenuInterceptorAction_EXECUTE_MODIFIED : + case ui::ContextMenuInterceptorAction_EXECUTE_MODIFIED : // interceptor wants his modified menu to be executed bModified = TRUE; break; - case ::com::sun::star::ui::ContextMenuInterceptorAction_CONTINUE_MODIFIED : + case ui::ContextMenuInterceptorAction_CONTINUE_MODIFIED : // interceptor has modified menu, but allows for calling other interceptors bModified = TRUE; continue; - case ::com::sun::star::ui::ContextMenuInterceptorAction_IGNORED : + case ui::ContextMenuInterceptorAction_IGNORED : // interceptor is indifferent continue; default: @@ -2115,7 +2174,7 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& continue; } } - catch( ::com::sun::star::uno::RuntimeException& ) + catch( uno::RuntimeException& ) { aIt.remove(); } @@ -2154,8 +2213,8 @@ void SfxViewShell::CheckOwnerShip_Impl() BOOL bSuccess = FALSE; if (pImp->m_bGotOwnership) { - com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xModel( - GetObjectShell()->GetModel(), com::sun::star::uno::UNO_QUERY ); + uno::Reference < util::XCloseable > xModel( + GetObjectShell()->GetModel(), uno::UNO_QUERY ); if ( xModel.is() ) { try @@ -2164,7 +2223,7 @@ void SfxViewShell::CheckOwnerShip_Impl() xModel->close( sal_True ); bSuccess = TRUE; } - catch ( com::sun::star::util::CloseVetoException& ) + catch ( util::CloseVetoException& ) { } } @@ -2173,15 +2232,15 @@ void SfxViewShell::CheckOwnerShip_Impl() if (!bSuccess && pImp->m_bGotFrameOwnership) { // document couldn't be closed or it shouldn't, now try at least to close the frame - com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xFrame( - GetViewFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY ); + uno::Reference < util::XCloseable > xFrame( + GetViewFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY ); if ( xFrame.is() ) { try { xFrame->close( sal_True ); } - catch ( com::sun::star::util::CloseVetoException& ) + catch ( util::CloseVetoException& ) { } } @@ -2191,9 +2250,7 @@ void SfxViewShell::CheckOwnerShip_Impl() long SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent& rEvent ) { if (pImp->m_pController.is()) - { return pImp->m_pController->HandleEvent_Impl( rEvent ); - } return 0; } @@ -2212,7 +2269,7 @@ BOOL SfxViewShell::HasMouseClickListeners_Impl() void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts ) { pImp->aPrintOpts = rOpts; -// GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) ); +// GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) ); } BOOL SfxViewShell::Escape() @@ -2228,11 +2285,20 @@ Reference< view::XRenderable > SfxViewShell::GetRenderable() { Reference< frame::XModel > xModel( pObj->GetModel() ); if( xModel.is() ) - xRender = Reference< view::XRenderable >( xModel, UNO_QUERY ); + xRender = Reference< view::XRenderable >( xModel, UNO_QUERY ); } return xRender; } +uno::Reference< datatransfer::clipboard::XClipboardNotifier > SfxViewShell::GetClipboardNotifier() +{ + uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClipboardNotifier; + if ( GetViewFrame() ) + xClipboardNotifier = uno::Reference< datatransfer::clipboard::XClipboardNotifier >( GetViewFrame()->GetWindow().GetClipboard(), uno::UNO_QUERY ); + + return xClipboardNotifier; +} + void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, BOOL bAdd ) { try From c926c86c914574ec94e809c14392c86e2c54cb04 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 29 Nov 2010 13:41:51 +0100 Subject: [PATCH 264/279] CWS gnumake2: fix some build breakers in svtools, xmloff and framework --- framework/Library_fwk.mk | 1 + framework/Library_fwl.mk | 2 - framework/inc/services/layoutmanager.hxx | 1 - framework/source/classes/fwktabwindow.cxx | 6 +-- .../source/layoutmanager/layoutmanager.cxx | 2 +- .../layoutmanager/toolbarlayoutmanager.hxx | 2 +- .../source/register/registerservices.cxx | 4 +- framework/source/register/registertemp.cxx | 2 - xmloff/Library_xo.mk | 4 ++ .../forms => inc}/form_handler_factory.hxx | 0 .../forms => inc}/property_handler.hxx | 0 xmloff/{source/forms => inc}/property_ids.hxx | 0 xmloff/prj/build.lst | 2 +- .../forms/handler => qa/unoapi}/makefile.mk | 47 ++++++++----------- xmloff/source/forms/property_meta_data.cxx | 2 +- 15 files changed, 34 insertions(+), 41 deletions(-) rename xmloff/{source/forms => inc}/form_handler_factory.hxx (100%) rename xmloff/{source/forms => inc}/property_handler.hxx (100%) rename xmloff/{source/forms => inc}/property_ids.hxx (100%) rename xmloff/{source/forms/handler => qa/unoapi}/makefile.mk (66%) mode change 100755 => 100644 diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index c6bc71fadd6d..50c16b83b42a 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -71,6 +71,7 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/accelerators/storageholder \ framework/source/classes/droptargetlistener \ framework/source/classes/framecontainer \ + framework/source/classes/fwktabwindow \ framework/source/classes/menumanager \ framework/source/classes/taskcreator \ framework/source/constant/containerquery \ diff --git a/framework/Library_fwl.mk b/framework/Library_fwl.mk index 1169bb750883..d2002115eaf0 100644 --- a/framework/Library_fwl.mk +++ b/framework/Library_fwl.mk @@ -57,7 +57,6 @@ $(eval $(call gb_Library_add_linked_libs,fwl,\ )) $(eval $(call gb_Library_add_exception_objects,fwl,\ - framework/source/classes/fwktabwindow \ framework/source/classes/fwlresid \ framework/source/dispatch/mailtodispatcher \ framework/source/dispatch/oxt_handler \ @@ -69,7 +68,6 @@ $(eval $(call gb_Library_add_exception_objects,fwl,\ framework/source/services/dispatchhelper \ framework/source/services/license \ framework/source/services/mediatypedetectionhelper \ - framework/source/services/tabwindowservice \ framework/source/services/uriabbreviation \ framework/source/uielement/fontmenucontroller \ framework/source/uielement/fontsizemenucontroller \ diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 7fcbf4398efe..0110a0b40b9e 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index aa550807460c..a441f251a592 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -30,7 +30,7 @@ #include #include "framework.hrc" -#include +#include #include #include @@ -205,9 +205,9 @@ void FwkTabPage::Resize() FwkTabWindow::FwkTabWindow( Window* pParent ) : - Window( pParent, FwlResId( WIN_TABWINDOW ) ), + Window( pParent, FwkResId( WIN_TABWINDOW ) ), - m_aTabCtrl ( this, FwlResId( TC_TABCONTROL ) ) + m_aTabCtrl ( this, FwkResId( TC_TABCONTROL ) ) { uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); m_xWinProvider = uno::Reference < awt::XContainerWindowProvider >( diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index d726d574d76d..4106e9d67353 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index baf6f088cc2e..df6b36020f93 100755 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx index 4f078d9ab50d..fe9dfe2ee573 100644 --- a/framework/source/register/registerservices.cxx +++ b/framework/source/register/registerservices.cxx @@ -54,7 +54,7 @@ =================================================================================================================*/ #include #include -//#include +#include #include #include //#include @@ -169,7 +169,7 @@ COMPONENTGETFACTORY ( IFFACTORY( ::framework::URLTransformer IFFACTORY( ::framework::LangSelectionStatusbarController ) else //IFFACTORY( ::framework::LanguageSelectionMenuController ) else IFFACTORY( ::framework::WindowContentFactoryManager ) else - //IFFACTORY( ::framework::TabWindowService ) else + IFFACTORY( ::framework::TabWindowService ) else IFFACTORY( ::framework::SubstitutePathVariables ) else IFFACTORY( ::framework::PathSettings ) ) diff --git a/framework/source/register/registertemp.cxx b/framework/source/register/registertemp.cxx index 111b3550559d..59444093d53e 100644 --- a/framework/source/register/registertemp.cxx +++ b/framework/source/register/registertemp.cxx @@ -65,7 +65,6 @@ #include #include #include -#include #include #include #include @@ -86,7 +85,6 @@ COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper IFFACTORY( ::framework::License ) else IFFACTORY( ::framework::PopupMenuDispatcher ) else IFFACTORY( ::framework::DispatchHelper ) else - IFFACTORY( ::framework::TabWindowService ) else IFFACTORY( ::framework::DispatchRecorder ) else IFFACTORY( ::framework::DispatchRecorderSupplier ) else IFFACTORY( ::framework::SimpleTextStatusbarController ) else diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk index 4cad926570de..2e335b4175c4 100644 --- a/xmloff/Library_xo.mk +++ b/xmloff/Library_xo.mk @@ -182,6 +182,10 @@ $(eval $(call gb_Library_add_exception_objects,xo,\ xmloff/source/forms/property_meta_data \ xmloff/source/forms/strings \ xmloff/source/forms/valueproperties \ + xmloff/source/forms/handler/form_handler_factory \ + xmloff/source/forms/handler/property_handler_base \ + xmloff/source/forms/handler/vcl_date_handler \ + xmloff/source/forms/handler/vcl_time_handler \ xmloff/source/meta/MetaExportComponent \ xmloff/source/meta/MetaImportComponent \ xmloff/source/meta/xmlmetae \ diff --git a/xmloff/source/forms/form_handler_factory.hxx b/xmloff/inc/form_handler_factory.hxx similarity index 100% rename from xmloff/source/forms/form_handler_factory.hxx rename to xmloff/inc/form_handler_factory.hxx diff --git a/xmloff/source/forms/property_handler.hxx b/xmloff/inc/property_handler.hxx similarity index 100% rename from xmloff/source/forms/property_handler.hxx rename to xmloff/inc/property_handler.hxx diff --git a/xmloff/source/forms/property_ids.hxx b/xmloff/inc/property_ids.hxx similarity index 100% rename from xmloff/source/forms/property_ids.hxx rename to xmloff/inc/property_ids.hxx diff --git a/xmloff/prj/build.lst b/xmloff/prj/build.lst index 967214d6f0e9..6f677525dbbb 100644 --- a/xmloff/prj/build.lst +++ b/xmloff/prj/build.lst @@ -1,5 +1,5 @@ xo xmloff : offapi svl vos NULL zxo xmloff\prj nmake - all xo_prj NULL -xo xmloff\qa\unoapi nmake - all xo_qa_unoapi xo_prj NULL +xo xmloff\qa\unoapi nmake - all xo_qa_unoapi NULL diff --git a/xmloff/source/forms/handler/makefile.mk b/xmloff/qa/unoapi/makefile.mk old mode 100755 new mode 100644 similarity index 66% rename from xmloff/source/forms/handler/makefile.mk rename to xmloff/qa/unoapi/makefile.mk index 574537ffd474..3cbbc5f2a797 --- a/xmloff/source/forms/handler/makefile.mk +++ b/xmloff/qa/unoapi/makefile.mk @@ -1,7 +1,6 @@ #************************************************************************* -# # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite @@ -22,34 +21,28 @@ # version 3 along with OpenOffice.org. If not, see # # for a copy of the LGPLv3 License. -# -#************************************************************************* +#***********************************************************************/ -PRJ=../../.. +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE -PRJNAME=xmloff -TARGET=form_handlers +PRJ = ../.. +PRJNAME = xmloff +TARGET = qa_unoapi -INCEXT=.. +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = org/openoffice/xmloff/qa/unoapi +JAVATESTFILES = Test.java +JAVAFILES = $(JAVATESTFILES) +JARFILES = OOoRunner.jar ridl.jar test.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) +.END -ENABLE_EXCEPTIONS=TRUE +.INCLUDE: settings.mk +.INCLUDE: target.mk +.INCLUDE: installationtest.mk -# --- Settings ----------------------------------------------------- +ALLTAR : javatest -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)/util/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)/form_handler_factory.obj \ - $(SLO)/property_handler_base.obj \ - $(SLO)/vcl_date_handler.obj \ - $(SLO)/vcl_time_handler.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -test: - echo $(INCLUDE) \ No newline at end of file +.END diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx index 7f058d14b9b7..7dd5277cff28 100755 --- a/xmloff/source/forms/property_meta_data.cxx +++ b/xmloff/source/forms/property_meta_data.cxx @@ -30,7 +30,7 @@ #include "form_handler_factory.hxx" #include "strings.hxx" #include "xmloff/xmltoken.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include #include From e67dff5f52daeaf9d27ada4d13ba56b3c5980eca Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 29 Nov 2010 14:39:12 +0100 Subject: [PATCH 265/279] CWS gnumake2: fix for build breaker in sfx2 --- sfx2/source/appl/appuno.cxx | 368 ++++++++++++++++++---------------- sfx2/source/inc/fltoptint.hxx | 3 + 2 files changed, 201 insertions(+), 170 deletions(-) diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index d3a75f18e881..a0d576ca40da 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -53,6 +53,7 @@ #include #include #include + #include #include #include @@ -104,9 +105,6 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::io; -#ifndef GCC -#endif - #include "sfxtypes.hxx" #include #include @@ -129,7 +127,7 @@ using namespace ::com::sun::star::io; #include "fltoptint.hxx" #include #include -#include "sfx2/brokenpackageint.hxx" +#include #include "eventsupplier.hxx" #include "xpackcreator.hxx" #include "plugin.hxx" @@ -137,7 +135,6 @@ using namespace ::com::sun::star::io; #include #include "SfxDocumentMetaData.hxx" - #define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader" #define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler" @@ -465,15 +462,15 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque for ( sal_uInt16 n=0; n xFrame; OSL_VERIFY( rProp.Value >>= xFrame ); rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) ); } else - if ( aName == sHidden ) + if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) { sal_Bool bVal = sal_False; if (rProp.Value >>= bVal) @@ -490,18 +487,18 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque ++nFoundArgs; #endif const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n]; - String aName = rProp.Name; - if ( aName == sModel ) + rtl::OUString aName = rProp.Name; + if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sModel)) ) rSet.Put( SfxUnoAnyItem( SID_DOCUMENT, rProp.Value ) ); - else if ( aName == sComponentData ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentData)) ) { rSet.Put( SfxUnoAnyItem( SID_COMPONENTDATA, rProp.Value ) ); } - else if ( aName == sComponentContext ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentContext)) ) { rSet.Put( SfxUnoAnyItem( SID_COMPONENTCONTEXT, rProp.Value ) ); } - else if ( aName == sStatusInd ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStatusInd)) ) { Reference< ::com::sun::star::task::XStatusIndicator > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -509,7 +506,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_PROGRESS_STATUSBAR_CONTROL, rProp.Value ) ); } - else if ( aName == sInteractionHdl ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInteractionHdl)) ) { Reference< ::com::sun::star::task::XInteractionHandler > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -517,7 +514,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, rProp.Value ) ); } - else if ( aName == sViewData ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewData)) ) rSet.Put( SfxUnoAnyItem( SID_VIEW_DATA, rProp.Value ) ); else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterData)) ) rSet.Put( SfxUnoAnyItem( SID_FILTER_DATA, rProp.Value ) ); @@ -529,7 +526,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_INPUTSTREAM, rProp.Value ) ); } - else if ( aName == sStream ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStream)) ) { Reference< XInputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -537,7 +534,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_STREAM, rProp.Value ) ); } - else if ( aName == sUCBContent ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUCBContent)) ) { Reference< XContent > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -545,7 +542,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_CONTENT, rProp.Value ) ); } - else if ( aName == sOutputStream ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOutputStream)) ) { Reference< XOutputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -553,7 +550,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_OUTPUTSTREAM, rProp.Value ) ); } - else if ( aName == sPostData ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPostData)) ) { Reference< XInputStream > xVal; sal_Bool bOK = (rProp.Value >>= xVal); @@ -561,7 +558,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_POSTDATA, rProp.Value ) ); } - else if ( aName == sFrame ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrame)) ) { Reference< XFrame > xFrame; sal_Bool bOK = (rProp.Value >>= xFrame); @@ -569,7 +566,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) ); } - else if ( aName == sAsTemplate ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sAsTemplate)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -577,7 +574,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_TEMPLATE, bVal ) ); } - else if ( aName == sOpenNewView ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOpenNewView)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -585,7 +582,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_OPEN_NEW_VIEW, bVal ) ); } - else if ( aName == sViewId ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewId)) ) { sal_Int16 nVal = -1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -593,7 +590,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_VIEW_ID, nVal ) ); } - else if ( aName == sPluginMode ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPluginMode)) ) { sal_Int16 nVal = -1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -601,7 +598,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_PLUGIN_MODE, nVal ) ); } - else if ( aName == sReadOnly ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sReadOnly)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -609,7 +606,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_DOC_READONLY, bVal ) ); } - else if ( aName == sStartPresentation ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStartPresentation)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -617,7 +614,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, bVal ) ); } - else if ( aName == sSelectionOnly ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSelectionOnly)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -625,7 +622,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_SELECTION, bVal ) ); } - else if ( aName == sHidden ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -633,7 +630,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_HIDDEN, bVal ) ); } - else if ( aName == sMinimized ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMinimized)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -641,7 +638,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_MINIMIZED, bVal ) ); } - else if ( aName == sSilent ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSilent)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -649,7 +646,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_SILENT, bVal ) ); } - else if ( aName == sPreview ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPreview)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -657,7 +654,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_PREVIEW, bVal ) ); } - else if ( aName == sViewOnly ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewOnly)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -665,7 +662,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_VIEWONLY, bVal ) ); } - else if ( aName == sDontEdit ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDontEdit)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -673,7 +670,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_EDITDOC, !bVal ) ); } - else if ( aName == sUseSystemDialog ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUseSystemDialog)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -701,7 +698,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque rSet.Put( stringList ); } } - else if ( aName == sFileName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFileName)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -717,7 +714,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) ); } - else if ( aName == sFolderName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFolderName)) ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -725,7 +722,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_PATH, sVal ) ); } - else if ( aName == sFrameName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrameName)) ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -733,7 +730,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK && sVal.getLength()) rSet.Put( SfxStringItem( SID_TARGETNAME, sVal ) ); } - else if ( aName == sMediaType ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMediaType)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -741,7 +738,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_CONTENTTYPE, sVal ) ); } - else if ( aName == sTemplateName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateName)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -749,7 +746,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_NAME, sVal ) ); } - else if ( aName == sTemplateRegionName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateRegionName)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -757,7 +754,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_REGIONNAME, sVal ) ); } - else if ( aName == sJumpMark ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sJumpMark)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -765,7 +762,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_JUMPMARK, sVal ) ); } - else if ( aName == sCharacterSet ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCharacterSet)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -773,7 +770,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_CHARSET, sVal ) ); } - else if ( aName == sFilterFlags ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterFlags)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -781,7 +778,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_FILE_FILTEROPTIONS, sVal ) ); } - else if ( aName == sMacroExecMode ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMacroExecMode)) ) { sal_Int16 nVal =-1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -805,7 +802,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_REPAIRPACKAGE, bVal ) ); } - else if ( aName == sDocumentTitle ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentTitle)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -813,7 +810,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOCINFO_TITLE, sVal ) ); } - else if ( aName == sDocumentBaseURL ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentBaseURL)) ) { ::rtl::OUString sVal; // the base url can be set to empty ( for embedded objects for example ) @@ -822,7 +819,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_BASEURL, sVal ) ); } - else if ( aName == sHierarchicalDocumentName ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHierarchicalDocumentName)) ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -830,7 +827,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_HIERARCHICALNAME, sVal ) ); } - else if ( aName == sCopyStreamIfPossible ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCopyStreamIfPossible)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -838,7 +835,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_COPY_STREAM_IF_POSSIBLE, bVal ) ); } - else if ( aName == sNoAutoSave ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sNoAutoSave)) ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -1223,11 +1220,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta // used only internally if ( nId == SID_SAVETO ) continue; - if ( nId == SID_MODIFYPASSWORDINFO ) + if ( nId == SID_MODIFYPASSWORDINFO ) continue; - if ( nId == SID_SUGGESTEDSAVEASDIR ) + if ( nId == SID_SUGGESTEDSAVEASDIR ) continue; - if ( nId == SID_SUGGESTEDSAVEASNAME ) + if ( nId == SID_SUGGESTEDSAVEASNAME ) continue; } @@ -1352,67 +1349,67 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta const SfxPoolItem *pItem=0; if ( rSet.GetItemState( SID_COMPONENTDATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sComponentData; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sComponentData)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_COMPONENTCONTEXT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sComponentContext; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sComponentContext)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sStatusInd; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStatusInd)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_INTERACTIONHANDLER, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sInteractionHdl; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sInteractionHdl)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_VIEW_DATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sViewData; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewData)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_FILTER_DATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sFilterData; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFilterData)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOCUMENT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sModel; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModel)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_CONTENT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sUCBContent; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUCBContent)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_INPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sInputStream; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sInputStream)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_STREAM, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sStream; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStream)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_OUTPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sOutputStream; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOutputStream)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_POSTDATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sPostData; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPostData)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_FILLFRAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sFrame; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFrame)); if ( pItem->ISA( SfxUsrAnyItem ) ) { OSL_ENSURE( false, "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" ); @@ -1425,77 +1422,77 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_TEMPLATE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sAsTemplate; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sAsTemplate)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sOpenNewView; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOpenNewView)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_VIEW_ID, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sViewId; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewId)); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_PLUGIN_MODE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sPluginMode; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPluginMode)); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOC_READONLY, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sReadOnly; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sReadOnly)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sStartPresentation; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStartPresentation)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_SELECTION, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sSelectionOnly; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSelectionOnly)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_HIDDEN, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sHidden; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sHidden)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_MINIMIZED, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sMinimized; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMinimized)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_SILENT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sSilent; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSilent)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_PREVIEW, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sPreview; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPreview)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_VIEWONLY, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sViewOnly; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewOnly)); pValue[nActProp++].Value <<= (sal_Bool) (( ((SfxBoolItem*)pItem)->GetValue() )); } if ( rSet.GetItemState( SID_EDITDOC, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sDontEdit; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDontEdit)); pValue[nActProp++].Value <<= (sal_Bool) (!( ((SfxBoolItem*)pItem)->GetValue() )); } if ( rSet.GetItemState( SID_FILE_DIALOG, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sUseSystemDialog; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUseSystemDialog)); pValue[nActProp++].Value <<= (sal_Bool) ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_STANDARD_DIR, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sStandardDir; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStandardDir)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_BLACK_LIST, sal_False, &pItem ) == SFX_ITEM_SET ) @@ -1508,7 +1505,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_TARGETNAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sFrameName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFrameName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET ) @@ -1518,73 +1515,73 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sFolderName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFolderName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_CONTENTTYPE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sMediaType; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMediaType)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_TEMPLATE_NAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sTemplateName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sTemplateName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sTemplateRegionName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sTemplateRegionName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_JUMPMARK, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sJumpMark; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sJumpMark)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_CHARSET, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sCharacterSet; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sCharacterSet)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_MACROEXECMODE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sMacroExecMode; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMacroExecMode)); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_UPDATEDOCMODE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sUpdateDocMode; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUpdateDocMode)); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_REPAIRPACKAGE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sRepairPackage; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sRepairPackage)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOCINFO_TITLE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sDocumentTitle; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDocumentTitle)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_DOC_BASEURL, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sDocumentBaseURL; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDocumentBaseURL)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sHierarchicalDocumentName; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sHierarchicalDocumentName)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sCopyStreamIfPossible; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sCopyStreamIfPossible)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_NOAUTOSAVE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = sNoAutoSave; + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sNoAutoSave)); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, sal_False, &pItem ) == SFX_ITEM_SET ) @@ -2250,18 +2247,18 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::FilterOptionsRequest aOptionsRequest( temp, - temp2, + temp2, rModel, rProperties ); - m_aRequest <<= aOptionsRequest; + m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; - m_pOptions = new FilterOptionsContinuation; + m_pAbort = new comphelper::OInteractionAbort; + m_pOptions = new FilterOptionsContinuation; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); } ::com::sun::star::uno::Any SAL_CALL RequestFilterOptions::getRequest() @@ -2278,108 +2275,139 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: } //========================================================================= -//========================================================================= +class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionApprove* m_pApprove; + comphelper::OInteractionDisapprove* m_pDisapprove; + +public: + RequestPackageReparation_Impl( ::rtl::OUString aName ); + sal_Bool isApproved(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +RequestPackageReparation_Impl::RequestPackageReparation_Impl( ::rtl::OUString aName ) +{ + ::rtl::OUString temp; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; + ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, + temp2, + aName ); + m_aRequest <<= aBrokenPackageRequest; + m_pApprove = new comphelper::OInteractionApprove; + m_pDisapprove = new comphelper::OInteractionDisapprove; + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); +} + +sal_Bool RequestPackageReparation_Impl::isApproved() +{ + return m_pApprove->wasSelected(); +} + +::com::sun::star::uno::Any SAL_CALL RequestPackageReparation_Impl::getRequest() + throw( ::com::sun::star::uno::RuntimeException ) +{ + return m_aRequest; +} + +::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > + SAL_CALL RequestPackageReparation_Impl::getContinuations() + throw( ::com::sun::star::uno::RuntimeException ) +{ + return m_lContinuations; +} RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) { - ::rtl::OUString temp; - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; - ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); - - m_aRequest <<= aBrokenPackageRequest; - - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; - - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); + pImp = new RequestPackageReparation_Impl( aName ); + pImp->acquire(); } -/*uno::*/Any SAL_CALL RequestPackageReparation::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +RequestPackageReparation::~RequestPackageReparation() { - return ::cppu::queryInterface ( rType, - // OWeakObject interfaces - dynamic_cast< XInterface* > ( (XInteractionRequest *) this ), - static_cast< XWeak* > ( this ), - // my own interfaces - static_cast< XInteractionRequest* > ( this ) ); + pImp->release(); } -void SAL_CALL RequestPackageReparation::acquire( ) throw () +sal_Bool RequestPackageReparation::isApproved() { - OWeakObject::acquire(); + return pImp->isApproved(); } -void SAL_CALL RequestPackageReparation::release( ) throw () +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > RequestPackageReparation::GetRequest() { - OWeakObject::release(); -} - -::com::sun::star::uno::Any SAL_CALL RequestPackageReparation::getRequest() - throw( ::com::sun::star::uno::RuntimeException ) -{ - return m_aRequest; -} - -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL RequestPackageReparation::getContinuations() - throw( ::com::sun::star::uno::RuntimeException ) -{ - return m_lContinuations; + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); } //========================================================================= +class NotifyBrokenPackage_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionAbort* m_pAbort; -NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) +public: + NotifyBrokenPackage_Impl( ::rtl::OUString aName ); + sal_Bool isAborted(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); - - m_aRequest <<= aBrokenPackageRequest; - - m_pAbort = new ContinuationAbort; - - m_lContinuations.realloc( 1 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + temp2, + aName ); + m_aRequest <<= aBrokenPackageRequest; + m_pAbort = new comphelper::OInteractionAbort; + m_lContinuations.realloc( 1 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); } -/*uno::*/Any SAL_CALL NotifyBrokenPackage::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +sal_Bool NotifyBrokenPackage_Impl::isAborted() { - return ::cppu::queryInterface ( rType, - // OWeakObject interfaces - dynamic_cast< XInterface* > ( (XInteractionRequest *) this ), - static_cast< XWeak* > ( this ), - // my own interfaces - static_cast< XInteractionRequest* > ( this ) ); + return m_pAbort->wasSelected(); } -void SAL_CALL NotifyBrokenPackage::acquire( ) throw () -{ - OWeakObject::acquire(); -} - -void SAL_CALL NotifyBrokenPackage::release( ) throw () -{ - OWeakObject::release(); -} - -::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage::getRequest() +::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage_Impl::getRequest() throw( ::com::sun::star::uno::RuntimeException ) { return m_aRequest; } ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL NotifyBrokenPackage::getContinuations() + SAL_CALL NotifyBrokenPackage_Impl::getContinuations() throw( ::com::sun::star::uno::RuntimeException ) { return m_lContinuations; } +NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) +{ + pImp = new NotifyBrokenPackage_Impl( aName ); + pImp->acquire(); +} + +NotifyBrokenPackage::~NotifyBrokenPackage() +{ + pImp->release(); +} + +sal_Bool NotifyBrokenPackage::isAborted() +{ + return pImp->isAborted(); +} + +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > NotifyBrokenPackage::GetRequest() +{ + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); +} diff --git a/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx index 5cb3f162e6c8..d674c7620d54 100644 --- a/sfx2/source/inc/fltoptint.hxx +++ b/sfx2/source/inc/fltoptint.hxx @@ -24,6 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ +#ifndef SFX2_FLTOPTINT_HXX +#define SFX2_FLTOPTINT_HXX #include #include @@ -73,3 +75,4 @@ public: throw( ::com::sun::star::uno::RuntimeException ); }; +#endif From d0097cac72c24b242929a25eab21582b64d45e74 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 29 Nov 2010 16:09:47 +0100 Subject: [PATCH 266/279] CWS gnumake2: another build breaker --- framework/source/uielement/panelwrapper.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/framework/source/uielement/panelwrapper.cxx b/framework/source/uielement/panelwrapper.cxx index 91bc6fa9dac8..405ee412df83 100755 --- a/framework/source/uielement/panelwrapper.cxx +++ b/framework/source/uielement/panelwrapper.cxx @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include From 5115c8c1ecf93bec9b8e7b33cb35e9db7d15d1e5 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 29 Nov 2010 16:52:43 +0100 Subject: [PATCH 267/279] CWS gnumake2: moved header files now in inc/forms --- xmloff/inc/{ => forms}/form_handler_factory.hxx | 2 +- xmloff/inc/{ => forms}/property_handler.hxx | 2 +- xmloff/inc/{ => forms}/property_ids.hxx | 0 xmloff/source/forms/handler/form_handler_factory.cxx | 2 +- xmloff/source/forms/handler/property_handler_base.hxx | 2 +- xmloff/source/forms/property_description.hxx | 2 +- xmloff/source/forms/property_meta_data.cxx | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename xmloff/inc/{ => forms}/form_handler_factory.hxx (98%) rename xmloff/inc/{ => forms}/property_handler.hxx (99%) rename xmloff/inc/{ => forms}/property_ids.hxx (100%) diff --git a/xmloff/inc/form_handler_factory.hxx b/xmloff/inc/forms/form_handler_factory.hxx similarity index 98% rename from xmloff/inc/form_handler_factory.hxx rename to xmloff/inc/forms/form_handler_factory.hxx index 62bf94f74aa8..8752b8384fef 100755 --- a/xmloff/inc/form_handler_factory.hxx +++ b/xmloff/inc/forms/form_handler_factory.hxx @@ -27,7 +27,7 @@ #ifndef XMLOFF_FORM_HANDLER_FACTORY_HXX #define XMLOFF_FORM_HANDLER_FACTORY_HXX -#include "property_handler.hxx" +#include "forms/property_handler.hxx" //...................................................................................................................... namespace xmloff diff --git a/xmloff/inc/property_handler.hxx b/xmloff/inc/forms/property_handler.hxx similarity index 99% rename from xmloff/inc/property_handler.hxx rename to xmloff/inc/forms/property_handler.hxx index 247b4f17f798..d2675ba58ad0 100755 --- a/xmloff/inc/property_handler.hxx +++ b/xmloff/inc/forms/property_handler.hxx @@ -27,7 +27,7 @@ #ifndef XMLOFF_PROPERTY_HANDLER_HXX #define XMLOFF_PROPERTY_HANDLER_HXX -#include "property_ids.hxx" +#include "forms/property_ids.hxx" #include diff --git a/xmloff/inc/property_ids.hxx b/xmloff/inc/forms/property_ids.hxx similarity index 100% rename from xmloff/inc/property_ids.hxx rename to xmloff/inc/forms/property_ids.hxx diff --git a/xmloff/source/forms/handler/form_handler_factory.cxx b/xmloff/source/forms/handler/form_handler_factory.cxx index ccf829d4201f..72a9edf38f42 100755 --- a/xmloff/source/forms/handler/form_handler_factory.cxx +++ b/xmloff/source/forms/handler/form_handler_factory.cxx @@ -26,7 +26,7 @@ #include "precompiled_xmloff.hxx" -#include "form_handler_factory.hxx" +#include "forms/form_handler_factory.hxx" #include "vcl_date_handler.hxx" #include "vcl_time_handler.hxx" diff --git a/xmloff/source/forms/handler/property_handler_base.hxx b/xmloff/source/forms/handler/property_handler_base.hxx index 10adceaa52aa..01f2a9e843f6 100755 --- a/xmloff/source/forms/handler/property_handler_base.hxx +++ b/xmloff/source/forms/handler/property_handler_base.hxx @@ -27,7 +27,7 @@ #ifndef XMLOFF_PROPERTY_HANDLER_BASE_HXX #define XMLOFF_PROPERTY_HANDLER_BASE_HXX -#include "property_handler.hxx" +#include "forms/property_handler.hxx" #include diff --git a/xmloff/source/forms/property_description.hxx b/xmloff/source/forms/property_description.hxx index 8e9aa9cb616e..4edab2e649f7 100755 --- a/xmloff/source/forms/property_description.hxx +++ b/xmloff/source/forms/property_description.hxx @@ -27,7 +27,7 @@ #ifndef XMLOFF_PROPERTY_DESCRIPTION_HXX #define XMLOFF_PROPERTY_DESCRIPTION_HXX -#include "property_handler.hxx" +#include "forms/property_handler.hxx" #include "property_group.hxx" #include "xmloff/xmltoken.hxx" diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx index 7dd5277cff28..5930d123578c 100755 --- a/xmloff/source/forms/property_meta_data.cxx +++ b/xmloff/source/forms/property_meta_data.cxx @@ -27,7 +27,7 @@ #include "precompiled_xmloff.hxx" #include "property_description.hxx" -#include "form_handler_factory.hxx" +#include "forms/form_handler_factory.hxx" #include "strings.hxx" #include "xmloff/xmltoken.hxx" #include "xmloff/xmlnmspe.hxx" From 9f4aa7a75700180058473a7f68fc393872e25b02 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Mon, 29 Nov 2010 18:50:33 +0100 Subject: [PATCH 268/279] ause128: #i115689# guard additional dependencies of ZIPnTARGETN --- desktop/test/deployment/locationtest/makefile.mk | 3 +++ .../deployment/update/updateinfocreation/build/makefile.mk | 3 +++ sysui/desktop/macosx/makefile.mk | 3 +++ 3 files changed, 9 insertions(+) diff --git a/desktop/test/deployment/locationtest/makefile.mk b/desktop/test/deployment/locationtest/makefile.mk index 8fe189791961..24be56c28d7e 100644 --- a/desktop/test/deployment/locationtest/makefile.mk +++ b/desktop/test/deployment/locationtest/makefile.mk @@ -80,5 +80,8 @@ $(MISC)$/$(TARGET)_resort : manifest.xml $(JARTARGETN) $(MISC)$/$(ZIP1TARGET).cr $(COPY) description.xml $(MISC)$/$(TARGET)$/description.xml $(TOUCH) $@ +.IF "$(ZIP1TARGETN)"!="" $(ZIP1TARGETN) : $(MISC)$/$(TARGET)_resort $(MISC)$/$(ZIP1TARGET).createdir +.ENDIF # "$(ZIP1TARGETN)"!="" + diff --git a/desktop/test/deployment/update/updateinfocreation/build/makefile.mk b/desktop/test/deployment/update/updateinfocreation/build/makefile.mk index 6af3928279e0..b0479c942b4f 100755 --- a/desktop/test/deployment/update/updateinfocreation/build/makefile.mk +++ b/desktop/test/deployment/update/updateinfocreation/build/makefile.mk @@ -84,5 +84,8 @@ $(MISC)$/$(TARGET)_resort : manifest.xml $(JARTARGETN) $(MISC)$/$(ZIP1TARGET).cr $(GNUCOPY) -u description.xml $(MISC)$/$(TARGET)$/description.xml $(TOUCH) $@ +.IF "$(ZIP1TARGETN)"!="" $(ZIP1TARGETN) : $(MISC)$/$(TARGET)_resort $(MISC)$/$(ZIP1TARGET).createdir +.ENDIF # "$(ZIP1TARGETN)"!="" + diff --git a/sysui/desktop/macosx/makefile.mk b/sysui/desktop/macosx/makefile.mk index 059b3b87bb46..654ac5579df9 100644 --- a/sysui/desktop/macosx/makefile.mk +++ b/sysui/desktop/macosx/makefile.mk @@ -64,8 +64,11 @@ ULFDIR:=..$/share .INCLUDE : target.mk +.IF "$(ZIP1TARGETN)"!="" ZIP1TARGETN : Info.plist extract_icons_names.pl +.ENDIF # "$(ZIP1TARGETN)"!="" + ALLTAR : $(COMMONMISC)$/{PkgInfo Info.plist} $(COMMONBIN)$/InfoPlist_{$(alllangiso)}.zip $(COMMONMISC)$/PkgInfo : From b8fde585bdd8bc2df622001352ae4f0e027a0813 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 1 Dec 2010 11:22:11 +0100 Subject: [PATCH 269/279] fwk160: #i74950# let imported links be readonly --- .../source/commonembedding/miscobj.cxx | 9 ++++ sfx2/inc/guisaveas.hxx | 6 --- sfx2/inc/sfx2/docfilt.hxx | 37 +-------------- sfx2/source/doc/guisaveas.cxx | 46 ++----------------- sfx2/source/doc/sfxbasemodel.cxx | 2 +- 5 files changed, 14 insertions(+), 86 deletions(-) diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 97cc5d2d499b..e0ff1266921a 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -39,6 +39,7 @@ #include #include +#include #include "closepreventer.hxx" #include "intercept.hxx" @@ -240,6 +241,14 @@ void OCommonEmbeddedObject::LinkInit_Impl( OSL_ENSURE( m_aLinkURL.getLength() && m_aLinkFilterName.getLength(), "Filter and URL must be provided!\n" ); + m_bReadOnly = sal_True; + if ( m_aLinkFilterName.getLength() ) + { + ::comphelper::MimeConfigurationHelper aHelper( m_xFactory ); + ::rtl::OUString aExportFilterName = aHelper.GetExportFilterFromImportFilter( m_aLinkFilterName ); + m_bReadOnly = !( aExportFilterName.equals( m_aLinkFilterName ) ); + } + m_aDocMediaDescriptor = GetValuableArgs_Impl( aMediaDescr, sal_False ); uno::Reference< frame::XDispatchProviderInterceptor > xDispatchInterceptor; diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx index a317b5796232..b10ed6c90819 100644 --- a/sfx2/inc/guisaveas.hxx +++ b/sfx2/inc/guisaveas.hxx @@ -79,12 +79,6 @@ public: ::rtl::OUString aUserSelectedName, sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES ); - static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SearchForFilter( - const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery >& xFilterQuery, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aSearchRequest, - sal_Int32 nMustFlags, - sal_Int32 nDontFlags ); - static sal_Bool CheckFilterOptionsAppearence( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG, const ::rtl::OUString& aFilterName ); diff --git a/sfx2/inc/sfx2/docfilt.hxx b/sfx2/inc/sfx2/docfilt.hxx index f024fdb07c06..83bad4d1d01c 100644 --- a/sfx2/inc/sfx2/docfilt.hxx +++ b/sfx2/inc/sfx2/docfilt.hxx @@ -37,42 +37,7 @@ #include #include -// TODO/LATER: The flags should be part of the UNO specification -#define SFX_FILTER_IMPORT 0x00000001L -#define SFX_FILTER_EXPORT 0x00000002L -#define SFX_FILTER_TEMPLATE 0x00000004L -#define SFX_FILTER_INTERNAL 0x00000008L -#define SFX_FILTER_TEMPLATEPATH 0x00000010L -#define SFX_FILTER_OWN 0x00000020L -#define SFX_FILTER_ALIEN 0x00000040L -#define SFX_FILTER_USESOPTIONS 0x00000080L - -#define SFX_FILTER_DEFAULT 0x00000100L -#define SFX_FILTER_EXECUTABLE 0x00000200L -#define SFX_FILTER_SUPPORTSSELECTION 0x00000400L -#define SFX_FILTER_MAPTOAPPPLUG 0x00000800L -#define SFX_FILTER_NOTINFILEDLG 0x00001000L -#define SFX_FILTER_NOTINCHOOSER 0x00002000L -#define SFX_FILTER_ASYNC 0x00004000L -// Legt Objekt nur an, kein Laden -#define SFX_FILTER_CREATOR 0x00008000L -#define SFX_FILTER_OPENREADONLY 0x00010000L -#define SFX_FILTER_MUSTINSTALL 0x00020000L -#define SFX_FILTER_CONSULTSERVICE 0x00040000L - -#define SFX_FILTER_STARONEFILTER 0x00080000L -#define SFX_FILTER_PACKED 0x00100000L -#define SFX_FILTER_SILENTEXPORT 0x00200000L - -#define SFX_FILTER_BROWSERPREFERED 0x00400000L - -#define SFX_FILTER_ENCRYPTION 0x01000000L -#define SFX_FILTER_PASSWORDTOMODIFY 0x02000000L - -#define SFX_FILTER_PREFERED 0x10000000L - -#define SFX_FILTER_VERSION_NONE 0 -#define SFX_FILTER_NOTINSTALLED SFX_FILTER_MUSTINSTALL | SFX_FILTER_CONSULTSERVICE +#include #include diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 3c4df7276d6b..ee786ff5c39c 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #include @@ -507,7 +508,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceAnyFilter( sa aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); aSearchRequest[0].Value <<= GetDocServiceName(); - return SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); + return ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); } //------------------------------------------------------------------------- @@ -527,7 +528,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl( aSearchRequest[1].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); aSearchRequest[1].Value <<= GetDocServiceName(); - aFilterProps = SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); + aFilterProps = ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); } else { @@ -1648,47 +1649,6 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& return bDialogUsed; } -//------------------------------------------------------------------------- -// static -uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter( - const uno::Reference< container::XContainerQuery >& xFilterQuery, - const uno::Sequence< beans::NamedValue >& aSearchRequest, - sal_Int32 nMustFlags, - sal_Int32 nDontFlags ) -{ - uno::Sequence< beans::PropertyValue > aFilterProps; - uno::Reference< container::XEnumeration > xFilterEnum = - xFilterQuery->createSubSetEnumerationByProperties( aSearchRequest ); - - // the first default filter will be taken, - // if there is no filter with flag default the first acceptable filter will be taken - if ( xFilterEnum.is() ) - { - while ( xFilterEnum->hasMoreElements() ) - { - uno::Sequence< beans::PropertyValue > aProps; - if ( xFilterEnum->nextElement() >>= aProps ) - { - ::comphelper::SequenceAsHashMap aPropsHM( aProps ); - sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), - (sal_Int32)0 ); - if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) ) - { - if ( ( nFlags & SFX_FILTER_DEFAULT ) == SFX_FILTER_DEFAULT ) - { - aFilterProps = aProps; - break; - } - else if ( !aFilterProps.getLength() ) - aFilterProps = aProps; - } - } - } - } - - return aFilterProps; -} - //------------------------------------------------------------------------- // static sal_Bool SfxStoringHelper::CheckFilterOptionsAppearence( diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index c85a483c64aa..e56cc0ece448 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2393,7 +2393,7 @@ void SAL_CALL SfxBaseModel::removeDocumentEventListener( const uno::Reference< d } // --------------------------------- -void SAL_CALL SfxBaseModel::notifyDocumentEvent( const ::rtl::OUString& _EventName, const uno::Reference< frame::XController2 >& _ViewController, const uno::Any& _Supplement ) +void SAL_CALL SfxBaseModel::notifyDocumentEvent( const ::rtl::OUString&, const uno::Reference< frame::XController2 >&, const uno::Any& ) throw ( lang::IllegalArgumentException, lang::NoSupportException, uno::RuntimeException ) { throw lang::NoSupportException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SfxBaseModel controlls all the sent notifications itself!" ) ), uno::Reference< uno::XInterface >() ); From b927224032e0ca68961cb6730c02de04f56633a5 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 1 Dec 2010 15:29:44 +0100 Subject: [PATCH 270/279] fwk160: #i107138# fix the saveCompleted handling --- .../source/commonembedding/persistence.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 0312d28315a6..f6ac51c0ebe6 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -978,7 +978,21 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( if ( m_bWaitSaveCompleted ) { if ( nEntryConnectionMode == embed::EntryInitModes::NO_INIT ) - saveCompleted( ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ) ); + { + // saveCompleted is expected, handle it accordingly + if ( m_xNewParentStorage == xStorage && m_aNewEntryName.equals( sEntName ) ) + { + saveCompleted( sal_True ); + return; + } + + // if a completely different entry is provided, switch first back to the old persistence in saveCompleted + // and then switch to the target persistence + sal_Bool bSwitchFurther = ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ); + saveCompleted( sal_False ); + if ( !bSwitchFurther ) + return; + } else throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), From 492a60385295d6b11d8c40634e2764c30cf12320 Mon Sep 17 00:00:00 2001 From: sj Date: Thu, 2 Dec 2010 14:31:22 +0100 Subject: [PATCH 271/279] impress205: #i115825# fixed metatextarray issues --- drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 73683884e2bd..893c572a3086 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -2017,7 +2017,7 @@ namespace if(nTextLength + nTextIndex > nStringLength) { - nTextLength = nStringLength - nTextIndex; + nTextLength = nTextIndex > nStringLength ? 0 : nStringLength - nTextIndex; } if(nTextLength && rPropertyHolders.Current().getTextColorActive()) From 615bdd3fa8315bec38546e33a0fe0bffd7823c26 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 3 Dec 2010 20:33:01 +0100 Subject: [PATCH 272/279] CWS gnumake2:some fixes for problems found in autotests --- sfx2/AllLangResTarget_sfx2.mk | 1 + sfx2/source/appl/app.cxx | 9 +++------ sfx2/source/appl/appinit.cxx | 9 ++------- sfx2/source/appl/appserv.cxx | 13 +++---------- sfx2/source/dialog/sfxdlg.cxx | 2 -- 5 files changed, 9 insertions(+), 25 deletions(-) mode change 100644 => 100755 sfx2/source/dialog/sfxdlg.cxx diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk index 6148e23a5b35..aa3270e08a07 100644 --- a/sfx2/AllLangResTarget_sfx2.mk +++ b/sfx2/AllLangResTarget_sfx2.mk @@ -69,6 +69,7 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\ sfx2/source/doc/doc.src \ sfx2/source/doc/doctdlg.src \ sfx2/source/doc/doctempl.src \ + sfx2/source/doc/docvor.src \ sfx2/source/doc/graphhelp.src \ sfx2/source/doc/new.src \ sfx2/source/menu/menu.src \ diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 0ebd2dd782aa..4a1586175e15 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -112,6 +112,7 @@ #include "sfx2/stbitem.hxx" #include "eventsupplier.hxx" #include +#include #ifdef DBG_UTIL #include @@ -725,9 +726,7 @@ extern "C" { static void SAL_CALL thisModule() {} } IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( @@ -816,9 +815,7 @@ SfxApplication::ChooseScript() void SfxApplication::MacroOrganizer( INT16 nTabId ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index ddec7341f4c5..2aa19901d87c 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -65,9 +65,6 @@ #include #include -#ifndef GCC -#endif - #include #include "app.hrc" #include "sfxlocal.hrc" @@ -89,6 +86,7 @@ #include #include "helper.hxx" // SfxContentHelper::Kill() #include "sfxpicklist.hxx" +#include #ifdef UNX #define stricmp(a,b) strcmp(a,b) @@ -215,10 +213,7 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont) { bDetermineFunction = true; - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "cui" ) ) ); - - rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "cui" ) ) ); oslModule handleMod = osl_loadModuleRelative( &thisModule, aLibName.pData, 0 ); diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index d323fc91a395..c1858c5b33fb 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include -#ifndef _COM_SUN_STAR_LANG_XMultiServiceFactory_HPP_ #include -#endif #include #include #include @@ -40,9 +38,7 @@ #include #include #include -#ifndef _COM_SUN_STAR_UTIL_CloseVetoException_HPP_ #include -#endif #include #include #include @@ -133,6 +129,7 @@ #include #include "sorgitm.hxx" #include "sfx2/sfxhelp.hxx" +#include using namespace ::com::sun::star; using namespace ::com::sun::star::beans; @@ -749,9 +746,7 @@ extern "C" { static void SAL_CALL thisModule() {} } ::rtl::OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc = ::rtl::OUString() ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( @@ -771,9 +766,7 @@ extern "C" { static void SAL_CALL thisModule() {} } void MacroOrganizer( INT16 nTabId ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( diff --git a/sfx2/source/dialog/sfxdlg.cxx b/sfx2/source/dialog/sfxdlg.cxx old mode 100644 new mode 100755 index afad5053a5f7..becab5097ec3 --- a/sfx2/source/dialog/sfxdlg.cxx +++ b/sfx2/source/dialog/sfxdlg.cxx @@ -31,8 +31,6 @@ #include //#include "cuilib.hxx" -#define DLL_NAME "libcuili.so" - #include #include From 73eb295ac2db907675372be4fd1a618f8cd09cea Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Tue, 7 Dec 2010 19:13:10 +0100 Subject: [PATCH 273/279] ause128: #i115964# create .jnilib file on request when linking; deliver .jnilib files instead of deliver magic --- connectivity/prj/d.lst | 1 + connectivity/source/drivers/hsqldb/makefile.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/connectivity/prj/d.lst b/connectivity/prj/d.lst index 01d82ba9177e..22bffa638254 100644 --- a/connectivity/prj/d.lst +++ b/connectivity/prj/d.lst @@ -2,6 +2,7 @@ ..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib +..\%__SRC%\lib\*.jnilib %_DEST%\lib%_EXT%\*.jnilib ..\%__SRC%\slb\connectivity*.* %_DEST%\lib%_EXT%\connectivity*.* ..\%__SRC%\lib\idbt* %_DEST%\lib%_EXT%\idbt* ..\source\cpool\*.xml %_DEST%\xml%_EXT%\*.xml diff --git a/connectivity/source/drivers/hsqldb/makefile.mk b/connectivity/source/drivers/hsqldb/makefile.mk index 5be6fa08cd7b..d0e22fde8970 100644 --- a/connectivity/source/drivers/hsqldb/makefile.mk +++ b/connectivity/source/drivers/hsqldb/makefile.mk @@ -103,6 +103,7 @@ SHL1STDLIBS=\ SHL1DEPN= +SHL1CREATEJNILIB=TRUE SHL1IMPLIB= i$(HSQLDB_TARGET) SHL1DEF= $(MISC)$/$(SHL1TARGET).def From 1c516e842badb9eaf3e226cdb95786a16b2d6b00 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Thu, 9 Dec 2010 12:54:13 +0100 Subject: [PATCH 274/279] dba33m: #i115436# do not insert a space infront of ( and after ) --- connectivity/source/parse/sqlnode.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index b8bcd5334787..209dc0d6fc18 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -2511,6 +2511,7 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode rString.append(m_aNodeValue); rString.appendAscii("#"); break; + case SQL_NODE_INTNUM: case SQL_NODE_APPROXNUM: { @@ -2524,6 +2525,13 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode } break; // fall through + case SQL_NODE_PUNCTUATION: + if ( m_aNodeValue.toChar() == '(' || m_aNodeValue.toChar() == ')') // no spaces in front of '(' or after ')' + { + rString.append(m_aNodeValue); + break; + } + // fall through default: if (rString.getLength() && m_aNodeValue.toChar() != '.' && m_aNodeValue.toChar() != ':' ) { From 61f2ed5beeacd72f630ff2a4e86d92695e1c7dee Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Fri, 10 Dec 2010 12:42:03 +0100 Subject: [PATCH 275/279] dba33m: #i115436# only cast handled --- connectivity/inc/connectivity/sqlnode.hxx | 1 + connectivity/source/parse/sqlnode.cxx | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx index fa283cb5cf04..04ec8dc153df 100644 --- a/connectivity/inc/connectivity/sqlnode.hxx +++ b/connectivity/inc/connectivity/sqlnode.hxx @@ -231,6 +231,7 @@ namespace connectivity character_string_type, other_like_predicate_part_2, between_predicate_part_2, + cast_spec, rule_count, // letzter_wert UNKNOWN_RULE // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID) }; diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 209dc0d6fc18..8f2b3d69812a 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -1425,7 +1425,8 @@ OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star: { OSQLParseNode::parenthesized_boolean_value_expression, "parenthesized_boolean_value_expression" }, { OSQLParseNode::character_string_type, "character_string_type" }, { OSQLParseNode::other_like_predicate_part_2, "other_like_predicate_part_2" }, - { OSQLParseNode::between_predicate_part_2, "between_predicate_part_2" } + { OSQLParseNode::between_predicate_part_2, "between_predicate_part_2" }, + { OSQLParseNode::cast_spec, "cast_spec" } }; size_t nRuleMapCount = sizeof( aRuleDescriptions ) / sizeof( aRuleDescriptions[0] ); OSL_ENSURE( nRuleMapCount == size_t( OSQLParseNode::rule_count ), "OSQLParser::OSQLParser: added a new rule? Adjust this map!" ); @@ -2524,9 +2525,8 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode rString.append(aTmp); } break; - // fall through case SQL_NODE_PUNCTUATION: - if ( m_aNodeValue.toChar() == '(' || m_aNodeValue.toChar() == ')') // no spaces in front of '(' or after ')' + if ( getParent() && SQL_ISRULE(getParent(),cast_spec) && m_aNodeValue.toChar() == '(' ) // no spaces in front of '(' { rString.append(m_aNodeValue); break; From 9e1e9a66aeddf0874f9fc3e4bdcdff374bd23586 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Fri, 10 Dec 2010 18:21:08 +0100 Subject: [PATCH 276/279] gnumake2: temporary disable PCH for some objects --- sfx2/Library_sfx.mk | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) mode change 100644 => 100755 sfx2/Library_sfx.mk diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk old mode 100644 new mode 100755 index fb88cd015029..6a8a23095377 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -119,7 +119,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/appl/sfxhelp \ sfx2/source/appl/sfxpicklist \ sfx2/source/appl/shutdownicon \ - sfx2/source/appl/shutdowniconw32 \ sfx2/source/appl/workwin \ sfx2/source/appl/xpackcreator \ sfx2/source/bastyp/bitset \ @@ -216,7 +215,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/doc/plugin \ sfx2/source/doc/printhelper \ sfx2/source/doc/querytemplate \ - sfx2/source/doc/sfxacldetect \ sfx2/source/doc/sfxbasemodel \ sfx2/source/doc/sfxmodelfactory \ sfx2/source/doc/syspath \ @@ -278,9 +276,16 @@ $(eval $(call gb_Library_add_linked_libs,sfx,\ )) endif ifeq ($(OS),WNT) -$(eval $(call gb_Library_add_exception_objects,sfx,\ + +# workaround: disable PCH for these objects to avoid redeclaration +# errors - needs to be fixed in module tools +$(eval $(call gb_Library_add_cxxobjects,sfx,\ + sfx2/source/appl/shutdowniconw32 \ + sfx2/source/doc/sfxacldetect \ sfx2/source/doc/syspathw32 \ + , $(gb_LinkTarget_EXCEPTIONFLAGS) -nologo -UPRECOMPILED_HEADERS \ )) + $(eval $(call gb_Library_add_linked_libs,sfx,\ advapi32 \ gdi32 \ @@ -293,6 +298,13 @@ $(eval $(call gb_Library_add_linked_libs,sfx,\ uuid \ uwinapi \ )) +else +$(eval $(call gb_Library_add_cxxobjects,sfx,\ + sfx2/source/appl/shutdowniconw32 \ + sfx2/source/doc/sfxacldetect \ + , $(gb_LinkTarget_EXCEPTIONFLAGS) \ +)) + endif # vim: set noet sw=4 ts=4: From 6559ceb1a290766e6c1c54632fa0ec0d848b46fa Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 10 Dec 2010 21:58:51 +0100 Subject: [PATCH 277/279] gnumake2: fixing namespace collision between ::com::sun::star::uno::Reference and ::rtl::Reference (for PCH) --- sfx2/Library_sfx.mk | 1 - sfx2/source/appl/shutdownicon.cxx | 2 +- sfx2/source/control/querystatus.cxx | 2 +- sfx2/source/control/sfxstatuslistener.cxx | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 6a8a23095377..ed941d5b9a9f 100755 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -276,7 +276,6 @@ $(eval $(call gb_Library_add_linked_libs,sfx,\ )) endif ifeq ($(OS),WNT) - # workaround: disable PCH for these objects to avoid redeclaration # errors - needs to be fixed in module tools $(eval $(call gb_Library_add_cxxobjects,sfx,\ diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 04d9ce06aa9c..94f300fac690 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -80,7 +80,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::com::sun::star::ui::dialogs; using namespace ::vos; -using namespace ::rtl; +using ::rtl::OUString; using namespace ::sfx2; #ifdef ENABLE_QUICKSTART_APPLET diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index 8688740ce0fb..bee4a5c87675 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -44,7 +44,7 @@ #include #include -using namespace ::rtl; +using ::rtl::OUString; using namespace ::cppu; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index f6bb2b2c3004..c2cf5f164e7c 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -50,7 +50,7 @@ #include #include -using namespace ::rtl; +using ::rtl::OUString; using namespace ::cppu; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; From 213e25168a934890e60546be9c819d16754aaa49 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 15 Dec 2010 10:47:02 +0100 Subject: [PATCH 278/279] CWS gnumake2: build breaks on Mac --- sfx2/source/appl/shutdownicon.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 94f300fac690..3c323b05fd72 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -80,7 +80,11 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::com::sun::star::ui::dialogs; using namespace ::vos; +#ifdef WNT using ::rtl::OUString; +#else +using namespace ::rtl; +#endif using namespace ::sfx2; #ifdef ENABLE_QUICKSTART_APPLET From 794c821e4d48c34aa376cdc7b6ab2cb029d9574d Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Mon, 20 Dec 2010 12:32:36 +0100 Subject: [PATCH 279/279] #i10000# replace obsolete define --- basic/source/classes/sb.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 9ac8dbc91266..30e01892fab9 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1063,7 +1063,7 @@ void SbModule::implProcessModuleRunInit( ModuleInitDependencyMap& rMap, ClassMod // Run Init-Code of all modules (including inserted libraries) void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) { - NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() ); + ::vos::OGuard guard( Application::GetSolarMutex() ); // Init own modules for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )