summaryrefslogtreecommitdiff
path: root/sfx2/source/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/inc')
-rw-r--r--sfx2/source/inc/SfxDocumentMetaData.hxx49
-rw-r--r--sfx2/source/inc/alienwarn.hxx56
-rw-r--r--sfx2/source/inc/appbas.hxx44
-rw-r--r--sfx2/source/inc/appbaslib.hxx140
-rw-r--r--sfx2/source/inc/appdata.hxx179
-rw-r--r--sfx2/source/inc/applet.hxx122
-rw-r--r--sfx2/source/inc/doctemplates.hxx102
-rw-r--r--sfx2/source/inc/eventsupplier.hxx264
-rw-r--r--sfx2/source/inc/fltfnc.hxx35
-rw-r--r--sfx2/source/inc/fltoptint.hxx75
-rw-r--r--sfx2/source/inc/helper.hxx78
-rw-r--r--sfx2/source/inc/helpid.hrc361
-rw-r--r--sfx2/source/inc/hexplwnd.hxx101
-rw-r--r--sfx2/source/inc/iframe.hxx93
-rw-r--r--sfx2/source/inc/intro.hxx55
-rw-r--r--sfx2/source/inc/mailmodel.hxx105
-rw-r--r--sfx2/source/inc/mnucfga.hxx52
-rw-r--r--sfx2/source/inc/nfltdlg.hxx66
-rw-r--r--sfx2/source/inc/nochaos.hxx40
-rw-r--r--sfx2/source/inc/objmnctl.hxx56
-rw-r--r--sfx2/source/inc/objshimp.hxx172
-rw-r--r--sfx2/source/inc/openflag.hxx41
-rw-r--r--sfx2/source/inc/ownsubfilterservice.hxx90
-rw-r--r--sfx2/source/inc/partwnd.hxx90
-rw-r--r--sfx2/source/inc/plugin.hxx91
-rw-r--r--sfx2/source/inc/preview.hxx73
-rw-r--r--sfx2/source/inc/recfloat.hxx69
-rw-r--r--sfx2/source/inc/referers.hxx36
-rw-r--r--sfx2/source/inc/sfxlocal.hrc67
-rw-r--r--sfx2/source/inc/sfxpicklist.hxx86
-rw-r--r--sfx2/source/inc/sfxtypes.hxx199
-rw-r--r--sfx2/source/inc/sfxurlrelocator.hxx54
-rw-r--r--sfx2/source/inc/slotserv.hxx84
-rw-r--r--sfx2/source/inc/splitwin.hxx133
-rw-r--r--sfx2/source/inc/statcach.hxx182
-rw-r--r--sfx2/source/inc/templdgi.hxx394
-rw-r--r--sfx2/source/inc/tplcitem.hxx52
-rw-r--r--sfx2/source/inc/tplcomp.hxx224
-rw-r--r--sfx2/source/inc/versdlg.hxx109
-rw-r--r--sfx2/source/inc/virtmenu.hxx159
-rw-r--r--sfx2/source/inc/workwin.hxx390
41 files changed, 4868 insertions, 0 deletions
diff --git a/sfx2/source/inc/SfxDocumentMetaData.hxx b/sfx2/source/inc/SfxDocumentMetaData.hxx
new file mode 100644
index 000000000000..ec573cf007a7
--- /dev/null
+++ b/sfx2/source/inc/SfxDocumentMetaData.hxx
@@ -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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFXDOCUMENTMETADATA_HXX
+#define _SFXDOCUMENTMETADATA_HXX
+
+#include "sal/config.h"
+#include "cppuhelper/factory.hxx"
+
+
+// component helper namespace
+namespace comp_SfxDocumentMetaData {
+
+namespace css = ::com::sun::star;
+
+// component and service helper functions:
+::rtl::OUString SAL_CALL _getImplementationName();
+css::uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames();
+css::uno::Reference< css::uno::XInterface > SAL_CALL _create(
+ css::uno::Reference< css::uno::XComponentContext > const & context );
+
+} // closing component helper namespace
+
+#endif
+
diff --git a/sfx2/source/inc/alienwarn.hxx b/sfx2/source/inc/alienwarn.hxx
new file mode 100644
index 000000000000..f7c38173fceb
--- /dev/null
+++ b/sfx2/source/inc/alienwarn.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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_ALIENWARN_HXX
+#define _SFX_ALIENWARN_HXX
+
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/fixed.hxx>
+
+#include <sfx2/basedlgs.hxx>
+
+class SfxAlienWarningDialog : public SfxModalDialog
+{
+private:
+ OKButton m_aKeepCurrentBtn;
+ CancelButton m_aSaveODFBtn;
+ HelpButton m_aMoreInfoBtn;
+ FixedLine m_aOptionLine;
+ CheckBox m_aWarningOnBox;
+ FixedImage m_aQueryImage;
+ FixedText m_aInfoText;
+
+ void InitSize();
+
+public:
+ SfxAlienWarningDialog( Window* pParent, const String& _rFormatName );
+ virtual ~SfxAlienWarningDialog();
+};
+
+#endif // #ifndef _SFX_ALIENWARN_HXX
+
diff --git a/sfx2/source/inc/appbas.hxx b/sfx2/source/inc/appbas.hxx
new file mode 100644
index 000000000000..8b10fcb843de
--- /dev/null
+++ b/sfx2/source/inc/appbas.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_APPBAS_HXX
+#define _SFX_APPBAS_HXX
+
+
+#include <basic/sbxdef.hxx>
+
+class StarBASIC;
+class SbxObject;
+
+//=========================================================================
+
+SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject,
+ const char *pName, ULONG nSID, SbxDataType eType=SbxOBJECT,
+ SbxClassType = SbxCLASS_PROPERTY );
+
+
+#endif
+
diff --git a/sfx2/source/inc/appbaslib.hxx b/sfx2/source/inc/appbaslib.hxx
new file mode 100644
index 000000000000..5bc7662e8f9b
--- /dev/null
+++ b/sfx2/source/inc/appbaslib.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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef APPBASLIB_HXX
+#define APPBASLIB_HXX
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+
+class BasicManager;
+
+/** helper class which holds and manipulates a BasicManager
+*/
+class SfxBasicManagerHolder
+{
+private:
+ BasicManager* mpBasicManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer >
+ mxBasicContainer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer >
+ mxDialogContainer;
+
+public:
+ SfxBasicManagerHolder();
+
+ enum ContainerType
+ {
+ SCRIPTS, DIALOGS
+ };
+
+ /** returns <TRUE/> if and only if the instance is currently bound to a non-<NULL/>
+ BasicManager.
+ */
+ bool isValid() const { return mpBasicManager != NULL; }
+
+ /** returns the BasicManager which this instance is currently bound to
+ */
+ BasicManager*
+ get() const { return mpBasicManager; }
+
+ /** binds the instance to the given BasicManager
+ */
+ void reset( BasicManager* _pBasicManager );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
+ getLibraryContainer( ContainerType _eType );
+
+ /** determines whether any of our library containers is modified, i.e. returns <TRUE/>
+ in its isContainerModified call.
+ */
+ bool isAnyContainerModified() const;
+
+ /** calls the storeLibraries at both our script and basic library container
+ */
+ void storeAllLibraries();
+
+ /** calls the setStorage at all our XStorageBasedLibraryContainer.
+ */
+ void setStorage(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxStorage
+ );
+
+ /** calls the storeLibrariesToStorage at all our XStorageBasedLibraryContainer.
+ */
+ void storeLibrariesToStorage(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxStorage
+ );
+
+
+ /** checks if any modules in the SfxLibraryContainer exceed the binary
+ limits.
+ */
+ sal_Bool LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< rtl::OUString >& sModules );
+
+
+private:
+ void impl_releaseContainers();
+
+ bool impl_getContainer(
+ ContainerType _eType,
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer >& _out_rxContainer );
+};
+
+class SfxApplicationScriptLibraryContainer
+{
+public:
+ // Service
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > impl_getStaticSupportedServiceNames();
+ static ::rtl::OUString impl_getStaticImplementationName();
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_createInstance
+ ( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager )
+ throw( ::com::sun::star::uno::Exception );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > impl_createFactory
+ ( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+
+};
+
+class SfxApplicationDialogLibraryContainer
+{
+public:
+ // Service
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > impl_getStaticSupportedServiceNames();
+ static ::rtl::OUString impl_getStaticImplementationName();
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_createInstance
+ ( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager )
+ throw( ::com::sun::star::uno::Exception );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > impl_createFactory
+ ( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+
+};
+
+#endif // APPBASLIB_HXX
+
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
new file mode 100644
index 000000000000..91305eb95cce
--- /dev/null
+++ b/sfx2/source/inc/appdata.hxx
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_APPDATA_HXX
+#define _SFX_APPDATA_HXX
+
+#include <tools/link.hxx>
+#include <tools/list.hxx>
+#include <svl/lstner.hxx>
+#include <vcl/timer.hxx>
+#include <tools/string.hxx>
+#include "rtl/ref.hxx"
+
+#include <com/sun/star/frame/XModel.hpp>
+
+#include "bitset.hxx"
+
+class SfxApplication;
+class SvStrings;
+class SfxProgress;
+class SfxChildWinFactArr_Impl;
+class SfxDdeDocTopics_Impl;
+class DdeService;
+class SfxEventConfiguration;
+class SfxMacroConfig;
+class SfxItemPool;
+class SfxInitLinkList;
+class SfxFilterMatcher;
+class SvUShorts;
+class ISfxTemplateCommon;
+class SfxFilterMatcher;
+class SfxStatusDispatcher;
+class SfxDdeTriggerTopic_Impl;
+class SfxDocumentTemplates;
+class SfxFrameArr_Impl;
+class SvtSaveOptions;
+class SvtUndoOptions;
+class SvtHelpOptions;
+class SfxObjectFactory;
+class SfxObjectShell;
+class ResMgr;
+class Window;
+class SfxTbxCtrlFactArr_Impl;
+class SfxStbCtrlFactArr_Impl;
+class SfxMenuCtrlFactArr_Impl;
+class SfxViewFrameArr_Impl;
+class SfxViewShellArr_Impl;
+class SfxObjectShellArr_Impl;
+class ResMgr;
+class SimpleResMgr;
+class SfxViewFrame;
+class SfxSlotPool;
+class SfxResourceManager;
+class SfxDispatcher;
+class SfxInterface;
+class BasicManager;
+class SfxBasicManagerHolder;
+class SfxBasicManagerCreationListener;
+
+namespace sfx2 { namespace appl { class ImeStatusWindow; } }
+
+//=========================================================================
+// SfxAppData_Impl
+//=========================================================================
+
+class SfxAppData_Impl
+{
+public:
+ IndexBitSet aIndexBitSet; // for counting noname documents
+ String aLastDir; // for IO dialog
+
+ // DDE stuff
+ DdeService* pDdeService;
+ SfxDdeDocTopics_Impl* pDocTopics;
+ SfxDdeTriggerTopic_Impl* pTriggerTopic;
+ DdeService* pDdeService2;
+
+ // single instance classes
+ SfxChildWinFactArr_Impl* pFactArr;
+ SfxFrameArr_Impl* pTopFrames;
+
+ // special members
+ SfxInitLinkList* pInitLinkList;
+
+ // application members
+ SfxFilterMatcher* pMatcher;
+ ResMgr* pLabelResMgr;
+ SfxStatusDispatcher* pAppDispatch;
+ SfxDocumentTemplates* pTemplates;
+
+ // global pointers
+ SfxItemPool* pPool;
+ SfxEventConfiguration* pEventConfig;
+ SvUShorts* pDisabledSlotList;
+ SvStrings* pSecureURLs;
+ SvtSaveOptions* pSaveOptions;
+ SvtUndoOptions* pUndoOptions;
+ SvtHelpOptions* pHelpOptions;
+
+ // "current" functionality
+ SfxProgress* pProgress;
+ ISfxTemplateCommon* pTemplateCommon;
+
+ USHORT nDocModalMode; // counts documents in modal mode
+ USHORT nAutoTabPageId;
+ USHORT nBasicCallLevel;
+ USHORT nRescheduleLocks;
+ USHORT nInReschedule;
+ USHORT nAsynchronCalls;
+
+ rtl::Reference< sfx2::appl::ImeStatusWindow > m_xImeStatusWindow;
+
+ SfxTbxCtrlFactArr_Impl* pTbxCtrlFac;
+ SfxStbCtrlFactArr_Impl* pStbCtrlFac;
+ SfxMenuCtrlFactArr_Impl* pMenuCtrlFac;
+ SfxViewFrameArr_Impl* pViewFrames;
+ SfxViewShellArr_Impl* pViewShells;
+ SfxObjectShellArr_Impl* pObjShells;
+ ResMgr* pSfxResManager;
+ ResMgr* pOfaResMgr;
+ SimpleResMgr* pSimpleResManager;
+ SfxBasicManagerHolder* pBasicManager;
+ SfxBasicManagerCreationListener*
+ pBasMgrListener;
+ SfxViewFrame* pViewFrame;
+ SfxSlotPool* pSlotPool;
+ SfxResourceManager* pResMgr;
+ SfxDispatcher* pAppDispat; // Dispatcher falls kein Doc
+ SfxInterface** pInterfaces;
+
+ USHORT nDocNo; // Laufende Doc-Nummer (AutoName)
+ USHORT nInterfaces;
+
+ BOOL bDispatcherLocked:1; // nichts ausf"uhren
+ BOOL bDowning:1; // TRUE ab Exit und danach
+ BOOL bInQuit : 1;
+ BOOL bInvalidateOnUnlock : 1;
+ BOOL bODFVersionWarningLater : 1;
+
+ SfxAppData_Impl( SfxApplication* );
+ ~SfxAppData_Impl();
+
+ void UpdateApplicationSettings( BOOL bDontHide );
+ SfxDocumentTemplates* GetDocumentTemplates();
+ void DeInitDDE();
+
+ /** called when the Application's BasicManager has been created. This can happen
+ explicitly in SfxApplication::GetBasicManager, or implicitly if a document's
+ BasicManager is created before the application's BasicManager exists.
+ */
+ void OnApplicationBasicManagerCreated( BasicManager& _rManager );
+};
+
+#endif // #ifndef _SFX_APPDATA_HXX
+
+
diff --git a/sfx2/source/inc/applet.hxx b/sfx2/source/inc/applet.hxx
new file mode 100644
index 000000000000..5b7d61ebe314
--- /dev/null
+++ b/sfx2/source/inc/applet.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_APPLET_HXX
+#define _SFX_APPLET_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <cppuhelper/implbase6.hxx>
+
+#include <rtl/ustring.hxx>
+#include <svl/ownlist.hxx>
+#include <svl/itemprop.hxx>
+
+namespace com { namespace sun { namespace star { namespace uno {
+ class XComponentContext;
+ class XInterface;
+} } } }
+
+class SjApplet2;
+namespace sfx2
+{
+
+class AppletObject : public ::cppu::WeakImplHelper6 <
+ com::sun::star::util::XCloseable,
+ com::sun::star::lang::XEventListener,
+ com::sun::star::frame::XSynchronousFrameLoader,
+ com::sun::star::ui::dialogs::XExecutableDialog,
+ com::sun::star::lang::XInitialization,
+ com::sun::star::beans::XPropertySet >
+{
+ com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >
+ mxContext;
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > mxObj;
+ SfxItemPropertyMap maPropMap;
+ SvCommandList maCmdList;
+ ::rtl::OUString maClass;
+ ::rtl::OUString maName;
+ ::rtl::OUString maCodeBase;
+ ::rtl::OUString maDocBase;
+ SjApplet2* mpApplet;
+ sal_Bool mbMayScript;
+
+ AppletObject( AppletObject & ); // not defined
+ void operator =( AppletObject & ); // not defined
+
+ AppletObject( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rContext );
+ ~AppletObject();
+
+ virtual sal_Bool SAL_CALL load( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& lDescriptor,
+ const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame ) throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL cancel() throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw( com::sun::star::util::CloseVetoException, com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException) ;
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL execute( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::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);
+
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& sServiceName )
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ impl_getStaticSupportedServiceNames();
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL impl_createInstance(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& xContext )
+ throw( ::com::sun::star::uno::Exception );
+
+public:
+ static ::rtl::OUString impl_getStaticImplementationName();
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ impl_createFactory();
+};
+
+}
+#endif
diff --git a/sfx2/source/inc/doctemplates.hxx b/sfx2/source/inc/doctemplates.hxx
new file mode 100644
index 000000000000..5e962b93a117
--- /dev/null
+++ b/sfx2/source/inc/doctemplates.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_DOCTEMPLATES_HXX_
+#define _SFX_DOCTEMPLATES_HXX_
+
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/frame/XDocumentTemplates.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/lang/XLocalizable.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/ucb/XContent.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <ucbhelper/content.hxx>
+#include <sfx2/sfxuno.hxx>
+
+//--------------------------------------------------------------------------------------------------------
+
+#define UNOLOCALE ::com::sun::star::lang::Locale
+#define REFERENCE ::com::sun::star::uno::Reference
+#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
+#define PROPERTYVALUE ::com::sun::star::beans::PropertyValue
+#define XCONTENT ::com::sun::star::ucb::XContent
+#define XDOCUMENTTEMPLATES ::com::sun::star::frame::XDocumentTemplates
+#define XINTERFACE ::com::sun::star::uno::XInterface
+#define XLOCALIZABLE ::com::sun::star::lang::XLocalizable
+#define XMODEL ::com::sun::star::frame::XModel
+#define XMULTISERVICEFACTORY ::com::sun::star::lang::XMultiServiceFactory
+#define XNAMEACCESS ::com::sun::star::container::XNameAccess
+#define XSERVICEINFO ::com::sun::star::lang::XServiceInfo
+#define XSTORABLE ::com::sun::star::frame::XStorable
+
+//--------------------------------------------------------------------------------------------------------
+
+class SfxDocTplService_Impl;
+
+class SfxDocTplService: public ::cppu::WeakImplHelper3< XLOCALIZABLE, XDOCUMENTTEMPLATES, XSERVICEINFO >
+{
+ SfxDocTplService_Impl *pImp;
+
+public:
+ SFX_DECL_XSERVICEINFO
+
+ SfxDocTplService( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+ ~SfxDocTplService();
+
+ // --- XLocalizable ---
+ void SAL_CALL setLocale( const UNOLOCALE & eLocale ) throw( RUNTIMEEXCEPTION );
+ UNOLOCALE SAL_CALL getLocale() throw( RUNTIMEEXCEPTION );
+
+ // --- XDocumentTemplates ---
+ REFERENCE< XCONTENT > SAL_CALL getContent() throw( RUNTIMEEXCEPTION );
+ sal_Bool SAL_CALL storeTemplate( const ::rtl::OUString& GroupName,
+ const ::rtl::OUString& TemplateName,
+ const REFERENCE< XSTORABLE >& Storable ) throw( RUNTIMEEXCEPTION );
+ sal_Bool SAL_CALL addTemplate( const ::rtl::OUString& GroupName,
+ const ::rtl::OUString& TemplateName,
+ const ::rtl::OUString& SourceURL ) throw( RUNTIMEEXCEPTION );
+ sal_Bool SAL_CALL removeTemplate( const ::rtl::OUString& GroupName,
+ const ::rtl::OUString& TemplateName ) throw( RUNTIMEEXCEPTION );
+ sal_Bool SAL_CALL renameTemplate( const ::rtl::OUString& GroupName,
+ const ::rtl::OUString& OldTemplateName,
+ const ::rtl::OUString& NewTemplateName ) throw( RUNTIMEEXCEPTION );
+ sal_Bool SAL_CALL addGroup( const ::rtl::OUString& GroupName ) throw( RUNTIMEEXCEPTION );
+ sal_Bool SAL_CALL removeGroup( const ::rtl::OUString& GroupName ) throw( RUNTIMEEXCEPTION );
+ sal_Bool SAL_CALL renameGroup( const ::rtl::OUString& OldGroupName,
+ const ::rtl::OUString& NewGroupName ) throw( RUNTIMEEXCEPTION );
+ void SAL_CALL update() throw( RUNTIMEEXCEPTION );
+};
+
+#endif
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
new file mode 100644
index 000000000000..e012eea39c2d
--- /dev/null
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_EVENTSUPPLIER_HXX_
+#define _SFX_EVENTSUPPLIER_HXX_
+
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/container/XNameReplace.hpp>
+#include <com/sun/star/container/XSet.hpp>
+#include <com/sun/star/document/XEventListener.hpp>
+#include <com/sun/star/document/XEventBroadcaster.hpp>
+#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
+#include <com/sun/star/document/XDocumentEventListener.hpp>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/task/XJobExecutor.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Type.hxx>
+#include <sal/types.h>
+#include <osl/mutex.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase7.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/sequenceasvector.hxx>
+#include <sfx2/sfxuno.hxx>
+
+#include <vos/mutex.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <svl/lstner.hxx>
+#include <unotools/eventcfg.hxx>
+
+//--------------------------------------------------------------------------------------------------------
+
+#define NOSUCHELEMENTEXCEPTION ::com::sun::star::container::NoSuchElementException
+#define XNAMEREPLACE ::com::sun::star::container::XNameReplace
+#define DOCEVENTOBJECT ::com::sun::star::document::EventObject
+#define XEVENTBROADCASTER ::com::sun::star::document::XEventBroadcaster
+#define XDOCEVENTLISTENER ::com::sun::star::document::XEventListener
+#define XEVENTSSUPPLIER ::com::sun::star::document::XEventsSupplier
+#define XJOBEXECUTOR ::com::sun::star::task::XJobExecutor
+#define EVENTOBJECT ::com::sun::star::lang::EventObject
+#define ILLEGALARGUMENTEXCEPTION ::com::sun::star::lang::IllegalArgumentException
+#define WRAPPEDTARGETEXCEPTION ::com::sun::star::lang::WrappedTargetException
+#define ANY ::com::sun::star::uno::Any
+#define REFERENCE ::com::sun::star::uno::Reference
+#define WEAKREFERENCE ::com::sun::star::uno::WeakReference
+#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
+#define SEQUENCE ::com::sun::star::uno::Sequence
+#define UNOTYPE ::com::sun::star::uno::Type
+#define OUSTRING ::rtl::OUString
+#define OINTERFACECONTAINERHELPER ::cppu::OInterfaceContainerHelper
+
+//--------------------------------------------------------------------------------------------------------
+
+class SfxObjectShell;
+class SfxBaseModel;
+class SvxMacro;
+
+//--------------------------------------------------------------------------------------------------------
+
+class SfxEvents_Impl : public ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameReplace, ::com::sun::star::document::XEventListener >
+{
+ SEQUENCE< OUSTRING > maEventNames;
+ SEQUENCE< ANY > maEventData;
+ REFERENCE< XEVENTBROADCASTER > mxBroadcaster;
+ ::osl::Mutex maMutex;
+ SfxObjectShell *mpObjShell;
+
+ sal_Bool Warn_Impl( const String& );
+
+public:
+ SfxEvents_Impl( SfxObjectShell* pShell,
+ REFERENCE< XEVENTBROADCASTER > xBroadcaster );
+ ~SfxEvents_Impl();
+
+ // --- XNameReplace ---
+ virtual void SAL_CALL replaceByName( const OUSTRING & aName, const ANY & aElement )
+ throw( ILLEGALARGUMENTEXCEPTION, NOSUCHELEMENTEXCEPTION,
+ WRAPPEDTARGETEXCEPTION, RUNTIMEEXCEPTION );
+
+ // --- XNameAccess ( parent of XNameReplace ) ---
+ virtual ANY SAL_CALL getByName( const OUSTRING& aName )
+ throw( NOSUCHELEMENTEXCEPTION, WRAPPEDTARGETEXCEPTION,
+ RUNTIMEEXCEPTION );
+ virtual SEQUENCE< OUSTRING > SAL_CALL getElementNames() throw ( RUNTIMEEXCEPTION );
+ virtual sal_Bool SAL_CALL hasByName( const OUSTRING& aName ) throw ( RUNTIMEEXCEPTION );
+
+ // --- XElementAccess ( parent of XNameAccess ) ---
+ virtual UNOTYPE SAL_CALL getElementType() throw ( RUNTIMEEXCEPTION );
+ virtual sal_Bool SAL_CALL hasElements() throw ( RUNTIMEEXCEPTION );
+
+ // --- ::document::XEventListener ---
+ virtual void SAL_CALL notifyEvent( const DOCEVENTOBJECT& aEvent )
+ throw( RUNTIMEEXCEPTION );
+
+ // --- ::lang::XEventListener ---
+ virtual void SAL_CALL disposing( const EVENTOBJECT& Source )
+ throw( RUNTIMEEXCEPTION );
+
+ static SvxMacro* ConvertToMacro( const ANY& rElement, SfxObjectShell* pDoc, BOOL bBlowUp );
+ static void BlowUpMacro( const ANY& rIn, ANY& rOut, SfxObjectShell* pDoc );
+};
+
+//=============================================================================
+struct ModelCollectionMutexBase
+{
+ public:
+ ::osl::Mutex m_aLock;
+};
+
+//=============================================================================
+typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > > TModelList;
+
+//=============================================================================
+class ModelCollectionEnumeration : public ModelCollectionMutexBase
+ , public ::cppu::WeakImplHelper1< ::com::sun::star::container::XEnumeration >
+{
+
+ //-------------------------------------------------------------------------
+ // member
+ //-------------------------------------------------------------------------
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMGR;
+ TModelList m_lModels;
+ TModelList::iterator m_pEnumerationIt;
+
+ //-------------------------------------------------------------------------
+ // native interface
+ //-------------------------------------------------------------------------
+ public:
+ ModelCollectionEnumeration(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMGR);
+ virtual ~ModelCollectionEnumeration();
+ void setModelList(const TModelList& rList);
+
+ //-------------------------------------------------------------------------
+ // uno interface
+ //-------------------------------------------------------------------------
+ public:
+
+ // css.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 );
+};
+
+//=============================================================================
+class SfxGlobalEvents_Impl : public ModelCollectionMutexBase
+ , public ::cppu::WeakImplHelper7< ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::document::XEventsSupplier
+ , ::com::sun::star::document::XEventBroadcaster
+ , ::com::sun::star::document::XDocumentEventBroadcaster
+ , ::com::sun::star::document::XEventListener
+ , ::com::sun::star::document::XDocumentEventListener
+ , ::com::sun::star::container::XSet >
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMGR;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xEvents;
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::document::XEventListener > m_xJobExecutorListener;
+ OINTERFACECONTAINERHELPER m_aLegacyListeners;
+ OINTERFACECONTAINERHELPER m_aDocumentListeners;
+ TModelList m_lModels;
+ GlobalEventConfig* pImp;
+
+public:
+ SfxGlobalEvents_Impl(const com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& xSMGR);
+ virtual ~SfxGlobalEvents_Impl();
+
+ SFX_DECL_XSERVICEINFO
+
+ // css.document.XEventBroadcaster
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& xListener)
+ throw(::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& xListener)
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // css.document.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);
+
+ // css.document.XEventListener
+ virtual void SAL_CALL notifyEvent(const ::com::sun::star::document::EventObject& aEvent)
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // css.document.XDocumentEventListener
+ virtual void SAL_CALL documentEventOccured( const ::com::sun::star::document::DocumentEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // css.container.XSet
+ virtual sal_Bool SAL_CALL has(const ::com::sun::star::uno::Any& aElement)
+ throw(::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL insert(const ::com::sun::star::uno::Any& aElement)
+ throw(::com::sun::star::lang::IllegalArgumentException ,
+ ::com::sun::star::container::ElementExistException,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL remove(const ::com::sun::star::uno::Any& aElement)
+ throw(::com::sun::star::lang::IllegalArgumentException ,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // css.container.XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // css.container.XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL hasElements()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // css.lang.XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& aEvent)
+ throw(::com::sun::star::uno::RuntimeException);
+
+private:
+
+ // threadsafe
+ void implts_notifyJobExecution(const ::com::sun::star::document::EventObject& aEvent);
+ void implts_checkAndExecuteEventBindings(const ::com::sun::star::document::DocumentEvent& aEvent);
+ void implts_notifyListener(const ::com::sun::star::document::DocumentEvent& aEvent);
+
+ // not threadsafe
+ TModelList::iterator impl_searchDoc(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel);
+};
+
+#endif
diff --git a/sfx2/source/inc/fltfnc.hxx b/sfx2/source/inc/fltfnc.hxx
new file mode 100644
index 000000000000..0a078a33c5be
--- /dev/null
+++ b/sfx2/source/inc/fltfnc.hxx
@@ -0,0 +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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXFLTFNC_HXX
+#define _SFXFLTFNC_HXX
+
+#include <sfx2/fcontnr.hxx>
+
+BOOL SfxIsHelpEntryURL( const String &rURL, const String &rExtMask );
+
+#endif
+
diff --git a/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx
new file mode 100644
index 000000000000..b4aed7ccdd99
--- /dev/null
+++ b/sfx2/source/inc/fltoptint.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/document/FilterOptionsRequest.hpp>
+#include <com/sun/star/document/XInteractionFilterOptions.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <framework/interaction.hxx>
+
+using namespace ::framework;
+
+class FilterOptionsContinuation : public ContinuationBase< ::com::sun::star::document::XInteractionFilterOptions >
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties;
+
+public:
+ virtual void SAL_CALL setFilterOptions( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rProp ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getFilterOptions( ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+class RequestFilterOptions : 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;
+
+ ContinuationAbort* m_pAbort;
+
+ FilterOptionsContinuation* m_pOptions;
+
+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(); }
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > getFilterOptions()
+ {
+ return m_pOptions->getFilterOptions();
+ }
+
+ 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 );
+};
+
diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx
new file mode 100644
index 000000000000..45aed74b154a
--- /dev/null
+++ b/sfx2/source/inc/helper.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_HELPER_HXX
+#define _SFX_HELPER_HXX
+
+// include ---------------------------------------------------------------
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/ucb/NameClash.hpp>
+
+#include <tools/string.hxx>
+#include <tools/errcode.hxx>
+#include <tools/bigint.hxx>
+
+// class SfxContentHelper ------------------------------------------------
+
+class SfxContentHelper
+{
+private:
+ static sal_Bool Transfer_Impl( const String& rSource, const String& rDest, sal_Bool bMoveData,
+ sal_Int32 nNameClash );
+
+public:
+ static sal_Bool IsDocument( const String& rContent );
+ static sal_Bool IsFolder( const String& rContent );
+ static sal_Bool GetTitle( const String& rContent, String& rTitle );
+ static sal_Bool Kill( const String& rContent );
+
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ GetFolderContents( const String& rFolder, sal_Bool bFolder, sal_Bool bSorted = sal_False );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ GetFolderContentProperties( const String& rFolder, sal_Bool bFolder );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ GetResultSet( const String& rURL );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ GetHelpTreeViewContents( const String& rURL );
+ static String GetActiveHelpString( const String& rURL );
+ static sal_Bool IsHelpErrorDocument( const String& rURL );
+
+ static sal_Bool CopyTo( const String& rSource, const String& rDest );
+ static sal_Bool MoveTo( const String& rSource, const String& rDest, sal_Int32 nNameClash = com::sun::star::ucb::NameClash::ERROR );
+
+ static sal_Bool MakeFolder( const String& rFolder );
+ static ErrCode QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes );
+ static ULONG GetSize( const String& rContent );
+
+ // please don't use this!
+ static sal_Bool Exists( const String& rContent );
+ static sal_Bool Find( const String& rFolder, const String& rName, String& rFile );
+};
+
+#endif // #ifndef _SFX_HELPER_HXX
+
+
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
new file mode 100644
index 000000000000..29ad461d18da
--- /dev/null
+++ b/sfx2/source/inc/helpid.hrc
@@ -0,0 +1,361 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_HELPID_HRC
+#define _SFX_HELPID_HRC
+
+// include ------------------------------------------------------------------
+
+#include <svl/solar.hrc>
+
+// Help-Ids -----------------------------------------------------------------
+
+#define HID_GLOBAL_FALLBACK 0xFFFFFFFF
+
+#define HID_FILTER_SELECT (HID_SFX_START + 0)
+#define HID_USERDEFBMP (HID_SFX_START + 1)
+#define HID_DOCINFO_EDT (HID_SFX_START + 2)
+#define HID_PASSWD (HID_SFX_START + 3)
+#define HID_PRINTMONITOR (HID_SFX_START + 4)
+#define HID_CONFIG_OBJECTBAR (HID_SFX_START + 5)
+#define HID_MANAGE_STYLES (HID_SFX_START + 6)
+#define HID_CONFIG_EVENT (HID_SFX_START + 7)
+#define HID_DOCINFODESC (HID_SFX_START + 8)
+#define HID_DOCINFODOC (HID_SFX_START + 9)
+#define HID_DOCINFOUSER (HID_SFX_START + 10)
+#define HID_BOOKMARKPROPS (HID_SFX_START + 14)
+#define HID_BOOKGROUPPROPS (HID_SFX_START + 15)
+#define HID_BOOKFILEPROPS (HID_SFX_START + 16)
+#define HID_NEWS_SERVERPROPS (HID_SFX_START + 20)
+#define HID_NEWS_RULEPAGE (HID_SFX_START + 21)
+#define HID_MAILINTRAYPROPS (HID_SFX_START + 23)
+#define HID_DOCINFORELOAD (HID_SFX_START + 24)
+#define HID_NEWS_GROUPPAGE (HID_SFX_START + 25)
+#define HID_NEWS_SERVERPAGE (HID_SFX_START + 26)
+#define HID_FILEDLG_STANDARD (HID_SFX_START + 27)
+#define HID_FILEDLG_MANAGER (HID_SFX_START + 28)
+#define HID_FILEDLG_URL (HID_SFX_START + 29)
+#define HID_FILEDLG_FILE (HID_SFX_START + 30)
+#define HID_FILEDLG_USE_PASSWD (HID_SFX_START + 31)
+#define HID_FILEDLG_READ_ONLY (HID_SFX_START + 32)
+#define HID_EXPLORERCONTROL (HID_SFX_START + 33)
+#define HID_BROWSERCONTROL (HID_SFX_START + 34)
+#define HID_CTL_ORGANIZER_LEFT (HID_SFX_START + 35)
+#define HID_CTL_ORGANIZER_RIGHT (HID_SFX_START + 36)
+#define HID_EXPLMAILSRV_GENERAL_PAGE (HID_SFX_START + 37)
+#define HID_EXPLMAILSRV_PROTOCOL_PAGE (HID_SFX_START + 38)
+#define HID_EXPLMAILSRV_DATAMATCH_PAGE (HID_SFX_START + 39)
+#define HID_EXPLMAILSRV_SENDJOURNAL_PAGE (HID_SFX_START + 40)
+#define HID_EXPLMAIL_GENERAL_PAGE (HID_SFX_START + 41)
+#define HID_NEWS_CTL_RULES (HID_SFX_START + 42)
+#define HID_NEWS_CTL_GROUPS (HID_SFX_START + 43)
+#define HID_CONFIG_OBJECTBAR_CTL (HID_SFX_START + 44)
+#define HID_NEWS_QUICKSEARCH (HID_SFX_START + 45)
+#define HID_NEWS_SERVERVIEWPROPS (HID_SFX_START + 46)
+#define HID_NEWS_SHOWARTICLEPROPS (HID_SFX_START + 47)
+#define HID_NEWS_SHOWGROUPPROPS (HID_SFX_START + 48)
+#define HID_NEWS_USER (HID_SFX_START + 49)
+#define HID_MULTISELECTION_GENERAL_PAGE (HID_SFX_START + 50)
+#define HID_LINK_GENERAL_PAGE (HID_SFX_START + 51)
+#define HID_LINK_ADDRESS_PAGE (HID_SFX_START + 52)
+#define HID_FOLDER_GENERAL_PAGE (HID_SFX_START + 53)
+#define HID_FILE_GENERAL_PAGE (HID_SFX_START + 54)
+#define HID_FTP_GENERAL_PAGE (HID_SFX_START + 55)
+#define HID_PRINT_OPTIONS (HID_SFX_START + 56)
+#define HID_PREVIEW_FRAME (HID_SFX_START + 57)
+#define HID_DOCINFO_FRAME (HID_SFX_START + 58)
+#define HID_EXPLORER_FRAME (HID_SFX_START + 59)
+#define HID_APP_WIN (HID_SFX_START + 60)
+#define HID_TEMPLATE_FMT (HID_SFX_START + 61)
+#define HID_TEMPLATE_FILTER (HID_SFX_START + 62)
+#define HID_FTPSERVER_PAGE (HID_SFX_START + 63)
+#define HID_DLG_SFX_EXP_SEARCH (HID_SFX_START + 65)
+#define HID_TP_SFX_EXP_SEARCH_CRITERIA (HID_SFX_START + 66)
+#define HID_TP_SFX_EXP_SEARCH_PLACE (HID_SFX_START + 67)
+#define HID_SEARCH_DLG_TABLB (HID_SFX_START + 68)
+#define HID_TEMPLDLG_NEWBYEXAMPLE (HID_SFX_START + 69)
+#define HID_TEMPLDLG_UPDATEBYEXAMPLE (HID_SFX_START + 70)
+#define HID_TEMPLDLG_WATERCAN (HID_SFX_START + 71)
+#define HID_DESKTOP (HID_SFX_START + 78)
+#define HID_EXPLORERTOOLSTOOLBOX (HID_SFX_START + 79)
+#define HID_EXPLOREROBJECTTOOLBOX (HID_SFX_START + 80)
+#define HID_RECORDINGTOOLBOX (HID_SFX_START + 81)
+#define HID_FULLSCREENTOOLBOX (HID_SFX_START + 82)
+#define HID_HELPBAR (HID_SFX_START + 83)
+#define HID_ENVTOOLBOX (HID_SFX_START + 84)
+#define HID_FRAMESETEDIT_TOOLBOX (HID_SFX_START + 85)
+#define HID_NAVIGATOR_WINDOW (HID_SFX_START + 86)
+#define HID_TABDLG_RESET_BTN (HID_SFX_START + 89)
+#define HID_TABDLG_STANDARD_BTN (HID_SFX_START + 90)
+#define HID_HELPAGENT_TIP_BOX (HID_SFX_START + 91)
+#define HID_TEMPLDLG_TOOLBOX_LEFT (HID_SFX_START + 92)
+#define HID_TEMPLDLG_TOOLBOX_RIGHT (HID_SFX_START + 93)
+#define HID_EXPLORER_SRCH_COUNT (HID_SFX_START + 94)
+#define HID_BEAMER_SORT_ASCENDING (HID_SFX_START + 95)
+#define HID_BEAMER_SORT_DESCENDING (HID_SFX_START + 96)
+#define HID_EXPLORER_SRCH_LATEST_COUNT (HID_SFX_START + 97)
+#define HID_CONFIG_EVENT_OFFICE_BASED (HID_SFX_START + 98)
+#define HID_CONFIG_EVENT_DOCUMENT_BASED (HID_SFX_START + 99)
+#define HID_ORGANIZE_NEW (HID_SFX_START + 100)
+#define HID_ORGANIZE_DELETE (HID_SFX_START + 101)
+#define HID_ORGANIZE_EDIT (HID_SFX_START + 102)
+#define HID_ORGANIZE_COPY_FROM (HID_SFX_START + 103)
+#define HID_ORGANIZE_COPY_TO (HID_SFX_START + 104)
+#define HID_ORGANIZE_PRINT (HID_SFX_START + 105)
+#define HID_ORGANIZE_PRINTER_SETUP (HID_SFX_START + 106)
+#define HID_ORGANIZE_RESCAN (HID_SFX_START + 107)
+#define HID_STYLIST_NEW (HID_SFX_START + 108)
+#define HID_STYLIST_EDIT (HID_SFX_START + 109)
+#define HID_STYLIST_DELETE (HID_SFX_START + 110)
+#define HID_EXPLORERMENU_ARRANGEICONS (HID_SFX_START + 111)
+#define HID_EXPLORERMENU_ARRANGEICONS_ONGRID (HID_SFX_START + 112)
+#define HID_EXPLORERMENU_FIXEDICONPOS (HID_SFX_START + 113)
+#define HID_EXPLORERMENU_OPEN (HID_SFX_START + 114)
+#define HID_EXPLORERMENU_PRINT (HID_SFX_START + 115)
+#define HID_EXPLORERMENU_SEARCH (HID_SFX_START + 116)
+#define HID_EXPLORERMENU_COPY (HID_SFX_START + 117)
+#define HID_EXPLORERMENU_DELETE (HID_SFX_START + 118)
+#define HID_EXPLORERMENU_CREATELINK (HID_SFX_START + 119)
+#define HID_EXPLORERMENU_EDITPROPERTIES (HID_SFX_START + 120)
+#define HID_EXPLORERMENU_DOWNLOAD (HID_SFX_START + 121)
+#define HID_EXPLORERMENU_STDTEMPLATE (HID_SFX_START + 122)
+#define HID_EXPLORERDLG_FILELIST (HID_SFX_START + 124)
+#define HID_PDFOLDERS_WORKPLACE (HID_SFX_START + 125)
+#define HID_PDFOLDERS_EXPLORER (HID_SFX_START + 126)
+#define HID_PDFOLDERS_STANDARD (HID_SFX_START + 127)
+#define HID_PDFOLDERS_ROOT (HID_SFX_START + 128)
+#define HID_PDFOLDERS_DESKTOP (HID_SFX_START + 129)
+#define HID_CNTMENU_REMOVE_GROUP (HID_SFX_START + 130)
+#define HID_CNTMENU_CLEAR_CACHE (HID_SFX_START + 131)
+#define HID_CNT_SYNC_INFO_DLG (HID_SFX_START + 132)
+#define HID_CNT_REMOVE_REMOVEDLIST (HID_SFX_START + 133)
+#define HID_CNT_ABORT_DIALOG (HID_SFX_START + 134)
+#define HID_CNT_PAGE_PRJ_DATAEXCHANGE (HID_SFX_START + 135)
+#define HID_CHAOSDOC_OBJECTBAR_FILE (HID_SFX_START + 136)
+#define HID_CHAOSDOC_OBJECTBAR_MESSAGE (HID_SFX_START + 137)
+#define HID_CHAOSDOC_MN_PART_OPEN (HID_SFX_START + 138)
+#define HID_CHAOSDOC_MN_PART_DELETE (HID_SFX_START + 139)
+#define HID_CHAOSDOC_MN_PART_RENAME (HID_SFX_START + 140)
+#define HID_CHAOSDOC_MN_PART_SAVEAS (HID_SFX_START + 141)
+#define HID_EXPLORER_DOCVIEW_ICON (HID_SFX_START + 142)
+#define HID_EXPLORER_DOCVIEW_DETAILS (HID_SFX_START + 143)
+#define HID_CHAOSDOC_WIN (HID_SFX_START + 144)
+#define HID_CHAOSDOC_WIN_HEADER (HID_SFX_START + 145)
+#define HID_CHAOSDOC_WIN_PARTS (HID_SFX_START + 146)
+#define HID_CHAOSDOC_WIN_BODY (HID_SFX_START + 147)
+#define HID_CNT_INSERT_COLUMN (HID_SFX_START + 148)
+#define HID_CNT_REMOVE_COLUMN (HID_SFX_START + 149)
+#define HID_CNT_OPT_WIDTH (HID_SFX_START + 150)
+#define HID_CNT_SORT_ASC (HID_SFX_START + 151)
+#define HID_CNT_SORT_DESC (HID_SFX_START + 152)
+#define HID_CNT_RULEPG_OPEN_DIR (HID_SFX_START + 153)
+#define HID_CHAOSDOC_MN_HEADER_ADDRESSBOOK (HID_SFX_START + 154)
+#define HID_CHAOSDOC_MN_HEADER_COPYLINK (HID_SFX_START + 155)
+#define HID_CLEAN_CACHE (HID_SFX_START + 156)
+#define HID_SBOX_LOCATION (HID_SFX_START + 157)
+#define HID_SBOX_SUBSCRIBTION (HID_SFX_START + 158)
+#define HID_SBOX_CDF_SUBSCRIBTION (HID_SFX_START + 159)
+#define HID_SBOX_SCHEDULE (HID_SFX_START + 160)
+#define HID_SBOX_NOTIFICATION (HID_SFX_START + 161)
+#define HID_SBOX_SDC_GENERAL (HID_SFX_START + 162)
+#define HID_BRWBOX_HEADERBAR (HID_SFX_START + 163)
+#define HID_CANNOT_CREATE_BMK_HERE (HID_SFX_START + 164)
+#define HID_CREATE_BOOKMARK (HID_SFX_START + 165)
+#define HID_TASKBAR (HID_SFX_START + 166)
+#define HID_TASKBUTTONBAR (HID_SFX_START + 167)
+#define HID_TASKTOOLBAR (HID_SFX_START + 168)
+#define HID_CHAOSDOC_SHOW_FSYS_EXTENSION (HID_SFX_START + 169)
+#define HID_CNT_FILE (HID_SFX_START + 170)
+#define HID_CHAOSDOC_MN_BODY_OPENLINK (HID_SFX_START + 171)
+#define HID_CHAOSDOC_MN_BODY_OPENLINK_BLANK (HID_SFX_START + 172)
+#define HID_CHAOSDOC_MN_BODY_DOWNLOAD (HID_SFX_START + 173)
+#define HID_CHAOSDOC_MN_BODY_ADDBOOKMARK (HID_SFX_START + 174)
+#define HID_OPEN_MENU_CNT (HID_SFX_START + 175)
+#define HID_CNT_OPEN_AS_TEMPLATE (HID_SFX_START + 176)
+#define HID_CNT_OPEN_AS_DOC (HID_SFX_START + 177)
+#define HID_PDFOLDERS_TEMPLATE (HID_SFX_START + 178)
+#define HID_EXPLORER_ROOT (HID_SFX_START + 179)
+#define HID_RESET_URL (HID_SFX_START + 180)
+#define HID_PHONE_DIALOG (HID_SFX_START + 181)
+#define HID_QB_RESOLVE_LINK (HID_SFX_START + 182)
+#define HID_CHAOSDOC_MN_HEADER_FLAG_BOLD (HID_SFX_START + 183)
+#define HID_CHAOSDOC_MN_HEADER_FLAG_ITALIC (HID_SFX_START + 184)
+#define HID_CHAOSDOC_MN_HEADER_BIG_HEADER (HID_SFX_START + 185)
+#define HID_CHAOSDOC_MN_HEADER_TEMPLATE_HEADER (HID_SFX_START + 186)
+#define HID_CNT_MARK_THREAD_MARKED (HID_SFX_START + 187)
+#define HID_CNT_MARK_THREAD_UNMARKED (HID_SFX_START + 188)
+#define HID_CNT_DLG_SEARCH_BT_SHOW (HID_SFX_START + 189)
+#define HID_CNT_DLG_SEARCH_BT_UPDATE (HID_SFX_START + 190)
+#define HID_CNT_DLG_SEARCH_BT_SYNCHRONIZE (HID_SFX_START + 191)
+#define HID_CNT_DLG_SEARCH_BT_STOP (HID_SFX_START + 192)
+#define HID_CNT_PAGE_HEADER (HID_SFX_START + 193)
+#define HID_CNT_DLG_ADDRESS (HID_SFX_START + 194)
+#define HID_EXPLORERMENU_AUTO_ARRANGEICONS (HID_SFX_START + 195)
+#define HID_EXPLORERMENU_AUTO_ADJUSTICONS (HID_SFX_START + 196)
+#define HID_EXPLORERMENU_FREE_POSITIONING (HID_SFX_START + 197)
+#define HID_CNT_TARGET_MENU (HID_SFX_START + 198)
+#define HID_CNT_PAGE_DESCRIPTION (HID_SFX_START + 199)
+#define HID_CNT_LB_HEADER (HID_SFX_START + 200)
+#define HID_CNT_LB_DESCRIPTION (HID_SFX_START + 201)
+#define HID_GROUPVIEW_BIG_SYMBOLS (HID_SFX_START + 202)
+#define HID_GROUPVIEW_SMALL_SYMBOLS (HID_SFX_START + 203)
+#define HID_GROUPVIEW_ADD_GROUP (HID_SFX_START + 204)
+#define HID_GROUPVIEW_REMOVE_GROUP (HID_SFX_START + 205)
+#define HID_GROUPVIEW_RENAME_GROUP (HID_SFX_START + 206)
+#define HID_GROUPVIEW_ADD_BOOKMARK (HID_SFX_START + 207)
+#define HID_GROUPVIEW_TREE (HID_SFX_START + 208)
+#define HID_GROUPVIEW_ADD_AS_FOLDER (HID_SFX_START + 209)
+#define HID_GROUPVIEW_ADD_AS_BMK (HID_SFX_START + 210)
+#define HID_GROUPVIEW_REMOVE_BMK (HID_SFX_START + 211)
+#define HID_GROUPVIEW_CONTENT_BIG (HID_SFX_START + 212)
+#define HID_GROUPVIEW_CONTENT_SMALL (HID_SFX_START + 213)
+#define HID_GROUPVIEW_CONTENT_TREE (HID_SFX_START + 214)
+#define HID_GROUPVIEW_SHOW_DOCS (HID_SFX_START + 215)
+#define HID_EDIT_TEMPLATE (HID_SFX_START + 216)
+#define HID_PDFOLDERS_GRAPHICS (HID_SFX_START + 217)
+#define HID_FILEDLG_AUTOCOMPLETEBOX (HID_SFX_START + 218)
+#define HID_FILEDLG_SAVE_BTN (HID_SFX_START + 219)
+#define HID_FILEDLG_SAVE_FILENAME (HID_SFX_START + 220)
+#define HID_FILEDLG_SAVE_FILETYPE (HID_SFX_START + 221)
+#define HID_FILEDLG_INSERT_BTN (HID_SFX_START + 222)
+#define HID_FILEDLG_PATH_BTN (HID_SFX_START + 223)
+#define HID_FILEDLG_PATH_FILENAME (HID_SFX_START + 224)
+#define HID_FILEDLG_FOLDER_BTN (HID_SFX_START + 225)
+#define HID_FILEDLG_FOLDER_FILENAME (HID_SFX_START + 226)
+#define HID_FILEDLG_SRCHFOLDER_BTN (HID_SFX_START + 227)
+#define HID_PDFOLDERS_GROUPS (HID_SFX_START + 228)
+#define HID_OPEN_CHOOSE_FILTER (HID_SFX_START + 229)
+#define HID_PDFOLDERS_BOOKMARKS (HID_SFX_START + 230)
+#define HID_PDFOLDERS_FAVORITES_ADD (HID_SFX_START + 231)
+#define HID_PDFOLDERS_FAVORITES_REMOVE (HID_SFX_START + 232)
+#define HID_PDFOLDERS_HISTORY (HID_SFX_START + 233)
+#define HID_FILEDLG_EDIT_FAVORITES (HID_SFX_START + 234)
+#define HID_FILEDLG_NEW_FAVORITE (HID_SFX_START + 235)
+#define HID_FILEDLG_EDIT_FAVORITES_LISTBOX (HID_SFX_START + 236)
+#define HID_FILEDLG_EDIT_FAVORITES_HEADERBAR (HID_SFX_START + 237)
+#define HID_CNT_CB_FORCE_BODY_EXPORT (HID_SFX_START + 240)
+#define HID_CNT_PAGE_REPSTATE_CONTROL (HID_SFX_START + 241)
+#define HID_TASKSTATUSBAR (HID_SFX_START + 242)
+#define HID_CNT_PAGE_HEADER_TABBAR (HID_SFX_START + 244)
+#define HID_CNT_PAGE_SUBSCR_TABBAR (HID_SFX_START + 245)
+#define HID_CHAOSDOC_MN_PART_PRINT (HID_SFX_START + 246)
+#define HID_STATUSINDICATOR_TEXT (HID_SFX_START + 247)
+#define HID_STATUSINDICATOR_PROGRESS (HID_SFX_START + 248)
+#define HID_CNT_VALUE_ADDED_NONE (HID_SFX_START + 249)
+#define HID_CNT_VALUE_ADDED_DOCINFO (HID_SFX_START + 250)
+#define HID_CNT_VALUE_ADDED_FULL (HID_SFX_START + 251)
+#define HID_CNT_MESSAGE_STOREMODE_REMOTE (HID_SFX_START + 252)
+#define HID_CNT_MESSAGE_STOREMODE_LOCAL (HID_SFX_START + 253)
+#define HID_CNT_VIEW_ALL_ARTICLES (HID_SFX_START + 254)
+#define HID_CNT_VIEW_UNREAD_ARTICLES (HID_SFX_START + 255)
+#define HID_CNT_VIEW_READ_ARTICLES (HID_SFX_START + 256)
+#define HID_CNT_VIEW_MARKED_ARTICLES (HID_SFX_START + 257)
+#define HID_CNT_VIEW_MARKED_AND_UNREAD_ARTICLES (HID_SFX_START + 258)
+#define HID_CNT_VIEW_ALL_FOLDERS (HID_SFX_START + 259)
+#define HID_CNT_VIEW_SUBSCRIBED_FOLDERS (HID_SFX_START + 260)
+#define HID_CNT_VIEW_ACTIVE_FOLDERS (HID_SFX_START + 261)
+#define HID_CNT_SENT_VIEW_ALL_ARTICLES (HID_SFX_START + 262)
+#define HID_CNT_SENT_VIEW_SENT_ARTICLES (HID_SFX_START + 263)
+#define HID_CNT_SENT_VIEW_UNSENT_ARTICLES (HID_SFX_START + 264)
+#define HID_CNT_SENT_VIEW_MARKED_ARTICLES (HID_SFX_START + 265)
+#define HID_MAILWIN_SEND_BUTTON (HID_SFX_START + 266)
+#define HID_MAILWIN_CLOSE_BUTTON (HID_SFX_START + 267)
+#define HID_MAILWIN_ROLE_BOX (HID_SFX_START + 268)
+#define HID_MAILWIN_ADDRESS_EDIT (HID_SFX_START + 269)
+#define HID_MAILWIN_ADDRESS_BOX (HID_SFX_START + 270)
+#define HID_MAILWIN_SUBJECT_EDIT (HID_SFX_START + 271)
+#define HID_MAILWIN_FROM_EDIT (HID_SFX_START + 272)
+#define HID_MAILWIN_PRIO_BOX (HID_SFX_START + 273)
+#define HID_TABDLG_APPLY_BTN (HID_SFX_START + 274)
+#define HID_TP_COMMONPRINTOPTIONS (HID_SFX_START + 275)
+#define HID_FILEDLG_LINK_CB (HID_SFX_START + 276)
+#define HID_FILEDLG_PREVIEW_CB (HID_SFX_START + 277)
+#define HID_HELP_WINDOW (HID_SFX_START + 278)
+#define HID_HELP_LISTBOX (HID_SFX_START + 279)
+#define HID_HELP_TABCONTROL (HID_SFX_START + 280)
+#define HID_HELP_TOOLBOX (HID_SFX_START + 281)
+#define HID_HELP_TOOLBOXITEM_INDEX (HID_SFX_START + 282)
+#define HID_HELP_TOOLBOXITEM_START (HID_SFX_START + 283)
+#define HID_HELP_TOOLBOXITEM_BACKWARD (HID_SFX_START + 284)
+#define HID_HELP_TOOLBOXITEM_FORWARD (HID_SFX_START + 285)
+#define HID_HELP_TOOLBOXITEM_PRINT (HID_SFX_START + 286)
+#define HID_HELP_TOOLBOXITEM_BOOKMARKS (HID_SFX_START + 287)
+#define HID_HELP_TABPAGE_CONTENTS (HID_SFX_START + 288)
+#define HID_HELP_TABPAGE_INDEX (HID_SFX_START + 289)
+#define HID_HELP_TABPAGE_SEARCH (HID_SFX_START + 290)
+#define HID_HELP_TABPAGE_BOOKMARKS (HID_SFX_START + 291)
+#define HID_TBXCONTROL_FILENEW (HID_SFX_START + 292)
+#define HID_ORGANIZE_STDTEMPLATE_ADD (HID_SFX_START + 293)
+#define HID_ORGANIZE_STDTEMPLATE_DEL (HID_SFX_START + 294)
+#define HID_HELP_TOOLBOXITEM_SEARCHDIALOG (HID_SFX_START + 295)
+#define HID_HELP_BOOKMARKS_OPEN (HID_SFX_START + 296)
+#define HID_HELP_BOOKMARKS_RENAME (HID_SFX_START + 297)
+#define HID_HELP_BOOKMARKS_DELETE (HID_SFX_START + 298)
+#define HID_CLOSE_WARNING (HID_SFX_START + 299)
+#define HID_DID_SAVE_PACKED_XML (HID_SFX_START + 300)
+#define HID_HELP_TREELISTBOX_CONTENTS (HID_SFX_START + 301)
+#define HID_CUSTOMIZETOOLBOX (HID_SFX_START + 302)
+#define HID_CUSTOMIZETOOLBOX_FUNCTIONS (HID_SFX_START + 303)
+#define HID_CUSTOMIZETOOLBOX_TOOLBOX (HID_SFX_START + 304)
+#define HID_HELP_TEXT_SELECTION_MODE (HID_SFX_START + 305)
+
+#define HID_WARNING_SECURITY_HYPERLINK (HID_SFX_START + 306)
+#define HID_FILEDLG_EXPORTASPDF (HID_SFX_START + 307)
+#define HID_USERDEFBMP_TOOLBOX (HID_SFX_START + 308)
+
+#define HID_CONFIG_LOAD (HID_SFX_START + 309)
+#define HID_CONFIG_SAVE (HID_SFX_START + 310)
+
+#define HID_SEARCHDIALOG (HID_SFX_START + 311)
+
+#define HID_XMLSEC_WARNING_BROKENSIGNATURE (HID_SFX_START + 314)
+#define HID_XMLSEC_QUERY_LOSINGSIGNATURE (HID_SFX_START + 315)
+#define HID_XMLSEC_QUERY_SAVEBEFORESIGN (HID_SFX_START + 316)
+#define HID_XMLSECDLG_MACROWARN (HID_SFX_START + 317)
+#define HID_XMLSEC_INFO_WRONGDOCFORMAT (HID_SFX_START + 318)
+#define HID_WARNING_MACROSDISABLED (HID_SFX_START + 319)
+#define HID_WARNING_ALIENFORMAT (HID_SFX_START + 320)
+#define HID_HELP_ONSTARTUP_BOX (HID_SFX_START + 321)
+#define HID_DLG_CHECKFORONLINEUPDATE (HID_SFX_START + 322)
+#define HID_TP_CUSTOMPROPERTIES (HID_SFX_START + 324)
+#define HID_CTRL_CUSTOMPROPERTIES (HID_SFX_START + 325)
+#define HID_CTRL_CUSTOMPROPS_YES_NO (HID_SFX_START + 326)
+#define HID_DLG_CUSTOMPROPS_DURATION (HID_SFX_START + 327)
+
+#define ACT_SFX_HID_END HID_DLG_CUSTOMPROPS_DURATION
+
+// "Uberlaufpr"ufung --------------------------------------------------------
+
+#if ACT_SFX_HID_END > HID_SFX_END
+#error Resource-Ueberlauf in #line, #file
+#endif
+
+#define HID_HELP_ONHELP 68245
+
+#endif // #ifndef _SFX_HELPID_HRC
+
+// ******************************************************************* EOF
+
diff --git a/sfx2/source/inc/hexplwnd.hxx b/sfx2/source/inc/hexplwnd.hxx
new file mode 100644
index 000000000000..228ce78949b9
--- /dev/null
+++ b/sfx2/source/inc/hexplwnd.hxx
@@ -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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _HEXPLWND_HXX
+#define _HEXPLWND_HXX
+
+// includes --------------------------------------------------------------
+
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/util/URL.hpp>
+#include <sfx2/childwin.hxx>
+#include <sfx2/dockwin.hxx>
+
+// forward ---------------------------------------------------------------
+
+class SfxBeamerUnoFrame_Impl;
+
+// class SfxExplorerHorizChildWnd_Impl -----------------------------------
+
+class SfxExplorerHorizChildWnd_Impl : public SfxChildWindow
+{
+public:
+ SfxExplorerHorizChildWnd_Impl( Window* pParent, sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(SfxExplorerHorizChildWnd_Impl);
+
+
+ virtual sal_Bool QueryClose();
+};
+
+// class SfxExplorerDockWnd_Impl -----------------------------------------
+
+class SfxExplorerHorizDockWnd_Impl : public SfxDockingWindow
+{
+private:
+ SfxBeamerUnoFrame_Impl* _pFrame;
+
+protected:
+ virtual void GetFocus();
+ virtual long Notify( NotifyEvent& rNEvt );
+
+public:
+ SfxExplorerHorizDockWnd_Impl( SfxBindings* pBindings,
+ SfxChildWindow* pChildWin,
+ Window* pParent, const ResId& rResId );
+ ~SfxExplorerHorizDockWnd_Impl();
+
+ virtual void FillInfo( SfxChildWinInfo& ) const;
+ virtual void FadeIn( sal_Bool );
+ sal_Bool QueryClose();
+ void SetURL( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
+ const ::com::sun::star::util::URL& GetURL() const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetFrameInterface();
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& GetArgs() const;
+};
+
+
+#endif
+
diff --git a/sfx2/source/inc/iframe.hxx b/sfx2/source/inc/iframe.hxx
new file mode 100644
index 000000000000..041ffac822b7
--- /dev/null
+++ b/sfx2/source/inc/iframe.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_IFRAME_HXX
+#define _SFX_IFRAME_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <cppuhelper/implbase6.hxx>
+
+#include <rtl/ustring.hxx>
+#include <svl/ownlist.hxx>
+#include <svl/itemprop.hxx>
+
+#include <sfx2/sfxuno.hxx>
+#include <sfx2/frmdescr.hxx>
+
+namespace sfx2
+{
+
+class IFrameObject : public ::cppu::WeakImplHelper6 <
+ com::sun::star::util::XCloseable,
+ com::sun::star::lang::XEventListener,
+ com::sun::star::frame::XSynchronousFrameLoader,
+ com::sun::star::ui::dialogs::XExecutableDialog,
+ com::sun::star::lang::XInitialization,
+ com::sun::star::beans::XPropertySet >
+{
+ com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > mxFact;
+ com::sun::star::uno::Reference < com::sun::star::frame::XFrame > mxFrame;
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > mxObj;
+ SfxItemPropertyMap maPropMap;
+ SfxFrameDescriptor maFrmDescr;
+
+ IFrameObject( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rFact );
+ ~IFrameObject();
+
+ virtual sal_Bool SAL_CALL load( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& lDescriptor,
+ const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame ) throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL cancel() throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw( com::sun::star::util::CloseVetoException, com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException) ;
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL execute( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::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);
+public:
+ SFX_DECL_XSERVICEINFO
+};
+
+}
+#endif
diff --git a/sfx2/source/inc/intro.hxx b/sfx2/source/inc/intro.hxx
new file mode 100644
index 000000000000..1b09008c0778
--- /dev/null
+++ b/sfx2/source/inc/intro.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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_INTRO_HXX
+#define _SFX_INTRO_HXX
+
+// include ---------------------------------------------------------------
+
+#include <vcl/wrkwin.hxx>
+#include <vcl/bitmap.hxx>
+
+// class IntroWindow_Impl ------------------------------------------------
+
+class IntroWindow_Impl : public WorkWindow
+{
+private:
+ Bitmap aIntroBmp;
+
+ void Init();
+
+public:
+ IntroWindow_Impl( const Bitmap& rBmp );
+ ~IntroWindow_Impl();
+
+ virtual void Paint( const Rectangle& );
+
+ void Slide();
+};
+
+#endif // #ifndef _SFX_INTRO_HXX
+
+
diff --git a/sfx2/source/inc/mailmodel.hxx b/sfx2/source/inc/mailmodel.hxx
new file mode 100644
index 000000000000..43e938d46800
--- /dev/null
+++ b/sfx2/source/inc/mailmodel.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef INCLUDED_SFX_MAILMODEL_HXX
+#define INCLUDED_SFX_MAILMODEL_HXX
+
+#include <com/sun/star/frame/XFrame.hpp>
+
+// class SfxMailModel_Impl -----------------------------------------------
+
+class AddressList_Impl;
+
+class SfxMailModel_Impl
+{
+public:
+ enum MailPriority
+ {
+ PRIO_HIGHEST,
+ PRIO_HIGH,
+ PRIO_NORMAL,
+ PRIO_LOW,
+ PRIO_LOWEST
+ };
+
+ enum AddressRole
+ {
+ ROLE_TO,
+ ROLE_CC,
+ ROLE_BCC
+ };
+
+ enum MailDocType
+ {
+ TYPE_SELF,
+ TYPE_ASPDF
+ };
+
+private:
+ enum SaveResult
+ {
+ SAVE_SUCCESSFULL,
+ SAVE_CANCELLED,
+ SAVE_ERROR
+ };
+
+ AddressList_Impl* mpToList;
+ AddressList_Impl* mpCcList;
+ AddressList_Impl* mpBccList;
+ String maFromAddress;
+ String maSubject;
+ MailPriority mePriority;
+
+ sal_Bool mbLoadDone;
+
+ void ClearList( AddressList_Impl* pList );
+ void MakeValueList( AddressList_Impl* pList, String& rValueList );
+ SaveResult SaveDocumentAsFormat( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const rtl::OUString& rType, rtl::OUString& rFileNamePath );
+
+ DECL_LINK( DoneHdl, void* );
+
+public:
+ enum SendMailResult
+ {
+ SEND_MAIL_OK,
+ SEND_MAIL_CANCELLED,
+ SEND_MAIL_ERROR
+ };
+
+ SfxMailModel_Impl();
+ ~SfxMailModel_Impl();
+
+ void AddAddress( const String& rAddress, AddressRole eRole );
+ void SetFromAddress( const String& rAddress ) { maFromAddress = rAddress; }
+ void SetSubject( const String& rSubject ) { maSubject = rSubject; }
+ void SetPriority( MailPriority ePrio ) { mePriority = ePrio; }
+
+ SendMailResult Send( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const rtl::OUString& rType );
+};
+
+BOOL CreateFromAddress_Impl( String& rFrom );
+
+#endif // INCLUDED_SFX_MAILMODEL_HXX
diff --git a/sfx2/source/inc/mnucfga.hxx b/sfx2/source/inc/mnucfga.hxx
new file mode 100644
index 000000000000..bbc3c1cd63ac
--- /dev/null
+++ b/sfx2/source/inc/mnucfga.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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXMNUCFGA_HXX
+#define _SFXMNUCFGA_HXX
+
+#include <tools/string.hxx>
+#ifndef _SFXMINARRAY_HXX
+#include <sfx2/minarray.hxx>
+#endif
+
+//==================================================================
+
+class SfxMenuCfgItemArr;
+
+struct SfxMenuCfgItem
+{
+ USHORT nId; // id of the binding or 0 if none
+ String aTitle; // title of the item
+ String aHelpText; // Hilfetext
+ String aCommand;
+ SfxMenuCfgItemArr* pPopup; // pointer to a popup menu (if any)
+};
+
+DECL_PTRARRAY(SfxMenuCfgItemArr, SfxMenuCfgItem*, 4, 4 )
+
+
+#endif
+
diff --git a/sfx2/source/inc/nfltdlg.hxx b/sfx2/source/inc/nfltdlg.hxx
new file mode 100644
index 000000000000..371fa96c57a2
--- /dev/null
+++ b/sfx2/source/inc/nfltdlg.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXNFLTDLG_HXX
+#define _SFXNFLTDLG_HXX
+
+
+#include <vcl/dialog.hxx>
+#include <vcl/lstbox.hxx>
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#include <vcl/fixed.hxx>
+class SfxFilterMatcher;
+
+class SfxMedium;
+class SfxFilterDialog : public ModalDialog
+{
+private:
+ FixedLine aMimeTypeFL;
+ FixedText aMIMEType;
+ FixedText aExtension;
+ FixedLine aFilterFL;
+ ListBox aListbox;
+ OKButton aOkBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
+
+ const SfxFilterMatcher& rMatcher;
+
+ DECL_LINK( OkHdl, Control * );
+
+public:
+ SfxFilterDialog( Window * pParent,
+ SfxMedium* pMed,
+ const SfxFilterMatcher &rMatcher,
+ const String *pDefFilter, BOOL bShowConvert = TRUE );
+
+ String GetSelectEntry() const;
+};
+
+#endif
+
diff --git a/sfx2/source/inc/nochaos.hxx b/sfx2/source/inc/nochaos.hxx
new file mode 100644
index 000000000000..4b5d7fb1f40e
--- /dev/null
+++ b/sfx2/source/inc/nochaos.hxx
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_NOCHAOS_HXX
+#define _SFX_NOCHAOS_HXX
+
+class SfxItemPool;
+
+class NoChaos
+{
+public:
+ static SfxItemPool* GetItemPool();
+ static USHORT ReleaseItemPool();
+};
+
+#endif
+
diff --git a/sfx2/source/inc/objmnctl.hxx b/sfx2/source/inc/objmnctl.hxx
new file mode 100644
index 000000000000..e58c6cd5592d
--- /dev/null
+++ b/sfx2/source/inc/objmnctl.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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_OBJMNCTL_HXX
+#define _SFX_OBJMNCTL_HXX
+
+
+#ifndef _SFX_HXX
+#include <sfx2/mnuitem.hxx>
+#endif
+
+class SfxBindings;
+class PopupMenu;
+class Menu;
+
+class SfxObjectVerbsControl: public SfxMenuControl
+{
+ PopupMenu* pMenu;
+ Menu& rParent;
+
+private:
+ void FillMenu();
+ DECL_LINK( MenuSelect, Menu * );
+ virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+
+public:
+ SfxObjectVerbsControl(USHORT, Menu&, SfxBindings&);
+ ~SfxObjectVerbsControl();
+ virtual PopupMenu* GetPopup() const;
+ SFX_DECL_MENU_CONTROL();
+};
+
+#endif
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
new file mode 100644
index 000000000000..a882cfedd821
--- /dev/null
+++ b/sfx2/source/inc/objshimp.hxx
@@ -0,0 +1,172 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_OBJSHIMP_HXX
+#define _SFX_OBJSHIMP_HXX
+
+//#include <hash_map>
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
+#include <com/sun/star/logging/XSimpleLogRing.hpp>
+#include <tools/datetime.hxx>
+
+#include <unotools/securityoptions.hxx>
+#include <sfx2/objsh.hxx>
+#include "sfx2/docmacromode.hxx"
+#include "bitset.hxx"
+
+namespace svtools { class AsynchronLink; }
+
+//====================================================================
+
+DBG_NAMEEX(SfxObjectShell)
+
+class SfxViewFrame;
+struct MarkData_Impl
+{
+ String aMark;
+ String aUserData;
+ SfxViewFrame* pFrame;
+};
+
+class SfxFrame;
+class SfxToolBoxConfig;
+class SfxBasicManagerHolder;
+
+struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
+{
+ ::comphelper::EmbeddedObjectContainer* mpObjectContainer;
+ SfxBasicManagerHolder*
+ pBasicManager;
+ SfxObjectShell& rDocShell;
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
+ xBasicLibraries;
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
+ xDialogLibraries;
+ com::sun::star::uno::Sequence < rtl::OUString > xEventNames;
+ ::sfx2::DocumentMacroMode
+ aMacroMode;
+ SfxProgress* pProgress;
+ String aTitle;
+ String aTempName;
+ DateTime nTime;
+ sal_uInt16 nVisualDocumentNumber;
+ sal_Int16 nDocumentSignatureState;
+ sal_Int16 nScriptingSignatureState;
+ sal_Bool bInList:1, // ob per First/Next erreichbar
+ bClosing:1, // sal_True w"aehrend Close(), um Benachrichtigungs-Rekursionen zu verhindern
+ bIsSaving:1,
+ bPasswd:1,
+ bIsTmp:1,
+ bIsNamedVisible:1,
+ bIsTemplate:1,
+ bIsAbortingImport:1, // Importvorgang soll abgebrochen werden.
+ bImportDone : 1, //Import schon fertig? Fuer AutoReload von Docs.
+ bInPrepareClose : 1,
+ bPreparedForClose : 1,
+ bWaitingForPicklist : 1,// Muss noch in die Pickliste
+ bForbidReload : 1,
+ bBasicInitialized :1,
+ bIsPrintJobCancelable :1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
+ bOwnsStorage:1,
+ bNoBaseURL:1,
+ bInitialized:1,
+ bSignatureErrorIsShown:1,
+ bModelInitialized:1, // whether the related model is initialized
+ bPreserveVersions:1,
+ m_bMacroSignBroken:1, // whether the macro signature was explicitly broken
+ m_bNoBasicCapabilities:1,
+ m_bDocRecoverySupport:1,
+ bQueryLoadTemplate:1,
+ bLoadReadonly:1,
+ bUseUserData:1,
+ bSaveVersionOnClose:1,
+ m_bSharedXMLFlag:1, // whether the flag should be stored in xml file
+ m_bAllowShareControlFileClean:1; // whether the flag should be stored in xml file
+
+ IndexBitSet aBitSet;
+ sal_uInt32 lErr;
+ sal_uInt16 nEventId; // falls vor Activate noch ein
+ // Open/Create gesendet werden mu/s
+ AutoReloadTimer_Impl *pReloadTimer;
+ MarkData_Impl* pMarkData;
+ sal_uInt16 nLoadedFlags;
+ sal_uInt16 nFlagsInProgress;
+ sal_Bool bModalMode;
+ sal_Bool bRunningMacro;
+ sal_Bool bReloadAvailable;
+ sal_uInt16 nAutoLoadLocks;
+ SfxModule* pModule;
+ SfxObjectShellFlags eFlags;
+ sal_Bool bReadOnlyUI;
+ SvRefBaseRef xHeaderAttributes;
+ sal_Bool bHiddenLockedByAPI;
+ ::rtl::Reference< SfxBaseModel >
+ pBaseModel;
+ sal_uInt16 nStyleFilter;
+ sal_Bool bDisposing;
+
+ sal_Bool m_bEnableSetModified;
+ sal_Bool m_bIsModified;
+
+ Rectangle m_aVisArea;
+ MapUnit m_nMapUnit;
+
+ sal_Bool m_bCreateTempStor;
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xDocStorage;
+
+ sal_Bool m_bIsInit;
+
+ ::rtl::OUString m_aSharedFileURL;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::logging::XSimpleLogRing > m_xLogRing;
+
+ sal_Bool m_bIncomplEncrWarnShown;
+
+
+ SfxObjectShell_Impl( SfxObjectShell& _rDocShell );
+ virtual ~SfxObjectShell_Impl();
+
+ static sal_Bool NeedsOfficeUpdateDialog();
+
+ // IMacroDocumentAccess overridables
+ virtual sal_Int16 getCurrentMacroExecMode() const;
+ virtual sal_Bool setCurrentMacroExecMode( sal_uInt16 nMacroMode );
+ virtual ::rtl::OUString getDocumentLocation() const;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > getZipStorageToSign();
+ virtual sal_Bool documentStorageHasMacros() const;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const;
+ virtual sal_Int16 getScriptingSignatureState();
+
+ virtual sal_Bool hasTrustedScriptingSignature( sal_Bool bAllowUIToAddAuthor );
+ virtual void showBrokenSignatureWarning( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxInteraction ) const;
+};
+
+#endif
+
diff --git a/sfx2/source/inc/openflag.hxx b/sfx2/source/inc/openflag.hxx
new file mode 100644
index 000000000000..5b719095eae8
--- /dev/null
+++ b/sfx2/source/inc/openflag.hxx
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_OPENFLAG_HXX
+#define _SFX_OPENFLAG_HXX
+
+// Datei zum Bearbeiten "offnen, anschliessend funktioniert nur noch
+// die dritte Variante (Lesen einer Kopie)
+#define SFX_STREAM_READWRITE (STREAM_READWRITE | STREAM_SHARE_DENYWRITE)
+// Ich arbeite roh auf dem Original, keine Kopie
+// -> Datei kann anschliessend nicht zum Bearbeiten ge"offnet werden
+#define SFX_STREAM_READONLY (STREAM_READ | STREAM_SHARE_DENYWRITE) // + !bDirect
+// Jemand anders bearbeitet das File, es wird eine Kopie erstellt
+// -> Datei kann anschliessend zum Bearbeiten ge"offnet werden
+#define SFX_STREAM_READONLY_MAKECOPY (STREAM_READ | STREAM_SHARE_DENYNONE)
+
+
+#endif
diff --git a/sfx2/source/inc/ownsubfilterservice.hxx b/sfx2/source/inc/ownsubfilterservice.hxx
new file mode 100644
index 000000000000..f800e1e253ae
--- /dev/null
+++ b/sfx2/source/inc/ownsubfilterservice.hxx
@@ -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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _OWNSUBFILTERSERVICE_HXX_
+#define _OWNSUBFILTERSERVICE_HXX_
+
+#include <com/sun/star/document/XFilter.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#ifndef _COM_SUN_STAR_LANG_XPSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/io/XStream.hpp>
+#include <cppuhelper/implbase3.hxx>
+
+class SfxObjectShell;
+
+namespace sfx2 {
+
+class OwnSubFilterService : public cppu::WeakImplHelper3 < ::com::sun::star::document::XFilter
+ ,::com::sun::star::lang::XInitialization
+ ,::com::sun::star::lang::XServiceInfo >
+{
+ ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xFactory;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xStream;
+ SfxObjectShell* m_pObjectShell;
+
+public:
+
+ OwnSubFilterService(const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > &xNewFactory);
+ virtual ~OwnSubFilterService();
+
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ impl_getStaticSupportedServiceNames();
+
+ static ::rtl::OUString SAL_CALL impl_getStaticImplementationName();
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ impl_staticCreateSelfInstance(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
+ impl_createFactory(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+
+
+ // XFilter
+ virtual ::sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL cancel() 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);
+
+ // 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);
+
+};
+
+} // namespace sfx2
+
+#endif
+
diff --git a/sfx2/source/inc/partwnd.hxx b/sfx2/source/inc/partwnd.hxx
new file mode 100644
index 000000000000..4a485e3cc91f
--- /dev/null
+++ b/sfx2/source/inc/partwnd.hxx
@@ -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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _PARTWND_HXX
+#define _PARTWND_HXX
+
+#include <com/sun/star/uno/Reference.h>
+
+namespace com
+{
+ namespace sun
+ {
+ namespace star
+ {
+ namespace frame
+ {
+ class XFrame;
+ }
+ }
+ }
+}
+
+#include <sfx2/childwin.hxx>
+#include <sfx2/dockwin.hxx>
+
+// forward ---------------------------------------------------------------
+
+// class SfxPartChildWnd_Impl -----------------------------------
+
+class SfxPartChildWnd_Impl : public SfxChildWindow
+{
+public:
+ SfxPartChildWnd_Impl( Window* pParent, sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(SfxPartChildWnd_Impl);
+ ~SfxPartChildWnd_Impl();
+
+ virtual sal_Bool QueryClose();
+};
+
+// class SfxExplorerDockWnd_Impl -----------------------------------------
+
+class SfxPartDockWnd_Impl : public SfxDockingWindow
+{
+private:
+ ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > m_xFrame;
+
+protected:
+ virtual void Resize();
+ virtual long Notify( NotifyEvent& rNEvt );
+
+public:
+ SfxPartDockWnd_Impl( SfxBindings* pBindings,
+ SfxChildWindow* pChildWin,
+ Window* pParent,
+ WinBits nBits );
+
+ ~SfxPartDockWnd_Impl();
+ sal_Bool QueryClose();
+ virtual void FillInfo(SfxChildWinInfo&) const;
+ ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > ForgetFrame();
+};
+
+#endif
+
diff --git a/sfx2/source/inc/plugin.hxx b/sfx2/source/inc/plugin.hxx
new file mode 100644
index 000000000000..a9d3ce2f1e72
--- /dev/null
+++ b/sfx2/source/inc/plugin.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_PLUGIN_HXX
+#define _SFX_PLUGIN_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/plugin/XPlugin.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <cppuhelper/implbase5.hxx>
+
+#include <rtl/ustring.hxx>
+#include <svl/ownlist.hxx>
+#include <svl/itemprop.hxx>
+
+#include <sfx2/sfxuno.hxx>
+
+namespace sfx2
+{
+
+class PluginObject : public ::cppu::WeakImplHelper5 <
+ com::sun::star::util::XCloseable,
+ com::sun::star::lang::XEventListener,
+ com::sun::star::frame::XSynchronousFrameLoader,
+ com::sun::star::lang::XInitialization,
+ com::sun::star::beans::XPropertySet >
+{
+ com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > mxFact;
+ com::sun::star::uno::Reference< com::sun::star::plugin::XPlugin > mxPlugin;
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > mxObj;
+ SfxItemPropertyMap maPropMap;
+ SvCommandList maCmdList;
+ ::rtl::OUString maURL;
+ ::rtl::OUString maMimeType;
+
+ PluginObject( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rFact );
+ ~PluginObject();
+
+ virtual sal_Bool SAL_CALL load( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& lDescriptor,
+ const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame ) throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL cancel() throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw( com::sun::star::util::CloseVetoException, com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException) ;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::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);
+public:
+ SFX_DECL_XSERVICEINFO
+};
+
+}
+#endif
diff --git a/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx
new file mode 100644
index 000000000000..f247a2570cf9
--- /dev/null
+++ b/sfx2/source/inc/preview.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXPREVIEW_HXX
+#define _SFXPREVIEW_HXX
+
+
+#include <sfx2/doctempl.hxx>
+#include <sfx2/basedlgs.hxx>
+
+class SfxObjectShell;
+//REMOVE class SvStorageRef;
+class SfxFrameWindow;
+
+class SfxFrame;
+class GDIMetaFile;
+
+class SfxPreviewBase_Impl : public Window
+{
+protected:
+ ::boost::shared_ptr<GDIMetaFile> pMetaFile;
+public:
+ SfxPreviewBase_Impl( Window* pParent,
+ const ResId& rResId );
+ SfxPreviewBase_Impl( Window* pParent );
+ ~SfxPreviewBase_Impl( );
+ void SetObjectShell( SfxObjectShell* pObj );
+ void SetGDIFile( ::boost::shared_ptr<GDIMetaFile> pFile );
+ virtual void Resize();
+};
+
+
+
+class SfxPreviewWin_Impl: public SfxPreviewBase_Impl
+{
+protected:
+ virtual void Paint( const Rectangle& rRect );
+public:
+ SfxPreviewWin_Impl( Window* pParent,
+ const ResId& rResId )
+ : SfxPreviewBase_Impl( pParent, rResId ){};
+ SfxPreviewWin_Impl( Window* pParent )
+ : SfxPreviewBase_Impl( pParent ){};
+ static void ImpPaint(
+ const Rectangle& rRect, GDIMetaFile* pFile, Window* pWindow );
+ static SfxFrameWindow*
+ PreviewFactory( SfxFrame* pFrame, const String& rName );
+};
+
+#endif
diff --git a/sfx2/source/inc/recfloat.hxx b/sfx2/source/inc/recfloat.hxx
new file mode 100644
index 000000000000..5667a6c1e67a
--- /dev/null
+++ b/sfx2/source/inc/recfloat.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _RECFLOAT_HXX
+#define _RECFLOAT_HXX
+
+// includes *******************************************************************
+
+#include <sfx2/childwin.hxx>
+#include <sfx2/basedlgs.hxx>
+
+class SfxRecordingFloatWrapper_Impl : public SfxChildWindow
+{
+ SfxBindings* pBindings;
+public:
+ SfxRecordingFloatWrapper_Impl( Window* pParent ,
+ USHORT nId ,
+ SfxBindings* pBindings ,
+ SfxChildWinInfo* pInfo );
+ ~SfxRecordingFloatWrapper_Impl();
+
+ SFX_DECL_CHILDWINDOW(SfxRecordingFloatWrapper_Impl);
+ virtual sal_Bool QueryClose();
+};
+
+class SfxRecordingFloat_Impl : public SfxFloatingWindow
+{
+ SfxChildWindow* pWrapper;
+ ToolBox aTbx;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xStopRecTbxCtrl;
+public:
+ SfxRecordingFloat_Impl( SfxBindings* pBindings ,
+ SfxChildWindow* pChildWin ,
+ Window* pParent );
+ virtual ~SfxRecordingFloat_Impl();
+ virtual BOOL Close();
+ virtual void FillInfo( SfxChildWinInfo& rInfo ) const;
+ virtual void StateChanged( StateChangedType nStateChange );
+
+ DECL_LINK( Select, ToolBox * );
+};
+
+#endif
+
+
diff --git a/sfx2/source/inc/referers.hxx b/sfx2/source/inc/referers.hxx
new file mode 100644
index 000000000000..6c938861d013
--- /dev/null
+++ b/sfx2/source/inc/referers.hxx
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_REFERERS_HXX
+#define _SFX_REFERERS_HXX
+
+#define SFX_REFERER_USER "private:user"
+#define SFX_REFERER_APPEVENT "private:appevent"
+#define SFX_REFERER_EXPLORER "private:explorer"
+#define SFX_REFERER_NEWMENU "private:newmenu"
+
+
+#endif
diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
new file mode 100644
index 000000000000..fb21cb0ab13c
--- /dev/null
+++ b/sfx2/source/inc/sfxlocal.hrc
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+//============================================================================
+// Lokale Resourcen
+//
+// (C) 1996 - 2000 Star Division GmbH, Hamburg, Germany
+// $Author: rt $ $Date: 2008-07-30 09:24:39 $ $Revision: 1.8 $
+// $Logfile: T:/sfx2/source/inc/sfxlocal.hrv $ $Workfile: SFXLOCAL.HRC $
+//----------------------------------------------------------------------------
+#ifndef _SFXLOCAL_HRC
+#define _SFXLOCAL_HRC
+
+#include <sfx2/sfx.hrc>
+
+// Strings ---------------------------------------------------------------
+
+#define STR_SFX_NEWOFFICEDOC (RID_SFX_SFXLOCAL_START + 0)
+#define STR_SFX_FILEDLG_ACTUALVERSION (RID_SFX_SFXLOCAL_START + 2)
+#define STR_SFX_EXPLORERFILE_INSERT (RID_SFX_SFXLOCAL_START + 3)
+#define STR_SFX_EXPLORERFILE_BUTTONINSERT (RID_SFX_SFXLOCAL_START + 4)
+#define STR_SFX_IMPORT_ALL (RID_SFX_SFXLOCAL_START + 5)
+#define STR_SFX_EXPLORERFILE_EXPORT (RID_SFX_SFXLOCAL_START + 6)
+
+// Controls --------------------------------------------------------------
+
+#define SFX_CB_PROPERTY_NAME (RID_SFX_SFXLOCAL_START + 0)
+#define SFX_ED_PROPERTY_VALUE (RID_SFX_SFXLOCAL_START + 1)
+#define SFX_RB_PROPERTY_YES (RID_SFX_SFXLOCAL_START + 2)
+#define SFX_RB_PROPERTY_NO (RID_SFX_SFXLOCAL_START + 3)
+#define SFX_LB_PROPERTY_TYPE (RID_SFX_SFXLOCAL_START + 4)
+#define SFX_PB_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 5)
+#define SFX_WIN_PROPERTY_YESNO (RID_SFX_SFXLOCAL_START + 6)
+#define SFX_QB_WRONG_TYPE (RID_SFX_SFXLOCAL_START + 7)
+#define SFX_IMG_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 8)
+#define SFX_IMG_PROPERTY_REMOVE_HC (RID_SFX_SFXLOCAL_START + 9)
+#define SFX_FLD_DATE (RID_SFX_SFXLOCAL_START + 10)
+#define SFX_FLD_TIME (RID_SFX_SFXLOCAL_START + 11)
+#define SFX_FLD_DURATION (RID_SFX_SFXLOCAL_START + 12)
+#define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 13)
+
+
+#endif
+
diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx
new file mode 100644
index 000000000000..8b5069f20296
--- /dev/null
+++ b/sfx2/source/inc/sfxpicklist.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_PICKLIST_HXX_
+#define _SFX_PICKLIST_HXX_
+
+#include <osl/mutex.hxx>
+#include <tools/string.hxx>
+#include <vcl/menu.hxx>
+#include <svl/lstner.hxx>
+#include <com/sun/star/util/XStringWidth.hpp>
+
+#include <vector>
+
+#define PICKLIST_MAXSIZE 100
+
+class SfxPickList : public SfxListener
+{
+ struct PickListEntry
+ {
+ PickListEntry( const String& _aName, const String& _aFilter, const String& _aTitle ) :
+ aName( _aName ), aFilter( _aFilter ), aTitle( _aTitle ) {}
+
+ String aName;
+ String aFilter;
+ String aTitle;
+ String aOptions;
+ };
+
+ static SfxPickList* pUniqueInstance;
+ static osl::Mutex* pMutex;
+
+ std::vector< PickListEntry* > m_aPicklistVector;
+ sal_uInt32 m_nAllowedMenuSize;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XStringWidth > m_xStringLength;
+
+ SfxPickList( sal_uInt32 nMenuSize );
+ ~SfxPickList();
+
+ static osl::Mutex* GetOrCreateMutex();
+
+ void CreatePicklistMenuTitle( Menu* pMenu, USHORT nItemId, const String& aURL, sal_uInt32 nNo );
+ PickListEntry* GetPickListEntry( sal_uInt32 nIndex );
+ void CreatePickListEntries();
+ void RemovePickListEntries();
+
+ public:
+ static SfxPickList* GetOrCreate( const sal_uInt32 nMenuSize );
+ static SfxPickList* Get();
+ static void Delete();
+
+ sal_uInt32 GetAllowedMenuSize() { return m_nAllowedMenuSize; }
+ sal_uInt32 GetNumOfEntries() const { return m_aPicklistVector.size(); }
+ void CreateMenuEntries( Menu* pMenu );
+ void ExecuteMenuEntry( USHORT nId );
+ void ExecuteEntry( sal_uInt32 nIndex );
+ String GetMenuEntryTitle( sal_uInt32 nIndex );
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+};
+
+#endif // _SFX_PICKLIST_HXX_
diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
new file mode 100644
index 000000000000..73014121541e
--- /dev/null
+++ b/sfx2/source/inc/sfxtypes.hxx
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_SFXTYPES_HXX
+#define _SFX_SFXTYPES_HXX
+
+#include <tools/debug.hxx>
+#ifndef _RC_HXX //autogen
+#include <tools/rc.hxx>
+#endif
+#ifndef _RCID_H //autogen
+#include <tools/rcid.h>
+#endif
+#ifndef _RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+#include <tools/link.hxx>
+#ifndef _APP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#include <vcl/wrkwin.hxx>
+
+#ifndef _VOS_MUTEX_HXX //autogen
+#include <vos/mutex.hxx>
+#endif
+
+#ifndef DELETEZ
+#define DELETEZ(pPtr) ( delete pPtr, pPtr = 0 )
+#endif
+
+#ifndef DELETEX
+#ifdef DBG_UTIL
+#define DELETEX(pPtr) ( delete pPtr, (void*&) pPtr = (void*) 0xFFFFFFFF )
+#else
+#define DELETEX(pPtr) delete pPtr
+#endif
+#endif
+
+class SfxShell;
+class Timer;
+
+#if !defined(_SFX_APPCTOR_CXX) && defined(WNT)
+#ifndef _DLL_
+#error _DLL_ mal wieder nicht defined => GetpApp() == 0
+#endif
+#endif
+
+//------------------------------------------------------------------------
+
+// Macro fuer den Call-Profiler unter WinNT
+// mit S_CAP kann eine Messung gestarted, mit E_CAP wieder gestoppt werden
+#if defined( WNT ) && defined( PROFILE )
+
+extern "C" {
+ void StartCAP();
+ void StopCAP();
+ void DumpCAP();
+};
+
+#define S_CAP() StartCAP();
+#define E_CAP() StopCAP(); DumpCAP();
+
+struct _Capper
+{
+ _Capper() { S_CAP(); }
+ ~_Capper() { E_CAP(); }
+};
+
+#define CAP _Capper _aCap_
+
+#else
+
+#define S_CAP()
+#define E_CAP()
+#define CAP
+
+#endif
+
+#ifdef DBG_UTIL
+#ifndef DBG
+#define DBG(statement) statement
+#endif
+#define DBG_OUTF(x) DbgOutf x
+#else
+#ifndef DBG
+#define DBG(statement)
+#endif
+#define DBG_OUTF(x)
+#endif
+
+#define TRIM(s) s.EraseLeadingChars().EraseTrailingChars()
+
+//------------------------------------------------------------------------
+
+String SfxShellIdent_Impl( const SfxShell *pSh );
+
+//------------------------------------------------------------------------
+
+#if defined(DBG_UTIL) && ( defined(WNT) || defined(OS2) )
+
+class SfxStack
+{
+ static unsigned nLevel;
+
+public:
+ SfxStack( const char *pName )
+ {
+ ++nLevel;
+ DbgOutf( "STACK: enter %3d %s", nLevel, pName );
+ }
+ ~SfxStack()
+ {
+ DbgOutf( "STACK: leave %3d", nLevel );
+ --nLevel;
+ }
+};
+
+#define SFX_STACK(s) SfxStack aSfxStack_( #s )
+#else
+#define SFX_STACK(s)
+#endif
+
+//------------------------------------------------------------------------
+
+String SearchAndReplace( const String &rSource,
+ const String &rToReplace,
+ const String &rReplacement );
+
+#define SFX_PASSWORD_CODE "_:;*\x9A?()/&[&"
+String SfxStringEncode( const String &rSource,
+ const char *pKey = SFX_PASSWORD_CODE );
+String SfxStringDecode( const String &rSource,
+ const char *pKey = SFX_PASSWORD_CODE );
+
+
+struct StringList_Impl : private Resource
+{
+
+ ResId aResId;
+
+ StringList_Impl( const ResId& rErrIdP, USHORT nId)
+ : Resource( rErrIdP ),aResId(nId, *rErrIdP.GetResMgr()){}
+ ~StringList_Impl() { FreeResource(); }
+
+ String GetString(){ return String( aResId ); }
+ operator BOOL(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
+
+};
+
+#define SFX_DEL_PTRARR(pArr) \
+ { \
+ for ( USHORT n = (pArr)->Count(); n--; ) \
+ delete (pArr)->GetObject(n); \
+ DELETEX(pArr); \
+ }
+
+class SfxBoolResetter
+{
+ BOOL& _rVar;
+ BOOL _bOld;
+
+public:
+ SfxBoolResetter( BOOL &rVar )
+ : _rVar( rVar ),
+ _bOld( rVar )
+ {}
+
+ ~SfxBoolResetter()
+ { _rVar = _bOld; }
+};
+
+#define GPF() *(int*)0 = 0
+
+#endif // #ifndef _SFX_SFXTYPES_HXX
+
+
diff --git a/sfx2/source/inc/sfxurlrelocator.hxx b/sfx2/source/inc/sfxurlrelocator.hxx
new file mode 100644
index 000000000000..8acc674b3568
--- /dev/null
+++ b/sfx2/source/inc/sfxurlrelocator.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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_SFXURLRELOCATOR_HXX_
+#define _SFX_SFXURLRELOCATOR_HXX_
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/XOfficeInstallationDirectories.hpp>
+
+#include <rtl/ustring.hxx>
+#include <osl/mutex.hxx>
+
+class SfxURLRelocator_Impl
+{
+ ::osl::Mutex maMutex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxFactory;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XOfficeInstallationDirectories > mxOfficeInstDirs;
+
+public:
+ static bool propertyCanContainOfficeDir( const rtl::OUString & rPropName );
+ void initOfficeInstDirs();
+ void makeRelocatableURL( rtl::OUString & rURL );
+ void makeAbsoluteURL( rtl::OUString & rURL );
+
+ SfxURLRelocator_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory );
+ ~SfxURLRelocator_Impl();
+};
+
+#endif
+
diff --git a/sfx2/source/inc/slotserv.hxx b/sfx2/source/inc/slotserv.hxx
new file mode 100644
index 000000000000..9b0a8e94733c
--- /dev/null
+++ b/sfx2/source/inc/slotserv.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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXSLOTSERV_HXX
+#define _SFXSLOTSERV_HXX
+
+#include <tools/solar.h>
+
+class SfxSlot;
+
+class SfxSlotServer
+{
+private:
+ const SfxSlot* _pSlot;
+ USHORT _nShellLevel;
+
+public:
+ SfxSlotServer( const SfxSlot &rSlot, USHORT nShell );
+ SfxSlotServer();
+
+ USHORT GetShellLevel() const;
+ void SetShellLevel(USHORT nLevel) { _nShellLevel = nLevel; }
+ void SetSlot(const SfxSlot* pSlot) {
+ _pSlot = pSlot;
+ }
+ const SfxSlot* GetSlot() const;
+ void Invalidate() { _pSlot = 0; }
+};
+
+//--------------------------------------------------------------------
+
+inline SfxSlotServer::SfxSlotServer( const SfxSlot &rSlot, USHORT nShell ):
+ _pSlot( &rSlot),
+ _nShellLevel( nShell )
+{
+}
+
+//--------------------------------------------------------------------
+
+inline SfxSlotServer::SfxSlotServer():
+ _pSlot(0),
+ _nShellLevel(0)
+{
+}
+
+//--------------------------------------------------------------------
+
+inline USHORT SfxSlotServer::GetShellLevel() const
+{
+ return _nShellLevel;
+}
+
+//--------------------------------------------------------------------
+
+inline const SfxSlot* SfxSlotServer::GetSlot() const
+{
+ return _pSlot;
+}
+
+
+#endif
diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx
new file mode 100644
index 000000000000..5105d27dd536
--- /dev/null
+++ b/sfx2/source/inc/splitwin.hxx
@@ -0,0 +1,133 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXSPLITWIN_HXX
+#define _SFXSPLITWIN_HXX
+
+#ifndef _SPLITWIN_HXX //autogen
+#include <vcl/splitwin.hxx>
+#endif
+#include <sfx2/childwin.hxx>
+
+class SfxWorkWindow;
+class SfxDockingWindow;
+class SfxDockArr_Impl;
+class SfxEmptySplitWin_Impl;
+struct SfxDock_Impl;
+
+class SfxSplitWindow : public SplitWindow
+{
+friend class SfxEmptySplitWin_Impl;
+
+private:
+ SfxChildAlignment eAlign;
+ SfxWorkWindow* pWorkWin;
+ SfxDockArr_Impl* pDockArr;
+ BOOL bLocked;
+ BOOL bPinned;
+ SfxEmptySplitWin_Impl* pEmptyWin;
+ SfxDockingWindow* pActive;
+
+ void InsertWindow_Impl( SfxDock_Impl* pDockWin,
+ const Size& rSize,
+ USHORT nLine,
+ USHORT nPos,
+ BOOL bNewLine=FALSE );
+
+ DECL_LINK( TimerHdl, Timer* );
+ BOOL CursorIsOverRect( BOOL bForceAdding = FALSE ) const;
+ void SetPinned_Impl( BOOL );
+ void SetFadeIn_Impl( BOOL );
+ void SaveConfig_Impl();
+ void FadeOut_Impl();
+
+protected:
+
+ virtual void StartSplit();
+ virtual void SplitResize();
+ virtual void Split();
+ virtual void Command ( const CommandEvent& rCEvt );
+ virtual void MouseButtonDown ( const MouseEvent& );
+
+public:
+ SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
+ SfxWorkWindow *pW, BOOL bWithButtons,
+ WinBits nBits = WB_BORDER | WB_SIZEABLE | WB_3DLOOK );
+
+ ~SfxSplitWindow();
+
+ void ReleaseWindow_Impl(SfxDockingWindow *pWin, BOOL bSaveConfig=TRUE);
+
+ void InsertWindow( SfxDockingWindow* pDockWin,
+ const Size& rSize);
+
+ void InsertWindow( SfxDockingWindow* pDockWin,
+ const Size& rSize,
+ USHORT nLine,
+ USHORT nPos,
+ BOOL bNewLine=FALSE );
+
+ void MoveWindow( SfxDockingWindow* pDockWin,
+ const Size& rSize,
+ USHORT nLine,
+ USHORT nPos,
+ BOOL bNewLine=FALSE );
+
+ void RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide=TRUE);
+
+ void Lock( BOOL bLock=TRUE )
+ {
+ bLocked = bLock;
+ SetUpdateMode( !bLock );
+ }
+ using Window::IsLocked;
+ BOOL IsLocked() const { return bLocked; }
+ BOOL GetWindowPos( const SfxDockingWindow* pWindow,
+ USHORT& rLine, USHORT& rPos ) const;
+ BOOL GetWindowPos( const Point& rTestPos,
+ USHORT& rLine, USHORT& rPos ) const;
+ USHORT GetLineCount() const;
+ long GetLineSize( USHORT ) const;
+ USHORT GetWindowCount(USHORT nLine) const;
+ USHORT GetWindowCount() const;
+
+ BOOL IsPinned() const { return bPinned; }
+ BOOL IsFadeIn() const;
+ BOOL IsAutoHide( BOOL bSelf = FALSE ) const;
+ SplitWindow* GetSplitWindow();
+
+ virtual void AutoHide();
+ virtual void FadeOut();
+ virtual void FadeIn();
+ void Show_Impl();
+ void Pin_Impl( BOOL bPinned );
+ BOOL ActivateNextChild_Impl( BOOL bForward = TRUE );
+ void SetActiveWindow_Impl( SfxDockingWindow* pWin );
+};
+
+#endif // #ifndef _SFXSPLITWIN_HXX
+
+
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
new file mode 100644
index 000000000000..03b0d72dac61
--- /dev/null
+++ b/sfx2/source/inc/statcach.hxx
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXSTATCACH_HXX
+#define _SFXSTATCACH_HXX
+
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#include <com/sun/star/frame/FeatureStateEvent.hpp>
+#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <cppuhelper/weak.hxx>
+
+#ifndef _SFXBINDINGS_HXX
+#include <sfx2/bindings.hxx>
+#endif
+
+#ifndef _SFXMSGSERV_HXX
+#include "slotserv.hxx"
+#endif
+
+#include <sfx2/sfxuno.hxx>
+
+class SfxControllerItem;
+class SfxDispatcher;
+class BindDispatch_Impl : public ::com::sun::star::frame::XStatusListener ,
+ public ::com::sun::star::lang::XTypeProvider ,
+ public ::cppu::OWeakObject
+{
+friend class SfxStateCache;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp;
+ ::com::sun::star::util::URL aURL;
+ ::com::sun::star::frame::FeatureStateEvent aStatus;
+ SfxStateCache* pCache;
+ const SfxSlot* pSlot;
+
+public:
+ BindDispatch_Impl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > & rDisp,
+ const ::com::sun::star::util::URL& rURL,
+ SfxStateCache* pStateCache, const SfxSlot* pSlot );
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ void Release();
+ const ::com::sun::star::frame::FeatureStateEvent& GetStatus() const;
+ void Dispatch( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aProps, sal_Bool bForceSynchron = sal_False );
+};
+
+class SfxStateCache
+{
+friend class BindDispatch_Impl;
+ BindDispatch_Impl* pDispatch;
+ sal_uInt16 nId; // Slot-Id
+ SfxControllerItem* pInternalController;
+ com::sun::star::uno::Reference < com::sun::star::frame::XDispatch > xMyDispatch;
+ SfxControllerItem* pController; // Ptr auf 1. gebundenen Controller (untereinander verkettet)
+ SfxSlotServer aSlotServ; // SlotServer, SlotPtr = 0 -> Nicht auf Stack
+ SfxPoolItem* pLastItem; // zuletzt verschicktes Item, nie -1
+ SfxItemState eLastState; // zuletzt verschickter State
+ sal_Bool bCtrlDirty:1; // Controller aktualisiert?
+ sal_Bool bSlotDirty:1; // Funktion gfs. vorhanden, muss aktualisiert werden
+ sal_Bool bItemVisible:1;// item visibility
+ sal_Bool bItemDirty; // G"ultigkeit von pLastItem
+
+private:
+ SfxStateCache( const SfxStateCache& rOrig ); // n.i.
+ void SetState_Impl( SfxItemState, const SfxPoolItem*, BOOL bMaybeDirty=FALSE );
+
+public:
+ SfxStateCache( sal_uInt16 nFuncId );
+ ~SfxStateCache();
+
+ sal_uInt16 GetId() const;
+
+ const SfxSlotServer* GetSlotServer( SfxDispatcher &rDispat, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & xProv );
+ const SfxSlotServer* GetSlotServer( SfxDispatcher &rDispat )
+ { return GetSlotServer( rDispat, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > () ); }
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > GetDispatch() const;
+ void Dispatch( const SfxItemSet* pSet, sal_Bool bForceSynchron = sal_False );
+ sal_Bool IsControllerDirty() const
+ { return bCtrlDirty ? sal_True : sal_False; }
+ SfxPoolItem* GetItem() const { return pLastItem; }
+ void ClearCache();
+
+ void SetState( SfxItemState, const SfxPoolItem*, BOOL bMaybeDirty=FALSE );
+ void SetCachedState(BOOL bAlways = FALSE);
+ void DeleteFloatingWindows();
+ void Invalidate( sal_Bool bWithSlot );
+ void SetVisibleState( BOOL bShow=TRUE );
+
+ SfxControllerItem* ChangeItemLink( SfxControllerItem* pNewBinding );
+ SfxControllerItem* GetItemLink() const;
+ void SetInternalController( SfxControllerItem* pCtrl )
+ { DBG_ASSERT( !pInternalController, "Only one internal controller allowed!" ); pInternalController = pCtrl; }
+ void ReleaseInternalController() { pInternalController = 0; }
+ SfxControllerItem* GetInternalController() const { return pInternalController; }
+ com::sun::star::uno::Reference < com::sun::star::frame::XDispatch >
+ GetInternalDispatch() const
+ { return xMyDispatch; }
+ void SetInternalDispatch( const com::sun::star::uno::Reference < com::sun::star::frame::XDispatch >& rDisp )
+ { xMyDispatch = rDisp; }
+};
+
+//--------------------------------------------------------------------
+
+// checks wheather this function is in the stack of active SfxObjectInterface
+
+//inline sal_Bool SfxStateCache::IsCallable( SfxDispatcher &rDispat )
+//{
+// return GetSlotServer(rDispat) != 0;
+//}
+//--------------------------------------------------------------------
+
+// clears Cached-Item
+
+inline void SfxStateCache::ClearCache()
+{
+ bItemDirty = sal_True;
+}
+
+//--------------------------------------------------------------------
+
+// registeres a item representing this function
+
+inline SfxControllerItem* SfxStateCache::ChangeItemLink( SfxControllerItem* pNewBinding )
+{
+ SfxControllerItem* pOldBinding = pController;
+ pController = pNewBinding;
+ if ( pNewBinding )
+ {
+ bCtrlDirty = sal_True;
+ bItemDirty = sal_True;
+ }
+ return pOldBinding;
+}
+//--------------------------------------------------------------------
+
+// returns the func binding which becomes called on spreading states
+
+inline SfxControllerItem* SfxStateCache::GetItemLink() const
+{
+ return pController;
+}
+//--------------------------------------------------------------------
+
+inline sal_uInt16 SfxStateCache::GetId() const
+{
+ return nId;
+}
+
+#endif
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
new file mode 100644
index 000000000000..116f56163681
--- /dev/null
+++ b/sfx2/source/inc/templdgi.hxx
@@ -0,0 +1,394 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_TEMPDLGI_HXX
+#define _SFX_TEMPDLGI_HXX
+
+class SfxTemplateControllerItem;
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _TOOLBOX_HXX //autogen
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include <svl/lstner.hxx>
+#include <svtools/svtreebx.hxx>
+#include <svl/eitem.hxx>
+
+#define _SVSTDARR_USHORTS
+#include <svl/svstdarr.hxx> // SvUShorts
+
+#include <rsc/rscsfx.hxx>
+#include <tools/rtti.hxx>
+
+#include <sfx2/childwin.hxx>
+#include <sfx2/templdlg.hxx>
+
+class SfxStyleFamilies;
+class SfxStyleFamilyItem;
+class SfxTemplateItem;
+class SfxBindings;
+class SfxStyleSheetBasePool;
+class SvTreeListBox ;
+class StyleTreeListBox_Impl;
+class SfxTemplateDialog_Impl;
+class SfxCommonTemplateDialog_Impl;
+class SfxTemplateDialogWrapper;
+class SfxDockingWindow;
+
+namespace com { namespace sun { namespace star { namespace frame { class XModuleManager; } } } }
+
+// class DropListBox_Impl ------------------------------------------------
+
+class DropListBox_Impl : public SvTreeListBox
+{
+private:
+ DECL_LINK( OnAsyncExecuteDrop, SvLBoxEntry* );
+ DECL_LINK( OnAsyncExecuteError, void* );
+
+protected:
+ SfxCommonTemplateDialog_Impl* pDialog;
+ USHORT nModifier;
+
+public:
+ DropListBox_Impl( Window* pParent, const ResId& rId, SfxCommonTemplateDialog_Impl* pD ) :
+ SvTreeListBox( pParent, rId ), pDialog( pD ) {}
+ DropListBox_Impl( Window* pParent, WinBits nWinBits, SfxCommonTemplateDialog_Impl* pD ) :
+ SvTreeListBox( pParent, nWinBits ), pDialog( pD ) {}
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ using SvLBox::ExecuteDrop;
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+
+ USHORT GetModifier() const { return nModifier; }
+
+ virtual long Notify( NotifyEvent& rNEvt );
+};
+
+// class SfxActionListBox ------------------------------------------------
+
+class SfxActionListBox : public DropListBox_Impl
+{
+protected:
+public:
+ SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinBits );
+ SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent, const ResId &rResId );
+
+ virtual PopupMenu* CreateContextMenu( void );
+};
+
+// class SfxCommonTemplateDialog_Impl ------------------------------------
+
+struct Deleted
+{
+ bool bDead;
+
+ Deleted() : bDead(false) {}
+
+ inline bool operator()() { return bDead; }
+};
+
+class SfxCommonTemplateDialog_Impl : public SfxListener
+{
+private:
+ class ISfxTemplateCommon_Impl : public ISfxTemplateCommon
+ {
+ private:
+ SfxCommonTemplateDialog_Impl* pDialog;
+ public:
+ ISfxTemplateCommon_Impl( SfxCommonTemplateDialog_Impl* pDialogP ) : pDialog( pDialogP ) {}
+ virtual SfxStyleFamily GetActualFamily() const { return pDialog->GetActualFamily(); }
+ virtual String GetSelectedEntry() const { return pDialog->GetSelectedEntry(); }
+ };
+
+ ISfxTemplateCommon_Impl aISfxTemplateCommon;
+
+ void ReadResource();
+ void ClearResource();
+
+protected:
+#define MAX_FAMILIES 5
+#define COUNT_BOUND_FUNC 13
+
+#define UPDATE_FAMILY_LIST 0x0001
+#define UPDATE_FAMILY 0x0002
+
+ friend class DropListBox_Impl;
+ friend class SfxTemplateControllerItem;
+ friend class SfxTemplateDialogWrapper;
+
+ SfxBindings* pBindings;
+ SfxTemplateControllerItem* pBoundItems[COUNT_BOUND_FUNC];
+
+ Window* pWindow;
+ SfxModule* pModule;
+ Timer* pTimer;
+
+ ResId* m_pStyleFamiliesId;
+ SfxStyleFamilies* pStyleFamilies;
+ SfxTemplateItem* pFamilyState[MAX_FAMILIES];
+ SfxStyleSheetBasePool* pStyleSheetPool;
+ SvTreeListBox* pTreeBox;
+ SfxObjectShell* pCurObjShell;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager >
+ xModuleManager;
+ Deleted* pbDeleted;
+
+ SfxActionListBox aFmtLb;
+ ListBox aFilterLb;
+ Size aSize;
+
+ USHORT nActFamily; // Id in der ToolBox = Position - 1
+ USHORT nActFilter; // FilterIdx
+ USHORT nAppFilter; // Filter, den die Applikation gesetzt hat (fuer automatisch)
+
+ BOOL bDontUpdate :1,
+ bIsWater :1,
+ bEnabled :1,
+ bUpdate :1,
+ bUpdateFamily :1,
+ bCanEdit :1,
+ bCanDel :1,
+ bCanNew :1,
+ bWaterDisabled :1,
+ bNewByExampleDisabled :1,
+ bUpdateByExampleDisabled:1,
+ bTreeDrag :1,
+ bHierarchical :1,
+ bBindingUpdate :1;
+
+ DECL_LINK( FilterSelectHdl, ListBox * );
+ DECL_LINK( FmtSelectHdl, SvTreeListBox * );
+ DECL_LINK( ApplyHdl, Control * );
+ DECL_LINK( DropHdl, StyleTreeListBox_Impl * );
+ DECL_LINK( TimeOut, Timer * );
+
+
+ virtual void EnableItem( USHORT /*nMesId*/, BOOL /*bCheck*/ = TRUE ) {}
+ virtual void CheckItem( USHORT /*nMesId*/, BOOL /*bCheck*/ = TRUE ) {}
+ virtual BOOL IsCheckedItem( USHORT /*nMesId*/ ) { return TRUE; }
+ virtual void LoadedFamilies() {}
+ virtual void Update() { UpdateStyles_Impl(UPDATE_FAMILY_LIST); }
+ virtual void InvalidateBindings();
+ virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten ) = 0;
+ virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE ) = 0;
+ virtual void ClearFamilyList() = 0;
+ virtual void ReplaceUpdateButtonByMenu();
+
+ void NewHdl( void* );
+ void EditHdl( void* );
+ void DeleteHdl( void* );
+
+ BOOL Execute_Impl( USHORT nId, const String& rStr, const String& rRefStr,
+ USHORT nFamily, USHORT nMask = 0,
+ USHORT* pIdx = NULL, const USHORT* pModifier = NULL );
+
+ void UpdateStyles_Impl(USHORT nFlags);
+ const SfxStyleFamilyItem* GetFamilyItem_Impl() const;
+ BOOL IsInitialized() { return nActFamily != 0xffff; }
+ void ResetFocus();
+ void EnableDelete();
+ void Initialize();
+
+ void FilterSelect( USHORT nFilterIdx, BOOL bForce = FALSE );
+ void SetFamilyState( USHORT nSlotId, const SfxTemplateItem* );
+ void SetWaterCanState( const SfxBoolItem* pItem );
+
+ void SelectStyle( const String& rStyle );
+ BOOL HasSelectedStyle() const;
+ void FillTreeBox();
+ void Update_Impl();
+ void UpdateFamily_Impl();
+
+ // In welchem FamilyState muss ich nachsehen, um die Info der i-ten
+ // Family in der pStyleFamilies zu bekommen.
+ USHORT StyleNrToInfoOffset( USHORT i );
+ USHORT InfoOffsetToStyleNr( USHORT i );
+
+ void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ void FamilySelect( USHORT nId );
+ void SetFamily( USHORT nId );
+ void ActionSelect( USHORT nId );
+
+ sal_Int32 LoadFactoryStyleFilter( SfxObjectShell* i_pObjSh );
+ void SaveFactoryStyleFilter( SfxObjectShell* i_pObjSh, sal_Int32 i_nFilter );
+
+public:
+ TYPEINFO();
+
+ SfxCommonTemplateDialog_Impl( SfxBindings* pB, SfxDockingWindow* );
+ SfxCommonTemplateDialog_Impl( SfxBindings* pB, ModalDialog* );
+ ~SfxCommonTemplateDialog_Impl();
+
+ DECL_LINK( MenuSelectHdl, Menu * );
+
+ virtual void EnableEdit( BOOL b = TRUE ) { bCanEdit = b; }
+ virtual void EnableDel( BOOL b = TRUE ) { bCanDel = b; }
+ virtual void EnableNew( BOOL b = TRUE ) { bCanNew = b; }
+
+ ISfxTemplateCommon* GetISfxTemplateCommon() { return &aISfxTemplateCommon; }
+ Window* GetWindow() { return pWindow; }
+
+ void EnableTreeDrag( BOOL b = TRUE );
+ void ExecuteContextMenu_Impl( const Point& rPos, Window* pWin );
+ void EnableExample_Impl( USHORT nId, BOOL bEnable );
+ SfxStyleFamily GetActualFamily() const;
+ String GetSelectedEntry() const;
+ SfxObjectShell* GetObjectShell() const { return pCurObjShell; }
+
+ virtual void PrepareDeleteAction(); // disable buttons, change button text, etc. when del is going to happen
+
+ inline BOOL CanEdit( void ) const { return bCanEdit; }
+ inline BOOL CanDel( void ) const { return bCanDel; }
+ inline BOOL CanNew( void ) const { return bCanNew; }
+
+ // normaly for derivates from SvTreeListBoxes, but in this case the dialog handles context menus
+ virtual PopupMenu* CreateContextMenu( void );
+
+ // Rechnet von den SFX_STYLE_FAMILY Ids auf 1-5 um
+ static USHORT SfxFamilyIdToNId( SfxStyleFamily nFamily );
+
+ void SetAutomaticFilter();
+};
+/* -----------------10.12.2003 11:42-----------------
+
+ --------------------------------------------------*/
+
+class DropToolBox_Impl : public ToolBox, public DropTargetHelper
+{
+ SfxTemplateDialog_Impl& rParent;
+protected:
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+public:
+ DropToolBox_Impl(Window* pParent, SfxTemplateDialog_Impl* pTemplateDialog);
+ ~DropToolBox_Impl();
+};
+// class SfxTemplateDialog_Impl ------------------------------------------
+
+class SfxTemplateDialog_Impl : public SfxCommonTemplateDialog_Impl
+{
+private:
+ friend class SfxTemplateControllerItem;
+ friend class SfxTemplateDialogWrapper;
+ friend class DropToolBox_Impl;
+
+ SfxTemplateDialog* m_pFloat;
+ BOOL m_bZoomIn;
+ DropToolBox_Impl m_aActionTbL;
+ ToolBox m_aActionTbR;
+
+ DECL_LINK( ToolBoxLSelect, ToolBox * );
+ DECL_LINK( ToolBoxRSelect, ToolBox * );
+ DECL_LINK( ToolBoxRClick, ToolBox * );
+ DECL_LINK( MenuSelectHdl, Menu* );
+
+protected:
+ virtual void Command( const CommandEvent& rMEvt );
+ virtual void EnableEdit( BOOL = TRUE );
+ virtual void EnableItem( USHORT nMesId, BOOL bCheck = TRUE );
+ virtual void CheckItem( USHORT nMesId, BOOL bCheck = TRUE );
+ virtual BOOL IsCheckedItem( USHORT nMesId );
+ virtual void LoadedFamilies();
+ virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten );
+ virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE );
+ virtual void ClearFamilyList();
+ virtual void ReplaceUpdateButtonByMenu();
+
+ void Resize();
+ Size GetMinOutputSizePixel();
+
+ void updateFamilyImages();
+ void updateNonFamilyImages();
+
+public:
+ friend class SfxTemplateDialog;
+ TYPEINFO();
+
+ SfxTemplateDialog_Impl( Window* pParent, SfxBindings*, SfxTemplateDialog* pWindow );
+ ~SfxTemplateDialog_Impl();
+};
+
+// class SfxTemplateCatalog_Impl -----------------------------------------
+
+class SfxTemplateCatalog_Impl : public SfxCommonTemplateDialog_Impl
+{
+private:
+ friend class SfxTemplateControllerItem;
+ friend class SfxCommonTemplateDialog_Impl;
+
+ ListBox aFamList;
+ OKButton aOkBtn;
+ CancelButton aCancelBtn;
+ PushButton aNewBtn;
+ PushButton aChangeBtn;
+ PushButton aDelBtn;
+ PushButton aOrgBtn;
+ HelpButton aHelpBtn;
+
+ SfxTemplateCatalog* pReal;
+ SvUShorts aFamIds;
+ SfxModalDefParentHelper aHelper;
+
+protected:
+ virtual void EnableItem( USHORT nMesId, BOOL bCheck = TRUE );
+ virtual void CheckItem( USHORT nMesId, BOOL bCheck = TRUE );
+ virtual BOOL IsCheckedItem( USHORT nMesId );
+ virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten );
+ virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE );
+ virtual void ClearFamilyList();
+ virtual void EnableEdit( BOOL = TRUE );
+ virtual void EnableDel( BOOL = TRUE );
+ virtual void EnableNew( BOOL = TRUE );
+
+ using SfxCommonTemplateDialog_Impl::NewHdl;
+ DECL_LINK( FamListSelect, ListBox * );
+ DECL_LINK( OkHdl, Button * );
+ DECL_LINK( CancelHdl, Button * );
+ DECL_LINK( NewHdl, Button * );
+ DECL_LINK( ChangeHdl, Button * );
+ DECL_LINK( DelHdl, Button * );
+ DECL_LINK( OrgHdl, Button * );
+
+public:
+ TYPEINFO();
+ SfxTemplateCatalog_Impl( Window* pParent, SfxBindings*, SfxTemplateCatalog* pWindow );
+ ~SfxTemplateCatalog_Impl();
+
+friend class SfxTemplateCatalog;
+
+ virtual void PrepareDeleteAction();
+};
+
+#endif // #ifndef _SFX_TEMPDLGI_HXX
+
+
diff --git a/sfx2/source/inc/tplcitem.hxx b/sfx2/source/inc/tplcitem.hxx
new file mode 100644
index 000000000000..f97d7f89868c
--- /dev/null
+++ b/sfx2/source/inc/tplcitem.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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _TPLCITEM_HXX
+#define _TPLCITEM_HXX
+
+#include <sfx2/ctrlitem.hxx>
+#include <tools/link.hxx>
+
+class SfxCommonTemplateDialog_Impl;
+
+class SfxTemplateControllerItem: public SfxControllerItem {
+ SfxCommonTemplateDialog_Impl &rTemplateDlg;
+ BYTE nWaterCanState;
+ long nUserEventId;
+
+ DECL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
+ SfxTemplateControllerItem*);
+
+protected:
+ virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+
+public:
+ SfxTemplateControllerItem( USHORT nId, SfxCommonTemplateDialog_Impl &rDlg, SfxBindings &);
+ ~SfxTemplateControllerItem();
+};
+
+
+#endif
diff --git a/sfx2/source/inc/tplcomp.hxx b/sfx2/source/inc/tplcomp.hxx
new file mode 100644
index 000000000000..c172efb15d87
--- /dev/null
+++ b/sfx2/source/inc/tplcomp.hxx
@@ -0,0 +1,224 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _TPLCOMP_HXX
+#define _TPLCOMP_HXX
+
+#include <osl/mutex.hxx>
+//ASDBG #ifndef _USR_UNO_HXX
+//ASDBG #include <usr/uno.hxx>
+//ASDBG #endif
+//ASDBG #ifndef _USR_LSTCOMP_HXX
+//ASDBG #include <usr/iterhlp.hxx>
+//ASDBG #endif
+//ASDBG #ifndef _USR_SERVICES_HXX
+//ASDBG #include <usr/services.hxx>
+//ASDBG #endif
+#include <com/sun/star/chaos/XCommandExecutor.hpp>
+#include <com/sun/star/chaos/XStatusCallback.hpp>
+#include <com/sun/star/chaos/UnknownCommandException.hpp>
+#include <com/sun/star/chaos/StatusCallbackEvent.hpp>
+#include <com/sun/star/chaos/XURLContent.hpp>
+#include <com/sun/star/chaos/XExplorerExchange.hpp>
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+
+class CntAnchor;
+
+class TplAnchorListener;
+
+// -----------------
+// - TplComponent -
+// -----------------
+
+class TplComponent : public ::com::sun::star::chaos::XURLContent, public ::com::sun::star::chaos::XCommandExecutor,
+ public ::com::sun::star::beans::XPropertySet, public ::com::sun::star::chaos::XExplorerExchange,
+ public ::cppu::OWeakObject, public ::com::sun::star::lang::XServiceInfo
+{
+private:
+
+ void HandleNewEvt( const ::rtl::OUString& rCommand,
+ const ::com::sun::star::uno::Any& rAny );
+ void CreatePopupMenu( ::com::sun::star::uno::Any& rAny ) const;
+
+protected:
+
+ ::rtl::OUString maURL;
+ ::rtl::OUString maName;
+ ::osl::Mutex aMutex;
+ ::cppu::OInterfaceContainerHelper maListeners;
+ TplAnchorListener* mpListener;
+ short mnOpenMode;
+
+public:
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER_XSERVICEINFO
+
+ TplComponent();
+ ~TplComponent();
+
+ // interface ::com::sun::star::ucb::XContent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent() throw ( ::com::sun::star::uno::RuntimeException )
+ { ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > aRef; return aRef; }
+ virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Parent ) throw ( ::com::sun::star::uno::RuntimeException )
+ {}
+
+ // interface ::com::sun::star::chaos::XURLContent
+ virtual ::rtl::OUString SAL_CALL getURL() throw ( ::com::sun::star::uno::RuntimeException )
+ { return maURL; }
+ virtual sal_Bool SAL_CALL initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XURLContent > & aParent, const ::rtl::OUString& aURL ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // interface ::com::sun::star::chaos::XCommandExecutor
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL queryCommands() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL cancel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rCommandId ) throw ( ::com::sun::star::uno::RuntimeException )
+ {}
+ virtual void SAL_CALL execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Any& rArgs,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XStatusCallback > & rCallback ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // interface ::com::sun::star::beans::XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& aPropertyName ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& aPropertyName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& aPropertyName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+ // interface ::com::sun::star::chaos::XExplorerExchange
+ virtual ::com::sun::star::uno::Any SAL_CALL createDataObject( sal_uInt16& nSourceOptions ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_uInt16 SAL_CALL insertDataObject( const ::com::sun::star::uno::Any& pSotDataObjectPtr,
+ sal_uInt16 nUserAction,
+ sal_uInt16 nSourceOptions ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL queryInsertDataObject( const ::com::sun::star::uno::Any& pSotDataObjectPtr,
+ sal_uInt16 nUserAction,
+ sal_uInt16 nSourceOptions,
+ sal_uInt16& nResultingAction,
+ sal_uInt16& nDefaultAction ) throw ( ::com::sun::star::uno::RuntimeException );
+
+
+ // -------------------------------------------------------------
+
+ void CreateNewChild( CntAnchor* pAnchor,
+ const String& rTitle );
+ void RemoveChild( CntAnchor* pAnchor );
+ void StopListening( CntAnchor* pAnchor );
+ void HandleOpenEvt();
+};
+
+// ------------------------
+// - TplContentsComponent -
+// ------------------------
+
+class TplContentsListener;
+
+class TplContentsComponent : public TplComponent
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XURLContent > _xParent;
+ TplContentsListener* _pListener;
+ SvDataObjectRef _xObject;
+ sal_uInt16 _nLayout;
+
+ void HandleOpenEvt( const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XStatusCallback > & rJob,
+ const ::com::sun::star::chaos::StatusCallbackEvent& rEvt );
+ void HandleNewEvt( const ::rtl::OUString& rCommand,
+ const ::com::sun::star::uno::Any& rAny );
+ void HandleInitEvt();
+
+ void CreateFileName( String& rName,
+ String& rDirURL );
+ void CreateNewTpl( const String& rFilter,
+ const String& rParentDir,
+ const String& rFileName,
+ const String& rDocName );
+protected:
+
+ void CreatePopupMenu( ::com::sun::star::uno::Any& rAny ) const;
+
+public:
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER_XSERVICEINFO
+
+ TplContentsComponent();
+ ~TplContentsComponent();
+
+ virtual sal_Bool SAL_CALL initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XURLContent > & aParent, const ::rtl::OUString& aURL ) throw ( ::com::sun::star::uno::RuntimeException );
+
+
+ // interface ::com::sun::star::chaos::XCommandExecutor
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL queryCommands() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Any& rArgs,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XStatusCallback > & rCallback ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // interface ::com::sun::star::beans::XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& aPropertyName ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // interface ::com::sun::star::chaos::XExplorerExchange
+ virtual ::com::sun::star::uno::Any SAL_CALL createDataObject( sal_uInt16& nSourceOptions ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_uInt16 SAL_CALL insertDataObject( const ::com::sun::star::uno::Any& pSotDataObjectPtr,
+ sal_uInt16 nUserAction,
+ sal_uInt16 nSourceOptions ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL queryInsertDataObject( const ::com::sun::star::uno::Any& pSotDataObjectPtr,
+ sal_uInt16 nUserAction,
+ sal_uInt16 nSourceOptions,
+ sal_uInt16& nResultingAction,
+ sal_uInt16& nDefaultAction ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // -------------------------------------------------------------
+
+ void CreateNewChild( CntAnchor* pAnchor );
+ void HandleDeleteEvt();
+ void SetURL( const ::rtl::OUString& rURL);
+ void SetName( const ::rtl::OUString& rNewName );
+};
+
+
+#endif
+
diff --git a/sfx2/source/inc/versdlg.hxx b/sfx2/source/inc/versdlg.hxx
new file mode 100644
index 000000000000..73b686d91252
--- /dev/null
+++ b/sfx2/source/inc/versdlg.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _VERSDLG_HXX
+#define _VERSDLG_HXX
+
+// #include *****************************************************************
+
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#include <vcl/fixed.hxx>
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtabbx.hxx>
+#endif
+#include <svtools/svmedit.hxx>
+#include <sfx2/basedlgs.hxx>
+
+class SfxObjectShell;
+class SfxViewFrame;
+struct SfxVersionInfo;
+
+class SfxVersionsTabListBox_Impl : public SvTabListBox
+{
+ virtual void KeyInput( const KeyEvent& rKeyEvent );
+
+public:
+ SfxVersionsTabListBox_Impl(
+ Window* pParent, const ResId& );
+};
+
+class SfxVersionTableDtor;
+class SfxVersionDialog : public SfxModalDialog
+{
+ FixedLine aNewGroup;
+ PushButton aSaveButton;
+ CheckBox aSaveCheckBox;
+ FixedLine aExistingGroup;
+ FixedText aDateTimeText;
+ FixedText aSavedByText;
+ FixedText aCommentText;
+ SfxVersionsTabListBox_Impl aVersionBox;
+ CancelButton aCloseButton;
+ PushButton aOpenButton;
+ PushButton aViewButton;
+ PushButton aDeleteButton;
+ PushButton aCompareButton;
+ HelpButton aHelpButton;
+ SfxViewFrame* pViewFrame;
+ SfxVersionTableDtor* mpTable;
+ LocaleDataWrapper* mpLocaleWrapper;
+ sal_Bool mbIsSaveVersionOnClose;
+
+ DECL_LINK( DClickHdl_Impl, Control* );
+ DECL_LINK( SelectHdl_Impl, Control* );
+ DECL_LINK( ButtonHdl_Impl, Button* );
+ void Init_Impl();
+ void Open_Impl();
+ void RecalcDateColumn();
+
+public:
+ SfxVersionDialog ( SfxViewFrame* pFrame, sal_Bool );
+ virtual ~SfxVersionDialog ();
+ sal_Bool IsSaveVersionOnClose() const { return mbIsSaveVersionOnClose; }
+};
+
+class SfxViewVersionDialog_Impl : public SfxModalDialog
+{
+ FixedText aDateTimeText;
+ FixedText aSavedByText;
+ MultiLineEdit aEdit;
+ OKButton aOKButton;
+ CancelButton aCancelButton;
+ PushButton aCloseButton;
+ HelpButton aHelpButton;
+ SfxVersionInfo* pInfo;
+
+ DECL_LINK( ButtonHdl, Button* );
+
+public:
+ SfxViewVersionDialog_Impl( Window *pParent,
+ SfxVersionInfo& rInfo, BOOL bEdit );
+ };
+
+#endif
diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx
new file mode 100644
index 000000000000..4b000133d11c
--- /dev/null
+++ b/sfx2/source/inc/virtmenu.hxx
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXVIRTMENU_HXX
+#define _SFXVIRTMENU_HXX
+
+
+#include <svl/svarray.hxx>
+#include <sfx2/mnuitem.hxx>
+#include "mnucfga.hxx"
+
+class SfxBindings;
+class Timer;
+class SfxMenuImageControl_Impl;
+
+SV_DECL_PTRARR_DEL( SfxMenuCtrlArr_Impl, SfxMenuControl*, 2, 2 )
+
+class SAL_DLLPUBLIC_EXPORT SfxVirtualMenu
+{
+friend class SfxMenuControl;
+
+private:
+ Menu* pSVMenu;
+ SfxVirtualMenu* pParent;
+ SfxMenuCtrlArr_Impl* pAppCtrl;
+ SfxMenuControl* pItems;
+ SfxMenuImageControl_Impl* pImageControl;
+ SfxBindings* pBindings;
+ ResMgr* pResMgr;
+ PopupMenu* pWindowMenu;
+ PopupMenu* pPickMenu;
+ PopupMenu* pAddonsMenu;
+ Timer* pAutoDeactivate; // Hack fuer QAP-Bug
+ USHORT nVisibleItems;
+ USHORT nId;
+ USHORT nCount;
+ USHORT nLocks;
+ BOOL bResCtor : 1; // SV Menu created from resource
+ BOOL bOLE : 1; // InPlaceMenu
+ BOOL bHelpInitialized : 1;
+ BOOL bIsActive : 1;
+ BOOL bControllersUnBound : 1;
+ BOOL bWasHighContrast : 1;
+ BOOL bIsAddonPopupMenu : 1;
+
+private:
+ void Construct_Impl();
+ FASTBOOL Bind_Impl( Menu *pMenu );
+ inline SfxMenuCtrlArr_Impl& GetAppCtrl_Impl()
+ {
+ return pAppCtrl? *pAppCtrl: *(pAppCtrl = new SfxMenuCtrlArr_Impl) ;
+ }
+ void UnbindControllers();
+ void BindControllers();
+
+protected:
+ SfxVirtualMenu( USHORT nOwnId, SfxVirtualMenu* pParent, Menu& rMenu, BOOL bWithHelp,
+ SfxBindings &rBind, BOOL bOLEServer=FALSE, BOOL bRes=FALSE, BOOL bIsAddonMenu=FALSE );
+
+ void CreateFromSVMenu();
+ DECL_LINK( Highlight, Menu * );
+ DECL_LINK( Activate, Menu * );
+ DECL_LINK( Deactivate, Menu * );
+ DECL_LINK( SettingsChanged, void* );
+
+ // Used for runtime popup menus
+ void UpdateImages( Menu* pMenu );
+ void RemoveMenuImages( Menu* pMenu );
+ void InsertAddOnsMenuItem( Menu* pMenu );
+
+public:
+ ~SfxVirtualMenu();
+ SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
+ SfxBindings &rBind, BOOL bOLEServer=FALSE, BOOL bRes=FALSE, BOOL bIsAddonMenu=FALSE );
+ void CheckItem( USHORT nItemId, BOOL bCheck );
+ void EnableItem( USHORT nItemId, BOOL bEnable );
+ void SetItemText( USHORT nItemId, const String& rText );
+
+ USHORT GetItemPos( USHORT nItemId ) const;
+
+ USHORT GetItemCount() const;
+ Menu* GetSVMenu() const;
+ SfxMenuControl& operator[]( USHORT nPos ) const;
+
+ USHORT GetItemId( USHORT nPos ) const;
+ SfxVirtualMenu* GetPopupMenu( USHORT nId ) const;
+ String GetItemText( USHORT nId ) const;
+ String GetItemHelpText( USHORT nId ) const;
+
+ //void InvalidateKeyCodes();
+
+ SfxVirtualMenu* GetParentMenu() const { return pParent; }
+ void SetParentMenu( SfxVirtualMenu* pNewParent )
+ { pParent = pNewParent; }
+
+ void SetPopupMenu( USHORT nId, PopupMenu *pMenu );
+ BOOL IsFromResource() const
+ { return bResCtor; }
+ void InitPopup(USHORT nPos, BOOL bOLE = TRUE);
+ void InitializeHelp();
+ void SetResMgr(ResMgr* pMgr) {pResMgr = pMgr; }
+ ResMgr* GetResMgr() { return pResMgr; }
+ void SetHelpIds( ResMgr* );
+ BOOL IsHiContrastMode() const;
+ void UpdateImages();
+
+ DECL_LINK( Select, Menu * );
+};
+
+//--------------------------------------------------------------------
+
+// return the number of virtual items in this menu
+
+inline USHORT SfxVirtualMenu::GetItemCount() const
+{
+ return nCount;
+}
+//--------------------------------------------------------------------
+
+//
+
+inline SfxMenuControl& SfxVirtualMenu::operator[]( USHORT nPos ) const
+{
+ return *(pItems+nPos);
+}
+//--------------------------------------------------------------------
+
+// returns the item id at position nPos in the menu (or 0 if sep.)
+
+inline USHORT SfxVirtualMenu::GetItemId( USHORT nPos ) const
+{
+ return pItems ? pItems[nPos].GetId() : 0;
+}
+
+
+#endif
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
new file mode 100644
index 000000000000..ae005d1bad88
--- /dev/null
+++ b/sfx2/source/inc/workwin.hxx
@@ -0,0 +1,390 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXWORKWIN_HXX
+#define _SFXWORKWIN_HXX
+
+#include <vector>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#ifndef _COM_SUN_STAR_UI_XUILEMENT_HPP_
+#include <com/sun/star/ui/XUIElement.hpp>
+#endif
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/frame/XLayoutManagerListener.hpp>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/propshlp.hxx>
+
+#define _SVSTDARR_USHORTS
+#include <svl/svstdarr.hxx> // SvUShorts
+#include <rtl/ustring.hxx>
+#include <vos/mutex.hxx>
+
+#include <sfx2/sfx.hrc>
+#include <sfx2/childwin.hxx>
+#include <sfx2/shell.hxx>
+#include <sfx2/minarray.hxx>
+#include <sfx2/ctrlitem.hxx>
+#include <sfx2/viewfrm.hxx>
+
+class SfxInPlaceEnv_Impl;
+class SfxPlugInEnv_Impl;
+class SfxSplitWindow;
+class SfxWorkWindow;
+
+//====================================================================
+// Dieser struct h"alt alle relevanten Informationen "uber Toolboxen bereit.
+
+struct SfxObjectBar_Impl
+{
+ USHORT nId; // Resource - und ConfigId der Toolbox
+ USHORT nMode; // spezielle Sichtbarkeitsflags
+ USHORT nPos;
+ USHORT nIndex;
+ sal_Bool bDestroy;
+ String aName;
+ SfxInterface* pIFace;
+
+ SfxObjectBar_Impl() :
+ nId(0),
+ nMode(0),
+ bDestroy(sal_False),
+ pIFace(0)
+ {}
+};
+
+//------------------------------------------------------------------------------
+// Dieser struct h"alt alle relevanten Informationen "uber die Statuszeile bereit.
+struct SfxStatBar_Impl
+{
+ USHORT nId;
+ BOOL bOn;
+ BOOL bTemp;
+
+ SfxStatBar_Impl() :
+ nId(0),
+ bOn(TRUE),
+ bTemp(FALSE)
+ {}
+};
+
+//------------------------------------------------------------------------------
+
+#define CHILD_NOT_VISIBLE 0
+#define CHILD_ACTIVE 1 // nicht durch HidePopups ausgeschaltet
+#define CHILD_NOT_HIDDEN 2 // nicht durch HideChildWindow ausgeschaltet
+#define CHILD_FITS_IN 4 // nicht zu gro\s f"ur OutputSize des parent
+#define CHILD_VISIBLE (CHILD_NOT_HIDDEN | CHILD_ACTIVE | CHILD_FITS_IN)
+#define CHILD_ISVISIBLE (CHILD_NOT_HIDDEN | CHILD_ACTIVE)
+
+struct SfxChild_Impl
+{
+ Window* pWin;
+ Size aSize;
+ SfxChildAlignment eAlign;
+ USHORT nVisible;
+ BOOL bResize;
+ BOOL bCanGetFocus;
+ BOOL bSetFocus;
+
+ SfxChild_Impl( Window& rChild, const Size& rSize,
+ SfxChildAlignment eAlignment, BOOL bIsVisible ):
+ pWin(&rChild), aSize(rSize), eAlign(eAlignment), bResize(FALSE),
+ bCanGetFocus( FALSE ), bSetFocus( FALSE )
+ {
+ nVisible = bIsVisible ? CHILD_VISIBLE : CHILD_NOT_VISIBLE;
+ }
+};
+
+//--------------------------------------------------------------------
+class SfxChildWinController_Impl : public SfxControllerItem
+{
+ SfxWorkWindow* pWorkwin;
+
+ public:
+ SfxChildWinController_Impl( USHORT nId, SfxWorkWindow *pWin );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+struct SfxChildWin_Impl
+{
+ USHORT nSaveId; // die ChildWindow-Id
+ USHORT nInterfaceId; // der aktuelle Context
+ USHORT nId; // aktuelle Id
+ SfxChildWindow* pWin;
+ BOOL bCreate;
+ SfxChildWinInfo aInfo;
+ SfxChild_Impl* pCli; // != 0 bei direkten Children
+ USHORT nVisibility;
+ BOOL bEnable;
+ BOOL bDisabled;
+
+ SfxChildWin_Impl( sal_uInt32 nID ) :
+ nSaveId((USHORT) (nID & 0xFFFF) ),
+ nInterfaceId((USHORT) (nID >> 16)),
+ nId(nSaveId),
+ pWin(0),
+ bCreate(FALSE),
+ pCli(0),
+ nVisibility( FALSE ),
+ bEnable( TRUE ),
+ bDisabled( FALSE )
+ {}
+};
+
+enum SfxChildIdentifier
+{
+ SFX_CHILDWIN_STATBAR,
+ SFX_CHILDWIN_OBJECTBAR,
+ SFX_CHILDWIN_DOCKINGWINDOW,
+ SFX_CHILDWIN_SPLITWINDOW
+};
+
+enum SfxDockingConfig
+{
+ SFX_SETDOCKINGRECTS,
+ SFX_ALIGNDOCKINGWINDOW,
+ SFX_TOGGLEFLOATMODE,
+ SFX_MOVEDOCKINGWINDOW
+};
+
+DECL_PTRARRAY( SfxChildList_Impl, SfxChild_Impl*, 2, 2 )
+DECL_PTRARRAY( SfxChildWindows_Impl, SfxChildWin_Impl*, 2, 2 )
+
+SV_DECL_OBJARR( SfxObjectBarArr_Impl, SfxObjectBar_Impl, 1, 2 )
+
+struct SfxObjectBarList_Impl
+{
+ SfxObjectBarArr_Impl aArr;
+ USHORT nAct;
+
+ SfxObjectBar_Impl operator[] ( USHORT n )
+ { return aArr[n]; }
+ SfxObjectBar_Impl Actual()
+ { return aArr[nAct]; }
+};
+
+struct SfxSplitWin_Impl
+{
+ SfxSplitWindow* pSplitWin;
+ SfxChildWindows_Impl* pChildWins;
+};
+
+#define SFX_SPLITWINDOWS_LEFT 0
+#define SFX_SPLITWINDOWS_TOP 2
+#define SFX_SPLITWINDOWS_RIGHT 1
+#define SFX_SPLITWINDOWS_BOTTOM 3
+#define SFX_SPLITWINDOWS_MAX 4
+
+//--------------------------------------------------------------------
+
+class LayoutManagerListener : public ::com::sun::star::frame::XLayoutManagerListener,
+ public ::com::sun::star::lang::XTypeProvider,
+ public ::com::sun::star::lang::XComponent,
+ public ::cppu::OWeakObject
+{
+ public:
+ LayoutManagerListener( SfxWorkWindow* pWrkWin );
+ virtual ~LayoutManagerListener();
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ void setFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+
+ //---------------------------------------------------------------------------------------------------------
+ // XComponent
+ //---------------------------------------------------------------------------------------------------------
+ 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 void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
+
+ //---------------------------------------------------------------------------------------------------------
+ // XEventListener
+ //---------------------------------------------------------------------------------------------------------
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException );
+
+ //---------------------------------------------------------------------------------------------------------
+ // XLayoutManagerEventListener
+ //---------------------------------------------------------------------------------------------------------
+ virtual void SAL_CALL layoutEvent( const ::com::sun::star::lang::EventObject& aSource, ::sal_Int16 eLayoutEvent, const ::com::sun::star::uno::Any& aInfo ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ sal_Bool m_bHasFrame;
+ SfxWorkWindow* m_pWrkWin;
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XFrame > m_xFrame;
+ rtl::OUString m_aLayoutManagerPropName;
+};
+
+class SfxWorkWindow
+{
+ friend class UIElementWrapper;
+ friend class LayoutManagerListener;
+
+protected:
+ SvUShorts aSortedList;
+ SfxStatBar_Impl aStatBar;
+ std::vector< SfxObjectBar_Impl > aObjBarList;
+ Rectangle aClientArea;
+ Rectangle aUpperClientArea;
+ SfxWorkWindow* pParent;
+ SfxSplitWindow* pSplit[SFX_SPLITWINDOWS_MAX];
+ SfxChildList_Impl* pChilds;
+ SfxChildWindows_Impl* pChildWins;
+ SfxBindings* pBindings;
+ Window* pWorkWin;
+ SfxShell* pConfigShell;
+ Window* pActiveChild;
+ USHORT nUpdateMode;
+ USHORT nChilds;
+ USHORT nOrigMode;
+ BOOL bSorted : 1;
+ BOOL bDockingAllowed : 1;
+ BOOL bInternalDockingAllowed : 1;
+ BOOL bAllChildsVisible : 1;
+ BOOL bIsFullScreen : 1;
+ BOOL bShowStatusBar : 1;
+ sal_Int32 m_nLock;
+ rtl::OUString m_aStatusBarResName;
+ rtl::OUString m_aLayoutManagerPropName;
+ rtl::OUString m_aTbxTypeName;
+ rtl::OUString m_aProgressBarResName;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xLayoutManagerListener;
+
+protected:
+ void CreateChildWin_Impl(SfxChildWin_Impl*,BOOL);
+ void RemoveChildWin_Impl(SfxChildWin_Impl*);
+ void Sort_Impl();
+ void AlignChild_Impl( Window& rWindow, const Size& rNewSize,
+ SfxChildAlignment eAlign );
+ SfxChild_Impl* FindChild_Impl( const Window& rWindow ) const;
+ virtual BOOL RequestTopToolSpacePixel_Impl( SvBorder aBorder );
+ virtual Rectangle GetTopRect_Impl();
+ SvBorder Arrange_Impl();
+ virtual void SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&);
+ static sal_Bool IsPluginMode( SfxObjectShell* pObjShell );
+
+public:
+ SfxWorkWindow( Window *pWin, SfxBindings& rBindings, SfxWorkWindow* pParent = NULL);
+ virtual ~SfxWorkWindow();
+ SystemWindow* GetTopWindow() const;
+ SfxBindings& GetBindings()
+ { return *pBindings; }
+ Window* GetWindow() const
+ { return pWorkWin; }
+ Rectangle GetFreeArea( BOOL bAutoHide ) const;
+ void SetDockingAllowed(BOOL bSet)
+ { bDockingAllowed = bSet; }
+ void SetInternalDockingAllowed(BOOL bSet)
+ { bInternalDockingAllowed = bSet; }
+ BOOL IsDockingAllowed() const
+ { return bDockingAllowed; }
+ BOOL IsInternalDockingAllowed() const
+ { return bInternalDockingAllowed; }
+ SfxWorkWindow* GetParent_Impl() const
+ { return pParent; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > CreateDispatch( const String& );
+
+ // Methoden f"ur alle Child-Fenster
+ void DataChanged_Impl( const DataChangedEvent& rDCEvt );
+ void ReleaseChild_Impl( Window& rWindow );
+ SfxChild_Impl* RegisterChild_Impl( Window& rWindow, SfxChildAlignment eAlign, BOOL bCanGetFocus=FALSE );
+ void ShowChilds_Impl();
+ void HideChilds_Impl();
+ void Close_Impl();
+ BOOL PrepareClose_Impl();
+ virtual void ArrangeChilds_Impl( BOOL bForce = TRUE );
+ void DeleteControllers_Impl();
+ void SaveStatus_Impl();
+ void HidePopups_Impl(BOOL bHide, BOOL bParent=FALSE, USHORT nId=0);
+ void ConfigChild_Impl(SfxChildIdentifier,
+ SfxDockingConfig, USHORT);
+ void MakeChildsVisible_Impl( BOOL bVis );
+ void ArrangeAutoHideWindows( SfxSplitWindow *pSplit );
+ BOOL IsAutoHideMode( const SfxSplitWindow *pSplit );
+ void EndAutoShow_Impl( Point aPos );
+ void SetFullScreen_Impl( BOOL bSet ) { bIsFullScreen = bSet; }
+ BOOL IsFullScreen_Impl() const { return bIsFullScreen; }
+
+ // Methoden f"ur Objectbars
+ virtual void UpdateObjectBars_Impl();
+ void ResetObjectBars_Impl();
+ void SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
+ SfxInterface *pIFace, const String* pName=0 );
+ Window* GetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId );
+ FASTBOOL KnowsObjectBar_Impl( USHORT nPos ) const;
+ BOOL IsVisible_Impl();
+ void MakeVisible_Impl( BOOL );
+ void SetObjectBarVisibility_Impl( USHORT nVis );
+ BOOL IsContainer_Impl() const;
+ void Lock_Impl( BOOL );
+ void NextObjectBar_Impl( USHORT nPos );
+ USHORT HasNextObjectBar_Impl( USHORT nPos, String* pStr=0 );
+ void SetObjectBarCustomizeMode_Impl( BOOL );
+
+ // Methoden f"ur ChildWindows
+ void UpdateChildWindows_Impl();
+ void ResetChildWindows_Impl();
+ void SetChildWindowVisible_Impl( sal_uInt32, BOOL, USHORT );
+ void ToggleChildWindow_Impl(USHORT,BOOL);
+ BOOL HasChildWindow_Impl(USHORT);
+ BOOL KnowsChildWindow_Impl(USHORT);
+ void ShowChildWindow_Impl(USHORT, BOOL bVisible, BOOL bSetFocus);
+ void SetChildWindow_Impl(USHORT, BOOL bOn, BOOL bSetFocus);
+ SfxChildWindow* GetChildWindow_Impl(USHORT);
+ virtual void InitializeChild_Impl(SfxChildWin_Impl*);
+ SfxSplitWindow* GetSplitWindow_Impl(SfxChildAlignment);
+
+ BOOL IsVisible_Impl( USHORT nMode ) const;
+ void DisableChildWindow_Impl( USHORT nId, BOOL bDisable );
+ BOOL IsFloating( USHORT nId );
+ void ChangeWindow_Impl( Window *pNew );
+ void SetActiveChild_Impl( Window *pChild );
+ Window* GetActiveChild_Impl();
+ virtual BOOL ActivateNextChild_Impl( BOOL bForward = TRUE );
+
+ // Methoden f"ur StatusBar
+ void SetTempStatusBar_Impl( BOOL bSet );
+ void ResetStatusBar_Impl();
+ void SetStatusBar_Impl(sal_uInt32 nResId, SfxShell *pShell, SfxBindings& );
+ void UpdateStatusBar_Impl();
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > GetStatusIndicator();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetFrameInterface();
+};
+
+class SfxFrameWorkWin_Impl : public SfxWorkWindow
+{
+ SfxFrame* pMasterFrame;
+ SfxFrame* pFrame;
+public:
+ SfxFrameWorkWin_Impl( Window* pWin, SfxFrame* pFrm, SfxFrame* pMaster );
+ virtual void ArrangeChilds_Impl( BOOL bForce = TRUE );
+ virtual void UpdateObjectBars_Impl();
+ virtual Rectangle GetTopRect_Impl();
+};
+
+
+#endif