summaryrefslogtreecommitdiff
path: root/binfilter/bf_sfx2/source/inc
diff options
context:
space:
mode:
Diffstat (limited to 'binfilter/bf_sfx2/source/inc')
-rw-r--r--binfilter/bf_sfx2/source/inc/appbas.hxx48
-rw-r--r--binfilter/bf_sfx2/source/inc/appdata.hxx120
-rw-r--r--binfilter/bf_sfx2/source/inc/brokenpackageint.hxx39
-rw-r--r--binfilter/bf_sfx2/source/inc/cfgmgr.hxx108
-rw-r--r--binfilter/bf_sfx2/source/inc/conttrans.hxx113
-rw-r--r--binfilter/bf_sfx2/source/inc/dinfobj.hxx63
-rw-r--r--binfilter/bf_sfx2/source/inc/dlgcont.hxx123
-rw-r--r--binfilter/bf_sfx2/source/inc/doctemplates.hxx115
-rw-r--r--binfilter/bf_sfx2/source/inc/eacopier.hxx50
-rw-r--r--binfilter/bf_sfx2/source/inc/eventsupplier.hxx151
-rw-r--r--binfilter/bf_sfx2/source/inc/fltfnc.hxx39
-rw-r--r--binfilter/bf_sfx2/source/inc/fltoptint.hxx79
-rw-r--r--binfilter/bf_sfx2/source/inc/helper.hxx62
-rw-r--r--binfilter/bf_sfx2/source/inc/namecont.hxx504
-rw-r--r--binfilter/bf_sfx2/source/inc/nochaos.hxx44
-rw-r--r--binfilter/bf_sfx2/source/inc/objshimp.hxx201
-rw-r--r--binfilter/bf_sfx2/source/inc/openflag.hxx46
-rw-r--r--binfilter/bf_sfx2/source/inc/referers.hxx41
-rw-r--r--binfilter/bf_sfx2/source/inc/scriptcont.hxx173
-rw-r--r--binfilter/bf_sfx2/source/inc/sfxtypes.hxx171
-rw-r--r--binfilter/bf_sfx2/source/inc/tplcomp.hxx222
21 files changed, 2512 insertions, 0 deletions
diff --git a/binfilter/bf_sfx2/source/inc/appbas.hxx b/binfilter/bf_sfx2/source/inc/appbas.hxx
new file mode 100644
index 000000000000..2b8091f962dc
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/appbas.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 "bf_basic/sbxdef.hxx"
+namespace binfilter {
+
+class StarBASIC;
+class SbxObject;
+
+//=========================================================================
+
+SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject,
+ const char *pName, ULONG nSID, SbxDataType eType=SbxOBJECT,
+ SbxClassType = SbxCLASS_PROPERTY );
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/appdata.hxx b/binfilter/bf_sfx2/source/inc/appdata.hxx
new file mode 100644
index 000000000000..6f82603cd936
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/appdata.hxx
@@ -0,0 +1,120 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 <bf_svtools/lstner.hxx>
+#include <vcl/timer.hxx>
+#include <tools/string.hxx>
+#include "rtl/ref.hxx"
+
+#include "bitset.hxx"
+class SvStrings;
+class Config;
+class SvVerbList;
+class SvtSaveOptions;
+class SvtUndoOptions;
+class SvtHelpOptions;
+
+namespace binfilter {
+
+class SvUShorts;
+class SfxItemPool;
+class SfxCancelManager;
+class SfxApplication;
+
+class SfxBmkMenu;
+class SfxProgress;
+class SfxChildWinFactArr_Impl;
+class SfxToolBoxConfig;
+class SfxDdeDocTopics_Impl;
+class SfxEventConfiguration;
+class SfxMacroConfig;
+class SfxInitLinkList;
+class SfxFilterMatcher;
+struct SfxFrameObjectFactoryPtr;
+struct SfxPluginObjectFactoryPtr;
+class ISfxTemplateCommon;
+class SfxFilterMatcher;
+class SfxStatusDispatcher;
+class SfxMiscCfg;
+class SfxDocumentTemplates;
+class SfxFrameArr_Impl;
+class SfxObjectFactory;
+class SfxObjectShell;
+namespace sfx2 { namespace appl { class ImeStatusWindow; } }
+
+//=========================================================================
+// SfxAppData_Impl
+//=========================================================================
+
+class SfxAppData_Impl
+{
+public:
+ IndexBitSet aIndexBitSet; // for counting noname documents
+
+ // single instance classes
+ SfxFrameObjectFactoryPtr* pSfxFrameObjectFactoryPtr;
+
+ // special members
+ SfxInitLinkList* pInitLinkList;
+
+ // application members
+ SfxFilterMatcher* pMatcher;
+ SfxCancelManager* pCancelMgr;
+
+ // global pointers
+ SfxItemPool* pPool;
+ SfxEventConfiguration* pEventConfig;
+ SfxMiscCfg* pMiscConfig;
+
+ // "current" functionality
+ SfxObjectShell* pThisDocument;
+ SfxProgress* pProgress;
+
+ USHORT nBasicCallLevel;
+ USHORT nRescheduleLocks;
+ USHORT nInReschedule;
+
+ ::rtl::Reference< sfx2::appl::ImeStatusWindow > m_xImeStatusWindow;
+
+ BOOL bInQuit : 1;
+ BOOL bInException : 1;
+ BOOL bOLEResize : 1;
+
+ SfxAppData_Impl( SfxApplication* );
+ ~SfxAppData_Impl();
+};
+
+}//end of namespace binfilter
+#endif // #ifndef _SFX_APPDATA_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/brokenpackageint.hxx b/binfilter/bf_sfx2/source/inc/brokenpackageint.hxx
new file mode 100644
index 000000000000..3d96cc3bf14e
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/brokenpackageint.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 <framework/interaction.hxx>
+namespace binfilter {
+
+using namespace ::framework;
+typedef ContinuationBase< ::com::sun::star::task::XInteractionApprove > SfxContinuationApprove;
+typedef ContinuationBase< ::com::sun::star::task::XInteractionDisapprove > SfxContinuationDisapprove;
+
+}//end of namespace binfilter
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/cfgmgr.hxx b/binfilter/bf_sfx2/source/inc/cfgmgr.hxx
new file mode 100644
index 000000000000..69e10f46f624
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/cfgmgr.hxx
@@ -0,0 +1,108 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 _SFXCFGMGR_HXX
+#define _SFXCFGMGR_HXX
+
+#include <bf_so3/svstor.hxx>
+class SvStream;
+class String;
+namespace binfilter {
+
+class SfxObjectShell;
+class SfxConfigItem;
+class SfxConfigItemArr_Impl;
+struct SfxConfigItem_Impl;
+class SfxConfigManager
+{
+private:
+ SotStorageRef m_xStorage;
+ SfxObjectShell* pObjShell;
+ SfxConfigItemArr_Impl* pItemArr;
+ USHORT nErrno;
+ BOOL bModified;
+
+ // to prevent from using
+ SfxConfigManager( const SfxConfigManager& );
+ const SfxConfigManager& operator=( const SfxConfigManager& );
+
+ BOOL LoadConfiguration( SotStorage& rStorage );
+ BOOL StoreConfiguration_Impl( SotStorage* pStorage=NULL );
+
+public:
+ enum Error {
+ ERR_NO,
+ ERR_READ,
+ ERR_WRITE,
+ ERR_OPEN,
+ ERR_FILETYPE,
+ ERR_VERSION,
+ ERR_IMPORT,
+ ERR_EXPORT
+ };
+
+ static String GetStorageName();
+ static BOOL HasConfiguration( SotStorage& rStorage );
+
+ // construct a configmanager from a storage
+ // pStor == NULL means default config manager ( soffice.cfg )
+ SfxConfigManager( SotStorage* pStor = NULL );
+
+ // construct a configmanager from a documents' storage
+ SfxConfigManager( SfxObjectShell& rDoc );
+ ~SfxConfigManager();
+
+ SotStorage* GetConfigurationStorage( SotStorage* );
+
+ void AddConfigItem( SfxConfigItem& rCItem );
+ void RemoveConfigItem( SfxConfigItem& rCItem );
+ SfxConfigItem* GetNextItem( SfxConfigItem& rCItem );
+ USHORT GetErrorCode()
+ { return nErrno; }
+
+ // store the whole configuration into a storage
+ // pStore == NULL means store into own storage
+ BOOL StoreConfiguration( SotStorage* pStorage=NULL );
+
+ BOOL LoadConfigItem( SfxConfigItem& );
+ BOOL StoreConfigItem( SfxConfigItem& );
+ BOOL StoreAlwaysConfigItem( SfxConfigItem& );
+
+ // Reload all items using a special stream
+ void ReInitialize( const String& rStreamName );
+
+ void SetModified(BOOL);
+ BOOL IsModified()
+ { return bModified; }
+ SfxObjectShell* GetObjectShell() const
+ { return pObjShell; }
+};
+
+}//end of namespace binfilter
+#endif // #ifndef _SFXCFGMGR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/conttrans.hxx b/binfilter/bf_sfx2/source/inc/conttrans.hxx
new file mode 100644
index 000000000000..c89319f0b8c8
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/conttrans.hxx
@@ -0,0 +1,113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 _CONTTRANS_HXX
+#define _CONTTRANS_HXX
+
+// interfaces and structs
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <com/sun/star/ucb/XContentTransmitter.hpp>
+
+// helper classes and functions
+#include <cppuhelper/implbase2.hxx>
+#include <uno/dispatcher.h>
+#include <uno/mapping.hxx>
+#include <cppuhelper/factory.hxx>
+
+
+#include <rtl/ustrbuf.hxx>
+#include <bf_svtools/lstner.hxx>
+namespace binfilter {
+
+//=========================================================================
+
+#define CT_SERVICE_NAME L"com.sun.star.ucb.ContentTransmitter"
+#define FLAG_SET_READONLY 0x01
+#define FLAG_NOTIFY_ANCHOR 0x02
+
+//=========================================================================
+
+class ContentTransmitter : public SfxListener,
+ public cppu::WeakImplHelper2<
+ ::com::sun::star::ucb::XContentTransmitter,
+ ::com::sun::star::lang::XServiceInfo >
+{
+ ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > m_xFact;
+ ::rtl::OUString m_aSource;
+ ::rtl::OUString m_aDest;
+ long m_nFlags;
+
+public:
+
+ ContentTransmitter( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& rFact )
+ : m_xFact( rFact )
+ {}
+
+ // SfxListener
+ virtual void
+ Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ // XContentTransmitter
+ virtual void SAL_CALL
+ transmit( const ::rtl::OUString& Source,
+ const ::rtl::OUString& Destination,
+ long Flags )
+ throw( ::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 );
+
+ // static Helper functions
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getSupportedServiceNames_Static();
+
+ static ::rtl::OUString
+ getImplementationName_Static() { return CT_SERVICE_NAME; }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory >
+ createServiceFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxServiceMgr );
+};
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/dinfobj.hxx b/binfilter/bf_sfx2/source/inc/dinfobj.hxx
new file mode 100644
index 000000000000..dcf42b05b9a3
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/dinfobj.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_DINFOBJ_HXX
+#define _SFX_DINFOBJ_HXX
+
+
+#include <bf_so3/auto.hxx>
+#include "docinf.hxx"
+#include "dinfdlg.hxx"
+namespace binfilter {
+
+class SfxMedium;
+
+//=========================================================================
+
+class SfxDocumentInfoObject_Impl: public SvDispatch
+{
+ SfxDocumentInfoItem aDocInfo;
+ SfxMedium* pMedium;
+
+protected:
+ SvGlobalName GetTypeName() const;
+ BOOL FillTypeLibInfo( String * pName,
+ USHORT * pMajor, USHORT * pMinor ) const;
+
+public:
+ SfxDocumentInfoObject_Impl();
+ ~SfxDocumentInfoObject_Impl();
+
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+};
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/dlgcont.hxx b/binfilter/bf_sfx2/source/inc/dlgcont.hxx
new file mode 100644
index 000000000000..dc829adc0dec
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/dlgcont.hxx
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_DLGCONT_HXX
+#define _SFX_DLGCONT_HXX
+
+#include <namecont.hxx>
+#include <tools/debug.hxx> //for strip
+namespace binfilter {
+
+//============================================================================
+
+class SfxDialogLibraryContainer : public SfxLibraryContainer_Impl
+{
+ // Methods to distinguish between different library types
+ virtual SfxLibrary_Impl* SAL_CALL implCreateLibrary( void );
+ virtual SfxLibrary_Impl* SAL_CALL implCreateLibraryLink
+ ( const ::rtl::OUString& aLibInfoFileURL,
+ const ::rtl::OUString& StorageURL, sal_Bool ReadOnly );
+ virtual ::com::sun::star::uno::Any SAL_CALL createEmptyLibraryElement( void );
+ virtual sal_Bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement );
+ virtual void SAL_CALL writeLibraryElement
+ (
+ ::com::sun::star::uno::Any aElement,
+ const ::rtl::OUString& aElementName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xOutput
+ )
+ throw(::com::sun::star::uno::Exception);
+ virtual ::com::sun::star::uno::Any SAL_CALL importLibraryElement
+ ( const ::rtl::OUString& aFile, SotStorageStreamRef xElementStream );
+ virtual void SAL_CALL importFromOldStorage( const ::rtl::OUString& aFile );
+
+ virtual SfxLibraryContainer_Impl* createInstanceImpl( void ){DBG_BF_ASSERT(0, "STRIP");return NULL;}//STRIP001 virtual SfxLibraryContainer_Impl* createInstanceImpl( void );
+
+ sal_Bool init( const ::rtl::OUString& aInitialisationParam,
+ SotStorage* pStor=NULL );
+
+public:
+ SfxDialogLibraryContainer( void );
+ SfxDialogLibraryContainer( SotStorage* pStor );
+
+ // Methods 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);
+
+ // 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 to represent application container service
+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 );
+
+};
+
+
+//============================================================================
+
+class SfxDialogLibrary : public SfxLibrary_Impl
+{
+public:
+ SfxDialogLibrary
+ (
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF,
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSFI
+ );
+
+ SfxDialogLibrary
+ (
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF,
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSFI,
+ const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly
+ );
+};
+
+}//end of namespace binfilter
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/doctemplates.hxx b/binfilter/bf_sfx2/source/inc/doctemplates.hxx
new file mode 100644
index 000000000000..a2c9c4e0ac99
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/doctemplates.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 <sfxuno.hxx>
+namespace binfilter {
+
+//--------------------------------------------------------------------------------------------------------
+
+#define LOCALE ::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 LOCALE & eLocale ) throw( RUNTIMEEXCEPTION );
+ LOCALE 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 );
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/eacopier.hxx b/binfilter/bf_sfx2/source/inc/eacopier.hxx
new file mode 100644
index 000000000000..d850aee3be4a
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/eacopier.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_EACOPIER_HXX
+#define _SFX_EACOPIER_HXX
+
+#include <tools/eacopier.hxx>
+namespace binfilter {
+class SvFileStream;
+
+// class SfxEA_Copier ----------------------------------------------------
+
+class SfxEA_Copier : public EA_Copier
+{
+public:
+ SfxEA_Copier() { Register( this ); }
+ ~SfxEA_Copier() { Register( NULL ); }
+
+ virtual BOOL Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const;
+};
+
+}//end of namespace binfilter
+#endif // #ifndef _SFX_EACOPIER_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/eventsupplier.hxx b/binfilter/bf_sfx2/source/inc/eventsupplier.hxx
new file mode 100644
index 000000000000..10c51c70aa3b
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/eventsupplier.hxx
@@ -0,0 +1,151 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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/document/XEventListener.hpp>
+#include <com/sun/star/document/XEventBroadcaster.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/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
+
+#include <sfxuno.hxx>
+
+#include <osl/mutex.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <bf_svtools/lstner.hxx>
+namespace binfilter {
+
+class SvxMacro;
+
+//--------------------------------------------------------------------------------------------------------
+
+#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 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;
+
+
+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 );
+};
+
+class SfxGlobalEvents_Impl : public ::cppu::WeakImplHelper3< ::com::sun::star::document::XEventsSupplier,
+ ::com::sun::star::document::XEventBroadcaster, ::com::sun::star::lang::XServiceInfo >,
+ public SfxListener
+{
+ SfxEvents_Impl* pImp;
+ REFERENCE < XNAMEREPLACE > m_xEvents;
+ WEAKREFERENCE < XJOBEXECUTOR > m_xJobsBinding;
+ OINTERFACECONTAINERHELPER m_aInterfaceContainer;
+ ::osl::Mutex m_aMutex;
+
+ void Notify( SfxBroadcaster& aBC, const SfxHint& aHint );
+public:
+ SfxGlobalEvents_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& xSmgr );
+ ~SfxGlobalEvents_Impl();
+ SFX_DECL_XSERVICEINFO
+ virtual REFERENCE< XNAMEREPLACE > SAL_CALL getEvents() throw( RUNTIMEEXCEPTION );
+ virtual void SAL_CALL addEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
+ virtual void SAL_CALL removeEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION ) {DBG_BF_ASSERT(0, "STRIP");}//STRIP001 virtual void SAL_CALL removeEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/fltfnc.hxx b/binfilter/bf_sfx2/source/inc/fltfnc.hxx
new file mode 100644
index 000000000000..82ed4c326d00
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/fltfnc.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 "fcontnr.hxx"
+namespace binfilter {
+
+BOOL SfxIsHelpEntryURL( const String &rURL, const String &rExtMask );
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/fltoptint.hxx b/binfilter/bf_sfx2/source/inc/fltoptint.hxx
new file mode 100644
index 000000000000..12db9b12dc06
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/fltoptint.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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/XInteractionFilterOptions.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+
+#include <framework/interaction.hxx>
+
+using namespace ::framework;
+namespace binfilter {
+
+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 );
+};
+}//end of namespace binfilter
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/helper.hxx b/binfilter/bf_sfx2/source/inc/helper.hxx
new file mode 100644
index 000000000000..e808cb8c2c69
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/helper.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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>
+
+class String;
+
+
+
+namespace binfilter {
+
+// class SfxContentHelper ------------------------------------------------
+
+class SfxContentHelper
+{
+private:
+
+public:
+
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ GetResultSet( const String& rURL );
+ static String GetActiveHelpString( const String& rURL );
+
+
+
+ // please don't use this!
+};
+
+}//end of namespace binfilter
+#endif // #ifndef _SFX_HELPER_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/namecont.hxx b/binfilter/bf_sfx2/source/inc/namecont.hxx
new file mode 100644
index 000000000000..c640da938e65
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/namecont.hxx
@@ -0,0 +1,504 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_NAMECONT_HXX
+#define _SFX_NAMECONT_HXX
+
+#include <hash_map>
+
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/script/XLibraryContainer2.hpp>
+#include <com/sun/star/script/XLibraryContainerPassword.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/util/XStringSubstitution.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/util/XMacroExpander.hpp>
+
+#include <osl/mutex.hxx>
+#include <cppuhelper/component.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+
+#include <bf_so3/svstor.hxx>
+#include <xmlscript/xmllib_imexp.hxx>
+
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase4.hxx>
+namespace binfilter {
+
+class BasicManager;
+
+typedef ::cppu::WeakImplHelper4<
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::script::XLibraryContainer2,
+ ::com::sun::star::script::XLibraryContainerPassword,
+ ::com::sun::star::container::XContainer > LibraryContainerHelper;
+
+
+namespace SfxContainer_Impl
+{
+
+typedef ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameContainer,
+ ::com::sun::star::container::XContainer > NameContainerHelper;
+
+
+struct hashName_Impl
+{
+ size_t operator()(const ::rtl::OUString Str) const
+ {
+ return (size_t)Str.hashCode();
+ }
+};
+
+struct eqName_Impl
+{
+ sal_Bool operator()(const ::rtl::OUString Str1, const ::rtl::OUString Str2) const
+ {
+ return ( Str1 == Str2 );
+ }
+};
+
+typedef std::hash_map
+<
+ ::rtl::OUString,
+ sal_Int32,
+ hashName_Impl,
+ eqName_Impl
+>
+NameContainerNameMap;
+
+
+
+//============================================================================
+
+struct MutexHolder
+{
+ ::osl::Mutex mMutex;
+};
+
+class NameContainer_Impl : public MutexHolder, public NameContainerHelper
+{
+ NameContainerNameMap mHashMap;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > mNames;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > mValues;
+ sal_Int32 mnElementCount;
+
+ ::com::sun::star::uno::Type mType;
+ ::com::sun::star::uno::XInterface* mpxEventSource;
+
+ ::cppu::OInterfaceContainerHelper maListenerContainer;
+
+public:
+ NameContainer_Impl( const ::com::sun::star::uno::Type& rType )
+ : mType( rType )
+ , mpxEventSource( NULL )
+ , mnElementCount( 0 )
+ , maListenerContainer( mMutex )
+ {}
+
+ void setEventSource( ::com::sun::star::uno::XInterface* pxEventSource )
+ { mpxEventSource = pxEventSource; }
+
+ // Methods 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);
+
+ // Methods XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+ throw(::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( )
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // Methods XNameReplace
+ virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement )
+ throw(::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // Methods XNameContainer
+ virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement )
+ throw(::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::ElementExistException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
+ throw(::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // Methods XContainer
+ virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+} // namespace SfxContainer_Impl
+
+
+//============================================================================
+
+class SfxLibrary_Impl;
+
+
+enum InitMode
+{
+ DEFAULT,
+ CONTAINER_INIT_FILE,
+ LIBRARY_INIT_FILE,
+ OFFICE_DOCUMENT,
+ OLD_BASIC_STORAGE
+};
+
+class SfxLibraryContainer_Impl : public LibraryContainerHelper
+{
+protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > mxSFI;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XStringSubstitution > mxStringSubstitution;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XMacroExpander > mxMacroExpander;
+
+ SfxContainer_Impl::NameContainer_Impl maNameContainer;
+ sal_Bool mbModified;
+ sal_Bool mbOldInfoFormat;
+
+ ::rtl::OUString maInitialisationParam;
+ ::rtl::OUString maInfoFileName;
+ ::rtl::OUString maOldInfoFileName;
+ ::rtl::OUString maLibElementFileExtension;
+ ::rtl::OUString maLibraryPath;
+ ::rtl::OUString maLibrariesDir;
+
+ SotStorageRef mxStorage;
+ BasicManager* mpBasMgr;
+ sal_Bool mbOwnBasMgr;
+
+ InitMode meInitMode;
+
+ void implStoreLibraryIndexFile( SfxLibrary_Impl* pLib,
+ const ::xmlscript::LibDescriptor& rLib, SotStorageRef xStorage );
+ sal_Bool implLoadLibraryIndexFile( SfxLibrary_Impl* pLib, ::xmlscript::LibDescriptor& rLib,
+ SotStorageRef xStorage, const ::rtl::OUString& aIndexFileName );
+ void implImportLibDescriptor( SfxLibrary_Impl* pLib, ::xmlscript::LibDescriptor& rLib );
+
+ // Methods to distinguish between deffirent library types
+ virtual SfxLibrary_Impl* SAL_CALL implCreateLibrary( void ) = 0;
+ virtual SfxLibrary_Impl* SAL_CALL implCreateLibraryLink
+ ( const ::rtl::OUString& aLibInfoFileURL,
+ const ::rtl::OUString& StorageURL, sal_Bool ReadOnly ) = 0;
+ virtual ::com::sun::star::uno::Any SAL_CALL createEmptyLibraryElement( void ) = 0;
+ virtual sal_Bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ) = 0;
+ virtual void SAL_CALL writeLibraryElement
+ (
+ ::com::sun::star::uno::Any aElement,
+ const ::rtl::OUString& aElementName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xOutput
+ )
+ throw(::com::sun::star::uno::Exception) = 0;
+
+ virtual ::com::sun::star::uno::Any SAL_CALL importLibraryElement
+ ( const ::rtl::OUString& aFile, SotStorageStreamRef xElementStream ) = 0;
+ virtual void SAL_CALL importFromOldStorage( const ::rtl::OUString& aFile ) = 0;
+
+ void implStoreLibrary( SfxLibrary_Impl* pLib,
+ const ::rtl::OUString& aName, SotStorageRef xStorage );
+
+ // Password encryption
+ virtual sal_Bool implStorePasswordLibrary( SfxLibrary_Impl* pLib, const ::rtl::OUString& aName,
+ SotStorageRef xStorage );
+ virtual sal_Bool implLoadPasswordLibrary( SfxLibrary_Impl* pLib, const ::rtl::OUString& Name,
+ sal_Bool bVerifyPasswordOnly=false )
+ throw(::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // #56666, Creates another library container
+ // instance of the same derived class
+ virtual SfxLibraryContainer_Impl* createInstanceImpl( void ) = 0;
+
+
+ // Interface to get the BasicManager (Hack for password implementation)
+ BasicManager* getBasicManager( void ) { return mpBasMgr; }
+ ::rtl::OUString createAppLibraryFolder( SfxLibrary_Impl* pLib, const ::rtl::OUString& aName );
+
+ sal_Bool init( const ::rtl::OUString& aInitialisationParam,
+ const ::rtl::OUString& aInfoFileName,
+ const ::rtl::OUString& aOldInfoFileName,
+ const ::rtl::OUString& aLibElementFileExtension,
+ const ::rtl::OUString& aLibrariesDir,
+ SotStorageRef xStorage );
+
+ // Handle maLibInfoFileURL and maStorageURL correctly
+ void checkStorageURL
+ (
+ const ::rtl::OUString& aSourceURL,
+ ::rtl::OUString& aLibInfoFileURL,
+ ::rtl::OUString& aStorageURL,
+ ::rtl::OUString& aUnexpandedStorageURL
+ );
+ ::rtl::OUString expand_url( const ::rtl::OUString& url )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ SfxLibrary_Impl* getImplLib( const String& rLibraryName );
+
+public:
+ SfxLibraryContainer_Impl( void );
+ ~SfxLibraryContainer_Impl();
+
+ // Interface to release and reset storage for saving
+ void setStorage( SotStorageRef xStorage )
+ {
+ mxStorage = xStorage;
+ }
+
+ // Interface to set the BasicManager (Hack for password implementation)
+ void setBasicManager( BasicManager* pBasMgr )
+ {
+ mpBasMgr = pBasMgr;
+ }
+
+ // TODO: Methods of new XLibraryStorage interface?
+ virtual void SAL_CALL storeLibraries( sal_Bool bComplete );
+ virtual void SAL_CALL storeLibrariesToStorage( SotStorageRef xStorage );
+ virtual void SAL_CALL storeLibraries_Impl( SotStorageRef xStorage, sal_Bool bComplete );
+
+ // Methods 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);
+
+ // Methods XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+ throw(::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // Methods XLibraryContainer
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL
+ createLibrary( const ::rtl::OUString& Name )
+ throw(::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::ElementExistException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL createLibraryLink
+ ( const ::rtl::OUString& Name, const ::rtl::OUString& StorageURL, sal_Bool ReadOnly )
+ throw(::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::ElementExistException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeLibrary( const ::rtl::OUString& Name )
+ throw(::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isLibraryLoaded( const ::rtl::OUString& Name )
+ throw(::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL loadLibrary( const ::rtl::OUString& Name )
+ throw(::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // Methods 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) = 0;
+
+ // Methods XLibraryContainer2
+ virtual sal_Bool SAL_CALL isLibraryLink( const ::rtl::OUString& Name )
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getLibraryLinkURL( const ::rtl::OUString& Name )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isLibraryReadOnly( const ::rtl::OUString& Name )
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLibraryReadOnly( const ::rtl::OUString& Name, sal_Bool bReadOnly )
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL renameLibrary( const ::rtl::OUString& Name, const ::rtl::OUString& NewName )
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::container::ElementExistException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // Methods XLibraryContainerPassword
+ virtual sal_Bool SAL_CALL isLibraryPasswordProtected( const ::rtl::OUString& Name )
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isLibraryPasswordVerified( const ::rtl::OUString& Name )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL verifyLibraryPassword( const ::rtl::OUString& Name, const ::rtl::OUString& Password )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL changeLibraryPassword( const ::rtl::OUString& Name,
+ const ::rtl::OUString& OldPassword, const ::rtl::OUString& NewPassword )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // Methods XContainer
+ virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+};
+
+
+//============================================================================
+
+struct OLibraryMutex
+{
+ ::osl::Mutex m_mutex;
+};
+
+class SfxLibrary_Impl
+ : public ::com::sun::star::container::XNameContainer
+ , public ::com::sun::star::container::XContainer
+ , public OLibraryMutex
+ , public ::cppu::OComponentHelper
+{
+ friend class SfxLibraryContainer_Impl;
+ friend class SfxScriptLibraryContainer;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > mxSFI;
+
+ SfxContainer_Impl::NameContainer_Impl maNameContainer;
+
+ sal_Bool mbLoaded;
+ sal_Bool mbModified;
+ sal_Bool mbInitialised;
+
+ ::rtl::OUString maLibElementFileExtension;
+ ::rtl::OUString maLibInfoFileURL;
+ ::rtl::OUString maStorageURL;
+ ::rtl::OUString maUnexpandedStorageURL;
+ sal_Bool mbLink;
+ sal_Bool mbReadOnly;
+ sal_Bool mbReadOnlyLink;
+
+ sal_Bool mbPasswordProtected;
+ sal_Bool mbPasswordVerified;
+ sal_Bool mbDoc50Password;
+ ::rtl::OUString maPassword;
+
+ sal_Bool mbSharedIndexFile;
+
+
+public:
+ SfxLibrary_Impl( ::com::sun::star::uno::Type aType,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF,
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSFI );
+ SfxLibrary_Impl( ::com::sun::star::uno::Type aType,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF,
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSFI,
+ const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly );
+
+
+ // Methods XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL acquire() throw() { OComponentHelper::acquire(); }
+ virtual void SAL_CALL release() throw() { OComponentHelper::release(); }
+
+ // Methods 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);
+
+ // Methods XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+ throw(::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( )
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // Methods XNameReplace
+ virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement )
+ throw(::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // Methods XNameContainer
+ virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement )
+ throw(::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::ElementExistException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
+ throw(::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( )
+ throw( ::com::sun::star::uno::RuntimeException );
+ ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // Methods XContainer
+ virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+};
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/nochaos.hxx b/binfilter/bf_sfx2/source/inc/nochaos.hxx
new file mode 100644
index 000000000000..c31cc5d85c2d
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/nochaos.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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
+namespace binfilter {
+
+class SfxItemPool;
+
+class NoChaos
+{
+public:
+ static SfxItemPool* GetItemPool();
+ static USHORT ReleaseItemPool();
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/objshimp.hxx b/binfilter/bf_sfx2/source/inc/objshimp.hxx
new file mode 100644
index 000000000000..233e7efdc5e3
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/objshimp.hxx
@@ -0,0 +1,201 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 <com/sun/star/frame/XModel.hpp>
+#include <tools/datetime.hxx>
+
+#include <bf_svtools/securityoptions.hxx>
+#include "objsh.hxx"
+#include "bitset.hxx"
+
+namespace binfilter {
+
+class AsynchronLink;
+//====================================================================
+
+DBG_NAMEEX(SfxObjectShell)//STRIP008 ;
+
+class SfxViewFrame;
+struct MarkData_Impl
+{
+ String aMark;
+ String aUserData;
+ SfxViewFrame* pFrame;
+};
+
+class SfxFrame;
+class SfxDialogLibraryContainer;
+class SfxScriptLibraryContainer;
+class SfxImageManager;
+class SfxToolBoxConfig;
+struct SfxObjectShell_Impl
+{
+ SfxDocumentInfo* pDocInfo;
+ SfxConfigManager* pCfgMgr;
+ SfxInPlaceObject* pInPlaceObj; // das dazugeh"orige SO2-Objekt, falls this ein SfxInPlaceObject ist
+ BasicManager* pBasicMgr; // Doc-BASIC oder 0
+ SfxScriptLibraryContainer* pBasicLibContainer;
+ SfxDialogLibraryContainer* pDialogLibContainer;
+ SfxProgress* pProgress;
+ String aTitle;
+ String aTempName;
+ DateTime nTime;
+ sal_uInt16 nVisualDocumentNumber;
+ sal_Bool bTemplateConfig:1,
+ bInList:1, // ob per First/Next erreichbar
+ bClosing:1, // sal_True w"aehrend Close(), um Benachrichtigungs-Rekursionen zu verhindern
+ bSetInPlaceObj:1, // sal_True, falls bereits versucht wurde pInPlaceObject zu casten
+ bIsSaving:1,
+ bPasswd:1,
+ bIsTmp:1,
+ bIsNamedVisible:1,
+ bDidWarnFormat:1, // sal_True, falls schon wg. speichern in Fremformat gewarnt wurde
+ bSetStandardName:1, // sal_True, falls im FileSave Dialog xxxx.sdw im Standardverzeichnis vorgeschlagen werden soll.
+ bDidDangerousSave:1, // sal_True, falls ein Save in ein Alienformat durchgefuehrt wurde
+ 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
+ bModuleSearched : 1,
+ bIsBasicDefault : 1,
+ bIsHelpObjSh : 1,
+ bForbidCaching : 1,
+ bForbidReload : 1,
+ bSupportsEventMacros: 1,
+ bLoadingWindows: 1,
+ bBasicInitialized :1,
+ bHidden :1; // indicates a hidden view shell
+
+
+ String aNewName; // Der Name, unter dem das Doc gespeichert
+ // werden soll
+ IndexBitSet aBitSet;
+ sal_uInt32 lErr;
+ sal_uInt16 nEventId; // falls vor Activate noch ein
+ // Open/Create gesendet werden mu/s
+ sal_Bool bDoNotTouchDocInfo;
+
+ AutoReloadTimer_Impl *pReloadTimer;
+ MarkData_Impl* pMarkData;
+ sal_uInt16 nLoadedFlags;
+ String aMark;
+ Size aViewSize; // wird leider vom Writer beim
+ sal_Bool bInFrame; // HTML-Import gebraucht
+ sal_Bool bModalMode;
+ sal_Bool bRunningMacro;
+ sal_Bool bReloadAvailable;
+ sal_uInt16 nAutoLoadLocks;
+ SfxModule* pModule;
+ SfxFrame* pFrame;
+ SfxImageManager* pImageManager;
+ SfxToolBoxConfig* pTbxConfig;
+ SfxEventConfigItem_Impl* pEventConfig;
+ SfxObjectShellFlags eFlags;
+ AsynchronLink* pCloser;
+ String aBaseURL;
+ sal_Bool bReadOnlyUI;
+ SvRefBaseRef xHeaderAttributes;
+ sal_Bool bHiddenLockedByAPI;
+ sal_Bool bInCloseEvent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel;
+ sal_uInt16 nStyleFilter;
+ sal_Int16 nMacroMode;
+ sal_Bool bDisposing;
+
+ SfxObjectShell_Impl() :
+ nTime(),
+ bIsTmp( sal_False),
+ bClosing( sal_False),
+ bSetInPlaceObj( sal_False),
+ bPasswd( sal_False),
+ pInPlaceObj( 0),
+ pBasicMgr( 0),
+ pBasicLibContainer( 0 ),
+ pDialogLibContainer( 0 ),
+ pProgress( 0),
+ nVisualDocumentNumber( USHRT_MAX),
+ bIsSaving( sal_False),
+ bIsNamedVisible( sal_False),
+ pCfgMgr( 0),
+ bTemplateConfig( sal_False),
+ bDidWarnFormat( sal_False),
+ bDidDangerousSave(sal_False),
+ bIsBasicDefault( sal_True ),
+ bIsTemplate(sal_False),
+ lErr(ERRCODE_NONE),
+ nEventId ( 0),
+ pDocInfo ( 0),
+ bIsAbortingImport ( sal_False),
+ bInList ( sal_False),
+ bImportDone ( sal_False),
+ pReloadTimer ( 0),
+ nLoadedFlags ( SFX_LOADED_MAINDOCUMENT ),
+ pMarkData( 0 ),
+ bInFrame( sal_False ),
+ bModalMode( sal_False ),
+ bRunningMacro( sal_False ),
+ bReloadAvailable( sal_False ),
+ nAutoLoadLocks( 0 ),
+ bInPrepareClose( sal_False ),
+ bPreparedForClose( sal_False ),
+ bWaitingForPicklist( sal_False ),
+ pModule( 0 ),
+ bModuleSearched( sal_False ),
+ pFrame( 0 ),
+ pImageManager( 0 ),
+ pTbxConfig( 0 ),
+ pEventConfig(NULL),
+ bIsHelpObjSh( sal_False ),
+ bForbidCaching( sal_False ),
+ bDoNotTouchDocInfo( sal_False ),
+ bForbidReload( sal_False ),
+ bBasicInitialized( sal_False ),
+ eFlags( SFXOBJECTSHELL_UNDEFINED ),
+ pCloser( 0 ),
+ bSupportsEventMacros( sal_True ),
+ bReadOnlyUI( sal_False ),
+ bHiddenLockedByAPI( sal_False ),
+ bInCloseEvent( sal_False ),
+ bLoadingWindows( sal_False ),
+ bHidden( sal_False )
+ , nStyleFilter( 0 )
+ , nMacroMode( -1 )
+ , bDisposing( sal_False )
+ {}
+ ~SfxObjectShell_Impl();
+
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/openflag.hxx b/binfilter/bf_sfx2/source/inc/openflag.hxx
new file mode 100644
index 000000000000..4263e6779b37
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/openflag.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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
+namespace binfilter {
+
+// 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)
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/referers.hxx b/binfilter/bf_sfx2/source/inc/referers.hxx
new file mode 100644
index 000000000000..9c968cb329ae
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/referers.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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
+namespace binfilter {
+
+#define SFX_REFERER_USER "private:user"
+#define SFX_REFERER_APPEVENT "private:appevent"
+#define SFX_REFERER_EXPLORER "private:explorer"
+#define SFX_REFERER_NEWMENU "private:newmenu"
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/scriptcont.hxx b/binfilter/bf_sfx2/source/inc/scriptcont.hxx
new file mode 100644
index 000000000000..8af1fa12c4e2
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/scriptcont.hxx
@@ -0,0 +1,173 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_SCRIPTCONT_HXX
+#define _SFX_SCRIPTCONT_HXX
+
+#include <bf_basic/basmgr.hxx>
+class BasicManager;
+namespace binfilter {
+
+
+//============================================================================
+
+
+class SfxScriptLibraryContainer : public SfxLibraryContainer_Impl, public OldBasicPassword
+{
+ ::rtl::OUString maScriptLanguage;
+ BasicManager* mpBasMgr;
+
+ // Methods to distinguish between deffirent library types
+ virtual SfxLibrary_Impl* SAL_CALL implCreateLibrary( void );
+ virtual SfxLibrary_Impl* SAL_CALL implCreateLibraryLink
+ ( const ::rtl::OUString& aLibInfoFileURL,
+ const ::rtl::OUString& StorageURL, sal_Bool ReadOnly );
+ virtual ::com::sun::star::uno::Any SAL_CALL createEmptyLibraryElement( void );
+ virtual sal_Bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement );
+ virtual void SAL_CALL writeLibraryElement
+ (
+ ::com::sun::star::uno::Any aElement,
+ const ::rtl::OUString& aElementName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xOutput
+ )
+ throw(::com::sun::star::uno::Exception);
+ virtual ::com::sun::star::uno::Any SAL_CALL importLibraryElement
+ ( const ::rtl::OUString& aFile, SotStorageStreamRef xElementStream );
+ virtual void SAL_CALL importFromOldStorage( const ::rtl::OUString& aFile );
+
+ virtual SfxLibraryContainer_Impl* createInstanceImpl( void ){DBG_BF_ASSERT(0, "STRIP");return NULL;}//STRIP001 virtual SfxLibraryContainer_Impl* createInstanceImpl( void );
+
+
+ // Password encryption
+ virtual sal_Bool implStorePasswordLibrary( SfxLibrary_Impl* pLib, const ::rtl::OUString& aName,
+ SotStorageRef xStorage );
+ virtual sal_Bool implLoadPasswordLibrary( SfxLibrary_Impl* pLib, const ::rtl::OUString& Name,
+ sal_Bool bVerifyPasswordOnly=false )
+ throw(::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // OldBasicPassword interface
+ virtual void setLibraryPassword( const String& rLibraryName, const String& rPassword );
+ virtual String getLibraryPassword( const String& rLibraryName );
+ virtual void clearLibraryPassword( const String& rLibraryName );
+ virtual sal_Bool hasLibraryPassword( const String& rLibraryName );
+
+ sal_Bool init( const ::rtl::OUString& aInitialisationParam,
+ const ::rtl::OUString& aScriptLanguage,
+ BasicManager* pBasMgr=NULL, SotStorage* pStor=NULL );
+
+public:
+ SfxScriptLibraryContainer( void );
+ SfxScriptLibraryContainer( const ::rtl::OUString& aScriptLanguage,
+ BasicManager* pBasMgr, SotStorage* pStor=NULL );
+
+ // TODO: Methods of new XLibraryStorage interface?
+ virtual void SAL_CALL storeLibraries( sal_Bool bComplete );
+ virtual void SAL_CALL storeLibrariesToStorage( SotStorageRef xStorage );
+
+ // Methods 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);
+
+ // Methods XLibraryContainerPassword
+ virtual sal_Bool SAL_CALL isLibraryPasswordProtected( const ::rtl::OUString& Name )
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isLibraryPasswordVerified( const ::rtl::OUString& Name )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL verifyLibraryPassword( const ::rtl::OUString& Name, const ::rtl::OUString& Password )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL changeLibraryPassword( const ::rtl::OUString& Name,
+ const ::rtl::OUString& OldPassword, const ::rtl::OUString& NewPassword )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // 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 to represent application container service
+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 SfxScriptLibrary : public SfxLibrary_Impl
+{
+ friend class SfxScriptLibraryContainer;
+
+ sal_Bool mbLoadedSource;
+ sal_Bool mbLoadedBinary;
+
+public:
+ SfxScriptLibrary
+ (
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF,
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSFI
+ );
+
+ SfxScriptLibrary
+ (
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF,
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSFI,
+ const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly
+ );
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/sfxtypes.hxx b/binfilter/bf_sfx2/source/inc/sfxtypes.hxx
new file mode 100644
index 000000000000..8929f004b336
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/sfxtypes.hxx
@@ -0,0 +1,171 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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/rcid.h>
+#include <vcl/wrkwin.hxx>
+
+class Timer;
+namespace binfilter {
+
+#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;
+
+#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 "_:;*?()/&[&"
+String SfxStringDecode( const String &rSource,
+ const char *pKey = SFX_PASSWORD_CODE );
+
+
+#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
+
+}//end of namespace binfilter
+#endif // #ifndef _SFX_SFXTYPES_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/tplcomp.hxx b/binfilter/bf_sfx2/source/inc/tplcomp.hxx
new file mode 100644
index 000000000000..8c9296c0db1f
--- /dev/null
+++ b/binfilter/bf_sfx2/source/inc/tplcomp.hxx
@@ -0,0 +1,222 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 #include <usr/uno.hxx>
+//ASDBG #include <usr/iterhlp.hxx>
+//ASDBG #include <usr/services.hxx>
+#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>
+namespace binfilter {
+
+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 );
+};
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */