summaryrefslogtreecommitdiff
path: root/sfx2/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/inc')
-rw-r--r--sfx2/inc/QuerySaveDocument.hxx45
-rw-r--r--sfx2/inc/about.hxx83
-rw-r--r--sfx2/inc/arrdecl.hxx91
-rw-r--r--sfx2/inc/basmgr.hxx35
-rw-r--r--sfx2/inc/bitset.hxx257
-rw-r--r--sfx2/inc/brokenpackageint.hxx87
-rw-r--r--sfx2/inc/configmgr.hxx39
-rw-r--r--sfx2/inc/dinfedt.hxx79
-rw-r--r--sfx2/inc/docinsert.hxx89
-rw-r--r--sfx2/inc/docvor.hxx158
-rw-r--r--sfx2/inc/filedlghelper.hrc51
-rw-r--r--sfx2/inc/frmload.hxx153
-rw-r--r--sfx2/inc/fwkhelper.hxx35
-rw-r--r--sfx2/inc/guisaveas.hxx115
-rw-r--r--sfx2/inc/idpool.hxx63
-rw-r--r--sfx2/inc/imagemgr.hxx36
-rw-r--r--sfx2/inc/imgmgr.hxx67
-rw-r--r--sfx2/inc/inettbc.hxx80
-rw-r--r--sfx2/inc/macro.hxx183
-rw-r--r--sfx2/inc/mailmodelapi.hxx141
-rw-r--r--sfx2/inc/makefile.mk48
-rw-r--r--sfx2/inc/mieclip.hxx63
-rw-r--r--sfx2/inc/minfitem.hxx78
-rw-r--r--sfx2/inc/msgnodei.hxx219
-rw-r--r--sfx2/inc/orgmgr.hxx106
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.cxx29
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.hxx669
-rw-r--r--sfx2/inc/progind.hxx83
-rw-r--r--sfx2/inc/resmgr.hxx75
-rw-r--r--sfx2/inc/sfx2/DocumentMetadataAccess.hxx215
-rw-r--r--sfx2/inc/sfx2/Metadatable.hxx187
-rw-r--r--sfx2/inc/sfx2/XmlIdRegistry.hxx98
-rw-r--r--sfx2/inc/sfx2/app.hxx336
-rw-r--r--sfx2/inc/sfx2/appuno.hxx135
-rw-r--r--sfx2/inc/sfx2/basedlgs.hxx230
-rw-r--r--sfx2/inc/sfx2/bindings.hxx262
-rw-r--r--sfx2/inc/sfx2/chalign.hxx63
-rw-r--r--sfx2/inc/sfx2/childwin.hxx369
-rw-r--r--sfx2/inc/sfx2/cntids.hrc428
-rw-r--r--sfx2/inc/sfx2/controlwrapper.hxx671
-rw-r--r--sfx2/inc/sfx2/ctrlitem.hxx111
-rw-r--r--sfx2/inc/sfx2/dialogs.hrc38
-rw-r--r--sfx2/inc/sfx2/dinfdlg.hxx575
-rw-r--r--sfx2/inc/sfx2/dispatch.hxx366
-rw-r--r--sfx2/inc/sfx2/dllapi.h42
-rw-r--r--sfx2/inc/sfx2/docfac.hxx140
-rw-r--r--sfx2/inc/sfx2/docfile.hxx341
-rw-r--r--sfx2/inc/sfx2/docfilt.hxx165
-rw-r--r--sfx2/inc/sfx2/docinf.hxx81
-rw-r--r--sfx2/inc/sfx2/dockwin.hxx142
-rw-r--r--sfx2/inc/sfx2/docmacromode.hxx332
-rw-r--r--sfx2/inc/sfx2/docstoragemodifylistener.hxx95
-rw-r--r--sfx2/inc/sfx2/doctdlg.hxx86
-rw-r--r--sfx2/inc/sfx2/doctempl.hxx148
-rw-r--r--sfx2/inc/sfx2/event.hxx119
-rw-r--r--sfx2/inc/sfx2/evntconf.hxx123
-rw-r--r--sfx2/inc/sfx2/fcontnr.hxx178
-rw-r--r--sfx2/inc/sfx2/filedlghelper.hxx350
-rw-r--r--sfx2/inc/sfx2/frame.hxx313
-rw-r--r--sfx2/inc/sfx2/frmdescr.hxx294
-rw-r--r--sfx2/inc/sfx2/frmhtml.hxx59
-rw-r--r--sfx2/inc/sfx2/frmhtmlw.hxx93
-rw-r--r--sfx2/inc/sfx2/genlink.hxx56
-rw-r--r--sfx2/inc/sfx2/hintpost.hxx80
-rw-r--r--sfx2/inc/sfx2/imgdef.hxx33
-rw-r--r--sfx2/inc/sfx2/ipclient.hxx107
-rw-r--r--sfx2/inc/sfx2/itemconnect.hxx595
-rw-r--r--sfx2/inc/sfx2/itemwrapper.hxx207
-rw-r--r--sfx2/inc/sfx2/layout-post.hxx40
-rw-r--r--sfx2/inc/sfx2/layout-pre.hxx49
-rw-r--r--sfx2/inc/sfx2/layout-tabdlg.hxx46
-rw-r--r--sfx2/inc/sfx2/layout.hxx78
-rw-r--r--sfx2/inc/sfx2/linkmgr.hxx168
-rw-r--r--sfx2/inc/sfx2/linksrc.hxx135
-rw-r--r--sfx2/inc/sfx2/lnkbase.hxx185
-rw-r--r--sfx2/inc/sfx2/macrconf.hxx155
-rw-r--r--sfx2/inc/sfx2/macropg.hxx150
-rw-r--r--sfx2/inc/sfx2/mgetempl.hxx115
-rw-r--r--sfx2/inc/sfx2/minarray.hxx529
-rw-r--r--sfx2/inc/sfx2/minstack.hxx99
-rw-r--r--sfx2/inc/sfx2/mnuitem.hxx176
-rw-r--r--sfx2/inc/sfx2/mnumgr.hxx134
-rw-r--r--sfx2/inc/sfx2/module.hxx113
-rw-r--r--sfx2/inc/sfx2/msg.hxx344
-rw-r--r--sfx2/inc/sfx2/msgpool.hxx95
-rw-r--r--sfx2/inc/sfx2/navigat.hxx64
-rw-r--r--sfx2/inc/sfx2/new.hxx112
-rw-r--r--sfx2/inc/sfx2/newstyle.hxx67
-rw-r--r--sfx2/inc/sfx2/objface.hxx154
-rw-r--r--sfx2/inc/sfx2/objitem.hxx54
-rw-r--r--sfx2/inc/sfx2/objsh.hxx870
-rw-r--r--sfx2/inc/sfx2/objuno.hxx192
-rw-r--r--sfx2/inc/sfx2/opengrf.hxx70
-rw-r--r--sfx2/inc/sfx2/passwd.hxx89
-rw-r--r--sfx2/inc/sfx2/printer.hxx143
-rw-r--r--sfx2/inc/sfx2/printopt.hxx155
-rw-r--r--sfx2/inc/sfx2/prnmon.hxx104
-rw-r--r--sfx2/inc/sfx2/progress.hxx91
-rw-r--r--sfx2/inc/sfx2/querystatus.hxx61
-rw-r--r--sfx2/inc/sfx2/request.hxx139
-rw-r--r--sfx2/inc/sfx2/sfx.hrc444
-rw-r--r--sfx2/inc/sfx2/sfxbasecontroller.hxx418
-rw-r--r--sfx2/inc/sfx2/sfxbasemodel.hxx1596
-rw-r--r--sfx2/inc/sfx2/sfxdefs.hxx39
-rw-r--r--sfx2/inc/sfx2/sfxdlg.hxx160
-rw-r--r--sfx2/inc/sfx2/sfxhtml.hxx133
-rw-r--r--sfx2/inc/sfx2/sfxmodelfactory.hxx75
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc1002
-rw-r--r--sfx2/inc/sfx2/sfxstatuslistener.hxx93
-rw-r--r--sfx2/inc/sfx2/sfxuno.hxx657
-rw-r--r--sfx2/inc/sfx2/shell.hxx393
-rw-r--r--sfx2/inc/sfx2/signaturestate.hxx44
-rw-r--r--sfx2/inc/sfx2/styfitem.hxx121
-rw-r--r--sfx2/inc/sfx2/styledlg.hxx61
-rw-r--r--sfx2/inc/sfx2/tabdlg.hxx318
-rw-r--r--sfx2/inc/sfx2/tbxctrl.hxx451
-rw-r--r--sfx2/inc/sfx2/templdlg.hxx102
-rw-r--r--sfx2/inc/sfx2/unoctitm.hxx211
-rw-r--r--sfx2/inc/sfx2/userinputinterception.hxx83
-rw-r--r--sfx2/inc/sfx2/viewfrm.hxx405
-rw-r--r--sfx2/inc/sfx2/viewsh.hxx383
-rw-r--r--sfx2/inc/sfxbasic.hxx42
-rw-r--r--sfx2/inc/sfxhelp.hxx74
-rw-r--r--sfx2/inc/sfxresid.hxx58
-rw-r--r--sfx2/inc/sorgitm.hxx54
-rw-r--r--sfx2/inc/srchdlg.hxx105
-rw-r--r--sfx2/inc/stbitem.hxx148
-rw-r--r--sfx2/inc/tplpitem.hxx56
-rw-r--r--sfx2/inc/viewfac.hxx70
129 files changed, 24292 insertions, 0 deletions
diff --git a/sfx2/inc/QuerySaveDocument.hxx b/sfx2/inc/QuerySaveDocument.hxx
new file mode 100644
index 000000000000..e25d1a23082c
--- /dev/null
+++ b/sfx2/inc/QuerySaveDocument.hxx
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * 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_QUERYSAVEDOCUMENT_HXX
+#define SFX_QUERYSAVEDOCUMENT_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+class Window;
+class String;
+/** opens the generell query save document dialog.
+ @param _pParent
+ The parent window.
+ @_rTitle
+ The title of the document.
+*/
+SFX2_DLLPUBLIC short ExecuteQuerySaveDocument(
+ Window* _pParent,const String& _rTitle);
+
+#endif //SFX_QUERYSAVEDOCUMENT_HXX
+
diff --git a/sfx2/inc/about.hxx b/sfx2/inc/about.hxx
new file mode 100644
index 000000000000..b3b347917ddc
--- /dev/null
+++ b/sfx2/inc/about.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * 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 _ABOUT_HXX
+#define _ABOUT_HXX
+
+// include ---------------------------------------------------------------
+
+#include <tools/resary.hxx>
+#include <vcl/button.hxx>
+#include <vcl/accel.hxx>
+#include <svtools/svmedit.hxx>
+#include <tools/list.hxx>
+#include <svtools/stdctrl.hxx>
+#include <sfx2/basedlgs.hxx> // SfxModalDialog
+
+DECLARE_LIST( AccelList, Accelerator* )
+
+// class AboutDialog -----------------------------------------------------
+
+class AboutDialog : public SfxModalDialog
+{
+private:
+ OKButton aOKButton;
+ Image aAppLogo;
+
+ FixedInfo aVersionText;
+ MultiLineEdit aCopyrightText;
+ FixedInfo aBuildData;
+
+ ResStringArray aDeveloperAry;
+ String aDevVersionStr;
+ String aAccelStr;
+ String aVersionData;
+ String aCopyrightTextStr;
+
+ AccelList aAccelList;
+
+ AutoTimer aTimer;
+ long nOff;
+ long m_nDeltaWidth;
+ int m_nPendingScrolls;
+
+ BOOL bNormal;
+
+protected:
+ virtual BOOL Close();
+ virtual void Paint( const Rectangle& );
+
+public:
+ AboutDialog( Window* pParent, const ResId& rId, const String& rVerStr );
+ ~AboutDialog();
+
+ DECL_LINK( TimerHdl, Timer * );
+ DECL_LINK( AccelSelectHdl, Accelerator * );
+};
+
+#endif // #ifndef _ABOUT_HXX
+
+
diff --git a/sfx2/inc/arrdecl.hxx b/sfx2/inc/arrdecl.hxx
new file mode 100644
index 000000000000..c6d2ed3c8e78
--- /dev/null
+++ b/sfx2/inc/arrdecl.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_ARRDECL_HXX
+#define _SFX_ARRDECL_HXX
+
+#include <tools/list.hxx>
+#include <svl/svarray.hxx>
+#include <sfx2/minarray.hxx>
+
+struct CntUpdateResult;
+
+SV_DECL_PTRARR_DEL(CntUpdateResults_Impl, CntUpdateResult*, 4, 4)
+
+class SfxObjectShell;
+SV_DECL_PTRARR( SfxObjectShellArr_Impl, SfxObjectShell*, 4, 4 )
+
+class SfxViewFrame;
+SV_DECL_PTRARR( SfxViewFrameArr_Impl, SfxViewFrame*, 4, 4 )
+
+class SfxViewShell;
+SV_DECL_PTRARR( SfxViewShellArr_Impl, SfxViewShell*, 4, 4 )
+
+class SfxObjectFactory;
+typedef SfxObjectFactory* SfxObjectFactoryPtr;
+SV_DECL_PTRARR( SfxObjectFactoryArr_Impl, SfxObjectFactoryPtr, 3, 3 )
+
+struct SfxTbxCtrlFactory;
+SV_DECL_PTRARR_DEL( SfxTbxCtrlFactArr_Impl, SfxTbxCtrlFactory*, 8, 4 )
+
+struct SfxStbCtrlFactory;
+SV_DECL_PTRARR_DEL( SfxStbCtrlFactArr_Impl, SfxStbCtrlFactory*, 8, 4 )
+
+struct SfxMenuCtrlFactory;
+SV_DECL_PTRARR_DEL( SfxMenuCtrlFactArr_Impl, SfxMenuCtrlFactory*, 2, 2 )
+
+struct SfxChildWinFactory;
+SV_DECL_PTRARR_DEL( SfxChildWinFactArr_Impl, SfxChildWinFactory*, 2, 2 )
+
+class SfxModule;
+SV_DECL_PTRARR( SfxModuleArr_Impl, SfxModule*, 2, 2 )
+
+class SfxFilter;
+DECL_PTRARRAY( SfxFilterArr_Impl, SfxFilter*, 4, 4 )
+
+class SfxFrame;
+typedef SfxFrame* SfxFramePtr;
+SV_DECL_PTRARR( SfxFrameArr_Impl, SfxFramePtr, 4, 4 )
+
+DECLARE_LIST( SfxFilterList_Impl, SfxFilter* )
+
+struct SfxExternalLib_Impl;
+typedef SfxExternalLib_Impl* SfxExternalLibPtr;
+SV_DECL_PTRARR_DEL( SfxExternalLibArr_Impl, SfxExternalLibPtr, 2, 2 )
+
+//class XEventListenerRef;
+//typedef XEventListenerRef* XEventListenerPtr;
+//SV_DECL_PTRARR_DEL( XEventListenerArr_Impl, XEventListenerPtr, 4, 4 )
+
+//class XFrameRef;
+//typedef XFrameRef* XFramePtr;
+//SV_DECL_PTRARR_DEL( XFrameArr_Impl, XFramePtr, 4, 4 )
+
+class SfxSlot;
+typedef SfxSlot* SfxSlotPtr;
+SV_DECL_PTRARR( SfxSlotArr_Impl, SfxSlotPtr, 20, 20 )
+
+#endif
diff --git a/sfx2/inc/basmgr.hxx b/sfx2/inc/basmgr.hxx
new file mode 100644
index 000000000000..7156be8f8327
--- /dev/null
+++ b/sfx2/inc/basmgr.hxx
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_BASMGR_HXX
+#define _SFX_BASMGR_HXX
+
+#ifndef _BASMGR_HXX_
+#include <basic/basmgr.hxx>
+#endif
+
+#endif //_SFX_BASMGR_HXX
diff --git a/sfx2/inc/bitset.hxx b/sfx2/inc/bitset.hxx
new file mode 100644
index 000000000000..48a03c96229e
--- /dev/null
+++ b/sfx2/inc/bitset.hxx
@@ -0,0 +1,257 @@
+/*************************************************************************
+ *
+ * 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 _SFXBITSET_HXX
+#define _SFXBITSET_HXX
+
+#include <tools/solar.h>
+
+class Range;
+
+class BitSet
+{
+private:
+ void CopyFrom( const BitSet& rSet );
+ USHORT nBlocks;
+ USHORT nCount;
+ ULONG* pBitmap;
+public:
+ BitSet operator<<( USHORT nOffset ) const;
+ BitSet operator>>( USHORT nOffset ) const;
+ static USHORT CountBits( ULONG nBits );
+ BOOL operator!() const;
+ BitSet();
+ BitSet( const BitSet& rOrig );
+ BitSet( USHORT* pArray, USHORT nSize );
+ ~BitSet();
+ BitSet( const Range& rRange );
+ USHORT Count() const;
+ BitSet& operator=( const BitSet& rOrig );
+ BitSet& operator=( USHORT nBit );
+ BitSet operator|( const BitSet& rSet ) const;
+ BitSet operator|( USHORT nBit ) const;
+ BitSet& operator|=( const BitSet& rSet );
+ BitSet& operator|=( USHORT nBit );
+ BitSet operator-( const BitSet& rSet ) const;
+ BitSet operator-( USHORT nId ) const;
+ BitSet& operator-=( const BitSet& rSet );
+ BitSet& operator-=( USHORT nBit );
+ BitSet operator&( const BitSet& rSet ) const;
+ BitSet& operator&=( const BitSet& rSet );
+ BitSet operator^( const BitSet& rSet ) const;
+ BitSet operator^( USHORT nBit ) const;
+ BitSet& operator^=( const BitSet& rSet );
+ BitSet& operator^=( USHORT nBit );
+ BOOL IsRealSubSet( const BitSet& rSet ) const;
+ BOOL IsSubSet( const BitSet& rSet ) const;
+ BOOL IsRealSuperSet( const BitSet& rSet ) const;
+ BOOL Contains( USHORT nBit ) const;
+ BOOL IsSuperSet( const BitSet& rSet ) const;
+ BOOL operator==( const BitSet& rSet ) const;
+ BOOL operator==( USHORT nBit ) const;
+ BOOL operator!=( const BitSet& rSet ) const;
+ BOOL operator!=( USHORT nBit ) const;
+
+};
+//--------------------------------------------------------------------
+
+// returns TRUE if the set is empty
+
+
+
+inline BOOL BitSet::operator!() const
+{
+ return nCount == 0;
+}
+//--------------------------------------------------------------------
+
+// returns the number of bits in the bitset
+
+inline USHORT BitSet::Count() const
+{
+ return nCount;
+}
+//--------------------------------------------------------------------
+
+// creates the union of two bitset
+
+inline BitSet BitSet::operator|( const BitSet& rSet ) const
+{
+ return BitSet(*this) |= rSet;
+}
+//--------------------------------------------------------------------
+
+// creates the union of a bitset with a single bit
+
+inline BitSet BitSet::operator|( USHORT nBit ) const
+{
+ return BitSet(*this) |= nBit;
+}
+//--------------------------------------------------------------------
+
+// creates the asymetric difference
+
+inline BitSet BitSet::operator-( const BitSet& ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// creates the asymetric difference with a single bit
+
+
+inline BitSet BitSet::operator-( USHORT ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// removes the bits contained in rSet
+
+inline BitSet& BitSet::operator-=( const BitSet& )
+{
+ return *this;
+}
+//--------------------------------------------------------------------
+
+
+// creates the intersection with another bitset
+
+inline BitSet BitSet::operator&( const BitSet& ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// intersects with another bitset
+
+inline BitSet& BitSet::operator&=( const BitSet& )
+{
+ return *this;
+}
+//--------------------------------------------------------------------
+
+// creates the symetric difference with another bitset
+
+inline BitSet BitSet::operator^( const BitSet& ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// creates the symetric difference with a single bit
+
+inline BitSet BitSet::operator^( USHORT ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// builds the symetric difference with another bitset
+
+inline BitSet& BitSet::operator^=( const BitSet& )
+{
+ return *this;
+}
+//--------------------------------------------------------------------
+#ifdef BITSET_READY
+// builds the symetric difference with a single bit
+
+inline BitSet& BitSet::operator^=( USHORT )
+{
+ // crash!!!
+ return BitSet();
+}
+#endif
+//--------------------------------------------------------------------
+
+// determines if the other bitset is a real superset
+
+inline BOOL BitSet::IsRealSubSet( const BitSet& ) const
+{
+ return FALSE;
+}
+//--------------------------------------------------------------------
+
+// detsermines if the other bitset is a superset or equal
+
+inline BOOL BitSet::IsSubSet( const BitSet& ) const
+{
+ return FALSE;
+}
+//--------------------------------------------------------------------
+
+// determines if the other bitset is a real subset
+
+inline BOOL BitSet::IsRealSuperSet( const BitSet& ) const
+{
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+// determines if the other bitset is a subset or equal
+
+inline BOOL BitSet::IsSuperSet( const BitSet& ) const
+{
+ return FALSE;
+}
+//--------------------------------------------------------------------
+
+// determines if the bit is the only one in the bitset
+
+inline BOOL BitSet::operator==( USHORT ) const
+{
+ return FALSE;
+}
+//--------------------------------------------------------------------
+
+// determines if the bitsets aren't equal
+
+inline BOOL BitSet::operator!=( const BitSet& rSet ) const
+{
+ return !( *this == rSet );
+}
+//--------------------------------------------------------------------
+
+// determines if the bitset doesn't contain only this bit
+
+inline BOOL BitSet::operator!=( USHORT nBit ) const
+{
+ return !( *this == nBit );
+}
+//--------------------------------------------------------------------
+
+class IndexBitSet : BitSet
+{
+public:
+ USHORT GetFreeIndex();
+ void ReleaseIndex(USHORT i){*this-=i;}
+};
+
+
+#endif
+
diff --git a/sfx2/inc/brokenpackageint.hxx b/sfx2/inc/brokenpackageint.hxx
new file mode 100644
index 000000000000..e39c92c599ae
--- /dev/null
+++ b/sfx2/inc/brokenpackageint.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * 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 "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <com/sun/star/document/BrokenPackageRequest.hpp>
+#include <com/sun/star/task/XInteractionApprove.hpp>
+#include <com/sun/star/task/XInteractionDisapprove.hpp>
+#include <framework/interaction.hxx>
+
+using namespace ::framework;
+typedef ContinuationBase< ::com::sun::star::task::XInteractionApprove > SfxContinuationApprove;
+typedef ContinuationBase< ::com::sun::star::task::XInteractionDisapprove > SfxContinuationDisapprove;
+
+class SFX2_DLLPUBLIC RequestPackageReparation : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
+{
+ ::com::sun::star::uno::Any m_aRequest;
+
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >
+ > m_lContinuations;
+
+ SfxContinuationApprove* m_pApprove;
+ SfxContinuationDisapprove* m_pDisapprove;
+
+public:
+ RequestPackageReparation( ::rtl::OUString aName );
+
+ sal_Bool isApproved() { return m_pApprove->isSelected(); }
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getRequest()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >
+ > SAL_CALL getContinuations()
+ throw( ::com::sun::star::uno::RuntimeException );
+};
+
+class SFX2_DLLPUBLIC NotifyBrokenPackage : 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;
+
+public:
+ NotifyBrokenPackage( ::rtl::OUString aName );
+
+ sal_Bool isAborted() { return m_pAbort->isSelected(); }
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getRequest()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >
+ > SAL_CALL getContinuations()
+ throw( ::com::sun::star::uno::RuntimeException );
+};
+
diff --git a/sfx2/inc/configmgr.hxx b/sfx2/inc/configmgr.hxx
new file mode 100644
index 000000000000..0cc4305349e8
--- /dev/null
+++ b/sfx2/inc/configmgr.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * 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_CONFIGMGR_HXX_
+#define _SFX_CONFIGMGR_HXX_
+
+namespace utl{
+ class ConfigManager;
+}
+
+/* -----------------------------05.09.00 16:42--------------------------------
+ appdata.cxx
+ ---------------------------------------------------------------------------*/
+utl::ConfigManager* GetUtlConfigManager();
+#endif
diff --git a/sfx2/inc/dinfedt.hxx b/sfx2/inc/dinfedt.hxx
new file mode 100644
index 000000000000..64ad32cb1337
--- /dev/null
+++ b/sfx2/inc/dinfedt.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * 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_DINFEDT_HXX
+#define _SFX_DINFEDT_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/dialog.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+
+// class InfoEdit_Impl ---------------------------------------------------
+
+class InfoEdit_Impl : public Edit
+{
+public:
+ InfoEdit_Impl( Window* pParent, const ResId& rResId ) :
+ Edit( pParent, rResId ) {}
+
+ virtual void KeyInput( const KeyEvent& rKEvent );
+};
+
+// class SfxDocInfoEditDlg -----------------------------------------------
+
+class SfxDocInfoEditDlg : public ModalDialog
+{
+private:
+ FixedLine aInfoFL;
+ InfoEdit_Impl aInfo1ED;
+ InfoEdit_Impl aInfo2ED;
+ InfoEdit_Impl aInfo3ED;
+ InfoEdit_Impl aInfo4ED;
+ OKButton aOkBT;
+ CancelButton aCancelBT;
+ HelpButton aHelpBtn;
+
+public:
+ SfxDocInfoEditDlg( Window* pParent );
+
+ void SetText1( const String &rStr) { aInfo1ED.SetText( rStr ); }
+ void SetText2( const String &rStr) { aInfo2ED.SetText( rStr ); }
+ void SetText3( const String &rStr) { aInfo3ED.SetText( rStr ); }
+ void SetText4( const String &rStr) { aInfo4ED.SetText( rStr ); }
+
+ String GetText1() const { return aInfo1ED.GetText(); }
+ String GetText2() const { return aInfo2ED.GetText(); }
+ String GetText3() const { return aInfo3ED.GetText(); }
+ String GetText4() const { return aInfo4ED.GetText(); }
+};
+
+#endif
+
diff --git a/sfx2/inc/docinsert.hxx b/sfx2/inc/docinsert.hxx
new file mode 100644
index 000000000000..c4e4be12185e
--- /dev/null
+++ b/sfx2/inc/docinsert.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * 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_DOCINSERT_HXX
+#define _SFX_DOCINSERT_HXX
+
+#include <tools/errcode.hxx>
+#include <tools/link.hxx>
+#include <tools/string.hxx>
+
+#include "sfx2/dllapi.h"
+
+namespace sfx2 { class FileDialogHelper; }
+class SfxMedium;
+class SfxMediumList;
+class SfxItemSet;
+class SvStringsDtor;
+
+// ============================================================================
+
+namespace sfx2 {
+
+// ============================================================================
+
+// ============================================================================
+// DocumentInserter
+// ============================================================================
+
+class SFX2_DLLPUBLIC DocumentInserter
+{
+private:
+ String m_sDocFactory;
+ String m_sFilter;
+ Link m_aDialogClosedLink;
+
+ bool m_bMultiSelectionEnabled;
+ sal_Int64 m_nDlgFlags;
+ ErrCode m_nError;
+
+ sfx2::FileDialogHelper* m_pFileDlg;
+ SfxItemSet* m_pItemSet;
+ SvStringsDtor* m_pURLList;
+
+ DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
+
+public:
+ DocumentInserter( sal_Int64 _nFlags, const String& _rFactory, bool _bEnableMultiSelection = false );
+ ~DocumentInserter();
+
+ void StartExecuteModal( const Link& _rDialogClosedLink );
+ SfxMedium* CreateMedium();
+ SfxMediumList* CreateMediumList();
+
+ inline ErrCode GetError() const { return m_nError; }
+ inline String GetFilter() const { return m_sFilter; }
+};
+
+// ============================================================================
+
+} // namespace sfx2
+
+// ============================================================================
+
+#endif // _SFX_DOCINSERT_HXX
+
diff --git a/sfx2/inc/docvor.hxx b/sfx2/inc/docvor.hxx
new file mode 100644
index 000000000000..1bdbdf98161d
--- /dev/null
+++ b/sfx2/inc/docvor.hxx
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * 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 _SFXDOCVOR_HXX
+#define _SFXDOCVOR_HXX
+
+
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#include <svtools/svtreebx.hxx>
+
+#include <sfx2/objsh.hxx>
+#include "orgmgr.hxx"
+
+//=========================================================================
+
+class SfxDocumentTemplates;
+class Path;
+
+//=========================================================================
+
+#ifndef _SFX_HXX
+
+class SfxOrganizeDlg_Impl;
+
+class SfxOrganizeListBox_Impl : public SvTreeListBox
+{
+ enum BMPTYPE { BMPTYPE_FOLDER, BMPTYPE_DOC };
+
+friend class SfxOrganizeDlg_Impl;
+
+ Image aOpenedFolderBmp;
+ Image aClosedFolderBmp;
+ Image aOpenedDocBmp;
+ Image aClosedDocBmp;
+
+ Image aOpenedFolderBmpHC;
+ Image aClosedFolderBmpHC;
+ Image aOpenedDocBmpHC;
+ Image aClosedDocBmpHC;
+
+ SfxOrganizeMgr* pMgr;
+ SfxOrganizeDlg_Impl* pDlg;
+
+ static BOOL bDropMoveOk;
+
+ DECL_LINK( OnAsyncExecuteDrop, ExecuteDropEvent* );
+
+protected:
+ virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection & );
+ virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual BOOL NotifyMoving(SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent, ULONG &);
+ virtual BOOL NotifyCopying(SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent, ULONG &);
+ virtual void RequestingChilds( SvLBoxEntry* pParent );
+ virtual long ExpandingHdl();
+ virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
+
+ using SvLBox::ExecuteDrop;
+ // new d&d
+ virtual DragDropMode NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* );
+ virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+ virtual void DragFinished( sal_Int8 nDropAction );
+
+public:
+ using SvListView::Select;
+ enum DataEnum { VIEW_TEMPLATES, VIEW_FILES } eViewType;
+
+ SfxOrganizeListBox_Impl( SfxOrganizeDlg_Impl* pDlg, Window* pParent, WinBits, DataEnum );
+
+ DataEnum GetViewType() const { return eViewType; }
+ void SetViewType(DataEnum eType) { eViewType = eType; }
+
+ void SetMgr(SfxOrganizeMgr *pM) { pMgr = pM; }
+ void Reset();
+ inline void SetBitmaps(
+ const Image &rOFolderBmp, const Image &rCFolderBmp, const Image &rODocBmp, const Image &rCDocBmp,
+ const Image &rOFolderBmpHC, const Image &rCFolderBmpHC, const Image &rODocBmpHC, const Image &rCDocBmpHC );
+ const Image &GetClosedBmp(USHORT nLevel) const;
+ const Image &GetOpenedBmp(USHORT nLevel) const;
+
+ virtual PopupMenu* CreateContextMenu();
+
+private:
+ BOOL IsStandard_Impl( SvLBoxEntry *) const;
+ BOOL MoveOrCopyTemplates(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy);
+ BOOL MoveOrCopyContents(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy);
+ inline USHORT GetDocLevel() const;
+ SfxObjectShellRef GetObjectShell( const Path& );
+ BOOL IsUniqName_Impl( const String &rText,
+ SvLBoxEntry* pParent, SvLBoxEntry* pEntry = 0 ) const;
+ USHORT GetLevelCount_Impl( SvLBoxEntry* pParent ) const;
+
+ SvLBoxEntry* InsertEntryByBmpType( const XubString& rText, BMPTYPE eBmpType,
+ SvLBoxEntry* pParent = NULL, BOOL bChildsOnDemand = FALSE,
+ ULONG nPos = LIST_APPEND, void* pUserData = NULL );
+};
+
+#endif // _SFX_HXX
+
+//=========================================================================
+
+class SfxTemplateOrganizeDlg : public ModalDialog
+{
+friend class SfxOrganizeListBox_Impl;
+
+ class SfxOrganizeDlg_Impl *pImp;
+
+// virtual void DataChanged( const DataChangedEvent& rDCEvt );
+public:
+ SfxTemplateOrganizeDlg(Window * pParent, SfxDocumentTemplates* = 0);
+ ~SfxTemplateOrganizeDlg();
+
+#define RET_EDIT_STYLE 100
+
+ virtual short Execute();
+};
+
+#endif
diff --git a/sfx2/inc/filedlghelper.hrc b/sfx2/inc/filedlghelper.hrc
new file mode 100644
index 000000000000..a5db7b4fdb30
--- /dev/null
+++ b/sfx2/inc/filedlghelper.hrc
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * 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_FILEDLGHELPER_HRC
+#define _SFX_FILEDLGHELPER_HRC
+
+#include <sfx2/sfx.hrc>
+
+//#define STR_SFX_IMPORT_ALL (RID_SFX_EXPLORER_START + 50)
+#define STR_CB_AUTO_EXTENSION (RID_SFX_EXPLORER_START + 51)
+#define STR_CB_SELECTION (RID_SFX_EXPLORER_START + 52)
+#define STR_CB_INSERT_AS_LINK (RID_SFX_EXPLORER_START + 53)
+#define STR_CB_SHOW_PREVIEW (RID_SFX_EXPLORER_START + 54)
+#define STR_CB_READONLY (RID_SFX_EXPLORER_START + 55)
+#define STR_CB_PASSWORD (RID_SFX_EXPLORER_START + 56)
+#define STR_CB_FILTER_OPTIONS (RID_SFX_EXPLORER_START + 57)
+#define STR_PB_PLAY (RID_SFX_EXPLORER_START + 58)
+#define STR_PB_STOP (RID_SFX_EXPLORER_START + 59)
+#define STR_PB_OPEN (RID_SFX_EXPLORER_START + 60)
+#define STR_PB_SAVE (RID_SFX_EXPLORER_START + 61)
+#define STR_LB_IMAGE_TEMPLATE (RID_SFX_EXPLORER_START + 62)
+#define STR_LB_TEMPLATES (RID_SFX_EXPLORER_START + 63)
+#define STR_LB_VERSION (RID_SFX_EXPLORER_START + 64)
+
+#endif
+
+
diff --git a/sfx2/inc/frmload.hxx b/sfx2/inc/frmload.hxx
new file mode 100644
index 000000000000..b03bdd724c20
--- /dev/null
+++ b/sfx2/inc/frmload.hxx
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * 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_FRMLOAD_HXX
+#define _SFX_FRMLOAD_HXX
+
+#include "sfx2/sfxuno.hxx"
+#include "sfx2/objsh.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/frame/XLoadEventListener.hpp>
+#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
+#include <com/sun/star/frame/XController2.hpp>
+#include <com/sun/star/frame/XModel2.hpp>
+#include <com/sun/star/document/XExtendedFilterDetection.hpp>
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+/** === end UNO includes === **/
+
+#include <rtl/ustring.hxx>
+#include <tools/debug.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/factory.hxx>
+#include <tools/link.hxx>
+#include <tools/string.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+
+class SfxFilter;
+class SfxFilterMatcher;
+
+class SfxFrameWeak;
+
+class SAL_DLLPRIVATE SfxFrameLoader_Impl : public ::cppu::WeakImplHelper2< ::com::sun::star::frame::XSynchronousFrameLoader, ::com::sun::star::lang::XServiceInfo >
+{
+ ::comphelper::ComponentContext m_aContext;
+
+public:
+ SfxFrameLoader_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory );
+
+ SFX_DECL_XSERVICEINFO
+
+ //----------------------------------------------------------------------------------
+ // XSynchronousFrameLoader
+ //----------------------------------------------------------------------------------
+ virtual sal_Bool SAL_CALL load( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArgs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL cancel() throw( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ virtual ~SfxFrameLoader_Impl();
+
+private:
+ const SfxFilter* impl_getFilterFromServiceName_nothrow(
+ const ::rtl::OUString& i_rServiceName
+ ) const;
+
+ ::rtl::OUString impl_askForFilter_nothrow(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& i_rxHandler,
+ const ::rtl::OUString& i_rDocumentURL
+ ) const;
+
+ const SfxFilter* impl_detectFilterForURL(
+ const ::rtl::OUString& _rURL,
+ const ::comphelper::NamedValueCollection& i_rDescriptor,
+ const SfxFilterMatcher& rMatcher
+ ) const;
+
+ sal_Bool impl_createNewDocWithSlotParam(
+ const USHORT _nSlotID,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rxFrame,
+ const bool i_bHidden
+ );
+
+ void impl_determineFilter(
+ ::comphelper::NamedValueCollection& io_rDescriptor
+ ) const;
+
+ bool impl_determineTemplateDocument(
+ ::comphelper::NamedValueCollection& io_rDescriptor
+ ) const;
+
+ USHORT impl_findSlotParam(
+ const ::rtl::OUString& i_rFactoryURL
+ ) const;
+
+ SfxObjectShellLock impl_findObjectShell(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel2 >& i_rxDocument
+ ) const;
+
+ void impl_lockHiddenDocument(
+ SfxObjectShell& i_rDocument,
+ const ::comphelper::NamedValueCollection& i_rDescriptor
+ ) const;
+
+ void impl_handleCaughtError_nothrow(
+ const ::com::sun::star::uno::Any& i_rCaughtError,
+ const ::comphelper::NamedValueCollection& i_rDescriptor
+ ) const;
+
+ void impl_removeLoaderArguments(
+ ::comphelper::NamedValueCollection& io_rDescriptor
+ );
+
+ sal_Int16 impl_determineEffectiveViewId_nothrow(
+ const SfxObjectShell& i_rDocument,
+ const ::comphelper::NamedValueCollection& i_rDescriptor
+ );
+
+ ::comphelper::NamedValueCollection
+ impl_extractViewCreationArgs(
+ ::comphelper::NamedValueCollection& io_rDescriptor
+ );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >
+ impl_createDocumentView(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel2 >& i_rModel,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
+ const ::comphelper::NamedValueCollection& i_rViewFactoryArgs,
+ const ::rtl::OUString& i_rViewName
+ );
+};
+
+#endif
diff --git a/sfx2/inc/fwkhelper.hxx b/sfx2/inc/fwkhelper.hxx
new file mode 100644
index 000000000000..7dd54559dc0b
--- /dev/null
+++ b/sfx2/inc/fwkhelper.hxx
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+
+#include <rtl/ustring.hxx>
+
+SFX2_DLLPUBLIC void SAL_CALL RefreshToolbars( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx
new file mode 100644
index 000000000000..a317b5796232
--- /dev/null
+++ b/sfx2/inc/guisaveas.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_GUISAVEAS_HXX_
+#define _SFX_GUISAVEAS_HXX_
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XContainerQuery.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+
+#include <comphelper/sequenceashashmap.hxx>
+#include <sfx2/signaturestate.hxx>
+
+
+namespace com { namespace sun { namespace star {
+ namespace document {
+ class XDocumentInfo;
+ }
+} } }
+
+class Window;
+class ModelData_Impl;
+
+class SfxStoringHelper
+{
+ friend class ModelData_Impl;
+
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFilterCFG;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > m_xFilterQuery;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xNamedModManager;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceFactory();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetFilterConfiguration();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > GetFilterQuery();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > GetModuleManager();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetNamedModuleManager();
+
+
+public:
+ SfxStoringHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+
+ sal_Bool GUIStoreModel(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
+ const ::rtl::OUString& aSlotName,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsSequence,
+ sal_Bool bPreselectPassword,
+ ::rtl::OUString aUserSelectedName,
+ sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES );
+
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SearchForFilter(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery >& xFilterQuery,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aSearchRequest,
+ sal_Int32 nMustFlags,
+ sal_Int32 nDontFlags );
+
+ static sal_Bool CheckFilterOptionsAppearence(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
+ const ::rtl::OUString& aFilterName );
+
+
+ static void SetDocInfoState(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentInfo>& i_xOldDocInfo,
+ sal_Bool bNoModify );
+
+ static sal_Bool WarnUnacceptableFormat(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
+ ::rtl::OUString aOldUIName,
+ ::rtl::OUString aDefUIName,
+ sal_Bool bCanProceedFurther );
+
+ static void ExecuteFilterDialog( SfxStoringHelper& _rStorageHelper
+ ,const ::rtl::OUString& sFilterName
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel
+ ,/*OUT*/::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgsSequence
+ );
+
+ static Window* GetModelWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
+
+};
+
+#endif
+
diff --git a/sfx2/inc/idpool.hxx b/sfx2/inc/idpool.hxx
new file mode 100644
index 000000000000..bb16fb203437
--- /dev/null
+++ b/sfx2/inc/idpool.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * 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 _SFXIDPOOL_HXX
+#define _SFXIDPOOL_HXX
+
+#include <limits.h> // USHRT_MAX
+#include "bitset.hxx"
+
+// class IdPool ----------------------------------------------------------
+
+class IdPool: private BitSet
+{
+private:
+ USHORT nNextFree;
+ USHORT nRange;
+ USHORT nOffset;
+public:
+ BOOL Lock( const BitSet& rLockSet );
+ BOOL IsLocked( USHORT nId ) const;
+ IdPool( USHORT nMin = 1, USHORT nMax = USHRT_MAX );
+ USHORT Get();
+ BOOL Put( USHORT nId );
+ BOOL Lock( const Range& rRange );
+ BOOL Lock( USHORT nId );
+
+};
+
+//------------------------------------------------------------------------
+
+// returns TRUE if the id is locked
+
+inline BOOL IdPool::IsLocked( USHORT nId ) const
+{
+ return ( this->Contains(nId-nOffset) );
+}
+
+
+#endif
+
diff --git a/sfx2/inc/imagemgr.hxx b/sfx2/inc/imagemgr.hxx
new file mode 100644
index 000000000000..ead9b6988cea
--- /dev/null
+++ b/sfx2/inc/imagemgr.hxx
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+
+#include <rtl/ustring.hxx>
+#include <vcl/image.hxx>
+
+SFX2_DLLPUBLIC Image SAL_CALL GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
diff --git a/sfx2/inc/imgmgr.hxx b/sfx2/inc/imgmgr.hxx
new file mode 100644
index 000000000000..ae1f8a23ddc9
--- /dev/null
+++ b/sfx2/inc/imgmgr.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFXIMGMGR_HXX
+#define _SFXIMGMGR_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <sal/types.h>
+#include <tools/gen.hxx>
+#ifndef _IMAGE_HXX //autogen
+#include <vcl/image.hxx>
+#endif
+
+class ToolBox;
+class SfxModule;
+class SfxImageManager_Impl;
+class SFX2_DLLPUBLIC SfxImageManager
+{
+ SfxImageManager_Impl* pImp;
+
+public:
+ static SfxImageManager* GetImageManager( SfxModule* );
+
+ SfxImageManager( SfxModule* pModule = 0 );
+ ~SfxImageManager();
+
+ void RegisterToolBox( ToolBox *pBox, USHORT nFlags=0xFFFF);
+ void ReleaseToolBox( ToolBox *pBox );
+
+ // get images from resources
+ void SetImages( ToolBox& rToolBox );
+ void SetImages( ToolBox& rToolBox, BOOL bHiContrast, BOOL bLarge );
+ void SetImagesForceSize( ToolBox& rToolBox, BOOL bHiContrast, BOOL bLarge );
+
+ Image GetImage( USHORT nId, BOOL bLarge, BOOL bHiContrast ) const;
+ Image GetImage( USHORT nId, BOOL bHiContrast ) const;
+ Image SeekImage( USHORT nId, BOOL bLarge, BOOL bHiContrast ) const;
+ Image SeekImage( USHORT nId, BOOL bHiContrast ) const;
+};
+
+#endif
diff --git a/sfx2/inc/inettbc.hxx b/sfx2/inc/inettbc.hxx
new file mode 100644
index 000000000000..fe8358bfe646
--- /dev/null
+++ b/sfx2/inc/inettbc.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX_INETTBC_HXX
+#define _SFX_INETTBC_HXX
+
+// includes *****************************************************************
+#include <tools/string.hxx>
+#include <tools/urlobj.hxx>
+
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#include <svtools/acceleratorexecute.hxx>
+
+#if _SOLAR__PRIVATE
+
+#include <sfx2/tbxctrl.hxx>
+class SvtURLBox;
+
+class SfxURLToolBoxControl_Impl : public SfxToolBoxControl
+{
+private:
+ ::svt::AcceleratorExecute* pAccExec;
+
+ SvtURLBox* GetURLBox() const;
+ void OpenURL( const String& rName, BOOL bNew ) const;
+
+ DECL_LINK( OpenHdl, void* );
+ DECL_LINK( SelectHdl, void* );
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+
+ struct ExecuteInfo
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
+ ::com::sun::star::util::URL aTargetURL;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
+ };
+
+ DECL_STATIC_LINK( SfxURLToolBoxControl_Impl, ExecuteHdl_Impl, ExecuteInfo* );
+
+public:
+
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SfxURLToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ virtual ~SfxURLToolBoxControl_Impl();
+
+ virtual Window* CreateItemWindow( Window* pParent );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+};
+
+#endif
+
+#endif
+
diff --git a/sfx2/inc/macro.hxx b/sfx2/inc/macro.hxx
new file mode 100644
index 000000000000..79af6b7302dc
--- /dev/null
+++ b/sfx2/inc/macro.hxx
@@ -0,0 +1,183 @@
+#ifndef _SFXMACRO_HXX
+#define _SFXMACRO_HXX
+
+//====================================================================
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <tools/string.hxx>
+
+class SfxSlot;
+class SfxShell;
+struct SfxMacro_Impl;
+class SfxMacro;
+
+//====================================================================
+
+class SfxMacroStatement
+{
+ USHORT nSlotId; // ausgef"uhrte Slot-Id oder 0, wenn manuell
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > aArgs; // aktuelle Parameter, falls nSlotId != 0
+ String aStatement; // Statement in BASIC-Syntax (ggf. mit CR/LF)
+ BOOL bDone; // auskommentieren wenn kein Done() gerufen
+ void* pDummy; // f"ur alle F"alle zum kompatibel bleiben
+
+#ifdef _SFXMACRO_HXX
+private:
+ void GenerateNameAndArgs_Impl( SfxMacro *pMacro,
+ const SfxSlot &rSlot,
+ BOOL bRequestDone,
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& aArgs );
+#endif
+
+public:
+ SfxMacroStatement( const SfxMacroStatement &rOrig );
+
+ SfxMacroStatement( const String &rTarget,
+ const SfxSlot &rSlot,
+ BOOL bRequestDone,
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& aArgs );
+
+ SfxMacroStatement( const SfxShell &rShell,
+ const String &rTarget,
+ BOOL bAbsolute,
+ const SfxSlot &rSlot,
+ BOOL bRequestDone,
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& aArgs );
+
+ SfxMacroStatement( const String &rStatment );
+ ~SfxMacroStatement();
+
+ USHORT GetSlotId() const;
+ const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& GetArgs() const;
+ BOOL IsDone() const;
+ const String& GetStatement() const;
+};
+
+//--------------------------------------------------------------------
+
+inline USHORT SfxMacroStatement::GetSlotId() const
+
+/* [Beschreibung]
+
+ Liefert die Slot-Id die das Statement beim Abspielen wieder ausf"uhren
+ soll oder 0, falls das Statement manuell (<SFX_SLOT_RECORDMANUAL>)
+ aufgezeichnet wurde.
+*/
+
+{
+ return nSlotId;
+}
+
+//--------------------------------------------------------------------
+
+inline const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& SfxMacroStatement::GetArgs() const
+
+/* [Beschreibung]
+
+ Liefert die Parameter mit denen Statement ausgef"uhrt wurde oder 0,
+ falls das Statement manuell (<SFX_SLOT_RECORDMANUAL>) aufgezeichnet
+ wurde.
+
+ Der R"uckgabewert geh"ort dem SfxMacroStatement und ist nur im
+ unmittelbar aufrufenden Stackframe g"ultig.
+*/
+
+{
+ return aArgs;
+}
+
+//--------------------------------------------------------------------
+
+inline BOOL SfxMacroStatement::IsDone() const
+
+/* [Beschreibung]
+
+ Liefert TRUE, wenn das Statement wirklich ausgef"uhrt wurde,
+ also z.B. nicht vom Benutzer abgebrochen wurde. Wurde es nicht
+ wirklich ausgef"uhrt, dann wird es im BASIC-Source auskommentiert.
+*/
+
+{
+ return bDone;
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Liefert das Statement in BASIC-Syntax. Wurde das Makro manuell erzeugt,
+ wird genau der im Konstruktor angegebene String zur"uckgegeben, sonst
+ der generierte Source-Code.
+
+ Bei beiden Arten ist es m"oglich, da\s mehrere BASIC-Statements, jeweils
+ mit CR/LF getrennt in dem String enthalten sind, da ein SFx-Statement
+ ggf. in mehrere BASIC-Statements "ubersetzt wird.
+
+ Statements f"ur die nicht <SfxRequest::Done()> gerufen wurde, werden
+ mit einem vorangestellten 'rem' gekennzeichnet.
+*/
+
+inline const String& SfxMacroStatement::GetStatement() const
+{
+ return aStatement;
+}
+
+//====================================================================
+
+enum SfxMacroMode
+
+/* [Beschreibung]
+
+ Mit diesem enum wird bestimmt, ob eine <SfxMacro>-Instanz zum
+ absoluten oder relativen Recorden erzeugt wurde, oder um ein
+ existierendendes Makro zu Referenzieren.
+*/
+
+{
+ SFX_MACRO_EXISTING, /* es handelt sich um ein bereits
+ exitistierendes Makro, welches lediglich
+ referenziert wird */
+
+ SFX_MACRO_RECORDINGABSOLUTE,/* dieses Makro soll aufgezeichnet werden,
+ wobei die betroffenen Objekte m"oglichst
+ direkt angesprochen werden sollen
+ (Beispiel: "[doc.sdc]") */
+
+ SFX_MACRO_RECORDINGRELATIVE/* dieses Makro soll aufgezeichnet werden,
+ wobei die betroffenen Objekte so
+ angesprochen werden sollen, da\s sich das
+ Abspielen auf die dann g"ultige Selektion
+ bezieht (Beispiel: "ActiveDocument()") */
+};
+
+//====================================================================
+
+class SfxMacro
+
+/* [Beschreibung]
+
+ "Uber diese Klasse (bzw. genaugenommen ihre Subklassen) wird zum
+ einen die Lokation einer BASIC-Funktion (also in welcher Library,
+ in welchem Modul sowie der Funktions-Name) beschrieben, als auch
+ ein aufzuzeichnendes Makro w"ahrend der Aufzeichnung zwischen-
+ gespeichert.
+*/
+
+{
+ SfxMacro_Impl* pImp;
+
+public:
+ SfxMacro( SfxMacroMode eMode = SFX_MACRO_RECORDINGRELATIVE );
+ virtual ~SfxMacro();
+
+ SfxMacroMode GetMode() const;
+ void Record( SfxMacroStatement *pStatement );
+ void Replace( SfxMacroStatement *pStatement );
+ void Remove();
+ const SfxMacroStatement*GetLastStatement() const;
+
+ String GenerateSource() const;
+};
+
+#endif
diff --git a/sfx2/inc/mailmodelapi.hxx b/sfx2/inc/mailmodelapi.hxx
new file mode 100644
index 000000000000..fa9086f2623b
--- /dev/null
+++ b/sfx2/inc/mailmodelapi.hxx
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef INCLUDED_SFX_MAILMODEL_HXX
+#define INCLUDED_SFX_MAILMODEL_HXX
+
+#include <vector>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include "tools/link.hxx"
+#include <tools/string.hxx>
+#include "sfx2/dllapi.h"
+
+// class SfxMailModel_Impl -----------------------------------------------
+
+class AddressList_Impl;
+
+class SFX2_DLLPUBLIC SfxMailModel
+{
+public:
+ enum MailPriority
+ {
+ PRIO_HIGHEST,
+ PRIO_HIGH,
+ PRIO_NORMAL,
+ PRIO_LOW,
+ PRIO_LOWEST
+ };
+
+ enum AddressRole
+ {
+ ROLE_TO,
+ ROLE_CC,
+ ROLE_BCC
+ };
+
+ enum MailDocType
+ {
+ TYPE_SELF,
+ TYPE_ASPDF
+ };
+
+private:
+ enum SaveResult
+ {
+ SAVE_SUCCESSFULL,
+ SAVE_CANCELLED,
+ SAVE_ERROR
+ };
+
+ ::std::vector< ::rtl::OUString > maAttachedDocuments;
+ AddressList_Impl* mpToList;
+ AddressList_Impl* mpCcList;
+ AddressList_Impl* mpBccList;
+ String maFromAddress;
+ String maSubject;
+ MailPriority mePriority;
+
+ sal_Bool mbLoadDone;
+
+ void ClearList( AddressList_Impl* pList );
+ void MakeValueList( AddressList_Impl* pList, String& rValueList );
+ SaveResult SaveDocumentAsFormat( const rtl::OUString& aSaveFileName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xFrameOrModel,
+ const rtl::OUString& rType,
+ rtl::OUString& rFileNamePath );
+ SaveResult ShowFilterOptionsDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMGR,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel,
+ const ::rtl::OUString& rFilterName,
+ const ::rtl::OUString& rType,
+ bool bModified,
+ sal_Int32& rNumArgs,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
+
+ DECL_LINK( DoneHdl, void* );
+
+public:
+ enum SendMailResult
+ {
+ SEND_MAIL_OK,
+ SEND_MAIL_CANCELLED,
+ SEND_MAIL_ERROR
+ };
+
+ SfxMailModel();
+ ~SfxMailModel();
+
+ void AddAddress( const String& rAddress, AddressRole eRole );
+ void SetFromAddress( const String& rAddress ) { maFromAddress = rAddress; }
+ void SetSubject( const String& rSubject ) { maSubject = rSubject; }
+ void SetPriority( MailPriority ePrio ) { mePriority = ePrio; }
+
+ /** attaches a document to the current attachment list, can be called more than once.
+ * at the moment there will be a dialog for export executed for every model which is going to be attached.
+ *
+ * \param sDocumentType
+ The doc type to export. PDF will be at the moment only a direct export (no dialog).
+ * \param xModel
+ The current model to attach
+ * \param sAttachmentTitle
+ The title which will be used as attachment title
+ * \return @see error code
+ */
+ SendMailResult AttachDocument( const ::rtl::OUString& sDocumentType,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xFrameOrModel,
+ const ::rtl::OUString& sAttachmentTitle );
+
+ SendMailResult SaveAndSend( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame,
+ const rtl::OUString& rType );
+ SendMailResult Send( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame );
+
+ sal_Int32 GetCount() const;
+ sal_Bool IsEmpty() const;
+};
+
+BOOL CreateFromAddress_Impl( String& rFrom );
+
+#endif // INCLUDED_SFX_MAILMODEL_HXX
diff --git a/sfx2/inc/makefile.mk b/sfx2/inc/makefile.mk
new file mode 100644
index 000000000000..b7aa547e2c79
--- /dev/null
+++ b/sfx2/inc/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..
+
+PRJNAME=sfx2
+TARGET=inc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.IF "$(ENABLE_PCH)"!=""
+ALLTAR : \
+ $(SLO)$/precompiled.pch \
+ $(SLO)$/precompiled_ex.pch
+
+.ENDIF # "$(ENABLE_PCH)"!=""
+
diff --git a/sfx2/inc/mieclip.hxx b/sfx2/inc/mieclip.hxx
new file mode 100644
index 000000000000..562bca7940e2
--- /dev/null
+++ b/sfx2/inc/mieclip.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * 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 _MIECLIP_HXX
+#define _MIECLIP_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <tools/solar.h>
+#include <tools/string.hxx>
+
+class SvStream;
+class SotDataObject;
+class SvData;
+
+class SFX2_DLLPUBLIC MSE40HTMLClipFormatObj
+{
+ SvStream* pStrm;
+ String sBaseURL;
+
+public:
+ MSE40HTMLClipFormatObj() : pStrm(0) {}
+ ~MSE40HTMLClipFormatObj();
+
+//JP 31.01.2001: old interfaces
+ SAL_DLLPRIVATE BOOL GetData( SotDataObject& );
+ SAL_DLLPRIVATE BOOL GetData( SvData& );
+//JP 31.01.2001: the new one
+ SvStream* IsValid( SvStream& );
+
+ const SvStream* GetStream() const { return pStrm; }
+ SvStream* GetStream() { return pStrm; }
+ const String& GetBaseURL() const { return sBaseURL; }
+};
+
+
+#endif //_MIECLIP_HXX
+
diff --git a/sfx2/inc/minfitem.hxx b/sfx2/inc/minfitem.hxx
new file mode 100644
index 000000000000..29edf6b3e8cb
--- /dev/null
+++ b/sfx2/inc/minfitem.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_MINFITEM_HXX
+#define _SFX_MINFITEM_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <tools/string.hxx>
+#include <svl/poolitem.hxx>
+class BasicManager;
+
+class SFX2_DLLPUBLIC SfxMacroInfoItem: public SfxPoolItem
+{
+ const BasicManager* pBasicManager;
+ String aLibName;
+ String aModuleName;
+ String aMethodName;
+ String aCommentText;
+
+public:
+ TYPEINFO();
+ SfxMacroInfoItem( USHORT nWhich,
+ const BasicManager* pMgr,
+ const String &rLibName,
+ const String &rModuleName,
+ const String &rMethodName,
+ const String &rComment);
+
+ SfxMacroInfoItem( const SfxMacroInfoItem& );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ String GetComment() const
+ { return aCommentText; }
+ void SetComment( const String& r )
+ { aCommentText = r; }
+ String GetMethod() const
+ { return aMethodName; }
+ void SetMethod( const String& r )
+ { aMethodName = r; }
+ String GetModule() const
+ { return aModuleName; }
+ void SetModule( const String& r )
+ { aModuleName = r; }
+ String GetLib() const
+ { return aLibName; }
+ void SetLib( const String& r )
+ { aLibName = r; }
+ const BasicManager* GetBasicManager() const
+ { return pBasicManager; }
+ String GetQualifiedName() const;
+};
+
+#endif
diff --git a/sfx2/inc/msgnodei.hxx b/sfx2/inc/msgnodei.hxx
new file mode 100644
index 000000000000..c48765acfe42
--- /dev/null
+++ b/sfx2/inc/msgnodei.hxx
@@ -0,0 +1,219 @@
+/*************************************************************************
+ *
+ * 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 _MSGNODEI_HXX
+#define _MSGNODEI_HXX
+
+
+#include <svl/eitem.hxx>
+#include <tools/string.hxx>
+#include <svl/poolitem.hxx>
+#include <tools/list.hxx>
+struct SfxMsgAttachFile {
+ String aFile;
+ String aName;
+
+ int operator==( const SfxMsgAttachFile& rRec ) const
+ {
+ if( aName == rRec.aName && aFile == rRec.aFile )
+ return TRUE;
+ return FALSE;
+ }
+
+ SfxMsgAttachFile( const String& rFile, const String& rName)
+ : aName( rName ), aFile( rFile ) {}
+
+ SfxMsgAttachFile( const SfxMsgAttachFile& rRec )
+ : aName( rRec.aName), aFile( rRec.aFile ) {}
+};
+
+enum SfxMsgReceiverRole
+{
+ MSG_RECEIVER_TO = 0,
+ MSG_RECEIVER_CC,
+ MSG_RECEIVER_BCC,
+ MSG_RECEIVER_NEWSGROUP
+};
+
+struct SfxMsgReceiver {
+ String aName;
+ SfxMsgReceiverRole eRole;
+
+ int operator==( const SfxMsgReceiver& rRec ) const
+ {
+ if( aName == rRec.aName && eRole == rRec.eRole )
+ return TRUE;
+ return FALSE;
+ }
+
+ SfxMsgReceiver( const String& rName, SfxMsgReceiverRole _eRole )
+ : aName( rName ), eRole( _eRole ) {}
+
+ SfxMsgReceiver( const SfxMsgReceiver& rRec )
+ : aName( rRec.aName), eRole( rRec.eRole ) {}
+};
+
+// ------------------------------------------------------------------------
+
+class SfxMsgReceiverList_Impl : public List
+{
+ ULONG nRef;
+ ~SfxMsgReceiverList_Impl();
+ SfxMsgReceiverList_Impl& operator=( const SfxMsgReceiverList_Impl&); //n.i.
+public:
+ SfxMsgReceiverList_Impl();
+ SfxMsgReceiverList_Impl(const SfxMsgReceiverList_Impl&);
+
+ void Load( SvStream& );
+ void Store( SvStream& ) const;
+ void IncRef() { nRef++; }
+ void DecRef() { nRef--; if( !nRef ) delete this; }
+ ULONG GetRefCount() const { return nRef; }
+ int operator==( const SfxMsgReceiverList_Impl& ) const;
+};
+
+class SfxMsgReceiverListItem : public SfxPoolItem
+{
+ void Disconnect();
+protected:
+ SfxMsgReceiverList_Impl* pImp;
+public:
+ TYPEINFO();
+
+ SfxMsgReceiverListItem();
+ SfxMsgReceiverListItem( USHORT nWhich );
+ SfxMsgReceiverListItem( USHORT nWhich, SvStream& rStream );
+ SfxMsgReceiverListItem( const SfxMsgReceiverListItem& rItem );
+ ~SfxMsgReceiverListItem();
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ XubString &rText ) const;
+
+ USHORT Count() const;
+ SfxMsgReceiver* GetObject( USHORT nPos );
+ void Remove( USHORT nPos );
+ void Add( const SfxMsgReceiver& );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
+ virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+};
+
+
+// ------------------------------------------------------------------------
+
+class SfxMsgAttachFileList_Impl : public List
+{
+ ULONG nRef;
+ ~SfxMsgAttachFileList_Impl();
+ SfxMsgAttachFileList_Impl& operator=( const SfxMsgAttachFileList_Impl&); //n.i.
+
+public:
+ SfxMsgAttachFileList_Impl();
+ SfxMsgAttachFileList_Impl(const SfxMsgAttachFileList_Impl&);
+
+ int operator==( const SfxMsgAttachFileList_Impl& rRec ) const;
+ SfxMsgAttachFile* GetReceiver(ULONG nPos) { return (SfxMsgAttachFile*)List::GetObject(nPos); }
+ void Load( SvStream& );
+ void Store( SvStream& ) const;
+ void IncRef() { nRef++; }
+ void DecRef() { nRef--; if( !nRef ) delete this; }
+ ULONG GetRefCount() const { return nRef; }
+};
+
+class SfxMsgAttachFileListItem : public SfxPoolItem
+{
+protected:
+ SfxMsgAttachFileList_Impl* pImp;
+ void Disconnect();
+public:
+ TYPEINFO();
+
+ SfxMsgAttachFileListItem();
+ SfxMsgAttachFileListItem( USHORT nWhich );
+ SfxMsgAttachFileListItem( USHORT nWhich, SvStream& rStream );
+ SfxMsgAttachFileListItem( const SfxMsgAttachFileListItem& rItem );
+ ~SfxMsgAttachFileListItem();
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ XubString &rText ) const;
+
+ USHORT Count() const;
+ SfxMsgAttachFile* GetObject( USHORT nPos );
+ void Remove( USHORT nPos );
+ void Add( const SfxMsgAttachFile& );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
+ virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+};
+
+
+//=========================================================================
+
+enum SfxMsgPriority
+{
+ MSG_PRIORITY_LOW = 0,
+ MSG_PRIORITY_NORMAL,
+ MSG_PRIORITY_URGENT
+};
+#define SFXMSGPRIORITYCOUNT 3
+
+class SfxMsgPriorityItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+
+ SfxMsgPriorityItem( USHORT nWhich, SfxMsgPriority = MSG_PRIORITY_NORMAL);
+
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool=0 ) const;
+ virtual SfxPoolItem* Create( SvStream&, USHORT ) const;
+ virtual SvStream& Store( SvStream&, USHORT ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePresentation,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresentationMetric,
+ String &rText ) const;
+ virtual USHORT GetValueCount() const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+
+ inline SfxMsgPriorityItem& operator=(const SfxMsgPriorityItem& rPrio)
+ {
+ SetValue( rPrio.GetValue() );
+ return *this;
+ }
+};
+
+
+#endif
diff --git a/sfx2/inc/orgmgr.hxx b/sfx2/inc/orgmgr.hxx
new file mode 100644
index 000000000000..85248e07996c
--- /dev/null
+++ b/sfx2/inc/orgmgr.hxx
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * 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_ORGMGR_HXX
+#define _SFX_ORGMGR_HXX
+
+#include <svl/svarray.hxx>
+
+class SfxDocumentTemplates;
+class SfxOrganizeListBox_Impl;
+class SfxObjectShell;
+struct _FileListEntry;
+
+//=========================================================================
+
+SV_DECL_PTRARR_SORT(_SfxObjectList, _FileListEntry*, 1, 4)
+
+class SfxObjectList: public _SfxObjectList
+{
+public:
+ SfxObjectList();
+ ~SfxObjectList();
+
+ const String& GetBaseName( USHORT nId ) const;
+ const String& GetFileName( USHORT nId ) const;
+};
+
+class IntlWrapper;
+struct SfxOrganizeMgr_Impl
+{
+ SfxObjectList* pDocList;
+ IntlWrapper* pIntlWrapper;
+
+ SfxOrganizeMgr_Impl() : pDocList( NULL ), pIntlWrapper( NULL ) {}
+};
+
+//=========================================================================
+
+class SfxOrganizeMgr
+{
+private:
+ SfxOrganizeMgr_Impl* pImpl;
+ SfxDocumentTemplates* pTemplates;
+ SfxOrganizeListBox_Impl* pLeftBox;
+ SfxOrganizeListBox_Impl* pRightBox;
+ BOOL bDeleteTemplates :1;
+ BOOL bModified :1;
+
+ SfxOrganizeListBox_Impl* GetOther( SfxOrganizeListBox_Impl* );
+
+public:
+ SfxOrganizeMgr( SfxOrganizeListBox_Impl* pLeft,
+ SfxOrganizeListBox_Impl* pRight,
+ SfxDocumentTemplates* pTempl = NULL );
+ ~SfxOrganizeMgr();
+
+ BOOL Copy( USHORT nTargetRegion, USHORT nTargetIdx, USHORT nSourceRegion, USHORT nSourceIdx );
+ BOOL Move( USHORT nTargetRegion, USHORT nTargetIdx, USHORT nSourceRegion, USHORT nSourceIdx );
+ BOOL Delete( SfxOrganizeListBox_Impl* pCaller, USHORT nRegion, USHORT nIdx );
+ BOOL InsertDir( SfxOrganizeListBox_Impl* pCaller, const String& rName, USHORT nRegion );
+ BOOL SetName( const String& rName, USHORT nRegion, USHORT nIdx = USHRT_MAX );
+ BOOL CopyTo( USHORT nRegion, USHORT nIdx, const String& rName ) const;
+ BOOL CopyFrom( SfxOrganizeListBox_Impl* pCaller, USHORT nRegion, USHORT nIdx, String& rName );
+
+ BOOL Rescan();
+ BOOL InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName );
+
+ BOOL IsModified() const { return bModified ? TRUE : FALSE; }
+
+ const SfxDocumentTemplates* GetTemplates() const { return pTemplates; }
+ SfxObjectList& GetObjectList() { return *pImpl->pDocList; }
+ const SfxObjectList& GetObjectList() const { return *pImpl->pDocList; }
+
+ SfxObjectShellRef CreateObjectShell( USHORT nIdx );
+ SfxObjectShellRef CreateObjectShell( USHORT nRegion, USHORT nIdx );
+ BOOL DeleteObjectShell( USHORT );
+ BOOL DeleteObjectShell( USHORT, USHORT );
+ void SaveAll( Window* pParent );
+};
+
+#endif // #ifndef _SFX_ORGMGR_HXX
+
+
diff --git a/sfx2/inc/pch/precompiled_sfx2.cxx b/sfx2/inc/pch/precompiled_sfx2.cxx
new file mode 100644
index 000000000000..c87b9d94ed2b
--- /dev/null
+++ b/sfx2/inc/pch/precompiled_sfx2.cxx
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * 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 "precompiled_sfx2.hxx"
+
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
new file mode 100644
index 000000000000..8cd8f9d8561f
--- /dev/null
+++ b/sfx2/inc/pch/precompiled_sfx2.hxx
@@ -0,0 +1,669 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): Generated on 2006-09-01 17:50:00.233019
+
+#ifdef PRECOMPILED_HEADERS
+//---MARKER---
+#include "basic/basicmanagerrepository.hxx"
+#include "basic/basmgr.hxx"
+#include "basic/sberrors.hxx"
+#include "basic/sbmeth.hxx"
+#include "basic/sbmod.hxx"
+#include "basic/sbstar.hxx"
+#include "basic/sbuno.hxx"
+#include "basic/sbx.hxx"
+#include "basic/sbxcore.hxx"
+#include "basic/sbxdef.hxx"
+#include "basic/sbxfac.hxx"
+#include "basic/sbxmeth.hxx"
+#include "basic/sbxobj.hxx"
+#include "basic/sbxvar.hxx"
+#include "boost/shared_ptr.hpp"
+#include "com/sun/star/awt/KeyEvent.hpp"
+#include "com/sun/star/awt/KeyModifier.hpp"
+#include "com/sun/star/awt/MouseButton.hpp"
+#include "com/sun/star/awt/MouseEvent.hpp"
+#include "com/sun/star/awt/PosSize.hpp"
+#include "com/sun/star/awt/Size.hpp"
+#include "com/sun/star/awt/XButton.hpp"
+#include "com/sun/star/awt/XControl.hpp"
+#include "com/sun/star/awt/XDockableWindow.hpp"
+#include "com/sun/star/awt/XDockableWindowListener.hpp"
+#include "com/sun/star/awt/XKeyHandler.hdl"
+#include "com/sun/star/awt/XKeyHandler.hpp"
+#include "com/sun/star/awt/XMouseClickHandler.hdl"
+#include "com/sun/star/awt/XMouseClickHandler.hpp"
+#include "com/sun/star/awt/XTopWindow.hpp"
+#include "com/sun/star/awt/XUserInputInterception.hpp"
+#include "com/sun/star/awt/XWindow.hpp"
+#include "com/sun/star/awt/XWindow2.hpp"
+#include "com/sun/star/beans/NamedValue.hpp"
+#include "com/sun/star/beans/Property.hpp"
+#include "com/sun/star/beans/PropertyAttribute.hpp"
+#include "com/sun/star/beans/PropertyChangeEvent.hpp"
+#include "com/sun/star/beans/PropertyState.hpp"
+#include "com/sun/star/beans/PropertyStateChangeEvent.hpp"
+#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/beans/PropertyValues.hpp"
+#include "com/sun/star/beans/StringPair.hpp"
+#include "com/sun/star/beans/UnknownPropertyException.hpp"
+#include "com/sun/star/beans/XFastPropertySet.hpp"
+#include "com/sun/star/beans/XMaterialHolder.hpp"
+#include "com/sun/star/beans/XMultiPropertySet.hpp"
+#include "com/sun/star/beans/XPropertiesChangeListener.hpp"
+#include "com/sun/star/beans/XPropertyAccess.hpp"
+#include "com/sun/star/beans/XPropertyChangeListener.hpp"
+#include "com/sun/star/beans/XPropertyContainer.hpp"
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/beans/XPropertySetInfo.hpp"
+#include "com/sun/star/beans/XPropertyState.hpp"
+#include "com/sun/star/beans/XPropertyStateChangeListener.hpp"
+#include "com/sun/star/beans/XVetoableChangeListener.hpp"
+#include "com/sun/star/container/ContainerEvent.hpp"
+#include "com/sun/star/container/XChild.hpp"
+#include "com/sun/star/container/XContainer.hpp"
+#include "com/sun/star/container/XContainerListener.hpp"
+#include "com/sun/star/container/XContainerQuery.hpp"
+#include "com/sun/star/container/XEnumeration.hpp"
+#include "com/sun/star/container/XEnumerationAccess.hpp"
+#include "com/sun/star/container/XIndexAccess.hpp"
+#include "com/sun/star/container/XIndexContainer.hpp"
+#include "com/sun/star/container/XIndexReplace.hpp"
+#include "com/sun/star/container/XNameAccess.hpp"
+#include "com/sun/star/container/XNameContainer.hpp"
+#include "com/sun/star/container/XNameReplace.hpp"
+#include "com/sun/star/container/XSet.hpp"
+#include "com/sun/star/datatransfer/DataFlavor.hpp"
+#include "com/sun/star/datatransfer/XTransferable.hpp"
+#include "com/sun/star/document/BrokenPackageRequest.hpp"
+#include "com/sun/star/document/CorruptedFilterConfigurationException.hpp"
+#include "com/sun/star/document/EventObject.hpp"
+#include "com/sun/star/document/FilterOptionsRequest.hpp"
+#include "com/sun/star/document/MacroExecMode.hpp"
+#include "com/sun/star/document/UpdateDocMode.hpp"
+#include "com/sun/star/document/XActionLockable.hpp"
+#include "com/sun/star/document/XDocumentInfo.hpp"
+#include "com/sun/star/document/XDocumentInfoSupplier.hpp"
+#include "com/sun/star/document/XDocumentRevisionListPersistence.hpp"
+#include "com/sun/star/document/XDocumentSubStorageSupplier.hpp"
+#include "com/sun/star/document/XEventBroadcaster.hpp"
+#include "com/sun/star/document/XEventListener.hpp"
+#include "com/sun/star/document/XEventsSupplier.hpp"
+#include "com/sun/star/document/XExporter.hpp"
+#include "com/sun/star/document/XExtendedFilterDetection.hpp"
+#include "com/sun/star/document/XFilter.hpp"
+#include "com/sun/star/document/XImporter.hpp"
+#include "com/sun/star/document/XInteractionFilterOptions.hpp"
+#include "com/sun/star/document/XStandaloneDocumentInfo.hpp"
+#include "com/sun/star/document/XStorageBasedDocument.hpp"
+#include "com/sun/star/document/XStorageChangeListener.hpp"
+#include "com/sun/star/document/XTypeDetection.hpp"
+#include "com/sun/star/document/XViewDataSupplier.hpp"
+#include "com/sun/star/embed/Aspects.hpp"
+#include "com/sun/star/embed/ElementModes.hpp"
+#include "com/sun/star/embed/EmbedMapUnits.hpp"
+#include "com/sun/star/embed/EmbedMisc.hpp"
+#include "com/sun/star/embed/EmbedStates.hpp"
+#include "com/sun/star/embed/EmbedVerbs.hpp"
+#include "com/sun/star/embed/EntryInitModes.hpp"
+#include "com/sun/star/embed/StateChangeInProgressException.hpp"
+#include "com/sun/star/embed/UseBackupException.hpp"
+#include "com/sun/star/embed/VerbAttributes.hpp"
+#include "com/sun/star/embed/VerbDescriptor.hpp"
+#include "com/sun/star/embed/XComponentSupplier.hpp"
+#include "com/sun/star/embed/XEmbedObjectCreator.hpp"
+#include "com/sun/star/embed/XEmbedPersist.hpp"
+#include "com/sun/star/embed/XEmbeddedClient.hpp"
+#include "com/sun/star/embed/XEmbeddedObject.hpp"
+#include "com/sun/star/embed/XInplaceClient.hpp"
+#include "com/sun/star/embed/XInplaceObject.hpp"
+#include "com/sun/star/embed/XLinkageSupport.hpp"
+#include "com/sun/star/embed/XOptimizedStorage.hpp"
+#include "com/sun/star/embed/XPackageStructureCreator.hpp"
+#include "com/sun/star/embed/XStateChangeListener.hpp"
+#include "com/sun/star/embed/XStorage.hpp"
+#include "com/sun/star/embed/XTransactedObject.hpp"
+#include "com/sun/star/embed/XTransactionBroadcaster.hpp"
+#include "com/sun/star/embed/XTransactionListener.hpp"
+#include "com/sun/star/embed/XVisualObject.hpp"
+#include "com/sun/star/embed/XWindowSupplier.hpp"
+#include "com/sun/star/form/XReset.hpp"
+#include "com/sun/star/frame/CommandGroup.hpp"
+#include "com/sun/star/frame/DispatchDescriptor.hpp"
+#include "com/sun/star/frame/DispatchResultEvent.hpp"
+#include "com/sun/star/frame/DispatchResultState.hpp"
+#include "com/sun/star/frame/DispatchStatement.hpp"
+#include "com/sun/star/frame/DoubleInitializationException.hpp"
+#include "com/sun/star/frame/FeatureStateEvent.hpp"
+#include "com/sun/star/frame/FrameAction.hpp"
+#include "com/sun/star/frame/FrameActionEvent.hpp"
+#include "com/sun/star/frame/FrameSearchFlag.hpp"
+#include "com/sun/star/frame/IllegalArgumentIOException.hpp"
+#include "com/sun/star/frame/LayoutManagerEvents.hpp"
+#include "com/sun/star/frame/XBorderResizeListener.hpp"
+#include "com/sun/star/frame/XComponentLoader.hpp"
+#include "com/sun/star/frame/XController.hpp"
+#include "com/sun/star/frame/XControllerBorder.hpp"
+#include "com/sun/star/frame/XDesktop.hpp"
+#include "com/sun/star/frame/XDispatch.hpp"
+#include "com/sun/star/frame/XDispatchHelper.hpp"
+#include "com/sun/star/frame/XDispatchInformationProvider.hpp"
+#include "com/sun/star/frame/XDispatchProvider.hpp"
+#include "com/sun/star/frame/XDispatchProviderInterception.hpp"
+#include "com/sun/star/frame/XDispatchProviderInterceptor.hpp"
+#include "com/sun/star/frame/XDispatchRecorder.hpp"
+#include "com/sun/star/frame/XDispatchRecorderSupplier.hpp"
+#include "com/sun/star/frame/XDispatchResultListener.hpp"
+#include "com/sun/star/frame/XDocumentTemplates.hpp"
+#include "com/sun/star/frame/XFilterDetect.hpp"
+#include "com/sun/star/frame/XFrame.hpp"
+#include "com/sun/star/frame/XFrameActionListener.hpp"
+#include "com/sun/star/frame/XFrameLoader.hpp"
+#include "com/sun/star/frame/XFrames.hpp"
+#include "com/sun/star/frame/XFramesSupplier.hpp"
+#include "com/sun/star/frame/XInterceptorInfo.hpp"
+#include "com/sun/star/frame/XLayoutManager.hpp"
+#include "com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp"
+#include "com/sun/star/frame/XLayoutManagerListener.hpp"
+#include "com/sun/star/frame/XLoadEventListener.hpp"
+#include "com/sun/star/frame/XLoadable.hpp"
+#include "com/sun/star/frame/XModel.hpp"
+#include "com/sun/star/frame/XModuleManager.hpp"
+#include "com/sun/star/frame/XNotifyingDispatch.hpp"
+#include "com/sun/star/frame/XStatusListener.hpp"
+#include "com/sun/star/frame/XStorable.hpp"
+#include "com/sun/star/frame/XStorable2.hpp"
+#include "com/sun/star/frame/XSubToolbarController.hpp"
+#include "com/sun/star/frame/XSynchronousDispatch.hpp"
+#include "com/sun/star/frame/XSynchronousFrameLoader.hpp"
+#include "com/sun/star/frame/XTerminateListener.hpp"
+#include "com/sun/star/frame/status/ItemState.hpp"
+#include "com/sun/star/frame/status/ItemStatus.hpp"
+#include "com/sun/star/frame/status/Template.hpp"
+#include "com/sun/star/frame/status/Verb.hpp"
+#include "com/sun/star/frame/status/Visibility.hpp"
+#include "com/sun/star/graphic/XGraphic.hpp"
+#include "com/sun/star/graphic/XGraphicProvider.hpp"
+#include "com/sun/star/i18n/TransliterationModules.hpp"
+#include "com/sun/star/i18n/WordType.hpp"
+#include "com/sun/star/i18n/XBreakIterator.hpp"
+#include "com/sun/star/io/IOException.hpp"
+#include "com/sun/star/io/XActiveDataSink.hpp"
+#include "com/sun/star/io/XActiveDataSource.hpp"
+#include "com/sun/star/io/XAsyncOutputMonitor.hpp"
+#include "com/sun/star/io/XInputStream.hpp"
+#include "com/sun/star/io/XOutputStream.hpp"
+#include "com/sun/star/io/XPersist.hpp"
+#include "com/sun/star/io/XSeekable.hpp"
+#include "com/sun/star/io/XStream.hpp"
+#include "com/sun/star/io/XStreamListener.hpp"
+#include "com/sun/star/io/XTruncate.hpp"
+#include "com/sun/star/lang/DisposedException.hpp"
+#include "com/sun/star/lang/EventObject.hpp"
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
+#include "com/sun/star/lang/Locale.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
+#include "com/sun/star/lang/XComponent.hpp"
+#include "com/sun/star/lang/XEventListener.hpp"
+#include "com/sun/star/lang/XInitialization.hpp"
+#include "com/sun/star/lang/XLocalizable.hpp"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/XSingleComponentFactory.hpp"
+#include "com/sun/star/lang/XSingleServiceFactory.hpp"
+#include "com/sun/star/lang/XTypeProvider.hpp"
+#include "com/sun/star/lang/XUnoTunnel.hpp"
+#include "com/sun/star/loader/CannotActivateFactoryException.hpp"
+#include "com/sun/star/loader/XImplementationLoader.hpp"
+#include "com/sun/star/mozilla/XPluginInstance.hpp"
+#include "com/sun/star/plugin/PluginDescription.hpp"
+#include "com/sun/star/plugin/PluginMode.hpp"
+#include "com/sun/star/plugin/XPlugin.hpp"
+#include "com/sun/star/plugin/XPluginManager.hpp"
+#include "com/sun/star/registry/InvalidRegistryException.hpp"
+#include "com/sun/star/registry/MergeConflictException.hpp"
+#include "com/sun/star/registry/RegistryValueType.hpp"
+#include "com/sun/star/registry/XSimpleRegistry.hpp"
+#include "com/sun/star/script/AllEventObject.hpp"
+#include "com/sun/star/script/ContextInformation.hpp"
+#include "com/sun/star/script/FinishEngineEvent.hpp"
+#include "com/sun/star/script/FinishReason.hpp"
+#include "com/sun/star/script/InterruptEngineEvent.hpp"
+#include "com/sun/star/script/InterruptReason.hpp"
+#include "com/sun/star/script/ModuleSizeExceededRequest.hpp"
+#include "com/sun/star/script/XAllListener.hpp"
+#include "com/sun/star/script/XAllListenerAdapterService.hpp"
+#include "com/sun/star/script/XDebugging.hpp"
+#include "com/sun/star/script/XEngine.hpp"
+#include "com/sun/star/script/XEngineListener.hpp"
+#include "com/sun/star/script/XInvocation.hpp"
+#include "com/sun/star/script/XLibraryAccess.hpp"
+#include "com/sun/star/script/XLibraryContainer.hpp"
+#include "com/sun/star/script/XStarBasicAccess.hpp"
+#include "com/sun/star/script/XTypeConverter.hpp"
+#include "com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp"
+#include "com/sun/star/script/browse/BrowseNodeTypes.hpp"
+#include "com/sun/star/script/browse/XBrowseNode.hpp"
+#include "com/sun/star/script/browse/XBrowseNodeFactory.hpp"
+#include "com/sun/star/script/provider/ScriptFrameworkErrorException.hpp"
+#include "com/sun/star/script/provider/XScript.hpp"
+#include "com/sun/star/script/provider/XScriptProvider.hpp"
+#include "com/sun/star/script/provider/XScriptProviderFactory.hpp"
+#include "com/sun/star/script/provider/XScriptProviderSupplier.hpp"
+#include "com/sun/star/sdbc/XResultSet.hpp"
+#include "com/sun/star/sdbc/XRow.hpp"
+#include "com/sun/star/security/CertificateValidity.hpp"
+#include "com/sun/star/security/DocumentSignatureInformation.hpp"
+#include "com/sun/star/security/NoPasswordException.hpp"
+#include "com/sun/star/security/XDocumentDigitalSignatures.hpp"
+#include "com/sun/star/style/XStyle.hpp"
+#include "com/sun/star/style/XStyleFamiliesSupplier.hpp"
+#include "com/sun/star/system/SimpleMailClientFlags.hpp"
+#include "com/sun/star/system/SystemShellExecuteException.hpp"
+#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
+#include "com/sun/star/system/XSimpleMailClientSupplier.hpp"
+#include "com/sun/star/system/XSystemShellExecute.hpp"
+#include "com/sun/star/task/ErrorCodeIOException.hpp"
+#include "com/sun/star/task/ErrorCodeRequest.hpp"
+#include "com/sun/star/task/XInteractionApprove.hpp"
+#include "com/sun/star/task/XInteractionDisapprove.hpp"
+#include "com/sun/star/task/XInteractionHandler.hpp"
+#include "com/sun/star/task/XInteractionRequest.hpp"
+#include "com/sun/star/task/XJob.hpp"
+#include "com/sun/star/task/XJobExecutor.hpp"
+#include "com/sun/star/task/XStatusIndicator.hpp"
+#include "com/sun/star/task/XStatusIndicatorFactory.hpp"
+#include "com/sun/star/task/XStatusIndicatorSupplier.hpp"
+#include "com/sun/star/text/XText.hpp"
+#include "com/sun/star/text/XTextCursor.hpp"
+#include "com/sun/star/text/XTextDocument.hpp"
+#include "com/sun/star/text/XTextRange.hpp"
+#include "com/sun/star/text/XTextViewCursor.hpp"
+#include "com/sun/star/text/XTextViewCursorSupplier.hpp"
+#include "com/sun/star/ucb/CommandAbortedException.hpp"
+#include "com/sun/star/ucb/CommandFailedException.hpp"
+#include "com/sun/star/ucb/ContentInfo.hpp"
+#include "com/sun/star/ucb/IllegalIdentifierException.hpp"
+#include "com/sun/star/ucb/InsertCommandArgument.hpp"
+#include "com/sun/star/ucb/InteractiveAppException.hpp"
+#include "com/sun/star/ucb/InteractiveAugmentedIOException.hpp"
+#include "com/sun/star/ucb/InteractiveIOException.hpp"
+#include "com/sun/star/ucb/NameClash.hpp"
+#include "com/sun/star/ucb/NameClashException.hpp"
+#include "com/sun/star/ucb/NumberedSortingInfo.hpp"
+#include "com/sun/star/ucb/OpenCommandArgument2.hpp"
+#include "com/sun/star/ucb/OpenMode.hpp"
+#include "com/sun/star/ucb/TransferInfo.hpp"
+#include "com/sun/star/ucb/UnsupportedDataSinkException.hpp"
+#include "com/sun/star/ucb/XAnyCompare.hpp"
+#include "com/sun/star/ucb/XAnyCompareFactory.hpp"
+#include "com/sun/star/ucb/XCommandEnvironment.hpp"
+#include "com/sun/star/ucb/XCommandInfo.hpp"
+#include "com/sun/star/ucb/XCommandProcessor.hpp"
+#include "com/sun/star/ucb/XContent.hpp"
+#include "com/sun/star/ucb/XContentAccess.hpp"
+#include "com/sun/star/ucb/XContentCreator.hpp"
+#include "com/sun/star/ucb/XContentIdentifierFactory.hpp"
+#include "com/sun/star/ucb/XContentProvider.hpp"
+#include "com/sun/star/ucb/XDataContainer.hpp"
+#include "com/sun/star/ucb/XDynamicResultSet.hpp"
+#include "com/sun/star/ucb/XProgressHandler.hpp"
+#include "com/sun/star/ucb/XSimpleFileAccess.hpp"
+#include "com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp"
+#include "com/sun/star/ui/ImageType.hpp"
+#include "com/sun/star/ui/XAcceleratorConfiguration.hpp"
+#include "com/sun/star/ui/XContextMenuInterception.hpp"
+#include "com/sun/star/ui/XContextMenuInterceptor.hpp"
+#include "com/sun/star/ui/XImageManager.hpp"
+#include "com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp"
+#include "com/sun/star/ui/XUIConfigurationManagerSupplier.hpp"
+#include "com/sun/star/ui/XUIConfigurationPersistence.hpp"
+#include "com/sun/star/ui/XUIConfigurationStorage.hpp"
+#include "com/sun/star/ui/XUIElement.hpp"
+#include "com/sun/star/ui/XUIElementFactory.hpp"
+#include "com/sun/star/ui/XUIFunctionListener.hpp"
+#include "com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp"
+#include "com/sun/star/ui/dialogs/ControlActions.hpp"
+#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp"
+#include "com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp"
+#include "com/sun/star/ui/dialogs/FilePreviewImageFormats.hpp"
+#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
+#include "com/sun/star/ui/dialogs/XControlAccess.hpp"
+#include "com/sun/star/ui/dialogs/XExecutableDialog.hpp"
+#include "com/sun/star/ui/dialogs/XFilePicker.hpp"
+#include "com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp"
+#include "com/sun/star/ui/dialogs/XFilePickerListener.hpp"
+#include "com/sun/star/ui/dialogs/XFilePickerNotifier.hpp"
+#include "com/sun/star/ui/dialogs/XFilePreview.hpp"
+#include "com/sun/star/ui/dialogs/XFilterGroupManager.hpp"
+#include "com/sun/star/ui/dialogs/XFilterManager.hpp"
+#include "com/sun/star/ui/dialogs/XFolderPicker.hpp"
+#include "com/sun/star/uno/Any.h"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "com/sun/star/uno/Reference.h"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/Type.h"
+#include "com/sun/star/uno/Type.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/XInterface.hpp"
+#include "com/sun/star/uri/XUriReferenceFactory.hpp"
+#include "com/sun/star/uri/XVndSunStarScriptUrl.hpp"
+#include "com/sun/star/util/CloseVetoException.hpp"
+#include "com/sun/star/util/Date.hpp"
+#include "com/sun/star/util/DateTime.hpp"
+#include "com/sun/star/util/RevisionTag.hpp"
+#include "com/sun/star/util/SearchFlags.hpp"
+#include "com/sun/star/util/SearchOptions.hpp"
+#include "com/sun/star/util/Time.hpp"
+#include "com/sun/star/util/URL.hpp"
+#include "com/sun/star/util/XArchiver.hpp"
+#include "com/sun/star/util/XChangesBatch.hpp"
+#include "com/sun/star/util/XCloseBroadcaster.hpp"
+#include "com/sun/star/util/XCloseListener.hpp"
+#include "com/sun/star/util/XCloseable.hpp"
+#include "com/sun/star/util/XFlushable.hpp"
+#include "com/sun/star/util/XModifiable.hpp"
+#include "com/sun/star/util/XModifyBroadcaster.hpp"
+#include "com/sun/star/util/XModifyListener.hpp"
+#include "com/sun/star/util/XOfficeInstallationDirectories.hpp"
+#include "com/sun/star/util/XPropertyReplace.hpp"
+#include "com/sun/star/util/XRefreshListener.hpp"
+#include "com/sun/star/util/XRefreshable.hpp"
+#include "com/sun/star/util/XReplaceDescriptor.hpp"
+#include "com/sun/star/util/XReplaceable.hpp"
+#include "com/sun/star/util/XSearchDescriptor.hpp"
+#include "com/sun/star/util/XSearchable.hpp"
+#include "com/sun/star/util/XStringWidth.hpp"
+#include "com/sun/star/util/XURLTransformer.hpp"
+#include "com/sun/star/view/DocumentZoomType.hpp"
+#include "com/sun/star/view/PaperFormat.hpp"
+#include "com/sun/star/view/PaperOrientation.hpp"
+#include "com/sun/star/view/PrintableState.hpp"
+#include "com/sun/star/view/XControlAccess.hpp"
+#include "com/sun/star/view/XPrintJob.hpp"
+#include "com/sun/star/view/XPrintJobBroadcaster.hpp"
+#include "com/sun/star/view/XPrintPreview.hpp"
+#include "com/sun/star/view/XPrintSettingsSupplier.hpp"
+#include "com/sun/star/view/XPrintable.hpp"
+#include "com/sun/star/view/XScreenCursor.hpp"
+#include "com/sun/star/view/XSelectionChangeListener.hpp"
+#include "com/sun/star/view/XSelectionSupplier.hpp"
+#include "com/sun/star/view/XViewSettingsSupplier.hpp"
+#include "com/sun/star/xml/crypto/XSecurityEnvironment.hpp"
+#include "com/sun/star/xml/sax/XAttributeList.hpp"
+#include "com/sun/star/xml/sax/XDocumentHandler.hpp"
+#include "com/sun/star/xml/sax/XParser.hpp"
+#include "comphelper/configurationhelper.hxx"
+#include "comphelper/documentconstants.hxx"
+#include "comphelper/embeddedobjectcontainer.hxx"
+#include "comphelper/mediadescriptor.hxx"
+#include "comphelper/processfactory.hxx"
+#include "comphelper/seqstream.hxx"
+#include "comphelper/sequence.hxx"
+#include "comphelper/sequenceashashmap.hxx"
+#include "comphelper/sequenceasvector.hxx"
+#include "comphelper/storagehelper.hxx"
+#include "comphelper/types.hxx"
+#include "cppuhelper/compbase1.hxx"
+#include "cppuhelper/compbase3.hxx"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implbase3.hxx"
+#include "cppuhelper/implbase4.hxx"
+#include "cppuhelper/implbase5.hxx"
+#include "cppuhelper/implbase6.hxx"
+#include "cppuhelper/interfacecontainer.h"
+#include "cppuhelper/interfacecontainer.hxx"
+#include "cppuhelper/propshlp.hxx"
+#include "cppuhelper/queryinterface.hxx"
+#include "cppuhelper/typeprovider.hxx"
+#include "cppuhelper/weak.hxx"
+#include "cppuhelper/weakref.hxx"
+#include "framework/actiontriggerhelper.hxx"
+#include "framework/addonmenu.hxx"
+#include "framework/configimporter.hxx"
+#include "framework/eventsconfiguration.hxx"
+#include "framework/imageproducer.hxx"
+#include "framework/interaction.hxx"
+#include "framework/preventduplicateinteraction.hxx"
+#include "i18npool/lang.h"
+#include "i18npool/mslangid.hxx"
+#include "osl/conditn.hxx"
+#include "osl/diagnose.h"
+#include "osl/file.hxx"
+#include "osl/module.hxx"
+#include "osl/mutex.hxx"
+#include "osl/process.h"
+#include "osl/security.hxx"
+#include "osl/thread.h"
+#include "osl/thread.hxx"
+#include "rsc/rscsfx.hxx"
+#include "rtl/bootstrap.hxx"
+#include "rtl/logfile.hxx"
+#include "rtl/math.hxx"
+#include "rtl/strbuf.hxx"
+#include "rtl/string.hxx"
+#include "rtl/tencinfo.h"
+#include "rtl/uri.h"
+#include "rtl/ustrbuf.hxx"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "sal/config.h"
+#include "sal/types.h"
+#include "setup_native/qswin32.h"
+#include "sot/clsids.hxx"
+#include "sot/exchange.hxx"
+#include "sot/factory.hxx"
+#include "sot/formats.hxx"
+#include "sot/object.hxx"
+#include "sot/storinfo.hxx"
+#include "svtools/accessibilityoptions.hxx"
+#include "svl/adrparse.hxx"
+#include "svl/aeitem.hxx"
+#include "svtools/asynclink.hxx"
+#include "svl/brdcst.hxx"
+#include "svl/cntwids.hrc"
+#include "svtools/controldims.hrc"
+#include "svl/ctypeitm.hxx"
+#include "svl/dateitem.hxx"
+#include "unotools/dynamicmenuoptions.hxx"
+#include "svtools/ehdl.hxx"
+#include "svl/eitem.hxx"
+#include "svtools/embedhlp.hxx"
+#include "svtools/embedtransfer.hxx"
+#include "unotools/eventcfg.hxx"
+#include "unotools/extendedsecurityoptions.hxx"
+#include "svl/flagitem.hxx"
+#include "svl/folderrestriction.hxx"
+#include "unotools/fontoptions.hxx"
+#include "svtools/framestatuslistener.hxx"
+#include "svtools/helpopt.hxx"
+#include "svl/hint.hxx"
+#include "unotools/historyoptions.hxx"
+#include "svtools/htmlkywd.hxx"
+#include "svtools/htmltokn.h"
+#include "svl/imageitm.hxx"
+#include "svtools/imagemgr.hxx"
+#include "svtools/imap.hxx"
+#include "svtools/imgdef.hxx"
+#include "svl/inetdef.hxx"
+#include "svl/inethist.hxx"
+#include "svl/inetmsg.hxx"
+#include "unotools/inetoptions.hxx"
+#include "svl/inetstrm.hxx"
+#include "svl/inettype.hxx"
+#include "unotools/internaloptions.hxx"
+#include "svl/intitem.hxx"
+#include "svl/isethint.hxx"
+#include "svtools/itemdel.hxx"
+#include "svl/itemiter.hxx"
+#include "svl/itempool.hxx"
+#include "svl/itemprop.hxx"
+#include "svl/itemset.hxx"
+#include "svtools/javacontext.hxx"
+#include "svl/lckbitem.hxx"
+#include "unotools/localisationoptions.hxx"
+#include "svtools/localresaccess.hxx"
+#include "svl/lstner.hxx"
+#include "svl/memberid.hrc"
+#include "svtools/menuoptions.hxx"
+#include "unotools/misccfg.hxx"
+#include "svtools/miscopt.hxx"
+#include "unotools/moduleoptions.hxx"
+#include "svl/ownlist.hxx"
+#include "svtools/parhtml.hxx"
+#include "unotools/pathoptions.hxx"
+#include "svl/pickerhelper.hxx"
+#include "svl/poolitem.hxx"
+#include "svtools/printoptions.hxx"
+#include "unotools/printwarningoptions.hxx"
+#include "svl/rectitem.hxx"
+#include "unotools/regoptions.hxx"
+#include "unotools/saveopt.hxx"
+#include "unotools/searchopt.hxx"
+#include "unotools/securityoptions.hxx"
+#include "svtools/sfxecode.hxx"
+#include "svl/slstitm.hxx"
+#include "svl/smplhint.hxx"
+#include "svtools/soerr.hxx"
+#include "svl/solar.hrc"
+#include "unotools/startoptions.hxx"
+#include "svtools/statusbarcontroller.hxx"
+#include "svl/stritem.hxx"
+#include "svl/style.hrc"
+#include "svl/style.hxx"
+#include "svl/svarray.hxx"
+#include "svl/svdde.hxx"
+#include "svl/svstdarr.hxx"
+#include "svtools/svtdata.hxx"
+#include "svl/svtools.hrc"
+#include "unotools/syslocale.hxx"
+#include "unotools/syslocaleoptions.hxx"
+#include "svl/szitem.hxx"
+#include "svtools/templatefoldercache.hxx"
+#include "svtools/toolboxcontroller.hxx"
+#include "svtools/transfer.hxx"
+#include "svtools/ttprops.hxx"
+#include "svl/undo.hxx"
+#include "unotools/undoopt.hxx"
+#include "svl/urihelper.hxx"
+#include "svl/urlbmk.hxx"
+#include "unotools/useroptions.hxx"
+#include "unotools/viewoptions.hxx"
+#include "svl/visitem.hxx"
+#include "svl/whiter.hxx"
+#include "unotools/workingsetoptions.hxx"
+#include "svl/zforlist.hxx"
+#include "toolkit/awt/vclxwindow.hxx"
+#include "toolkit/helper/convert.hxx"
+#include "tools/bigint.hxx"
+#include "tools/cachestr.hxx"
+#include "tools/color.hxx"
+#include "tools/config.hxx"
+#include "tools/datetime.hxx"
+#include "tools/debug.hxx"
+#include "tools/errcode.hxx"
+#include "tools/fract.hxx"
+#include "tools/gen.hxx"
+#include "tools/globname.hxx"
+#include "tools/inetmime.hxx"
+#include "tools/link.hxx"
+#include "tools/list.hxx"
+#include "tools/ownlist.hxx"
+#include "tools/rc.hxx"
+#include "tools/rcid.h"
+#include "tools/ref.hxx"
+#include "tools/resary.hxx"
+#include "tools/resid.hxx"
+#include "tools/rtti.hxx"
+#include "tools/shl.hxx"
+#include "tools/simplerm.hxx"
+#include "tools/solar.h"
+#include "tools/stream.hxx"
+#include "tools/string.hxx"
+#include "tools/table.hxx"
+#include "tools/tenccvt.hxx"
+#include "tools/unqid.hxx"
+#include "tools/urlobj.hxx"
+#include "tools/wldcrd.hxx"
+#include "tools/zcodec.hxx"
+#include "ucbhelper/configurationkeys.hxx"
+#include "uno/current_context.hxx"
+#include "uno/mapping.hxx"
+#include "unotools/bootstrap.hxx"
+#include "unotools/configitem.hxx"
+#include "unotools/configmgr.hxx"
+#include "unotools/confignode.hxx"
+#include "unotools/intlwrapper.hxx"
+#include "unotools/localedatawrapper.hxx"
+#include "unotools/localfilehelper.hxx"
+#include "unotools/processfactory.hxx"
+#include "unotools/progresshandlerwrap.hxx"
+#include "unotools/streamhelper.hxx"
+#include "unotools/streamwrap.hxx"
+#include "unotools/tempfile.hxx"
+#include "unotools/ucblockbytes.hxx"
+#include "unotools/ucbstreamhelper.hxx"
+#include "vcl/abstdlg.hxx"
+#include "vcl/bitmap.hxx"
+#include "vcl/bitmapex.hxx"
+#include "vcl/bmpacc.hxx"
+#include "vcl/cvtgrf.hxx"
+#include "vcl/decoview.hxx"
+#include "vcl/gdimtf.hxx"
+#include "vcl/graph.hxx"
+#include "vcl/help.hxx"
+#include "vcl/i18nhelp.hxx"
+#include "vcl/image.hxx"
+#include "vcl/jobset.hxx"
+#include "vcl/menu.hxx"
+#include "vcl/mnemonic.hxx"
+#include "vcl/pointr.hxx"
+#include "vcl/salbtype.hxx"
+#include "vcl/salctype.hxx"
+#include "vcl/sound.hxx"
+#include "vcl/stdtext.hxx"
+#include "vcl/timer.hxx"
+#include "vcl/unohelp.hxx"
+#include "vcl/wintypes.hxx"
+#include "vos/diagnose.hxx"
+#include "vos/module.hxx"
+#include "vos/mutex.hxx"
+#include "vos/process.hxx"
+#include "vos/security.hxx"
+#include "vos/socket.hxx"
+#include "vos/thread.hxx"
+#include "vos/xception.hxx"
+//---MARKER---
+#endif
+
diff --git a/sfx2/inc/progind.hxx b/sfx2/inc/progind.hxx
new file mode 100644
index 000000000000..a3857b14c4ed
--- /dev/null
+++ b/sfx2/inc/progind.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * 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_PROGIND_HXX
+#define _SFX_PROGIND_HXX
+
+#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
+#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <vcl/window.hxx>
+#include <vcl/fixed.hxx>
+#include <svtools/prgsbar.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+#include <sfx2/sfxuno.hxx>
+
+class SfxStatusInd_Impl : public cppu::WeakImplHelper1< ::com::sun::star::task::XStatusIndicator >
+{
+ long nValue;
+ long nRange;
+ sal_uInt16 nProgressCount;
+
+friend class SfxPopupStatusIndicator;
+ SfxPopupStatusIndicator* pWindow;
+
+public:
+
+ SfxStatusInd_Impl();
+
+ // XStatusIndicator
+ virtual void SAL_CALL start(const ::rtl::OUString& aText, sal_Int32 nRange) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL end(void) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setText(const ::rtl::OUString& aText) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setValue(sal_Int32 nValue) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL reset() throw ( ::com::sun::star::uno::RuntimeException );
+};
+
+class SfxPopupStatusIndicator : public Window
+{
+friend class SfxStatusInd_Impl;
+ FixedText aTextBar;
+ ProgressBar aProgressBar;
+ SfxStatusInd_Impl* pInterface;
+
+public:
+ SfxPopupStatusIndicator( Window* pParent );
+ ~SfxPopupStatusIndicator();
+
+ virtual void MakeVisible( sal_Bool bVisible );
+ virtual void Resize();
+ virtual void Paint( const Rectangle& rRect );
+ Size CalcWindowSizePixel();
+ ::com::sun::star::task::XStatusIndicator* GetInterface()
+ { return pInterface; }
+};
+
+
+#endif
+
diff --git a/sfx2/inc/resmgr.hxx b/sfx2/inc/resmgr.hxx
new file mode 100644
index 000000000000..13fe19f1c4e8
--- /dev/null
+++ b/sfx2/inc/resmgr.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_RESMGR_HXX
+#define _SFX_RESMGR_HXX
+
+#include <sfx2/minarray.hxx>
+
+class SfxMessageDescription;
+class SfxMessageTable;
+class Bitmap;
+class ResMgr;
+
+DECL_PTRARRAY(SfxResMgrArr, ResMgr *, 1, 1);
+
+// INCLUDE ---------------------------------------------------------------
+
+class SfxResourceManager
+{
+ SfxResMgrArr aResMgrArr;
+ SfxResMgrArr aResMgrBmpArr;
+ USHORT nEnterCount;
+ SfxMessageTable* pMessageTable;
+
+private:
+ void ClearMsgTable_Impl();
+ SfxMessageDescription* MakeDesc_Impl(USHORT);
+
+public:
+ SfxResourceManager();
+ ~SfxResourceManager();
+
+ USHORT RegisterResource( const char *pFileName);
+ void ReleaseResource( USHORT nRegisterId );
+
+ USHORT RegisterBitmap(const char *pMono, const char *pColor);
+
+ USHORT RegisterBitmap( const char *pSingleFile );
+ void ReleaseBitmap( USHORT nRegisterId );
+
+ Bitmap GetAllBitmap( USHORT nBmpsPerRow );
+
+ void Enter();
+ void Leave();
+ SfxMessageDescription* CreateDescription( USHORT nId );
+};
+
+
+#define SFX_RESMANAGER() SFX_APP()->GetResourceManager()
+
+#endif
+
diff --git a/sfx2/inc/sfx2/DocumentMetadataAccess.hxx b/sfx2/inc/sfx2/DocumentMetadataAccess.hxx
new file mode 100644
index 000000000000..def1e4ab5a0e
--- /dev/null
+++ b/sfx2/inc/sfx2/DocumentMetadataAccess.hxx
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * 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_DOCUMENTMETADATAACCESS_HXX_
+#define _SFX_DOCUMENTMETADATAACCESS_HXX_
+
+#include <sal/config.h>
+
+#include <sfx2/dllapi.h>
+
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
+#include <com/sun/star/rdf/XRepositorySupplier.hpp>
+
+#include <cppuhelper/implbase1.hxx>
+
+#include <boost/utility.hpp>
+
+#include <memory>
+
+
+/** Implementation of the interface com.sun.star.rdf.XDocumentMetadataAccess
+
+ This is not a service only because it needs some kind of XML ID registry
+ from the document, and i do not like defining an API for that.
+ Also, the implementation does _no_ locking, so make sure access is
+ protected externally.
+
+ @author mst
+ */
+
+namespace com { namespace sun { namespace star { namespace embed {
+ class XStorage;
+} } } }
+
+namespace sfx2 {
+
+
+/** create a base URI for loading metadata from an ODF (sub)document.
+
+ @param i_xContext component context
+ @param i_xStorage storage for the document; FileSystemStorage is allowed
+ @param i_rPkgURI the URI for the package
+ @param i_rSubDocument (optional) path of the subdocument in package
+
+ @return a base URI suitable for XDocumentMetadataAccess::loadFromStorage
+ */
+::com::sun::star::uno::Reference< ::com::sun::star::rdf::XURI> SFX2_DLLPUBLIC
+createBaseURI(
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>
+ const & i_xContext,
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage>
+ const & i_xStorage,
+ ::rtl::OUString const & i_rPkgURI,
+ ::rtl::OUString const & i_rSubDocument = ::rtl::OUString());
+
+
+class IXmlIdRegistrySupplier;
+struct DocumentMetadataAccess_Impl;
+
+
+class SFX2_DLLPUBLIC DocumentMetadataAccess :
+ private boost::noncopyable,
+ public ::cppu::WeakImplHelper1<
+ ::com::sun::star::rdf::XDocumentMetadataAccess>
+{
+public:
+ explicit DocumentMetadataAccess(::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > const & i_xContext,
+ IXmlIdRegistrySupplier const & i_rRegistrySupplier,
+ ::rtl::OUString const & i_rBaseURI);
+ // N.B.: in contrast to previous, this constructor does _not_ initialize!
+ // caller must immediately call loadFromStorage/Medium!
+ explicit DocumentMetadataAccess(::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > const & i_xContext,
+ IXmlIdRegistrySupplier const & i_rRegistrySupplier);
+ virtual ~DocumentMetadataAccess();
+
+ // ::com::sun::star::rdf::XNode:
+ virtual ::rtl::OUString SAL_CALL getStringValue()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::rdf::XURI:
+ virtual ::rtl::OUString SAL_CALL getNamespace()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getLocalName()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::rdf::XRepositorySupplier:
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XRepository > SAL_CALL getRDFRepository()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::rdf::XDocumentMetadataAccess:
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > SAL_CALL
+ getElementByMetadataReference(
+ const ::com::sun::star::beans::StringPair & i_rReference)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > SAL_CALL
+ getElementByURI(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xURI)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > > SAL_CALL getMetadataGraphsWithType(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xType)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI> SAL_CALL
+ addMetadataFile(const ::rtl::OUString & i_rFileName,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XURI >
+ > & i_rTypes)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::ElementExistException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI> SAL_CALL
+ importMetadataFile(::sal_Int16 i_Format,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::io::XInputStream > & i_xInStream,
+ const ::rtl::OUString & i_rFileName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xBaseURI,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XURI >
+ > & i_rTypes)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::datatransfer::UnsupportedFlavorException,
+ ::com::sun::star::container::ElementExistException,
+ ::com::sun::star::rdf::ParseException,
+ ::com::sun::star::io::IOException);
+ virtual void SAL_CALL removeMetadataFile(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xGraphName)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException);
+ virtual void SAL_CALL addContentOrStylesFile(
+ const ::rtl::OUString & i_rFileName)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::ElementExistException);
+ virtual void SAL_CALL removeContentOrStylesFile(
+ const ::rtl::OUString & i_rFileName)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException);
+
+ virtual void SAL_CALL loadMetadataFromStorage(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::embed::XStorage > & i_xStorage,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xBaseURI,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::task::XInteractionHandler> & i_xHandler)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+ virtual void SAL_CALL storeMetadataToStorage(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::embed::XStorage > & i_xStorage)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+ virtual void SAL_CALL loadMetadataFromMedium(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > & i_rMedium)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+ virtual void SAL_CALL storeMetadataToMedium(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > & i_rMedium)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+
+private:
+ std::auto_ptr<DocumentMetadataAccess_Impl> m_pImpl;
+};
+
+} // namespace sfx2
+
+#endif // _SFX_DOCUMENTMETADATAACCESS_HXX_
+
diff --git a/sfx2/inc/sfx2/Metadatable.hxx b/sfx2/inc/sfx2/Metadatable.hxx
new file mode 100644
index 000000000000..273eb1afef87
--- /dev/null
+++ b/sfx2/inc/sfx2/Metadatable.hxx
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * 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 METADATABLE_HXX
+#define METADATABLE_HXX
+
+#include <sal/config.h>
+
+#include <sfx2/dllapi.h>
+
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/rdf/XMetadatable.hpp>
+
+#include <boost/utility.hpp>
+#include <boost/shared_ptr.hpp>
+
+
+namespace com { namespace sun { namespace star {
+ namespace frame { class XModel; }
+} } }
+
+namespace sfx2 {
+ class IXmlIdRegistry;
+}
+
+namespace sfx2 {
+
+class XmlIdRegistry;
+class MetadatableUndo;
+
+
+// XML ID handling ---------------------------------------------------
+
+
+/// create a sfx2::XmlIdRegistryDocument or a sfx2::XmlIdRegistryClipboard
+SFX2_DLLPUBLIC ::sfx2::IXmlIdRegistry *
+createXmlIdRegistry(const bool i_DocIsClipboard);
+
+
+/** base class for core objects that may have xml:id.
+
+ <p>The interface of this class consists of 3 parts:
+ <ul><li>implementations that are used by the <type>MetadatableMixin</type>
+ below</li>
+ <li>hooks to be called by the sw core whenever actions that are
+ relevant to the uniqueness of xml:ids are taken (copying,
+ splitting, merging, deletion, undo, etc.)</li>
+ <li>abstract methods that are called by the implementation of the
+ previous hooks</li></ul>
+ </p>
+ */
+class SFX2_DLLPUBLIC Metadatable : private boost::noncopyable
+{
+
+public:
+ Metadatable() : m_pReg(0) {}
+
+ // destructor calls RemoveMetadataReference
+ virtual ~Metadatable();
+
+ // for MetadatableMixin ----------------------------------------------
+
+ ::com::sun::star::beans::StringPair GetMetadataReference() const;
+ void SetMetadataReference(
+ const ::com::sun::star::beans::StringPair & i_rReference);
+ void EnsureMetadataReference();
+
+ // hooks -------------------------------------------------------------
+
+ // called from dtor!
+ void RemoveMetadataReference();
+
+ /** register this as a copy of i_rSource */
+ void RegisterAsCopyOf(Metadatable const & i_rSource,
+ const bool i_bCopyPrecedesSource = false);
+
+ /** create an Undo Metadatable, which remembers this' reference */
+ ::boost::shared_ptr<MetadatableUndo> CreateUndo() const;
+ ::boost::shared_ptr<MetadatableUndo> CreateUndoForDelete();
+
+ /** restore this from Undo Metadatable */
+ void RestoreMetadata(::boost::shared_ptr<MetadatableUndo> const& i_pUndo);
+
+ /** merge this and i_rOther into this */
+ void JoinMetadatable(Metadatable const & i_rOther,
+ const bool i_isMergedEmpty, const bool i_isOtherEmpty);
+
+ // abstract methods --------------------------------------------------
+
+ /** get the registry from the SwDoc */
+ virtual ::sfx2::IXmlIdRegistry& GetRegistry() = 0;
+
+ /** is this in a clipboard document? */
+ virtual bool IsInClipboard() const = 0;
+
+ /** is this in undo array? */
+ virtual bool IsInUndo() const = 0;
+
+ /** which stream is this in? true: content.xml; false: styles.xml */
+ virtual bool IsInContent() const = 0;
+
+ /** create XMetadatable from this.
+ note: if IsInUndo or IsInClipboard return true,
+ MakeUnoObject <em>must not</em> be called!
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > MakeUnoObject() = 0;
+
+private:
+ friend class MetadatableClipboard;
+ friend class MetadatableUndo;
+
+ // note that Reg may be a XmlIdRegistryDocument or a XmlIdRegistryClipboard
+ XmlIdRegistry* m_pReg; // null => no XmlId
+};
+
+
+/** base class for UNO objects that implement <type>XMetadatable</type>.
+
+ <p>An instance of this base class is associated with an instance of
+ <type>Metadatable</type>.</p>
+ */
+class SFX2_DLLPUBLIC MetadatableMixin :
+ public ::cppu::WeakImplHelper1<
+ ::com::sun::star::rdf::XMetadatable>
+{
+
+public:
+ MetadatableMixin() {};
+
+ virtual ~MetadatableMixin() {}
+
+ // ::com::sun::star::rdf::XNode:
+ virtual ::rtl::OUString SAL_CALL getStringValue()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::rdf::XURI:
+ virtual ::rtl::OUString SAL_CALL getLocalName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getNamespace()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::rdf::XMetadatable:
+ virtual ::com::sun::star::beans::StringPair SAL_CALL getMetadataReference()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMetadataReference(
+ const ::com::sun::star::beans::StringPair & i_rReference)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException);
+ virtual void SAL_CALL ensureMetadataReference()
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /// get the core object corresponding to this UNO object.
+ virtual Metadatable * GetCoreObject() = 0;
+ /// get the <type>XModel</type> for the document
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel() = 0;
+
+};
+
+} // namespace sfx2
+
+#endif // METADATABLE_HXX
diff --git a/sfx2/inc/sfx2/XmlIdRegistry.hxx b/sfx2/inc/sfx2/XmlIdRegistry.hxx
new file mode 100644
index 000000000000..7871fbe66ac5
--- /dev/null
+++ b/sfx2/inc/sfx2/XmlIdRegistry.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * 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_XMLIDREGISTRY_HXX_
+#define _SFX_XMLIDREGISTRY_HXX_
+
+#include <sal/config.h>
+
+#include <sfx2/dllapi.h>
+
+#include <com/sun/star/beans/StringPair.hpp>
+
+
+namespace com { namespace sun { namespace star { namespace rdf {
+ class XMetadatable;
+} } } }
+
+namespace sfx2 {
+
+// XML ID utilities --------------------------------------------------
+
+/** is i_rIdref a valid NCName ? */
+bool SFX2_DLLPUBLIC isValidNCName(::rtl::OUString const & i_rIdref);
+
+extern inline bool
+isValidXmlId(::rtl::OUString const & i_rStreamName,
+ ::rtl::OUString const & i_rIdref)
+{
+ return isValidNCName(i_rIdref) &&
+ (i_rStreamName.equalsAscii("content.xml") ||
+ i_rStreamName.equalsAscii("styles.xml"));
+}
+
+
+// XML ID handling ---------------------------------------------------
+
+/** interface for getElementByMetadataReference;
+ for use by sfx2::DocumentMetadataAccess
+ */
+class SFX2_DLLPUBLIC IXmlIdRegistry
+{
+
+public:
+ virtual ~IXmlIdRegistry() { }
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > SAL_CALL
+ GetElementByMetadataReference(
+ const ::com::sun::star::beans::StringPair & i_rXmlId) const = 0;
+
+};
+
+/** supplier interface for the registry.
+
+ This indirection is unfortunately necessary, because the SwDocShell
+ is not always connected to a SwDoc, so we cannot guarantee that a
+ registry given to a SfxBaseModel/DocumentMetadataAccess remains valid;
+ it has to be retrieved from this supplier interface on access.
+ */
+class SFX2_DLLPUBLIC IXmlIdRegistrySupplier
+{
+
+public:
+ virtual ~IXmlIdRegistrySupplier() { }
+
+ /** override this if you have a XmlIdRegistry. */
+ virtual const IXmlIdRegistry* GetXmlIdRegistry() const { return 0; }
+
+};
+
+} // namespace sfx2
+
+#endif // _SFX_XMLIDREGISTRY_HXX_
+
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
new file mode 100644
index 000000000000..8a49fde7b958
--- /dev/null
+++ b/sfx2/inc/sfx2/app.hxx
@@ -0,0 +1,336 @@
+/*************************************************************************
+ *
+ * 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 _SFXAPP_HXX
+#define _SFXAPP_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <tools/solar.h>
+#include <svl/smplhint.hxx>
+#include <svl/poolitem.hxx>
+#include <vcl/image.hxx>
+#include <tools/ref.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+
+// too many files including sfx2/app.hxx use VCL Application class but don't include the
+// header file because in former times SfxApplication was derived from it
+#include <vcl/svapp.hxx>
+
+#include <sfx2/shell.hxx>
+
+class Timer;
+class ApplicationEvent;
+class WorkWindow;
+class ISfxTemplateCommon;
+class BasicManager;
+class DdeService;
+class GenLink;
+class PrinterDialog;
+class Point;
+class Rectangle;
+class AppSettings;
+struct SfxChildWinContextFactory;
+class SfxAppData_Impl;
+class SfxBindings;
+class SfxChildWinFactArr_Impl;
+class SfxChildWindow;
+class SfxDispatcher;
+class SfxEventConfiguration;
+class SfxEventHint;
+class SfxItemSet;
+class SfxMacroConfig;
+class SfxMedium;
+class SfxMediumList;
+class SfxMenuCtrlFactArr_Impl;
+class SfxNewFileDialog;
+class SfxObjectShell;
+class SfxObjectShellArr_Impl;
+class SfxOptions;
+class SfxProgress;
+class SfxResourceManager;
+class SfxSlotPool;
+class SfxStbCtrlFactArr_Impl;
+class SfxTbxCtrlFactArr_Impl;
+class SfxTemplateDialog;
+class SfxViewFrame;
+class SfxViewFrameArr_Impl;
+class SfxViewShell;
+class SfxViewShellArr_Impl;
+class StarBASIC;
+class SfxWorkWindow;
+class SfxFilterMatcher;
+class SvUShorts;
+class SfxModule;
+class SfxModuleArr_Impl;
+class Window;
+class INetURLObject;
+struct SfxConstant;
+struct SfxChildWinFactory;
+struct SfxMenuCtrlFactory;
+struct SfxStbCtrlFactory;
+struct SfxTbxCtrlFactory;
+class SimpleResMgr;
+class ModalDialog;
+
+namespace sfx2
+{
+ class SvLinkSource;
+}
+
+//====================================================================
+
+class SfxLinkItem : public SfxPoolItem
+{
+ Link aLink;
+public:
+ virtual SfxPoolItem* Clone( SfxItemPool* = 0 ) const
+ { return new SfxLinkItem( *this ); }
+ virtual int operator==( const SfxPoolItem& rL) const
+ { return ((SfxLinkItem&)rL).aLink == aLink; }
+ SfxLinkItem( USHORT nWhichId, const Link& rValue ) : SfxPoolItem( nWhichId )
+ { aLink = rValue; }
+ const Link& GetValue() const { return aLink; }
+};
+
+//TODO/CLEANUP
+//wird anscheinend nur in SfxPickList/SfxFrameLoader benutzt
+DECL_OBJHINT( SfxStringHint, String );
+
+/*
+typedef SfxPoolItem* (*SfxItemCreateFunc)();
+class SfxItemFactory_Impl;
+class SfxItemFactoryList
+{
+ List aList;
+public:
+ ~SfxItemFactoryList();
+
+ SfxItemFactory_Impl* GetFactory_Impl( const SvGlobalName& rName ) const;
+ SfxItemFactory_Impl* GetFactory_Impl( TypeId ) const;
+ const SvGlobalName* GetGlobalName( const SfxPoolItem* pItem ) const;
+ SfxPoolItem* Create(
+ const SvGlobalName& rName, USHORT nId, SvStream* pStrm = 0) const;
+ void RegisterItemFactory(
+ const SvGlobalName& rName, SfxItemCreateFunc );
+};
+
+#define REGISTER_ITEM( ItemClass, aGlobName ) \
+RegisterItemFactory( aGlobName, ( SfxItemCreateFunc) ItemClass::StaticType() );
+*/
+
+#ifndef SFX_DECL_OBJECTSHELL_DEFINED
+#define SFX_DECL_OBJECTSHELL_DEFINED
+SV_DECL_REF(SfxObjectShell)
+#endif
+
+class SfxObjectShellLock;
+
+class SFX2_DLLPUBLIC SfxApplication: public SfxShell
+{
+ SAL_DLLPRIVATE static ::osl::Mutex gMutex;
+ SAL_DLLPRIVATE static SfxApplication* pApp;
+
+ SfxAppData_Impl* pAppData_Impl;
+
+//#if 0 // _SOLAR__PRIVATE
+ DECL_DLLPRIVATE_LINK( GlobalBasicErrorHdl_Impl, StarBASIC* );
+ SAL_DLLPRIVATE BOOL SaveAll_Impl(BOOL bPrompt = FALSE, BOOL bAutoSave = FALSE);
+ SAL_DLLPRIVATE short QuerySave_Impl(SfxObjectShell &, BOOL bAutoSave = FALSE);
+ SAL_DLLPRIVATE void InitializeDisplayName_Impl();
+//#endif
+
+ static SfxApplication* Create();
+ void Init();
+ void Exit();
+ void SettingsChange( USHORT, const AppSettings & );
+ void Main( );
+ void PreInit( );
+ void Quit();
+ void Deinitialize();
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SFX_INTERFACE_SFXAPP)
+
+ SfxApplication();
+ ~SfxApplication();
+ static SfxApplication* GetOrCreate();
+
+ // Resource Manager
+ bool InitLabelResMgr( const char* _pLabelPrefix, bool _bException = false );
+ SfxResourceManager& GetResourceManager() const;
+ ResMgr* GetSfxResManager();
+ SimpleResMgr* GetSimpleResManager();
+ ResMgr* GetLabelResManager() const;
+ static ResMgr* CreateResManager( const char *pPrefix );
+ SimpleResMgr* CreateSimpleResManager();
+
+ // DDE
+ long DdeExecute( const String& rCmd );
+ long DdeGetData( const String& rItem,
+ const String& rMimeType,
+ ::com::sun::star::uno::Any & rValue );
+ long DdeSetData( const String& rItem,
+ const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+ ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem );
+ BOOL InitializeDde();
+ const DdeService* GetDdeService() const;
+ DdeService* GetDdeService();
+ void AddDdeTopic( SfxObjectShell* );
+ void RemoveDdeTopic( SfxObjectShell* );
+
+ // "static" methods
+ ULONG LoadTemplate( SfxObjectShellLock& xDoc, const String& rFileName, BOOL bCopy=TRUE, SfxItemSet* pArgs = 0 );
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > GetStatusIndicator() const;
+ SfxTemplateDialog* GetTemplateDialog();
+ Window* GetTopWindow() const;
+
+ // TODO/CLEANUP: make currently selected family a view property and so we don't need to query the status from the "TemplateCommon"
+ ISfxTemplateCommon* GetCurrentTemplateCommon( SfxBindings& );
+
+ // members
+ SfxFilterMatcher& GetFilterMatcher();
+ SfxMacroConfig* GetMacroConfig() const;
+ SfxProgress* GetProgress() const;
+ const String& GetLastSaveDirectory() const;
+ USHORT GetFreeIndex();
+ void ReleaseIndex(USHORT i);
+ SfxEventConfiguration* GetEventConfig() const;
+
+ // Basic/Scripting
+ static sal_Bool IsXScriptURL( const String& rScriptURL );
+ static ::rtl::OUString ChooseScript();
+ static void MacroOrganizer( INT16 nTabId );
+ BasicManager* GetBasicManager();
+ com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer >
+ GetDialogContainer();
+ com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer >
+ GetBasicContainer();
+ StarBASIC* GetBasic();
+ USHORT SaveBasicManager() const;
+ USHORT SaveBasicAndDialogContainer() const;
+ void EnterBasicCall();
+ FASTBOOL IsInBasicCall() const;
+ void LeaveBasicCall();
+ void RegisterBasicConstants( const char *pPrefix,
+ const SfxConstant *pConsts,
+ USHORT nCount );
+
+ // misc.
+ BOOL GetOptions(SfxItemSet &);
+ void SetOptions(const SfxItemSet &);
+ virtual void Invalidate(USHORT nId = 0);
+ void NotifyEvent(const SfxEventHint& rEvent, FASTBOOL bSynchron = TRUE );
+ BOOL IsDowning() const;
+ BOOL IsSecureURL( const INetURLObject &rURL, const String *pReferer ) const;
+ static SfxObjectShellRef DocAlreadyLoaded( const String &rName,
+ BOOL bSilent,
+ BOOL bActivate,
+ BOOL bForbidVisible = FALSE,
+ const String* pPostStr = 0);
+ void ResetLastDir();
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE static SfxApplication* Is_Impl() { return pApp;}
+ SAL_DLLPRIVATE SfxDispatcher* GetAppDispatcher_Impl();
+ SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
+
+ SAL_DLLPRIVATE BOOL QueryExit_Impl();
+ SAL_DLLPRIVATE void SetOptions_Impl(const SfxItemSet &);
+ SAL_DLLPRIVATE FASTBOOL Initialize_Impl();
+
+ SAL_DLLPRIVATE SfxAppData_Impl* Get_Impl() const { return pAppData_Impl; }
+
+ // Object-Factories/global arrays
+ SAL_DLLPRIVATE void RegisterChildWindow_Impl(SfxModule*, SfxChildWinFactory*);
+ SAL_DLLPRIVATE void RegisterChildWindowContext_Impl(SfxModule*, USHORT, SfxChildWinContextFactory*);
+ SAL_DLLPRIVATE void RegisterStatusBarControl_Impl(SfxModule*, SfxStbCtrlFactory*);
+ SAL_DLLPRIVATE void RegisterMenuControl_Impl(SfxModule*, SfxMenuCtrlFactory*);
+ SAL_DLLPRIVATE void RegisterToolBoxControl_Impl( SfxModule*, SfxTbxCtrlFactory*);
+ SAL_DLLPRIVATE SfxTbxCtrlFactArr_Impl& GetTbxCtrlFactories_Impl() const;
+ SAL_DLLPRIVATE SfxStbCtrlFactArr_Impl& GetStbCtrlFactories_Impl() const;
+ SAL_DLLPRIVATE SfxMenuCtrlFactArr_Impl& GetMenuCtrlFactories_Impl() const;
+ SAL_DLLPRIVATE SfxChildWinFactArr_Impl& GetChildWinFactories_Impl() const;
+ SAL_DLLPRIVATE SfxViewFrameArr_Impl& GetViewFrames_Impl() const;
+ SAL_DLLPRIVATE SfxViewShellArr_Impl& GetViewShells_Impl() const;
+ SAL_DLLPRIVATE SfxObjectShellArr_Impl& GetObjectShells_Impl() const;
+ SAL_DLLPRIVATE void SetViewFrame_Impl(SfxViewFrame *pViewFrame);
+
+ // Slot Methods
+ // TODO/CLEANUP: still needed?
+ SAL_DLLPRIVATE void NewDocDirectExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void NewDocExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void OpenDocExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void MiscExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void MiscState_Impl(SfxItemSet &);
+ SAL_DLLPRIVATE void PropExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void PropState_Impl(SfxItemSet &);
+ SAL_DLLPRIVATE void MacroExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void MacroState_Impl(SfxItemSet &);
+ SAL_DLLPRIVATE void INetExecute_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &);
+ SAL_DLLPRIVATE void OfaExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void OfaState_Impl(SfxItemSet &);
+
+ SAL_DLLPRIVATE void SetProgress_Impl(SfxProgress *);
+ SAL_DLLPRIVATE const String& GetLastDir_Impl() const;
+ SAL_DLLPRIVATE void SetLastDir_Impl( const String & );
+ SAL_DLLPRIVATE void PlayMacro_Impl( SfxRequest &rReq, StarBASIC *pBas );
+
+ SAL_DLLPRIVATE void EnterAsynchronCall_Impl();
+ SAL_DLLPRIVATE FASTBOOL IsInAsynchronCall_Impl() const;
+ SAL_DLLPRIVATE void LeaveAsynchronCall_Impl();
+ SAL_DLLPRIVATE void Registrations_Impl();
+ SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl(const SfxViewFrame *pFrame=0) const;
+
+ // TODO/CLEANUP: still needed?
+ SAL_DLLPRIVATE SvUShorts* GetDisabledSlotList_Impl();
+ SAL_DLLPRIVATE SfxSlotPool& GetAppSlotPool_Impl() const;
+ SAL_DLLPRIVATE SfxModule* GetModule_Impl();
+ SAL_DLLPRIVATE ResMgr* GetOffResManager_Impl();
+//#endif
+
+ /** loads the application logo as used in the about dialog and impress slideshow pause screen */
+ static Image GetApplicationLogo();
+};
+
+#define SFX_APP() SfxGetpApp()
+
+//--------------------------------------------------------------------
+
+inline SfxApplication* SfxGetpApp()
+{
+ return SfxApplication::GetOrCreate();
+}
+
+#endif
+
+
diff --git a/sfx2/inc/sfx2/appuno.hxx b/sfx2/inc/sfx2/appuno.hxx
new file mode 100644
index 000000000000..8136caac2ad9
--- /dev/null
+++ b/sfx2/inc/sfx2/appuno.hxx
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * 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_APPUNO_HXX
+#define _SFX_APPUNO_HXX
+
+//____________________________________________________________________________________________________________________________________
+// generated header
+//____________________________________________________________________________________________________________________________________
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/registry/XSimpleRegistry.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/util/URL.hpp>
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XSynchronousDispatch.hpp>
+#include <com/sun/star/frame/XNotifyingDispatch.hpp>
+#include <com/sun/star/frame/XDispatchResultListener.hpp>
+#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+//____________________________________________________________________________________________________________________________________
+// fix uno header
+//____________________________________________________________________________________________________________________________________
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase4.hxx>
+
+//____________________________________________________________________________________________________________________________________
+// something else header
+//____________________________________________________________________________________________________________________________________
+#include <tools/errcode.hxx>
+#include <svl/svarray.hxx>
+#define _SVSTDARR_STRINGSDTOR
+#include <svl/svstdarr.hxx>
+#include <sfx2/sfxuno.hxx>
+
+//____________________________________________________________________________________________________________________________________
+// forwards
+//____________________________________________________________________________________________________________________________________
+
+//____________________________________________________________________________________________________________________________________
+// declarations
+//____________________________________________________________________________________________________________________________________
+class SfxObjectShell;
+class SfxMacroLoader : public ::com::sun::star::frame::XDispatchProvider,
+ public ::com::sun::star::frame::XNotifyingDispatch,
+ public ::com::sun::star::frame::XSynchronousDispatch,
+ public ::com::sun::star::lang::XTypeProvider,
+ public ::com::sun::star::lang::XServiceInfo,
+ public ::com::sun::star::lang::XInitialization,
+ public ::cppu::OWeakObject
+{
+ ::com::sun::star::uno::WeakReference < ::com::sun::star::frame::XFrame > m_xFrame;
+
+ SfxObjectShell* GetObjectShell_Impl();
+
+public:
+ // XInterface, XTypeProvider, XServiceInfo
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER_XSERVICEINFO
+
+ SfxMacroLoader( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& )
+ {}
+
+ static ErrCode loadMacro( const ::rtl::OUString& aURL, ::com::sun::star::uno::Any& rRetval, SfxObjectShell* pDoc=NULL ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatch > SAL_CALL
+ queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTargetFrameName,
+ FrameSearchFlags eSearchFlags ) throw( ::com::sun::star::uno::RuntimeException ) ;
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatch > > SAL_CALL
+ queryDispatches( const ::com::sun::star::uno::Sequence < ::com::sun::star::frame::DispatchDescriptor >& seqDescriptor )
+ throw( ::com::sun::star::uno::RuntimeException ) ;
+ virtual void SAL_CALL dispatchWithNotification( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArgs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchResultListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArgs ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL dispatchWithReturnValue( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArgs ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw (::com::sun::star::uno::RuntimeException);
+ virtual 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);
+};
+
+class SfxAppDispatchProvider : public ::cppu::WeakImplHelper4< ::com::sun::star::frame::XDispatchProvider,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::frame::XDispatchInformationProvider >
+{
+ ::com::sun::star::uno::WeakReference < ::com::sun::star::frame::XFrame > m_xFrame;
+public:
+ SfxAppDispatchProvider( const com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& )
+ {}
+
+ SFX_DECL_XSERVICEINFO
+ virtual ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatch > SAL_CALL
+ queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTargetFrameName,
+ FrameSearchFlags eSearchFlags ) throw( ::com::sun::star::uno::RuntimeException ) ;
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatch > > SAL_CALL
+ queryDispatches( const ::com::sun::star::uno::Sequence < ::com::sun::star::frame::DispatchDescriptor >& seqDescriptor )
+ throw( ::com::sun::star::uno::RuntimeException ) ;
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSupportedCommandGroups() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( sal_Int16 ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/basedlgs.hxx b/sfx2/inc/sfx2/basedlgs.hxx
new file mode 100644
index 000000000000..3508ea026637
--- /dev/null
+++ b/sfx2/inc/sfx2/basedlgs.hxx
@@ -0,0 +1,230 @@
+/*************************************************************************
+ *
+ * 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 _BASEDLGS_HXX
+#define _BASEDLGS_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#ifndef _FLOATWIN_HXX //autogen
+#include <vcl/floatwin.hxx>
+#endif
+#include <vcl/timer.hxx>
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+
+class TabPage;
+class SfxTabPage;
+class SfxBindings;
+class SfxChildWindow;
+struct SfxChildWinInfo;
+class SfxItemSet;
+class SfxItemPool;
+class OKButton;
+class CancelButton;
+class HelpButton;
+class Button;
+class FixedLine;
+
+// class SfxModalDefParentHelper -----------------------------------------
+
+class SfxModalDefParentHelper
+{
+private:
+ Window *pOld;
+
+public:
+ SfxModalDefParentHelper(Window* pWindow);
+ ~SfxModalDefParentHelper();
+};
+
+// class SfxModalDialog --------------------------------------------------
+
+class SFX2_DLLPUBLIC SfxModalDialog: public ModalDialog
+{
+ sal_uInt32 nUniqId;
+ String aExtraData;
+ Timer aTimer;
+ const SfxItemSet* pInputSet;
+ SfxItemSet* pOutputSet;
+
+private:
+ SAL_DLLPRIVATE SfxModalDialog(SfxModalDialog &); // not defined
+ SAL_DLLPRIVATE void operator =(SfxModalDialog &); // not defined
+
+ DECL_DLLPRIVATE_LINK( TimerHdl_Impl, Timer* );
+
+ SAL_DLLPRIVATE void SetDialogData_Impl();
+ SAL_DLLPRIVATE void GetDialogData_Impl();
+ SAL_DLLPRIVATE void init();
+
+protected:
+ SfxModalDialog(Window *pParent, const ResId& );
+ SfxModalDialog(Window* pParent, sal_uInt32 nUniqueId, WinBits nWinStyle = WB_STDMODAL );
+
+ String& GetExtraData() { return aExtraData; }
+ sal_uInt32 GetUniqId() const { return nUniqId; }
+ SfxItemSet* GetItemSet() { return pOutputSet; }
+ void CreateOutputItemSet( SfxItemPool& rPool );
+ void CreateOutputItemSet( const SfxItemSet& rInput );
+ void SetInputSet( const SfxItemSet* pInSet ) { pInputSet = pInSet; }
+ SfxItemSet* GetOutputSetImpl() { return pOutputSet; }
+
+public:
+ ~SfxModalDialog();
+ const SfxItemSet* GetOutputItemSet() const { return pOutputSet; }
+ const SfxItemSet* GetInputItemSet() const { return pInputSet; }
+};
+
+// class SfxModelessDialog --------------------------------------------------
+class SfxModelessDialog_Impl;
+class SFX2_DLLPUBLIC SfxModelessDialog: public ModelessDialog
+{
+ SfxBindings* pBindings;
+ Size aSize;
+ SfxModelessDialog_Impl* pImp;
+
+ SAL_DLLPRIVATE SfxModelessDialog(SfxModelessDialog &); // not defined
+ SAL_DLLPRIVATE void operator =(SfxModelessDialog &); // not defined
+
+protected:
+ SfxModelessDialog( SfxBindings*, SfxChildWindow*,
+ Window*, const ResId& );
+ SfxModelessDialog( SfxBindings*, SfxChildWindow*,
+ Window*, WinBits nWinStyle = WB_STDMODELESS );
+ ~SfxModelessDialog();
+ virtual BOOL Close();
+ virtual void Resize();
+ virtual void Move();
+ virtual void StateChanged( StateChangedType nStateChange );
+
+public:
+ virtual void FillInfo(SfxChildWinInfo&) const;
+ void Initialize (SfxChildWinInfo* pInfo);
+ virtual long Notify( NotifyEvent& rNEvt );
+ SfxBindings& GetBindings()
+ { return *pBindings; }
+
+ DECL_LINK( TimerHdl, Timer* );
+
+};
+
+// class SfxFloatingWindow --------------------------------------------------
+class SfxFloatingWindow_Impl;
+class SFX2_DLLPUBLIC SfxFloatingWindow: public FloatingWindow
+{
+ SfxBindings* pBindings;
+ Size aSize;
+ SfxFloatingWindow_Impl* pImp;
+
+ SAL_DLLPRIVATE SfxFloatingWindow(SfxFloatingWindow &); // not defined
+ SAL_DLLPRIVATE void operator =(SfxFloatingWindow &); // not defined
+
+protected:
+ SfxFloatingWindow( SfxBindings *pBindings,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ WinBits nWinBits=WB_STDMODELESS);
+ SfxFloatingWindow( SfxBindings *pBindings,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ const ResId& rResId);
+ ~SfxFloatingWindow();
+
+ virtual void StateChanged( StateChangedType nStateChange );
+ virtual BOOL Close();
+ virtual void Resize();
+ virtual void Move();
+ virtual long Notify( NotifyEvent& rNEvt );
+ SfxBindings& GetBindings()
+ { return *pBindings; }
+
+public:
+ virtual void FillInfo(SfxChildWinInfo&) const;
+ void Initialize (SfxChildWinInfo* pInfo);
+
+ DECL_LINK( TimerHdl, Timer* );
+
+};
+
+// class SfxSingleTabDialog --------------------------------------------------
+
+namespace svt { class FixedHyperlinkImage; }
+
+struct SingleTabDlgImpl
+{
+ TabPage* m_pTabPage;
+ SfxTabPage* m_pSfxPage;
+ FixedLine* m_pLine;
+ ::svt::FixedHyperlinkImage* m_pInfoImage;
+ String m_sInfoURL;
+ Link m_aInfoLink;
+
+ SingleTabDlgImpl() :
+ m_pTabPage( NULL ), m_pSfxPage( NULL ), m_pLine( NULL ), m_pInfoImage( NULL ) {}
+};
+
+typedef USHORT* (*GetTabPageRanges)(); // liefert internationale Which-Werte
+
+class SFX2_DLLPUBLIC SfxSingleTabDialog : public SfxModalDialog
+{
+public:
+ SfxSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, USHORT nUniqueId );
+ SfxSingleTabDialog( Window* pParent, USHORT nUniqueId, const SfxItemSet* pInSet = 0 );
+ SfxSingleTabDialog( Window* pParent, USHORT nUniqueId, const String& rInfoURL );
+
+ virtual ~SfxSingleTabDialog();
+
+ void SetPage( TabPage* pNewPage );
+ void SetTabPage( SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0 );
+ SfxTabPage* GetTabPage() const { return pImpl->m_pSfxPage; }
+
+ const USHORT* GetInputRanges( const SfxItemPool& rPool );
+// void SetInputSet( const SfxItemSet* pInSet ) { pOptions = pInSet; }
+// const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
+ OKButton* GetOKButton() const { return pOKBtn; }
+ CancelButton* GetCancelButton() const { return pCancelBtn; }
+ void SetInfoLink( const Link& rLink );
+
+private:
+ GetTabPageRanges fnGetRanges;
+ USHORT* pRanges;
+
+ OKButton* pOKBtn;
+ CancelButton* pCancelBtn;
+ HelpButton* pHelpBtn;
+
+ SingleTabDlgImpl* pImpl;
+// const SfxItemSet* pOptions;
+// SfxItemSet* pOutSet;
+
+ DECL_DLLPRIVATE_LINK( OKHdl_Impl, Button * );
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/bindings.hxx b/sfx2/inc/sfx2/bindings.hxx
new file mode 100644
index 000000000000..e568fe7305f0
--- /dev/null
+++ b/sfx2/inc/sfx2/bindings.hxx
@@ -0,0 +1,262 @@
+/*************************************************************************
+ *
+ * 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_BINDINGS_HXX
+#define _SFX_BINDINGS_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
+
+//________________________________________________________________________________________________________________
+// some other includes
+//________________________________________________________________________________________________________________
+
+#include <sfx2/minarray.hxx>
+#include <sfx2/viewfrm.hxx>
+
+//________________________________________________________________________________________________________________
+// forwards, typedefs, declarations
+//________________________________________________________________________________________________________________
+
+class SfxConfigManager;
+class SystemWindow;
+class SfxArg;
+class SfxSlot;
+class SfxSlotServer;
+class SfxControllerItem;
+class SfxStateCache;
+class SfxItemSet;
+class SfxDispatcher;
+class SfxBindings;
+class SfxBindings_Impl;
+class Timer;
+struct SfxFoundCache_Impl;
+class SfxFoundCacheArr_Impl;
+class SfxWorkWindow;
+class SfxUnoControllerItem;
+typedef SfxUnoControllerItem* SfxUnoControllerItemPtr;
+SV_DECL_PTRARR( SfxUnoControllerArr_Impl, SfxUnoControllerItemPtr, 20, 20 )
+
+//________________________________________________________________________________________________________________
+// defines
+//________________________________________________________________________________________________________________
+
+#define SFX_CALLMODE_SLOT 0x00 // sync/async vom Slot
+#define SFX_CALLMODE_SYNCHRON 0x01 // synchron im selben Stackframe
+#define SFX_CALLMODE_ASYNCHRON 0x02 // asynchron per AppEvent
+#define SFX_CALLMODE_RECORD 0x04 // beim Recorden ber"ucksichtigen
+#define SFX_CALLMODE_API 0x08 // Call von der API (silent)
+#define SFX_CALLMODE_MODAL 0x10 // trotz ModalMode
+
+#define SFX_CALLMODE_STANDARD SFX_CALLMODE_RECORD
+typedef sal_uInt16 SfxCallMode;
+
+enum SfxPopupAction
+{
+ SFX_POPUP_DELETE,
+ SFX_POPUP_HIDE,
+ SFX_POPUP_SHOW
+};
+
+//====================================================================
+class SFX2_DLLPUBLIC SfxBindings: public SfxBroadcaster
+
+/* [Beschreibung]
+
+ In jeder SFx-Applikation existiert "uber die Laufzeit von vor
+ <SfxApplication::Init()> bis nach <SfxApplication::Exit()> eine Instanz
+ der Klasse SfxBindings. Sie wird von der SfxApplication automatisch
+ angelegt und zerst"ort. Instanzen werden aber i.d.R. "uber das
+ Makro <SFX_BINDINGS> oder den zugeh"origen <SfxViewFrame> besorgt
+ werden.
+
+ Die SfxBindings verwalten alle in den an ihr angemeldeten Controllern
+ gebundenen Slot-Ids und cachen die jeweiligen <Slot-Server>
+ (so nenne wir die Kombination aus SfxShell-Instanz und SfxSlot).
+ In den SfxBindings ist gespeichert, ob und welche Controller dirty
+ sind sowie welche Slot-Server-Caches jeweils dirty sind. Sie fa"st
+ Status-Anfragen (Aufrufe der in der IDL genannten Status-Methoden)
+ zusammen, die von derselben Status-Methode bedient werden, und sorgt
+ f"ur die Simulation der <Pseudo-Slots>.
+*/
+
+{
+friend class SfxApplication;
+friend class SfxShell;
+friend class SfxBindings_Impl;
+
+ SfxBindings_Impl*pImp; // Daten der Bindings-Instanz
+ SfxDispatcher* pDispatcher; // zu verwendender Dispatcher
+ sal_uInt16 nRegLevel; // Lock-Level waehrend Reconfig
+
+//#if 0 // _SOLAR__PRIVATE
+private:
+ SAL_DLLPRIVATE const SfxPoolItem* Execute_Impl( sal_uInt16 nSlot, const SfxPoolItem **pArgs, sal_uInt16 nModi,
+ SfxCallMode nCall, const SfxPoolItem **pInternalArgs, BOOL bGlobalOnly=FALSE);
+ SAL_DLLPRIVATE void SetSubBindings_Impl( SfxBindings* );
+ SAL_DLLPRIVATE void UpdateSlotServer_Impl(); // SlotServer aktualisieren
+ SAL_DLLPRIVATE SfxItemSet* CreateSet_Impl( SfxStateCache* &pCache,
+ const SfxSlot* &pRealSlot,
+ const SfxSlotServer**,
+ SfxFoundCacheArr_Impl& );
+ SAL_DLLPRIVATE sal_uInt16 GetSlotPos( sal_uInt16 nId, sal_uInt16 nStartSearchAt = 0 );
+ SAL_DLLPRIVATE void Update_Impl( SfxStateCache* pCache );
+ SAL_DLLPRIVATE void UpdateControllers_Impl(
+ const SfxInterface* pIF,
+ const SfxFoundCache_Impl* pFound,
+ const SfxPoolItem *pItem,
+ SfxItemState eItemState );
+ DECL_DLLPRIVATE_LINK( NextJob_Impl, Timer * );
+//#endif
+
+public:
+ SfxBindings();
+ ~SfxBindings();
+
+ void HidePopups( bool bHide = true );
+ SAL_DLLPRIVATE void HidePopupCtrls_Impl( FASTBOOL bHide = sal_True );
+
+ void SetDispatcher(SfxDispatcher *pDisp);
+
+ void Update( sal_uInt16 nId ); // z.B. aus Menu::Activate
+ void Update();
+ SAL_DLLPRIVATE void StartUpdate_Impl(sal_Bool bComplete=sal_False);
+ void Invalidate( sal_uInt16 nId );
+ void Invalidate( const sal_uInt16* pIds );
+ void InvalidateShell( const SfxShell &rSh, sal_Bool bDeep = sal_False );
+ void InvalidateAll( sal_Bool bWithMsg );
+ void SetState( const SfxItemSet &rSet );
+ void SetState( const SfxPoolItem &rItem );
+ void Invalidate( sal_uInt16 nId, sal_Bool bWithItem, sal_Bool bWithMsg=sal_False);
+ void Invalidate( sal_uInt16 nId, sal_Bool bWithMsg);
+ sal_Bool IsInUpdate() const;
+ void SetVisibleState( sal_uInt16 nId, sal_Bool bShow );
+
+ sal_Bool IsBound( sal_uInt16 nMsgId, sal_uInt16 nStartSearchAt = 0 );
+
+ const SfxSlot* GetSlot( sal_uInt16 nMsgId );
+ SfxStateCache* GetStateCache( sal_uInt16 nId, sal_uInt16 *pPos = 0 );
+ SAL_DLLPRIVATE SfxStateCache* GetAnyStateCache_Impl( sal_uInt16 nId );
+ SfxItemState QueryState( sal_uInt16 nSID, SfxPoolItem* &rpState );
+
+ const SfxPoolItem* ExecuteSynchron( sal_uInt16 nSlot,
+ const SfxPoolItem **pArgs = 0,
+ sal_uInt16 nModi = 0,
+ const SfxPoolItem **pInternalArgs = 0);
+ sal_Bool Execute( sal_uInt16 nSlot,
+ const SfxPoolItem **pArgs = 0,
+ sal_uInt16 nModi = 0,
+ SfxCallMode nCall = SFX_CALLMODE_SLOT,
+ const SfxPoolItem **pInternalArgs = 0);
+
+ SAL_DLLPRIVATE void SetDispatchProvider_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & rFrame );
+ SAL_DLLPRIVATE const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & GetDispatchProvider_Impl() const;
+ void SetActiveFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & rFrame );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetActiveFrame() const;
+ // Reconfig
+ int IsInRegistrations() const;
+ sal_uInt16 EnterRegistrations(const char *pFile = 0, int nLine = 0);
+ void LeaveRegistrations( sal_uInt16 nLevel = USHRT_MAX, const char *pFile = 0, int nLine = 0 );
+ void Register( SfxControllerItem& rBinding );
+ void Release( SfxControllerItem& rBinding );
+ SystemWindow* GetSystemWindow() const;
+ SfxDispatcher* GetDispatcher() const
+ { return pDispatcher; }
+ com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > GetRecorder() const;
+ com::sun::star::uno::Reference < com::sun::star::frame::XDispatch >
+ GetDispatch( const SfxSlot*, const com::sun::star::util::URL& aURL, sal_Bool bMasterCommand );
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE void ContextChanged_Impl();
+ SAL_DLLPRIVATE void Execute_Impl( SfxRequest& rReq, const SfxSlot* pSlot, SfxShell* pShell );
+ SAL_DLLPRIVATE void DeleteControllers_Impl();
+ SAL_DLLPRIVATE SfxPopupAction GetPopupAction_Impl() const;
+ SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl() { return pDispatcher; }
+ SAL_DLLPRIVATE void ClearCache_Impl( sal_uInt16 nSlotId );
+ SAL_DLLPRIVATE sal_Bool IsInUpdate_Impl() const{ return IsInUpdate(); }
+ SAL_DLLPRIVATE void RegisterInternal_Impl( SfxControllerItem& rBinding );
+ SAL_DLLPRIVATE void Register_Impl( SfxControllerItem& rBinding, BOOL );
+ SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl() const;
+ SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* );
+ SAL_DLLPRIVATE SfxBindings* GetSubBindings_Impl( sal_Bool bTop = sal_False ) const;
+ SAL_DLLPRIVATE void InvalidateUnoControllers_Impl();
+ SAL_DLLPRIVATE void RegisterUnoController_Impl( SfxUnoControllerItem* );
+ SAL_DLLPRIVATE void ReleaseUnoController_Impl( SfxUnoControllerItem* );
+ SAL_DLLPRIVATE BOOL ExecuteCommand_Impl( const String& rCommand );
+ SAL_DLLPRIVATE void SetRecorder_Impl( com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder >& );
+ SAL_DLLPRIVATE void ExecuteGlobal_Impl( USHORT nId );
+ SAL_DLLPRIVATE void InvalidateSlotsInMap_Impl();
+ SAL_DLLPRIVATE void AddSlotToInvalidateSlotsMap_Impl( USHORT nId );
+//#endif
+};
+
+#ifdef DBG_UTIL
+#define ENTERREGISTRATIONS() EnterRegistrations(__FILE__, __LINE__)
+#define LEAVEREGISTRATIONS() LeaveRegistrations(USHRT_MAX, __FILE__, __LINE__)
+#define DENTERREGISTRATIONS( ) \
+ EnterRegistrations( (ByteString(__FILE__).Append('(').Append(ByteString::CreateFromInt64((sal_uIntPtr)this).Append(')'))).GetBufferAccess(), __LINE__ )
+#define DLEAVEREGISTRATIONS( ) \
+ LeaveRegistrations( USHRT_MAX, (ByteString(__FILE__).Append('(').Append(ByteString::CreateFromInt64((sal_uIntPtr)this).Append(')'))).GetBufferAccess(), __LINE__ )
+#else
+#define ENTERREGISTRATIONS() EnterRegistrations()
+#define LEAVEREGISTRATIONS() LeaveRegistrations()
+#define DENTERREGISTRATIONS( ) EnterRegistrations()
+#define DLEAVEREGISTRATIONS( ) LeaveRegistrations()
+#endif
+
+//--------------------------------------------------------------------
+
+inline int SfxBindings::IsInRegistrations() const
+
+/* [Beschreibung]
+
+ Stellt fest, ob an der SfxBindings Instanz gerade <SfxContollerItems>
+ an- oder abgemeldet werden, also noch <SfxBindings::EnterRegistrations()>
+ Aufrufe nicht mit <SfxBindings::EnterRegistrations()> geschlo"sen wurden.
+
+ [R"uckgabewert]
+
+ int sal_True
+ Die SfxBindings Instanz ist gerade im Registrierungs-
+ Modus. Es erfolgen also keine Status-Updates.
+
+ sal_False
+ Die SfxBindings Instanz ist gerade im normalen
+ Modus. Es k"oennen also Status-Updates erfolgen.
+*/
+
+{
+ return 0 != nRegLevel;
+}
+
+//--------------------------------------------------------------------
+
+#endif
+
diff --git a/sfx2/inc/sfx2/chalign.hxx b/sfx2/inc/sfx2/chalign.hxx
new file mode 100644
index 000000000000..37df69d08ca6
--- /dev/null
+++ b/sfx2/inc/sfx2/chalign.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * 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_CHILDALIGN_HXX
+#define _SFX_CHILDALIGN_HXX
+
+#include <tools/solar.h>
+
+// Neue Reihenfolge: zuerst Navigationsleiste, dann senkrecht angedockte
+// ChildWindows (Explorer!), dann horizontal angedockte ChildWindows (Browser!),
+// dann die Formatleiste, die Statuszeile, am Ende die Werkzeugleiste.
+
+enum SfxChildAlignment
+{
+ SFX_ALIGN_HIGHESTTOP, // z.B. Navigationsleiste
+ SFX_ALIGN_LOWESTBOTTOM,
+ SFX_ALIGN_FIRSTLEFT,
+ SFX_ALIGN_LASTRIGHT,
+ SFX_ALIGN_LEFT, // z.B. SplitWindow
+ SFX_ALIGN_RIGHT,
+ SFX_ALIGN_LASTLEFT,
+ SFX_ALIGN_FIRSTRIGHT,
+ SFX_ALIGN_TOP, // z.B. Hyperlink-Builder, SplitWindow
+ SFX_ALIGN_BOTTOM, // z.B. SplitWindow
+ SFX_ALIGN_TOOLBOXTOP, // z.B. Objektleiste
+ SFX_ALIGN_TOOLBOXBOTTOM,
+ SFX_ALIGN_LOWESTTOP, // z.B. Calc-Rechenleiste
+ SFX_ALIGN_HIGHESTBOTTOM, // z.B. Statusleiste
+ SFX_ALIGN_TOOLBOXLEFT, // z.B. Werkzeugleiste
+ SFX_ALIGN_TOOLBOXRIGHT,
+ SFX_ALIGN_NOALIGNMENT // alle FloatingWindows
+};
+
+// "Uberpr"uft, ob ein g"ultiges Alignment verwendet wird
+inline BOOL SfxChildAlignValid( SfxChildAlignment eAlign )
+{
+ return ( eAlign >= SFX_ALIGN_HIGHESTTOP && eAlign <= SFX_ALIGN_NOALIGNMENT );
+}
+
+#endif
diff --git a/sfx2/inc/sfx2/childwin.hxx b/sfx2/inc/sfx2/childwin.hxx
new file mode 100644
index 000000000000..cac0b72f13cf
--- /dev/null
+++ b/sfx2/inc/sfx2/childwin.hxx
@@ -0,0 +1,369 @@
+/*************************************************************************
+ *
+ * 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_CHILDWIN_HXX
+#define _SFX_CHILDWIN_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <vcl/window.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+
+#ifdef ENABLE_INIMANAGER//MUSTINI
+#include "inimgr.hxx"
+#endif
+#include <sfx2/shell.hxx>
+#include <sfx2/chalign.hxx>
+
+class SfxWorkWindow;
+class SfxModule;
+class SfxBindings;
+class SfxShell;
+class SfxChildWindow;
+class SfxChildWindowContext;
+class SfxChildWinContextArr_Impl;
+
+//ASDBG #ifndef _XFRAME_REF
+//ASDBG #define _XFRAME_REF
+//ASDBG USR_DECLIMPL_REF( ::com::sun::star::frame::XFrame, ::com::sun::star::uno::XInterface );
+//ASDBG #endif
+
+#define SFX_CHILDWIN_ZOOMIN 0x01 // ganz eingeklapptes Float
+#define SFX_CHILDWIN_SMALL 0x02 // halb eingeklapptes Float
+#define SFX_CHILDWIN_FORCEDOCK 0x04 // Float verboten
+#define SFX_CHILDWIN_AUTOHIDE 0x08 // DockingWindow im AutoHide-Modus
+#define SFX_CHILDWIN_TASK 0x10 // ChildWindow innerhalb der Task
+#define SFX_CHILDWIN_CANTGETFOCUS 0x20 // ChildWindow kann keinen Focus bekommen
+#define SFX_CHILDWIN_ALWAYSAVAILABLE 0x40 // ChildWindow is never disabled
+#define SFX_CHILDWIN_NEVERHIDE 0x80 // ChildWindow is can always made visible/is visible
+#define CHILDWIN_NOPOS USHRT_MAX
+
+// Konfiguration eines ChildWindows
+struct SfxChildWinInfo
+{
+ sal_Bool bVisible;
+ Point aPos;
+ Size aSize;
+ sal_uInt16 nFlags;
+ String aExtraString;
+ ByteString aWinState;
+
+ SfxChildWinInfo()
+ {
+ bVisible = sal_False;
+ nFlags = 0;
+ }
+//#if 0 // _SOLAR__PRIVATE
+ sal_Bool GetExtraData_Impl( SfxChildAlignment *pAlign,
+ SfxChildAlignment *pLastAlign = 0,
+ Size *pSize = 0,
+ sal_uInt16 *pLine = 0,
+ sal_uInt16 *pPos = 0 ) const;
+//#endif
+};
+
+// Factory-Methode eines ChildWindows
+typedef SfxChildWindow* (*SfxChildWinCtor)( Window *pParentWindow,
+ sal_uInt16 nId,
+ SfxBindings *pBindings,
+ SfxChildWinInfo *pInfo);
+
+// Factory-Methode eines ChildWindowsContexts
+typedef SfxChildWindowContext* (*SfxChildWinContextCtor)( Window *pParentWindow,
+ SfxBindings *pBindings,
+ SfxChildWinInfo *pInfo);
+struct SfxChildWinContextFactory
+{
+ SfxChildWinContextCtor pCtor; // Factory-Methode
+ sal_uInt16 nContextId; // Identifier f"ur das SfxInterface
+ SfxChildWinInfo aInfo; // Konfiguration
+
+ SfxChildWinContextFactory( SfxChildWinContextCtor pTheCtor, sal_uInt16 nID )
+ : pCtor(pTheCtor)
+ , nContextId(nID)
+ {}
+};
+
+SV_DECL_PTRARR_DEL( SfxChildWinContextArr_Impl, SfxChildWinContextFactory*, 2, 2 )
+
+struct SfxChildWinFactory
+{
+ SfxChildWinCtor pCtor; // Factory-Methode
+ sal_uInt16 nId; // ChildWindow-Id ( SlotId )
+ SfxChildWinInfo aInfo; // Konfiguration
+ sal_uInt16 nPos; // ggf. Position im UI
+ SfxChildWinContextArr_Impl *pArr; // Array f"ur Contexte
+
+ SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID,
+ sal_uInt16 n )
+ : pCtor(pTheCtor)
+ , nId( nID )
+ , nPos(n)
+ , pArr( NULL )
+ {}
+
+//#if 0 // _SOLAR__PRIVATE
+ ~SfxChildWinFactory()
+ {
+ delete pArr;
+ }
+//#else
+ // Der WIN16-Compiler versucht dort zu "ubersetzen, wo dieser Header
+ // included wird, und kann dann nat"urlich nicht linken, wenn inline ...
+// ~SfxChildWinFactory();
+//#endif
+};
+
+class FloatingWindow;
+struct SfxChildWindow_Impl;
+class SFX2_DLLPUBLIC SfxChildWindowContext
+{
+friend class SfxChildWindow;
+ Window* pWindow;
+ sal_uInt16 nContextId;
+
+protected:
+ SfxChildWindowContext( sal_uInt16 nId );
+
+public:
+ virtual ~SfxChildWindowContext();
+
+ void SetWindow( Window* pWin )
+ { pWindow=pWin; }
+ Window* GetWindow() const
+ { return pWindow; }
+ sal_uInt16 GetContextId() const
+ { return nContextId; }
+
+ FloatingWindow* GetFloatingWindow() const;
+ SfxChildAlignment GetAlignment() const;
+
+ virtual void Resizing( Size& rSize );
+ virtual sal_Bool Close();
+ static void RegisterChildWindowContext(SfxModule*, USHORT, SfxChildWinContextFactory*);
+};
+
+class SFX2_DLLPUBLIC SfxChildWindow
+{
+ Window* pParent; // parent window ( Topwindow )
+ sal_uInt16 nType; // ChildWindow-Id
+
+protected:
+ SfxChildAlignment eChildAlignment;// aktuelles ::com::sun::star::drawing::Alignment
+ Window* pWindow; // eigentlicher Inhalt
+ SfxChildWindow_Impl* pImp; // Imp-Daten
+
+private:
+ SfxChildWindowContext* pContext; // bei kontextsensitiven ChildWindows:
+ // weiteres window in pWindow
+ SAL_DLLPRIVATE SfxChildWindowContext*
+ GetContext() const
+ { return pContext; }
+
+protected:
+ SfxChildWindow(Window *pParentWindow, sal_uInt16 nId);
+
+public:
+ virtual ~SfxChildWindow();
+ void Destroy();
+ Window* GetWindow() const
+ { return pWindow; }
+ Window* GetParent() const
+ { return pParent; }
+ SfxChildAlignment GetAlignment() const
+ { return eChildAlignment; }
+ void SetAlignment(SfxChildAlignment eAlign);
+ Size GetSizePixel() const
+ { return pWindow->GetSizePixel(); }
+ void SetPosSizePixel(const Point& rPoint, Size& rSize);
+ Point GetPosPixel()
+ { return pWindow->GetPosPixel(); }
+//<!--Modified by PengYunQuan for Validity Cell Range Picker
+ virtual void Hide();
+ virtual void Show( USHORT nFlags );
+//-->Modified by PengYunQuan for Validity Cell Range Picker
+ sal_uInt16 GetFlags() const
+ { return GetInfo().nFlags; }
+ sal_Bool CanGetFocus() const;
+ sal_uInt16 GetPosition();
+ sal_uInt16 GetType()
+ { return nType; }
+
+ void CreateContext( sal_uInt16 nContextId, SfxBindings& );
+ sal_uInt16 GetContextId() const
+ { return pContext ? pContext->GetContextId(): 0; }
+
+ Window* GetContextWindow() const
+ { return pContext ? pContext->GetWindow(): 0; }
+
+ Window* GetContextWindow( SfxModule *pModule ) const;
+
+ virtual SfxChildWinInfo GetInfo() const;
+ void SaveStatus(const SfxChildWinInfo& rInfo);
+
+ static void RegisterChildWindow(SfxModule*, SfxChildWinFactory*);
+
+ static SfxChildWindow* CreateChildWindow( sal_uInt16, Window*, SfxBindings*, SfxChildWinInfo&);
+ void SetHideNotDelete( sal_Bool bOn );
+ sal_Bool IsHideNotDelete() const;
+ void SetHideAtToggle( sal_Bool bOn );
+ sal_Bool IsHideAtToggle() const;
+ sal_Bool IsVisible() const;
+ void SetWantsFocus( BOOL );
+ sal_Bool WantsFocus() const;
+
+ virtual sal_Bool QueryClose();
+ virtual com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetFrame();
+ void SetFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & );
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE static void InitializeChildWinFactory_Impl(sal_uInt16, SfxChildWinInfo&);
+ SAL_DLLPRIVATE void SetVisible_Impl( sal_Bool bVis );
+ SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* );
+ //SfxWorkWindow* GetWorkWindow_Impl() const;
+ SAL_DLLPRIVATE void Activate_Impl();
+ SAL_DLLPRIVATE void Deactivate_Impl();
+
+ SAL_DLLPRIVATE SfxChildWindowContext*
+ GetContext_Impl() const
+ { return pContext; }
+ SAL_DLLPRIVATE void SetFactory_Impl( SfxChildWinFactory* );
+//#endif
+};
+
+//------------------------------------------------------------------
+//! demn"achst hinf"allig !
+#define SFX_DECL_CHILDWINDOW_CONTEXT(Class) \
+ static SfxChildWindowContext* CreateImpl(Window *pParent, \
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
+ static void RegisterChildWindowContext(SfxModule *pMod=0); \
+
+//! Das Macro der Zukunft ...
+#define SFX_DECL_CHILDWINDOWCONTEXT(Class) \
+ static SfxChildWindowContext* CreateImpl(Window *pParent, \
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
+ static void RegisterChildWindowContext(sal_uInt16, SfxModule *pMod=0); \
+
+//! demn"achst hinf"allig !
+#define SFX_IMPL_CHILDWINDOW_CONTEXT(Class, MyID, ShellClass) \
+ SfxChildWindowContext* __EXPORT Class::CreateImpl( Window *pParent, \
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
+ { \
+ SfxChildWindowContext *pContext = new Class(pParent, \
+ /* cast is safe here! */static_cast< USHORT >(ShellClass::GetInterfaceId()), \
+ pBindings,pInfo); \
+ return pContext; \
+ } \
+ void Class::RegisterChildWindowContext(SfxModule* pMod) \
+ { \
+ SfxChildWinContextFactory *pFact = new SfxChildWinContextFactory( \
+ Class::CreateImpl, \
+ /* cast is safe here! */static_cast< sal_uInt16 >(ShellClass::GetInterfaceId()) ); \
+ SfxChildWindowContext::RegisterChildWindowContext(pMod, MyID, pFact); \
+ }
+
+//! Das Macro der Zukunft ...
+// CreateImpl mu\s noch als Parameter die Factory mitbekommen wg. ContextId
+// Solange wird diese Id auf 0 gesetzt und in SfxChildWindow::CreateContext gepatched
+#define SFX_IMPL_CHILDWINDOWCONTEXT(Class, MyID) \
+ SfxChildWindowContext* __EXPORT Class::CreateImpl( Window *pParent, \
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
+ { \
+ SfxChildWindowContext *pContext = new Class(pParent,0,pBindings,pInfo);\
+ return pContext; \
+ } \
+ void Class::RegisterChildWindowContext(sal_uInt16 nId, SfxModule* pMod) \
+ { \
+ SfxChildWinContextFactory *pFact = new SfxChildWinContextFactory( \
+ Class::CreateImpl, nId ); \
+ SfxChildWindowContext::RegisterChildWindowContext(pMod, MyID, pFact); \
+ }
+
+#define SFX_DECL_CHILDWINDOW(Class) \
+ public : \
+ static SfxChildWindow* CreateImpl(Window *pParent, sal_uInt16 nId, \
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
+ static void RegisterChildWindow (sal_Bool bVisible=sal_False, SfxModule *pMod=NULL, sal_uInt16 nFlags=0); \
+ static sal_uInt16 GetChildWindowId ();\
+ virtual SfxChildWinInfo GetInfo() const
+
+#define SFX_IMPL_CHILDWINDOW(Class, MyID) \
+ SFX_IMPL_POS_CHILDWINDOW(Class, MyID, CHILDWIN_NOPOS)
+
+#define SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \
+ SfxChildWindow* __EXPORT Class::CreateImpl( Window *pParent, \
+ sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
+ { \
+ SfxChildWindow *pWin = new Class(pParent, nId, pBindings, pInfo);\
+ return pWin; \
+ } \
+ sal_uInt16 __EXPORT Class::GetChildWindowId () \
+ { return MyID; } \
+ void Class::RegisterChildWindow (sal_Bool bVis, SfxModule *pMod, sal_uInt16 nFlags) \
+ { \
+ SfxChildWinFactory *pFact = new SfxChildWinFactory( \
+ Class::CreateImpl, MyID, Pos ); \
+ pFact->aInfo.nFlags |= nFlags; \
+ pFact->aInfo.bVisible = bVis; \
+ SfxChildWindow::RegisterChildWindow(pMod, pFact); \
+ }
+
+#define SFX_IMPL_FLOATINGWINDOW(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW(Class, MyID) \
+ SfxChildWinInfo __EXPORT Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ ((SfxFloatingWindow*)GetWindow())->FillInfo( aInfo ); \
+ return aInfo; }
+
+#define SFX_IMPL_MODELESSDIALOG(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW(Class, MyID) \
+ SfxChildWinInfo __EXPORT Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ ((SfxModelessDialog*)GetWindow())->FillInfo( aInfo ); \
+ return aInfo; }
+
+#define SFX_IMPL_DOCKINGWINDOW(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW(Class, MyID) \
+ SfxChildWinInfo __EXPORT Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ ((SfxDockingWindow*)GetWindow())->FillInfo( aInfo ); \
+ return aInfo; }
+
+#define SFX_IMPL_TOOLBOX(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW(Class, MyID) \
+ SfxChildWinInfo __EXPORT Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ ((SfxToolbox*)GetWindow())->FillInfo( aInfo ); \
+ return aInfo; }
+
+//------------------------------------------------------------------
+
+#endif
diff --git a/sfx2/inc/sfx2/cntids.hrc b/sfx2/inc/sfx2/cntids.hrc
new file mode 100644
index 000000000000..ef652981f76d
--- /dev/null
+++ b/sfx2/inc/sfx2/cntids.hrc
@@ -0,0 +1,428 @@
+/*************************************************************************
+ *
+ * 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 _CNTIDS_HRC
+#define _CNTIDS_HRC
+
+#ifndef _CNTWIDS_HRC
+#include <svl/cntwids.hrc>
+#endif
+
+#ifndef _SOLAR_HRC
+#include <svl/solar.hrc>
+#endif
+
+// Slot-ID's -----------------------------------------------------------------
+
+#ifndef SID_SFX_START
+// HACK() - SID's duerfen nicht o.w. ihren numerischen Wert aendern,
+// sfxsids.hrc darf aber nicht included werden!!! Loesung: sfxsids.hrc
+// "tiefer legen" - z.B. svtools???
+#define SID_SFX_START 5000
+#endif
+#define SID_TITLE (SID_SFX_START + 307)
+#define SID_DELETE (SID_SFX_START + 713)
+#define SID_INTERNET_ONLINE (SID_SFX_START + 1370)
+
+// Don't let SID_CHAOS_END grow. Internal docking windows use the range between
+// SID_CHAOS_END and SID_LIB_START!! Look into sfxsids.hrc for more information!
+#define SID_CHAOS_START 9000
+#define SID_CHAOS_END 9799
+
+#define SID_BCC (SID_CHAOS_START + 2)
+#define SID_CC (SID_CHAOS_START + 3)
+#define SID_COMMENTS (SID_CHAOS_START + 4)
+#define SID_DATE (SID_CHAOS_START + 5)
+#define SID_IN_REPLY_TO (SID_CHAOS_START + 6)
+#define SID_KEYWORDS (SID_CHAOS_START + 7)
+#define SID_MESSAGE_ID (SID_CHAOS_START + 8)
+#define SID_RECEIVED (SID_CHAOS_START + 9)
+#define SID_REFERENCES (SID_CHAOS_START + 10)
+#define SID_RETURN_PATH (SID_CHAOS_START + 11)
+#define SID_SENDER (SID_CHAOS_START + 12)
+#define SID_TO (SID_CHAOS_START + 13)
+#define SID_NEWSGROUPS (SID_CHAOS_START + 14)
+#define SID_MAILER (SID_CHAOS_START + 15)
+#define SID_MIME_VERSION (SID_CHAOS_START + 16)
+#define SID_CONTENT_DESCRIPTION (SID_CHAOS_START + 17)
+#define SID_CONTENT_DISPOSITION (SID_CHAOS_START + 18)
+#define SID_CONTENT_ID (SID_CHAOS_START + 19)
+#define SID_CONTENT_TYPE (SID_CHAOS_START + 20)
+#define SID_IS_CONTAINER (SID_CHAOS_START + 21)
+#define SID_IS_MESSAGE (SID_CHAOS_START + 22)
+#define SID_IS_MULTIPART (SID_CHAOS_START + 23)
+#define SID_APPROVED (SID_CHAOS_START + 24)
+#define SID_CONTROL (SID_CHAOS_START + 25)
+#define SID_DISTRIBUTION (SID_CHAOS_START + 26)
+#define SID_EXPIRES (SID_CHAOS_START + 27)
+#define SID_FOLLOWUPTO (SID_CHAOS_START + 28)
+#define SID_LINES (SID_CHAOS_START + 29)
+#define SID_DOCUMENT_BYTESIZE (SID_CHAOS_START + 30)
+#define SID_MESSAGE_BYTESIZE (SID_CHAOS_START + 31)
+#define SID_ORGANIZATION (SID_CHAOS_START + 32)
+#define SID_SUMMARY (SID_CHAOS_START + 33)
+#define SID_XREF (SID_CHAOS_START + 34)
+#define SID_NEWSREADER (SID_CHAOS_START + 35)
+#define SID_SEND_DATETIME (SID_CHAOS_START + 36)
+#define SID_RETURN_RECEIPT (SID_CHAOS_START + 37)
+#define SID_PRIORITY (SID_CHAOS_START + 38)
+#define SID_SENT_TO (SID_CHAOS_START + 39)
+#define SID_RECEIVED_BY (SID_CHAOS_START + 40)
+#define SID_FLAG_DELETED (SID_CHAOS_START + 41)
+#define SID_IS_FOLDER (SID_CHAOS_START + 42)
+#define SID_FLAG_GETBODY (SID_CHAOS_START + 43)
+#define SID_FLAG_KEEP (SID_CHAOS_START + 44)
+#define SID_FLAG_FLAGGED (SID_CHAOS_START + 45)
+#define SID_FLAG_ANSWERED (SID_CHAOS_START + 46)
+#define SID_FLAG_RECENT (SID_CHAOS_START + 47)
+#define SID_FLAG_SEEN (SID_CHAOS_START + 48)
+#define SID_TOTALCONTENTCOUNT (SID_CHAOS_START + 49)
+#define SID_SEENCONTENTCOUNT (SID_CHAOS_START + 50)
+#define SID_RULES (SID_CHAOS_START + 51)
+#define SID_SORTCRITERIA (SID_CHAOS_START + 52)
+#define SID_THREADED (SID_CHAOS_START + 53)
+//#define DEFAULT_CONTENT_THREAD_MASTER (SID_CHAOS_START + 54)
+//#define DEFAULT_CONTENT_THREAD_SLAVE (SID_CHAOS_START + 55)
+#define SID_AUTOUPDATE_MODE (SID_CHAOS_START + 56)
+#define SID_AUTOUPDATE_INTERVAL (SID_CHAOS_START + 57)
+#define SID_AUTOUPDATE_CONFIRMATION (SID_CHAOS_START + 58)
+#define SID_UPDATE_MAXMESSAGECOUNT (SID_CHAOS_START + 59)
+#define SID_UPDATE_MAXMESSAGESIZE (SID_CHAOS_START + 60)
+#define SID_REMOVEFROMSERVER_MODE (SID_CHAOS_START + 61)
+#define SID_REMOVEFROMSERVER_DELAY (SID_CHAOS_START + 62)
+#define SID_EXPIRATION_MODE (SID_CHAOS_START + 63)
+#define SID_EXPIRATION_TIME (SID_CHAOS_START + 64)
+#define SID_EXPIRATION_MAXCOUNT (SID_CHAOS_START + 65)
+#define SID_DELETE_CONFIRMATION (SID_CHAOS_START + 66)
+#define SID_FLAG_SUBSCRIBED (SID_CHAOS_START + 67)
+#define SID_SERVERPORT (SID_CHAOS_START + 68)
+#define SID_MAILSEND_SERVERNAME (SID_CHAOS_START + 69)
+#define SID_MAILSEND_USERNAME (SID_CHAOS_START + 70)
+#define SID_MAILSEND_PASSWORD (SID_CHAOS_START + 71)
+#define SID_NEWSSEND_SERVERNAME (SID_CHAOS_START + 72)
+#define SID_NEWSSEND_USERNAME (SID_CHAOS_START + 73)
+#define SID_NEWSSEND_PASSWORD (SID_CHAOS_START + 74)
+#define SID_RECEIVE_SERVERNAME (SID_CHAOS_START + 75)
+#define SID_RECEIVE_USERNAME (SID_CHAOS_START + 76)
+#define SID_RECEIVE_PASSWORD (SID_CHAOS_START + 77)
+#define SID_FLAG_SUPPORTMODE (SID_CHAOS_START + 78)
+#define SID_OWN_URL (SID_CHAOS_START + 81)
+#define SID_INTERIM_URL (SID_CHAOS_START + 82)
+#define SID_REFERED_URL (SID_CHAOS_START + 83)
+#define SID_FROM (SID_CHAOS_START + 84)
+#define SID_REPLY_TO (SID_CHAOS_START + 85)
+#define SID_UPDATE (SID_CHAOS_START + 86)
+#define SID_UPDATE_FROMSERVER (SID_CHAOS_START + 87)
+#define SID_UPDATE_TOSERVER (SID_CHAOS_START + 88)
+#define SID_CREATE_NEW (SID_CHAOS_START + 89)
+#define SID_INSERT (SID_CHAOS_START + 90)
+#define SID_SEND_AGAIN (SID_CHAOS_START + 91)
+#define SID_REPLY (SID_CHAOS_START + 92)
+#define SID_FOLLOWUP (SID_CHAOS_START + 93)
+#define SID_FORWARD (SID_CHAOS_START + 94)
+#define SID_REPLY_AND_FOLLOWUP (SID_CHAOS_START + 95)
+#define SID_DATE_CREATED (SID_CHAOS_START + 96)
+#define SID_DATE_MODIFIED (SID_CHAOS_START + 97)
+#define SID_NEWSGROUPCOUNT (SID_CHAOS_START + 98)
+#define SID_SUBSCRNEWSGROUPCOUNT (SID_CHAOS_START + 99)
+#define SID_ARTICLECOUNT (SID_CHAOS_START + 100)
+#define SID_UNREAD_ARTICLECOUNT (SID_CHAOS_START + 101)
+#define SID_FLAG_READONLY (SID_CHAOS_START + 102)
+#define SID_RECIPIENTLIST (SID_CHAOS_START + 103)
+#define SID_OPEN_CNT (SID_CHAOS_START + 104)
+#define SID_MESSAGEBODY (SID_CHAOS_START + 105)
+#define SID_MSG_COLUMN_INFO (SID_CHAOS_START + 106)
+#define SID_FLD_COLUMN_INFO (SID_CHAOS_START + 107)
+#define SID_VIEW_DESCRIPTION (SID_CHAOS_START + 108)
+#define SID_NEWS_GROUPLIST (SID_CHAOS_START + 109)
+#define SID_REAL_URL (SID_CHAOS_START + 110)
+#define SID_CHAOS_SERVERBASE (SID_CHAOS_START + 111)
+#define SID_FOLDERVIEW_MODE (SID_CHAOS_START + 112)
+#define SID_MESSAGEVIEW_MODE (SID_CHAOS_START + 113)
+#define SID_SENTMESSAGEVIEW_MODE (SID_CHAOS_START + 114)
+#define SID_DELETE_ON_SERVER (SID_CHAOS_START + 115)
+#define SID_FILTERED (SID_CHAOS_START + 116)
+#define SID_MESSAGE_STOREMODE (SID_CHAOS_START + 117)
+#define SID_UNDELETE (SID_CHAOS_START + 118)
+#define SID_CLOSECNT (SID_CHAOS_START + 119)
+#define SID_REOPEN (SID_CHAOS_START + 120)
+#define SID_NEW_CNT_CONTENT (SID_CHAOS_START + 121)
+#define SID_CNT_IMPORT (SID_CHAOS_START + 122)
+#define SID_CNT_DELETE (SID_CHAOS_START + 123)
+#define SID_CNT_RENAME (SID_CHAOS_START + 124)
+#define SID_CNT_SHOW (SID_CHAOS_START + 125)
+#define SID_CNT_SHOW_THREADED (SID_CHAOS_START + 126)
+#define SID_CNT_SHOW_FILTERED (SID_CHAOS_START + 127)
+#define SID_CNT_ACTUALIZE (SID_CHAOS_START + 128)
+#define SID_CNT_RESEND_MSG (SID_CHAOS_START + 129)
+#define SID_MARK_THREAD_READ (SID_CHAOS_START + 130)
+#define SID_MARK_THREAD_UNREAD (SID_CHAOS_START + 131)
+#define SID_KILL_THREAD (SID_CHAOS_START + 132)
+#define SID_KILL_AUTHOR (SID_CHAOS_START + 133)
+#define SID_KILL_SUBJECT (SID_CHAOS_START + 134)
+#define SID_CNT_IS_READ (SID_CHAOS_START + 135)
+#define SID_CNT_IS_MARKED (SID_CHAOS_START + 136)
+#define SID_CNT_IS_SUBSCRIBED (SID_CHAOS_START + 137)
+#define SID_CNT_PROPERTIES (SID_CHAOS_START + 138)
+#define SID_CNT_RESTORE (SID_CHAOS_START + 139)
+#define SID_UPDATE_ENABLED (SID_CHAOS_START + 140)
+#define SID_SHOW_MSGS_HAS_TIMELIMIT (SID_CHAOS_START + 141)
+#define SID_SHOW_MSGS_TIMELIMIT (SID_CHAOS_START + 142)
+#ifndef _CHAOS_RESOURCE
+#define SID_STORE_MSGS_HAS_TIMELIMIT (SID_CHAOS_START + 143)
+#define SID_STORE_MSGS_TIMELIMIT (SID_CHAOS_START + 144)
+#endif
+#define SID_CNT_DEFAULT (SID_CHAOS_START + 145)
+#define SID_CNT_SYNCHRONIZE (SID_CHAOS_START + 146)
+#define SID_SEND_SERVERNAME (SID_CHAOS_START + 147)
+#define SID_SEND_USERNAME (SID_CHAOS_START + 148)
+#define SID_SEND_PASSWORD (SID_CHAOS_START + 149)
+#define SID_SEND_REPLY_TO_DEFAULT (SID_CHAOS_START + 150)
+#define SID_SEND_FROM_DEFAULT (SID_CHAOS_START + 151)
+#define SID_SEND_PUBLIC_PROT_ID (SID_CHAOS_START + 152)
+#define SID_SEND_PRIVATE_PROT_ID (SID_CHAOS_START + 153)
+#define SID_SEND_PUBLIC_OUTBOXPROPS (SID_CHAOS_START + 154)
+#define SID_SEND_PRIVATE_OUTBOXPROPS (SID_CHAOS_START + 155)
+#define SID_VIM_POPATH (SID_CHAOS_START + 156)
+#define SID_SEND_VIM_POPATH (SID_CHAOS_START + 157)
+#define SID_SEARCH_CRITERIA (SID_CHAOS_START + 158)
+#define SID_SEARCH_LOCATIONS (SID_CHAOS_START + 159)
+#define SID_SEARCH_RECURSIVE (SID_CHAOS_START + 160)
+#define SID_SEARCH_FOLDER_VIEW (SID_CHAOS_START + 161)
+#define SID_SEARCH_DOCUMENT_VIEW (SID_CHAOS_START + 162)
+#define SID_TRASHCAN_EMPTY_TRASH (SID_CHAOS_START + 163)
+#define SID_TRASHCAN_FLAG_AUTODELETE (SID_CHAOS_START + 164)
+#define SID_TRASHCAN_FLAG_CONFIRMEMPTY (SID_CHAOS_START + 165)
+#define SID_TRASH_RESTORE (SID_CHAOS_START + 166)
+#define SID_CNT_EXPORT (SID_CHAOS_START + 167)
+#define SID_EXPLORER_CREATEPOP3ACCOUNT (SID_CHAOS_START + 168)
+#define SID_EXPLORER_CREATEIMAPACCOUNT (SID_CHAOS_START + 169)
+#define SID_EXPLORER_CREATENEWS (SID_CHAOS_START + 170)
+#define SID_EXPLORER_CREATEOUTTRAY (SID_CHAOS_START + 171)
+#define SID_EXPLORER_CREATEFTPACCOUNT (SID_CHAOS_START + 172)
+#define SID_EXPLORER_CREATEVIMACCOUNT (SID_CHAOS_START + 173)
+#define SID_EXPLORER_CREATEPROPERTYSETFOLDER (SID_CHAOS_START + 174)
+#define SID_EXPLORER_CREATEFSYS (SID_CHAOS_START + 175)
+#define SID_EXPLORER_CREATEPROJECT (SID_CHAOS_START + 176)
+#define SID_EXPLORER_CREATESEARCHFOLDER (SID_CHAOS_START + 177)
+#define SID_EXPLORER_CREATECHANNEL_SUBSCRIBE_BOX (SID_CHAOS_START + 178)
+#define SID_EXPLORER_CREATECHANNEL_BMK (SID_CHAOS_START + 179)
+#define SID_WHO_IS_MASTER (SID_CHAOS_START + 180)
+#define SID_FSYS_KIND (SID_CHAOS_START + 181)
+#define SID_FSYS_FLAGS (SID_CHAOS_START + 182)
+#define SID_EXPLORER_CREATETRASHCAN (SID_CHAOS_START + 183)
+#define SID_DOCUMENT_HEADER (SID_CHAOS_START + 184)
+#define SID_VIEW_FLD_PIC (SID_CHAOS_START + 185)
+#define SID_FSYS_VALUE_FOLDER (SID_CHAOS_START + 186)
+#define SID_FOLDER_COUNT (SID_CHAOS_START + 187)
+#define SID_PURGE (SID_CHAOS_START + 188)
+#define SID_FSYS_SHOW_HIDDEN (SID_CHAOS_START + 189)
+#define SID_CNT_SET_AS_DEFAULT (SID_CHAOS_START + 190)
+#define SID_FLAG_UPDATE_ON_OPEN (SID_CHAOS_START + 191)
+#define SID_ATTR_FONT (SID_CHAOS_START + 192)
+#define SID_VALUE_ADDED_MODE (SID_CHAOS_START + 193)
+#define SID_STORE_MARKED (SID_CHAOS_START + 194)
+#define SID_SEND_COPY_TARGET (SID_CHAOS_START + 195)
+
+// ERRCODE's -----------------------------------------------------------------
+
+#define ERRCODE_CHAOS_LOGIN_FAILURE_RECEIVE (ERRCODE_AREA_CHAOS)
+#define ERRCODE_CHAOS_LOGINFAIL_NOEXCH (ERRCODE_AREA_CHAOS + 1)
+#define ERRCODE_CHAOS_LOGINFAIL_ACCOUNT_NOEXCH (ERRCODE_AREA_CHAOS + 2)
+#define ERRCODE_CHAOS_CONNECT_FAILURE (ERRCODE_AREA_CHAOS + 3)
+#define ERRCODE_CHAOS_OFFLINE (ERRCODE_AREA_CHAOS + 4)
+#define ERRCODE_CHAOS_SERVER_ERROR (ERRCODE_AREA_CHAOS + 5)
+#define ERRCODE_CHAOS_IMAP_BAD_RESPONSE (ERRCODE_AREA_CHAOS + 6)
+
+#define ERRCODE_CHAOS_WRONG_FILE_FORMAT (ERRCODE_AREA_CHAOS + 8)
+
+#define ERRCODE_CHAOS_CNTOUT_NO_FROM (ERRCODE_AREA_CHAOS + 10)
+#define ERRCODE_CHAOS_TO_MANY_GROUPS (ERRCODE_AREA_CHAOS + 11)
+#define ERRCODE_CHAOS_DELETE_ABORTED (ERRCODE_AREA_CHAOS + 12)
+#define ERRCODE_CHAOS_QUERY_DELETE (ERRCODE_AREA_CHAOS + 13)
+#define ERRCODE_CHAOS_NOTAVAILABLE (ERRCODE_AREA_CHAOS + 14)
+#define ERRCODE_CHAOS_VIM_LIBRARY_ERROR (ERRCODE_AREA_CHAOS + 15)
+#define ERRCODE_CHAOS_FOLDER_INVALID (ERRCODE_AREA_CHAOS + 16)
+#define ERRCODE_CHAOS_FTP_RESOLVERERROR (ERRCODE_AREA_CHAOS + 17)
+#define ERRCODE_CHAOS_FTP_NETWORKERROR (ERRCODE_AREA_CHAOS + 18)
+
+#define ERRCODE_CHAOS_NO_VIM_LIBRARY (ERRCODE_AREA_CHAOS + 23)
+#define ERRCODE_CHAOS_VIM_LIBRARY_CORRUPTED (ERRCODE_AREA_CHAOS + 24)
+#define ERRCODE_CHAOS_CCMAIL_EXPORT_ERROR (ERRCODE_AREA_CHAOS + 25)
+#define ERRCODE_CHAOS_NO_CCMAIL_EXPORT_FILE (ERRCODE_AREA_CHAOS + 26)
+#define ERRCODE_CHAOS_ILLEGAL_CCMAIL_EXPORT_FILE (ERRCODE_AREA_CHAOS + 27)
+#define ERRCODE_CHAOS_MESSAGE_NOT_FOUND (ERRCODE_AREA_CHAOS + 28)
+#define ERRCODE_CHAOS_BAD_CCMAIL_EXPORT_PASSWORD (ERRCODE_AREA_CHAOS + 29)
+#define ERRCODE_CHAOS_CCMAIL_EXPORT_TOO_LONG (ERRCODE_AREA_CHAOS + 30)
+#define ERRCODE_CHAOS_FOLDER_EXIST (ERRCODE_AREA_CHAOS + 31)
+#define ERRCODE_CHAOS_FOLDER_NOT_EXIST (ERRCODE_AREA_CHAOS + 32)
+#define ERRCODE_CHAOS_NO_VIM_BBOARDLIST (ERRCODE_AREA_CHAOS + 33)
+#define ERRCODE_CHAOS_ILLEGAL_MESSAGE_ID (ERRCODE_AREA_CHAOS + 34)
+#define ERRCODE_CHAOS_SERVER_PORT_SYNTAX (ERRCODE_AREA_CHAOS + 35)
+#define ERRCODE_CHAOS_SERVERNAME_SYNTAX (ERRCODE_AREA_CHAOS + 36)
+#define ERRCODE_CHAOS_USERNAME_SYNTAX (ERRCODE_AREA_CHAOS + 37)
+#define ERRCODE_CHAOS_IS_RESCHEDULED (ERRCODE_AREA_CHAOS + 38)
+#define ERRCODE_CHAOS_VIM_NO_FAKE_MESSAGE_ID (ERRCODE_AREA_CHAOS + 39)
+#define ERRCODE_CHAOS_FSYS_ROOT_DELETE (ERRCODE_AREA_CHAOS + 40)
+#define ERRCODE_CHAOS_FILE_EXIST (ERRCODE_AREA_CHAOS + 41)
+#define ERRCODE_CHAOS_FILE_NOT_EXIST (ERRCODE_AREA_CHAOS + 42)
+#define ERRCODE_CHAOS_FSYS_MISPLACED_CHAR (ERRCODE_AREA_CHAOS + 43)
+#define ERRCODE_CHAOS_FSYS_INVALID_CHAR (ERRCODE_AREA_CHAOS + 44)
+#define ERRCODE_CHAOS_FSYS_INVALID_DEVICE (ERRCODE_AREA_CHAOS + 45)
+#define ERRCODE_CHAOS_FSYS_ACCESS_DENIED (ERRCODE_AREA_CHAOS + 46)
+#define ERRCODE_CHAOS_FSYS_LOCK_VIOLATION (ERRCODE_AREA_CHAOS + 47)
+#define ERRCODE_CHAOS_FSYS_VOLUME_FULL (ERRCODE_AREA_CHAOS + 48)
+#define ERRCODE_CHAOS_FSYS_NOT_SUPPORTED (ERRCODE_AREA_CHAOS + 49)
+#define ERRCODE_CHAOS_FSYS_UNKNOWN (ERRCODE_AREA_CHAOS + 50)
+#define ERRCODE_CHAOS_FSYS_NOT_A_FILE (ERRCODE_AREA_CHAOS + 51)
+#define ERRCODE_CHAOS_FSYS_NOT_A_DIRECTORY (ERRCODE_AREA_CHAOS + 52)
+#define ERRCODE_CHAOS_FSYS_IS_WILDCARD (ERRCODE_AREA_CHAOS + 53)
+
+#define ERRCODE_CHAOS_FSYS_UPDATE_NEEDED (ERRCODE_AREA_CHAOS + 55)
+#define ERRCODE_CHAOS_FSYS_CANT_RESOLVE_CONFLICT (ERRCODE_AREA_CHAOS + 56)
+
+#define ERRCODE_CHAOS_ONE_NOT_SEARCHABLE (ERRCODE_AREA_CHAOS + 58)
+#define ERRCODE_CHAOS_MULTIPLE_NOT_SEARCHABLE (ERRCODE_AREA_CHAOS + 59)
+#define ERRCODE_CHAOS_FSYS_CACHE_INCONSISTENT (ERRCODE_AREA_CHAOS + 60)
+#define ERRCODE_CHAOS_FSYS_READONLY (ERRCODE_AREA_CHAOS + 61)
+#define ERRCODE_CHAOS_FSYS_LOCK (ERRCODE_AREA_CHAOS + 62)
+#define ERRCODE_CHAOS_FSYS_UNLOCK (ERRCODE_AREA_CHAOS + 63)
+#define ERRCODE_CHAOS_FSYS_DELETE (ERRCODE_AREA_CHAOS + 64)
+#define ERRCODE_CHAOS_FSYS_IS_MARKED (ERRCODE_AREA_CHAOS + 65)
+#define ERRCODE_CHAOS_FTP_GENERAL_FAILURE (ERRCODE_AREA_CHAOS + 66)
+#define ERRCODE_CHAOS_DO_LOG (ERRCODE_AREA_CHAOS + 67)
+#define ERRCODE_CHAOS_HTTP_COOKIE_REQUEST (ERRCODE_AREA_CHAOS + 68)
+#define ERRCODE_CHAOS_FSYS_LOST_ROOT (ERRCODE_AREA_CHAOS + 69)
+#define ERRCODE_CHAOS_FTP_PROXY (ERRCODE_AREA_CHAOS + 70)
+#define ERRCODE_CHAOS_SOURCE_EQ_TARGET (ERRCODE_AREA_CHAOS + 71)
+#define ERRCODE_CHAOS_CONFIRM_EMPTY_TRASH (ERRCODE_AREA_CHAOS + 72)
+#define ERRCODE_CHAOS_FSYS_NO_TARGET (ERRCODE_AREA_CHAOS + 73)
+#define ERRCODE_CHAOS_FSYS_RECURSIVE (ERRCODE_AREA_CHAOS + 74)
+#define ERRCODE_CHAOS_FSYS_INSERT_MEDIUM (ERRCODE_AREA_CHAOS + 75)
+#define ERRCODE_CHAOS_NO_DOCINFO (ERRCODE_AREA_CHAOS + 76)
+#define ERRCODE_CHAOS_CCMAIL_EXPORT_NOT_TERMINATING (ERRCODE_AREA_CHAOS + 77)
+#define ERRCODE_CHAOS_EXTERNAL_COMMAND_FAILED (ERRCODE_AREA_CHAOS + 78)
+#define ERRCODE_CHAOS_RENAME_FAILED (ERRCODE_AREA_CHAOS + 79)
+#define ERRCODE_CHAOS_NOT_HANDLED (ERRCODE_AREA_CHAOS + 80)
+#define ERRCODE_CHAOS_COULD_NOT_INIT_CMP (ERRCODE_AREA_CHAOS + 81)
+#define ERRCODE_CHAOS_TRANSFER_URL_NOT_SUPPORTED (ERRCODE_AREA_CHAOS + 82)
+#define ERRCODE_CHAOS_EMPTY_SERVERNAME (ERRCODE_AREA_CHAOS + 83)
+#define ERRCODE_CHAOS_EMPTY_USERNAME (ERRCODE_AREA_CHAOS + 84)
+#define ERRCODE_CHAOS_BAD_INET (ERRCODE_AREA_CHAOS + 85)
+#define ERRCODE_CHAOS_IMAP_SERVER_MSG (ERRCODE_AREA_CHAOS + 86)
+#define ERRCODE_CHAOS_IMAP_CONNECTION_CLOSED (ERRCODE_AREA_CHAOS + 87)
+#define ERRCODE_CHAOS_IMAP_NOT_IMAP4 (ERRCODE_AREA_CHAOS + 88)
+#define ERRCODE_CHAOS_IMAP_BAD_SERVER (ERRCODE_AREA_CHAOS + 89)
+#define ERRCODE_CHAOS_REORGANIZE_FILE_LOCKED (ERRCODE_AREA_CHAOS + 90)
+#define ERRCODE_CHAOS_IMAP_BAD_TITLE (ERRCODE_AREA_CHAOS + 91)
+#define ERRCODE_CHAOS_SERVER_CONNECT_FAILURE (ERRCODE_AREA_CHAOS + 92)
+#define ERRCODE_CHAOS_PASSWORD_SYNTAX (ERRCODE_AREA_CHAOS + 93)
+#define ERRCODE_CHAOS_QUERY_DELETE_CACHE (ERRCODE_AREA_CHAOS + 94)
+#define ERRCODE_CHAOS_REORGANIZE_NO_DISKSPACE (ERRCODE_AREA_CHAOS + 95)
+#define ERRCODE_CHAOS_LOGIN_FAILURE_ACCOUNT (ERRCODE_AREA_CHAOS + 96)
+#define ERRCODE_CHAOS_ACCOUNT_SYNTAX (ERRCODE_AREA_CHAOS + 97)
+#define ERRCODE_CHAOS_CHANNEL_TERMINATION (ERRCODE_AREA_CHAOS + 98)
+
+// Tabpage-Ids ---------------------------------------------------------------
+
+#define CNT_TABPAGE_GENERAL 1 // "Allgemein"
+#define CNT_TABPAGE_SERVER_SETTINGS 2 // "Server"
+#define CNT_TABPAGE_RULES 3 // "Regeln"
+#define CNT_TABPAGE_VIEW_PROPERTIES 4 // "Ansicht"
+#define CNT_TABPAGE_CONTENT_PROPERTIES 5 // "Inhalte"
+#define CNT_TABPAGE_SUBSCRIBE 6 // "Abonniert"
+#define CNT_TABPAGE_RECIPIENT_STATE 7 // "Status" (Outtray-Msgs)
+#define CNT_TABPAGE_RECV_POP3 8 // "Empfangen" fuer POP3
+#define CNT_TABPAGE_RECV_NNTP 9 // - " - fuer NNTP-Accounts
+#define CNT_TABPAGE_RECV_IMAP 10 // - " - fuer IMAP-Accounts
+#define CNT_TABPAGE_RECV_VIM 11 // - " - fuer VIM-Accounts
+#define CNT_TABPAGE_SEND_SMTP 12 // "SMTP"
+#define CNT_TABPAGE_SEND_NNTP 13 // "NNTP"
+#define CNT_TABPAGE_SEND_VIM 14 // "VIM"
+#define CNT_TABPAGE_MAIL_NEWS_SEND 15 // "Versenden"
+#define CNT_TABPAGE_SEARCH_CRITERIA 16
+#define CNT_TABPAGE_SEARCH_LOCATIONS 17
+#define CNT_TABPAGE_PROJECT_DATAEXCHANGE 18 // "Datenaustausch"
+#define CNT_TABPAGE_SBOX_LOCATION 19
+#define CNT_TABPAGE_SBOX_SUBSCRIBTION 20
+#define CNT_TABPAGE_SBOX_SCHEDULE 21
+#define CNT_TABPAGE_FTP_SERVER 22
+#define CNT_TABPAGE_TRASHCAN_OPTIONS 23
+#define CNT_TABPAGE_BMK 24
+#define CNT_TABPAGE_SBOX_NOTIFICATION 25
+#define CNT_TABPAGE_SBOX_SDC_GENERAL 26
+#define CNT_TABPAGE_SBOX_CDF_SUBSCRIBTION 27
+#define CNT_TABPAGE_BACKGROUND 28
+#define CNT_TABPAGE_HEADER 29 // "Kopfzeilen" - Header bei Mail/News etc.
+#define CNT_TABPAGE_DESCRIPTION 30 // "Beschreibung" - Header im Filesys
+#define CNT_TABPAGE_FONT 31
+#define CNT_TABPAGE_FOLDER_BMK 32 // Link auf Ordner
+#define CNT_TABPAGE_DOCUMENT_BMK 33 // Link auf Dokument
+#define CNT_TABPAGE_WEBVIEW 34 // Web-Ansicht
+
+
+#define DEF_WIDTH_FROM 150
+#define DEF_WIDTH_TITLE_MAIL 300
+#define DEF_WIDTH_IS_MARKED 60
+#define DEF_WIDTH_IS_READ 60
+#define DEF_WIDTH_DATE_CREATED 100
+#define DEF_WIDTH_PRIORITY 30
+#define DEF_WIDTH_DOCUMENT_SIZE 90
+#define DEF_WIDTH_RECIPIENTLIST 150
+#define DEF_WIDTH_TITLE_FSYS 150
+#define DEF_WIDTH_TITLE_SUBSCRIBE 230
+#define DEF_WIDTH_SUBSCRIBE_CRAWL_STATUS 180
+#define DEF_WIDTH_SUBSCRIBE_NEXT_UPD 120
+#define DEF_WIDTH_SUBSCRIBE_TARGET_URL 190
+#define DEF_WIDTH_CONTENT_TYPE 100
+#define DEF_WIDTH_TRASH_ORIGIN 150
+
+
+// ----- Help IDs -----
+
+#define HID_CHAOS_NEW_IMAP_BOX HID_CHAOS_START
+#define HID_CHAOS_NEW_IMAP_MSG (HID_CHAOS_START + 1)
+#define HID_CHAOS_NEW_IMAP_FLD (HID_CHAOS_START + 2)
+#define HID_CHAOS_NEW_NEWS_BOX (HID_CHAOS_START + 3)
+#define HID_CHAOS_NEW_NEWS_MSG (HID_CHAOS_START + 4)
+#define HID_CHAOS_NEW_FSYS_FLD (HID_CHAOS_START + 5)
+#define HID_CHAOS_NEW_FSYS_LNK (HID_CHAOS_START + 6)
+#define HID_CHAOS_NEW_FTP_BOX (HID_CHAOS_START + 7)
+#define HID_CHAOS_NEW_FTP_FLD (HID_CHAOS_START + 8)
+#define HID_CHAOS_NEW_OUT_BOX (HID_CHAOS_START + 9)
+#define HID_CHAOS_NEW_OUT_MSG (HID_CHAOS_START + 10)
+#define HID_CHAOS_NEW_POP3_BOX (HID_CHAOS_START + 11)
+#define HID_CHAOS_NEW_POP3_MSG (HID_CHAOS_START + 12)
+#define HID_CHAOS_NEW_SEARCH (HID_CHAOS_START + 13)
+#define HID_CHAOS_NEW_VIM_BOX (HID_CHAOS_START + 14)
+#define HID_CHAOS_NEW_VIM_MSG (HID_CHAOS_START + 15)
+#define HID_CHAOS_NEW_SUBSCR_BOX (HID_CHAOS_START + 16)
+#define HID_CHAOS_NEW_BOOKMARK (HID_CHAOS_START + 17)
+#define HID_CHAOS_NEW_PUB_BOX (HID_CHAOS_START + 18)
+
+#endif
+
diff --git a/sfx2/inc/sfx2/controlwrapper.hxx b/sfx2/inc/sfx2/controlwrapper.hxx
new file mode 100644
index 000000000000..579d7b1299d3
--- /dev/null
+++ b/sfx2/inc/sfx2/controlwrapper.hxx
@@ -0,0 +1,671 @@
+/*************************************************************************
+ *
+ * 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_CONTROLWRAPPER_HXX
+#define SFX_CONTROLWRAPPER_HXX
+
+#include <tools/debug.hxx>
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <memory>
+
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/edit.hxx>
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <svtools/valueset.hxx>
+#include <svtools/ctrlbox.hxx>
+
+// ============================================================================
+
+namespace sfx {
+
+// ============================================================================
+
+/** List position type of VCL ListBox. */
+typedef USHORT ListBoxPosType;
+/** List position type of SVTOOLS ValueSet. */
+typedef USHORT ValueSetPosType;
+
+// ============================================================================
+// Helpers
+// ============================================================================
+
+/** A helper class for mapping list positions from/to represented values.
+
+ Deriving from this helper class adds the two functions GetValueFromPos()
+ and GetPosFromValue(). The constructor receives an array of MapEntryType
+ structures that represents the table of positions and values. It is
+ possible to pass a null pointer, this results in a direct mapping between
+ list positions and values. If the map exists, it MUST be terminated with an
+ entry containing the special "not found" list position passed to the
+ constructor. The value contained in this last entry is used as default
+ value in case of an error.
+ */
+template< typename PosT, typename ValueT >
+class PosValueMapper
+{
+public:
+ typedef PosT PosType;
+ typedef ValueT ValueType;
+ typedef PosValueMapper< PosT, ValueT > MapperType;
+
+ /** A helper struct that contains a list position - value pair. */
+ struct MapEntryType
+ {
+ PosT mnPos; /// Position in the list.
+ ValueT mnValue; /// Corresponding value.
+ };
+
+ /** Constructs the map helper with the passed map.
+ @param nNFPos This list position is used to represent the
+ "not found" or "not existing" state.
+ @param pMap The map of list positions/values. If 0, a direct mapping
+ is used (simply casting between list position and values). If the map
+ exists, it *MUST* be terminated by an entry containing the special
+ "not found" list position. */
+ inline explicit PosValueMapper( PosT nNFPos, const MapEntryType* pMap = 0 ) :
+ mpMap( pMap ), mnNFPos( nNFPos ) {}
+
+ /** Returns the value at the specified list position.
+ @return The found value, or the value of the last map entry on error. */
+ ValueT GetValueFromPos( PosT nPos ) const;
+ /** Returns the list position of the specified value.
+ @return The position, or the special "not found" position on error. */
+ PosT GetPosFromValue( ValueT nValue ) const;
+
+ /** Returns the special "not found" list position. */
+ inline PosT GetNotFoundPos() const { return mnNFPos; }
+
+private:
+ const MapEntryType* mpMap; /// The list position/value map.
+ PosT mnNFPos; /// Special "not found" list position.
+};
+
+// ============================================================================
+// Base control wrapper classes
+// ============================================================================
+
+/** Base class for all control wrappers.
+
+ Control wrappers are used to have an equal interface for various functions
+ used in connections for different types of controls.
+
+ The current tree of base classes/templates and standard control wrappers:
+
+ ControlWrapperBase
+ |
+ +- SingleControlWrapper< ControlT, ValueT >
+ | |
+ | +- DummyWindowWrapper [1]
+ | +- CheckBoxWrapper [1]
+ | +- EditWrapper [1]
+ | +- ColorListBoxWrapper [1]
+ | |
+ | +- NumericFieldWrapper< ValueT > [1]
+ | | |
+ | | +- [ValueType]NumericFieldWrapper [1] [2]
+ | |
+ | +- MetricFieldWrapper< ValueT > [1]
+ | | |
+ | | +- [ValueType]MetricFieldWrapper [1] [2]
+ | |
+ | +- ListBoxWrapper< ValueT > [1]
+ | | |
+ | | +- [ValueType]ListBoxWrapper [1] [2]
+ | |
+ | +- ValueSetWrapper< ValueT > [1]
+ | |
+ | +- [ValueType]ValueSetWrapper [1] [2]
+ |
+ +- MultiControlWrapperHelper
+ |
+ +- MultiControlWrapper< ValueT >
+
+ Notes:
+ [1] Standard wrappers ready to use.
+ [2] [ValueType] is one of Int16, UInt16, Int32, UInt32, UShort, ULong.
+
+ See documentation of class ItemConnectionBase (itemconnect.hxx) for more
+ details.
+ */
+class SFX2_DLLPUBLIC ControlWrapperBase
+{
+public:
+ inline explicit ControlWrapperBase() {}
+ virtual ~ControlWrapperBase();
+
+ /** Derived classes enable, disable, show, or hide control(s).
+ @descr Will do nothing, if the corresponding parameter is STATE_DONTKNOW. */
+ virtual void ModifyControl( TriState eEnable, TriState eShow ) = 0;
+
+ /** Derived classes return true if the control is in "don't know" state. */
+ virtual bool IsControlDontKnow() const = 0;
+ /** Derived classes set the control to "don't know" state. */
+ virtual void SetControlDontKnow( bool bSet ) = 0;
+
+private:
+ /* Disable copy c'tor and assignment. */
+ ControlWrapperBase( const ControlWrapperBase& );
+ ControlWrapperBase& operator=( const ControlWrapperBase& );
+};
+
+// ============================================================================
+// Single control wrappers
+// ============================================================================
+
+/** Base class template for control wrappers containing one single control.
+
+ Classes created from this template store the reference to a single control
+ object. It is not required that the control is derived from VCL's Window
+ class. Derived classes have to implement the abstract functions
+ ShowControl(), EnableControl(), IsControlDontKnow(), SetControlDontKnow(),
+ GetControlValue(), and SetControlValue().
+
+ As already stated, it is not required for ControlT to be a VCL Window.
+ Anyway, ControlT must support the following functions:
+ - void ControlT::Enable( bool )
+ - void ControlT::Show( bool )
+ */
+template< typename ControlT, typename ValueT >
+class SingleControlWrapper : public ControlWrapperBase
+{
+public:
+ typedef ControlT ControlType;
+ typedef ValueT ControlValueType;
+ typedef SingleControlWrapper< ControlT, ValueT > SingleControlWrapperType;
+
+ inline explicit SingleControlWrapper( ControlT& rControl ) : mrControl( rControl ) {}
+
+ /** Returns a reference to the control this connection works on. */
+ inline const ControlT& GetControl() const { return mrControl; }
+ /** Returns a reference to the control this connection works on. */
+ inline ControlT& GetControl() { return mrControl; }
+
+ /** Enables, disables, shows, or hides the control.
+ @descr Does nothing, if the corresponding parameter is STATE_DONTKNOW. */
+ virtual void ModifyControl( TriState eEnable, TriState eShow );
+
+ /** Derived classes return the value the control contains. */
+ virtual ValueT GetControlValue() const = 0;
+ /** Derived classes set the contents of the control to the passed value. */
+ virtual void SetControlValue( ValueT aValue ) = 0;
+
+private:
+ ControlT& mrControl; /// The control of this wrapper.
+};
+
+// ============================================================================
+
+/** A dummy wrapper for a VCL Window that does nothing special.
+
+ This wrapper is used to implement the DummyItemConnection. It does not
+ connect an item to a control, but handles the special flags to disable or
+ hide a control, if an item is unknown.
+ */
+class SFX2_DLLPUBLIC DummyWindowWrapper:
+ public SingleControlWrapper< Window, void* >
+{
+public:
+ explicit DummyWindowWrapper( Window& rWindow );
+
+ virtual bool IsControlDontKnow() const;
+ virtual void SetControlDontKnow( bool );
+
+ virtual void* GetControlValue() const;
+ virtual void SetControlValue( void* );
+};
+
+// ----------------------------------------------------------------------------
+
+/** A wrapper for the VCL CheckBox. */
+class SFX2_DLLPUBLIC CheckBoxWrapper:
+ public SingleControlWrapper< CheckBox, BOOL >
+{
+public:
+ explicit CheckBoxWrapper( CheckBox& rCheckBox );
+
+ virtual bool IsControlDontKnow() const;
+ virtual void SetControlDontKnow( bool bSet );
+
+ virtual BOOL GetControlValue() const;
+ virtual void SetControlValue( BOOL bValue );
+};
+
+// ----------------------------------------------------------------------------
+
+/** A wrapper for the VCL Edit. */
+class EditWrapper : public SingleControlWrapper< Edit, String >
+{
+ /* Note: cannot use 'const String&' as template argument, because VCL's
+ Edit control returns the string by value and not by reference,
+ therefore GetControlValue() must return a temporary object too. */
+public:
+ explicit EditWrapper( Edit& rEdit );
+
+ virtual bool IsControlDontKnow() const;
+ virtual void SetControlDontKnow( bool bSet );
+
+ virtual String GetControlValue() const;
+ virtual void SetControlValue( String aValue );
+};
+
+// ----------------------------------------------------------------------------
+
+/** A wrapper for the SVTOOLS ColorListBox. */
+class SFX2_DLLPUBLIC ColorListBoxWrapper:
+ public SingleControlWrapper< ColorListBox, Color >
+{
+ /* Note: cannot use 'const Color&' as template argument, because the
+ SVTOOLS ColorListBox returns the color by value and not by reference,
+ therefore GetControlValue() must return a temporary object too. */
+public:
+ explicit ColorListBoxWrapper(ColorListBox & rListBox);
+
+ virtual ~ColorListBoxWrapper();
+
+ virtual bool IsControlDontKnow() const;
+ virtual void SetControlDontKnow( bool bSet );
+
+ virtual Color GetControlValue() const;
+ virtual void SetControlValue( Color aColor );
+};
+
+// ============================================================================
+
+/** A wrapper for the VCL NumericField. */
+template< typename ValueT >
+class NumericFieldWrapper : public SingleControlWrapper< NumericField, ValueT >
+{
+public:
+ inline explicit NumericFieldWrapper( NumericField& rField ) :
+ SingleControlWrapper< NumericField, ValueT >( rField ) {}
+
+ virtual bool IsControlDontKnow() const;
+ virtual void SetControlDontKnow( bool bSet );
+
+ virtual ValueT GetControlValue() const;
+ virtual void SetControlValue( ValueT nValue );
+};
+
+// ----------------------------------------------------------------------------
+
+typedef NumericFieldWrapper< INT16 > Int16NumericFieldWrapper;
+typedef NumericFieldWrapper< UINT16 > UInt16NumericFieldWrapper;
+typedef NumericFieldWrapper< INT32 > Int32NumericFieldWrapper;
+typedef NumericFieldWrapper< UINT32 > UInt32NumericFieldWrapper;
+
+typedef NumericFieldWrapper< USHORT > UShortNumericFieldWrapper;
+typedef NumericFieldWrapper< ULONG > ULongNumericFieldWrapper;
+
+// ============================================================================
+
+/** A wrapper for the VCL MetricField.
+
+ Adds support for field units during accessing the control value. The
+ wrapper respects the field unit set at the control itself and converts it
+ from/to the field unit passed to the constructor.
+ */
+template< typename ValueT >
+class MetricFieldWrapper : public SingleControlWrapper< MetricField, ValueT >
+{
+public:
+ inline explicit MetricFieldWrapper( MetricField& rField, FieldUnit eUnit = FUNIT_NONE ) :
+ SingleControlWrapper< MetricField, ValueT >( rField ), meUnit( eUnit ) {}
+
+ virtual bool IsControlDontKnow() const;
+ virtual void SetControlDontKnow( bool bSet );
+
+ virtual ValueT GetControlValue() const;
+ virtual void SetControlValue( ValueT nValue );
+
+private:
+ FieldUnit meUnit;
+};
+
+// ----------------------------------------------------------------------------
+
+typedef MetricFieldWrapper< INT16 > Int16MetricFieldWrapper;
+typedef MetricFieldWrapper< UINT16 > UInt16MetricFieldWrapper;
+typedef MetricFieldWrapper< INT32 > Int32MetricFieldWrapper;
+typedef MetricFieldWrapper< UINT32 > UInt32MetricFieldWrapper;
+
+typedef MetricFieldWrapper< USHORT > UShortMetricFieldWrapper;
+typedef MetricFieldWrapper< ULONG > ULongMetricFieldWrapper;
+
+// ============================================================================
+
+/** A wrapper for the VCL ListBox.
+
+ If a position<->value map is passed to the constructor, it MUST be
+ terminated with an entry containing LISTBOX_ENTRY_NOTFOUND as list
+ position. See documentation of the PosValueMapper template for details.
+ */
+template< typename ValueT >
+class ListBoxWrapper :
+ public SingleControlWrapper< ListBox, ValueT >,
+ public PosValueMapper< ListBoxPosType, ValueT >
+{
+ typedef PosValueMapper< ListBoxPosType, ValueT > MapperType;
+
+public:
+ typedef typename MapperType::MapEntryType MapEntryType;
+
+ /** @param pMap Optional list position <-> value map.
+ See PosValueMapper documentation for details. */
+ inline explicit ListBoxWrapper( ListBox& rListBox, const MapEntryType* pMap = 0 ) :
+ SingleControlWrapper< ListBox, ValueT >( rListBox ), MapperType( LISTBOX_ENTRY_NOTFOUND, pMap ) {}
+
+ virtual bool IsControlDontKnow() const
+ { return this->GetControl().GetSelectEntryCount() == 0; }
+ virtual void SetControlDontKnow( bool bSet )
+ { if( bSet ) this->GetControl().SetNoSelection(); }
+
+ virtual ValueT GetControlValue() const;
+ virtual void SetControlValue( ValueT nValue );
+};
+
+// ----------------------------------------------------------------------------
+
+typedef ListBoxWrapper< INT16 > Int16ListBoxWrapper;
+typedef ListBoxWrapper< UINT16 > UInt16ListBoxWrapper;
+typedef ListBoxWrapper< INT32 > Int32ListBoxWrapper;
+typedef ListBoxWrapper< UINT32 > UInt32ListBoxWrapper;
+
+typedef ListBoxWrapper< USHORT > UShortListBoxWrapper;
+typedef ListBoxWrapper< ULONG > ULongListBoxWrapper;
+
+// ============================================================================
+
+/** A wrapper for the SVTOOLS ValueSet.
+
+ If a position<->value map is passed to the constructor, it MUST be
+ terminated with an entry containing VALUESET_ITEM_NOTFOUND as list
+ position. See documentation of the PosValueMapper template for details.
+ */
+template< typename ValueT >
+class ValueSetWrapper :
+ public SingleControlWrapper< ValueSet, ValueT >,
+ public PosValueMapper< ValueSetPosType, ValueT >
+{
+ typedef PosValueMapper< ValueSetPosType, ValueT > MapperType;
+
+public:
+ typedef typename MapperType::MapEntryType MapEntryType;
+
+ /** @param pMap Optional position <-> value map.
+ See PosValueMapper documentation for details. */
+ inline explicit ValueSetWrapper( ValueSet& rValueSet, const MapEntryType* pMap = 0 ) :
+ SingleControlWrapper< ValueSet, ValueT >( rValueSet ), MapperType( VALUESET_ITEM_NOTFOUND, pMap ) {}
+
+ virtual bool IsControlDontKnow() const
+ { return this->GetControl().IsNoSelection(); }
+ virtual void SetControlDontKnow( bool bSet )
+ { if( bSet ) this->GetControl().SetNoSelection(); }
+
+ virtual ValueT GetControlValue() const;
+ virtual void SetControlValue( ValueT nValue );
+};
+
+// ----------------------------------------------------------------------------
+
+typedef ValueSetWrapper< INT16 > Int16ValueSetWrapper;
+typedef ValueSetWrapper< UINT16 > UInt16ValueSetWrapper;
+typedef ValueSetWrapper< INT32 > Int32ValueSetWrapper;
+typedef ValueSetWrapper< UINT32 > UInt32ValueSetWrapper;
+
+typedef ValueSetWrapper< USHORT > UShortValueSetWrapper;
+typedef ValueSetWrapper< ULONG > ULongValueSetWrapper;
+
+// ============================================================================
+// Multi control wrappers
+// ============================================================================
+
+struct MultiControlWrapperHelper_Impl;
+
+/** A container of control wrappers.
+
+ Derived classes should define control wrapper members and register them in
+ their constructor, using the function RegisterControlWrapper().
+
+ This wrapper implements the abstract functions of the ControlWrapperBase
+ base class by calling the functions of all registered wrappers.
+ */
+class SFX2_DLLPUBLIC MultiControlWrapperHelper : public ControlWrapperBase
+{
+public:
+ explicit MultiControlWrapperHelper();
+ virtual ~MultiControlWrapperHelper();
+
+ /** Registers a control wrapper (should be a member of a derived class). */
+ void RegisterControlWrapper( ControlWrapperBase& rWrapper );
+
+ /** Enables, disables, shows, or hides the registered controls. */
+ virtual void ModifyControl( TriState eEnable, TriState eShow );
+
+ /** Returns true if all registered controls are in "don't know" state. */
+ virtual bool IsControlDontKnow() const;
+ /** Sets all registered controls to "don't know" state. */
+ virtual void SetControlDontKnow( bool bSet );
+
+private:
+ std::auto_ptr< MultiControlWrapperHelper_Impl > mxImpl;
+};
+
+// ----------------------------------------------------------------------------
+
+/** A multi control wrapper with extended interface.
+
+ This template class extends the MultiControlWrapperHelper class by the
+ functions GetControlValue() and SetControlValue(), known from the
+ SingleControlWrapper template. This makes it possible to use this template
+ in item connections expecting a single control wrapper. The type ValueT
+ should be able to contain the values of all controls handled in this
+ wrapper. In most cases, the easiest way to achieve this is to use the
+ related item type directly, using the IdentItemWrapper template
+ (itemwrapper.hxx).
+ */
+template< typename ValueT >
+class MultiControlWrapper : public MultiControlWrapperHelper
+{
+public:
+ typedef MultiControlWrapperHelper ControlType;
+ typedef ValueT ControlValueType;
+ typedef MultiControlWrapper< ValueT > MultiControlWrapperType;
+
+ MultiControlWrapper() : maDefValue( 0 ){}
+
+ /** Returns the default value that can be used in GetControlValue(). */
+ inline const ValueT& GetDefaultValue() const { return maDefValue; }
+ /** Sets a default value that can be used in GetControlValue(). */
+ inline void SetDefaultValue( const ValueT& rDefValue ) { maDefValue = rDefValue; }
+
+ /** Derived classes return the value the control contains. */
+ virtual ValueT GetControlValue() const = 0;
+ /** Derived classes set the contents of the control to the passed value. */
+ virtual void SetControlValue( ValueT aValue ) = 0;
+
+private:
+ ValueT maDefValue;
+};
+
+// ============================================================================
+
+
+// ============================================================================
+// *** Implementation of template functions ***
+// ============================================================================
+
+// ============================================================================
+// Helpers
+// ============================================================================
+
+template< typename PosT, typename ValueT >
+ValueT PosValueMapper< PosT, ValueT >::GetValueFromPos( PosT nPos ) const
+{
+ ValueT nValue;
+ if( mpMap )
+ {
+ const MapEntryType* pEntry = mpMap;
+ while( (pEntry->mnPos != nPos) && (pEntry->mnPos != mnNFPos) )
+ ++pEntry;
+ nValue = pEntry->mnValue;
+ }
+ else /* if( nPos != mnNFPos ) */
+ {
+ DBG_ASSERT( nPos != mnNFPos, "sfx2::PosValueMapper< PosT, ValueT >::GetValueFromPos(), previously uninitialized value found!" );
+ nValue = static_cast< ValueT >( nPos );
+ }
+
+ return nValue;
+}
+
+template< typename PosT, typename ValueT >
+PosT PosValueMapper< PosT, ValueT >::GetPosFromValue( ValueT nValue ) const
+{
+ PosT nPos = mnNFPos;
+ if( mpMap )
+ {
+ const MapEntryType* pEntry = mpMap;
+ while( (pEntry->mnValue != nValue) && (pEntry->mnPos != mnNFPos) )
+ ++pEntry;
+ nPos = pEntry->mnPos;
+ }
+ else if( nValue >= 0 )
+ nPos = static_cast< PosT >( nValue );
+ return nPos;
+}
+
+// ============================================================================
+// Single control wrappers
+// ============================================================================
+
+template< typename ControlT, typename ValueT >
+inline void SingleControlWrapper< ControlT, ValueT >::ModifyControl( TriState eEnable, TriState eShow )
+{
+ if( eEnable != STATE_DONTKNOW )
+ mrControl.Enable( eEnable == STATE_CHECK );
+ if( eShow != STATE_DONTKNOW )
+ mrControl.Show( eShow == STATE_CHECK );
+}
+
+// ============================================================================
+
+template< typename ValueT >
+bool NumericFieldWrapper< ValueT >::IsControlDontKnow() const
+{
+ return this->GetControl().GetText().Len() == 0;
+}
+
+template< typename ValueT >
+void NumericFieldWrapper< ValueT >::SetControlDontKnow( bool bSet )
+{
+ if( bSet )
+ this->GetControl().SetText( String() );
+}
+
+template< typename ValueT >
+ValueT NumericFieldWrapper< ValueT >::GetControlValue() const
+{
+ return static_cast< ValueT >( this->GetControl().Denormalize( this->GetControl().GetValue() ) );
+}
+
+template< typename ValueT >
+void NumericFieldWrapper< ValueT >::SetControlValue( ValueT nValue )
+{
+ this->GetControl().SetValue( this->GetControl().Normalize( static_cast< sal_Int64 >( nValue ) ) );
+}
+
+// ============================================================================
+
+template< typename ValueT >
+bool MetricFieldWrapper< ValueT >::IsControlDontKnow() const
+{
+ return this->GetControl().GetText().Len() == 0;
+}
+
+template< typename ValueT >
+void MetricFieldWrapper< ValueT >::SetControlDontKnow( bool bSet )
+{
+ if( bSet )
+ this->GetControl().SetText( String() );
+}
+
+template< typename ValueT >
+ValueT MetricFieldWrapper< ValueT >::GetControlValue() const
+{
+ return static_cast< ValueT >( this->GetControl().Denormalize( this->GetControl().GetValue( meUnit ) ) );
+}
+
+template< typename ValueT >
+void MetricFieldWrapper< ValueT >::SetControlValue( ValueT nValue )
+{
+ this->GetControl().SetValue( this->GetControl().Normalize( static_cast< sal_Int64 >( nValue ) ), meUnit );
+}
+
+// ============================================================================
+
+template< typename ValueT >
+ValueT ListBoxWrapper< ValueT >::GetControlValue() const
+{
+ return GetValueFromPos( this->GetControl().GetSelectEntryPos() );
+}
+
+template< typename ValueT >
+void ListBoxWrapper< ValueT >::SetControlValue( ValueT nValue )
+{
+ USHORT nPos = GetPosFromValue( nValue );
+ if( nPos != this->GetNotFoundPos() )
+ this->GetControl().SelectEntryPos( nPos );
+}
+
+// ----------------------------------------------------------------------------
+
+template< typename ValueT >
+ValueT ValueSetWrapper< ValueT >::GetControlValue() const
+{
+ return GetValueFromPos( this->GetControl().GetSelectItemId() );
+}
+
+template< typename ValueT >
+void ValueSetWrapper< ValueT >::SetControlValue( ValueT nValue )
+{
+ USHORT nPos = GetPosFromValue( nValue );
+ if( nPos != this->GetNotFoundPos() )
+ this->GetControl().SelectItem( nPos );
+}
+
+// ============================================================================
+
+
+} // namespace sfx
+
+#endif
+
diff --git a/sfx2/inc/sfx2/ctrlitem.hxx b/sfx2/inc/sfx2/ctrlitem.hxx
new file mode 100644
index 000000000000..53667fbf0aa7
--- /dev/null
+++ b/sfx2/inc/sfx2/ctrlitem.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * 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 _SFXCTRLITEM_HXX
+#define _SFXCTRLITEM_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <svl/poolitem.hxx>
+
+class SfxPoolItem;
+class SfxBindings;
+class SvStream;
+
+class SFX2_DLLPUBLIC SfxControllerItem
+{
+private:
+ USHORT nId;
+ SfxControllerItem* pNext; // zu benachrichtigendes weiteres ControllerItem
+ SfxBindings* pBindings;
+
+protected:
+//#if defined( DBG_UTIL ) && defined( _SOLAR__PRIVATE )
+#if defined( DBG_UTIL )
+ SAL_DLLPRIVATE void CheckConfigure_Impl( ULONG nType );
+#endif
+
+public:
+ SfxBindings & GetBindings() {
+ DBG_ASSERT(pBindings, "keine Bindings");
+ return *pBindings;
+ }
+ const SfxBindings & GetBindings() const {
+ DBG_ASSERT(pBindings, "keine Bindings");
+ return *pBindings;
+ }
+
+ SfxControllerItem(); // fuer arrays
+ SfxControllerItem( USHORT nId, SfxBindings & );
+ virtual ~SfxControllerItem();
+
+ void Bind( USHORT nNewId, SfxBindings * = 0); // in SfxBindings registrieren
+ void UnBind();
+ void ReBind();
+ BOOL IsBound() const;
+ void UpdateSlot();
+ void ClearCache();
+ void SetBindings(SfxBindings &rBindings) { pBindings = &rBindings; }
+
+ SfxControllerItem* GetItemLink();
+ SfxControllerItem* ChangeItemLink( SfxControllerItem* pNewLink );
+
+ void SetId( USHORT nItemId );
+ USHORT GetId() const { return nId; }
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void DeleteFloatingWindow();
+
+ SfxMapUnit GetCoreMetric() const;
+
+ static SfxItemState GetItemState( const SfxPoolItem* pState );
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE BOOL IsBindable_Impl() const
+ { return pBindings != NULL; }
+ SAL_DLLPRIVATE void BindInternal_Impl( USHORT nNewId, SfxBindings* );
+//#endif
+};
+
+//====================================================================
+
+class SFX2_DLLPUBLIC SfxStatusForwarder: public SfxControllerItem
+{
+ SfxControllerItem* pMaster;
+
+protected:
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+
+public:
+ SfxStatusForwarder( USHORT nSlotId,
+ SfxControllerItem&rMaster );
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/dialogs.hrc b/sfx2/inc/sfx2/dialogs.hrc
new file mode 100644
index 000000000000..97e9dd725c9a
--- /dev/null
+++ b/sfx2/inc/sfx2/dialogs.hrc
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * 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 _SFX2_DIALOGS_HRC
+#define _SFX2_DIALOGS_HRC
+
+// include ------------------------------------------------------------------
+
+#include <sfx2/sfxsids.hrc>
+
+#define RID_OFA_AUTOCORR_DLG (RID_OFA_START + 101)
+#define RID_SVXDLG_CUSTOMIZE (RID_SVX_START + 291)
+
+#endif
+
diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx
new file mode 100644
index 000000000000..4a33afde24d5
--- /dev/null
+++ b/sfx2/inc/sfx2/dinfdlg.hxx
@@ -0,0 +1,575 @@
+/*************************************************************************
+ *
+ * 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_DINFDLG_HXX
+#define _SFX_DINFDLG_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <com/sun/star/util/DateTime.hpp>
+#include <vcl/edit.hxx>
+#include <vcl/field.hxx>
+#include <svtools/stdctrl.hxx>
+#include <svl/stritem.hxx>
+#include <svtools/svmedit.hxx>
+
+#include <vcl/edit.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/scrbar.hxx>
+#include <svtools/headbar.hxx>
+#include <unotools/syslocale.hxx>
+#include <svl/zforlist.hxx>
+#include <com/sun/star/util/Duration.hpp>
+#include "tabdlg.hxx"
+
+namespace com { namespace sun { namespace star {
+ namespace document {
+ class XDocumentProperties;
+ }
+} } }
+
+struct CustomProperty;
+
+
+// class SfxDocumentInfoItem ---------------------------------------------
+
+class SFX2_DLLPUBLIC SfxDocumentInfoItem : public SfxStringItem
+{
+private:
+ sal_Int32 m_AutoloadDelay;
+ ::rtl::OUString m_AutoloadURL;
+ sal_Bool m_isAutoloadEnabled;
+ ::rtl::OUString m_DefaultTarget;
+ ::rtl::OUString m_TemplateName;
+ ::rtl::OUString m_Author;
+ ::com::sun::star::util::DateTime m_CreationDate;
+ ::rtl::OUString m_ModifiedBy;
+ ::com::sun::star::util::DateTime m_ModificationDate;
+ ::rtl::OUString m_PrintedBy;
+ ::com::sun::star::util::DateTime m_PrintDate;
+ sal_Int16 m_EditingCycles;
+ sal_Int32 m_EditingDuration;
+ ::rtl::OUString m_Description;
+ ::rtl::OUString m_Keywords;
+ ::rtl::OUString m_Subject;
+ ::rtl::OUString m_Title;
+ sal_Bool m_bHasTemplate;
+ sal_Bool m_bDeleteUserData;
+ sal_Bool m_bUseUserData;
+ std::vector< CustomProperty* > m_aCustomProperties;
+
+public:
+ TYPEINFO();
+ SfxDocumentInfoItem();
+ SfxDocumentInfoItem( const String &rFileName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties> & i_xDocProps,
+ sal_Bool bUseUserData );
+ SfxDocumentInfoItem( const SfxDocumentInfoItem& );
+ virtual ~SfxDocumentInfoItem();
+
+ /// update i_xDocProps with the data in this object
+ void UpdateDocumentInfo(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties> & i_xDocProps,
+ bool i_bDoNotUpdateUserDefined = false)
+ const;
+
+ sal_Bool isAutoloadEnabled() const { return m_isAutoloadEnabled; }
+ void setAutoloadEnabled(sal_Bool i_val) { m_isAutoloadEnabled = i_val; }
+ sal_Int32 getAutoloadDelay() const { return m_AutoloadDelay; }
+ void setAutoloadDelay(sal_Int32 i_val) { m_AutoloadDelay = i_val; }
+ ::rtl::OUString getAutoloadURL() const { return m_AutoloadURL; }
+ void setAutoloadURL(::rtl::OUString i_val) { m_AutoloadURL = i_val; }
+ ::rtl::OUString getDefaultTarget() const { return m_DefaultTarget; }
+ void setDefaultTarget(::rtl::OUString i_val) { m_DefaultTarget = i_val; }
+ ::rtl::OUString getTemplateName() const { return m_TemplateName; }
+ void setTemplateName(::rtl::OUString i_val) { m_TemplateName = i_val; }
+ ::rtl::OUString getAuthor() const { return m_Author; }
+ void setAuthor(::rtl::OUString i_val) { m_Author = i_val; }
+
+ ::com::sun::star::util::DateTime
+ getCreationDate() const { return m_CreationDate; }
+ void setCreationDate(::com::sun::star::util::DateTime i_val) {
+ m_CreationDate = i_val;
+ }
+ ::rtl::OUString getModifiedBy() const { return m_ModifiedBy; }
+ void setModifiedBy(::rtl::OUString i_val) { m_ModifiedBy = i_val; }
+
+ ::com::sun::star::util::DateTime
+ getModificationDate() const { return m_ModificationDate; }
+ void setModificationDate(::com::sun::star::util::DateTime i_val) {
+ m_ModificationDate = i_val;
+ }
+ ::rtl::OUString getPrintedBy() const { return m_PrintedBy; }
+ void setPrintedBy(::rtl::OUString i_val) { m_PrintedBy = i_val; }
+ ::com::sun::star::util::DateTime
+ getPrintDate() const { return m_PrintDate; }
+ void setPrintDate(::com::sun::star::util::DateTime i_val) {
+ m_PrintDate = i_val;
+ }
+ sal_Int16 getEditingCycles() const { return m_EditingCycles; }
+ void setEditingCycles(sal_Int16 i_val) { m_EditingCycles = i_val; }
+ sal_Int32 getEditingDuration() const { return m_EditingDuration; }
+ void setEditingDuration(sal_Int32 i_val) { m_EditingDuration = i_val; }
+ ::rtl::OUString getDescription() const { return m_Description; }
+ void setDescription(::rtl::OUString i_val) { m_Description = i_val; }
+ ::rtl::OUString getKeywords() const { return m_Keywords; }
+ void setKeywords(::rtl::OUString i_val) { m_Keywords = i_val; }
+ ::rtl::OUString getSubject() const { return m_Subject; }
+ void setSubject(::rtl::OUString i_val) { m_Subject = i_val; }
+ ::rtl::OUString getTitle() const { return m_Title; }
+ void setTitle(::rtl::OUString i_val) { m_Title = i_val; }
+
+ /// reset user-specific data (author, modified-by, ...)
+ void resetUserData(const ::rtl::OUString & i_rAuthor);
+
+ void SetTemplate( sal_Bool b ) { m_bHasTemplate = b; }
+ sal_Bool HasTemplate() const { return m_bHasTemplate; }
+ void SetDeleteUserData( sal_Bool bSet );
+ void SetUseUserData( sal_Bool bSet );
+ sal_Bool IsDeleteUserData() const;
+ sal_Bool IsUseUserData() const;
+
+ std::vector< CustomProperty* > GetCustomProperties() const;
+ void ClearCustomProperties();
+ void AddCustomProperty( const ::rtl::OUString& sName,
+ const com::sun::star::uno::Any& rValue );
+
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+// class SfxDocumentPage -------------------------------------------------
+
+class SfxDocumentPage : public SfxTabPage
+{
+private:
+ FixedImage aBmp1;
+ Edit aNameED;
+
+ FixedLine aLine1FL;
+ FixedText aTypeFT;
+ svt::SelectableFixedText aShowTypeFT;
+ CheckBox aReadOnlyCB;
+ FixedText aFileFt;
+ svt::SelectableFixedText aFileValFt;
+ FixedText aSizeFT;
+ svt::SelectableFixedText aShowSizeFT;
+
+ FixedLine aLine2FL;
+ FixedText aCreateFt;
+ svt::SelectableFixedText aCreateValFt;
+ FixedText aChangeFt;
+ svt::SelectableFixedText aChangeValFt;
+ FixedText aSignedFt;
+ svt::SelectableFixedText aSignedValFt;
+ PushButton aSignatureBtn;
+ FixedText aPrintFt;
+ svt::SelectableFixedText aPrintValFt;
+ FixedText aTimeLogFt;
+ svt::SelectableFixedText aTimeLogValFt;
+ FixedText aDocNoFt;
+ svt::SelectableFixedText aDocNoValFt;
+ CheckBox aUseUserDataCB;
+ PushButton aDeleteBtn;
+
+ FixedLine aLine3FL;
+ FixedText aTemplFt;
+ svt::SelectableFixedText aTemplValFt;
+
+ String aUnknownSize;
+ String aMultiSignedStr;
+
+ BOOL bEnableUseUserData : 1,
+ bHandleDelete : 1;
+
+ DECL_LINK( DeleteHdl, PushButton * );
+ DECL_LINK( SignatureHdl, PushButton * );
+ void ImplUpdateSignatures();
+
+protected:
+ SfxDocumentPage( Window* pParent, const SfxItemSet& );
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& );
+
+ void EnableUseUserData();
+};
+
+// class SfxDocumentDescPage ---------------------------------------------
+
+class SfxDocumentDescPage : public SfxTabPage
+{
+private:
+ FixedText aTitleFt;
+ Edit aTitleEd;
+ FixedText aThemaFt;
+ Edit aThemaEd;
+ FixedText aKeywordsFt;
+ Edit aKeywordsEd;
+ FixedText aCommentFt;
+ MultiLineEdit aCommentEd;
+ SfxDocumentInfoItem* pInfoItem;
+
+protected:
+ SfxDocumentDescPage( Window* pParent, const SfxItemSet& );
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& );
+};
+
+// class SfxInternetPage -------------------------------------------------
+
+class TargetList;
+namespace sfx2
+{
+ class FileDialogHelper;
+}
+
+class SfxInternetPage : public SfxTabPage
+{
+private:
+ RadioButton aRBNoAutoUpdate;
+ RadioButton aRBReloadUpdate;
+ RadioButton aRBForwardUpdate;
+
+ FixedText aFTEvery;
+ NumericField aNFReload;
+ FixedText aFTReloadSeconds;
+
+ FixedText aFTAfter;
+ NumericField aNFAfter;
+ FixedText aFTAfterSeconds;
+ FixedText aFTURL;
+ Edit aEDForwardURL;
+ PushButton aPBBrowseURL;
+ FixedText aFTFrame;
+ ComboBox aCBFrame;
+
+ String aForwardErrorMessg;
+ String aBaseURL;
+ SfxDocumentInfoItem* pInfoItem;
+ sfx2::FileDialogHelper* pFileDlg;
+
+ enum STATE { S_Init, S_NoUpdate, S_Reload, S_Forward };
+ // S_Init is only valid as initial value
+ STATE eState;
+
+ void ChangeState( STATE eNewState ); // S_Init is not a valid value here
+ // also checks corresponding radiobutton
+ void EnableNoUpdate( BOOL bEnable );
+ void EnableReload( BOOL bEnable );
+ void EnableForward( BOOL bEnable );
+
+ DECL_LINK( ClickHdlNoUpdate, Control* );
+ DECL_LINK( ClickHdlReload, Control* );
+ DECL_LINK( ClickHdlForward, Control* );
+ DECL_LINK( ClickHdlBrowseURL, PushButton* );
+ DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
+
+ using TabPage::DeactivatePage;
+
+protected:
+ SfxInternetPage( Window* pParent, const SfxItemSet& );
+ ~SfxInternetPage();
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& );
+};
+
+// class SfxDocumentInfoDialog -------------------------------------------
+
+class SFX2_DLLPUBLIC SfxDocumentInfoDialog : public SfxTabDialog
+{
+protected:
+ virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+
+public:
+ SfxDocumentInfoDialog( Window* pParent, const SfxItemSet& );
+};
+
+// class CustomPropertiesRemoveButton ------------------------------------
+
+struct CustomPropertyLine;
+
+class CustomPropertiesEdit : public Edit
+{
+private:
+ CustomPropertyLine* m_pLine;
+
+public:
+ inline CustomPropertiesEdit(
+ Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
+ Edit( pParent, rResId ), m_pLine( pLine ) {}
+
+ inline CustomPropertyLine* GetLine() const { return m_pLine; }
+};
+
+class CustomPropertiesTypeBox : public ListBox
+{
+private:
+ CustomPropertyLine* m_pLine;
+
+public:
+ inline CustomPropertiesTypeBox(
+ Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
+ ListBox( pParent, rResId ), m_pLine( pLine ) {}
+
+ inline CustomPropertyLine* GetLine() const { return m_pLine; }
+};
+
+class CustomPropertiesDateField : public DateField
+{
+private:
+ CustomPropertyLine* m_pLine;
+
+public:
+ inline CustomPropertiesDateField(
+ Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
+ DateField( pParent, rResId ), m_pLine( pLine ) {}
+
+ inline CustomPropertyLine* GetLine() const { return m_pLine; }
+};
+class CustomPropertiesTimeField : public TimeField
+{
+private:
+ CustomPropertyLine* m_pLine;
+
+public:
+ inline CustomPropertiesTimeField(
+ Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
+ TimeField( pParent, rResId ), m_pLine( pLine ) {}
+
+ inline CustomPropertyLine* GetLine() const { return m_pLine; }
+};
+class CustomPropertiesDurationField : public Edit
+{
+ CustomPropertyLine* m_pLine;
+ com::sun::star::util::Duration m_aDuration;
+protected:
+ virtual void RequestHelp(const HelpEvent& rEvt);
+public:
+ CustomPropertiesDurationField( Window* pParent, const ResId& rResId, CustomPropertyLine* pLine );
+ ~CustomPropertiesDurationField();
+
+ void SetDuration( const com::sun::star::util::Duration& rDuration );
+ const com::sun::star::util::Duration& GetDuration() const { return m_aDuration; }
+};
+
+class CustomPropertiesEditButton : public PushButton
+{
+ CustomPropertyLine* m_pLine;
+
+public:
+ CustomPropertiesEditButton( Window* pParent, const ResId& rResId, CustomPropertyLine* pLine );
+ ~CustomPropertiesEditButton();
+
+ DECL_LINK(ClickHdl, PushButton*);
+};
+
+class CustomPropertiesRemoveButton : public ImageButton
+{
+private:
+ CustomPropertyLine* m_pLine;
+
+public:
+ inline CustomPropertiesRemoveButton(
+ Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
+ ImageButton( pParent, rResId ), m_pLine( pLine ) {}
+
+ inline CustomPropertyLine* GetLine() const { return m_pLine; }
+};
+
+class CustomPropertiesYesNoButton : public Control
+{
+private:
+ RadioButton m_aYesButton;
+ RadioButton m_aNoButton;
+
+public:
+ CustomPropertiesYesNoButton( Window* pParent, const ResId& rResId );
+
+ virtual void Resize();
+
+ inline void CheckYes() { m_aYesButton.Check(); }
+ inline void CheckNo() { m_aNoButton.Check(); }
+ inline bool IsYesChecked() const { return m_aYesButton.IsChecked() != FALSE; }
+};
+
+// struct CustomPropertyLine ---------------------------------------------
+
+struct CustomPropertyLine
+{
+ ComboBox m_aNameBox;
+ CustomPropertiesTypeBox m_aTypeBox;
+ CustomPropertiesEdit m_aValueEdit;
+ CustomPropertiesDateField m_aDateField;
+ CustomPropertiesTimeField m_aTimeField;
+ const String m_sDurationFormat;
+ CustomPropertiesDurationField m_aDurationField;
+ CustomPropertiesEditButton m_aEditButton;
+ CustomPropertiesYesNoButton m_aYesNoButton;
+ CustomPropertiesRemoveButton m_aRemoveButton;
+
+ Point m_aDatePos;
+ Point m_aTimePos;
+ Size m_aDateTimeSize;
+
+ bool m_bIsRemoved;
+ bool m_bTypeLostFocus;
+
+ CustomPropertyLine( Window* pParent );
+
+ void SetRemoved();
+};
+
+// class CustomPropertiesWindow ------------------------------------------
+
+class CustomPropertiesWindow : public Window
+{
+private:
+ ComboBox m_aNameBox;
+ ListBox m_aTypeBox;
+ Edit m_aValueEdit;
+ DateField m_aDateField;
+ TimeField m_aTimeField;
+ Edit m_aDurationField;
+ PushButton m_aEditButton;
+ CustomPropertiesYesNoButton m_aYesNoButton;
+ ImageButton m_aRemoveButton;
+
+ sal_Int32 m_nLineHeight;
+ sal_Int32 m_nScrollPos;
+ SvtSysLocale m_aSysLocale;
+ std::vector< CustomPropertyLine* > m_aCustomPropertiesLines;
+ CustomPropertyLine* m_pCurrentLine;
+ SvNumberFormatter m_aNumberFormatter;
+ Timer m_aEditLoseFocusTimer;
+ Timer m_aBoxLoseFocusTimer;
+ Link m_aRemovedHdl;
+
+ DECL_LINK( TypeHdl, CustomPropertiesTypeBox* );
+ DECL_LINK( RemoveHdl, CustomPropertiesRemoveButton* );
+ DECL_LINK( EditLoseFocusHdl, CustomPropertiesEdit* );
+ DECL_LINK( BoxLoseFocusHdl, CustomPropertiesTypeBox* );
+ //add lose focus handlers of Date/TimeField?
+
+ DECL_LINK( EditTimeoutHdl, Timer* );
+ DECL_LINK( BoxTimeoutHdl, Timer* );
+
+ bool IsLineValid( CustomPropertyLine* pLine ) const;
+ void ValidateLine( CustomPropertyLine* pLine, bool bIsFromTypeBox );
+
+public:
+ CustomPropertiesWindow( Window* pParent, const ResId& rResId );
+ ~CustomPropertiesWindow();
+
+ void InitControls( HeaderBar* pHeaderBar, const ScrollBar* pScrollBar );
+ USHORT GetVisibleLineCount() const;
+ inline sal_Int32 GetLineHeight() const { return m_nLineHeight; }
+ void AddLine( const ::rtl::OUString& sName, com::sun::star::uno::Any& rAny );
+ bool AreAllLinesValid() const;
+ void ClearAllLines();
+ void DoScroll( sal_Int32 nNewPos );
+
+ bool DoesCustomPropertyExist( const String& rName ) const;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ GetCustomProperties() const;
+ void SetRemovedHdl( const Link& rLink ) { m_aRemovedHdl = rLink; }
+};
+
+// class CustomPropertiesControl -----------------------------------------
+
+class CustomPropertiesControl : public Control
+{
+private:
+ HeaderBar m_aHeaderBar;
+ CustomPropertiesWindow m_aPropertiesWin;
+ ScrollBar m_aVertScroll;
+
+ bool m_bIsInitialized;
+ sal_Int32 m_nThumbPos;
+
+ void Initialize();
+
+ DECL_LINK( ScrollHdl, ScrollBar* );
+ DECL_LINK( RemovedHdl, void* );
+
+public:
+ CustomPropertiesControl( Window* pParent, const ResId& rResId );
+ ~CustomPropertiesControl();
+
+ void AddLine( const ::rtl::OUString& sName, com::sun::star::uno::Any& rAny, bool bInteractive );
+
+ inline bool AreAllLinesValid() const { return m_aPropertiesWin.AreAllLinesValid(); }
+ inline void ClearAllLines() { m_aPropertiesWin.ClearAllLines(); }
+ inline bool DoesCustomPropertyExist( const String& rName ) const
+ { return m_aPropertiesWin.DoesCustomPropertyExist( rName ); }
+ inline ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ GetCustomProperties() const
+ { return m_aPropertiesWin.GetCustomProperties(); }
+};
+
+// class SfxCustomPropertiesPage -----------------------------------------
+
+class SfxCustomPropertiesPage : public SfxTabPage
+{
+private:
+ FixedText m_aPropertiesFT;
+ CustomPropertiesControl m_aPropertiesCtrl;
+ PushButton m_aAddBtn;
+
+ DECL_LINK( AddHdl, PushButton* );
+
+ using TabPage::DeactivatePage;
+
+protected:
+ SfxCustomPropertiesPage( Window* pParent, const SfxItemSet& );
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+ virtual int DeactivatePage( SfxItemSet* pSet = NULL );
+
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& );
+};
+
+#endif // #ifndef _SFX_DINFDLG_HXX
+
diff --git a/sfx2/inc/sfx2/dispatch.hxx b/sfx2/inc/sfx2/dispatch.hxx
new file mode 100644
index 000000000000..f0dd2248c456
--- /dev/null
+++ b/sfx2/inc/sfx2/dispatch.hxx
@@ -0,0 +1,366 @@
+/*************************************************************************
+ *
+ * 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 _SFXDISPATCH_HXX
+#define _SFXDISPATCH_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+
+#include <stdarg.h>
+
+#define _SVSTDARR_USHORTS
+#include <svl/svstdarr.hxx> // SvUShorts
+
+#include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
+
+class SfxSlotServer;
+class SfxShell;
+class SfxRequest;
+class SfxShellStack_Impl;
+class SfxHintPoster;
+class SfxViewFrame;
+class SfxBindings;
+class SfxItemSet;
+class SfxPopupMenuManager;
+class SfxModule;
+struct SfxDispatcher_Impl;
+struct SfxPlugInInfo_Impl;
+
+namespace com
+{
+ namespace sun
+ {
+ namespace star
+ {
+ namespace frame
+ {
+ class XDispatch;
+ }
+ }
+ }
+}
+
+//=========================================================================
+
+#define SFX_SHELL_POP_UNTIL 4
+#define SFX_SHELL_POP_DELETE 2
+#define SFX_SHELL_PUSH 1
+
+//=========================================================================
+
+typedef SfxPoolItem* SfxPoolItemPtr;
+SV_DECL_PTRARR_DEL( SfxItemPtrArray, SfxPoolItemPtr, 4, 4 )
+
+// fuer shell.cxx
+typedef SfxItemPtrArray SfxItemArray_Impl;
+
+class SfxExecuteItem : public SfxItemPtrArray, public SfxPoolItem
+{
+ USHORT nSlot;
+ SfxCallMode eCall;
+ USHORT nModifier;
+public:
+ USHORT GetSlot() const { return nSlot; }
+ USHORT GetModifier() const { return nModifier; }
+ void SetModifier( USHORT nModifierP ) { nModifier = nModifierP; }
+ SfxCallMode GetCallMode() const { return eCall; }
+ void SetCallMode( SfxCallMode eMode ) { eCall = eMode; }
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ SfxExecuteItem(
+ USHORT nWhich, USHORT nSlot, SfxCallMode eMode,
+ const SfxPoolItem *pArg1, ... );
+ SfxExecuteItem(
+ USHORT nWhich, USHORT nSlot, SfxCallMode eMode );
+ SfxExecuteItem( const SfxExecuteItem& );
+};
+
+//=========================================================================
+
+class SFX2_DLLPUBLIC SfxDispatcher
+{
+ SfxDispatcher_Impl* pImp;
+ BOOL bFlushed;
+
+private:
+ // auf temporaer ausgewerteten Todos suchen
+ SAL_DLLPRIVATE BOOL CheckVirtualStack( const SfxShell& rShell, BOOL bDeep );
+
+#ifndef _SFX_HXX
+
+friend class SfxApplication;
+friend class SfxViewFrame;
+
+ DECL_DLLPRIVATE_LINK( EventHdl_Impl, void * );
+ DECL_DLLPRIVATE_LINK( PostMsgHandler, SfxRequest * );
+
+ SAL_DLLPRIVATE int Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest &rReq, BOOL bRecord );
+ SAL_DLLPRIVATE sal_uInt32 _Update_Impl( BOOL,BOOL,BOOL,SfxWorkWindow*);
+ SAL_DLLPRIVATE void CollectTools_Impl(SfxWorkWindow*);
+
+protected:
+friend class SfxBindings;
+friend class SfxStateCache;
+friend class SfxPopupMenuManager;
+friend class SfxHelp;
+ // Fuer die Bindings: Finden einer Message; Level fuer
+ // erneuten Zugriff
+ SAL_DLLPRIVATE BOOL _TryIntercept_Impl( USHORT nId, SfxSlotServer &rServer, BOOL bModal );
+ BOOL _FindServer( USHORT nId, SfxSlotServer &rServer, BOOL bModal );
+ BOOL _FillState( const SfxSlotServer &rServer,
+ SfxItemSet &rState, const SfxSlot *pRealSlot );
+ const SfxPoolItem* _Execute( const SfxSlotServer &rServer );
+ void _Execute( SfxShell &rShell, const SfxSlot &rSlot,
+ SfxRequest &rReq,
+ SfxCallMode eCall = SFX_CALLMODE_STANDARD);
+ const SfxPoolItem* _Execute( USHORT nSlot, SfxCallMode eCall,
+ va_list pArgs, const SfxPoolItem *pArg1 );
+
+#endif
+protected:
+ void FlushImpl();
+
+public:
+ SfxDispatcher( SfxDispatcher* pParent );
+ SfxDispatcher( SfxViewFrame *pFrame = 0 );
+
+ SAL_DLLPRIVATE void Construct_Impl( SfxDispatcher* pParent );
+
+ virtual ~SfxDispatcher();
+
+ const SfxPoolItem* Execute( const SfxExecuteItem& rItem );
+ virtual USHORT ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs=0, USHORT nMode=0 );
+ USHORT ExecuteFunction( USHORT nSID, const SfxItemSet& rArgs , USHORT nMode=0 );
+
+ virtual void SetExecuteMode( USHORT );
+
+ const SfxPoolItem* Execute( USHORT nSlot,
+ SfxCallMode nCall = SFX_CALLMODE_SLOT,
+ const SfxPoolItem **pArgs = 0,
+ USHORT nModi = 0,
+ const SfxPoolItem **pInternalArgs = 0);
+
+ const SfxPoolItem* Execute( USHORT nSlot,
+ SfxCallMode nCall,
+ SfxItemSet* pArgs,
+ SfxItemSet* pInternalArgs,
+ USHORT nModi = 0);
+
+ const SfxPoolItem* Execute( USHORT nSlot,
+ SfxCallMode nCall,
+ const SfxPoolItem *pArg1, ... );
+
+ const SfxPoolItem* Execute( USHORT nSlot,
+ SfxCallMode nCall,
+ const SfxItemSet &rArgs );
+
+ const SfxPoolItem* Execute( USHORT nSlot,
+ SfxCallMode nCall,
+ USHORT nModi,
+ const SfxItemSet &rArgs );
+
+ USHORT GetSlotId( const String& rCommand );
+ const SfxSlot* GetSlot( const String& rCommand );
+
+ BOOL IsActive( const SfxShell& rShell );
+ BOOL IsOnTop( const SfxShell& rShell );
+ USHORT GetShellLevel( const SfxShell &rShell );
+ SfxBindings* GetBindings() const;
+
+ void Push( SfxShell& rShell );
+ void Pop( SfxShell& rShell, USHORT nMode = 0 );
+
+ SfxShell* GetShell(USHORT nIdx) const;
+ SfxViewFrame* GetFrame() const;
+ SfxModule* GetModule() const;
+ // caller has to clean up the Manager on his own
+ static SfxPopupMenuManager* Popup( sal_uInt16 nConfigId,Window *pWin, const Point *pPos );
+
+ void ExecutePopup( const ResId &rId,
+ Window *pWin = 0, const Point *pPosPixel = 0 );
+ static void ExecutePopup( USHORT nConfigId = 0,
+ Window *pWin = 0, const Point *pPosPixel = 0 );
+ static void ExecutePopup( USHORT nConfigId,
+ Window *pWin, const Point *pPosPixel,
+ const SfxPoolItem *pArg1, ... );
+
+ void EnterAction( const String& rName );
+ void LeaveAction();
+
+ BOOL IsAppDispatcher() const;
+ BOOL IsFlushed() const;
+ void Flush();
+ void Lock( BOOL bLock );
+ BOOL IsLocked( USHORT nSID = 0 ) const;
+ void SetSlotFilter( BOOL bEnable = FALSE,
+ USHORT nCount = 0, const USHORT *pSIDs = 0 );
+
+ void HideUI( BOOL bHide = TRUE );
+ void ShowObjectBar(USHORT nId, SfxShell *pShell=0) const;
+ sal_uInt32 GetObjectBarId( USHORT nPos ) const;
+
+ SfxItemState QueryState( USHORT nSID, const SfxPoolItem* &rpState );
+ SfxItemState QueryState( USHORT nSID, ::com::sun::star::uno::Any& rAny );
+
+ BOOL IsAllowed( USHORT nSlot ) const;
+ ::com::sun::star::frame::XDispatch* GetDispatchInterface( const String& );
+ void SetDisableFlags( sal_uInt32 nFlags );
+ sal_uInt32 GetDisableFlags() const;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE BOOL HasSlot_Impl( USHORT );
+ SAL_DLLPRIVATE void SetMenu_Impl();
+ SAL_DLLPRIVATE long Update_Impl( BOOL bForce = FALSE ); // ObjectBars etc.
+ SAL_DLLPRIVATE BOOL IsUpdated_Impl() const;
+ SAL_DLLPRIVATE void DebugOutput_Impl() const;
+ SAL_DLLPRIVATE void ResetObjectBars_Impl();
+ SAL_DLLPRIVATE int GetShellAndSlot_Impl( USHORT nSlot, SfxShell **ppShell, const SfxSlot **ppSlot,
+ BOOL bOwnShellsOnly, BOOL bModal, BOOL bRealSlot=TRUE );
+ SAL_DLLPRIVATE void LockUI_Impl( BOOL bLock = TRUE );
+ SAL_DLLPRIVATE void SetReadOnly_Impl( BOOL bOn );
+ SAL_DLLPRIVATE BOOL GetReadOnly_Impl() const;
+ SAL_DLLPRIVATE BOOL IsSlotEnabledByFilter_Impl( USHORT nSID ) const;
+ SAL_DLLPRIVATE void SetQuietMode_Impl( BOOL bOn );
+ SAL_DLLPRIVATE void SetModalMode_Impl( BOOL bOn );
+ SAL_DLLPRIVATE BOOL IsReadOnlyShell_Impl( USHORT nShell ) const;
+ SAL_DLLPRIVATE void RemoveShell_Impl( SfxShell& rShell );
+ SAL_DLLPRIVATE void InsertShell_Impl( SfxShell& rShell, USHORT nPos );
+ SAL_DLLPRIVATE void DoParentActivate_Impl();
+ SAL_DLLPRIVATE void DoParentDeactivate_Impl();
+ SAL_DLLPRIVATE void DoActivate_Impl( BOOL bMDI, SfxViewFrame* pOld );
+ SAL_DLLPRIVATE void DoDeactivate_Impl( BOOL bMDI, SfxViewFrame* pNew );
+ SAL_DLLPRIVATE void InvalidateBindings_Impl(BOOL);
+ SAL_DLLPRIVATE USHORT GetNextToolBox_Impl( USHORT nPos, USHORT nType, String *pStr );
+//#endif
+};
+
+//--------------------------------------------------------------------
+
+inline BOOL SfxDispatcher::IsFlushed() const
+
+/* [Beschreibung]
+
+ Mit dieser Methode l"a"st sich erfragen, ob der Stack des
+ SfxDispatchers geflusht ist, oder noch Push- oder Pop-Befehle
+ ausstehen.
+*/
+
+{
+ return bFlushed;
+}
+
+//--------------------------------------------------------------------
+
+inline void SfxDispatcher::Flush()
+
+/* [Beschreibung]
+
+ Diese Methode f"uhrt ausstehenden Push- und Pop-Befehle aus.
+ F"ur <SfxShell>s, die dabei neu auf den Stack kommen, wird
+ <SfxShell::Activate(BOOL)> mit bMDI == TRUE aufgerufen, f"ur
+ SfxShells, die vom Stack entfernt werden, wird <SfxShell::Deactivate(BOOL)>
+ mit bMDI == TRUE aufgerufen.
+*/
+
+{
+ if ( !bFlushed ) FlushImpl();
+}
+
+//--------------------------------------------------------------------
+
+inline void SfxDispatcher::Push( SfxShell& rShell )
+
+/* [Beschreibung]
+
+ Mit dieser Methode wird eine <SfxShell> auf den SfxDispatcher
+ gepusht. Die SfxShell wird zun"achst zum pushen vermerkt und
+ es wird ein Timer aufgesetzt. Erst bei Ablauf des Timers wird
+ tats"achlich gepusht (<SfxDispatcher::Flush()>) und die <SfxBindings>
+ werden invalidiert. W"ahrend der Timer l"auft gleichen sich
+ entgegengesetzte Push und Pop Befehle mit derselben SfxShell aus.
+*/
+
+{
+ Pop( rShell, SFX_SHELL_PUSH );
+}
+
+//--------------------------------------------------------------------
+
+inline BOOL SfxDispatcher::IsActive( const SfxShell& rShell )
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann abgefragt werden, ob sich eine bestimmte
+ <SfxShell>-Instanz auf dem SfxDispatcher befindet.
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Die SfxShell-Instanz befindet sich auf dem
+ SfxDispatcher.
+
+ FALSE
+ Die SfxShell-Instanz befindet sich nicht auf dem
+ SfxDispatcher.
+
+*/
+
+{
+ return CheckVirtualStack( rShell, TRUE );
+}
+//--------------------------------------------------------------------
+
+inline BOOL SfxDispatcher::IsOnTop( const SfxShell& rShell )
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann abgefragt werden, ob sich eine bestimmte
+ <SfxShell>-Instanz zuoberst auf dem SfxDispatcher befindet.
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Die SfxShell-Instanz befindet sich als oberste
+ SfxShell auf dem SfxDispatcher.
+
+ FALSE
+ Die SfxShell-Instanz befindet sich nicht als
+ oberste SfxShell auf dem SfxDispatcher.
+
+*/
+
+{
+ return CheckVirtualStack( rShell, FALSE );
+}
+
+//--------------------------------------------------------------------
+
+#endif
+
diff --git a/sfx2/inc/sfx2/dllapi.h b/sfx2/inc/sfx2/dllapi.h
new file mode 100644
index 000000000000..78066a4b2d7c
--- /dev/null
+++ b/sfx2/inc/sfx2/dllapi.h
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_SFX2_DLLAPI_H
+#define INCLUDED_SFX2_DLLAPI_H
+
+#include "sal/config.h"
+#include "sal/types.h"
+
+#if defined SFX2_DLLIMPLEMENTATION
+#define SFX2_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define SFX2_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+#define SFX2_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif
diff --git a/sfx2/inc/sfx2/docfac.hxx b/sfx2/inc/sfx2/docfac.hxx
new file mode 100644
index 000000000000..3cc3eecc7ce7
--- /dev/null
+++ b/sfx2/inc/sfx2/docfac.hxx
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_OBJFAC_HXX
+#define _SFX_OBJFAC_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <sal/types.h>
+#include <tools/solar.h>
+#include <tools/rtti.hxx>
+
+// SFX_IMPL_MODULE_LIB
+#include <vos/module.hxx>
+#include <rtl/ustring.hxx>
+
+#include <sfx2/objsh.hxx>
+#include <sfx2/sfxdefs.hxx>
+
+class SfxObjectFactoryArr_Impl;
+class SfxMedium;
+class SfxFilter;
+class SfxViewFactory;
+struct SfxObjectFactory_Impl;
+class SfxFilterContainer;
+class SfxBindings;
+
+//====================================================================
+
+typedef void (*SfxVoidFunc)();
+
+#define SDT_SDT_DOCFACTPRIO 10 // Explorer
+#define SDT_SW_DOCFACTPRIO 20 // Text-Dokument
+#define SDT_SWW_DOCFACTPRIO 21 // Web-Dokument
+#define SDT_SC_DOCFACTPRIO 30 // Tabellen-Dokument
+#define SDT_SI_DOCFACTPRIO 40 // Impress-Dokument
+#define SDT_SD_DOCFACTPRIO 41 // Draw-Dokument
+#define SDT_SCH_DOCFACTPRIO 50 // Chart-Dokument
+#define SDT_SMA_DOCFACTPRIO 60 // Math-Dokument
+#define SDT_SIM_DOCFACTPRIO 70 // Image-Dokument
+#define SDT_FRM_DOCFACTPRIO 100 // Rahmen-Dokument
+#define SDT_MSG_DOCFACTPRIO 110 // Nachrichten-Dokument
+#define SDT_SDB_DOCFACTPRIO 200 // Datenbank-Dokument
+
+//====================================================================
+
+class SFX2_DLLPUBLIC SfxObjectFactory
+{
+private:
+ const char* pShortName; // Objekt-Kurzname
+ SfxObjectFactory_Impl* pImpl; // Zusatzdaten
+ SfxObjectShellFlags nFlags;
+ SAL_DLLPRIVATE void Construct();
+
+public:
+ SfxObjectFactory( const SvGlobalName &rName, SfxObjectShellFlags nFlags, const char* pShortName );
+ ~SfxObjectFactory();
+
+ const SvGlobalName& GetClassId() const;
+ SfxObjectShellFlags GetFlags() { return nFlags; }
+ const char* GetShortName() const { return pShortName; }
+ String GetFactoryURL() const; // shortcut for "private:factory/GetShortName()"
+ String GetFactoryName() const { return String::CreateFromAscii( pShortName ); }
+ String GetModuleName() const;
+ void SetDocumentTypeNameResource( const ResId& rId );
+ String GetDocumentTypeName() const;
+ SfxFilterContainer *GetFilterContainer( BOOL bForceLoad = TRUE) const;
+
+ // Views
+ void RegisterViewFactory(SfxViewFactory &rFactory);
+ USHORT GetViewFactoryCount() const;
+ SfxViewFactory& GetViewFactory(USHORT i = 0) const;
+
+ /// returns the view factory whose GetViewName delivers the requested logical name
+ SfxViewFactory* GetViewFactoryByViewName( const String& i_rViewName ) const;
+
+ // Filter
+ const SfxFilter* GetTemplateFilter() const;
+ static String GetStandardTemplate( const String& rServiceName );
+ static void SetStandardTemplate( const String& rServiceName, const String& rTemplateName );
+
+ void SetDocumentServiceName( const rtl::OUString& rServiceName );
+ const rtl::OUString& GetDocumentServiceName() const;
+
+ SfxModule* GetModule() const;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE void SetModule_Impl( SfxModule* );
+ SAL_DLLPRIVATE static void UpdateFilterContainers_Impl();
+ SAL_DLLPRIVATE sal_uInt16 GetViewNo_Impl( const sal_uInt16 i_nViewId, const sal_uInt16 i_nFallback ) const;
+//#endif
+
+private:
+ // Kopieren verboten
+ SAL_DLLPRIVATE SfxObjectFactory(const SfxObjectFactory&);
+ SAL_DLLPRIVATE const SfxObjectFactory& operator=(const SfxObjectFactory &);
+};
+
+//=========================================================================
+
+#define SFX_DECL_OBJECTFACTORY() \
+private: \
+ static SfxObjectFactory* pObjectFactory; \
+public: \
+ static SfxObjectFactory& Factory(); \
+ virtual SfxObjectFactory& GetFactory() const { return Factory(); }
+
+#define SFX_IMPL_OBJECTFACTORY(ClassName,GlobName,Flags,ShortName) \
+ SfxObjectFactory* ClassName::pObjectFactory = 0; \
+ SfxObjectFactory& ClassName::Factory() \
+ { if (!pObjectFactory) \
+ pObjectFactory = \
+ new SfxObjectFactory( GlobName, Flags, ShortName ); \
+ return *pObjectFactory; \
+ }
+#endif // #ifndef _SFX_OBJFAC_HXX
+
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
new file mode 100644
index 000000000000..074f74cb0e72
--- /dev/null
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -0,0 +1,341 @@
+/*************************************************************************
+ *
+ * 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 _SFXDOCFILE_HXX
+#define _SFXDOCFILE_HXX
+
+#include <com/sun/star/io/XSeekable.hpp>
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/util/RevisionTag.hpp>
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/ucb/XContent.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <tools/stream.hxx>
+#include <tools/string.hxx>
+#include <tools/list.hxx>
+#include <svl/lstner.hxx>
+
+#include <tools/globname.hxx>
+#include <cppuhelper/weak.hxx>
+#include <ucbhelper/content.hxx>
+
+class SvKeyValueIterator;
+class SfxObjectFactory;
+class SfxFilter;
+class SfxMedium_Impl;
+class INetURLObject;
+class SfxObjectShell;
+class SfxFrame;
+class Timer;
+class SfxItemSet;
+class DateTime;
+class SvStringsDtor;
+class SvEaMgr;
+
+#define S2BS(s) ByteString( s, RTL_TEXTENCODING_MS_1252 )
+
+//____________________________________________________________________________________________________________________________________
+// defines for namespaces
+//____________________________________________________________________________________________________________________________________
+
+#define OUSTRING ::rtl::OUString
+#define XMULTISERVICEFACTORY ::com::sun::star::lang::XMultiServiceFactory
+#define XSERVICEINFO ::com::sun::star::lang::XServiceInfo
+#define OWEAKOBJECT ::cppu::OWeakObject
+#define REFERENCE ::com::sun::star::uno::Reference
+#define XINTERFACE ::com::sun::star::uno::XInterface
+#define SEQUENCE ::com::sun::star::uno::Sequence
+#define EXCEPTION ::com::sun::star::uno::Exception
+#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
+#define ANY ::com::sun::star::uno::Any
+
+class SFX2_DLLPUBLIC SfxMedium : public SvRefBase
+{
+ sal_uInt32 eError;
+ sal_Bool bDirect:1,
+ bRoot:1,
+ bSetFilter:1,
+ bTriedStorage;
+ StreamMode nStorOpenMode;
+ INetURLObject* pURLObj;
+ String aName;
+ SvGlobalName aFilterClass;
+ SvStream* pInStream;
+ SvStream* pOutStream;
+//REMOVE SvStorageRef aStorage;
+ const SfxFilter* pFilter;
+ SfxItemSet* pSet;
+ SfxMedium_Impl* pImp;
+ String aLogicName;
+ String aLongName;
+ sal_Bool bRemote;
+
+ sal_Bool m_bIsReadOnly;
+ com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
+ m_xInputStreamToLoadFrom;
+
+#if _SOLAR__PRIVATE
+ SAL_DLLPRIVATE void SetIsRemote_Impl();
+ SAL_DLLPRIVATE void CloseInStream_Impl();
+ SAL_DLLPRIVATE sal_Bool CloseOutStream_Impl();
+ SAL_DLLPRIVATE void CloseStreams_Impl();
+ DECL_DLLPRIVATE_STATIC_LINK( SfxMedium, UCBHdl_Impl, sal_uInt32 * );
+
+ SAL_DLLPRIVATE void SetPasswordToStorage_Impl();
+#endif
+
+public:
+
+ SvCompatWeakHdl* GetHdl();
+
+ SfxMedium();
+ SfxMedium( const String &rName,
+ StreamMode nOpenMode,
+ sal_Bool bDirect=FALSE,
+ const SfxFilter *pFilter = 0,
+ SfxItemSet *pSet = 0 );
+
+ SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
+ const String& rBaseURL,
+ const SfxItemSet* pSet=0,
+ sal_Bool bRoot = sal_False );
+
+ SfxMedium( const SfxMedium &rMedium, sal_Bool bCreateTemporary = sal_False );
+ SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
+
+ ~SfxMedium();
+
+ void UseInteractionHandler( BOOL );
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >
+ GetInteractionHandler();
+
+ void setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,sal_Bool bIsReadOnly )
+ { m_xInputStreamToLoadFrom = xInputStream; m_bIsReadOnly = bIsReadOnly; }
+
+ void SetLoadTargetFrame(SfxFrame* pFrame );
+ SfxFrame* GetLoadTargetFrame() const;
+
+ void SetReferer( const String& rRefer );
+ const String& GetReferer( ) const;
+ sal_Bool Exists( sal_Bool bForceSession = sal_True );
+ void SetFilter(const SfxFilter *pFlt, sal_Bool bResetOrig = sal_False);
+ const SfxFilter * GetFilter() const { return pFilter; }
+ const SfxFilter * GetOrigFilter( sal_Bool bNotCurrent = sal_False ) const;
+ const String& GetOrigURL() const;
+ SfxItemSet * GetItemSet() const;
+ void SetItemSet(SfxItemSet *pSet);
+ void Close();
+ void CloseAndRelease();
+ void ReOpen();
+ void CompleteReOpen();
+ const String& GetName() const {return aLogicName;}
+#if defined SINIX && defined GCC && defined C272
+ const INetURLObject& GetURLObject();
+#else
+ const INetURLObject& GetURLObject() const;
+#endif
+
+ void CheckFileDate( const ::com::sun::star::util::DateTime& aInitDate );
+ sal_Bool DocNeedsFileDateCheck();
+ ::com::sun::star::util::DateTime GetInitFileDate( sal_Bool bIgnoreOldValue );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > GetContent() const;
+ const String& GetPhysicalName() const;
+ void SetTemporary( sal_Bool bTemp );
+ sal_Bool IsTemporary() const;
+ sal_Bool IsRemote();
+ sal_Bool IsOpen() const; // { return aStorage.Is() || pInStream; }
+ void StartDownload();
+ void DownLoad( const Link& aLink = Link());
+ void SetDoneLink( const Link& rLink );
+ Link GetDoneLink( ) const;
+ void SetDataAvailableLink( const Link& rLink );
+ Link GetDataAvailableLink( ) const;
+
+ sal_uInt32 GetMIMEAndRedirect( String& );
+ sal_uInt32 GetErrorCode() const;
+ sal_uInt32 GetError() const
+ { return ERRCODE_TOERROR(GetErrorCode()); }
+ sal_uInt32 GetLastStorageCreationState();
+
+ void SetError( sal_uInt32 nError, const ::rtl::OUString& aLogMessage );
+
+ void AddLog( const ::rtl::OUString& aMessage );
+
+ void CloseInStream();
+ sal_Bool CloseOutStream();
+
+ sal_Bool IsRoot() const { return bRoot; }
+ void CloseStorage();
+
+ StreamMode GetOpenMode() const { return nStorOpenMode; }
+ void SetOpenMode( StreamMode nStorOpen, sal_Bool bDirect, sal_Bool bDontClose = sal_False );
+ sal_Bool IsDirect() const { return bDirect? sal_True: sal_False; }
+
+ SvStream* GetInStream();
+ SvStream* GetOutStream();
+
+ SvEaMgr* GetEaMgr();
+
+ sal_Bool Commit();
+ sal_Bool IsStorage();
+
+ sal_Int8 ShowLockedDocumentDialog( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aData, sal_Bool bIsLoading, sal_Bool bOwnLock );
+ sal_Bool LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI );
+ void UnlockFile( sal_Bool bReleaseLockStream );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetStorage( sal_Bool bCreateTempIfNo = sal_True );
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetOutputStorage();
+ void ResetError();
+ sal_Bool UsesCache() const;
+ void SetUsesCache( sal_Bool );
+ sal_Bool IsExpired() const;
+ void SetName( const String& rName, sal_Bool bSetOrigURL = sal_False );
+ sal_Bool IsAllowedForExternalBrowser() const;
+ long GetFileVersion() const;
+
+ const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >&
+ GetVersionList( bool _bNoReload = false );
+ sal_Bool IsReadOnly();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetInputStream();
+
+ void CreateTempFile( sal_Bool bReplace = sal_True );
+ void CreateTempFileNoCopy();
+ ::rtl::OUString SwitchDocumentToTempFile();
+ sal_Bool SwitchDocumentToFile( ::rtl::OUString aURL );
+
+ ::rtl::OUString GetCharset();
+ void SetCharset( ::rtl::OUString );
+ ::rtl::OUString GetBaseURL( bool bForSaving=false );
+
+#if _SOLAR__PRIVATE
+ SAL_DLLPRIVATE BOOL HasStorage_Impl() const;
+
+ SAL_DLLPRIVATE void StorageBackup_Impl();
+ SAL_DLLPRIVATE ::rtl::OUString GetBackup_Impl();
+
+ SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetZipStorageToSign_Impl( sal_Bool bReadOnly = sal_True );
+ SAL_DLLPRIVATE void CloseZipStorage_Impl();
+
+ // the storage that will be returned by the medium on GetStorage request
+ SAL_DLLPRIVATE void SetStorage_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewStorage );
+
+ SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetInputStream_Impl();
+ SAL_DLLPRIVATE void CloseAndReleaseStreams_Impl();
+ SAL_DLLPRIVATE void RefreshName_Impl();
+ SAL_DLLPRIVATE sal_uInt16 AddVersion_Impl( com::sun::star::util::RevisionTag& rVersion );
+ SAL_DLLPRIVATE sal_Bool TransferVersionList_Impl( SfxMedium& rMedium );
+ SAL_DLLPRIVATE sal_Bool SaveVersionList_Impl( sal_Bool bUseXML );
+ SAL_DLLPRIVATE sal_Bool RemoveVersion_Impl( const ::rtl::OUString& rVersion );
+
+ SAL_DLLPRIVATE void SetExpired_Impl( const DateTime& rDateTime );
+ SAL_DLLPRIVATE SvKeyValueIterator* GetHeaderAttributes_Impl();
+ SAL_DLLPRIVATE const String& GetPreRedirectedURL() const;
+ SAL_DLLPRIVATE void SetOrigFilter_Impl( const SfxFilter* pFilter );
+
+ // Diese Protokolle liefern MIME Typen
+ SAL_DLLPRIVATE sal_Bool SupportsMIME_Impl() const;
+
+ SAL_DLLPRIVATE void Init_Impl();
+ SAL_DLLPRIVATE void ForceSynchronStream_Impl( sal_Bool bSynchron );
+
+ SAL_DLLPRIVATE void GetLockingStream_Impl();
+ SAL_DLLPRIVATE void GetMedium_Impl();
+ SAL_DLLPRIVATE sal_Bool TryDirectTransfer( const ::rtl::OUString& aURL, SfxItemSet& aTargetSet );
+ SAL_DLLPRIVATE void Transfer_Impl();
+ SAL_DLLPRIVATE void CreateFileStream();
+ SAL_DLLPRIVATE void SetUpdatePickList(sal_Bool);
+ SAL_DLLPRIVATE sal_Bool IsUpdatePickList() const;
+
+//REMOVE void SetStorage_Impl( SvStorage* pStor );
+ SAL_DLLPRIVATE void SetLongName(const String &rName)
+ { aLongName = rName; }
+ SAL_DLLPRIVATE const String & GetLongName() const { return aLongName; }
+ SAL_DLLPRIVATE ErrCode CheckOpenMode_Impl( sal_Bool bSilent, sal_Bool bAllowRO = sal_True );
+ SAL_DLLPRIVATE sal_Bool IsDownloadDone_Impl();
+ SAL_DLLPRIVATE sal_Bool IsPreview_Impl();
+ SAL_DLLPRIVATE void ClearBackup_Impl();
+ SAL_DLLPRIVATE void Done_Impl( ErrCode );
+ SAL_DLLPRIVATE void DataAvailable_Impl();
+ SAL_DLLPRIVATE void Cancel_Impl();
+ SAL_DLLPRIVATE void SetPhysicalName_Impl(const String& rName);
+ SAL_DLLPRIVATE void CanDisposeStorage_Impl( sal_Bool bDisposeStorage );
+ SAL_DLLPRIVATE sal_Bool WillDisposeStorageOnClose_Impl();
+
+ SAL_DLLPRIVATE void DoBackup_Impl();
+ SAL_DLLPRIVATE void DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalContent );
+ SAL_DLLPRIVATE void DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalContent,
+ const String& aPrefix,
+ const String& aExtension,
+ const String& aDestDir );
+
+ SAL_DLLPRIVATE sal_Bool UseBackupToRestore_Impl( ::ucbhelper::Content& aOriginalContent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xComEnv );
+
+ SAL_DLLPRIVATE sal_Bool StorageCommit_Impl();
+
+ SAL_DLLPRIVATE sal_Bool TransactedTransferForFS_Impl( const INetURLObject& aSource,
+ const INetURLObject& aDest,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xComEnv );
+
+ SAL_DLLPRIVATE sal_Bool SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::OUString& aODFVersion, sal_Bool bHasValidDocumentSignature );
+
+ // the following two methods must be used and make sence only during saving currently
+ // TODO/LATER: in future the signature state should be controlled by the medium not by the document
+ // in this case the methods will be used generally, and might need to be renamed
+ SAL_DLLPRIVATE sal_uInt16 GetCachedSignatureState_Impl();
+ SAL_DLLPRIVATE void SetCachedSignatureState_Impl( sal_uInt16 nState );
+#endif
+
+ static com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag > GetVersionList(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ static sal_Bool EqualURLs( const ::rtl::OUString& aFirstURL, const ::rtl::OUString& aSecondURL );
+ static ::rtl::OUString CreateTempCopyWithExt( const ::rtl::OUString& aURL );
+ static sal_Bool CallApproveHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler, ::com::sun::star::uno::Any aRequest, sal_Bool bAllowAbort );
+
+ static sal_Bool SetWritableForUserOnly( const ::rtl::OUString& aURL );
+};
+
+SV_DECL_IMPL_REF( SfxMedium )
+SV_DECL_COMPAT_WEAK( SfxMedium )
+
+#ifndef SFXMEDIUM_LIST
+#define SFXMEDIUM_LIST
+DECLARE_LIST( SfxMediumList, SfxMedium* )
+#endif
+
+#endif
+
diff --git a/sfx2/inc/sfx2/docfilt.hxx b/sfx2/inc/sfx2/docfilt.hxx
new file mode 100644
index 000000000000..b4118272bb88
--- /dev/null
+++ b/sfx2/inc/sfx2/docfilt.hxx
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * 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_DOCFILT_HACK_HXX
+#define _SFX_DOCFILT_HACK_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/plugin/PluginDescription.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/beans/UnknownPropertyException.hpp>
+#include <com/sun/star/lang/WrappedTargetException.hpp>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <tools/wldcrd.hxx>
+
+#define SFX_FILTER_IMPORT 0x00000001L
+#define SFX_FILTER_EXPORT 0x00000002L
+#define SFX_FILTER_TEMPLATE 0x00000004L
+#define SFX_FILTER_INTERNAL 0x00000008L
+#define SFX_FILTER_TEMPLATEPATH 0x00000010L
+#define SFX_FILTER_OWN 0x00000020L
+#define SFX_FILTER_ALIEN 0x00000040L
+#define SFX_FILTER_USESOPTIONS 0x00000080L
+#define SFX_FILTER_NOTINFILEDLG 0x00001000L
+#define SFX_FILTER_NOTINCHOOSER 0x00002000L
+
+#define SFX_FILTER_DEFAULT 0x00000100L
+#define SFX_FILTER_EXECUTABLE 0x00000200L
+#define SFX_FILTER_SUPPORTSSELECTION 0x00000400L
+#define SFX_FILTER_MAPTOAPPPLUG 0x00000800L
+#define SFX_FILTER_ASYNC 0x00004000L
+// Legt Objekt nur an, kein Laden
+#define SFX_FILTER_CREATOR 0x00008000L
+#define SFX_FILTER_OPENREADONLY 0x00010000L
+#define SFX_FILTER_MUSTINSTALL 0x00020000L
+#define SFX_FILTER_CONSULTSERVICE 0x00040000L
+
+#define SFX_FILTER_STARONEFILTER 0x00080000L
+#define SFX_FILTER_PACKED 0x00100000L
+#define SFX_FILTER_SILENTEXPORT 0x00200000L
+
+#define SFX_FILTER_BROWSERPREFERED 0x00400000L
+#define SFX_FILTER_PREFERED 0x10000000L
+
+#define SFX_FILTER_VERSION_NONE 0
+#define SFX_FILTER_NOTINSTALLED SFX_FILTER_MUSTINSTALL | SFX_FILTER_CONSULTSERVICE
+
+#include <sfx2/sfxdefs.hxx>
+
+//========================================================================
+
+namespace sfx2 {
+
+/** Returns true if the passed string is the name of a Microsoft Office file
+ format filter supporting export of password protected documents.
+
+ This function is just a hack for #i105076# is fixed and needs to be removed
+ then.
+ */
+SFX2_DLLPUBLIC bool CheckMSPasswordCapabilityForExport( const String& rFilterName );
+
+} // namespace sfx2
+
+//========================================================================
+class SfxFilterContainer;
+class SotStorage;
+class SFX2_DLLPUBLIC SfxFilter
+{
+friend class SfxFilterContainer;
+
+ WildCard aWildCard;
+ ULONG lFormat;
+ String aTypeName;
+ String aUserData;
+ SfxFilterFlags nFormatType;
+ USHORT nDocIcon;
+ String aServiceName;
+ String aMimeType;
+ String aFilterName;
+ String aPattern;
+ ULONG nVersion;
+ String aUIName;
+ String aDefaultTemplate;
+
+public:
+ SfxFilter( const String &rName,
+ const String &rWildCard,
+ SfxFilterFlags nFormatType,
+ sal_uInt32 lFormat,
+ const String &rTypeName,
+ USHORT nDocIcon,
+ const String &rMimeType,
+ const String &rUserData,
+ const String& rServiceName );
+ ~SfxFilter();
+
+ bool IsAllowedAsTemplate() const { return nFormatType & SFX_FILTER_TEMPLATE; }
+ bool IsOwnFormat() const { return nFormatType & SFX_FILTER_OWN; }
+ bool IsOwnTemplateFormat() const { return nFormatType & SFX_FILTER_TEMPLATEPATH; }
+ bool IsAlienFormat() const { return nFormatType & SFX_FILTER_ALIEN; }
+ bool CanImport() const { return nFormatType & SFX_FILTER_IMPORT; }
+ bool CanExport() const { return nFormatType & SFX_FILTER_EXPORT; }
+ bool IsInternal() const { return nFormatType & SFX_FILTER_INTERNAL; }
+ SfxFilterFlags GetFilterFlags() const { return nFormatType; }
+ const String& GetFilterName() const { return aFilterName; }
+ const String& GetMimeType() const { return aMimeType; }
+ const String& GetName() const { return aFilterName; }
+ const WildCard& GetWildcard() const { return aWildCard; }
+ const String& GetRealTypeName() const { return aTypeName; }
+ ULONG GetFormat() const { return lFormat; }
+ const String& GetTypeName() const { return aTypeName; }
+ const String& GetUIName() const { return aUIName; }
+ USHORT GetDocIconId() const { return nDocIcon; }
+ const String& GetUserData() const { return aUserData; }
+ const String& GetDefaultTemplate() const { return aDefaultTemplate; }
+ void SetDefaultTemplate( const String& rStr ) { aDefaultTemplate = rStr; }
+ BOOL UsesStorage() const { return GetFormat() != 0; }
+ void SetURLPattern( const String& rStr ) { aPattern = rStr; aPattern.ToLowerAscii(); }
+ String GetURLPattern() const { return aPattern; }
+ void SetUIName( const String& rName ) { aUIName = rName; }
+ void SetVersion( ULONG nVersionP ) { nVersion = nVersionP; }
+ ULONG GetVersion() const { return nVersion; }
+ String GetSuffixes() const;
+ String GetDefaultExtension() const;
+ const String& GetServiceName() const { return aServiceName; }
+
+ static const SfxFilter* GetDefaultFilter( const String& rName );
+ static const SfxFilter* GetFilterByName( const String& rName );
+ static const SfxFilter* GetDefaultFilterFromFactory( const String& rServiceName );
+
+ static String GetTypeFromStorage( const SotStorage& rStg );
+ static String GetTypeFromStorage( const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage,
+ BOOL bTemplate = FALSE,
+ String* pName=0 )
+ throw ( ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException );
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/docinf.hxx b/sfx2/inc/sfx2/docinf.hxx
new file mode 100644
index 000000000000..9f7da1932110
--- /dev/null
+++ b/sfx2/inc/sfx2/docinf.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXDOCINF_HXX
+#define _SFXDOCINF_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/uno/Reference.hxx>
+
+
+class GDIMetaFile;
+class SotStorage;
+
+namespace com { namespace sun { namespace star {
+ namespace document {
+ class XDocumentProperties;
+ }
+} } }
+
+
+namespace sfx2 {
+
+/** load document meta-data from OLE stream
+
+ @param i_xDocProps Document meta-data
+ @param i_pStorage OLE Storage
+ */
+sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties> i_xDocProps,
+ SotStorage* i_pStorage );
+
+/** save document meta-data to OLE stream
+
+ @param i_xDocProps Document meta-data
+ @param i_pStorage OLE Storage
+ @param i_pThumb Thumbnail: preview bitmap
+ @param i_pGuid Blob: Guid blob ("_PID_GUID")
+ @param i_pHyperlinks Blob: Hyperlink blob ("_PID_HLINKS")
+ */
+bool SFX2_DLLPUBLIC SaveOlePropertySet(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties> i_xDocProps,
+ SotStorage* i_pStorage,
+ const ::com::sun::star::uno::Sequence<sal_uInt8> * i_pThumb = 0,
+ const ::com::sun::star::uno::Sequence<sal_uInt8> * i_pGuid = 0,
+ const ::com::sun::star::uno::Sequence<sal_uInt8> * i_pHyperlinks = 0);
+
+
+::com::sun::star::uno::Sequence<sal_uInt8> SFX2_DLLPUBLIC convertMetaFile(
+ GDIMetaFile* i_pThumb);
+
+} // namespace sfx2
+
+#endif
+
diff --git a/sfx2/inc/sfx2/dockwin.hxx b/sfx2/inc/sfx2/dockwin.hxx
new file mode 100644
index 000000000000..254bd622d9bc
--- /dev/null
+++ b/sfx2/inc/sfx2/dockwin.hxx
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
+ * 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 _SFXDOCKWIN_HXX
+#define _SFXDOCKWIN_HXX
+
+#include "sal/config.h"
+#include "sal/types.h"
+#include <vcl/dockwin.hxx>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+
+#include "sfx2/dllapi.h"
+#include <sfx2/childwin.hxx>
+
+class SfxSplitWindow;
+class SfxDockingWindow_Impl;
+
+void SFX2_DLLPUBLIC SAL_CALL SfxDockingWindowFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const rtl::OUString& rDockingWindowName );
+bool SFX2_DLLPUBLIC SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const rtl::OUString& rDockingWindowName );
+
+class SFX2_DLLPUBLIC SfxDockingWindow : public DockingWindow
+{
+private:
+ Rectangle aInnerRect;
+ Rectangle aOuterRect;
+ SfxBindings* pBindings;
+ Size aFloatSize;
+ SfxChildWindow* pMgr;
+ SfxDockingWindow_Impl* pImp;
+
+ SAL_DLLPRIVATE SfxDockingWindow(SfxDockingWindow &); // not defined
+ SAL_DLLPRIVATE void operator =(SfxDockingWindow &); // not defined
+
+protected:
+ SfxChildAlignment CalcAlignment(const Point& rPos, Rectangle& rRect );
+ void CalcSplitPosition(const Point rPos, Rectangle& rRect,
+ SfxChildAlignment eAlign);
+ virtual Size CalcDockingSize(SfxChildAlignment);
+ virtual SfxChildAlignment
+ CheckAlignment(SfxChildAlignment,SfxChildAlignment);
+
+ virtual void Resize();
+ virtual BOOL PrepareToggleFloatingMode();
+ virtual void ToggleFloatingMode();
+ virtual void StartDocking();
+ virtual BOOL Docking( const Point& rPos, Rectangle& rRect );
+ virtual void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
+ virtual void Resizing( Size& rSize );
+ virtual void Paint( const Rectangle& rRect );
+ virtual BOOL Close();
+ virtual void Move();
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE SfxChildWindow* GetChildWindow_Impl() { return pMgr; }
+//#endif
+
+public:
+ SfxDockingWindow( SfxBindings *pBindings,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ WinBits nWinBits=0);
+ SfxDockingWindow( SfxBindings *pBindings,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ const ResId& rResId);
+ ~SfxDockingWindow();
+
+ void Initialize (SfxChildWinInfo* pInfo);
+ virtual void FillInfo(SfxChildWinInfo&) const;
+ virtual void StateChanged( StateChangedType nStateChange );
+
+ void SetDockingRects(const Rectangle& rOuter, const Rectangle& rInner)
+ { aInnerRect = rInner; aOuterRect = rOuter; }
+ const Rectangle& GetInnerRect() const { return aInnerRect; }
+ const Rectangle& GetOuterRect() const { return aOuterRect; }
+ SfxBindings& GetBindings() const { return *pBindings; }
+ USHORT GetType() const { return pMgr->GetType(); }
+ SfxChildAlignment GetAlignment() const { return pMgr->GetAlignment(); }
+ void SetAlignment(SfxChildAlignment eAlign) { pMgr->SetAlignment(eAlign); }
+ Size GetFloatingSize() const { return aFloatSize; }
+ void SetFloatingSize(const Size& rSize) { aFloatSize=rSize; }
+
+ void SetMinOutputSizePixel( const Size& rSize );
+ Size GetMinOutputSizePixel() const;
+ virtual long Notify( NotifyEvent& rNEvt );
+ virtual void FadeIn( BOOL );
+ void AutoShow( BOOL bShow = TRUE );
+ DECL_LINK( TimerHdl, Timer* );
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE void Initialize_Impl();
+ SAL_DLLPRIVATE USHORT GetWinBits_Impl() const;
+ SAL_DLLPRIVATE void SetItemSize_Impl( const Size& rSize );
+ SAL_DLLPRIVATE void Disappear_Impl();
+ SAL_DLLPRIVATE void Reappear_Impl();
+ SAL_DLLPRIVATE BOOL IsAutoHide_Impl() const;
+ SAL_DLLPRIVATE BOOL IsPinned_Impl() const;
+ SAL_DLLPRIVATE void AutoShow_Impl( BOOL bShow = TRUE );
+ SAL_DLLPRIVATE void Pin_Impl( BOOL bPinned );
+ SAL_DLLPRIVATE SfxSplitWindow* GetSplitWindow_Impl() const;
+ SAL_DLLPRIVATE void ReleaseChildWindow_Impl();
+//#endif
+};
+
+class SfxDockingWrapper : public SfxChildWindow
+{
+ public:
+ SfxDockingWrapper( Window* pParent ,
+ USHORT nId ,
+ SfxBindings* pBindings ,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(SfxDockingWrapper);
+};
+
+#endif // #ifndef _SFXDOCKWIN_HXX
diff --git a/sfx2/inc/sfx2/docmacromode.hxx b/sfx2/inc/sfx2/docmacromode.hxx
new file mode 100644
index 000000000000..463e5dbe4aa2
--- /dev/null
+++ b/sfx2/inc/sfx2/docmacromode.hxx
@@ -0,0 +1,332 @@
+/*************************************************************************
+ *
+ * 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 SFX2_DOCMACROMODE_HXX
+#define SFX2_DOCMACROMODE_HXX
+
+#include "sfx2/dllapi.h"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/document/XEmbeddedScripts.hpp>
+/** === end UNO includes === **/
+
+#include <boost/shared_ptr.hpp>
+
+//........................................................................
+namespace sfx2
+{
+//........................................................................
+
+ //====================================================================
+ //= IMacroDocumentAccess
+ //====================================================================
+ /** provides access to several settings of a document, which are needed by ->DocumentMacroMode
+ to properly determine the current macro execution mode of this document
+ */
+ class SAL_NO_VTABLE IMacroDocumentAccess
+ {
+ public:
+ /** retrieves the current MacroExecutionMode.
+
+ Usually, this is initialized from the media descriptor used to load the document,
+ respectively the one passed into the document's XModel::attachResource call.
+
+ If no such mode was passed there, document implementations should return
+ MacroExecMode::NEVER_EXECUTE.
+
+ @see ::com::sun::star::document::MediaDescriptor::MacroExecutionMode
+ @see ::com::sun::star::frame::XComponentLoader::loadComponentFromURL
+ @see ::com::sun::star::frame::XModel::attachResource
+
+ @see setCurrentMacroExecMode
+
+ @todo
+ Effectively, this is the MacroExecutionMode of the MediaDescriptor of
+ the document. Thus, this setting could be obtained from the XModel
+ directly. We should introduce a getDocumentModel method here, which
+ can be used for this and other purposes.
+ */
+ virtual sal_Int16
+ getCurrentMacroExecMode() const = 0;
+
+ /** sets the MacroExecutionMode of the document, as calculated by the DocumentMacroMode
+ class.
+
+ Effectively, the existence of this method means that the responsibility
+ to store the current macro execution mode is not with the DocumentMacroMode
+ instance, but with the document instance itself.
+
+ Usually, a document implementation will simply put the macro execution mode
+ into its media descriptor, as returned by XModel::getArgs.
+
+ @see ::com::sun::star::document::MediaDescriptor::MacroExecutionMode
+ @see ::com::sun::star::frame::XComponentLoader::loadComponentFromURL
+ @see ::com::sun::star::frame::XModel::attachResource
+
+ see getCurrentMacroExecMode
+ */
+ virtual sal_Bool
+ setCurrentMacroExecMode( sal_uInt16 ) = 0;
+
+ /** returns the origin of the document
+
+ This usually is the document's location, or, if the document has been
+ newly created from a template, then the location of the template. Location
+ here means the complete path of the document, including the file name.
+
+ @todo
+ This probably can also be obtained from the XModel, by calling getURL
+ or getLocation. If both are empty, then we need an UNO way to obtain
+ the URL of the underlying template document - if any. If we have this,
+ we could replace this method with a newly introduced method
+ getDocumentModel and some internal code.
+ */
+ virtual ::rtl::OUString
+ getDocumentLocation() const = 0;
+
+ /** returns a zip-storage based on the last commited version of the document,
+ for readonly access
+
+ The storage is intended to be used for signing. An implementation is
+ allowed to return <NULL/> here if and only if the document
+ does not support signing the script storages.
+
+ @todo
+ UNOize this, too. Once we have a getDocumentModel, we should be able to
+ obtain the "last commit" storage via UNO API, provided it's an
+ XStorageBasedDocument.
+ */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
+ getZipStorageToSign() = 0;
+
+ /** checks whether the document's storage contains sub storages with macros or scripts
+
+ A default implementation of this method will simply cann DocumentMacroMode::storageHasMacros
+ with the document's root storage. However, there might be document types where this
+ isn't sufficient (e.g. database documents which contain sub documents which can also
+ contain macro/script storages).
+ */
+ virtual sal_Bool
+ documentStorageHasMacros() const = 0;
+
+ /** provides access to the XEmbeddedScripts interface of the document
+
+ Implementations are allowed to return <NULL/> here if and only if they
+ do not (yet) support embedding scripts.
+
+ @todo
+ can also be replaced with a call to the (to be introduced) getDocumentModel
+ method, and a queryInterface.
+ */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts >
+ getEmbeddedDocumentScripts() const = 0;
+
+ /** returns the state of the signatures for the scripts embedded in the document
+
+ Note: On the medium run, the signature handling of a document should be outsourced
+ into a dedicated class, instead of being hard-wired into the SfxObjectShell. This
+ class could then be used outside the SfxObjectShell (e.g. in Base documents), too.
+ When this happens, this method here becomes should be replaced by a method at this
+ new class.
+
+ @seealso <sfx2/signaturestate.hxx>
+ */
+ virtual sal_Int16
+ getScriptingSignatureState() = 0;
+
+ /** allows to detect whether there is a trusted scripting signature
+
+ Note: On the medium run, the signature handling of a document should be outsourced
+ into a dedicated class, instead of being hard-wired into the SfxObjectShell. This
+ class could then be used outside the SfxObjectShell (e.g. in Base documents), too.
+ When this happens, this method here should be replaced by a method at this
+ new class.
+
+ @seealso <sfx2/signaturestate.hxx>
+ */
+ virtual sal_Bool
+ hasTrustedScriptingSignature( sal_Bool bAllowUIToAddAuthor ) = 0;
+
+ /** shows a warning that the document's signature is broken
+
+ Here, a similar note applies as to getScriptingSignatureState: This method doesn't
+ really belong here. It's just there because SfxObjectShell_Impl::bSignatureErrorIsShown
+ is not accessible where the method is called.
+ So, once the signature handling has been oursourced from SfxObjectShell/_Impl, so it
+ is re-usable in non-SFX contexts as well, this method here is also unneeded, probably.
+
+ @param _rxInteraction
+ the interaction handler to use for showing the warning. It is exactly the same
+ as passed to DocumentMacroMode::adjustMacroMode, so it is <NULL/> if and
+ only if the instance passed to that method was <NULL/>.
+ */
+ virtual void
+ showBrokenSignatureWarning(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxInteraction
+ ) const = 0;
+ };
+
+ //====================================================================
+ //= DocumentMacroMode
+ //====================================================================
+ struct DocumentMacroMode_Data;
+
+ /** encapsulates handling the macro mode of a document
+
+ @see com::sun::star::document::MacroExecMode
+ */
+ class SFX2_DLLPUBLIC DocumentMacroMode
+ {
+ public:
+ /** creates an instance
+
+ @param _rDocumentAccess
+ access to the document which this instance works for. Must live as long as the
+ DocumentMacroMode instance lives, at least
+ */
+ DocumentMacroMode( IMacroDocumentAccess& _rDocumentAccess );
+ ~DocumentMacroMode();
+
+ /** allows macro execution in the document
+
+ Effectively, the macro mode is set to MacroExecMode::ALWAYS_EXECUTE_NO_WARN.
+
+ @return
+ <TRUE/>, always
+ */
+ sal_Bool allowMacroExecution();
+
+ /** disallows macro execution in the document
+
+ Effectively, the macro mode is set to MacroExecMode::NEVER_EXECUTE.
+
+ @return
+ <TRUE/>, always
+ */
+ sal_Bool disallowMacroExecution();
+
+ /** checks whether the document allows executing contained macros.
+
+ The method transforms the current macro execution mode into either
+ ALWAYS_EXECUTE_NO_WARN or NEVER_EXECUTE, depending on the current value,
+ possible configuration settings, and possible user interaction.
+
+ @param _rxInteraction
+ A handler for interactions which might become necessary.
+ This includes
+ <ul><li>Asking the user for confirmation for macro execution.</li>
+ <li>Telling the user that macro execution is disabled.</li>
+ </ul>
+
+ If the user needs to be asked for macro execution confirmation, and if
+ this parameter is <NULL/>, the most defensive assumptions will be made,
+ effectively disabling macro execution.
+
+ @return
+ <TRUE/> if and only if macro execution in this document is allowed.
+ */
+ sal_Bool adjustMacroMode(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxInteraction
+ );
+
+ /** determines whether macro execution is disallowed
+
+ There's a number of reasons why macro execution could be disallowed:
+ <ul><li>Somebody called ->disallowMacroExecution</li>
+ <li>Macro execution is disabled globally, via the security options</li>
+ <li>Macro execution mode was not defined initially, and the user denied
+ executing macros for this particular document.</li>
+ </ul>
+
+ Note that if this method returns <FALSE/>, then subsequent calls of
+ ->adjustMacroMode can still return <FALSE/>.
+ That is, if the current macro execution mode for the document is not yet known
+ (and inparticular <em>not</em> MacroExecMode::NEVER_EXECUTE), then ->isMacroExecutionDisallowed
+ will return <FALSE/>.
+ However, a subsequent call to ->adjustMacroMode can result in the user
+ denying macro execution, in which ->adjustMacroMode will return <FALSE/>,
+ and the next call to isMacroExecutionDisallowed will return <TRUE/>.
+ */
+ sal_Bool isMacroExecutionDisallowed() const;
+
+ /** determines whether the document actually has a macros library
+
+ Effectively, this method checks the Basic library container (as returned by
+ IMacroDocumentAccess::getEmbeddedDocumentScripts().getBasicLibraries) for
+ content.
+ */
+ sal_Bool hasMacroLibrary() const;
+
+ /** determines whether the given document storage has sub storages containing scripts
+ or macros.
+
+ Effectively, the method checks for the presence of a sub-storage name "Scripts" (where
+ BeanShell-/JavaScript-/Python-Scripts are stored, and a sub storage named "Basic" (where
+ Basic scripts are stored).
+ */
+ static sal_Bool
+ storageHasMacros( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxStorage );
+
+ /** checks the macro execution mode while loading the document.
+
+ This must be called when the loading is effectively finished, but before any macro action
+ happened.
+
+ The method will disallow macro execution for this document if it is disabled
+ globally (SvtSecurityOptions::IsMacroDisabled). Otherwise, it will check whether
+ the document contains a macro storage or macro libraries. If so, it will
+ properly calculate the MacroExecutionMode by calling adjustMacroMode.
+
+ If the document doesn't contain macros, yet, then the macro execution for this
+ document will be allowed (again: unless disabled globally), since in this case
+ macros which later are newly created by the user should be allowed, of course.
+
+ @return
+ <TRUE/> if and only if macro execution is allowed in the document
+
+ @see isMacroExecutionDisallowed
+ @see IMacroDocumentAccess::documentStorageHasMacros
+ @see hasMacroLibrary
+ @see IMacroDocumentAccess::checkForBrokenScriptingSignatures
+ */
+ sal_Bool
+ checkMacrosOnLoading(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxInteraction
+ );
+
+ private:
+ ::boost::shared_ptr< DocumentMacroMode_Data > m_pData;
+ };
+
+//........................................................................
+} // namespace sfx2
+//........................................................................
+
+#endif // SFX2_DOCMACROMODE_HXX
diff --git a/sfx2/inc/sfx2/docstoragemodifylistener.hxx b/sfx2/inc/sfx2/docstoragemodifylistener.hxx
new file mode 100644
index 000000000000..977916ed532c
--- /dev/null
+++ b/sfx2/inc/sfx2/docstoragemodifylistener.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * 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 SFX2_DOCSTORAGEMODIFYLISTENER_HXX
+#define SFX2_DOCSTORAGEMODIFYLISTENER_HXX
+
+#include "sfx2/dllapi.h"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/util/XModifyListener.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+
+namespace vos
+{
+ class IMutex;
+}
+
+//........................................................................
+namespace sfx2
+{
+//........................................................................
+
+ //====================================================================
+ //= IModifiableDocument
+ //====================================================================
+ /** callback for the DocumentStorageModifyListener class
+ */
+ class SAL_NO_VTABLE IModifiableDocument
+ {
+ public:
+ /// indicates the root or a sub storage of the document has been modified
+ virtual void storageIsModified() = 0;
+ };
+
+ //====================================================================
+ //= DocumentStorageModifyListener
+ //====================================================================
+ typedef ::cppu::WeakImplHelper1 < ::com::sun::star::util::XModifyListener > DocumentStorageModifyListener_Base;
+
+ class SFX2_DLLPUBLIC DocumentStorageModifyListener : public DocumentStorageModifyListener_Base
+ {
+ IModifiableDocument* m_pDocument;
+ ::vos::IMutex& m_rMutex;
+
+ public:
+ DocumentStorageModifyListener( IModifiableDocument& _rDocument, ::vos::IMutex& _rMutex );
+
+ void dispose();
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ virtual ~DocumentStorageModifyListener();
+
+ private:
+ DocumentStorageModifyListener(); // never implemented
+ DocumentStorageModifyListener( const DocumentStorageModifyListener& ); // never implemented
+ DocumentStorageModifyListener& operator=( const DocumentStorageModifyListener& ); // never implemented
+ };
+
+//........................................................................
+} // namespace sfx2
+//........................................................................
+
+#endif // SFX2_DOCSTORAGEMODIFYLISTENER_HXX
diff --git a/sfx2/inc/sfx2/doctdlg.hxx b/sfx2/inc/sfx2/doctdlg.hxx
new file mode 100644
index 000000000000..ddc0d6196a64
--- /dev/null
+++ b/sfx2/inc/sfx2/doctdlg.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXDOCTDLG_HXX
+#define _SFXDOCTDLG_HXX
+
+#include <sfx2/doctempl.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+
+class SfxModalDefParentHelper;
+
+class SfxDocumentTemplateDlg : public ModalDialog
+{
+private:
+
+ FixedLine aEditFL;
+ Edit aNameEd;
+ FixedLine aTemplateFL;
+ FixedText aRegionFt;
+ ListBox aRegionLb;
+ FixedText aTemplateFt;
+ ListBox aTemplateLb;
+
+ OKButton aOkBt;
+ CancelButton aCancelBt;
+ HelpButton aHelpBt;
+ PushButton aEditBt;
+ PushButton aOrganizeBt;
+
+ SfxDocumentTemplates *pTemplates;
+
+ SfxModalDefParentHelper* pHelper;
+
+ void Init();
+
+ DECL_LINK( OrganizeHdl, Button * );
+ DECL_LINK( OkHdl, Control * );
+ DECL_LINK( RegionSelect, ListBox * );
+ DECL_LINK( TemplateSelect, ListBox * );
+ DECL_LINK( NameModify, Edit * );
+ DECL_LINK( EditHdl, Button * );
+
+public:
+ SfxDocumentTemplateDlg(Window * pParent, SfxDocumentTemplates* pTempl );
+ ~SfxDocumentTemplateDlg();
+
+ String GetTemplateName() const
+ { return aNameEd.GetText().EraseLeadingChars(); }
+ String GetTemplatePath();
+ void NewTemplate(const String &rPath);
+ USHORT GetRegion() const { return aRegionLb.GetSelectEntryPos(); }
+ String GetRegionName() const { return aRegionLb.GetSelectEntry(); }
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/doctempl.hxx b/sfx2/inc/sfx2/doctempl.hxx
new file mode 100644
index 000000000000..43ab94b4b28e
--- /dev/null
+++ b/sfx2/inc/sfx2/doctempl.hxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * 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 _SFXDOCTEMPL_HXX
+#define _SFXDOCTEMPL_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <tools/ref.hxx>
+#include <tools/string.hxx>
+
+// CLASS -----------------------------------------------------------------
+
+class SfxObjectShell;
+
+#ifndef SFX_DECL_OBJECTSHELL_DEFINED
+#define SFX_DECL_OBJECTSHELL_DEFINED
+SV_DECL_REF(SfxObjectShell)
+#endif
+
+class SfxDocTemplate_Impl;
+
+#ifndef SFX_DECL_DOCTEMPLATES_DEFINED
+#define SFX_DECL_DOCTEMPLATES_DEFINED
+SV_DECL_REF(SfxDocTemplate_Impl)
+#endif
+
+// class SfxDocumentTemplates --------------------------------------------
+
+class SFX2_DLLPUBLIC SfxDocumentTemplates
+{
+private:
+ SfxDocTemplate_ImplRef pImp;
+
+ SAL_DLLPRIVATE BOOL CopyOrMove( USHORT nTargetRegion, USHORT nTargetIdx,
+ USHORT nSourceRegion, USHORT nSourceIdx, BOOL bMove );
+public:
+ SfxDocumentTemplates();
+ SfxDocumentTemplates(const SfxDocumentTemplates &);
+ ~SfxDocumentTemplates();
+
+ BOOL IsConstructed() { return pImp != NULL; }
+ void Construct();
+
+ static BOOL SaveDir( /*SfxTemplateDir &rEntry */ ) ;
+ const SfxDocumentTemplates &operator=(const SfxDocumentTemplates &);
+
+ BOOL Rescan( ); // Aktualisieren
+ void ReInitFromComponent();
+
+ BOOL IsRegionLoaded( USHORT nIdx ) const;
+ USHORT GetRegionCount() const;
+ const String& GetRegionName(USHORT nIdx) const; //dv!
+ String GetFullRegionName(USHORT nIdx) const;
+ USHORT GetRegionNo( const String &rRegionName ) const;
+
+ USHORT GetCount(USHORT nRegion) const;
+ USHORT GetCount( const String &rName) const;
+ const String& GetName(USHORT nRegion, USHORT nIdx) const; //dv!
+ String GetFileName(USHORT nRegion, USHORT nIdx) const;
+ String GetPath(USHORT nRegion, USHORT nIdx) const;
+
+ String GetDefaultTemplatePath(const String &rLongName);
+
+ // Pfad zur Vorlage geben lassen; logischer Name muss angegeben
+ // werden, damit beim Ueberschreiben einer Vorlage der
+ // richtige Dateiname gefunden werden kann
+ String GetTemplatePath(USHORT nRegion, const String &rLongName) const;
+
+ // Allows to retrieve the target template URL from the UCB
+ ::rtl::OUString GetTemplateTargetURLFromComponent( const ::rtl::OUString& aGroupName,
+ const ::rtl::OUString& aTitle );
+
+ // Speichern als Vorlage hat geklappt -> Aktualisieren
+ void NewTemplate(USHORT nRegion,
+ const String &rLongName,
+ const String &rFileName);
+
+ BOOL Copy(USHORT nTargetRegion,
+ USHORT nTargetIdx,
+ USHORT nSourceRegion,
+ USHORT nSourceIdx);
+ BOOL Move(USHORT nTargetRegion,
+ USHORT nTargetIdx,
+ USHORT nSourceRegion,
+ USHORT nSourceIdx);
+ BOOL Delete(USHORT nRegion, USHORT nIdx);
+ BOOL InsertDir(const String &rText, USHORT nRegion);
+ BOOL SetName(const String &rName, USHORT nRegion, USHORT nIdx);
+
+ BOOL CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) const;
+ BOOL CopyFrom(USHORT nRegion, USHORT nIdx, String &rName);
+
+ SfxObjectShellRef CreateObjectShell(USHORT nRegion, USHORT nIdx);
+ BOOL DeleteObjectShell(USHORT, USHORT);
+
+ BOOL GetFull( const String& rRegion, const String& rName, String& rPath );
+ BOOL GetLogicNames( const String& rPath, String& rRegion, String& rName ) const;
+
+ /** updates the configuration where the document templates structure is stored.
+
+ <p>The info about the document templates (which files, which groups etc.) is stored in the
+ configuration. This means that just by copying files into OOo's template directories, this
+ change is not reflected in the SfxDocumentTemplates - 'cause the configuration is not synchronous with
+ the file system. This can be enforced with this method.</p>
+
+ @param _bSmart
+ The update of the configuration is rather expensive - nothing you want to do regulary if you don't really
+ need it. So you have the possibility to do a smart update - it first checks if the update if necessary.
+ In case the update is needed, the additional check made it somewhat more expensive. In case it's not
+ necessary (which should be the usual case), the check alone is (much) less expensive than the real update.
+ <br/>
+ So set <arg>_bSmart</arg> to <TRUE/> to do a check for necessity first.
+ */
+ void Update( sal_Bool _bSmart = sal_True );
+
+ // allows to detect whether it is allowed to delete ( at least partially )
+ // a group or a template, or to edit a template
+ sal_Bool HasUserContents( sal_uInt16 nRegion, sal_uInt16 nIdx ) const;
+};
+
+#endif // #ifndef _SFXDOCTEMPL_HXX
+
+
diff --git a/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx
new file mode 100644
index 000000000000..71ae9c182fb3
--- /dev/null
+++ b/sfx2/inc/sfx2/event.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXEVENT_HXX
+#define _SFXEVENT_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <tools/string.hxx>
+#include <svl/hint.hxx>
+#include <unotools/eventcfg.hxx>
+#include <rtl/ustring.hxx>
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+class SfxObjectShell;
+
+//-------------------------------------------------------------------
+
+class SFX2_DLLPUBLIC SfxEventHint : public SfxHint
+{
+ SfxObjectShell* pObjShell;
+ ::rtl::OUString aEventName;
+ USHORT nEventId;
+
+public:
+ TYPEINFO();
+ SfxEventHint( USHORT nId, const ::rtl::OUString& aName, SfxObjectShell *pObj = 0 )
+ : pObjShell(pObj),
+ aEventName(aName),
+ nEventId(nId)
+ {}
+
+ USHORT GetEventId() const
+ { return nEventId; }
+
+ ::rtl::OUString GetEventName() const
+ { return aEventName; }
+
+ SfxObjectShell* GetObjShell() const
+ { return pObjShell; }
+};
+
+//-------------------------------------------------------------------
+
+class SfxNamedHint : public SfxHint
+{
+ String _aEventName;
+ SfxObjectShell* _pObjShell;
+ String _aArgs;
+
+public:
+ TYPEINFO();
+
+ SfxNamedHint( const String& rName,
+ const String& rArgs,
+ SfxObjectShell *pObj = 0 )
+ : _aEventName( rName ),
+ _pObjShell( pObj),
+ _aArgs( rArgs )
+ {}
+
+ SfxNamedHint( const String& rName,
+ SfxObjectShell *pObj = 0 )
+ : _aEventName( rName ),
+ _pObjShell( pObj )
+ {}
+
+ const String& GetArgs() const { return _aArgs;}
+ const String& GetName() const { return _aEventName; }
+ SfxObjectShell* GetObjShell() const { return _pObjShell; }
+};
+
+class PrintDialog;
+class Printer;
+class SfxPrintingHint : public SfxHint
+{
+ sal_Int32 nWhich;
+ com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aOpts;
+public:
+ TYPEINFO();
+ SfxPrintingHint( sal_Int32 nEvent, const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts )
+ : nWhich( nEvent )
+ , aOpts( rOpts )
+ {}
+
+ SfxPrintingHint( sal_Int32 nEvent )
+ : nWhich( nEvent )
+ {}
+
+ sal_Int32 GetWhich() const { return nWhich; }
+ const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& GetOptions() { return aOpts; }
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/evntconf.hxx b/sfx2/inc/sfx2/evntconf.hxx
new file mode 100644
index 000000000000..17080ec2d51e
--- /dev/null
+++ b/sfx2/inc/sfx2/evntconf.hxx
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * 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_EVENTCONF_HXX
+#define _SFX_EVENTCONF_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <tools/rtti.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
+
+#define _SVSTDARR_USHORTS
+#include <svl/svstdarr.hxx> // SvUShorts
+#include <sfx2/event.hxx>
+
+#include <sfx2/sfxsids.hrc>
+#ifdef ITEMID_MACRO
+#undef ITEMID_MACRO
+#endif
+#define ITEMID_MACRO SID_ATTR_MACROITEM
+#include <svl/macitem.hxx>
+
+class SfxMacroInfo;
+class SfxMacroInfoArr_Impl;
+class SfxEventConfigItem_Impl;
+class SfxEventInfoArr_Impl;
+class SfxObjectShell;
+class SvxMacroTableDtor;
+
+#define SFX_NO_EVENT USHRT_MAX
+
+struct SFX2_DLLPUBLIC SfxEventName
+{
+ USHORT mnId;
+ String maEventName;
+ String maUIName;
+
+ SfxEventName( USHORT nId,
+ const String& rEventName,
+ const String& rUIName )
+ : mnId( nId )
+ , maEventName( rEventName )
+ , maUIName( rUIName ) {}
+};
+
+DECLARE_LIST( _SfxEventNamesList, SfxEventName* )
+
+class SFX2_DLLPUBLIC SfxEventNamesList : public _SfxEventNamesList
+{
+public:
+ SfxEventNamesList( const USHORT nInitSz = 0, const USHORT nReSz = 1 ): _SfxEventNamesList( nInitSz, nReSz ) {}
+ SfxEventNamesList( const SfxEventNamesList &rCpy ) : _SfxEventNamesList() { *this = rCpy; }
+ ~SfxEventNamesList() { DelDtor(); }
+ SfxEventNamesList& operator=( const SfxEventNamesList &rCpy );
+ void DelDtor();
+};
+
+class SFX2_DLLPUBLIC SfxEventNamesItem : public SfxPoolItem
+{
+ SfxEventNamesList aEventsList;
+
+public:
+ TYPEINFO();
+
+ SfxEventNamesItem ( const USHORT nId ) : SfxPoolItem( nId ) {}
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ XubString &rText,
+ const IntlWrapper * = 0 ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+
+ const SfxEventNamesList& GetEvents() const { return aEventsList;}
+ void SetEvents( const SfxEventNamesList& rList ) { aEventsList = rList; }
+ void AddEvent( const String&, const String&, USHORT );
+};
+
+// -----------------------------------------------------------------------
+
+#define PROP_EVENT_TYPE "EventType"
+#define PROP_LIBRARY "Library"
+#define PROP_SCRIPT "Script"
+#define PROP_MACRO_NAME "MacroName"
+#define STAR_BASIC "StarBasic"
+
+class SFX2_DLLPUBLIC SfxEventConfiguration
+{
+public:
+ static void ConfigureEvent( ::rtl::OUString aName, const SvxMacro&, SfxObjectShell* pObjSh);
+ static SvxMacro* ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, BOOL bBlowUp );
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/fcontnr.hxx b/sfx2/inc/sfx2/fcontnr.hxx
new file mode 100644
index 000000000000..c80d61aa81d1
--- /dev/null
+++ b/sfx2/inc/sfx2/fcontnr.hxx
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * 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_FCONTNR_HXX
+#define _SFX_FCONTNR_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <svl/poolitem.hxx>
+#include <vcl/window.hxx>
+
+#include <sfx2/docfilt.hxx>
+#include <sfx2/sfxdefs.hxx>
+
+class Window;
+class SfxFilter;
+class SfxFilterArr_Impl;
+class SfxObjectFacArr_Impl;
+class SfxObjectFactory;
+class SfxMedium;
+class SfxFilterContainer_Impl;
+class SfxFrame;
+
+//#define SFX_FILTER_CONTAINER_FACTORY 1
+typedef USHORT SfxFilterContainerFlags;
+
+class SfxRefItem : public SfxPoolItem
+{
+ SvRefBaseRef aRef;
+public:
+ virtual SfxPoolItem* Clone( SfxItemPool* = 0 ) const
+ { return new SfxRefItem( *this ); }
+ virtual int operator==( const SfxPoolItem& rL) const
+ { return ((SfxRefItem&)rL).aRef == aRef; }
+ SfxRefItem( USHORT nWhichId, const SvRefBaseRef& rValue ) : SfxPoolItem( nWhichId )
+ { aRef = rValue; }
+ const SvRefBaseRef& GetValue() const { return aRef; }
+
+};
+
+class SfxFrameWindow
+{
+ Window* pWindow;
+public:
+ SfxFrameWindow( Window *pWin )
+ : pWindow( pWin )
+ {}
+
+ virtual ~SfxFrameWindow()
+ { delete pWindow; }
+ Window* GetWindow() const
+ { return pWindow; }
+ void SetWindow( Window *pWin )
+ { pWindow = pWin; }
+};
+
+class SfxFrameWindowFactory
+{
+ typedef SfxFrameWindow* (*FactoryFunc)( SfxFrame* pParent, const String& rName );
+ FactoryFunc pFunc;
+ String aName;
+public:
+ SfxFrameWindowFactory( FactoryFunc pFuncP, String aNameP );
+ String GetURLWildCard() { return aName; }
+ FactoryFunc GetFactory() { return pFunc; }
+};
+
+typedef ULONG (*SfxDetectFilter)( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust, SfxFilterFlags nDont );
+
+class SFX2_DLLPUBLIC SfxFilterContainer
+{
+ SfxFilterContainer_Impl *pImpl;
+
+public:
+ SfxFilterContainer( const String& rName );
+ ~SfxFilterContainer();
+
+// SfxFilterContainerFlags GetFlags() const;
+// void SetFlags( SfxFilterContainerFlags eFlags );
+
+ const String GetName() const;
+
+ const SfxFilter* GetAnyFilter( SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4Mime( const String& rMime, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4EA( const String& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4Extension( const String& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4FilterName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4UIName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE static void ReadFilters_Impl( BOOL bUpdate=FALSE );
+ SAL_DLLPRIVATE static void ReadSingleFilter_Impl( const ::rtl::OUString& rName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xTypeCFG,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
+ BOOL bUpdate );
+ SAL_DLLPRIVATE static const SfxFilter* GetDefaultFilter_Impl( const String& );
+//#endif
+};
+
+class SfxFilterMatcher_Impl;
+
+class SFX2_DLLPUBLIC SfxFilterMatcher
+{
+ friend class SfxFilterMatcherIter;
+ SfxFilterMatcher_Impl *pImpl;
+public:
+ SfxFilterMatcher( const String& rFact );
+ SfxFilterMatcher();
+ ~SfxFilterMatcher();
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE static BOOL IsFilterInstalled_Impl( const SfxFilter* pFilter );
+ DECL_DLLPRIVATE_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, String* );
+//#endif
+
+ sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ sal_uInt32 GuessFilter( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ sal_uInt32 GuessFilterControlDefaultUI( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED, sal_Bool bDefUI = sal_True ) const;
+ sal_uInt32 DetectFilter( SfxMedium& rMedium, const SfxFilter **, BOOL bPlugIn, BOOL bAPI = FALSE ) const;
+
+ const SfxFilter* GetFilter4Mime( const String& rMime, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const;
+ const SfxFilter* GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4EA( const String& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4Extension( const String& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4FilterName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilter4UIName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetFilterForProps( const com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue >& aSeq, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
+ const SfxFilter* GetAnyFilter( SfxFilterFlags nMust=0, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED ) const;
+};
+
+class SfxFilterContainer_Impl;
+class SFX2_DLLPUBLIC SfxFilterMatcherIter
+{
+ SfxFilterFlags nOrMask;
+ SfxFilterFlags nAndMask;
+ USHORT nCurrent;
+ const SfxFilterMatcher_Impl *pMatch;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE const SfxFilter* Find_Impl();
+//#endif
+
+public:
+ SfxFilterMatcherIter( const SfxFilterMatcher* pMatchP, SfxFilterFlags nMask = 0, SfxFilterFlags nNotMask = SFX_FILTER_NOTINSTALLED );
+ const SfxFilter* First();
+ const SfxFilter* Next();
+};
+
+
+#endif
diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx
new file mode 100644
index 000000000000..d17553e2b2d0
--- /dev/null
+++ b/sfx2/inc/sfx2/filedlghelper.hxx
@@ -0,0 +1,350 @@
+/*************************************************************************
+ *
+ * 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 _FILEDLGHELPER_HXX
+#define _FILEDLGHELPER_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ustring.hxx>
+#include <tools/solar.h>
+#include <tools/string.hxx>
+#include <tools/errcode.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/edit.hxx>
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/graph.hxx>
+#include <sfx2/sfxdefs.hxx>
+#include <sfx2/sfxuno.hxx>
+
+//-----------------------------------------------------------------------------
+
+namespace com
+{
+ namespace sun
+ {
+ namespace star
+ {
+ namespace ui
+ {
+ namespace dialogs
+ {
+ class XFilePicker;
+ class XFilePickerListener;
+ struct FilePickerEvent;
+ struct DialogClosedEvent;
+ }
+ }
+ }
+ }
+}
+
+class SfxItemSet;
+class SvStringsDtor;
+class Window;
+
+//-----------------------------------------------------------------------------
+/*
+#define WB_PATH 0x00100000L
+#define WB_OPEN 0x00200000L
+#define WB_SAVEAS 0x00400000L
+#define WB_PASSWORD 0x01000000L
+#define WB_READONLY 0x02000000L
+*/
+
+#define SFXWB_INSERT ( 0x04000000L | WB_OPEN ) // ((WinBits)0x00200000)
+#define SFXWB_PASSWORD WB_PASSWORD // ((WinBits)0x01000000)
+#define SFXWB_READONLY WB_READONLY // ((WinBits)0x02000000)
+#define SFXWB_PATHDIALOG WB_PATH // ((WinBits)0x00100000)
+#define SFXWB_CLASSPATH ( 0x08000000L | SFXWB_PATHDIALOG )
+#define SFXWB_SHOWALLFOLDER 0x10000000L // alle Ordner auch Mail/News/...
+#define SFXWB_MULTISELECTION 0x20000000L // Multiselection an
+#define SFXWB_NOREMOTE 0x40000000L
+#define SFXWB_SHOWVERSIONS 0x80000000L // Versionsauswahl anzeigen
+
+#define SFXWB_GRAPHIC 0x00800000L // FileOpen with link and preview box
+#define SFXWB_SHOWSTYLES 0x01000000L // FileOpen with link and preview box and styles
+
+#define SFXWB_EXPORT ( 0x040000000L | WB_SAVEAS ) // Export dialog
+
+#define FILEDIALOG_FILTER_ALL "*.*"
+
+#define FILE_OPEN_SERVICE_NAME "com.sun.star.ui.dialogs.FilePicker"
+#define FOLDER_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.FolderPicker"
+#define FILE_OPEN_SERVICE_NAME_SYSTEM "com.sun.star.ui.dialogs.SystemFilePicker"
+#define FILE_OPEN_SERVICE_NAME_OOO "com.sun.star.ui.dialogs.OfficeFilePicker"
+
+//*****************************************************************************
+// SfxUrlDialog
+//*****************************************************************************
+
+//#if 0 // _SOLAR__PRIVATE
+#ifndef DONT_USE_FILE_DIALOG_SERVICE
+
+class SfxUrlDialog : public ModalDialog
+{
+private:
+ Edit aEdit;
+ OKButton aOk;
+ CancelButton aCancel;
+
+public:
+ SfxUrlDialog( Window* pParent );
+
+ String GetUrl() const { return aEdit.GetText(); }
+ void SetUrl( const String& rUrl ) { aEdit.SetText( rUrl ); }
+};
+
+#endif
+//#endif
+
+//-----------------------------------------------------------------------------
+
+namespace sfx2 {
+
+class FileDialogHelper_Impl;
+
+class SFX2_DLLPUBLIC FileDialogHelper
+{
+public:
+ enum Context // context where the FileDialogHelper is used
+ {
+ UNKNOWN_CONTEXT, // unknown context
+ SW_INSERT_GRAPHIC, // insert graphic in writer
+ SW_INSERT_SOUND, // insert sound in writer
+ SW_INSERT_VIDEO, // insert video in writer
+ SC_INSERT_GRAPHIC, // insert graphic in calc
+ SC_INSERT_SOUND, // insert sound in calc
+ SC_INSERT_VIDEO, // insert video in calc
+ SD_INSERT_GRAPHIC, // insert graphic in draw
+ SD_INSERT_SOUND, // insert sound in draw
+ SD_INSERT_VIDEO, // insert video in draw
+ SD_EXPORT, // export in draw
+ SI_EXPORT, // export in impress
+ SW_EXPORT // export in writer
+ };
+
+private:
+ Link m_aDialogClosedLink;
+ ErrCode m_nError;
+
+ ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePickerListener > mxImp;
+ FileDialogHelper_Impl *mpImp;
+
+//#if 0 // _SOLAR__PRIVATE
+
+ SAL_DLLPRIVATE sal_Int16 getDialogType( sal_Int64 nFlags ) const;
+
+//#endif
+
+public:
+ FileDialogHelper( sal_Int64 nFlags,
+ const String& rFactory,
+ sal_Int16 nDialog,
+ SfxFilterFlags nMust,
+ SfxFilterFlags nDont );
+
+ FileDialogHelper( sal_Int64 nFlags,
+ const String& rFact,
+ sal_Int16 nDialog,
+ SfxFilterFlags nMust,
+ SfxFilterFlags nDont,
+ const String& rStandardDir,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList);
+
+ FileDialogHelper( sal_Int64 nFlags,
+ const String& rFactory,
+ SfxFilterFlags nMust = 0,
+ SfxFilterFlags nDont = 0 );
+
+ FileDialogHelper( sal_Int16 nDialogType,
+ sal_Int64 nFlags,
+ const String& rFactory,
+ SfxFilterFlags nMust = 0,
+ SfxFilterFlags nDont = 0 );
+
+ FileDialogHelper( sal_Int16 nDialogType,
+ sal_Int64 nFlags,
+ const String& rFactory,
+ sal_Int16 nDialog,
+ SfxFilterFlags nMust,
+ SfxFilterFlags nDont,
+ const String& rStandardDir,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList);
+
+ FileDialogHelper( sal_Int64 nFlags );
+
+ FileDialogHelper( sal_Int16 nDialogType,
+ sal_Int64 nFlags,
+ Window* _pPreferredParent = NULL );
+
+ FileDialogHelper( sal_Int16 nDialogType,
+ sal_Int64 nFlags,
+ const ::rtl::OUString& aFilterUIName,
+ const ::rtl::OUString& aExtName,
+ const ::rtl::OUString& rStandardDir,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList,
+ Window* _pPreferredParent = NULL );
+
+
+ virtual ~FileDialogHelper();
+
+ ErrCode Execute();
+ void StartExecuteModal( const Link& rEndDialogHdl );
+ inline ErrCode GetError() const { return m_nError; }
+ sal_Int16 GetDialogType() const;
+ sal_Bool IsPasswordEnabled() const;
+ String GetRealFilter() const;
+
+ void SetTitle( const String& rNewTitle );
+ String GetPath() const;
+
+ /** @deprected: Don't use this method to retrieve the selected files
+ There are file picker which can provide multiple selected file which belong
+ to different folders. As this method always provides the root folder for all selected
+ files this cannot work.
+ */
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > GetMPath() const;
+
+ /** Provides the selected files with full path information */
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > GetSelectedFiles() const;
+
+ void AddFilter( const String& rFilterName, const String& rExtension );
+ void SetCurrentFilter( const String& rFilter );
+
+ /** sets an initial display directory/file name
+
+ @deprecated
+ don't use this method. It contains a lot of magic in determining whether the
+ last segment of the given path/URL denotes a file name or a folder, and by
+ definition, it cannot succeed with this magic *all* the time - there will
+ always be scenarios where it fails.
+
+ Use SetDisplayFolder and SetFileName.
+ */
+ void SetDisplayDirectory( const String& rPath );
+
+ /** sets a new folder whose content is to be displayed in the file picker
+
+ @param _rURL
+ specifies the URL of the folder whose content is to be displayed.<br/>
+ If the URL doesn't denote a valid (existent and accessible) folder, the
+ request is silently dropped.
+ @throws ::com::sun::star::uno::RuntimeException
+ if the invocation of any of the file picker or UCB methods throws a RuntimeException.
+ */
+ void SetDisplayFolder( const String& _rURL );
+
+ /** sets an initial file name to display
+
+ This method is usually used in "save-as" contexts, where the application should
+ suggest an initial name for the file to save.
+
+ Calling this method is nearly equivalent to calling <code>GetFilePicker().setDefaultName( _rFileName )</code>,
+ with the following differences:
+ <ul><li>The FileDialogHelper remembers the given file name, and upon execution,
+ strips its extension if the dialog is set up for "automatic file name extension".</li>
+ <li>Exceptions thrown from the <code>XFilePicker</code> are caught and silenced.</li>
+ </ul>
+ */
+ void SetFileName( const String& _rFileName );
+
+ String GetCurrentFilter() const;
+ String GetDisplayDirectory() const;
+ ErrCode GetGraphic( Graphic& rGraphic ) const;
+
+ ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > GetFilePicker() const;
+
+ // XFilePickerListener methods
+ virtual void SAL_CALL FileSelectionChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent );
+ virtual void SAL_CALL DirectoryChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent );
+ virtual void SAL_CALL ControlStateChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent );
+ virtual void SAL_CALL DialogSizeChanged();
+ virtual ::rtl::OUString SAL_CALL HelpRequested( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent );
+
+ // XDialogClosedListener methods
+ virtual void SAL_CALL DialogClosed( const ::com::sun::star::ui::dialogs::DialogClosedEvent& _rEvent );
+
+ // retrieves the top-most file picker - i.e. the instance which is currently beeing executed
+ static ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePicker >
+ GetTopMostFilePicker( );
+
+ /** sets help ids for the controls in the dialog
+ @param _pControlId
+ Pointer to a 0-terminated array of control ids. They must be recruited from the
+ CommonFilePickerElementIds and ExtendedFilePickerElementIds values.
+ @param _pHelpId
+ Pointer to an array of help ids. For each element in _pControlId, there must be
+ a corresponding element herein.
+ */
+ void SetControlHelpIds( const sal_Int16* _pControlId, const sal_Int32* _pHelpId );
+ void SetDialogHelpId( const sal_Int32 _nHelpId );
+ void CreateMatcher( const String& rName );
+
+ /** sets the context of the dialog and trigger necessary actions e.g. loading config, setting help id
+ @param _eNewContext
+ New context for the dialog.
+ */
+ void SetContext( Context _eNewContext );
+
+ DECL_LINK( ExecuteSystemFilePicker, void* );
+
+//#if 0 // _SOLAR__PRIVATE
+ ErrCode Execute( SvStringsDtor*& rpURLList,
+ SfxItemSet *& rpSet,
+ String& rFilter,
+ const String& rDirPath );
+ ErrCode Execute( SfxItemSet *& rpSet,
+ String& rFilter );
+//#endif
+};
+
+#define SFX2_IMPL_DIALOG_CONFIG 0
+#define SFX2_IMPL_DIALOG_SYSTEM 1
+#define SFX2_IMPL_DIALOG_OOO 2
+
+//#if 0 // _SOLAR__PRIVATE
+ErrCode FileOpenDialog_Impl( sal_Int64 nFlags,
+ const String& rFact,
+ SvStringsDtor *& rpURLList,
+ String& rFilter,
+ SfxItemSet *& rpSet,
+ const String* pPath = NULL,
+ sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG,
+ const String& rStandardDir = String::CreateFromAscii( "" ),
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList = ::com::sun::star::uno::Sequence< ::rtl::OUString >());
+//#endif
+}
+
+//-----------------------------------------------------------------------------
+
+#endif
+
diff --git a/sfx2/inc/sfx2/frame.hxx b/sfx2/inc/sfx2/frame.hxx
new file mode 100644
index 000000000000..b94e9038e8bb
--- /dev/null
+++ b/sfx2/inc/sfx2/frame.hxx
@@ -0,0 +1,313 @@
+/*************************************************************************
+ *
+ * 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 _SFXFRAME_HXX
+#define _SFXFRAME_HXX
+
+#ifndef TF_NEWDESKTOP
+#define TF_NEWDESKTOP 1
+#endif
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+namespace com
+{
+ namespace sun
+ {
+ namespace star
+ {
+ namespace awt
+ {
+ class XWindow;
+ }
+ namespace frame
+ {
+ class XFrame;
+ class XFrameLoader;
+ class XController;
+ class XDispatchProviderInterceptor;
+ }
+ namespace beans
+ {
+ struct PropertyValue;
+ }
+ }
+ }
+}
+#include <tools/link.hxx>
+#include <tools/ref.hxx>
+#include <tools/string.hxx>
+#include <svl/brdcst.hxx>
+#include <tools/list.hxx>
+#include <svl/poolitem.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+
+class SvBorder;
+class SfxWorkWindow;
+class Window;
+class SfxFrame;
+class SfxFrame_Impl;
+class SfxObjectShell;
+class SfxObjectFactory;
+class SfxViewFrame;
+class SfxFrameDescriptor;
+class SfxFrameSetDescriptor;
+class SfxMedium;
+class SfxFrameHistory_Impl;
+class SfxDispatcher;
+class SfxMedium;
+class Rectangle;
+class SfxRequest;
+class SfxUnoControllerItem;
+class SvCompatWeakHdl;
+class SystemWindow;
+
+typedef SfxFrame* SfxFramePtr;
+class SfxFrameArr_Impl;
+
+DECLARE_LIST( TargetList, String* )
+
+#define SFXFRAME_HASTITLE 0x0001
+
+//==========================================================================
+// Ein SfxFrame ist eine Verwaltungsklasse f"ur Fenster und deren Inhalte.
+// Eine SfxApplication pr"asentiert sich als Hierarchie von SfxFrames, wobei
+// die konkreten Inhalte in den abgeleiteten Klassen festgelegt werden.
+// Die Basisklasse SfxFrame implementiert 2 Aspekte der Frames: Benennung und
+// Kontrolle der Lebensdauer.
+// Innerhalb einer Frames-Hierarchie kontrolliert immer der ParentFrame die
+// Lebensdauer seiner ChildFrames, auch wenn sie in der Regel gar nicht von
+// ihm selbst erzeugt wurden. Durch Aufruf vonn DoClose() an irgendeinem
+// Frame in der Hierarchie kann ein Teil des "Frameworks" entfernt werden,
+// wobei sich Frames an ihren ParentFrames selbst abmelden.
+//==========================================================================
+
+class SfxFrameArr_Impl;
+struct SfxFramePickEntry_Impl;
+class SFX2_DLLPUBLIC SfxFrame
+{
+ friend class SfxFrameIterator;
+ friend class SfxFrameWindow_Impl;
+
+private:
+ SfxFrame* pParentFrame;
+ SfxFrameArr_Impl* pChildArr;
+ SfxFrame_Impl* pImp;
+ Window* pWindow;
+
+protected:
+ sal_Bool Close();
+ virtual ~SfxFrame();
+
+ SAL_DLLPRIVATE void RemoveChildFrame_Impl( SfxFrame* );
+
+ SfxFrame( ); // not implemented
+ SAL_DLLPRIVATE SfxFrame( Window& i_rContainerWindow, bool bHidden );
+
+public:
+ TYPEINFO();
+
+ static SfxFrame* Create( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ CreateBlankFrame();
+ static SfxFrame* Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewId, bool bHidden );
+
+ SvCompatWeakHdl* GetHdl();
+ Window& GetWindow() const;
+ void CancelTransfers( sal_Bool bCancelLoadEnv = sal_True );
+ sal_Bool DoClose();
+ sal_uInt16 GetChildFrameCount() const;
+ SfxFrame* GetChildFrame( sal_uInt16 nPos ) const;
+ SfxFrame* GetParentFrame() const
+ { return pParentFrame; }
+
+ void SetPresentationMode( BOOL bSet );
+ SystemWindow* GetSystemWindow() const;
+
+ static SfxFrame* GetFirst();
+ static SfxFrame* GetNext( SfxFrame& );
+
+ static const SfxPoolItem*
+ OpenDocumentSynchron( SfxItemSet& aSet, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rTargetFrame );
+
+ SfxBroadcaster& GetBroadcaster() const;
+ SfxObjectShell* GetCurrentDocument() const;
+ SfxViewFrame* GetCurrentViewFrame() const;
+ SfxFrame& GetTopFrame() const;
+ sal_Bool IsParent( SfxFrame* ) const;
+
+ sal_uInt32 GetFrameType() const;
+ void GetTargetList( TargetList& ) const;
+ SAL_DLLPRIVATE SfxFrame* GetContainingDocFrame_Impl( SfxFrame* pSelf );
+ sal_Bool IsTop() const;
+ void UpdateDescriptor( SfxObjectShell *pDoc );
+ void Resize();
+ sal_Bool HasComponent() const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
+ GetComponent() const;
+ void ReleaseComponent();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ GetFrameInterface() const;
+ void Appear();
+ void AppearWithUpdate();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
+ GetController() const;
+
+ sal_Bool IsInPlace() const;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE sal_Bool DoClose_Impl();
+ SAL_DLLPRIVATE void SetFrameInterface_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+ SAL_DLLPRIVATE void ReleasingComponent_Impl( sal_Bool bSet );
+ SAL_DLLPRIVATE void GetViewData_Impl();
+ SAL_DLLPRIVATE void SetFrameType_Impl( sal_uInt32 );
+ SAL_DLLPRIVATE sal_uInt16 PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing=sal_False );
+ SAL_DLLPRIVATE sal_Bool DocIsModified_Impl();
+ SAL_DLLPRIVATE void SetCurrentViewFrame_Impl( SfxViewFrame* );
+ SAL_DLLPRIVATE sal_Bool IsClosing_Impl() const;
+ SAL_DLLPRIVATE void SetIsClosing_Impl();
+
+ // Methoden f"ur den Zugriff auf das aktuelle Set
+ SAL_DLLPRIVATE void SetDescriptor( SfxFrameDescriptor* );
+ SAL_DLLPRIVATE SfxFrameDescriptor* GetDescriptor() const;
+
+ SAL_DLLPRIVATE void Lock_Impl( sal_Bool bLock );
+ SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl() const;
+ SAL_DLLPRIVATE sal_Bool IsAutoLoadLocked_Impl() const;
+
+ SAL_DLLPRIVATE static void InsertTopFrame_Impl( SfxFrame* pFrame );
+ SAL_DLLPRIVATE static void RemoveTopFrame_Impl( SfxFrame* pFrame );
+ SAL_DLLPRIVATE void SetOwnsBindings_Impl( sal_Bool bSet );
+ SAL_DLLPRIVATE sal_Bool OwnsBindings_Impl() const;
+ SAL_DLLPRIVATE void InvalidateUnoControllers_Impl();
+ SAL_DLLPRIVATE void RegisterUnoController_Impl( SfxUnoControllerItem* );
+ SAL_DLLPRIVATE void ReleaseUnoController_Impl( SfxUnoControllerItem* );
+ SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl() const;
+ SAL_DLLPRIVATE void SetToolSpaceBorderPixel_Impl( const SvBorder& );
+ SAL_DLLPRIVATE Rectangle GetTopOuterRectPixel_Impl() const;
+ SAL_DLLPRIVATE void CreateWorkWindow_Impl();
+ SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* pWorkwin );
+ SAL_DLLPRIVATE void GrabFocusOnComponent_Impl();
+ SAL_DLLPRIVATE void SetInPlace_Impl( sal_Bool );
+
+ SAL_DLLPRIVATE void PrepareForDoc_Impl( SfxObjectShell& i_rDoc );
+ SAL_DLLPRIVATE void LockResize_Impl( BOOL bLock );
+ SAL_DLLPRIVATE void SetMenuBarOn_Impl( BOOL bOn );
+ SAL_DLLPRIVATE BOOL IsMenuBarOn_Impl() const;
+ SAL_DLLPRIVATE SystemWindow* GetTopWindow_Impl() const;
+ SAL_DLLPRIVATE void PositionWindow_Impl( const Rectangle& rWinArea ) const;
+ SAL_DLLPRIVATE bool IsMarkedHidden_Impl() const;
+//#endif
+private:
+ SAL_DLLPRIVATE void Construct_Impl();
+};
+
+SV_DECL_COMPAT_WEAK( SfxFrame )
+
+class SfxFrameIterator
+{
+ const SfxFrame* pFrame;
+ sal_Bool bRecursive;
+
+//#if 0 // _SOLAR__PRIVATE
+ SfxFrame* NextSibling_Impl( SfxFrame& rPrev );
+//#endif
+
+public:
+ SfxFrameIterator( const SfxFrame& rFrame, sal_Bool bRecursive=sal_True );
+ SfxFrame* FirstFrame();
+ SfxFrame* NextFrame( SfxFrame& rPrev );
+};
+
+//--------------------------------------------------------------------
+
+class SfxFrameItem_Impl;
+class SFX2_DLLPUBLIC SfxFrameItem: public SfxPoolItem
+{
+ SfxFrame* pFrame;
+ SfxFrameWeak wFrame;
+ SAL_DLLPRIVATE void SetFramePtr_Impl( SfxFrame* /*pFrameP*/ ) { pFrame = wFrame; }
+
+public:
+ TYPEINFO();
+
+ SfxFrameItem( sal_uInt16 nWhich, SfxViewFrame *p );
+ SfxFrameItem( SfxFrame *p=0 );
+ SfxFrameItem( sal_uInt16 nWhich, SfxFrame *p );
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual String GetValueText() const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ sal_Bool FrameKilled() const { return &wFrame != pFrame; }
+
+ SfxFrame* GetFrame() const
+ { return wFrame; }
+};
+
+class SFX2_DLLPUBLIC SfxUsrAnyItem : public SfxPoolItem
+{
+ ::com::sun::star::uno::Any aValue;
+public:
+ TYPEINFO();
+ SfxUsrAnyItem( sal_uInt16 nWhich, const ::com::sun::star::uno::Any& rAny );
+ ::com::sun::star::uno::Any GetValue() const
+ { return aValue; }
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+class SFX2_DLLPUBLIC SfxUnoFrameItem : public SfxPoolItem
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ m_xFrame;
+
+public:
+ TYPEINFO();
+ SfxUnoFrameItem();
+ SfxUnoFrameItem( sal_uInt16 nWhich, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >&
+ GetFrame() const
+ { return m_xFrame; }
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+typedef SfxUsrAnyItem SfxUnoAnyItem;
+
+#endif
diff --git a/sfx2/inc/sfx2/frmdescr.hxx b/sfx2/inc/sfx2/frmdescr.hxx
new file mode 100644
index 000000000000..4cb52d1b53c6
--- /dev/null
+++ b/sfx2/inc/sfx2/frmdescr.hxx
@@ -0,0 +1,294 @@
+/*************************************************************************
+ *
+ * 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_FRMDESCRHXX
+#define _SFX_FRMDESCRHXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <sfx2/sfxsids.hrc>
+#include <svl/poolitem.hxx>
+#include <tools/urlobj.hxx>
+#include <tools/string.hxx>
+#include <svl/svarray.hxx>
+#include <tools/gen.hxx>
+
+class SvStream;
+struct SfxFrameDescriptor_Impl;
+class SvStrings;
+class SfxFrameDescriptor;
+class Wallpaper;
+typedef SfxFrameDescriptor* SfxFrameDescriptorPtr;
+SV_DECL_PTRARR(SfxFramesArr, SfxFrameDescriptorPtr, 4, 2)
+
+//===========================================================================
+// Die SfxFrame...descriptoren bauen eine rekursive Struktur auf, die
+// s"amtliche zur Anzeige des Frame-Dokuments erforderlichen Daten umfa\st.
+// "Uber einen SfxFrameSetDescriptor hat man Zugriff auf die gesamte darunter
+// liegende Struktur.
+// Aufgrund der besonderen Eigenschaften des SfxFrames-Dokuments ist ein
+// SfxFramesSetDescriptor nicht nur der Inhalt dieses Dokuments, sondern
+// beschreibt auch die View darauf.
+// Das FrameSet wird aus Zeilen aufgebaut, die wiederum die eigentlichen
+// Fenster enthalten. Eine Zeile kann horizontal oder vertikal ausgerichtet
+// sein, woraus sich auch das Alignment des FrameSets ergibt.
+//===========================================================================
+
+enum ScrollingMode
+{
+ ScrollingYes,
+ ScrollingNo,
+ ScrollingAuto
+};
+
+enum SizeSelector
+{
+ SIZE_ABS,
+ SIZE_PERCENT,
+ SIZE_REL
+};
+
+#define BORDER_SET 2
+#define BORDER_YES 1
+#define BORDER_NO 0
+#define SPACING_NOT_SET -1L
+#define SIZE_NOT_SET -1L
+
+class SfxItemSet;
+struct SfxFrameProperties;
+
+class SFX2_DLLPUBLIC SfxFrameDescriptor
+{
+ INetURLObject aURL;
+ INetURLObject aActualURL;
+ String aName;
+ Size aMargin;
+ long nWidth;
+ ScrollingMode eScroll;
+ SizeSelector eSizeSelector;
+ USHORT nHasBorder;
+ USHORT nItemId;
+ BOOL bResizeHorizontal;
+ BOOL bResizeVertical;
+ BOOL bHasUI;
+ BOOL bReadOnly;
+ SfxFrameDescriptor_Impl* pImp;
+ SvStrings* pScripts;
+ SvStrings* pComments;
+
+public:
+ SfxFrameDescriptor();
+ ~SfxFrameDescriptor();
+
+ // Eigenschaften
+ void TakeProperties( const SfxFrameProperties& rProp );
+
+ // FileName/URL
+ SfxItemSet* GetArgs();
+ const INetURLObject& GetURL() const
+ { return aURL; }
+ void SetURL( const INetURLObject& rURL );
+ void SetURL( const String& rURL );
+ const INetURLObject& GetActualURL() const
+ { return aActualURL; }
+ void SetActualURL( const INetURLObject& rURL );
+ void SetActualURL( const String& rURL );
+ BOOL CheckContent() const;
+ BOOL CompareOriginal( SfxFrameDescriptor& rSet ) const;
+ void UnifyContent( BOOL );
+ void SetReadOnly( BOOL bSet ) { bReadOnly = bSet;}
+ BOOL IsReadOnly( ) const { return bReadOnly;}
+ void SetEditable( BOOL bSet );
+ BOOL IsEditable() const;
+
+ // Size
+ void SetWidth( long n )
+ { nWidth = n; }
+ void SetWidthPercent( long n )
+ { nWidth = n; eSizeSelector = SIZE_PERCENT; }
+ void SetWidthRel( long n )
+ { nWidth = n; eSizeSelector = SIZE_REL; }
+ void SetWidthAbs( long n )
+ { nWidth = n; eSizeSelector = SIZE_ABS; }
+ long GetWidth() const
+ { return nWidth; }
+ SizeSelector GetSizeSelector() const
+ { return eSizeSelector; }
+ BOOL IsResizable() const
+ { return bResizeHorizontal && bResizeVertical; }
+ void SetResizable( BOOL bRes )
+ { bResizeHorizontal = bResizeVertical = bRes; }
+
+ // FrameName
+ const String& GetName() const
+ { return aName; }
+ void SetName( const String& rName )
+ { aName = rName; }
+
+ // Margin, Scrolling
+ const Size& GetMargin() const
+ { return aMargin; }
+ void SetMargin( const Size& rMargin )
+ { aMargin = rMargin; }
+ ScrollingMode GetScrollingMode() const
+ { return eScroll; }
+ void SetScrollingMode( ScrollingMode eMode )
+ { eScroll = eMode; }
+
+ // FrameBorder
+ void SetWallpaper( const Wallpaper& rWallpaper );
+ const Wallpaper* GetWallpaper() const;
+ BOOL HasFrameBorder() const;
+
+ BOOL IsFrameBorderOn() const
+ { return ( nHasBorder & BORDER_YES ) != 0; }
+
+ void SetFrameBorder( BOOL bBorder )
+ {
+ nHasBorder = bBorder ?
+ BORDER_YES | BORDER_SET :
+ BORDER_NO | BORDER_SET;
+ }
+ BOOL IsFrameBorderSet() const
+ { return (nHasBorder & BORDER_SET) != 0; }
+ void ResetBorder()
+ { nHasBorder = 0; }
+
+ BOOL HasUI() const
+ { return bHasUI; }
+ void SetHasUI( BOOL bOn )
+ { bHasUI = bOn; }
+
+ // Attribute f"ur das Splitwindow
+ USHORT GetItemId() const
+ { return nItemId; }
+ void SetItemId( USHORT nId )
+ { nItemId = nId; }
+ USHORT GetWinBits() const;
+ long GetSize() const;
+ USHORT GetItemPos() const;
+
+ // Kopie z.B. f"ur die Views
+ SfxFrameDescriptor* Clone( BOOL bWithIds = TRUE ) const;
+};
+
+// Kein Bock, einen operator= zu implementieren...
+struct SfxFrameProperties
+{
+ String aURL;
+ String aName;
+ long lMarginWidth;
+ long lMarginHeight;
+ long lSize;
+ long lSetSize;
+ long lFrameSpacing;
+ long lInheritedFrameSpacing;
+ ScrollingMode eScroll;
+ SizeSelector eSizeSelector;
+ SizeSelector eSetSizeSelector;
+ BOOL bHasBorder;
+ BOOL bBorderSet;
+ BOOL bResizable;
+ BOOL bSetResizable;
+ BOOL bIsRootSet;
+ BOOL bIsInColSet;
+ BOOL bHasBorderInherited;
+ SfxFrameDescriptor* pFrame;
+
+private:
+ SfxFrameProperties( SfxFrameProperties& ) {}
+public:
+ SfxFrameProperties()
+ : lMarginWidth( SIZE_NOT_SET ),
+ lMarginHeight( SIZE_NOT_SET ),
+ lSize( 1L ),
+ lSetSize( 1L ),
+ lFrameSpacing( SPACING_NOT_SET ),
+ lInheritedFrameSpacing( SPACING_NOT_SET ),
+ eScroll( ScrollingAuto ),
+ eSizeSelector( SIZE_REL ),
+ eSetSizeSelector( SIZE_REL ),
+ bHasBorder( TRUE ),
+ bBorderSet( TRUE ),
+ bResizable( TRUE ),
+ bSetResizable( TRUE ),
+ bIsRootSet( FALSE ),
+ bIsInColSet( FALSE ),
+ bHasBorderInherited( TRUE ),
+ pFrame( 0 ) {}
+
+ SfxFrameProperties( const SfxFrameDescriptor *pD );
+ ~SfxFrameProperties() { delete pFrame; }
+
+ int operator ==( const SfxFrameProperties& ) const;
+ SfxFrameProperties& operator =( const SfxFrameProperties &rProp );
+};
+
+class SfxFrameDescriptorItem : public SfxPoolItem
+{
+ SfxFrameProperties aProperties;
+public:
+ TYPEINFO();
+
+ SfxFrameDescriptorItem ( const SfxFrameDescriptor *pD, const USHORT nId = SID_FRAMEDESCRIPTOR )
+ : SfxPoolItem( nId )
+ , aProperties( pD )
+ {}
+
+ SfxFrameDescriptorItem ( const USHORT nId = SID_FRAMEDESCRIPTOR )
+ : SfxPoolItem( nId )
+ {}
+
+ SfxFrameDescriptorItem( const SfxFrameDescriptorItem& rCpy )
+ : SfxPoolItem( rCpy )
+ {
+ aProperties = rCpy.aProperties;
+ }
+
+ virtual ~SfxFrameDescriptorItem();
+
+ virtual int operator ==( const SfxPoolItem& ) const;
+ SfxFrameDescriptorItem& operator =( const SfxFrameDescriptorItem & );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ UniString &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ //virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ //virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ //virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+
+ const SfxFrameProperties& GetProperties() const
+ { return aProperties; }
+ void SetProperties( const SfxFrameProperties& rProp )
+ { aProperties = rProp; }
+};
+
+#endif // #ifndef _SFX_FRMDESCRHXX
+
diff --git a/sfx2/inc/sfx2/frmhtml.hxx b/sfx2/inc/sfx2/frmhtml.hxx
new file mode 100644
index 000000000000..e3e9c4f9f781
--- /dev/null
+++ b/sfx2/inc/sfx2/frmhtml.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * 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 _FRMHTML_HXX
+#define _FRMHTML_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <sfx2/frmdescr.hxx>
+#include <sfx2/sfxhtml.hxx>
+
+class SfxFrameHTMLParser;
+class _SfxFrameHTMLContexts;
+class SfxFrameSetObjectShell;
+class SvULongs;
+class SfxMedium;
+namespace svtools { class AsynchronLink; }
+
+class SFX2_DLLPUBLIC SfxFrameHTMLParser : public SfxHTMLParser
+{
+ friend class _SfxFrameHTMLContext;
+
+protected:
+ SfxFrameHTMLParser( SvStream& rStream, BOOL bIsNewDoc=TRUE, SfxMedium *pMediumPtr=0 ):
+ SfxHTMLParser( rStream, bIsNewDoc, pMediumPtr ) {};
+
+public:
+ // Diese Methoden koennen auch von anderen Parsern benutzt werden
+ static void ParseFrameOptions(SfxFrameDescriptor*, const HTMLOptions*, const String& );
+
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/frmhtmlw.hxx b/sfx2/inc/sfx2/frmhtmlw.hxx
new file mode 100644
index 000000000000..93f45f092ba9
--- /dev/null
+++ b/sfx2/inc/sfx2/frmhtmlw.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FRMHTMLW_HXX
+#define _FRMHTMLW_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+
+#include <sfx2/frmdescr.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <tools/stream.hxx>
+#include <svtools/parhtml.hxx>
+#include <svtools/htmlout.hxx>
+#include <svtools/htmlkywd.hxx>
+
+class SfxFrameSetObjectShell;
+class SfxFrame;
+
+namespace com { namespace sun { namespace star {
+ namespace document {
+ class XDocumentProperties;
+ }
+} } }
+
+class SFX2_DLLPUBLIC SfxFrameHTMLWriter
+{
+ SAL_DLLPRIVATE static const sal_Char sNewLine[];
+ SAL_DLLPRIVATE static void OutMeta( SvStream& rStrm,
+ const sal_Char *pIndent, const String& rName,
+ const String& rContent, BOOL bHTTPEquiv,
+ rtl_TextEncoding eDestEnc,
+ String *pNonConvertableChars = 0 );
+ SAL_DLLPRIVATE inline static void OutMeta( SvStream& rStrm,
+ const sal_Char *pIndent, const sal_Char *pName,
+ const String& rContent, BOOL bHTTPEquiv,
+ rtl_TextEncoding eDestEnc,
+ String *pNonConvertableChars = 0 );
+
+public:
+ static void Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties>&,
+ const sal_Char *pIndent,
+ rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
+ String *pNonConvertableChars = 0 );
+
+ static void Out_FrameDescriptor(
+ SvStream&, const String& rBaseURL, const com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet >& xSet,
+ rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
+ String *pNonConvertableChars = 0 );
+
+ String CreateURL( SfxFrame* pFrame );
+
+};
+
+inline void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
+ const sal_Char *pIndent, const sal_Char *pName,
+ const String& rContent, BOOL bHTTPEquiv,
+ rtl_TextEncoding eDestEnc,
+ String *pNonConvertableChars )
+{
+ String sTmp = String::CreateFromAscii( pName );
+ OutMeta( rStrm, pIndent, sTmp, rContent, bHTTPEquiv, eDestEnc, pNonConvertableChars );
+}
+
+#endif
+
diff --git a/sfx2/inc/sfx2/genlink.hxx b/sfx2/inc/sfx2/genlink.hxx
new file mode 100644
index 000000000000..0edf8e3b9dd6
--- /dev/null
+++ b/sfx2/inc/sfx2/genlink.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXGENLINK_HXX
+#define _SFXGENLINK_HXX
+
+
+#include <tools/link.hxx>
+typedef long (*CFuncPtr)(void*);
+
+class GenLink
+{
+ Link aLink;
+ CFuncPtr pFunc;
+
+public:
+ GenLink(): pFunc(0) {}
+ GenLink( CFuncPtr pCFunc ): pFunc(pCFunc) {}
+ GenLink( const Link& rLink ): aLink(rLink), pFunc(0) {}
+ GenLink( const GenLink& rOrig ):
+ aLink(rOrig.aLink), pFunc(rOrig.pFunc) {}
+
+ GenLink& operator = ( const GenLink& rOrig )
+ { pFunc = rOrig.pFunc; aLink = rOrig.aLink; return *this; }
+
+ BOOL operator!() const { return !aLink && !pFunc; }
+ BOOL IsSet() const { return aLink.IsSet() || pFunc; }
+
+ long Call( void* pCaller )
+ { return pFunc ? (*pFunc)(pCaller) : aLink.Call(pCaller); }
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/hintpost.hxx b/sfx2/inc/sfx2/hintpost.hxx
new file mode 100644
index 000000000000..140e93beafa4
--- /dev/null
+++ b/sfx2/inc/sfx2/hintpost.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFXHINTPOST_HXX
+#define _SFXHINTPOST_HXX
+
+#include <sfx2/genlink.hxx>
+#include <tools/ref.hxx>
+
+//===================================================================
+
+class SfxHint;
+
+//-------------------------------------------------------------------
+
+class SfxHintPoster: public SvRefBase
+
+/* [Beschreibung]
+
+ Mit Instanzen dieser Klasse k"onnen eindeutige Events per PostUserEvent
+ "uber die StarView-Application verschickt werden. Wenn das User-Event
+ ausgel"ost wird, wird der Handler <Event()> gerufen, dessen
+ Basisimplementierung den mit <SetEventHdl()> angegbenen Link ruft.
+
+ Die Instanz wird via Ref-Count mindestens solange gehalten, wie
+ ein ggf. abgeschicktes Event noch nicht angekommen ist. Sollte das
+ Ziel vorher sterben, ist die Verbindung zuvor mit 'SetEventHdl(GenLink())'
+ zu kappen.
+*/
+
+{
+ ULONG nId;
+ GenLink aLink;
+
+private:
+ void RegisterEvent();
+//#if 0 // _SOLAR__PRIVATE
+ DECL_LINK( DoEvent_Impl, SfxHint * );
+//#endif
+
+protected:
+ virtual ~SfxHintPoster();
+ virtual void Event( SfxHint* pPostedHint );
+
+public:
+ SfxHintPoster();
+ SfxHintPoster( const GenLink& rLink );
+
+ void Post( SfxHint* pHint = 0 );
+ void SetEventHdl( const GenLink& rLink );
+};
+
+//-------------------------------------------------------------------
+
+SV_DECL_IMPL_REF(SfxHintPoster);
+
+#endif
diff --git a/sfx2/inc/sfx2/imgdef.hxx b/sfx2/inc/sfx2/imgdef.hxx
new file mode 100644
index 000000000000..1aa34a393b33
--- /dev/null
+++ b/sfx2/inc/sfx2/imgdef.hxx
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * 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_IMGDEF_HXX
+#define _SFX_IMGDEF_HXX
+
+#include <svtools/imgdef.hxx>
+
+#endif
+
diff --git a/sfx2/inc/sfx2/ipclient.hxx b/sfx2/inc/sfx2/ipclient.hxx
new file mode 100644
index 000000000000..e0708f1f061d
--- /dev/null
+++ b/sfx2/inc/sfx2/ipclient.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * 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_IPCLIENT_HXX
+#define _SFX_IPCLIENT_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
+#include <tools/ref.hxx>
+#include <tools/gen.hxx>
+
+#include <sfx2/objsh.hxx>
+
+class SfxInPlaceClient_Impl;
+class SfxViewShell;
+class SfxObjectShell;
+class Window;
+class Fraction;
+
+//=========================================================================
+
+class SFX2_DLLPUBLIC SfxInPlaceClient
+{
+friend class SfxInPlaceClient_Impl;
+
+ SfxInPlaceClient_Impl* m_pImp;
+ SfxViewShell* m_pViewSh;
+ Window* m_pEditWin;
+
+ // called after the requested new object area was negotiated
+ SAL_DLLPRIVATE virtual void ObjectAreaChanged();
+
+ // an active object was resized by the user and now asks for the new space
+ SAL_DLLPRIVATE virtual void RequestNewObjectArea( Rectangle& );
+
+ // notify the client that an active object has changed its VisualAreaSize
+ SAL_DLLPRIVATE virtual void ViewChanged();
+
+ // an object wants to become visible
+ SAL_DLLPRIVATE virtual void MakeVisible();
+
+public:
+ SfxInPlaceClient( SfxViewShell* pViewShell, Window* pDraw, sal_Int64 nAspect = com::sun::star::embed::Aspects::MSOLE_CONTENT );
+ virtual ~SfxInPlaceClient();
+
+ SfxViewShell* GetViewShell() const { return m_pViewSh; }
+ Window* GetEditWin() const { return m_pEditWin; }
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObject() const;
+ void SetObject( const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& rObject );
+ void SetObjectState( sal_Int32 );
+ Size GetObjectVisAreaSize() const;
+ sal_Bool IsObjectUIActive() const;
+ sal_Bool IsObjectInPlaceActive() const;
+ sal_Bool IsObjectActive() const;
+ void DeactivateObject();
+ BOOL SetObjArea( const Rectangle & );
+ Rectangle GetObjArea() const;
+ Rectangle GetScaledObjArea() const;
+ void SetSizeScale( const Fraction & rScaleWidth, const Fraction & rScaleHeight );
+ sal_Bool SetObjAreaAndScale( const Rectangle&, const Fraction&, const Fraction& );
+ const Fraction& GetScaleWidth() const;
+ const Fraction& GetScaleHeight() const;
+ void Invalidate();
+ static Window* GetActiveWindow( SfxObjectShell* pDoc, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObject );
+ static SfxInPlaceClient* GetClient( SfxObjectShell* pDoc, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObject );
+ sal_Int64 GetAspect() const;
+ sal_Int64 GetObjectMiscStatus() const;
+ ErrCode DoVerb( long nVerb );
+ void VisAreaChanged();
+ void ResetObject();
+ BOOL IsUIActive();
+
+ // used in Writer
+ // Rectangle PixelObjVisAreaToLogic( const Rectangle & rObjRect ) const;
+ // Rectangle LogicObjAreaToPixel( const Rectangle & rRect ) const;
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/itemconnect.hxx b/sfx2/inc/sfx2/itemconnect.hxx
new file mode 100644
index 000000000000..1112f5825c1e
--- /dev/null
+++ b/sfx2/inc/sfx2/itemconnect.hxx
@@ -0,0 +1,595 @@
+/*************************************************************************
+ *
+ * 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_ITEMCONNECT_HXX
+#define SFX_ITEMCONNECT_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <memory>
+#include <sfx2/itemwrapper.hxx>
+#include <sfx2/controlwrapper.hxx>
+
+// ============================================================================
+
+namespace sfx {
+
+// ============================================================================
+
+typedef int ItemConnFlags;
+
+/** No special state for the connection. */
+const ItemConnFlags ITEMCONN_NONE = 0x0000;
+
+/** Connection is inactive - virtual functions will not be called. */
+const ItemConnFlags ITEMCONN_INACTIVE = 0x0001;
+/** Clone item in FillItemSet() from old item set. */
+//const ItemConnFlags ITEMCONN_CLONE_ITEM = 0x0002;
+
+/** Enable control(s), if the item is known. */
+const ItemConnFlags ITEMCONN_ENABLE_KNOWN = 0x0010;
+/** Disable control(s), if the item is unknown. */
+const ItemConnFlags ITEMCONN_DISABLE_UNKNOWN = 0x0020;
+/** Show control(s), if the item is known. */
+const ItemConnFlags ITEMCONN_SHOW_KNOWN = 0x0040;
+/** Hide control(s), if the item is unknown. */
+const ItemConnFlags ITEMCONN_HIDE_UNKNOWN = 0x0080;
+
+/** Default value for constructors. */
+const ItemConnFlags ITEMCONN_DEFAULT = ITEMCONN_NONE;
+
+// ============================================================================
+// Base connection classes
+// ============================================================================
+
+/** A helper for SfxTabPages to connect controls to items.
+
+ This is the base class of all control connection classes. Their purpose is
+ to connect one or more controls from an SfxTabPage with an item from an
+ item set. The goal is to omit any additional code in the virtual functions
+ Reset() and FillItemSet() in classes derived from SfxTabPage.
+
+ Examples of connections:
+ - A check box with an SfxBoolItem,
+ - A metric (spin) field with an SfxInt32Item.
+ - A group of radio buttons with an SfxEnumItem.
+
+ Each SfxTabPage will contain a list of connection objects (derived from
+ this class). The connection objects remember the item and control(s) they
+ have to work on. The SfxTabPage will call the DoApplyFlags(), DoReset(),
+ and DoFillItemSet() functions of all connection objects it knows. The code
+ to initialize control(s) from the item value and fill the item from
+ control(s) has to be written only once for each control type.
+
+ Additional flags passed in the constructor allow to control the behaviour
+ of the control(s) if the item is supported/unsupported in the currently
+ used item set. For example, it is possible to specify that a control will
+ be disabled or hidden if the item is not supported. This is done before
+ each call of Reset().
+
+ The special flag ITEMCONN_CLONE_ITEM controls how to create new items in
+ the DoFillItemSet() function. The standard (and faster) method is to create
+ a temporary item on the stack and put it into the item set. But this does
+ not work if the item set expects a special item type derived from a common
+ item class, i.e. a Boolean item derived from SfxBoolItem providing special
+ item representation text. As this code does not know the item type, the
+ item cannot be created on the stack. For this case the flag specifies to
+ use the virtual Clone() method of the pool default item. This will create
+ an item of the correct type but can still be used in conjunction with i.e.
+ the standard BoolItemWrapper.
+
+ How to use the item connection feature:
+
+ A) Single item <-> single control connection
+
+ Example: An SfxBoolItem and a check box.
+
+ A1) Create a new item wrapper class derived from the SingleItemWrapper
+ template, or use the template directly, or use one of the
+ predefined item wrappers. See documentation of the
+ SingleItemWrapper template for details (itemwrapper.hxx).
+ A2) Create a new control wrapper class derived from the
+ SingleControlWrapper template and implement the abstract functions,
+ or use one of the predefined control wrappers. See documentation of
+ the SingleControlWrapper template for details (controlwrapper.hxx).
+ A3) Create a new connection class derived from one of the following
+ base classes, and implement the abstract functions, or use the
+ ItemControlConnection template directly, or use one of the
+ predefined connections.
+ A4) Create connection objects in the constructor of the tab page, and
+ insert them into the tab page with SfxTabPage::AddItemConnection().
+ A5) Remove old code from the tab page's Reset() and FillItemSet()
+ functions, if necessary.
+
+ B) Single item <-> multiple controls connections
+
+ B1) See step A1. If the item contains multiple values (and not a
+ structure that contains all the values for the different controls),
+ the best way is to use the IdentItemWrapper template, that works
+ with the item itself. This way it is possible to provide a 'data
+ type' that contains the values for all controls.
+ B2) Create a new control wrapper class derived from the
+ MultiControlWrapper template. Add single control wrapper members
+ for all controls to this class and register them in the
+ constructor, using the RegisterControlWrapper() function. Implement
+ the abstract functions GetControlValue() and SetControlValue().
+ These functions should call the respective functions of the own
+ single control wrappers and either fill a new data object (the item
+ itself in most cases, see step B1) with all the values from the
+ controls, or fill all the controls from the data object.
+ B3) Create a new connection class derived from ItemControlConnection,
+ or use the ItemControlConnection template directly. The multiple
+ control wrapper from step B2 acts like a single control, therefore
+ it is possible to use the ItemControlConnection.
+ B4) See steps A4 and A5.
+
+ C) Multiple items <-> single control connections
+
+ todo
+
+ D) Multiple items <-> multiple controls connections
+
+ todo
+
+ The current tree of base classes/templates and standard connections:
+
+ ItemConnectionBase
+ |
+ +- DummyItemConnection [1]
+ |
+ +- ItemControlConnection< ItemWrpT, ControlWrpT >
+ | |
+ | +- CheckBoxConnection [1]
+ | +- EditConnection [1]
+ | |
+ | +- NumericConnection< ItemWrpT > [1]
+ | | |
+ | | +- [ValueType]NumericConnection [1] [2]
+ | |
+ | +- MetricConnection< ItemWrpT > [1]
+ | | |
+ | | +- [ValueType]MetricConnection [1] [2]
+ | |
+ | +- ListBoxConnection< ItemWrpT > [1]
+ | | |
+ | | +- [ValueType]ListBoxConnection [1] [2]
+ | |
+ | +- ValueSetConnection< ItemWrpT > [1]
+ | |
+ | +- [ValueType]ValueSetConnection [1] [2]
+ |
+ +- ItemConnectionArray [1]
+
+ Notes:
+ [1] Standard connections ready to use.
+ [2] [ValueType] is one of Int16, UInt16, Int32, UInt32.
+ */
+class SFX2_DLLPUBLIC ItemConnectionBase
+{
+public:
+ virtual ~ItemConnectionBase();
+
+ /** Returns the flags passed in the constructor. */
+ inline ItemConnFlags GetFlags() const { return mnFlags; }
+
+ /** Activates or deactivates this connection.
+ @descr Deactivated connections do not execute the virtual functions
+ ApplyFlags(), Reset(), and FillItemSet(). */
+ void Activate( bool bActive = true );
+ /** Returns true if this connection is active. */
+ bool IsActive() const;
+
+ /** Calls the virtual ApplyFlags() function, if connection is active. */
+ void DoApplyFlags( const SfxItemSet& rItemSet );
+ /** Calls the virtual Reset() function, if connection is active. */
+ void DoReset( const SfxItemSet& rItemSet );
+ /** Calls the virtual FillItemSet() function, if connection is active. */
+ bool DoFillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet );
+
+protected:
+ explicit ItemConnectionBase( ItemConnFlags nFlags = ITEMCONN_DEFAULT );
+
+ /** Derived classes implement actions according to current flags here. */
+ virtual void ApplyFlags( const SfxItemSet& rItemSet ) = 0;
+ /** Derived classes implement initializing controls from item sets here. */
+ virtual void Reset( const SfxItemSet& rItemSet ) = 0;
+ /** Derived classes implement filling item sets from controls here. */
+ virtual bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet ) = 0;
+
+ /** Returns whether to enable a control, according to current flags. */
+ TriState GetEnableState( bool bKnown ) const;
+ /** Returns whether to show a control, according to current flags. */
+ TriState GetShowState( bool bKnown ) const;
+
+private:
+ /* Disable copy c'tor and assignment. */
+ ItemConnectionBase( const ItemConnectionBase& );
+ ItemConnectionBase& operator=( const ItemConnectionBase& );
+
+ ItemConnFlags mnFlags; /// Flags for additional options.
+};
+
+// ----------------------------------------------------------------------------
+
+/** Base class template for single item <-> single control connection objects.
+
+ This template uses functions provided by the SingleItemWrapper and the
+ SingleControlWrapper template classes. The virtual functions ApplyFlags(),
+ Reset(), and FillItemSet() are implemented here in a generic way using the
+ virtual functions of the wrapper classes. Derived classes only have to
+ create or otherwise provide appropriate wrappers.
+ */
+template< typename ItemWrpT, typename ControlWrpT >
+class ItemControlConnection : public ItemConnectionBase
+{
+public:
+ typedef ItemWrpT ItemWrapperType;
+ typedef ControlWrpT ControlWrapperType;
+ typedef ItemControlConnection< ItemWrpT, ControlWrpT > ItemControlConnectionType;
+ typedef typename ItemWrpT::ItemType ItemType;
+ typedef typename ItemWrpT::ItemValueType ItemValueType;
+ typedef typename ControlWrpT::ControlType ControlType;
+ typedef typename ControlWrpT::ControlValueType ControlValueType;
+
+ typedef std::auto_ptr< ItemWrpT > ItemWrapperRef;
+ typedef std::auto_ptr< ControlWrpT > ControlWrapperRef;
+
+ /** Receives pointer to a newly created control wrapper.
+ @descr Takes ownership of the control wrapper. */
+ explicit ItemControlConnection( USHORT nSlot, ControlWrpT* pNewCtrlWrp,
+ ItemConnFlags nFlags = ITEMCONN_DEFAULT );
+
+ /** Convenience constructor. Receives reference to a control directly.
+ @descr May only be used, if ControlWrpT::ControlWrpT( ControlType& )
+ constructor exists. */
+ explicit ItemControlConnection( USHORT nSlot, ControlType& rControl,
+ ItemConnFlags nFlags = ITEMCONN_DEFAULT );
+
+ virtual ~ItemControlConnection();
+
+protected:
+ /** Actions according to current flags for the control. */
+ virtual void ApplyFlags( const SfxItemSet& rItemSet );
+ /** Resets the control according to the item contents. */
+ virtual void Reset( const SfxItemSet& rItemSet );
+ /** Fills the item set according to the control's state. */
+ virtual bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet );
+
+ ItemWrapperType maItemWrp;
+ ControlWrapperRef mxCtrlWrp;
+};
+
+// ============================================================================
+// Standard connections
+// ============================================================================
+
+/** This is a helper class to enable/disable/show/hide a control only.
+
+ This class does nothing special in the Reset() and FillItemSet() functions.
+ It can be used to control the visibility of i.e. fixed lines or fixed texts
+ related to the availability of an item by passing the appropriate flags to
+ the constructor of this connection.
+ */
+class SFX2_DLLPUBLIC DummyItemConnection:
+ public ItemConnectionBase, public DummyWindowWrapper
+{
+public:
+ explicit DummyItemConnection( USHORT nSlot, Window& rWindow,
+ ItemConnFlags nFlags = ITEMCONN_DEFAULT );
+
+protected:
+ virtual void ApplyFlags( const SfxItemSet& rItemSet );
+ virtual void Reset( const SfxItemSet& rItemSet );
+ virtual bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet );
+
+private:
+ USHORT mnSlot;
+};
+
+// ----------------------------------------------------------------------------
+
+/** Connection between an SfxBoolItem and a VCL CheckBox. */
+typedef ItemControlConnection< BoolItemWrapper, CheckBoxWrapper > CheckBoxConnection;
+
+/** Connection between an SfxStringItem and a VCL Edit. */
+typedef ItemControlConnection< StringItemWrapper, EditWrapper > EditConnection;
+
+// ============================================================================
+
+/** Connection between an item and the VCL NumericField. */
+template< typename ItemWrpT >
+class NumericConnection : public ItemControlConnection< ItemWrpT,
+ NumericFieldWrapper< typename ItemWrpT::ItemValueType > >
+{
+ typedef ItemControlConnection< ItemWrpT,
+ NumericFieldWrapper< typename ItemWrpT::ItemValueType > >
+ ItemControlConnectionType;
+
+public:
+ typedef typename ItemControlConnectionType::ControlWrapperType NumericFieldWrapperType;
+
+ explicit NumericConnection( USHORT nSlot, NumericField& rField,
+ ItemConnFlags nFlags = ITEMCONN_DEFAULT );
+};
+
+// ----------------------------------------------------------------------------
+
+typedef NumericConnection< Int16ItemWrapper > Int16NumericConnection;
+typedef NumericConnection< UInt16ItemWrapper > UInt16NumericConnection;
+typedef NumericConnection< Int32ItemWrapper > Int32NumericConnection;
+typedef NumericConnection< UInt32ItemWrapper > UInt32NumericConnection;
+
+// ============================================================================
+
+/** Connection between an item and the VCL MetricField.
+
+ Adds support of different field units during control value <-> item value
+ conversion. The field unit passed to the constructor applies for the item
+ values, while the field unit used in the control has to be set at the
+ control itself.
+ */
+template< typename ItemWrpT >
+class MetricConnection : public ItemControlConnection< ItemWrpT,
+ MetricFieldWrapper< typename ItemWrpT::ItemValueType > >
+{
+ typedef ItemControlConnection< ItemWrpT,
+ MetricFieldWrapper< typename ItemWrpT::ItemValueType > >
+ ItemControlConnectionType;
+
+public:
+ typedef typename ItemControlConnectionType::ControlWrapperType MetricFieldWrapperType;
+
+ explicit MetricConnection( USHORT nSlot, MetricField& rField,
+ FieldUnit eItemUnit = FUNIT_NONE, ItemConnFlags nFlags = ITEMCONN_DEFAULT );
+};
+
+// ----------------------------------------------------------------------------
+
+typedef MetricConnection< Int16ItemWrapper > Int16MetricConnection;
+typedef MetricConnection< UInt16ItemWrapper > UInt16MetricConnection;
+typedef MetricConnection< Int32ItemWrapper > Int32MetricConnection;
+typedef MetricConnection< UInt32ItemWrapper > UInt32MetricConnection;
+
+// ============================================================================
+
+/** Connection between an item and a VCL ListBox.
+
+ Optionally a map can be passed that maps list box positions to item values.
+ This map MUST be terminated with an entry containing LISTBOX_ENTRY_NOTFOUND
+ as list box position. The item value contained in this last entry is used
+ as default item value in case of an error.
+ */
+template< typename ItemWrpT >
+class ListBoxConnection : public ItemControlConnection< ItemWrpT,
+ ListBoxWrapper< typename ItemWrpT::ItemValueType > >
+{
+ typedef ItemControlConnection< ItemWrpT,
+ ListBoxWrapper< typename ItemWrpT::ItemValueType > >
+ ItemControlConnectionType;
+
+public:
+ typedef typename ItemControlConnectionType::ControlWrapperType ListBoxWrapperType;
+ typedef typename ListBoxWrapperType::MapEntryType MapEntryType;
+
+ explicit ListBoxConnection( USHORT nSlot, ListBox& rListBox,
+ const MapEntryType* pMap = 0, ItemConnFlags nFlags = ITEMCONN_DEFAULT );
+};
+
+// ----------------------------------------------------------------------------
+
+typedef ListBoxConnection< Int16ItemWrapper > Int16ListBoxConnection;
+typedef ListBoxConnection< UInt16ItemWrapper > UInt16ListBoxConnection;
+typedef ListBoxConnection< Int32ItemWrapper > Int32ListBoxConnection;
+typedef ListBoxConnection< UInt32ItemWrapper > UInt32ListBoxConnection;
+
+// ============================================================================
+
+/** Connection between an item and an SVTOOLS ValueSet.
+
+ Optionally a map can be passed that maps value set identifiers to item
+ values. This map MUST be terminated with an entry containing
+ VALUESET_ITEM_NOTFOUND as value set identifier. The item value contained in
+ this last entry is used as default item value in case of an error.
+ */
+template< typename ItemWrpT >
+class ValueSetConnection : public ItemControlConnection< ItemWrpT,
+ ValueSetWrapper< typename ItemWrpT::ItemValueType > >
+{
+ typedef ItemControlConnection< ItemWrpT,
+ ValueSetWrapper< typename ItemWrpT::ItemValueType > >
+ ItemControlConnectionType;
+
+public:
+ typedef typename ItemControlConnectionType::ControlWrapperType ValueSetWrapperType;
+ typedef typename ValueSetWrapperType::MapEntryType MapEntryType;
+
+ explicit ValueSetConnection( USHORT nSlot, ValueSet& rValueSet,
+ const MapEntryType* pMap = 0, ItemConnFlags nFlags = ITEMCONN_DEFAULT );
+};
+
+// ----------------------------------------------------------------------------
+
+typedef ValueSetConnection< Int16ItemWrapper > Int16ValueSetConnection;
+typedef ValueSetConnection< UInt16ItemWrapper > UInt16ValueSetConnection;
+typedef ValueSetConnection< Int32ItemWrapper > Int32ValueSetConnection;
+typedef ValueSetConnection< UInt32ItemWrapper > UInt32ValueSetConnection;
+
+// ============================================================================
+// Array of connections
+// ============================================================================
+
+class ItemConnectionArrayImpl;
+
+/** A container of connection objects.
+
+ This is a connection with the only purpose to contain other connection
+ objects. This way it is possible to create a tree structure of connections
+ for a convenient connection management. This class is used by the class
+ SfxTabPage to store all connections.
+ */
+class ItemConnectionArray : public ItemConnectionBase
+{
+public:
+ explicit ItemConnectionArray();
+ virtual ~ItemConnectionArray();
+
+ /** Adds a new connection to the list.
+ @descr Takes ownership of the connection! */
+ void AddConnection( ItemConnectionBase* pConnection );
+
+protected:
+ virtual void ApplyFlags( const SfxItemSet& rItemSet );
+ virtual void Reset( const SfxItemSet& rItemSet );
+ virtual bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet );
+
+private:
+ std::auto_ptr< ItemConnectionArrayImpl > mxImpl;
+};
+
+// ============================================================================
+
+// ============================================================================
+// *** Implementation of template functions ***
+// ============================================================================
+
+// ============================================================================
+// Base connection classes
+// ============================================================================
+
+template< typename ItemWrpT, typename ControlWrpT >
+ItemControlConnection< ItemWrpT, ControlWrpT >::ItemControlConnection(
+ USHORT nSlot, ControlWrpT* pNewCtrlWrp, ItemConnFlags nFlags ) :
+ ItemConnectionBase( nFlags ),
+ maItemWrp( nSlot ),
+ mxCtrlWrp( pNewCtrlWrp )
+{
+}
+
+template< typename ItemWrpT, typename ControlWrpT >
+ItemControlConnection< ItemWrpT, ControlWrpT >::ItemControlConnection(
+ USHORT nSlot, ControlType& rControl, ItemConnFlags nFlags ) :
+ ItemConnectionBase( nFlags ),
+ maItemWrp( nSlot ),
+ mxCtrlWrp( new ControlWrpT( rControl ) )
+{
+}
+
+template< typename ItemWrpT, typename ControlWrpT >
+ItemControlConnection< ItemWrpT, ControlWrpT >::~ItemControlConnection()
+{
+}
+
+template< typename ItemWrpT, typename ControlWrpT >
+void ItemControlConnection< ItemWrpT, ControlWrpT >::ApplyFlags( const SfxItemSet& rItemSet )
+{
+ bool bKnown = ItemWrapperHelper::IsKnownItem( rItemSet, maItemWrp.GetSlotId() );
+ mxCtrlWrp->ModifyControl( GetEnableState( bKnown ), GetShowState( bKnown ) );
+}
+
+template< typename ItemWrpT, typename ControlWrpT >
+void ItemControlConnection< ItemWrpT, ControlWrpT >::Reset( const SfxItemSet& rItemSet )
+{
+ const ItemType* pItem = maItemWrp.GetUniqueItem( rItemSet );
+ mxCtrlWrp->SetControlDontKnow( pItem == 0 );
+ if( pItem )
+ mxCtrlWrp->SetControlValue( maItemWrp.GetItemValue( *pItem ) );
+}
+
+template< typename ItemWrpT, typename ControlWrpT >
+bool ItemControlConnection< ItemWrpT, ControlWrpT >::FillItemSet(
+ SfxItemSet& rDestSet, const SfxItemSet& rOldSet )
+{
+ const ItemType* pOldItem = maItemWrp.GetUniqueItem( rOldSet );
+ bool bChanged = false;
+ if( !mxCtrlWrp->IsControlDontKnow() )
+ {
+ // first store the control value in a local variable
+ ControlValueType aCtrlValue( mxCtrlWrp->GetControlValue() );
+ // convert to item value type -> possible to convert i.e. from 'T' to 'const T&'
+ ItemValueType aNewValue( aCtrlValue );
+ // do not rely on existence of ItemValueType::operator!=
+ if( !pOldItem || !(maItemWrp.GetItemValue( *pOldItem ) == aNewValue) )
+ {
+ USHORT nWhich = ItemWrapperHelper::GetWhichId( rDestSet, maItemWrp.GetSlotId() );
+ std::auto_ptr< ItemType > xItem(
+ static_cast< ItemType* >( maItemWrp.GetDefaultItem( rDestSet ).Clone() ) );
+ xItem->SetWhich( nWhich );
+ maItemWrp.SetItemValue( *xItem, aNewValue );
+ rDestSet.Put( *xItem );
+ bChanged = true;
+ }
+ }
+ if( !bChanged )
+ ItemWrapperHelper::RemoveDefaultItem( rDestSet, rOldSet, maItemWrp.GetSlotId() );
+ return bChanged;
+}
+
+// ============================================================================
+// Standard connections
+// ============================================================================
+
+template< typename ItemWrpT >
+NumericConnection< ItemWrpT >::NumericConnection(
+ USHORT nSlot, NumericField& rField, ItemConnFlags nFlags ) :
+ ItemControlConnectionType( nSlot, rField, nFlags )
+{
+}
+
+// ============================================================================
+
+template< typename ItemWrpT >
+MetricConnection< ItemWrpT >::MetricConnection(
+ USHORT nSlot, MetricField& rField, FieldUnit eItemUnit, ItemConnFlags nFlags ) :
+ ItemControlConnectionType( nSlot, new MetricFieldWrapperType( rField, eItemUnit ), nFlags )
+{
+}
+
+// ============================================================================
+
+template< typename ItemWrpT >
+ListBoxConnection< ItemWrpT >::ListBoxConnection(
+ USHORT nSlot, ListBox& rListBox, const MapEntryType* pMap, ItemConnFlags nFlags ) :
+ ItemControlConnectionType( nSlot, new ListBoxWrapperType( rListBox, pMap ), nFlags )
+{
+}
+
+// ============================================================================
+
+template< typename ItemWrpT >
+ValueSetConnection< ItemWrpT >::ValueSetConnection(
+ USHORT nSlot, ValueSet& rValueSet, const MapEntryType* pMap, ItemConnFlags nFlags ) :
+ ItemControlConnectionType( nSlot, new ValueSetWrapperType( rValueSet, pMap ), nFlags )
+{
+}
+
+// ============================================================================
+
+} // namespace sfx
+
+#endif
+
diff --git a/sfx2/inc/sfx2/itemwrapper.hxx b/sfx2/inc/sfx2/itemwrapper.hxx
new file mode 100644
index 000000000000..6d5cc4d3986b
--- /dev/null
+++ b/sfx2/inc/sfx2/itemwrapper.hxx
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * 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_ITEMWRAPPER_HXX
+#define SFX_ITEMWRAPPER_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/itemset.hxx>
+
+// ============================================================================
+
+namespace sfx {
+
+// ============================================================================
+// Helpers
+// ============================================================================
+
+class SFX2_DLLPUBLIC ItemWrapperHelper
+{
+public:
+ /** Returns the WID of the passed SID in the item set. */
+ static USHORT GetWhichId( const SfxItemSet& rItemSet, USHORT nSlot );
+
+ /** Returns true, if the passed item set supports the SID. */
+ static bool IsKnownItem( const SfxItemSet& rItemSet, USHORT nSlot );
+
+ /** Returns an item from an item set, if it is not in "don't know" state.
+ @return Pointer to item, or 0 if it has "don't know" state. */
+ static const SfxPoolItem* GetUniqueItem( const SfxItemSet& rItemSet, USHORT nSlot );
+
+ /** Returns the default item from the pool of the passed item set. */
+ static const SfxPoolItem& GetDefaultItem( const SfxItemSet& rItemSet, USHORT nSlot );
+
+ /** Removes an item from rDestSet, if it is default in rOldSet. */
+ static void RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, USHORT nSlot );
+};
+
+// ============================================================================
+// Item wrappers
+// ============================================================================
+
+/** Base class wrapping a single item.
+
+ Objects of this class store the SID of an item. Exchanging data with the
+ item is done with the virtual functions GetItemValue() and SetItemValue().
+ Derived classes implement these functions according to the item type they
+ work on.
+
+ The current tree of base classes/templates and standard item wrappers:
+
+ SingleItemWrapper< ItemT, ValueT >
+ |
+ +- ValueItemWrapper< ItemT, ValueT > [1]
+ | |
+ | +- BoolItemWrapper [1]
+ | +- Int16ItemWrapper [1]
+ | +- UInt16ItemWrapper [1]
+ | +- Int32ItemWrapper [1]
+ | +- UInt32ItemWrapper [1]
+ | +- StringItemWrapper [1]
+ |
+ +- IdentItemWrapper< ItemT > [1]
+
+ Notes:
+ [1] Standard wrappers ready to use.
+
+ See documentation of class ItemConnectionBase for more details.
+ */
+template< typename ItemT, typename ValueT >
+class SingleItemWrapper
+{
+public:
+ typedef ItemT ItemType;
+ typedef ValueT ItemValueType;
+ typedef SingleItemWrapper< ItemT, ValueT > SingleItemWrapperType;
+
+ inline explicit SingleItemWrapper( USHORT nSlot ) : mnSlot( nSlot ) {}
+
+ /** Returns the SID this wrapper works on. */
+ inline USHORT GetSlotId() const { return mnSlot; }
+
+ /** Returns the item from an item set, if it is not in "don't know" state.
+ @descr Similar to ItemWrapperHelper::GetUniqueItem(), but works always
+ with the own SID and returns the correct item type.
+ @return Pointer to item, or 0 if it has "don't know" state. */
+ const ItemT* GetUniqueItem( const SfxItemSet& rItemSet ) const;
+ /** Returns the default item from the pool of the passed item set.
+ @descr Similar to ItemWrapperHelper::GetDefaultItem(), but works
+ always with the own SID and returns the correct item type. */
+ const ItemT& GetDefaultItem( const SfxItemSet& rItemSet ) const;
+
+ /** Derived classes return the value of the passed item. */
+ virtual ValueT GetItemValue( const ItemT& rItem ) const = 0;
+ /** Derived classes set the value at the passed item. */
+ virtual void SetItemValue( ItemT& rItem, ValueT aValue ) const = 0;
+
+private:
+ USHORT mnSlot; /// The SID of this item wrapper.
+};
+
+// ============================================================================
+
+/** An item wrapper usable for most types of items.
+
+ The item type must support the following functions:
+ - ValueT ItemT::GetValue() const
+ - void ItemT::SetValue( ValueT )
+
+ The template parameter InternalValueT can be used to specify the internal
+ value type of the item, if it differs from ValueT. This parameter has to be
+ used to prevent compiler warnings.
+ */
+template< typename ItemT, typename ValueT, typename InternalValueT = ValueT >
+class ValueItemWrapper : public SingleItemWrapper< ItemT, ValueT >
+{
+public:
+ inline explicit ValueItemWrapper( USHORT nSlot ) :
+ SingleItemWrapper< ItemT, ValueT >( nSlot ) {}
+
+ virtual ValueT GetItemValue( const ItemT& rItem ) const
+ { return static_cast< ValueT >( rItem.GetValue() ); }
+ virtual void SetItemValue( ItemT& rItem, ValueT aValue ) const
+ { rItem.SetValue( static_cast< InternalValueT >( aValue ) ); }
+};
+
+// ----------------------------------------------------------------------------
+
+typedef ValueItemWrapper< SfxBoolItem, BOOL > BoolItemWrapper;
+typedef ValueItemWrapper< SfxInt16Item, INT16 > Int16ItemWrapper;
+typedef ValueItemWrapper< SfxUInt16Item, UINT16 > UInt16ItemWrapper;
+typedef ValueItemWrapper< SfxInt32Item, INT32 > Int32ItemWrapper;
+typedef ValueItemWrapper< SfxUInt32Item, UINT32 > UInt32ItemWrapper;
+typedef ValueItemWrapper< SfxStringItem, const String& > StringItemWrapper;
+
+// ============================================================================
+
+/** An item wrapper that uses the item itself as value. */
+template< typename ItemT >
+class IdentItemWrapper : public SingleItemWrapper< ItemT, const ItemT& >
+{
+public:
+ inline explicit IdentItemWrapper( USHORT nSlot ) :
+ SingleItemWrapper< ItemT, const ItemT& >( nSlot ) {}
+
+ virtual const ItemT& GetItemValue( const ItemT& rItem ) const
+ { return rItem; }
+ virtual void SetItemValue( ItemT& rItem, const ItemT& rValue ) const
+ { rItem = rValue; }
+};
+
+// ============================================================================
+
+
+// ============================================================================
+// *** Implementation of template functions ***
+// ============================================================================
+
+// ============================================================================
+// Item wrappers
+// ============================================================================
+
+template< typename ItemT, typename ValueT >
+const ItemT* SingleItemWrapper< ItemT, ValueT >::GetUniqueItem( const SfxItemSet& rItemSet ) const
+{
+ return static_cast< const ItemT* >( ItemWrapperHelper::GetUniqueItem( rItemSet, mnSlot ) );
+}
+
+template< typename ItemT, typename ValueT >
+const ItemT& SingleItemWrapper< ItemT, ValueT >::GetDefaultItem( const SfxItemSet& rItemSet ) const
+{
+ return static_cast< const ItemT& >( ItemWrapperHelper::GetDefaultItem( rItemSet, mnSlot ) );
+}
+
+// ============================================================================
+
+} // namespace sfx
+
+#endif
+
diff --git a/sfx2/inc/sfx2/layout-post.hxx b/sfx2/inc/sfx2/layout-post.hxx
new file mode 100644
index 000000000000..91ae78410500
--- /dev/null
+++ b/sfx2/inc/sfx2/layout-post.hxx
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX2_LAYOUT_POST_HXX
+#define _SFX2_LAYOUT_POST_HXX
+
+#include <layout/layout-post.hxx>
+
+#if ENABLE_LAYOUT
+
+/* Allow re-inclusion for cxx file. */
+#undef _SFX2_LAYOUT_PRE_HXX
+
+#endif /* ENABLE_LAYOUT */
+
+#endif /* _SFX2_LAYOUT_POST_HXX */
diff --git a/sfx2/inc/sfx2/layout-pre.hxx b/sfx2/inc/sfx2/layout-pre.hxx
new file mode 100644
index 000000000000..fdd4d418ebf9
--- /dev/null
+++ b/sfx2/inc/sfx2/layout-pre.hxx
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFX2_LAYOUT_PRE_HXX
+#define _SFX2_LAYOUT_PRE_HXX
+
+#include <layout/layout-pre.hxx>
+
+#if ENABLE_LAYOUT
+
+///* Allow re-inclusion for next hxx file. */
+#undef _SFX2_LAYOUT_POST_HXX
+
+#undef SfxDialog
+#undef SfxModalDialog
+#undef SfxModelessDialog
+
+#define SfxDialog layout::SfxDialog
+
+#define SfxModalDialog SfxDialog
+#define SfxModelessDialog SfxDialog
+
+#endif /* ENABLE_LAYOUT */
+
+#endif /* _SFX2_LAYOUT_PRE_HXX */
diff --git a/sfx2/inc/sfx2/layout-tabdlg.hxx b/sfx2/inc/sfx2/layout-tabdlg.hxx
new file mode 100644
index 000000000000..a5099a3a6b75
--- /dev/null
+++ b/sfx2/inc/sfx2/layout-tabdlg.hxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * 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 _LAYOUT_SFX_TABDLG_HXX
+#define _LAYOUT_SFX_TABDLG_HXX
+
+#undef ENABLE_LAYOUT_SFX_TABDIALOG
+#define ENABLE_LAYOUT_SFX_TABDIALOG 1
+
+#undef NAMESPACE_LAYOUT_SFX_TABDIALOG
+#define NAMESPACE_LAYOUT_SFX_TABDIALOG namespace layout {
+
+#undef END_NAMESPACE_LAYOUT_SFX_TABDIALOG
+#define END_NAMESPACE_LAYOUT_SFX_TABDIALOG } //end namespace layout
+
+#undef LAYOUT_NS_SFX_TABDIALOG
+#define LAYOUT_NS_SFX_TABDIALOG layout::
+
+#undef _SFXTABDLG_HXX
+#include <sfx2/tabdlg.hxx>
+
+#endif /* _LAYOUT_SFX_TABDLG_HXX */
+
diff --git a/sfx2/inc/sfx2/layout.hxx b/sfx2/inc/sfx2/layout.hxx
new file mode 100644
index 000000000000..d92ed2ac4ac1
--- /dev/null
+++ b/sfx2/inc/sfx2/layout.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ***********************************************************************/
+
+#ifndef _SFX2_LAYOUT_HXX
+#define _SFX2_LAYOUT_HXX
+
+#include <layout/layout.hxx>
+#include <sfx2/tabdlg.hxx>
+#if ENABLE_LAYOUT
+#undef ENABLE_LAYOUT_SFX_TABDIALOG
+#define ENABLE_LAYOUT_SFX_TABDIALOG 1
+#include <sfx2/layout-tabdlg.hxx>
+#endif
+
+class SfxChildWindow;
+class SfxBindings;
+
+namespace layout
+{
+
+class SFX2_DLLPUBLIC SfxDialog
+ : public Dialog
+{
+public:
+ SfxDialog (::Window* parent, char const* xml_file, char const* id, SfxBindings* bindings=0, SfxChildWindow* child=0);
+};
+
+#if 0
+class SFX2_DLLPUBLIC SfxTabDialog
+ : public ::SfxTabDialog
+ , public InPlug
+{
+public:
+ SfxTabDialog (::Window *parent, char const* xml_file, char const* id, ResId const& res_id, SfxItemSet const* set=0);
+ ::Window* GetParent () const;
+ void FreeResource ();
+};
+#endif
+
+class SFX2_DLLPUBLIC SfxTabPage
+ : public ::SfxTabPage
+ , public InPlug
+{
+public:
+ SfxTabPage (::Window *parent, char const* xml_file, char const* id, SfxItemSet const* set=0);
+ ::Window* GetParent () const;
+ using ::Window::GetWindow;
+ ::Window* GetWindow () const;
+ Size GetOptimalSize (WindowSizeType eType) const;
+ void FreeResource ();
+};
+} // end namespace layout
+
+#endif /* _SFX2_LAYOUT_HXX */
diff --git a/sfx2/inc/sfx2/linkmgr.hxx b/sfx2/inc/sfx2/linkmgr.hxx
new file mode 100644
index 000000000000..7dc779e2ba6e
--- /dev/null
+++ b/sfx2/inc/sfx2/linkmgr.hxx
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * 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 _LINKMGR_HXX
+#define _LINKMGR_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <sfx2/linksrc.hxx>
+#include <tools/string.hxx>
+#include <svl/svarray.hxx>
+
+class SfxObjectShell;
+class Graphic;
+class Size;
+
+namespace sfx2
+{
+ // Damit der Link ueber den Status der zu ladenen Grafik informierten werden
+ // verschickt das FileObject ein SvData, mit der FormatId
+ // "RegisterStatusInfoId" und ein einem String als Datentraeger. Dieser
+ // enthaelt den folgenden enum.
+
+class SvBaseLink;
+class SvBaseLinkRef;
+
+typedef SvBaseLinkRef* SvBaseLinkRefPtr;
+SV_DECL_PTRARR( SvBaseLinks, SvBaseLinkRefPtr, 1, 1 )
+
+typedef SvLinkSource* SvLinkSourcePtr;
+SV_DECL_PTRARR( SvLinkSources, SvLinkSourcePtr, 1, 1 )
+
+class SFX2_DLLPUBLIC LinkManager
+{
+ SvBaseLinks aLinkTbl;
+ SvLinkSources aServerTbl;
+
+ SfxObjectShell *pPersist; // LinkMgr muss vor SfxObjectShell freigegeben werden
+protected:
+ BOOL InsertLink( SvBaseLink* pLink, USHORT nObjType, USHORT nUpdateType,
+ const String* pName = 0 );
+public:
+
+ enum LinkState
+ {
+ STATE_LOAD_OK,
+ STATE_LOAD_ERROR,
+ STATE_LOAD_ABORT
+ };
+
+ LinkManager( SfxObjectShell * pCacheCont );
+ ~LinkManager();
+
+ SfxObjectShell* GetPersist() const { return pPersist; }
+ void SetPersist( SfxObjectShell * p ) { pPersist = p; }
+
+ void Remove( SvBaseLink *pLink );
+ void Remove( USHORT nPos, USHORT nCnt = 1 );
+ BOOL Insert( SvBaseLink* pLink );
+
+ // den Link mit einem SvLinkSource verbinden und in die Liste eintragen
+ BOOL InsertDDELink( SvBaseLink*,
+ const String& rServer,
+ const String& rTopic,
+ const String& rItem );
+
+ // falls am Link schon alles eingestellt ist !
+ BOOL InsertDDELink( SvBaseLink* );
+
+ // den Link mit einem PseudoObject verbinden und in die Liste eintragen
+ BOOL InsertFileLink( sfx2::SvBaseLink&,
+ USHORT nFileType,
+ const String& rTxt,
+ const String* pFilterNm = 0,
+ const String* pRange = 0 );
+
+ // falls am Link schon alles eingestellt ist !
+ BOOL InsertFileLink( sfx2::SvBaseLink& );
+
+ // erfrage die Strings fuer den Dialog
+ BOOL GetDisplayNames( const SvBaseLink *,
+ String* pType,
+ String* pFile = 0,
+ String* pLink = 0,
+ String* pFilter = 0 ) const;
+
+ SvLinkSourceRef CreateObj( SvBaseLink* );
+
+ void UpdateAllLinks( BOOL bAskUpdate = TRUE,
+ BOOL bCallErrHdl = TRUE,
+ BOOL bUpdateGrfLinks = FALSE,
+ Window* pParentWin = 0 );
+
+ // Liste aller Links erfragen (z.B. fuer Verknuepfungs-Dialog)
+ const SvBaseLinks& GetLinks() const { return aLinkTbl; }
+
+ // ----------------- Serverseitige Verwaltung --------------------
+
+ // Liste der zu serviereden Links erfragen
+ const SvLinkSources& GetServers() const { return aServerTbl; }
+ // einen zu servierenden Link eintragen/loeschen
+ BOOL InsertServer( SvLinkSource* rObj );
+ void RemoveServer( SvLinkSource* rObj );
+ void RemoveServer( USHORT nPos, USHORT nCnt = 1 )
+ { aServerTbl.Remove( nPos, nCnt ); }
+
+ // eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
+ // (ist zur Zeit nur fuer die FileLinks interressant!)
+ void CancelTransfers();
+
+ // um Status Informationen aus dem FileObject an den BaseLink zu
+ // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
+ // dann die entsprechenden Informationen als String.
+ // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
+ // - das braucht Informationen ueber Load/Abort/Error
+ static ULONG RegisterStatusInfoId();
+
+ // if the mimetype says graphic/bitmap/gdimetafile then get the
+ // graphic from the Any. Return says no errors
+ static BOOL GetGraphicFromAny( const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue,
+ Graphic& rGrf );
+
+private:
+ LinkManager( const LinkManager& );
+ LinkManager& operator=( const LinkManager& );
+};
+
+// Trenner im LinkName fuer die DDE-/File-/Grafik- Links
+// (nur wer es braucht, um einen SvLinkName zusammenzubasteln)
+const sal_Unicode cTokenSeperator = 0xFFFF;
+
+// erzeuge einen String fuer den SvLinkName. Fuer
+// - DDE die ersten 3 Strings, (Server, Topic, Item)
+// - File-/Grf-LinkNms die letzen 3 Strings (FileName, Bereich, Filter)
+SFX2_DLLPUBLIC void MakeLnkName( String& rName,
+ const String* pType, // kann auch 0 sein !!
+ const String& rFile,
+ const String& rLink,
+ const String* pFilter = 0 );
+
+}
+
+#endif
+
diff --git a/sfx2/inc/sfx2/linksrc.hxx b/sfx2/inc/sfx2/linksrc.hxx
new file mode 100644
index 000000000000..1c538112760c
--- /dev/null
+++ b/sfx2/inc/sfx2/linksrc.hxx
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * 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 _LINKSRC_HXX
+#define _LINKSRC_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#ifndef _TOOLS_REF_HXX
+#include <tools/ref.hxx>
+#endif
+#include <tools/rtti.hxx>
+#include <com/sun/star/io/XInputStream.hpp>
+
+#ifndef _SAL_CONFIG_H
+#include <sal/config.h>
+#define _SAL_CONFIG_H
+#endif
+
+namespace com { namespace sun { namespace star { namespace uno
+{
+ class Any;
+ //class Type;
+}}}}
+class Window;
+class String;
+
+#ifndef ADVISEMODE_NODATA
+// Muessen die gleichen Werte wie Ole2 ADVF_* sein
+#define ADVISEMODE_NODATA 0x01
+//#define ADVISEMODE_PRIMEFIRST 0x02
+#define ADVISEMODE_ONLYONCE 0x04
+//#define ADVISEMODE_DATAONSTOP 0x40
+#endif
+
+namespace sfx2
+{
+
+class SvBaseLink;
+struct SvLinkSource_Impl;
+
+class SFX2_DLLPUBLIC SvLinkSource : public SvRefBase
+{
+private:
+ SvLinkSource_Impl* pImpl; // compatible area
+
+public:
+ TYPEINFO();
+
+ SvLinkSource();
+ virtual ~SvLinkSource();
+
+// SvBaseLink* GetDataBaseLink() const;
+ BOOL HasDataLinks( const SvBaseLink* = 0 ) const;
+
+ void Closed();
+
+ ULONG GetUpdateTimeout() const;
+ void SetUpdateTimeout( ULONG nTime );
+ // notify the sink, the mime type is not
+ // a selection criterion
+ void DataChanged( const String & rMimeType,
+ const ::com::sun::star::uno::Any & rVal );
+ void SendDataChanged();
+ void NotifyDataChanged();
+
+ virtual BOOL Connect( SvBaseLink* );
+ virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ const String & rMimeType,
+ BOOL bSynchron = FALSE );
+
+ // TRUE => waitinmg for data
+ virtual BOOL IsPending() const;
+ // TRUE => data complete loaded
+ virtual BOOL IsDataComplete() const;
+
+ // Link impl: DECL_LINK( MyEndEditHdl, sfx2::FileDialogHelper* ); <= param is the dialog
+ virtual void Edit( Window *, SvBaseLink *, const Link& rEndEditHdl );
+
+
+ void AddDataAdvise( SvBaseLink *, const String & rMimeType,
+ USHORT nAdviceMode );
+ void RemoveAllDataAdvise( SvBaseLink * );
+
+ void AddConnectAdvise( SvBaseLink * );
+ void RemoveConnectAdvise( SvBaseLink * );
+
+ struct StreamToLoadFrom{
+ StreamToLoadFrom(
+ const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,sal_Bool bIsReadOnly )
+ :m_xInputStreamToLoadFrom(xInputStream),
+ m_bIsReadOnly(bIsReadOnly)
+ {
+ }
+
+ com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
+ m_xInputStreamToLoadFrom;
+ sal_Bool m_bIsReadOnly;
+ };
+
+ StreamToLoadFrom getStreamToLoadFrom();
+ void setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,sal_Bool bIsReadOnly );
+ // --> OD 2008-06-18 #i88291#
+ void clearStreamToLoadFrom();
+ // <--
+};
+
+SV_DECL_IMPL_REF(SvLinkSource);
+
+}
+#endif
diff --git a/sfx2/inc/sfx2/lnkbase.hxx b/sfx2/inc/sfx2/lnkbase.hxx
new file mode 100644
index 000000000000..62e49a1592e8
--- /dev/null
+++ b/sfx2/inc/sfx2/lnkbase.hxx
@@ -0,0 +1,185 @@
+/*************************************************************************
+ *
+ * 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 _LNKBASE_HXX
+#define _LNKBASE_HXX
+
+#include <com/sun/star/io/XInputStream.hpp>
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <sot/exchange.hxx>
+#ifndef _TOOLS_REF_HXX
+#include <tools/ref.hxx>
+#endif
+#ifndef _LINKSOURCE_HXX
+#include <sfx2/linksrc.hxx>
+#endif
+
+namespace com { namespace sun { namespace star { namespace uno
+{
+ class Any;
+ //class Type;
+}}}}
+
+namespace sfx2
+{
+
+struct ImplBaseLinkData;
+class LinkManager;
+class SvLinkSource;
+class FileDialogHelper;
+
+#ifndef OBJECT_DDE_EXTERN
+#define OBJECT_INTERN 0x00
+//#define OBJECT_SO_EXTERN 0x01
+#define OBJECT_DDE_EXTERN 0x02
+#endif
+
+#define OBJECT_CLIENT_SO 0x80 // ein Link
+#define OBJECT_CLIENT_DDE 0x81
+//#define OBJECT_CLIENT_OLE 0x82 // ein Ole-Link
+//#define OBJECT_CLIENT_OLE_CACHE 0x83 // ein Ole-Link mit SvEmbeddedObject
+#define OBJECT_CLIENT_FILE 0x90
+#define OBJECT_CLIENT_GRF 0x91
+#define OBJECT_CLIENT_OLE 0x92 // embedded link
+
+enum sfxlink {
+ // Ole2 compatibel und persistent
+ LINKUPDATE_ALWAYS = 1,
+ LINKUPDATE_ONCALL = 3,
+
+ LINKUPDATE_END // dummy!
+};
+
+struct BaseLink_Impl;
+
+class SFX2_DLLPUBLIC SvBaseLink : public SvRefBase
+{
+private:
+ friend class LinkManager;
+ friend class SvLinkSource;
+
+ SvLinkSourceRef xObj;
+ String aLinkName;
+ BaseLink_Impl* pImpl;
+ USHORT nObjType;
+ BOOL bVisible : 1;
+ BOOL bSynchron : 1;
+ BOOL bUseCache : 1; // fuer GrafikLinks!
+ BOOL bWasLastEditOK : 1;
+
+ DECL_LINK( EndEditHdl, String* );
+
+ bool ExecuteEdit( const String& _rNewName );
+
+protected:
+ void SetObjType( USHORT );
+
+ // setzen des LinkSourceName ohne aktion
+ void SetName( const String & rLn );
+ // LinkSourceName der im SvLinkBase steht
+ String GetName() const;
+
+ ImplBaseLinkData* pImplData;
+
+ sal_Bool m_bIsReadOnly;
+ com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
+ m_xInputStreamToLoadFrom;
+
+ SvBaseLink();
+ SvBaseLink( USHORT nLinkType, ULONG nContentType = FORMAT_STRING );
+ virtual ~SvBaseLink();
+
+ void _GetRealObject( BOOL bConnect = TRUE );
+
+ SvLinkSource* GetRealObject()
+ {
+ if( !xObj.Is() )
+ _GetRealObject();
+ return xObj;
+ }
+
+public:
+ TYPEINFO();
+ // ask JP
+ virtual void Closed();
+ SvBaseLink( const String& rNm, USHORT nObjectType,
+ SvLinkSource* );
+
+ USHORT GetObjType() const { return nObjType; }
+
+ void SetObj( SvLinkSource * pObj );
+ SvLinkSource* GetObj() const { return xObj; }
+
+ void SetLinkSourceName( const String & rName );
+ String GetLinkSourceName() const;
+
+ virtual void DataChanged( const String & rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+
+ void SetUpdateMode( USHORT );
+ USHORT GetUpdateMode() const;
+ ULONG GetContentType() const;
+ BOOL SetContentType( ULONG nType );
+
+ LinkManager* GetLinkManager();
+ const LinkManager* GetLinkManager() const;
+ void SetLinkManager( LinkManager* _pMgr );
+
+ BOOL Update();
+ void Disconnect();
+
+ // Link impl: DECL_LINK( MyEndDialogHdl, SvBaseLink* ); <= param is this
+ virtual void Edit( Window*, const Link& rEndEditHdl );
+
+ // soll der Link im Dialog angezeigt werden ? (Links im Link im ...)
+ BOOL IsVisible() const { return bVisible; }
+ void SetVisible( BOOL bFlag ) { bVisible = bFlag; }
+ // soll der Link synchron oder asynchron geladen werden?
+ BOOL IsSynchron() const { return bSynchron; }
+ void SetSynchron( BOOL bFlag ) { bSynchron = bFlag; }
+
+ BOOL IsUseCache() const { return bUseCache; }
+ void SetUseCache( BOOL bFlag ) { bUseCache = bFlag; }
+
+ void setStreamToLoadFrom(
+ const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,
+ sal_Bool bIsReadOnly )
+ { m_xInputStreamToLoadFrom = xInputStream;
+ m_bIsReadOnly = bIsReadOnly; }
+ // --> OD 2008-06-18 #i88291#
+ void clearStreamToLoadFrom();
+ // <--
+
+ inline BOOL WasLastEditOK() const { return bWasLastEditOK; }
+ FileDialogHelper* GetFileDialog( sal_uInt32 nFlags, const String& rFactory ) const;
+};
+
+SV_DECL_IMPL_REF(SvBaseLink);
+
+}
+
+#endif
diff --git a/sfx2/inc/sfx2/macrconf.hxx b/sfx2/inc/sfx2/macrconf.hxx
new file mode 100644
index 000000000000..6b50ddf3497a
--- /dev/null
+++ b/sfx2/inc/sfx2/macrconf.hxx
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * 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_MACROCONF_HXX
+#define _SFX_MACROCONF_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <tools/errcode.hxx>
+#define _SVSTDARR_USHORTS
+#include <svl/svstdarr.hxx> // SvUShorts
+#include <sfx2/evntconf.hxx>
+
+class SfxMacroInfo;
+class SfxSlot;
+class SfxMacroInfoItem;
+class SfxObjectShell;
+class BasicManager;
+struct SfxMacroConfig_Impl;
+class SbMethod;
+class SbxValue;
+class SbxObject;
+class SbxArray;
+class SvStream;
+class SvxMacro;
+
+typedef SfxMacroInfo* SfxMacroInfoPtr;
+//#if 0 // _SOLAR__PRIVATE
+SV_DECL_PTRARR(SfxMacroInfoArr_Impl, SfxMacroInfoPtr, 5, 5)
+//#else
+//class SfxMacroInfoArr_Impl;
+//#endif
+
+class SFX2_DLLPUBLIC SfxMacroInfo
+{
+friend class SfxMacroConfig;
+friend class SfxEventConfiguration;
+friend SvStream& operator >> (SvStream& rStream, SfxMacroInfo& rInfo);
+friend SvStream& operator << (SvStream& rStream, const SfxMacroInfo& rInfo);
+
+ String* pHelpText;
+ sal_uInt16 nRefCnt;
+ sal_Bool bAppBasic;
+ String aLibName;
+ String aModuleName;
+ String aMethodName;
+ sal_uInt16 nSlotId;
+ SfxSlot* pSlot;
+
+public:
+ SfxMacroInfo( const String& rURL );
+ SfxMacroInfo( bool _bAppBasic = true );
+ SfxMacroInfo( bool _bAppBasic, const String& rQualifiedName );
+ SfxMacroInfo(SfxMacroInfo& rOther);
+ SfxMacroInfo(bool _bAppBasic, const String& rLibName,
+ const String& rModuleName, const String& rMethodName);
+ ~SfxMacroInfo();
+ sal_Bool operator==(const SfxMacroInfo& rOther) const;
+ int Load (SvStream&);
+ int Store (SvStream&);
+ String GetMacroName() const;
+ String GetQualifiedName() const;
+ String GetFullQualifiedName() const;
+ BasicManager* GetBasicManager() const;
+ String GetBasicName() const;
+ String GetHelpText() const;
+ sal_Bool IsAppMacro() const
+ { return bAppBasic; }
+ const String& GetModuleName() const
+ { return aModuleName; }
+ const String& GetLibName() const
+ { return aLibName; }
+ const String& GetMethodName() const
+ { return aMethodName; }
+ sal_uInt16 GetSlotId() const
+ { return nSlotId; }
+ SfxSlot* GetSlot() const
+ { return pSlot; }
+
+ sal_Bool Compare( const SvxMacro& ) const;
+ void SetHelpText( const String& rText );
+ String GetURL() const;
+};
+
+//ASDBG obsolete >= 582
+//ASDBG class ::com::sun::star::uno::Reference< ::com::sun::star::script::XEngine > ;
+//ASDBG class ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ;
+
+class SFX2_DLLPUBLIC SfxMacroConfig
+{
+friend class SfxEventConfiguration;
+
+ SAL_DLLPRIVATE static SfxMacroConfig* pMacroConfig;
+
+ SfxMacroConfig_Impl* pImp;
+ SvUShorts aIdArray;
+
+public:
+ SfxMacroConfig();
+ ~SfxMacroConfig();
+
+ static SfxMacroConfig* GetOrCreate();
+
+ static String RequestHelp( sal_uInt16 nId );
+ static sal_Bool IsMacroSlot( sal_uInt16 nId );
+ static sal_Bool IsBasic( SbxObject*, const String&, BasicManager* );
+ static ErrCode Call( SbxObject*, const String&, BasicManager*,
+ SbxArray *pArgs=NULL, SbxValue *pRet=NULL );
+//ASDBG obsolete >= 582
+//ASDBG static void CallStarScript( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XEngine > & rxEngine, const String & rCode,
+//ASDBG const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rSource, void *pArgs, void *pRet );
+ static SbMethod* GetMethod_Impl( const String&, BasicManager* );
+
+ sal_uInt16 GetSlotId(SfxMacroInfoPtr);
+ void ReleaseSlotId(sal_uInt16 nId);
+ void RegisterSlotId(sal_uInt16 nId);
+ SfxMacroInfo* GetMacroInfo(sal_uInt16 nId) const;
+ sal_Bool ExecuteMacro(sal_uInt16 nId, const String& rArgs ) const;
+ sal_Bool ExecuteMacro( SfxObjectShell*, const SvxMacro*, const String& ) const;
+ sal_Bool CheckMacro(sal_uInt16 nId) const;
+ sal_Bool CheckMacro( SfxObjectShell*, const SvxMacro* ) const;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE static void Release_Impl();
+ SAL_DLLPRIVATE const SfxMacroInfo* GetMacroInfo_Impl( const SvxMacro *pMacro ) const;
+ DECL_DLLPRIVATE_LINK( CallbackHdl_Impl, SfxMacroConfig*);
+ DECL_DLLPRIVATE_LINK( EventHdl_Impl, SfxMacroInfo*);
+//#endif
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/macropg.hxx b/sfx2/inc/sfx2/macropg.hxx
new file mode 100644
index 000000000000..d9d886cdfd5f
--- /dev/null
+++ b/sfx2/inc/sfx2/macropg.hxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * 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 _MACROPG_HXX
+#define _MACROPG_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svl/macitem.hxx>
+#include <vcl/lstbox.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+
+class _SfxMacroTabPage;
+class SvStringsDtor;
+class SvTabListBox;
+class Edit;
+class String;
+class SfxObjectShell;
+
+typedef SvStringsDtor* (*FNGetRangeHdl)( _SfxMacroTabPage*, const String& rLanguage );
+typedef SvStringsDtor* (*FNGetMacrosOfRangeHdl)( _SfxMacroTabPage*, const String& rLanguage, const String& rRange );
+
+class SfxConfigGroupListBox_Impl;
+class SfxConfigFunctionListBox_Impl;
+
+class _HeaderTabListBox;
+class _SfxMacroTabPage_Impl;
+
+class SFX2_DLLPUBLIC _SfxMacroTabPage : public SfxTabPage
+{
+ SvxMacroTableDtor aTbl;
+//#if 0 // _SOLAR__PRIVATE
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox * );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox * );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox * );
+
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * );
+
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit* );
+ DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* );
+//#endif
+protected:
+ _SfxMacroTabPage_Impl* mpImpl;
+
+ _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
+
+ void InitAndSetHandler();
+ void FillEvents();
+ void FillMacroList();
+ void EnableButtons( const String& rLanguage );
+
+public:
+
+ virtual ~_SfxMacroTabPage();
+
+ void AddEvent( const String & rEventName, USHORT nEventId );
+
+ const SvxMacroTableDtor& GetMacroTbl() const;
+ void SetMacroTbl( const SvxMacroTableDtor& rTbl );
+ void ClearMacroTbl();
+
+ virtual void ScriptChanged( const String& rLanguage );
+
+ // zum setzen / abfragen der Links
+ void SetGetRangeLink( FNGetRangeHdl pFn );
+ FNGetRangeHdl GetGetRangeLink() const;
+ void SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn );
+ FNGetMacrosOfRangeHdl GetGetMacrosOfRangeLink() const;
+
+ // --------- Erben aus der Basis -------------
+ virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+ void SetReadOnly( BOOL bSet );
+ BOOL IsReadOnly() const;
+ void SelectEvent( const String& rEventName, USHORT nEventId );
+};
+
+inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const
+{
+ return aTbl;
+}
+
+inline void _SfxMacroTabPage::SetMacroTbl( const SvxMacroTableDtor& rTbl )
+{
+ aTbl = rTbl;
+}
+
+inline void _SfxMacroTabPage::ClearMacroTbl()
+{
+ aTbl.DelDtor();
+}
+
+class SFX2_DLLPUBLIC SfxMacroTabPage : public _SfxMacroTabPage
+{
+public:
+ SfxMacroTabPage(
+ Window* pParent,
+ const ResId& rId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
+ const SfxItemSet& rSet
+ );
+
+ // --------- Erben aus der Basis -------------
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+};
+
+class SFX2_DLLPUBLIC SfxMacroAssignDlg : public SfxSingleTabDialog
+{
+public:
+ SfxMacroAssignDlg(
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
+ SfxItemSet& rSet );
+ SfxMacroAssignDlg(
+ Window* pParent,
+ const SfxObjectShell* _pShell,
+ SfxItemSet& rSet );
+ virtual ~SfxMacroAssignDlg();
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/mgetempl.hxx b/sfx2/inc/sfx2/mgetempl.hxx
new file mode 100644
index 000000000000..ba6a9b844b7a
--- /dev/null
+++ b/sfx2/inc/sfx2/mgetempl.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_MGETEMPL_HXX
+#define _SFX_MGETEMPL_HXX
+
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <svtools/stdctrl.hxx>
+#ifndef _SV_MEDIT_HXX
+#include <svtools/svmedit.hxx>
+#endif
+
+#include <sfx2/tabdlg.hxx>
+
+/* erwartet:
+ SID_TEMPLATE_NAME : In: StringItem, Name der Vorlage
+ SID_TEMPLATE_FAMILY : In: Familie der Vorlage
+*/
+
+class SfxStyleFamilies;
+class SfxStyleFamilyItem;
+class SfxStyleSheetBase;
+
+#ifdef _SFXDLG_HXX
+#define FixedInfo FixedText
+#endif
+
+class SfxManageStyleSheetPage : public SfxTabPage
+{
+ FixedText aNameFt;
+ Edit aNameEd;
+ CheckBox aAutoCB;
+
+ FixedText aFollowFt;
+ ListBox aFollowLb;
+
+ FixedText aBaseFt;
+ ListBox aBaseLb;
+
+ FixedText aFilterFt;
+ ListBox aFilterLb;
+
+ FixedInfo aDescFt;
+ MultiLineEdit aDescED;
+ FixedLine aDescGb;
+
+ SfxStyleSheetBase *pStyle;
+ SfxStyleFamilies *pFamilies;
+ const SfxStyleFamilyItem *pItem;
+ String aBuf;
+ BOOL bModified;
+
+ // initiale Daten des Styles
+ String aName;
+ String aFollow;
+ String aParent;
+ USHORT nFlags;
+
+private:
+friend class SfxStyleDialog;
+
+//#if 0 // _SOLAR__PRIVATE
+ DECL_LINK( GetFocusHdl, Edit * );
+ DECL_LINK( LoseFocusHdl, Edit * );
+
+ void UpdateName_Impl(ListBox *, const String &rNew);
+ void SetDescriptionText_Impl();
+//#endif
+
+ SfxManageStyleSheetPage(Window *pParent, const SfxItemSet &rAttrSet );
+ ~SfxManageStyleSheetPage();
+
+ static SfxTabPage* Create(Window *pParent, const SfxItemSet &rAttrSet );
+
+protected:
+ virtual BOOL FillItemSet(SfxItemSet &);
+ virtual void Reset(const SfxItemSet &);
+
+ using TabPage::ActivatePage;
+ virtual void ActivatePage(const SfxItemSet &);
+ using TabPage::DeactivatePage;
+ virtual int DeactivatePage(SfxItemSet * = 0);
+};
+
+#ifdef FixedInfo
+#undef FixedInfo
+#endif
+
+#endif
+
diff --git a/sfx2/inc/sfx2/minarray.hxx b/sfx2/inc/sfx2/minarray.hxx
new file mode 100644
index 000000000000..e0a8c398b215
--- /dev/null
+++ b/sfx2/inc/sfx2/minarray.hxx
@@ -0,0 +1,529 @@
+/*************************************************************************
+ *
+ * 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 _SFXVARARR_HXX
+#define _SFXVARARR_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <limits.h>
+#include <string.h>
+#include <tools/solar.h>
+#include <tools/debug.hxx>
+//#include "typecast.hxx"
+
+#if defined (ALPHA) && defined (UNX)
+#define DEL_ARRAY( X )
+#else
+#define DEL_ARRAY( X ) X
+#endif
+
+#define DECL_OBJARRAY( ARR, T, nI, nG ) \
+class ARR\
+{\
+private:\
+ T* pData;\
+ USHORT nUsed;\
+ BYTE nGrow;\
+ BYTE nUnused;\
+public:\
+ ARR( BYTE nInitSize = nI, BYTE nGrowSize = nG );\
+ ARR( const ARR& rOrig );\
+ ~ARR();\
+\
+ ARR& operator= ( const ARR& rOrig );\
+\
+ const T& GetObject( USHORT nPos ) const; \
+ T& GetObject( USHORT nPos ); \
+\
+ void Insert( USHORT nPos, ARR& rIns, USHORT nStart = 0, USHORT nEnd = USHRT_MAX );\
+ void Insert( USHORT nPos, const T& rElem );\
+ void Insert( USHORT nPos, const T& rElems, USHORT nLen );\
+ void Append( const T& rElem );\
+\
+ BOOL Remove( const T& rElem );\
+ USHORT Remove( USHORT nPos, USHORT nLen );\
+\
+ USHORT Count() const { return nUsed; }\
+ T* operator*();\
+ const T& operator[]( USHORT nPos ) const;\
+ T& operator[]( USHORT nPos );\
+\
+ BOOL Contains( const T& rItem ) const;\
+ void Clear() { Remove( 0, Count() ); }\
+};\
+\
+inline void ARR::Insert( USHORT nPos, ARR& rIns, USHORT nStart, USHORT nEnd )\
+{\
+ Insert( nPos, *(rIns.pData+(sizeof(T)*nStart)), nStart-nEnd+1 );\
+}\
+\
+inline void ARR::Insert( USHORT nPos, const T& rElem )\
+{\
+ Insert( nPos, rElem, 1 );\
+}\
+\
+inline T* ARR::operator*()\
+{\
+ return ( nUsed==0 ? 0 : pData );\
+} \
+inline const T& ARR::operator[]( USHORT nPos ) const\
+{\
+ DBG_ASSERT( nPos < nUsed, "" ); \
+ return *(pData+nPos);\
+} \
+inline T& ARR::operator [] (USHORT nPos) \
+{\
+ DBG_ASSERT( nPos < nUsed, "" ); \
+ return *(pData+nPos); \
+} \
+inline const T& ARR::GetObject( USHORT nPos ) const { return operator[](nPos); } \
+inline T& ARR::GetObject( USHORT nPos ) { return operator[](nPos); } \
+
+#ifndef _lint
+// String too long
+
+#define IMPL_OBJARRAY( ARR, T ) \
+ARR::ARR( BYTE nInitSize, BYTE nGrowSize ): \
+ nUsed(0), \
+ nGrow( nGrowSize ? nGrowSize : 1 ), \
+ nUnused(nInitSize) \
+{ \
+ if ( nInitSize != 0 ) \
+ { \
+ size_t nBytes = nInitSize * sizeof(T); \
+ pData = (T*) new char[ nBytes ]; \
+ memset( pData, 0, nBytes ); \
+ } \
+ else \
+ pData = 0; \
+} \
+\
+ARR::ARR( const ARR& rOrig ) \
+{ \
+ nUsed = rOrig.nUsed; \
+ nGrow = rOrig.nGrow; \
+ nUnused = rOrig.nUnused; \
+\
+ if ( rOrig.pData != 0 ) \
+ { \
+ size_t nBytes = (nUsed + nUnused) * sizeof(T); \
+ pData = (T*) new char [ nBytes ]; \
+ memset( pData, 0, nBytes ); \
+ for ( USHORT n = 0; n < nUsed; ++n ) \
+ *(pData+n) = *(rOrig.pData+n); \
+ } \
+ else \
+ pData = 0; \
+} \
+\
+ARR::~ARR() \
+{ \
+ for ( USHORT n = 0; n < nUsed; ++n ) \
+ ( pData+n )->T::~T(); \
+ delete[] (char*) pData;\
+} \
+\
+ARR& ARR::operator= ( const ARR& rOrig )\
+{ \
+ for ( USHORT n = 0; n < nUsed; ++n ) \
+ ( pData+n )->T::~T(); \
+ delete[] (char*) pData;\
+\
+ nUsed = rOrig.nUsed; \
+ nGrow = rOrig.nGrow; \
+ nUnused = rOrig.nUnused; \
+\
+ if ( rOrig.pData != 0 ) \
+ { \
+ size_t nBytes = (nUsed + nUnused) * sizeof(T); \
+ pData = (T*) new char[ nBytes ]; \
+ memset( pData, 0, nBytes ); \
+ for ( USHORT n = 0; n < nUsed; ++n ) \
+ *(pData+n) = *(rOrig.pData+n); \
+ } \
+ else \
+ pData = 0; \
+ return *this; \
+} \
+\
+void ARR::Append( const T& aElem ) \
+{ \
+ \
+ if ( nUnused == 0 ) \
+ { \
+ USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow; \
+ size_t nBytes = nNewSize * sizeof(T); \
+ T* pNewData = (T*) new char[ nBytes ]; \
+ memset( pNewData, 0, nBytes ); \
+ if ( pData ) \
+ { \
+ memcpy( pNewData, pData, nUsed * sizeof(T) ); \
+ delete[] (char*) pData;\
+ } \
+ nUnused = (BYTE)(nNewSize-nUsed); \
+ pData = pNewData; \
+ } \
+\
+ \
+ pData[nUsed] = aElem; \
+ ++nUsed; \
+ --nUnused; \
+} \
+\
+USHORT ARR::Remove( USHORT nPos, USHORT nLen ) \
+{ \
+ DBG_ASSERT( (nPos+nLen) < (nUsed+1), "" ); \
+ DBG_ASSERT( nLen > 0, "" ); \
+\
+ nLen = Min( (USHORT)(nUsed-nPos), (USHORT)nLen ); \
+\
+ if ( nLen == 0 ) \
+ return 0; \
+\
+ for ( USHORT n = nPos; n < (nPos+nLen); ++n ) \
+ ( pData+n )->T::~T(); \
+\
+ if ( (nUsed-nLen) == 0 ) \
+ { \
+ delete[] (char*) pData;\
+ pData = 0; \
+ nUsed = 0; \
+ nUnused = 0; \
+ return nLen; \
+ } \
+\
+ if ( (nUnused+nLen) >= nGrow ) \
+ { \
+ USHORT nNewUsed = nUsed-nLen; \
+ USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow; \
+ DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize, \
+ "shrink size computation failed" ); \
+ size_t nBytes = nNewSize * sizeof(T); \
+ T* pNewData = (T*) new char[ nBytes ]; \
+ memset( pNewData, 0, nBytes ); \
+ if ( nPos > 0 ) \
+ memcpy( pNewData, pData, nPos * sizeof(T) ); \
+ if ( nNewUsed != nPos ) \
+ memcpy(pNewData+nPos, pData+nPos+nLen, (nNewUsed-nPos) * sizeof(T) ); \
+ delete[] (char*) pData;\
+ pData = pNewData; \
+ nUsed = nNewUsed; \
+ nUnused = (BYTE)(nNewSize - nNewUsed); \
+ return nLen; \
+ } \
+\
+ \
+ if ( nUsed-nPos-nLen > 0 ) \
+ { \
+ memmove(pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen) * sizeof(T));\
+ } \
+ nUsed = nUsed - nLen; \
+ nUnused = sal::static_int_cast< BYTE >(nUnused + nLen); \
+ return nLen; \
+} \
+\
+BOOL ARR::Remove( const T& aElem ) \
+{ \
+ if ( nUsed == 0 ) \
+ return FALSE; \
+\
+ const T *pIter = pData + nUsed - 1; \
+ for ( USHORT n = 0; n < nUsed; ++n, --pIter ) \
+ if ( *pIter == aElem ) \
+ { \
+ Remove(nUsed-n-1, 1); \
+ return TRUE; \
+ } \
+ return FALSE; \
+} \
+\
+BOOL ARR::Contains( const T& rItem ) const \
+{ \
+ if ( !nUsed ) \
+ return FALSE; \
+ for ( USHORT n = 0; n < nUsed; ++n ) \
+ { \
+ const T& r2ndItem = GetObject(n); \
+ if ( r2ndItem == rItem ) \
+ return TRUE; \
+ } \
+ return FALSE; \
+} \
+\
+void ARR::Insert( USHORT nPos, const T& rElems, USHORT nLen ) \
+{ \
+ DBG_ASSERT( nPos <= nUsed, "" ); \
+ \
+ if ( nUnused == 0 ) \
+ { \
+ \
+ /* auf die naechste Grow-Grenze aufgerundet vergroeszern */ \
+ USHORT nNewSize; \
+ for ( nNewSize = nUsed+nGrow; nNewSize < (nUsed + nLen); ++nNewSize ) \
+ /* empty loop */; \
+ size_t nBytes = nNewSize * sizeof(T); \
+ T* pNewData = (T*) new char[ nBytes ]; \
+ memset( pNewData, 0, nBytes ); \
+ \
+ if ( pData ) \
+ { \
+ DBG_ASSERT( nUsed < nNewSize, "" ); \
+ memcpy( pNewData, pData, nUsed * sizeof(T) ); \
+ delete (char*) pData;\
+ } \
+ nUnused = (BYTE)(nNewSize-nUsed); \
+ pData = pNewData; \
+ } \
+\
+ \
+ if ( nPos < nUsed ) \
+ { \
+ memmove(pData+nPos+nLen-1, pData+nPos-1, sizeof(T) * (nUsed-nPos)); \
+ } \
+\
+ memmove(pData+nPos, &rElems, sizeof(T) * nLen); \
+ nUsed = nUsed + nLen; \
+ nUnused = sal::static_int_cast< BYTE >(nUnused - nLen); \
+}
+
+// _lint
+#endif
+
+class SFX2_DLLPUBLIC SfxPtrArr
+{
+private:
+ void** pData;
+ USHORT nUsed;
+ BYTE nGrow;
+ BYTE nUnused;
+public:
+ SfxPtrArr( BYTE nInitSize = 0, BYTE nGrowSize = 8 );
+ SfxPtrArr( const SfxPtrArr& rOrig );
+ ~SfxPtrArr();
+ SfxPtrArr& operator= ( const SfxPtrArr& rOrig );
+ void* GetObject( USHORT nPos ) const { return operator[](nPos); }
+ void*& GetObject( USHORT nPos ) { return operator[](nPos); }
+ void Insert( USHORT nPos, void* rElem );
+ void Append( void* rElem );
+ BOOL Replace( void* pOldElem, void* pNewElem );
+ BOOL Remove( void* rElem );
+ USHORT Remove( USHORT nPos, USHORT nLen );
+ USHORT Count() const { return nUsed; }
+ inline void** operator*();
+ inline void* operator[]( USHORT nPos ) const;
+ inline void*& operator[]( USHORT nPos );
+ BOOL Contains( const void* rItem ) const;
+ void Clear() { Remove( 0, Count() ); }
+};
+
+inline void** SfxPtrArr::operator*()
+{
+ return ( nUsed==0 ? 0 : pData );
+}
+
+inline void* SfxPtrArr::operator[]( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos < nUsed, "" );
+ return *(pData+nPos);
+}
+
+inline void*& SfxPtrArr::operator [] (USHORT nPos)
+{
+ DBG_ASSERT( nPos < nUsed, "" );
+ return *(pData+nPos);
+}
+
+
+#define DECL_PTRARRAY(ARR, T, nI, nG)\
+class ARR: public SfxPtrArr\
+{\
+public:\
+ ARR( BYTE nIni=nI, BYTE nGrowValue=nG ):\
+ SfxPtrArr(nIni,nGrowValue) \
+ {}\
+ ARR( const ARR& rOrig ):\
+ SfxPtrArr(rOrig) \
+ {}\
+ T GetObject( USHORT nPos ) const { return operator[](nPos); } \
+ T& GetObject( USHORT nPos ) { return operator[](nPos); } \
+ void Insert( USHORT nPos, T aElement ) {\
+ SfxPtrArr::Insert(nPos,(void *)aElement);\
+ }\
+ void Append( T aElement ) {\
+ SfxPtrArr::Append((void *)aElement);\
+ }\
+ BOOL Replace( T aOldElem, T aNewElem ) {\
+ return SfxPtrArr::Replace((void *)aOldElem, (void*) aNewElem);\
+ }\
+ void Remove( T aElement ) {\
+ SfxPtrArr::Remove((void*)aElement);\
+ }\
+ void Remove( USHORT nPos, USHORT nLen = 1 ) {\
+ SfxPtrArr::Remove( nPos, nLen ); \
+ }\
+ T* operator *() {\
+ return (T*) SfxPtrArr::operator*();\
+ }\
+ T operator[]( USHORT nPos ) const { \
+ return (T) SfxPtrArr::operator[](nPos); } \
+ T& operator[]( USHORT nPos ) { \
+ return (T&) SfxPtrArr::operator[](nPos); } \
+ void Clear() { Remove( 0, Count() ); }\
+};
+
+class ByteArr
+{
+private:
+ char* pData;
+ USHORT nUsed;
+ BYTE nGrow;
+ BYTE nUnused;
+public:
+ ByteArr( BYTE nInitSize = 0, BYTE nGrowSize = 8 );
+ ByteArr( const ByteArr& rOrig );
+ ~ByteArr();
+ ByteArr& operator= ( const ByteArr& rOrig );
+ char GetObject( USHORT nPos ) const { return operator[](nPos); }
+ char& GetObject( USHORT nPos ) { return operator[](nPos); }
+ void Insert( USHORT nPos, char rElem );
+ void Append( char rElem );
+ BOOL Remove( char rElem );
+ USHORT Remove( USHORT nPos, USHORT nLen );
+ USHORT Count() const { return nUsed; }
+ char* operator*();
+ char operator[]( USHORT nPos ) const;
+ char& operator[]( USHORT nPos );
+ BOOL Contains( const char rItem ) const;
+ void Clear() { Remove( 0, Count() ); }
+};
+
+inline char* ByteArr::operator*()
+{
+ return ( nUsed==0 ? 0 : pData );
+}
+
+#define DECL_1BYTEARRAY(ARR, T, nI, nG)\
+class ARR: public ByteArr\
+{\
+public:\
+ ARR( BYTE nIni=nI, BYTE nGrow=nG ):\
+ ByteArr(nIni,nGrow) \
+ {}\
+ ARR( const ARR& rOrig ):\
+ ByteArr(rOrig) \
+ {}\
+ T GetObject( USHORT nPos ) const { return operator[](nPos); } \
+ T& GetObject( USHORT nPos ) { return operator[](nPos); } \
+ void Insert( USHORT nPos, T aElement ) {\
+ ByteArr::Insert(nPos,(char)aElement);\
+ }\
+ void Append( T aElement ) {\
+ ByteArr::Append((char)aElement);\
+ }\
+ void Remove( T aElement ) {\
+ ByteArr::Remove((char)aElement);\
+ }\
+ void Remove( USHORT nPos, USHORT nLen = 1 ) {\
+ ByteArr::Remove( nPos, nLen ); \
+ }\
+ T* operator *() {\
+ return (T*) ByteArr::operator*();\
+ }\
+ T operator[]( USHORT nPos ) const { \
+ return (T) ByteArr::operator[](nPos); } \
+ T& operator[]( USHORT nPos ) { \
+ return (T&) ByteArr::operator[](nPos); } \
+ void Clear() { Remove( 0, Count() ); }\
+};
+
+class WordArr
+{
+private:
+ short* pData;
+ USHORT nUsed;
+ BYTE nGrow;
+ BYTE nUnused;
+public:
+ WordArr( BYTE nInitSize = 0, BYTE nGrowSize = 8 );
+ WordArr( const WordArr& rOrig );
+ ~WordArr();
+ WordArr& operator= ( const WordArr& rOrig );
+ short GetObject( USHORT nPos ) const { return operator[](nPos); }
+ short& GetObject( USHORT nPos ) { return operator[](nPos); }
+ void Insert( USHORT nPos, short rElem );
+ void Append( short rElem );
+ BOOL Remove( short rElem );
+ USHORT Remove( USHORT nPos, USHORT nLen );
+ USHORT Count() const { return nUsed; }
+ short* operator*();
+ short operator[]( USHORT nPos ) const;
+ short& operator[]( USHORT nPos );
+ BOOL Contains( const short rItem ) const;
+ void Clear() { Remove( 0, Count() ); }
+};
+
+inline short* WordArr::operator*()
+{
+ return ( nUsed==0 ? 0 : pData );
+}
+
+#define DECL_2BYTEARRAY(ARR, T, nI, nG)\
+class ARR: public WordArr\
+{\
+public:\
+ ARR( BYTE nIni=nI, BYTE nGrowValue=nG ):\
+ WordArr(nIni,nGrowValue) \
+ {}\
+ ARR( const ARR& rOrig ):\
+ WordArr(rOrig) \
+ {}\
+ T GetObject( USHORT nPos ) const { return operator[](nPos); } \
+ T& GetObject( USHORT nPos ) { return operator[](nPos); } \
+ void Insert( USHORT nPos, T aElement ) {\
+ WordArr::Insert(nPos,(short)aElement);\
+ }\
+ void Append( T aElement ) {\
+ WordArr::Append((short)aElement);\
+ }\
+ void Remove( T aElement ) {\
+ WordArr::Remove((short)aElement);\
+ }\
+ void Remove( USHORT nPos, USHORT nLen = 1 ) {\
+ WordArr::Remove( nPos, nLen ); \
+ }\
+ T* operator *() {\
+ return (T*) WordArr::operator*();\
+ }\
+ T operator[]( USHORT nPos ) const { \
+ return (T) WordArr::operator[](nPos); } \
+ T& operator[]( USHORT nPos ) { \
+ return (T&) WordArr::operator[](nPos); } \
+ void Clear() { Remove( 0, Count() ); }\
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/minstack.hxx b/sfx2/inc/sfx2/minstack.hxx
new file mode 100644
index 000000000000..c5f2f84da1d5
--- /dev/null
+++ b/sfx2/inc/sfx2/minstack.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * 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 _SFXMINSTACK_HXX
+#define _SFXMINSTACK_HXX
+
+//ASDBG #ifndef _SFXMINARRAY_HXX
+#include <sfx2/minarray.hxx>
+
+#define DECL_OBJSTACK( ARR, T, nI, nG ) \
+DECL_OBJARRAY( ARR##arr_, T, nI, nG ); \
+class ARR: private ARR##arr_ \
+{ \
+public: \
+ ARR( BYTE nInitSize = nI, BYTE nGrowSize = nG ): \
+ ARR##arr_( nInitSize, nGrowSize ) \
+ {} \
+\
+ ARR( const ARR& rOrig ): \
+ ARR##arr_( rOrig ) \
+ {} \
+\
+ USHORT Count() const { return ARR##arr_::Count(); } \
+ void Push( const T& rElem ) { Append( rElem ); } \
+ const T& Top( USHORT nLevel = 0 ) const \
+ { return (*this)[Count()-nLevel-1]; } \
+ const T& Bottom() const { return (*this)[0]; } \
+ T Pop(); \
+ void Clear() { ARR##arr_::Clear(); } \
+ BOOL Contains( const T& rItem ) const \
+ { return ARR##arr_::Contains( rItem ); } \
+}
+
+#define IMPL_OBJSTACK( ARR, T ) \
+IMPL_OBJARRAY( ARR##arr_, T ); \
+\
+T ARR::Pop() \
+{ T aRet = (*this)[Count()-1]; \
+ Remove( Count()-1, 1 ); \
+ return aRet; \
+}
+
+#define DECL_PTRSTACK( ARR, T, nI, nG ) \
+DECL_PTRARRAY( ARR##arr_, T, nI, nG ) \
+class ARR: private ARR##arr_ \
+{ \
+public: \
+ ARR( BYTE nInitSize = nI, BYTE nGrowSize = nG ): \
+ ARR##arr_( nInitSize, nGrowSize ) \
+ {} \
+\
+ ARR( const ARR& rOrig ): \
+ ARR##arr_( rOrig ) \
+ {} \
+\
+ USHORT Count() const { return ARR##arr_::Count(); } \
+ void Push( T rElem ) { Append( rElem ); } \
+ BOOL Replace( T rOldElem, T rNewElem ) \
+ { return ARR##arr_::Replace( rOldElem, rNewElem ); } \
+ T Top( USHORT nLevel = 0 ) const \
+ { return (*this)[Count()-nLevel-1]; } \
+ T Bottom() const { return (*this)[0]; } \
+ T Pop() \
+ { T aRet = (*this)[Count()-1]; \
+ Remove( Count()-1, 1 ); \
+ return aRet; \
+ } \
+ T* operator*() \
+ { return &(*this)[Count()-1]; } \
+ void Clear() { ARR##arr_::Clear(); } \
+ BOOL Contains( const T pItem ) const \
+ { return ARR##arr_::Contains( pItem ); } \
+}
+
+#endif
+
diff --git a/sfx2/inc/sfx2/mnuitem.hxx b/sfx2/inc/sfx2/mnuitem.hxx
new file mode 100644
index 000000000000..fe7d8bb36b1e
--- /dev/null
+++ b/sfx2/inc/sfx2/mnuitem.hxx
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * 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 _SFXMNUITEM_HXX
+#define _SFXMNUITEM_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+class SfxVirtualMenu;
+class SfxBindings;
+class SfxModule;
+class Menu;
+class PopupMenu;
+class SfxUnoMenuControl;
+class SfxUnoControllerItem;
+struct SfxMenuCtrlFactory;
+#include <tools/string.hxx>
+#include <sfx2/ctrlitem.hxx>
+
+class SFX2_DLLPUBLIC SfxMenuControl: public SfxControllerItem
+{
+//friend SvStream& operator<<( SvStream& rStream, const SfxMenuControl& rItem );
+//friend SvStream& operator>>( SvStream& rStream, SfxMenuControl& rItem );
+
+ String aTitle;
+ String aHelpText;
+ SfxVirtualMenu* pOwnMenu;
+ SfxVirtualMenu* pSubMenu;
+ BOOL b_ShowStrings;
+ BOOL b_UnusedDummy;
+
+public:
+ SfxMenuControl();
+ SfxMenuControl( BOOL bShowStrings );
+ SfxMenuControl( USHORT, SfxBindings&);
+
+ static SfxMenuControl* CreateImpl( USHORT nId, Menu &rMenu, SfxBindings &rBindings );
+ static void RegisterControl( USHORT nSlotId = 0, SfxModule *pMod=NULL );
+
+ ~SfxMenuControl();
+
+ using SfxControllerItem::Bind;
+ void Bind( SfxVirtualMenu* pOwnMenu, USHORT nId,
+ const String& rTitle, const String &rHelpText,
+ SfxBindings & );
+ void Bind( SfxVirtualMenu* pOwnMenu, USHORT nId,
+ SfxVirtualMenu& rSubMenu,
+ const String& rTitle, const String &rHelpText,
+ SfxBindings & );
+
+// SvStream & Load(SvStream &, SfxBindings*);
+// SvStream & Store(SvStream &);
+
+ String GetTitle() const;
+ SfxVirtualMenu* GetPopupMenu() const;
+ virtual PopupMenu* GetPopup() const;
+ void SetOwnMenu( SfxVirtualMenu* pMenu );
+ void RemovePopup();
+
+ const String& GetHelpText() const { return aHelpText; }
+ void SetHelpText(const String &rStr) { aHelpText = rStr; }
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+
+ static SfxMenuControl* CreateControl( USHORT nId, Menu &, SfxBindings & );
+ static SfxUnoMenuControl* CreateControl( const String&, USHORT, Menu&, SfxBindings&, SfxVirtualMenu* );
+ static SfxUnoMenuControl* CreateControl( const String&, USHORT, Menu&, const String& sItemText, const String& sHelpText, SfxBindings&, SfxVirtualMenu* );
+ static BOOL IsSpecialControl( USHORT nId, SfxModule* );
+ static void RegisterMenuControl(SfxModule*, SfxMenuCtrlFactory*);
+
+};
+
+class SfxUnoMenuControl : public SfxMenuControl
+{
+ SfxUnoControllerItem* pUnoCtrl;
+public:
+ SfxUnoMenuControl( const String&, USHORT nId, Menu&,
+ SfxBindings&, SfxVirtualMenu* );
+ SfxUnoMenuControl( const String&, USHORT nId, Menu&,
+ const String&, const String&,
+ SfxBindings&, SfxVirtualMenu* );
+ ~SfxUnoMenuControl();
+ void Select();
+};
+
+//--------------------------------------------------------------------
+
+typedef SfxMenuControl* (*SfxMenuControlCtor)( USHORT nId, Menu &, SfxBindings & );
+
+struct SfxMenuCtrlFactory
+{
+ SfxMenuControlCtor pCtor;
+ TypeId nTypeId;
+ USHORT nSlotId;
+
+ SfxMenuCtrlFactory( SfxMenuControlCtor pTheCtor,
+ TypeId nTheTypeId, USHORT nTheSlotId ):
+ pCtor(pTheCtor),
+ nTypeId(nTheTypeId),
+ nSlotId(nTheSlotId)
+ {}
+};
+
+//
+
+inline String SfxMenuControl::GetTitle() const
+{
+ return aTitle;
+}
+//--------------------------------------------------------------------
+
+//
+
+inline SfxVirtualMenu* SfxMenuControl::GetPopupMenu() const
+{
+ return pSubMenu;
+}
+//--------------------------------------------------------------------
+
+#define SFX_DECL_MENU_CONTROL() \
+ static SfxMenuControl* CreateImpl( USHORT nId, Menu &rMenu, SfxBindings &rBindings ); \
+ static void RegisterControl(USHORT nSlotId = 0, SfxModule *pMod=NULL)
+
+#define SFX_IMPL_MENU_CONTROL(Class, nItemClass) \
+ SfxMenuControl* __EXPORT Class::CreateImpl( USHORT nId, Menu &rMenu, SfxBindings &rBindings ) \
+ { return new Class(nId, rMenu, rBindings); } \
+ void Class::RegisterControl(USHORT nSlotId, SfxModule *pMod) \
+ { SfxMenuControl::RegisterMenuControl( pMod, new SfxMenuCtrlFactory( \
+ Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+
+//#if 0 // _SOLAR__PRIVATE
+
+class SfxAppMenuControl_Impl : public SfxMenuControl
+{
+ PopupMenu* pMenu;
+ ULONG m_nSymbolsStyle;
+ BOOL m_bWasHiContrastMode;
+ BOOL m_bShowMenuImages;
+
+protected:
+ DECL_LINK( Activate, Menu * ); // Needed to support high contrast images
+
+public:
+ SFX_DECL_MENU_CONTROL();
+ SfxAppMenuControl_Impl( USHORT nPos, Menu& rMenu, SfxBindings& rBindings );
+ ~SfxAppMenuControl_Impl();
+};
+
+//#endif
+
+#endif
diff --git a/sfx2/inc/sfx2/mnumgr.hxx b/sfx2/inc/sfx2/mnumgr.hxx
new file mode 100644
index 000000000000..ee1c81daa603
--- /dev/null
+++ b/sfx2/inc/sfx2/mnumgr.hxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * 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 _SFXMNUMGR_HXX
+#define _SFXMNUMGR_HXX
+
+#include <stdarg.h>
+
+#ifndef _MENU_HXX //autogen //wg. MENU_APPEND !!!!
+#include <vcl/menu.hxx>
+#endif
+#include <vcl/wintypes.hxx>
+#include <tools/link.hxx>
+#include <com/sun/star/embed/VerbDescriptor.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <tools/stream.hxx>
+#include <tools/resid.hxx>
+#include <sfx2/sfx.hrc>
+
+class SfxVirtualMenu;
+class SfxPoolItem;
+class SfxBindings;
+class ResMgr;
+class Menu;
+class PopupMenu;
+class SfxBindings;
+class ResId;
+class Point;
+class SfxObjectShell;
+class SfxModule;
+class SfxViewFrame;
+
+class SfxMenuManager
+{
+friend class SfxPopupMenuManager;
+
+ SfxVirtualMenu* pMenu; // das eigentliche Menu
+ SfxVirtualMenu* pOldMenu; // only while reconfiguring
+ BOOL bMenuBar; // Popup oder MenuBar
+ SfxBindings* pBindings;
+ ResMgr* pResMgr;
+ sal_uInt32 nType;
+ BOOL bAddClipboardFuncs : 1;
+
+ void Construct( SfxVirtualMenu& rMenu );
+
+protected:
+ SfxMenuManager( Menu*, SfxBindings& );
+ SfxMenuManager( const ResId&, SfxBindings& );
+ ~SfxMenuManager();
+ USHORT GetItemPos( USHORT nId );
+ sal_uInt32 GetType() { return nType; }
+public:
+
+ void UseDefault();
+
+ DECL_LINK( Select, Menu* );
+
+ SfxVirtualMenu* GetMenu() const
+ { return pMenu; }
+
+ SfxBindings& GetBindings() { return *pBindings; }
+ const SfxBindings& GetBindings() const { return *pBindings; }
+ void SetResMgr(ResMgr* pMgr) {pResMgr = pMgr; }
+ ResMgr* GetResMgr() const { return pResMgr; }
+ void SetPopupMenu( USHORT nId, PopupMenu *pMenu );
+
+//#if 0 // _SOLAR__PRIVATE
+ void Construct_Impl( Menu* pMenu, BOOL bWithHelp );
+//#endif
+};
+
+//--------------------------------------------------------------------
+
+class SAL_DLLPUBLIC_EXPORT SfxPopupMenuManager : public SfxMenuManager
+{
+private:
+ DECL_LINK( SelectHdl, void * );
+ Menu* pSVMenu;
+
+private:
+ // only declared, but not defined: don't allow copying
+ SfxPopupMenuManager( const SfxPopupMenuManager& );
+ SfxPopupMenuManager& operator=( const SfxPopupMenuManager& );
+
+public:
+ SfxPopupMenuManager( const ResId&, SfxBindings& );
+ SfxPopupMenuManager( PopupMenu*, SfxBindings& );
+ ~SfxPopupMenuManager();
+ static void ExecutePopup( const ResId&, SfxViewFrame* pViewFrame, const Point& rPoint, Window* pWindow );
+ static SfxPopupMenuManager* Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, Window* pWindow );
+
+ USHORT Execute( const Point& rPos, Window *pWindow );
+ USHORT Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 );
+ USHORT Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1 ... );
+
+ void StartInsert();
+ void EndInsert();
+ void CheckItem( USHORT, BOOL );
+ void RemoveItem( USHORT );
+ void InsertItem( USHORT, const String&, MenuItemBits,
+ USHORT nPos = MENU_APPEND );
+ void InsertSeparator( USHORT nPos = MENU_APPEND );
+ void RemoveDisabledEntries();
+ void AddClipboardFunctions();
+ Menu* GetSVMenu();
+};
+
+#endif // #ifndef _SFXMNUMGR_HXX
+
diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx
new file mode 100644
index 000000000000..793dd8f76cab
--- /dev/null
+++ b/sfx2/inc/sfx2/module.hxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * 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 _SFXMODULE_HXX
+#define _SFXMODULE_HXX // intern
+#define _SFXMOD_HXX // extern
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <sfx2/shell.hxx>
+#include <sfx2/imgdef.hxx>
+#include <sal/types.h>
+#include <vcl/fldunit.hxx>
+
+class ImageList;
+
+class SfxBindings;
+class SfxObjectFactory;
+class ModalDialog;
+class SfxObjectFactory;
+class SfxModuleArr_Impl;
+class SfxModule_Impl;
+class SfxSlotPool;
+struct SfxChildWinContextFactory;
+struct SfxChildWinFactory;
+struct SfxMenuCtrlFactory;
+struct SfxStbCtrlFactory;
+struct SfxTbxCtrlFactory;
+class SfxTbxCtrlFactArr_Impl;
+class SfxChildWinFactArr_Impl;
+class SfxMenuCtrlFactArr_Impl;
+class SfxStbCtrlFactArr_Impl;
+class SfxTabPage;
+class Window;
+
+//====================================================================
+
+class SFX2_DLLPUBLIC SfxModule : public SfxShell
+{
+private:
+ ResMgr* pResMgr;
+ sal_Bool bDummy : 1;
+ SfxModule_Impl* pImpl;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE void Construct_Impl();
+//#endif
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SFX_INTERFACE_SFXMODULE)
+
+ SfxModule( ResMgr* pMgrP, sal_Bool bDummy,
+ SfxObjectFactory* pFactoryP, ... );
+ ~SfxModule();
+
+ ResMgr* GetResMgr() const { return SfxShell::GetResMgr(); }
+ virtual ResMgr* GetResMgr();
+ SfxSlotPool* GetSlotPool() const;
+
+ void RegisterToolBoxControl(SfxTbxCtrlFactory*);
+ void RegisterChildWindow(SfxChildWinFactory*);
+ void RegisterChildWindowContext( sal_uInt16, SfxChildWinContextFactory* );
+ void RegisterStatusBarControl(SfxStbCtrlFactory*);
+ void RegisterMenuControl(SfxMenuCtrlFactory*);
+
+ virtual SfxTabPage* CreateTabPage( sal_uInt16 nId,
+ Window* pParent,
+ const SfxItemSet& rSet );
+ virtual void Invalidate(USHORT nId = 0);
+ BOOL IsActive() const;
+
+ static SfxModule* GetActiveModule( SfxViewFrame* pFrame=NULL );
+ static FieldUnit GetCurrentFieldUnit();
+ FieldUnit GetFieldUnit() const;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE static SfxModuleArr_Impl& GetModules_Impl();
+ SAL_DLLPRIVATE static void DestroyModules_Impl();
+ SAL_DLLPRIVATE SfxTbxCtrlFactArr_Impl* GetTbxCtrlFactories_Impl() const;
+ SAL_DLLPRIVATE SfxStbCtrlFactArr_Impl* GetStbCtrlFactories_Impl() const;
+ SAL_DLLPRIVATE SfxMenuCtrlFactArr_Impl* GetMenuCtrlFactories_Impl() const;
+ SAL_DLLPRIVATE SfxChildWinFactArr_Impl* GetChildWinFactories_Impl() const;
+ SAL_DLLPRIVATE ImageList* GetImageList_Impl( BOOL bBig );
+ SAL_DLLPRIVATE ImageList* GetImageList_Impl( BOOL bBig, BOOL bHiContrast );
+//#endif
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/msg.hxx b/sfx2/inc/sfx2/msg.hxx
new file mode 100644
index 000000000000..efbc2d2c75af
--- /dev/null
+++ b/sfx2/inc/sfx2/msg.hxx
@@ -0,0 +1,344 @@
+/*************************************************************************
+ *
+ * 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 _SFXMSG_HXX
+#define _SFXMSG_HXX
+
+#include <tools/rtti.hxx>
+#include <sfx2/shell.hxx>
+
+//--------------------------------------------------------------------
+
+#define SFX_SLOT_CACHABLE 0x0001L // exklusiv zu VOLATILE, default
+#define SFX_SLOT_VOLATILE 0x0002L // per Timer alle 2s neu geholt, exklusiv zu CACHABLE
+#define SFX_SLOT_TOGGLE 0x0004L // invertiert bei Execute alten Wert
+#define SFX_SLOT_AUTOUPDATE 0x0008L // invalidiert den Status nach Execute automatisch
+
+#define SFX_SLOT_SYNCHRON 0x0010L // exklusiv zu ASYNCHRON, default
+#define SFX_SLOT_ASYNCHRON 0x0020L // via Post-Message, exklusiv zu SYNCHRON
+
+#define SFX_SLOT_HASCOREID 0x0040L // Slot-ID/Which-ID Mappting durchf"uhren
+#define SFX_SLOT_HASDIALOG 0x0080L // Punkte fuer Dialog nach recofig
+
+#define SFX_SLOT_NORECORD 0x0100L // kein Recording
+#define SFX_SLOT_RECORDPERITEM 0x0200L // je Item ein Statement
+#define SFX_SLOT_RECORDPERSET 0x0400L // das ganze Set ist ein Statement, def.
+#define SFX_SLOT_RECORDMANUAL 0x0800L // Recording vom Applikationsentwickler iss-default
+
+#define SFX_SLOT_RECORDABSOLUTE 0x1000000L // Recording mit absolutem Target
+#define SFX_SLOT_STANDARD ( SFX_SLOT_CACHABLE | \
+ SFX_SLOT_SYNCHRON | \
+ SFX_SLOT_RECORDPERSET )
+
+#define SFX_SLOT_PROPGET 0x1000L // abfragbares Property
+#define SFX_SLOT_PROPSET 0x2000L // setzbares Property, exklusiv zu SFX_SLOT_METHOD
+#define SFX_SLOT_METHOD 0x4000L // Methode, exklusiv zu SFX_SLOT_PROPSET
+
+#define SFX_SLOT_FASTCALL 0x8000L // vor Execute keine Pr"ufung, ob disabled
+
+#define SFX_SLOT_STATUSBARCONFIG 0x10000L // konfigurierbar in Statuszeile
+#define SFX_SLOT_MENUCONFIG 0x20000L // konfigurierbar im Men"u
+#define SFX_SLOT_TOOLBOXCONFIG 0x40000L // konfigurierbar in Toolboxen
+#define SFX_SLOT_ACCELCONFIG 0x80000L // konfigurierbar auf Tasten
+
+#define SFX_SLOT_CONTAINER 0x100000L // beim InPlace vom Container bedient
+#define SFX_SLOT_READONLYDOC 0x200000L // auch bei readonly-Docs verf"ugbar
+#define SFX_SLOT_IMAGEROTATION 0x400000L // bei Vertical/Bidi writing Image drehen
+#define SFX_SLOT_IMAGEREFLECTION 0x800000L // bei Vertical/Bidi writing Image spiegeln
+
+//--------------------------------------------------------------------
+
+class SfxRequest;
+class SfxItemSet;
+
+#define SFX_EXEC_STUB( aShellClass, aExecMethod) \
+ void __EXPORT SfxStub##aShellClass##aExecMethod( \
+ SfxShell *pShell, SfxRequest& rReq) \
+ { \
+ (( aShellClass* ) pShell )->aExecMethod( rReq ); \
+ }
+
+#define SFX_STATE_STUB( aShellClass, aStateMethod) \
+ void __EXPORT SfxStub##aShellClass##aStateMethod( \
+ SfxShell *pShell, SfxItemSet& rSet) \
+ { \
+ (( aShellClass* ) pShell )->aStateMethod( rSet ); \
+ }
+
+#define SFX_STUB_PTR( aShellClass, aMethod ) \
+ &SfxStub##aShellClass##aMethod
+
+#define SFX_STUB_PTR_EXEC_NONE &SfxShell::EmptyExecStub
+
+#define SFX_STUB_PTR_STATE_NONE &SfxShell::EmptyStateStub
+
+//--------------------------------------------------------------------
+
+enum SfxSlotKind
+{
+ SFX_KIND_STANDARD,
+ SFX_KIND_ENUM,
+ SFX_KIND_ATTR
+};
+
+//=========================================================================
+
+struct SfxTypeAttrib
+{
+ USHORT nAID;
+ const char __FAR_DATA* pName;
+};
+
+struct SfxType
+{
+ TypeId aTypeId;
+ USHORT nAttribs;
+ SfxTypeAttrib aAttrib[16];
+
+ const TypeId& Type() const
+ { return aTypeId; }
+ SfxPoolItem* CreateItem() const
+ { return (SfxPoolItem*) aTypeId(); }
+};
+
+struct SfxType0
+{
+ TypeId aTypeId;
+ USHORT nAttribs;
+
+ const TypeId& Type() const
+ { return aTypeId; }
+ SfxPoolItem* CreateItem() const
+ { return (SfxPoolItem*) aTypeId(); }
+};
+
+#define SFX_DECL_TYPE(n) struct SfxType##n \
+ { \
+ TypeId aTypeId; \
+ USHORT nAttribs; \
+ SfxTypeAttrib aAttrib[n]; \
+ }
+
+#define SFX_TYPE(Class) &a##Class##_Impl
+
+SFX_DECL_TYPE(1);
+SFX_DECL_TYPE(2);
+SFX_DECL_TYPE(3);
+SFX_DECL_TYPE(4);
+SFX_DECL_TYPE(5);
+SFX_DECL_TYPE(6);
+SFX_DECL_TYPE(7);
+SFX_DECL_TYPE(8);
+SFX_DECL_TYPE(10); // for SfxDocInfoItem
+SFX_DECL_TYPE(11);
+
+SFX_DECL_TYPE(13); // for SwAddPrinterItem, Sd...
+SFX_DECL_TYPE(14);
+SFX_DECL_TYPE(16); // for SwDocDisplayItem
+SFX_DECL_TYPE(17); // for SvxAddressItem
+SFX_DECL_TYPE(18); // for SvxSearchItem
+
+// all SfxTypes must be in this header
+#undef SFX_DECL_TYPE
+
+#define SFX_SLOT_ARG( aShellClass, id, GroupId, ExecMethodPtr, StateMethodPtr, Flags, ItemClass, nArg0, nArgs, Name, Prop ) \
+ { id, GroupId, id, Flags | Prop, \
+ USHRT_MAX, 0, \
+ ExecMethodPtr, \
+ StateMethodPtr, \
+ (const SfxType*) &a##ItemClass##_Impl, \
+ Name, Name, 0, 0, \
+ &a##aShellClass##Args_Impl[nArg0], nArgs, 0, Name \
+ }
+
+#define SFX_SLOT( aShellClass, id, GroupId, ExecMethodPtr, StateMethodPtr, Flags, ItemClass ) \
+ { id, GroupId, id, Flags, \
+ 0, 0, \
+ ExecMethodPtr, \
+ StateMethodPtr, \
+ (const SfxType*) &a##ItemClass##_Impl, \
+ 0, 0, 0, 0, 0, 0, 0 \
+ }
+
+#define SFX_SLOT_ATTR( id, GroupId, Dummy, ExecMethodPtr, StateMethodPtr, Flags, ItemClass ) \
+ { id, GroupId, id, Flags, \
+ USHRT_MAX, 0, \
+ ExecMethodPtr, \
+ StateMethodPtr, \
+ (const SfxType*) &a##ItemClass##_Impl, \
+ 0, 0, 0, 0, 0, 0, 0 \
+ }
+
+#define SFX_SLOT_ENUM( SlaveId, GroupId, MasterId, Value, Flags ) \
+ { SlaveId, GroupId, id, Flags, \
+ MasterId, Value, 0, 0, \
+ (const SfxType*) &aSfxBoolItem_Impl, \
+ 0, 0, 0, 0, 0, 0, 0 \
+ }
+#define SFX_NEW_SLOT_ARG( aShellClass, id, hid, GroupId, pLinked, pNext, ExecMethodPtr, StateMethodPtr, Flags, DisableFlags, ItemClass, nArg0, nArgs, Name, Prop, UnoName ) \
+ { id, GroupId, hid, Flags | Prop, \
+ USHRT_MAX, 0, \
+ ExecMethodPtr, \
+ StateMethodPtr, \
+ (const SfxType*) &a##ItemClass##_Impl, \
+ Name, Name, \
+ pLinked, pNext, \
+ &a##aShellClass##Args_Impl[nArg0], nArgs, DisableFlags, UnoName \
+ }
+
+#define SFX_NEW_SLOT_ENUM( SlaveId, hid, GroupId, pMaster, pNext, MasterId, Value, Flags, DisableFlags, UnoName ) \
+ { SlaveId, GroupId, hid, Flags, \
+ MasterId, Value, \
+ 0, \
+ 0, \
+ (const SfxType*) &aSfxBoolItem_Impl, \
+ 0, 0, \
+ pMaster, \
+ pNext, \
+ 0, 0, DisableFlags, UnoName \
+ }
+
+#define SFX_SLOTMAP_NONE(ShellClass) \
+ static SfxFormalArgument __FAR_DATA a##ShellClass##Args_Impl[1]; \
+ static SfxSlot __FAR_DATA a##ShellClass##Slots_Impl[] = \
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
+
+#define SFX_ARGUMENT( ArgSlotId, ArgName, ArgTypeId ) \
+ { (const SfxType*) &a##ArgTypeId##_Impl, ArgName, ArgSlotId }
+
+//--------------------------------------------------------------------
+
+class SfxPoolItem;
+
+struct SfxFormalArgument
+{
+ const SfxType* pType; // Typ des Parameters (SfxPoolItem Subklasse)
+ const char __FAR_DATA* pName; // Name des Parameters
+ USHORT nSlotId;// Slot-Id zur Identifikation des Parameters
+
+ const TypeId& Type() const
+ { return pType->aTypeId; }
+ SfxPoolItem* CreateItem() const
+ { return (SfxPoolItem*) pType->aTypeId(); }
+};
+
+//--------------------------------------------------------------------
+
+class SfxSlot
+{
+public:
+ USHORT nSlotId; // in Shell eindeutige Slot-Id
+ USHORT nGroupId; // f"ur Konfigurations-Bereich
+ ULONG nHelpId; // i.d.R. == nSlotId
+ ULONG nFlags; // artihm. veroderte Flags
+
+ USHORT nMasterSlotId; // Enum-Slot bzw. Which-Id
+ USHORT nValue; // Wert, falls Enum-Slot
+
+ SfxExecFunc fnExec; // Funktion zum Ausf"uhren
+ SfxStateFunc fnState; // Funktion f"ur Status
+
+ const SfxType* pType; // SfxPoolItem-Typ (Status)
+ const char __FAR_DATA* pName; // Name des Slots
+ const char __FAR_DATA* pMethodName; // Name der Method falls anders
+
+ const SfxSlot* pLinkedSlot; // Master-Slot f"ur Enum-Werte
+ const SfxSlot* pNextSlot; // mit derselben Status-Methode
+
+ const SfxFormalArgument* pFirstArgDef; // erste formale Argument-Definition
+ USHORT nArgDefCount; // Anzahl der formalen Argumente
+ long nDisableFlags; // DisableFlags, die vorhanden sein
+ // m"ussen, damit der Slot enabled ist
+ const char __FAR_DATA* pUnoName; // UnoName des Slots
+
+public:
+
+ SfxSlotKind GetKind() const;
+ USHORT GetSlotId() const;
+ ULONG GetHelpId() const;
+ ULONG GetMode() const;
+ BOOL IsMode( ULONG nMode ) const;
+ USHORT GetGroupId() const;
+ USHORT GetMasterSlotId() const { return nMasterSlotId; }
+ USHORT GetWhich( const SfxItemPool &rPool ) const;
+ USHORT GetValue() const { return nValue; }
+ const SfxType* GetType() const { return pType; }
+ const char* GetUnoName() const { return pUnoName; }
+
+ USHORT GetFormalArgumentCount() const { return nArgDefCount; }
+ const SfxFormalArgument& GetFormalArgument( USHORT nNo ) const
+ { return pFirstArgDef[nNo]; }
+
+ SfxExecFunc GetExecFnc() const { return fnExec; }
+ SfxStateFunc GetStateFnc() const { return fnState; }
+
+ const SfxSlot* GetLinkedSlot() const { return pLinkedSlot; }
+ const SfxSlot* GetNextSlot() const { return pNextSlot; }
+};
+
+//=========================================================================
+
+// returns the id of the function
+
+inline USHORT SfxSlot::GetSlotId() const
+{
+ return nSlotId;
+}
+//--------------------------------------------------------------------
+// returns the help-id of the slot
+
+inline ULONG SfxSlot::GetHelpId() const
+{
+ return nHelpId;
+}
+
+//--------------------------------------------------------------------
+
+// returns a bitfield with flags
+
+inline ULONG SfxSlot::GetMode() const
+{
+ return nFlags;
+}
+//--------------------------------------------------------------------
+
+// determines if the specified mode is assigned
+
+inline BOOL SfxSlot::IsMode( ULONG nMode ) const
+{
+ return (nFlags & nMode) != 0;
+}
+//--------------------------------------------------------------------
+
+// returns the id of the associated group
+
+inline USHORT SfxSlot::GetGroupId() const
+{
+ return nGroupId;
+
+}
+
+#endif
diff --git a/sfx2/inc/sfx2/msgpool.hxx b/sfx2/inc/sfx2/msgpool.hxx
new file mode 100644
index 000000000000..717aa00c7875
--- /dev/null
+++ b/sfx2/inc/sfx2/msgpool.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * 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 _SFXMSGPOOL_HXX
+#define _SFXMSGPOOL_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+
+#include <sfx2/msg.hxx>
+#include <tools/string.hxx>
+#include <svl/svarray.hxx>
+
+class SfxInterface;
+class SfxSlot;
+class SfxInterfaceArr_Impl;
+class SfxSlotGroupArr_Impl;
+class SfxSlotTypeArr_Impl;
+class SfxSlotArr_Impl;
+
+//=========================================================================
+
+class SFX2_DLLPUBLIC SfxSlotPool
+{
+ SfxSlotGroupArr_Impl* _pGroups;
+ SfxSlotTypeArr_Impl* _pTypes;
+ SfxSlotPool* _pParentPool;
+ ResMgr* _pResMgr;
+ SfxInterfaceArr_Impl* _pInterfaces;
+ USHORT _nCurGroup;
+ USHORT _nCurInterface;
+ USHORT _nCurMsg;
+ SfxSlotArr_Impl* _pUnoSlots;
+
+private:
+ const SfxSlot* SeekSlot( USHORT nObject );
+
+public:
+ SfxSlotPool( SfxSlotPool* pParent=0, ResMgr* pMgr=0);
+ ~SfxSlotPool();
+
+ void RegisterInterface( SfxInterface& rFace );
+ void ReleaseInterface( SfxInterface& rFace );
+ SfxInterface* FirstInterface();
+ SfxInterface* NextInterface();
+
+ static SfxSlotPool& GetSlotPool( SfxViewFrame *pFrame=NULL );
+
+ USHORT GetGroupCount();
+ String SeekGroup( USHORT nNo );
+ const SfxSlot* FirstSlot();
+ const SfxSlot* NextSlot();
+ const SfxSlot* GetSlot( USHORT nId );
+ const SfxSlot* GetUnoSlot( USHORT nId );
+ const SfxSlot* GetUnoSlot( const String& rUnoName );
+ TypeId GetSlotType( USHORT nSlotId ) const;
+};
+
+//--------------------------------------------------------------------
+
+// seeks to the first func in the current group
+
+inline const SfxSlot* SfxSlotPool::FirstSlot()
+{
+ return SeekSlot(0);
+}
+
+#define SFX_SLOTPOOL() SfxSlotPool::GetSlotPool()
+
+#endif
+
diff --git a/sfx2/inc/sfx2/navigat.hxx b/sfx2/inc/sfx2/navigat.hxx
new file mode 100644
index 000000000000..a3f525ccd754
--- /dev/null
+++ b/sfx2/inc/sfx2/navigat.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFXNAVI_HXX
+#define _SFXNAVI_HXX
+
+// includes *******************************************************************
+
+#include <sfx2/childwin.hxx>
+#include <sfx2/dockwin.hxx>
+
+class SfxNavigatorWrapper : public SfxChildWindow
+{
+
+public:
+ SfxNavigatorWrapper( Window* pParent ,
+ USHORT nId ,
+ SfxBindings* pBindings ,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(SfxNavigatorWrapper);
+};
+
+class SfxNavigator : public SfxDockingWindow
+{
+ SfxChildWindow* pWrapper;
+
+public:
+ SfxNavigator( SfxBindings* pBindings ,
+ SfxChildWindow* pChildWin ,
+ Window* pParent ,
+ WinBits nBits );
+
+ virtual void Resize();
+ virtual void Resizing( Size& rSize );
+ virtual BOOL Close();
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/new.hxx b/sfx2/inc/sfx2/new.hxx
new file mode 100644
index 000000000000..1647f880500d
--- /dev/null
+++ b/sfx2/inc/sfx2/new.hxx
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * 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 _SFXNEW_HXX
+#define _SFXNEW_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#include <sfx2/basedlgs.hxx>
+
+//=========================================================================
+
+class SfxObjectShellLock;
+class SfxObjectShell;
+class MoreButton;
+
+//=========================================================================
+
+#define SFXWB_PREVIEW 0x0003
+#define SFXWB_LOAD_TEMPLATE 0x0004
+
+#define SFX_LOAD_TEXT_STYLES 0x0001
+#define SFX_LOAD_FRAME_STYLES 0x0002
+#define SFX_LOAD_PAGE_STYLES 0x0004
+#define SFX_LOAD_NUM_STYLES 0x0008
+#define SFX_MERGE_STYLES 0x0010
+
+#define RET_TEMPLATE_LOAD 100
+
+class SFX2_DLLPUBLIC SfxPreviewWin: public Window
+{
+ SfxObjectShellLock &rDocShell;
+protected:
+ virtual void Paint( const Rectangle& rRect );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ /** state whether a system setting for high contrast should be evaluated
+ and taken into account for this window.
+
+ The default implementation uses the accessibility option IsForDrawings
+ */
+ virtual bool UseHighContrastSetting() const;
+
+public:
+ SfxPreviewWin( Window* pParent,
+ const ResId& rResId,
+ SfxObjectShellLock &rDocSh );
+};
+
+class SfxNewFileDialog_Impl;
+class SFX2_DLLPUBLIC SfxNewFileDialog : public SfxModalDialog
+{
+ friend class SfxNewFileDialog_Impl;
+
+private:
+ SfxNewFileDialog_Impl* pImpl;
+
+public:
+
+ SfxNewFileDialog(Window *pParent, USHORT nFlags = 0);
+ ~SfxNewFileDialog();
+
+ // Liefert FALSE, wenn '- Keine -' als Vorlage eingestellt ist
+ // Nur wenn IsTemplate() TRUE liefert, koennen Vorlagennamen
+ // erfragt werden
+ BOOL IsTemplate() const;
+ String GetTemplateRegion() const;
+ String GetTemplateName() const;
+ String GetTemplateFileName() const;
+
+ // load template methods
+ USHORT GetTemplateFlags()const;
+ void SetTemplateFlags(USHORT nSet);
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/newstyle.hxx b/sfx2/inc/sfx2/newstyle.hxx
new file mode 100644
index 000000000000..ce596bacaa81
--- /dev/null
+++ b/sfx2/inc/sfx2/newstyle.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _NEWSTYLE_HXX
+#define _NEWSTYLE_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/msgbox.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+
+class SfxStyleSheetBasePool;
+
+class SFX2_DLLPUBLIC SfxNewStyleDlg : public ModalDialog
+{
+private:
+ FixedLine aColFL;
+ ComboBox aColBox;
+ OKButton aOKBtn;
+ CancelButton aCancelBtn;
+
+ QueryBox aQueryOverwriteBox;
+ SfxStyleSheetBasePool& rPool;
+
+//#if 0 // _SOLAR__PRIVATE
+ DECL_DLLPRIVATE_LINK( OKHdl, Control * );
+ DECL_DLLPRIVATE_LINK( ModifyHdl, ComboBox * );
+//#endif
+
+public:
+ SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& );
+ ~SfxNewStyleDlg();
+
+ String GetName() const { return aColBox.GetText().EraseLeadingChars(); }
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/objface.hxx b/sfx2/inc/sfx2/objface.hxx
new file mode 100644
index 000000000000..c7710f533935
--- /dev/null
+++ b/sfx2/inc/sfx2/objface.hxx
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * 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 _SFXOBJFACE_HXX
+#define _SFXOBJFACE_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <tools/string.hxx>
+#ifndef _RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+
+#include <sfx2/msg.hxx>
+
+struct SfxFormalArgument;
+struct SfxTypeLibImpl;
+struct SfxInterface_Impl;
+class SfxConfigManager;
+class SfxConfigItem;
+class SfxIFConfig_Impl;
+class SfxObjectUIArr_Impl ;
+class SfxModule;
+class SvStream;
+
+class SFX2_DLLPUBLIC SfxInterface
+{
+friend class SfxIFConfig_Impl;
+friend class SfxSlotPool;
+
+ const char* pName; // Sfx-internal name of interface
+ const SfxInterface* pGenoType; // base interface
+ SfxSlot* pSlots; // SlotMap
+ USHORT nCount; // number of slots in SlotMap
+ SfxInterfaceId nClassId; // Id of interface
+ ResId aNameResId; // ResId of external interface name
+ SfxInterface_Impl* pImpData;
+
+ SfxSlot* operator[]( USHORT nPos ) const;
+
+public:
+ SfxInterface( const char *pClass,
+ const ResId& rResId,
+ SfxInterfaceId nClassId,
+ const SfxInterface* pGeno,
+ SfxSlot &rMessages, USHORT nMsgCount );
+ virtual ~SfxInterface();
+
+ void SetSlotMap( SfxSlot& rMessages, USHORT nMsgCount );
+ inline USHORT Count() const;
+
+ const SfxSlot* GetRealSlot( const SfxSlot * ) const;
+ const SfxSlot* GetRealSlot( USHORT nSlotId ) const;
+ virtual const SfxSlot* GetSlot( USHORT nSlotId ) const;
+ const SfxSlot* GetSlot( const String& rCommand ) const;
+
+ const char* GetClassName() const { return pName; }
+ int HasName() const { return 0 != aNameResId.GetId(); }
+ String GetName() const
+ { return String(aNameResId); }
+ ResMgr* GetResMgr() const
+ { return aNameResId.GetResMgr(); }
+
+ const SfxInterface* GetGenoType() const { return pGenoType; }
+ const SfxInterface* GetRealInterfaceForSlot( const SfxSlot* ) const;
+
+ void RegisterObjectBar( USHORT, const ResId&, const String* pST=0 );
+ void RegisterObjectBar( USHORT, const ResId&, sal_uInt32 nFeature, const String* pST=0 );
+ void RegisterChildWindow( USHORT, BOOL bContext, const String* pST=0 );
+ void RegisterChildWindow( USHORT, BOOL bContext, sal_uInt32 nFeature, const String* pST=0 );
+ void RegisterStatusBar( const ResId& );
+ const ResId& GetObjectBarResId( USHORT nNo ) const;
+ USHORT GetObjectBarPos( USHORT nNo ) const;
+ sal_uInt32 GetObjectBarFeature( USHORT nNo ) const;
+ USHORT GetObjectBarCount() const;
+ void SetObjectBarPos( USHORT nPos, USHORT nId );
+ const String* GetObjectBarName( USHORT nNo ) const;
+ BOOL IsObjectBarVisible( USHORT nNo) const;
+ sal_uInt32 GetChildWindowFeature( USHORT nNo ) const;
+ sal_uInt32 GetChildWindowId( USHORT nNo ) const;
+ USHORT GetChildWindowCount() const;
+ void RegisterPopupMenu( const ResId& );
+ const ResId& GetPopupMenuResId() const;
+ const ResId& GetStatusBarResId() const;
+
+ void Register( SfxModule* );
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE int ContainsSlot_Impl( const SfxSlot *pSlot ) const
+ { return pSlot >= pSlots && pSlot < pSlots + Count(); }
+ SAL_DLLPRIVATE ResMgr* GetResManager_Impl() const
+ { return aNameResId.GetResMgr(); }
+//#endif
+};
+
+//--------------------------------------------------------------------
+
+// returns the number of functions in this cluster
+
+inline USHORT SfxInterface::Count() const
+{
+ return nCount;
+}
+
+//--------------------------------------------------------------------
+
+// returns a function by position in the array
+
+inline SfxSlot* SfxInterface::operator[]( USHORT nPos ) const
+{
+ return nPos < nCount? pSlots+nPos: 0;
+}
+
+//#if 0 // _SOLAR__PRIVATE
+class SfxIFConfig_Impl
+{
+friend class SfxInterface;
+ USHORT nCount;
+ SfxObjectUIArr_Impl* pObjectBars;
+
+public:
+ SfxIFConfig_Impl();
+ ~SfxIFConfig_Impl();
+ BOOL Store(SvStream&);
+ void RegisterObjectBar( USHORT, const ResId&, sal_uInt32 nFeature, const String* pST=0 );
+ USHORT GetType();
+};
+//#endif
+
+#endif
diff --git a/sfx2/inc/sfx2/objitem.hxx b/sfx2/inc/sfx2/objitem.hxx
new file mode 100644
index 000000000000..96bba6c91a07
--- /dev/null
+++ b/sfx2/inc/sfx2/objitem.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_OBJITEM_HXX
+#define _SFX_OBJITEM_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <svl/poolitem.hxx>
+
+#include <sfx2/shell.hxx>
+
+//------------------------------------------------------------------------
+
+class SFX2_DLLPUBLIC SfxObjectItem: public SfxPoolItem
+{
+ SfxShell* _pSh;
+
+public:
+ TYPEINFO();
+ SfxObjectItem( USHORT nWhich=0, SfxShell *pSh=0 );
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ SfxShell* GetShell() const
+ { return _pSh; }
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
new file mode 100644
index 000000000000..d514235cbfa2
--- /dev/null
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -0,0 +1,870 @@
+/*************************************************************************
+ *
+ * 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_OBJSH_HXX
+#define _SFX_OBJSH_HXX
+
+#include "sal/config.h"
+
+#include "tools/solar.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/security/DocumentSignatureInformation.hpp>
+#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <boost/shared_ptr.hpp>
+
+
+//________________________________________________________________________________________________________________
+// include something else
+//________________________________________________________________________________________________________________
+
+//#if 0 // _SOLAR__PRIVATE
+#include <vcl/timer.hxx>
+//#endif
+#include <svl/poolitem.hxx>
+#include <vcl/timer.hxx>
+#include <vcl/bitmap.hxx>
+#include <sot/storage.hxx>
+#include <rsc/rscsfx.hxx>
+
+#include <sfx2/XmlIdRegistry.hxx>
+#include <sfx2/shell.hxx>
+#include <comphelper/embeddedobjectcontainer.hxx>
+#include <com/sun/star/frame/XModel.hpp>
+
+class SbxValue;
+class SvxMacro;
+class SbxArray;
+class BasicManager;
+class SfxMedium;
+class SfxObjectFactory;
+class SfxDocumentInfoDialog;
+class SfxEventConfigItem_Impl;
+class SfxStyleSheetBasePool;
+class INote;
+class SfxStyleSheetPool;
+class SfxFrame;
+class SbMethod;
+class SfxConfigManager;
+class StarBASIC;
+class Printer;
+class SvKeyValueIterator;
+class SfxBaseModel;
+class SfxModule;
+class SvPseudoObject;
+class SvData;
+class SfxProgress;
+class GDIMetaFile;
+class Bitmap;
+class INetURLObject;
+class IndexBitSet;
+class JobSetup;
+class Size;
+class Point;
+
+// From embobj.hxx
+#define ASPECT_CONTENT 1
+#define ASPECT_THUMBNAIL 2 /* 120 * 120, 6 Farben DIB in MetaFile */
+#define ASPECT_ICON 4
+#define ASPECT_DOCPRINT 8
+#define ASPECT_ALL (ASPECT_CONTENT | ASPECT_THUMBNAIL | ASPECT_ICON | ASPECT_DOCPRINT)
+
+// from pseudo.hxx; must be the same as in OLE2
+#define SVOBJ_MISCSTATUS_SERVERRESIZE 1
+#define SVOBJ_MISCSTATUS_NOTREPLACE 4
+#define SVOBJ_MISCSTATUS_CANTLINKINSIDE 16
+#define SVOBJ_MISCSTATUS_LINK 64
+#define SVOBJ_MISCSTATUS_INSIDEOUT 128
+#define SVOBJ_MISCSTATUS_ACTIVATEWHENVISIBLE 256
+#define SVOBJ_MISCSTATUS_NOTRESIZEABLE 512
+#define SVOBJ_MISCSTATUS_ALWAYSACTIVATE 1024
+#define SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE 2048
+#define SVOBJ_MISCSTATUS_SPECIALOBJECT 4096
+
+
+namespace sfx2
+{
+ class SvLinkSource;
+}
+
+namespace com { namespace sun { namespace star { namespace datatransfer { class XTransferable; } } } }
+
+namespace com { namespace sun { namespace star {
+ namespace document {
+ class XDocumentProperties;
+ }
+} } }
+
+typedef sal_uInt32 SfxObjectShellFlags;
+#define SFXOBJECTSHELL_HASOPENDOC 0x01L
+#define SFXOBJECTSHELL_DONTREPLACE 0x02L
+#define SFXOBJECTSHELL_HASMENU 0x04L
+#define SFXOBJECTSHELL_DONTLOADFILTERS 0x08L
+#define SFXOBJECTSHELL_DONTCLOSE 0x10L
+#define SFXOBJECTSHELL_NODOCINFO 0x20L
+#define SFXOBJECTSHELL_STD_NORMAL ( SFXOBJECTSHELL_HASOPENDOC )
+#define SFXOBJECTSHELL_STD_SPECIAL ( SFXOBJECTSHELL_DONTLOADFILTERS )
+#define SFXOBJECTSHELL_UNDEFINED 0xf000000
+
+//--------------------------------------------------------------------
+
+#define SFX_TITLE_TITLE 0
+#define SFX_TITLE_FILENAME 1
+#define SFX_TITLE_FULLNAME 2
+#define SFX_TITLE_APINAME 3
+#define SFX_TITLE_DETECT 4
+#define SFX_TITLE_CAPTION 5
+#define SFX_TITLE_PICKLIST 6
+#define SFX_TITLE_HISTORY 7
+#define SFX_TITLE_MAXLEN 10 // ab hier sind das L"angenbegrenzungen
+
+#define SFX_LOADED_MAINDOCUMENT 1
+#define SFX_LOADED_IMAGES 2
+#define SFX_LOADED_ALL 3
+
+//--------------------------------------------------------------------
+
+#define SEQUENCE ::com::sun::star::uno::Sequence
+#define OUSTRING ::rtl::OUString
+
+//--------------------------------------------------------------------
+
+#define HIDDENINFORMATION_RECORDEDCHANGES 0x0001
+#define HIDDENINFORMATION_NOTES 0x0002
+#define HIDDENINFORMATION_DOCUMENTVERSIONS 0x0004
+
+enum HiddenWarningFact
+{
+ WhenSaving = 0,
+ WhenPrinting,
+ WhenSigning,
+ WhenCreatingPDF
+};
+
+//--------------------------------------------------------------------
+
+enum SfxObjectCreateMode
+{
+ SFX_CREATE_MODE_EMBEDDED,
+ SFX_CREATE_MODE_STANDARD,
+ SFX_CREATE_MODE_PREVIEW,
+ SFX_CREATE_MODE_ORGANIZER,
+ SFX_CREATE_MODE_PLUGIN,
+ SFX_CREATE_MODE_INTERNAL
+};
+
+/*====================================================================
+
+Die Klasse SfxObjectShell ist die Basisklasse f"ur SFx-Objekte, also
+f"ur Dokumente und Teile von Dokumenten, die als selbst"andige Objekte
+in fremde Objekte integriert werden k"onnen.
+
+----------------------------------------------------------------------*/
+
+enum SfxTitleQuery
+{
+ SFX_TITLE_QUERY_SAVE_NAME_PROPOSAL
+};
+
+
+class SfxToolBoxConfig;
+struct TransferableObjectDescriptor;
+
+class SFX2_DLLPUBLIC SfxObjectShell :
+ public SfxShell, virtual public SotObject,
+ public ::comphelper::IEmbeddedHelper, public ::sfx2::IXmlIdRegistrySupplier
+{
+friend struct ModifyBlocker_Impl;
+
+private:
+ struct SfxObjectShell_Impl* pImp; // interne Daten
+
+ SfxMedium * pMedium; // Beschreibung der Datei bzw. des Storage, in dem sich das Objekt befindet
+ SfxStyleSheetBasePool* pStyleSheetPool; // StyleSheets
+ SfxObjectCreateMode eCreateMode; // Zweck des Objekts
+ sal_Bool bHasName :1, // sal_True := bestehendes Objekt, sal_False := es ist ein neues Objekt
+ bIsTmp :1; // temp. Storage
+
+private:
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE void UpdateTime_Impl(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties> & i_xDocProps);
+
+ SAL_DLLPRIVATE sal_Bool SaveTo_Impl(SfxMedium &rMedium, const SfxItemSet* pSet );
+
+//REMOVE sal_Bool SaveInfoAndConfig_Impl( SvStorageRef pNewStg );
+
+//#endif
+
+protected:
+ SfxObjectShell(SfxObjectCreateMode);
+ SfxObjectShell( const sal_uInt64 i_nCreationFlags ); // see sfxmodelfactory.hxx
+ virtual ~SfxObjectShell();
+
+ virtual void ModifyChanged();
+ virtual sal_Bool Close();
+
+ /** declares the document to have capabilities to contain basic/dialog libraries
+ */
+ void SetHasNoBasic();
+
+ /// template method, called by FlushDocInfo; this implementation is empty
+ virtual void DoFlushDocInfo();
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SFX_INTERFACE_SFXDOCSH)
+
+ static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
+ /* Stampit disable/enable cancel button for print jobs
+ default = true = enable! */
+ void Stamp_SetPrintCancelState(sal_Bool bState);
+ sal_Bool Stamp_GetPrintCancelState() const;
+
+ using SotObject::GetInterface;
+
+ // Document-Shell Iterator
+ static SfxObjectShell* GetFirst( const TypeId* pType = 0,
+ sal_Bool bOnlyVisible = sal_True );
+ static SfxObjectShell* GetNext( const SfxObjectShell& rPrev,
+ const TypeId* pType = 0,
+ sal_Bool bOnlyVisible = sal_True );
+ static SfxObjectShell* Current();
+ static sal_uInt16 Count();
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ GetCurrentComponent();
+ static void SetCurrentComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent );
+
+ virtual void Invalidate(USHORT nId = 0);
+
+ void SetFlags( SfxObjectShellFlags eFlags );
+ SfxObjectShellFlags GetFlags( ) const ;
+
+ SfxModule* GetModule() const;
+
+ virtual SfxObjectFactory& GetFactory() const=0;
+ SfxMedium * GetMedium() const { return pMedium; }
+ void ForgetMedium() { pMedium = 0; }
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties > getDocProperties();
+ void UpdateDocInfoForSave( );
+ void FlushDocInfo();
+ sal_Bool HasName() const { return bHasName; }
+ virtual String GetAPIName() const;
+ void SetHasName( sal_Bool bSet = sal_True ) { bHasName = bSet; }
+ sal_Bool IsReadOnly() const;
+ sal_Bool IsReadOnlyMedium() const;
+ void SetReadOnlyUI( sal_Bool bReadOnly = sal_True );
+ sal_Bool IsReadOnlyUI() const;
+ void SetNoName();
+ sal_Bool IsInModalMode() const;
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ virtual sal_Bool AcceptStateUpdate() const;
+ //-->Added by PengYunQuan for Validity Cell Range Picker
+ sal_Bool HasModalViews() const;
+ sal_Bool IsHelpDocument() const;
+
+ sal_Bool IsDocShared() const;
+ ::rtl::OUString GetSharedFileURL() const;
+ sal_Bool SwitchToShared( sal_Bool bShared, sal_Bool bSave );
+ void DisconnectFromShared();
+ SAL_DLLPRIVATE void FreeSharedFile();
+ SAL_DLLPRIVATE void FreeSharedFile( const ::rtl::OUString& aTempFileURL );
+ SAL_DLLPRIVATE void DoNotCleanShareControlFile();
+
+ void SetSharedXMLFlag( sal_Bool bFlag ) const;
+ sal_Bool HasSharedXMLFlagSet() const;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE void SetModalMode_Impl(sal_Bool bModal=sal_True);
+ SAL_DLLPRIVATE void SetMacroMode_Impl(sal_Bool bModal=sal_True);
+//#endif
+
+ void ResetError();
+ sal_uInt32 GetError() const;
+ sal_uInt32 GetErrorCode() const;
+ void SetError( sal_uInt32 rErr, const ::rtl::OUString& aLogMessage );
+
+ void AddLog( const ::rtl::OUString& aMessage );
+ void StoreLog();
+
+ sal_Bool DoInitNew( SfxMedium* pMedium=0 );
+ sal_Bool DoLoad( SfxMedium* pMedium );
+ sal_Bool DoSave();
+ sal_Bool DoSaveAs( SfxMedium &rNewStor );
+ sal_Bool DoSaveObjectAs( SfxMedium &rNewStor, BOOL bCommit );
+
+ // TODO/LATER: currently only overloaded in Calc, should be made non-virtual
+ virtual sal_Bool DoSaveCompleted( SfxMedium* pNewStor=0 );
+
+ virtual sal_Bool LoadOwnFormat( SfxMedium& pMedium );
+ virtual sal_Bool SaveAsOwnFormat( SfxMedium& pMedium );
+ virtual sal_Bool ConvertFrom( SfxMedium &rMedium );
+ virtual sal_Bool ConvertTo( SfxMedium &rMedium );
+ virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ virtual sal_Bool Load( SfxMedium &rMedium );
+ virtual sal_Bool LoadFrom( SfxMedium& rMedium );
+ virtual sal_Bool Save();
+ virtual sal_Bool SaveAs( SfxMedium &rMedium );
+ virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ virtual sal_Bool SwitchPersistance(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ virtual void UpdateLinks();
+
+ sal_Bool SaveChildren(BOOL bObjectsOnly=FALSE);
+ sal_Bool SaveAsChildren( SfxMedium &rMedium );
+ sal_Bool SwitchChildrenPersistance(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
+ sal_Bool bForceNonModified = sal_False );
+ sal_Bool SaveCompletedChildren( sal_Bool bSuccess );
+
+ sal_Bool InsertFrom( SfxMedium &rMedium );
+ sal_Bool ImportFrom( SfxMedium &rMedium );
+ sal_Bool ExportTo( SfxMedium &rMedium );
+
+ // xmlsec05, check with SFX team
+ sal_uInt16 GetDocumentSignatureState();
+ void SignDocumentContent();
+ sal_uInt16 GetScriptingSignatureState();
+ void SignScriptingContent();
+
+ virtual String QueryTitle( SfxTitleQuery ) const;
+ virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
+ Window *pParent, const SfxItemSet& );
+ sal_Bool IsBasic( const String & rCode, SbxObject * pVCtrl = NULL );
+
+ ErrCode CallBasic( const String& rMacro, const String& rBasicName,
+ SbxObject* pVCtrl, SbxArray* pArgs = 0, SbxValue* pRet = 0 );
+ ErrCode Call( const String & rCode, sal_Bool bIsBasicReturn, SbxObject * pVCtrl = NULL );
+
+ ErrCode CallScript(
+ const String & rScriptType, const String & rCode, const void* pArgs = NULL, void* pRet = NULL );
+
+ /** calls a StarBasic script without magic
+ @param _rMacroName
+ specifies the name of the method to execute
+ @param _rLocation
+ specifies the location of the script to execute. Allowed values are "application" and "document".
+ @param _pArguments
+ This is a pointer to a Sequence< Any >. All elements of the Sequence are wrapped into Basic objects
+ and passed as arguments to the method specified by <arg>_rMacroName</arg>
+ @param _pReturn
+ If not <NULL/>, the Any pointed to by this argument contains the return value of the (synchronous) call
+ to the StarBasic macro
+ */
+ ErrCode CallStarBasicScript(
+ const String& _rMacroName,
+ const String& _rLocation,
+ const void* _pArguments = NULL,
+ void* _pReturn = NULL
+ );
+
+ ErrCode CallXScript(
+ const String& rScriptURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams,
+ ::com::sun::star::uno::Any& aRet,
+ ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam,
+ bool bRaiseError = true
+ );
+
+ static ErrCode CallXScript(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxScriptContext,
+ const ::rtl::OUString& rScriptURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams,
+ ::com::sun::star::uno::Any& aRet,
+ ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam,
+ bool bRaiseError = true
+ );
+
+ /** adjusts the internal macro mode, according to the current security settings
+
+ Finally, the macro mode is either NEVER_EXECUTE or ALWAYS_EXECUTE_NO_WARN.
+
+ @return
+ whether macros from this document should be executed
+ */
+ bool AdjustMacroMode( const String& rScriptType, bool _bSuppressUI = false );
+
+ SvKeyValueIterator* GetHeaderAttributes();
+ void ClearHeaderAttributesForSourceViewHack();
+ void SetHeaderAttributesForSourceViewHack();
+
+ sal_Bool IsTemplate() const;
+ void SetTemplate(sal_Bool bIs);
+
+ sal_Bool IsQueryLoadTemplate() const;
+ sal_Bool IsUseUserData() const;
+ sal_Bool IsLoadReadonly() const;
+ sal_Bool IsSaveVersionOnClose() const;
+ void SetQueryLoadTemplate( sal_Bool b );
+ void SetUseUserData( sal_Bool bNew );
+ void SetLoadReadonly( sal_Bool _bReadonly );
+ void SetSaveVersionOnClose( sal_Bool bSet );
+ void ResetFromTemplate( const String& rTemplateName, const String& rFileName );
+
+ static sal_uInt32 HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc );
+
+ virtual void ViewAssigned();
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
+ virtual sal_Bool IsInformationLost();
+ virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates );
+ sal_Int16 QueryHiddenInformation( HiddenWarningFact eFact, Window* pParent );
+ virtual sal_Bool HasSecurityOptOpenReadOnly() const;
+ sal_Bool IsSecurityOptOpenReadOnly() const;
+ void SetSecurityOptOpenReadOnly( sal_Bool bOpenReadOnly = sal_True );
+
+ virtual Size GetFirstPageSize();
+ virtual sal_Bool DoClose();
+ virtual void PrepareReload();
+ virtual ::boost::shared_ptr<GDIMetaFile> GetPreviewMetaFile( sal_Bool bFullContent = sal_False ) const;
+ virtual void CancelTransfers();
+
+ sal_Bool GenerateAndStoreThumbnail(
+ sal_Bool bEncrypted,
+ sal_Bool bSigned,
+ sal_Bool bIsTemplate,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor );
+
+ sal_Bool WriteThumbnail(
+ sal_Bool bEncrypted,
+ sal_Bool bSigned,
+ sal_Bool bIsTemplate,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream );
+
+ // Transfer IFace
+ void AbortImport();
+ sal_Bool IsAbortingImport() const;
+ void RegisterTransfer( SfxMedium& rMedium );
+ sal_Bool IsReloading() const;
+ void FinishedLoading( sal_uInt16 nWhich = SFX_LOADED_ALL );
+ void TemplateDisconnectionAfterLoad();
+ sal_Bool IsLoading() const;
+ sal_Bool IsLoadingFinished() const;
+ void SetAutoLoad( const INetURLObject&, sal_uInt32 nTime, sal_Bool bReload = sal_True );
+ void LockAutoLoad( sal_Bool bLock );
+ sal_Bool IsAutoLoadLocked() const;
+ void NotifyReloadAvailable();
+ sal_Bool IsSecure();
+
+ // Misc
+ sal_Bool IsPreview() const;
+ SfxObjectCreateMode GetCreateMode() const { return eCreateMode; }
+ virtual void MemoryError();
+ SfxProgress* GetProgress() const;
+ void SetWaitCursor( BOOL bSet ) const;
+
+//(mba) virtual SotObjectRef CreateAggObj( const SotFactory* pFact );
+
+ // Naming Interface
+ void SetTitle( const String& rTitle );
+ String GetTitle( sal_uInt16 nMaxLen = 0 ) const;
+ void InvalidateName(); // Zuruecksetzen auf unbenannt
+
+ // DDE-Interface
+ virtual long DdeExecute( const String& rCmd );
+ virtual long DdeGetData( const String& rItem,
+ const String& rMimeType,
+ ::com::sun::star::uno::Any & rValue );
+ virtual long DdeSetData( const String& rItem,
+ const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+ virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem );
+
+ // Contents
+ virtual SfxStyleSheetBasePool* GetStyleSheetPool();
+ void SetStyleSheetPool( SfxStyleSheetBasePool *pBasePool ) {
+ pStyleSheetPool = pBasePool; }
+
+ //determine the position of the "Automatic" filter in the stylist
+ void SetAutoStyleFilterIndex(sal_uInt16 nSet);
+ sal_uInt16 GetAutoStyleFilterIndex();
+ virtual sal_Bool HasBasic() const;
+ BasicManager* GetBasicManager() const;
+ com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer >
+ GetBasicContainer();
+ com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer >
+ GetDialogContainer();
+ StarBASIC* GetBasic() const;
+
+ // Interface Dok-Inhalte, Organizer
+#define INDEX_IGNORE USHRT_MAX
+
+#define CONTENT_STYLE 0
+#define CONTENT_CONFIG 1
+#define CONTENT_MACRO 2
+#define DEF_CONTENT_COUNT 1
+
+
+ virtual void SetOrganizerSearchMask(
+ SfxStyleSheetBasePool* ) const;
+
+
+ virtual sal_uInt16 GetContentCount(
+ sal_uInt16 nIdx1 = INDEX_IGNORE,
+ sal_uInt16 nIdx2 = INDEX_IGNORE );
+ virtual sal_Bool CanHaveChilds(
+ sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2 = INDEX_IGNORE );
+ virtual void GetContent( String &,
+ Bitmap &rClosedBitmap,
+ Bitmap &rOpenedBitmap,
+ sal_Bool &bCanDelete,
+ sal_uInt16 nPos,
+ sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2 = INDEX_IGNORE );
+
+ virtual void GetContent( String &,
+ Bitmap &rClosedBitmap,
+ Bitmap &rOpenedBitmap,
+ BmpColorMode eColorMode,
+ sal_Bool &bCanDelete,
+ sal_uInt16 nPos,
+ sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2 = INDEX_IGNORE );
+
+ virtual void TriggerHelpPI(
+ sal_uInt16 nIdx1, sal_uInt16 nIdx2, sal_uInt16 nIdx3);
+
+ virtual Bitmap GetStyleFamilyBitmap(SfxStyleFamily eFamily );
+
+ virtual Bitmap GetStyleFamilyBitmap(SfxStyleFamily eFamily, BmpColorMode eColorMode );
+
+ virtual sal_Bool Insert( SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1,
+ sal_uInt16 nSourceIdx2,
+ sal_uInt16 nSourceIdx3,
+ sal_uInt16 &nIdx1,
+ sal_uInt16 &nIdx2,
+ sal_uInt16 &nIdx3,
+ sal_uInt16 &rIdxDeleted);
+
+ virtual sal_Bool Remove( sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2 = INDEX_IGNORE,
+ sal_uInt16 nIdx3 = INDEX_IGNORE);
+
+ sal_Bool Print( Printer &rPrt,
+ sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2 = INDEX_IGNORE,
+ sal_uInt16 nIdx3 = INDEX_IGNORE,
+ const String *pObjectName = 0 );
+
+ virtual void LoadStyles( SfxObjectShell &rSource );
+ void ReadNote( INote * );
+ void UpdateNote( INote * );
+
+ // F"ur Docs, die zum Formatieren die Viewgr"o\se
+ // ben"otigen
+ virtual SfxObjectShell* GetObjectShell();
+ //void SetBaseURL( const String& rURL );
+ //const String& GetBaseURL() const;
+ //const String& GetBaseURLForSaving() const;
+ //void SetEmptyBaseURL();
+
+ virtual SfxFrame* GetSmartSelf( SfxFrame* pSelf, SfxMedium& rMedium );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel() const;
+ // Nur uebergangsweise fuer die Applikationen !!!
+ void SetBaseModel( SfxBaseModel* pModel );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetBaseModel() const;
+ // Nur uebergangsweise fuer die Applikationen !!!
+
+ virtual SEQUENCE< OUSTRING > GetEventNames();
+
+ Window* GetDialogParent( SfxMedium* pMedium=0 );
+ String UpdateTitle( SfxMedium* pMed=NULL, USHORT nDocViewNo=0 );
+ static SfxObjectShell* CreateObject( const String& rServiceName, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD );
+ static SfxObjectShell* CreateObjectByFactoryName( const String& rURL, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD );
+ static SfxObjectShell* CreateAndLoadObject( const SfxItemSet& rSet, SfxFrame* pFrame=0 );
+ static String GetServiceNameFromFactory( const String& rFact );
+ BOOL IsInPlaceActive();
+ BOOL IsUIActive();
+ virtual void InPlaceActivate( BOOL );
+ virtual void UIActivate( BOOL );
+
+ static sal_Bool CopyStoragesOfUnknownMediaType(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xSource,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xTarget );
+
+ // ==== The functions from SvPersist
+ void EnableSetModified( sal_Bool bEnable = sal_True );
+ sal_Bool IsEnableSetModified() const;
+ virtual void SetModified( sal_Bool bModified = sal_True );
+ sal_Bool IsModified();
+
+ void SetupStorage(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
+ sal_Int32 nVersion,
+ sal_Bool bTemplate ) const;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetStorage();
+
+//REMOVE void SetFileName( const ::rtl::OUString& );
+ SvGlobalName GetClassName() const;
+
+ // comphelper::IEmbeddedHelper
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > getInteractionHandler() const;
+ virtual com::sun::star::uno::Reference < com::sun::star::embed::XStorage > getStorage() const
+ {
+ return const_cast<SfxObjectShell*>(this)->GetStorage();
+ }
+ virtual comphelper::EmbeddedObjectContainer& getEmbeddedObjectContainer() const
+ {
+ return GetEmbeddedObjectContainer();
+ }
+ bool isEnableSetModified() const
+ {
+ return IsEnableSetModified();
+ }
+ comphelper::EmbeddedObjectContainer& GetEmbeddedObjectContainer() const;
+ void ClearEmbeddedObjects();
+
+ // ==== The functions from SvEmbeddedObject
+ virtual Printer * GetDocumentPrinter();
+ virtual OutputDevice* GetDocumentRefDev();
+ virtual void OnDocumentPrinterChanged( Printer * pNewPrinter );
+ virtual Rectangle GetVisArea( USHORT nAspect ) const;
+ virtual void SetVisArea( const Rectangle & rVisArea );
+ const Rectangle & GetVisArea() const;
+ void SetVisAreaSize( const Size & rVisSize );
+ virtual ULONG GetMiscStatus() const;
+
+ MapUnit GetMapUnit() const;
+ void SetMapUnit( MapUnit nMUnit );
+
+ void FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc ) const;
+ void DoDraw( OutputDevice *, const Point & rObjPos,
+ const Size & rSize,
+ const JobSetup & rSetup,
+ USHORT nAspect = ASPECT_CONTENT );
+ virtual void Draw( OutputDevice *, const JobSetup & rSetup,
+ USHORT nAspect = ASPECT_CONTENT ) = 0;
+
+
+ virtual void FillClass( SvGlobalName * pClassName,
+ sal_uInt32 * pFormat,
+ String * pAppName,
+ String * pFullTypeName,
+ String * pShortTypeName,
+ sal_Int32 nVersion,
+ sal_Bool bTemplate = sal_False) const = 0;
+
+ // =================================
+
+//#if 0 // _SOLAR__PRIVATE
+
+ SAL_DLLPRIVATE ::boost::shared_ptr<GDIMetaFile> CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHighContrast ) const;
+
+ SAL_DLLPRIVATE sal_Bool IsOwnStorageFormat_Impl(const SfxMedium &) const;
+
+ SAL_DLLPRIVATE sal_Bool IsPackageStorageFormat_Impl(const SfxMedium &) const;
+
+ SAL_DLLPRIVATE sal_Bool ConnectTmpStorage_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, SfxMedium* pMedium );
+ SAL_DLLPRIVATE sal_Bool DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& rTargetMedium );
+
+ SAL_DLLPRIVATE sal_Bool PutURLContentsToVersionStream_Impl(
+ ::rtl::OUString aURL,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDocStorage,
+ ::rtl::OUString aStreamName );
+
+ SAL_DLLPRIVATE ::rtl::OUString CreateTempCopyOfStorage_Impl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+
+ SAL_DLLPRIVATE void InitOwnModel_Impl();
+ SAL_DLLPRIVATE void BreakMacroSign_Impl( sal_Bool bBreakMacroSing );
+ SAL_DLLPRIVATE void CheckSecurityOnLoading_Impl();
+ SAL_DLLPRIVATE void CheckForBrokenDocSignatures_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler );
+ SAL_DLLPRIVATE sal_uInt16 ImplCheckSignaturesInformation(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation >& aInfos );
+ SAL_DLLPRIVATE void CheckEncryption_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler );
+
+ SAL_DLLPRIVATE void InitBasicManager_Impl();
+ SAL_DLLPRIVATE SfxObjectShell_Impl* Get_Impl() { return pImp; }
+
+ SAL_DLLPRIVATE static sal_Bool UseInteractionToHandleError(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler,
+ sal_uInt32 nError );
+ SAL_DLLPRIVATE const SfxObjectShell_Impl* Get_Impl() const { return pImp; }
+
+ SAL_DLLPRIVATE void SetCreateMode_Impl( SfxObjectCreateMode nMode );
+
+ SAL_DLLPRIVATE void DoDraw_Impl( OutputDevice* pDev,
+ const Point & rViewPos,
+ const Fraction & rScaleX,
+ const Fraction & rScaleY,
+ const JobSetup & rSetup,
+ USHORT nAspect );
+
+ // Shell Interface
+ SAL_DLLPRIVATE void ExecFile_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void GetState_Impl(SfxItemSet&);
+ SAL_DLLPRIVATE void PrintExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void PrintState_Impl(SfxItemSet&);
+ SAL_DLLPRIVATE void ExecProps_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void StateProps_Impl(SfxItemSet &);
+ SAL_DLLPRIVATE void ExecView_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void StateView_Impl(SfxItemSet &);
+
+ // Laden-speichern public internals
+ SAL_DLLPRIVATE sal_Bool ImportFromGeneratedStream_Impl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr );
+ SAL_DLLPRIVATE void PositionView_Impl();
+ SAL_DLLPRIVATE void UpdateFromTemplate_Impl();
+ SAL_DLLPRIVATE sal_Bool CanReload_Impl();
+ SAL_DLLPRIVATE void SetNamedVisibility_Impl();
+ SAL_DLLPRIVATE sal_Bool DoSave_Impl( const SfxItemSet* pSet=0 );
+ SAL_DLLPRIVATE sal_Bool Save_Impl( const SfxItemSet* pSet=0 );
+ SAL_DLLPRIVATE sal_Bool PreDoSaveAs_Impl(const String &rFileName, const String &rFiltName, SfxItemSet *);
+ SAL_DLLPRIVATE sal_Bool APISaveAs_Impl ( const String& aFileName, SfxItemSet* aParams );
+ SAL_DLLPRIVATE sal_Bool CommonSaveAs_Impl ( const INetURLObject& aURL, const String& aFilterName, SfxItemSet* aParams );
+ SAL_DLLPRIVATE sal_Bool GeneralInit_Impl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
+ sal_Bool bTypeMustBeSetAlready );
+ SAL_DLLPRIVATE void PrepareSecondTryLoad_Impl();
+ SAL_DLLPRIVATE void SetInitialized_Impl( const bool i_fromInitNew );
+
+ // public-internals
+ SAL_DLLPRIVATE IndexBitSet& GetNoSet_Impl();
+ SAL_DLLPRIVATE void SetProgress_Impl( SfxProgress *pProgress );
+ SAL_DLLPRIVATE void PostActivateEvent_Impl( SfxViewFrame* );
+ SAL_DLLPRIVATE void SetActivateEvent_Impl(sal_uInt16 );
+ SAL_DLLPRIVATE SfxObjectShell* GetParentShellByModel_Impl();
+
+ // configuration items
+ SAL_DLLPRIVATE SfxEventConfigItem_Impl* GetEventConfig_Impl( sal_Bool bForce=sal_False );
+ SAL_DLLPRIVATE SfxToolBoxConfig* GetToolBoxConfig_Impl();
+ SAL_DLLPRIVATE sal_uInt16 ImplGetSignatureState( sal_Bool bScriptingContent = FALSE );
+
+ SAL_DLLPRIVATE ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation >
+ ImplAnalyzeSignature(
+ sal_Bool bScriptingContent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >& xSigner
+ = ::com::sun::star::uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >() );
+
+ SAL_DLLPRIVATE void ImplSign( sal_Bool bScriptingContent = FALSE );
+ SAL_DLLPRIVATE sal_Bool QuerySaveSizeExceededModules_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler );
+//#endif
+};
+
+#define SFX_GLOBAL_CLASSID \
+ 0x9eaba5c3, 0xb232, 0x4309, \
+ 0x84, 0x5f, 0x5f, 0x15, 0xea, 0x50, 0xd0, 0x74
+
+//#if 0 // _SOLAR__PRIVATE
+
+ struct ModifyBlocker_Impl
+ {
+ SfxObjectShell* pPersist;
+ sal_Bool bWasEnabled;
+ ModifyBlocker_Impl( SfxObjectShell* pPersistP ) : pPersist( pPersistP )
+ {
+ bWasEnabled = pPersistP->IsEnableSetModified();
+ if ( bWasEnabled )
+ pPersistP->EnableSetModified( sal_False );
+ }
+ ~ModifyBlocker_Impl()
+ {
+ if ( bWasEnabled )
+ pPersist->EnableSetModified( bWasEnabled );
+ }
+ };
+//#endif
+
+//--------------------------------------------------------------------
+
+#ifndef SFX_DECL_OBJECTSHELL_DEFINED
+#define SFX_DECL_OBJECTSHELL_DEFINED
+SV_DECL_REF(SfxObjectShell)
+#endif
+SV_DECL_LOCK(SfxObjectShell)
+SV_IMPL_LOCK(SfxObjectShell)
+SV_IMPL_REF(SfxObjectShell)
+
+SfxObjectShellRef MakeObjectShellForOrganizer_Impl( const String& rName, BOOL bWriting );
+
+//#if 0 // _SOLAR__PRIVATE
+//--------------------------------------------------------------------
+class AutoReloadTimer_Impl : public Timer
+{
+ String aUrl;
+ sal_Bool bReload;
+ SfxObjectShell* pObjSh;
+
+public:
+ AutoReloadTimer_Impl( const String& rURL, sal_uInt32 nTime, sal_Bool bReloadP,
+ SfxObjectShell* pSh );
+ virtual void Timeout();
+};
+//#endif
+
+//-------------------------------------------------------------------------
+
+class SFX2_DLLPUBLIC SfxObjectShellItem: public SfxPoolItem
+{
+ SfxObjectShell* pObjSh;
+
+public:
+ TYPEINFO();
+ SfxObjectShellItem() :
+ SfxPoolItem( 0 ),
+ pObjSh( 0 )
+ {}
+ SfxObjectShellItem( SfxObjectShell *pObjShell ):
+ SfxPoolItem( 0 ),
+ pObjSh( pObjShell )
+ {}
+ SfxObjectShellItem( sal_uInt16 nWhichId,
+ SfxObjectShell *pObjShell ):
+ SfxPoolItem( nWhichId ),
+ pObjSh( pObjShell )
+ {}
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual String GetValueText() const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ SfxObjectShell* GetObjectShell() const
+ { return pObjSh; }
+
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/objuno.hxx b/sfx2/inc/sfx2/objuno.hxx
new file mode 100644
index 000000000000..0a0dea610ac5
--- /dev/null
+++ b/sfx2/inc/sfx2/objuno.hxx
@@ -0,0 +1,192 @@
+/*************************************************************************
+ *
+ * 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_OBJUNO_HXX
+#define _SFX_OBJUNO_HXX
+
+#include <com/sun/star/document/XDocumentInfo.hpp>
+#include <com/sun/star/document/XStandaloneDocumentInfo.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+
+#include <com/sun/star/io/IOException.hpp>
+
+#include <svl/itemprop.hxx>
+#include <cppuhelper/implbase10.hxx>
+
+#include "sfxuno.hxx"
+
+
+// this is now just a wrapper around a XDocumentProperties instance
+
+class SAL_DLLPRIVATE SfxDocumentInfoObject: public ::cppu::WeakImplHelper10<
+ ::com::sun::star::document::XDocumentInfo,
+ ::com::sun::star::lang::XComponent,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XFastPropertySet,
+ ::com::sun::star::beans::XPropertyAccess,
+ ::com::sun::star::beans::XPropertyContainer,
+ ::com::sun::star::document::XDocumentPropertiesSupplier,
+ ::com::sun::star::util::XModifyBroadcaster,
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::util::XCloneable>
+{
+protected:
+ struct SfxDocumentInfoObject_Impl* _pImp;
+
+public:
+ SfxDocumentInfoObject();
+ ~SfxDocumentInfoObject();
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ // 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,
+ ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName) throw(
+ ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException);
+ 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,
+ ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException);
+ 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,
+ ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException);
+ 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,
+ ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException);
+ 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,
+ ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException);
+
+ // ::com::sun::star::beans::XFastPropertySet
+ virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle, const ::com::sun::star::uno::Any& aValue) throw(
+ ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw(
+ ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException);
+
+ // ::com::sun::star::beans::XPropertyAccess
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::beans::XPropertyContainer
+ virtual void SAL_CALL addProperty( const ::rtl::OUString& Name, ::sal_Int16 Attributes, const ::com::sun::star::uno::Any& DefaultValue ) throw (::com::sun::star::beans::PropertyExistException, ::com::sun::star::beans::IllegalTypeException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeProperty( const ::rtl::OUString& Name ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::NotRemoveableException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::document::XDocumentInfo
+ virtual sal_Int16 SAL_CALL getUserFieldCount() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getUserFieldName(sal_Int16 nIndex) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getUserFieldValue(sal_Int16 nIndex) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setUserFieldName(sal_Int16 nIndex, const ::rtl::OUString& aName ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setUserFieldValue(sal_Int16 nIndex, const ::rtl::OUString& aValue ) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::document::XDocumentPropertiesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties >
+ SAL_CALL getDocumentProperties()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::util::XModifiable
+ virtual sal_Bool SAL_CALL isModified() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setModified( sal_Bool bModified ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::util::XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener( const com::sun::star::uno::Reference< com::sun::star::util::XModifyListener >& xListener ) throw( ::com::sun::star::uno::RuntimeException ) ;
+ virtual void SAL_CALL removeModifyListener( const com::sun::star::uno::Reference< com::sun::star::util::XModifyListener > & xListener) throw( ::com::sun::star::uno::RuntimeException ) ;
+
+ // ::com::sun::star::lang::XInitialization:
+ virtual void SAL_CALL initialize(
+ const com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > & aArguments)
+ throw (com::sun::star::uno::RuntimeException,
+ com::sun::star::uno::Exception);
+
+ // ::com::sun::star::util::XCloneable:
+ virtual com::sun::star::uno::Reference<com::sun::star::util::XCloneable> SAL_CALL createClone()
+ throw (com::sun::star::uno::RuntimeException);
+
+ const SfxDocumentInfoObject& operator=( const SfxDocumentInfoObject & rOther);
+};
+
+class SfxStandaloneDocumentInfoObject: public SfxDocumentInfoObject,
+ public ::com::sun::star::lang::XServiceInfo,
+ public ::com::sun::star::document::XStandaloneDocumentInfo
+{
+ ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > _xFactory;
+
+public:
+ SfxStandaloneDocumentInfoObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+ virtual ~SfxStandaloneDocumentInfoObject();
+
+ void Clear();
+
+ // XInterface, XTypeProvider, XServiceInfo
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER_XSERVICEINFO
+
+ // ::com::sun::star::document::XDocumentInfo
+ virtual sal_Int16 SAL_CALL getUserFieldCount() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getUserFieldName(sal_Int16 nIndex) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getUserFieldValue(sal_Int16 nIndex) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setUserFieldName(sal_Int16 nIndex, const ::rtl::OUString& aName ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setUserFieldValue(sal_Int16 nIndex, const ::rtl::OUString& aValue ) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::document::XStandaloneDocumentInfo
+ virtual void SAL_CALL loadFromURL(const ::rtl::OUString& aURL) throw( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL storeIntoURL(const ::rtl::OUString& aURL) throw( ::com::sun::star::io::IOException );
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/opengrf.hxx b/sfx2/inc/sfx2/opengrf.hxx
new file mode 100644
index 000000000000..0d11462685d5
--- /dev/null
+++ b/sfx2/inc/sfx2/opengrf.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * 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 _SFX2_OPENGRF_HXX
+#define _SFX2_OPENGRF_HXX
+
+#include <memory> // auto_ptr
+#include <svtools/filter.hxx>
+#include <sfx2/dllapi.h>
+
+struct SvxOpenGrf_Impl;
+
+class SFX2_DLLPUBLIC SvxOpenGraphicDialog
+{
+public:
+ SvxOpenGraphicDialog ( const String& rTitle );
+ ~SvxOpenGraphicDialog ();
+
+ short Execute();
+
+ void SetPath( const String& rPath );
+ void SetPath( const String& rPath, sal_Bool bLinkState );
+ String GetPath() const;
+
+ int GetGraphic(Graphic&) const;
+
+ void EnableLink(sal_Bool);
+ void AsLink(sal_Bool);
+ sal_Bool IsAsLink() const;
+
+ String GetCurrentFilter() const;
+ void SetCurrentFilter(const String&);
+
+ /// Set dialog help id at FileDlgHelper
+ void SetControlHelpIds( const INT16* _pControlId, const INT32* _pHelpId );
+ /// Set control help ids at FileDlgHelper
+ void SetDialogHelpId( const INT32 _nHelpId );
+private:
+ // disable copy and assignment
+ SFX2_DLLPRIVATE SvxOpenGraphicDialog (const SvxOpenGraphicDialog&);
+ SFX2_DLLPRIVATE SvxOpenGraphicDialog& operator = ( const SvxOpenGraphicDialog & );
+
+ const std::auto_ptr< SvxOpenGrf_Impl > mpImpl;
+};
+
+#endif // _SVX_OPENGRF_HXX
+
diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx
new file mode 100644
index 000000000000..4f4a04834257
--- /dev/null
+++ b/sfx2/inc/sfx2/passwd.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * 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_PASSWD_HXX
+#define _SFX_PASSWD_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/dialog.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+
+// defines ---------------------------------------------------------------
+
+#define SHOWEXTRAS_NONE ((USHORT)0x0000)
+#define SHOWEXTRAS_USER ((USHORT)0x0001)
+#define SHOWEXTRAS_CONFIRM ((USHORT)0x0002)
+#define SHOWEXTRAS_ALL ((USHORT)(SHOWEXTRAS_USER | SHOWEXTRAS_CONFIRM))
+
+// class SfxPasswordDialog -----------------------------------------------
+
+class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog
+{
+private:
+ FixedText maUserFT;
+ Edit maUserED;
+ FixedText maPasswordFT;
+ Edit maPasswordED;
+ FixedText maConfirmFT;
+ Edit maConfirmED;
+ FixedLine maPasswordBox;
+
+ OKButton maOKBtn;
+ CancelButton maCancelBtn;
+ HelpButton maHelpBtn;
+
+ String maConfirmStr;
+ USHORT mnMinLen;
+ USHORT mnExtras;
+
+ bool mbAsciiOnly;
+ DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* );
+ DECL_DLLPRIVATE_LINK( OKHdl, OKButton* );
+
+public:
+ SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL );
+
+ String GetUser() const { return maUserED.GetText(); }
+ String GetPassword() const { return maPasswordED.GetText(); }
+ String GetConfirm() const { return maConfirmED.GetText(); }
+
+ void SetMinLen( USHORT Len );
+ void SetMaxLen( USHORT Len );
+ void SetEditHelpId( ULONG nId ) { maPasswordED.SetHelpId( nId ); }
+ void ShowExtras( USHORT nExtras ) { mnExtras = nExtras; }
+ void AllowAsciiOnly( bool i_bAsciiOnly = true ) { mbAsciiOnly = i_bAsciiOnly; }
+
+ virtual short Execute();
+};
+
+#endif // #ifndef _SFX_PASSWD_HXX
+
diff --git a/sfx2/inc/sfx2/printer.hxx b/sfx2/inc/sfx2/printer.hxx
new file mode 100644
index 000000000000..a96033835a84
--- /dev/null
+++ b/sfx2/inc/sfx2/printer.hxx
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * 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_PRINTER_HXX
+#define _SFX_PRINTER_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#ifndef _PRINT_HXX //autogen
+#include <vcl/print.hxx>
+#endif
+
+class SfxFont;
+class SfxTabPage;
+class SfxItemSet;
+
+struct SfxPrinter_Impl;
+
+#define SFX_RANGE_NOTSET ((USHORT)0xFFFF)
+
+// class SfxFontSizeInfo -------------------------------------------------
+
+class SfxFontSizeInfo
+{
+private:
+ static USHORT pStaticSizes[];
+ Size* pSizes;
+ USHORT nSizes;
+ BOOL bScalable;
+
+public:
+ SfxFontSizeInfo( const SfxFont& rFont, const OutputDevice& rDevice );
+ ~SfxFontSizeInfo();
+
+ BOOL HasSize(const Size &rSize) const;
+ BOOL IsScalable() const { return bScalable; }
+
+ USHORT SizeCount() const { return nSizes; }
+ const Size& GetSize( USHORT nNo ) const
+ { return pSizes[nNo]; }
+};
+
+// class SfxFont ---------------------------------------------------------
+
+class SFX2_DLLPUBLIC SfxFont
+{
+private:
+ String aName;
+ FontFamily eFamily;
+ FontPitch ePitch;
+ CharSet eCharSet;
+
+ SfxFont& operator=(const SfxFont& rFont); // not implemented
+
+public:
+ SfxFont( const FontFamily eFam,
+ const String& aName,
+ const FontPitch eFontPitch = PITCH_DONTKNOW,
+ const CharSet eFontCharSet = RTL_TEXTENCODING_DONTKNOW );
+ // ZugriffsMethoden:
+ inline const String& GetName() const { return aName; }
+ inline FontFamily GetFamily() const { return eFamily; }
+ inline FontPitch GetPitch() const { return ePitch; }
+ inline CharSet GetCharSet() const { return eCharSet; }
+};
+
+// class SfxPrinter ------------------------------------------------------
+
+class SFX2_DLLPUBLIC SfxPrinter : public Printer
+{
+private:
+ JobSetup aOrigJobSetup;
+ SfxItemSet* pOptions;
+ SfxPrinter_Impl* pImpl;
+ BOOL bKnown;
+
+ SAL_DLLPRIVATE void operator =(SfxPrinter &); // not defined
+
+ SAL_DLLPRIVATE void UpdateFonts_Impl();
+
+public:
+ SfxPrinter( SfxItemSet *pTheOptions );
+ SfxPrinter( SfxItemSet *pTheOptions,
+ const String &rPrinterName );
+ SfxPrinter( SfxItemSet *pTheOptions,
+ const JobSetup &rTheOrigJobSetup );
+ SfxPrinter( SfxItemSet *pTheOptions,
+ const String &rPrinterName,
+ const JobSetup &rTheOrigJobSetup );
+ SfxPrinter( const SfxPrinter &rPrinter );
+ ~SfxPrinter();
+
+ SfxPrinter* Clone() const;
+
+ static SfxPrinter* Create( SvStream &rStream, SfxItemSet *pOptions );
+ SvStream& Store( SvStream &rStream ) const;
+
+ const JobSetup& GetOrigJobSetup() const { return aOrigJobSetup; }
+ void SetOrigJobSetup( const JobSetup &rNewJobSetup );
+
+ const SfxItemSet& GetOptions() const { return *pOptions; }
+ void SetOptions( const SfxItemSet &rNewOptions );
+
+ void EnableRange( USHORT nRange );
+ void DisableRange( USHORT nRange );
+ BOOL IsRangeEnabled( USHORT nRange ) const;
+
+ BOOL IsKnown() const { return bKnown; }
+ BOOL IsOriginal() const { return bKnown; }
+
+ using OutputDevice::GetFont;
+ USHORT GetFontCount();
+ const SfxFont* GetFont( USHORT nNo ) const;
+ const SfxFont* GetFontByName( const String &rFontName );
+
+ BOOL InitJob( Window* pUIParent, BOOL bAskAboutTransparentObjects );
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/printopt.hxx b/sfx2/inc/sfx2/printopt.hxx
new file mode 100644
index 000000000000..622d69738a59
--- /dev/null
+++ b/sfx2/inc/sfx2/printopt.hxx
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * 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_PRINTOPT_HXX
+#define _SFX_PRINTOPT_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#ifndef _SV_BUTTON_HXX //autogen wg. FixedText
+#include <vcl/button.hxx>
+#endif
+#include <vcl/lstbox.hxx>
+#include <vcl/print.hxx>
+
+#include <sfx2/tabdlg.hxx>
+
+// --------------------------------
+// - SfxCommonPrintOptionsTabPage -
+// --------------------------------
+
+class SvtBasePrintOptions;
+
+class SFX2_DLLPUBLIC SfxCommonPrintOptionsTabPage : public SfxTabPage
+{
+private:
+
+ FixedLine aReduceGB;
+
+ FixedText aOutputTypeFT;
+ RadioButton aPrinterOutputRB;
+ RadioButton aPrintFileOutputRB;
+
+ FixedLine aOutputGB;
+
+ CheckBox aReduceTransparencyCB;
+ RadioButton aReduceTransparencyAutoRB;
+ RadioButton aReduceTransparencyNoneRB;
+
+ CheckBox aReduceGradientsCB;
+ RadioButton aReduceGradientsStripesRB;
+ RadioButton aReduceGradientsColorRB;
+ NumericField aReduceGradientsStepCountNF;
+
+ CheckBox aReduceBitmapsCB;
+ RadioButton aReduceBitmapsOptimalRB;
+ RadioButton aReduceBitmapsNormalRB;
+ RadioButton aReduceBitmapsResolutionRB;
+ ListBox aReduceBitmapsResolutionLB;
+ CheckBox aReduceBitmapsTransparencyCB;
+
+ CheckBox aConvertToGreyscalesCB;
+
+ FixedLine aWarnGB;
+
+ CheckBox aPaperSizeCB;
+ CheckBox aPaperOrientationCB;
+ CheckBox aTransparencyCB;
+
+private:
+
+ PrinterOptions maPrinterOptions;
+ PrinterOptions maPrintFileOptions;
+
+ DECL_DLLPRIVATE_LINK( ToggleOutputPrinterRBHdl, RadioButton* pButton );
+ DECL_DLLPRIVATE_LINK( ToggleOutputPrintFileRBHdl, RadioButton* pButton );
+
+ DECL_DLLPRIVATE_LINK( ClickReduceTransparencyCBHdl, CheckBox* pBox );
+ DECL_DLLPRIVATE_LINK( ClickReduceGradientsCBHdl, CheckBox* pBox );
+ DECL_DLLPRIVATE_LINK( ClickReduceBitmapsCBHdl, CheckBox* pBox );
+
+ DECL_DLLPRIVATE_LINK( ToggleReduceGradientsStripesRBHdl, RadioButton* pButton );
+ DECL_DLLPRIVATE_LINK( ToggleReduceBitmapsResolutionRBHdl, RadioButton* pButton );
+
+ SAL_DLLPRIVATE void ImplUpdateControls( const PrinterOptions* pCurrentOptions );
+ SAL_DLLPRIVATE void ImplSaveControls( PrinterOptions* pCurrentOptions );
+
+ // --> OD 2008-06-25 #i63982#
+ SAL_DLLPRIVATE void ImplSetAccessibleNames();
+ // <--
+
+protected:
+
+ using TabPage::DeactivatePage;
+ virtual int DeactivatePage( SfxItemSet* pSet = NULL );
+
+public:
+
+ SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
+ ~SfxCommonPrintOptionsTabPage();
+
+ virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+ virtual Window* GetParentLabeledBy( const Window* pLabel ) const;
+ virtual Window* GetParentLabelFor( const Window* pLabel ) const;
+
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+};
+
+// -------------------------------
+// - TransparencyPrintWarningBox -
+// -------------------------------
+
+class TransparencyPrintWarningBox : public ModalDialog
+{
+private:
+
+ FixedImage aWarnFI;
+ FixedText aWarnFT;
+ OKButton aYesBtn;
+ PushButton aNoBtn;
+ CancelButton aCancelBtn;
+ CheckBox aNoWarnCB;
+
+ DECL_LINK( ClickNoBtn, PushButton* );
+
+public:
+
+ TransparencyPrintWarningBox( Window* pParent );
+ ~TransparencyPrintWarningBox();
+
+ BOOL IsNoWarningChecked() const { return aNoWarnCB.IsChecked(); }
+};
+
+#endif // #ifndef _SFX_PRINTOPT_HXX
+
diff --git a/sfx2/inc/sfx2/prnmon.hxx b/sfx2/inc/sfx2/prnmon.hxx
new file mode 100644
index 000000000000..f35064418ec3
--- /dev/null
+++ b/sfx2/inc/sfx2/prnmon.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * 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_PRNMON_HXX
+#define _SFX_PRNMON_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <sfx2/printer.hxx>
+//#include <sfx2/progress.hxx>
+
+class SfxViewShell;
+//class SfxProgress;
+struct SfxPrintProgress_Impl;
+
+// ------------------------------------------------------------------------
+
+#define PAGE_MAX 9999 //max. Anzahl der Seiten die gedruckt werden
+
+//--------------------------------------------------------------------
+/*
+class SFX2_DLLPUBLIC SfxPrintProgress: public SfxProgress
+{
+ SfxPrintProgress_Impl* pImp;
+
+private:
+//#if 0 // _SOLAR__PRIVATE
+ DECL_DLLPRIVATE_LINK( PrintErrorNotify, void * );
+ DECL_DLLPRIVATE_LINK( StartPrintNotify, void * );
+ DECL_DLLPRIVATE_LINK( EndPrintNotify, void * );
+//#endif
+public:
+ SfxPrintProgress( SfxViewShell* pViewSh,
+ FASTBOOL bShow = TRUE );
+ virtual ~SfxPrintProgress();
+
+ virtual void SetText( const String &rText );
+ BOOL SetStateText( ULONG nVal, const String &rVal, ULONG nNewRange = 0 );
+ virtual BOOL SetState( ULONG nVal, ULONG nNewRange = 0 );
+
+ void RestoreOnEndPrint( SfxPrinter *pOldPrinter );
+ void RestoreOnEndPrint( SfxPrinter *pOldPrinter,
+ BOOL bOldEnablePrintFile );
+ void DeleteOnEndPrint();
+ void SetCancelHdl( const Link& aCancelHdl );
+ BOOL IsAborted() const;
+};
+*/
+// ------------------------------------------------------------------------
+
+struct SfxPrintOptDlg_Impl;
+class SfxPrintOptionsDialog : public ModalDialog
+{
+private:
+ OKButton aOkBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
+ SfxPrintOptDlg_Impl* pDlgImpl;
+ SfxViewShell* pViewSh;
+ SfxItemSet* pOptions;
+ SfxTabPage* pPage;
+
+public:
+ SfxPrintOptionsDialog( Window *pParent,
+ SfxViewShell *pViewShell,
+ const SfxItemSet *rOptions );
+ virtual ~SfxPrintOptionsDialog();
+
+ BOOL Construct();
+ virtual short Execute();
+ virtual long Notify( NotifyEvent& rNEvt );
+
+ SfxTabPage* GetTabPage() const { return pPage; }
+ const SfxItemSet& GetOptions() const { return *pOptions; }
+ void DisableHelp();
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/progress.hxx b/sfx2/inc/sfx2/progress.hxx
new file mode 100644
index 000000000000..7019ebf7785e
--- /dev/null
+++ b/sfx2/inc/sfx2/progress.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_PROGRESS_HXX
+#define _SFX_PROGRESS_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <tools/solar.h>
+#include <tools/link.hxx>
+
+class String;
+class SfxObjectShell;
+class SfxStatusBarManager;
+class INetHint;
+class SvDispatch;
+struct SfxProgress_Impl;
+struct PlugInLoadStatus;
+struct SvProgressArg;
+
+//=======================================================================
+
+class SFX2_DLLPUBLIC SfxProgress
+{
+ SfxProgress_Impl* pImp;
+ ULONG nVal;
+ BOOL bSuspended;
+
+public:
+ SfxProgress( SfxObjectShell* pObjSh,
+ const String& rText,
+ ULONG nRange, BOOL bAllDocs = FALSE,
+ BOOL bWait = TRUE );
+ virtual ~SfxProgress();
+
+ virtual void SetText( const String& rText );
+ BOOL SetStateText( ULONG nVal, const String &rVal, ULONG nNewRange = 0 );
+ virtual BOOL SetState( ULONG nVal, ULONG nNewRange = 0 );
+ ULONG GetState() const { return nVal; }
+
+ void Resume();
+ void Suspend();
+ BOOL IsSuspended() const { return bSuspended; }
+
+ void Lock();
+ void UnLock();
+ void Reschedule();
+
+ void Stop();
+
+ void SetWaitMode( BOOL bWait );
+ BOOL GetWaitMode() const;
+
+ static SfxProgress* GetActiveProgress( SfxObjectShell *pDocSh = 0 );
+ static void EnterLock();
+ static void LeaveLock();
+
+//#if 0 // _SOLAR__PRIVATE
+ DECL_DLLPRIVATE_STATIC_LINK( SfxProgress, SetStateHdl, PlugInLoadStatus* );
+ DECL_DLLPRIVATE_STATIC_LINK( SfxProgress, DefaultBindingProgress, SvProgressArg* );
+ SAL_DLLPRIVATE FASTBOOL StatusBarManagerGone_Impl(SfxStatusBarManager*pStb);
+ SAL_DLLPRIVATE const String& GetStateText_Impl() const;
+//#endif
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/querystatus.hxx b/sfx2/inc/sfx2/querystatus.hxx
new file mode 100644
index 000000000000..bf9f2c638361
--- /dev/null
+++ b/sfx2/inc/sfx2/querystatus.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFXQUERYSTATUS_HXX
+#define _SFXQUERYSTATUS_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <svl/poolitem.hxx>
+#include <cppuhelper/weak.hxx>
+#include <osl/conditn.hxx>
+#include <com/sun/star/frame/FeatureStateEvent.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
+
+#include <sfx2/sfxuno.hxx>
+
+class SfxQueryStatus_Impl;
+class SFX2_DLLPUBLIC SfxQueryStatus
+{
+ public:
+ SfxQueryStatus( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const rtl::OUString& aCommand );
+ ~SfxQueryStatus();
+
+ // Query method
+ SfxItemState QueryState( SfxPoolItem*& pPoolItem );
+
+ private:
+ SfxQueryStatus( const SfxQueryStatus& );
+ SfxQueryStatus();
+ SfxQueryStatus& operator=( const SfxQueryStatus& );
+
+ com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > m_xStatusListener;
+ SfxQueryStatus_Impl* m_pSfxQueryStatusImpl;
+};
+
+#endif // _SFXQUERYSTATUS_HXX
diff --git a/sfx2/inc/sfx2/request.hxx b/sfx2/inc/sfx2/request.hxx
new file mode 100644
index 000000000000..9d7f4a6dc92d
--- /dev/null
+++ b/sfx2/inc/sfx2/request.hxx
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * 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 _SFXREQUEST_HXX
+#define _SFXREQUEST_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <svl/itemset.hxx>
+#include <svl/hint.hxx>
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/frame/XDispatchRecorder.hpp>
+
+class SfxMacro;
+class SfxPoolItem;
+class SfxAllItemSet;
+class SfxItemSet;
+class SfxItemPool;
+class SfxShell;
+class SfxSlot;
+class SfxMacroStatement;
+class SfxArguments;
+class String;
+class SfxViewFrame;
+struct SfxRequest_Impl;
+
+//==================================================================
+
+class SFX2_DLLPUBLIC SfxRequest: public SfxHint
+{
+friend struct SfxRequest_Impl;
+
+ USHORT nSlot;
+ SfxAllItemSet* pArgs;
+ SfxRequest_Impl* pImp;
+
+ //---------------------------------------------------------------------
+//#if 0 // _SOLAR__PRIVATE
+public:
+ SAL_DLLPRIVATE void Record_Impl( SfxShell &rSh, const SfxSlot &rSlot,
+ com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder,
+ SfxViewFrame* );
+private:
+ SAL_DLLPRIVATE void Done_Impl( const SfxItemSet *pSet );
+
+//#endif
+ //---------------------------------------------------------------------
+
+public:
+ SfxRequest( SfxViewFrame*, USHORT nSlotId );
+ SfxRequest( USHORT nSlot, USHORT nCallMode, SfxItemPool &rPool );
+ SfxRequest( const SfxSlot* pSlot, const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rArgs,
+ USHORT nCallMode, SfxItemPool &rPool );
+ SfxRequest( USHORT nSlot, USHORT nCallMode, const SfxAllItemSet& rSfxArgs );
+ SfxRequest( const SfxRequest& rOrig );
+ ~SfxRequest();
+
+ USHORT GetSlot() const { return nSlot; }
+ void SetSlot(USHORT nNewSlot) { nSlot = nNewSlot; }
+
+ USHORT GetModifier() const;
+ void SetModifier( USHORT nModi );
+ SAL_DLLPRIVATE void SetInternalArgs_Impl( const SfxAllItemSet& rArgs );
+ SAL_DLLPRIVATE const SfxItemSet* GetInternalArgs_Impl() const;
+ const SfxItemSet* GetArgs() const { return pArgs; }
+ void SetArgs( const SfxAllItemSet& rArgs );
+ void AppendItem(const SfxPoolItem &);
+ void RemoveItem( USHORT nSlotId );
+
+ static const SfxPoolItem* GetItem( const SfxItemSet*, USHORT nSlotId,
+ bool bDeep = false,
+ TypeId aType = 0 );
+ const SfxPoolItem* GetArg( USHORT nSlotId, FASTBOOL bDeep = FALSE, TypeId aType = 0 ) const;
+ void ReleaseArgs();
+ void SetReturnValue(const SfxPoolItem &);
+ const SfxPoolItem* GetReturnValue() const;
+
+ static SfxMacro* GetRecordingMacro();
+ static com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > GetMacroRecorder( SfxViewFrame* pFrame=NULL );
+ static BOOL HasMacroRecorder( SfxViewFrame* pFrame=NULL );
+ USHORT GetCallMode() const;
+ FASTBOOL IsRecording() const;
+ void AllowRecording( BOOL );
+ BOOL AllowsRecording() const;
+ BOOL IsAPI() const;
+ BOOL IsSynchronCall() const;
+ void SetSynchronCall( BOOL bSynchron );
+ void SetTarget( const String &rTarget );
+
+ BOOL IsDone() const;
+ void Done( BOOL bRemove = FALSE );
+
+ void Ignore();
+ void Cancel();
+ BOOL IsCancelled() const;
+ void Done(const SfxItemSet &, FASTBOOL bKeep = TRUE );
+
+ void ForgetAllArgs();
+
+private:
+ const SfxRequest& operator=(const SfxRequest &); // n.i.!!
+};
+
+//------------------------------------------------------------------------
+
+#define SFX_REQUEST_ARG(rReq, pItem, ItemType, nSlotId, bDeep) \
+ const ItemType *pItem = (const ItemType*) \
+ rReq.GetArg( nSlotId, bDeep, TYPE(ItemType) )
+#define SFX_ITEMSET_ARG(pArgs, pItem, ItemType, nSlotId, bDeep) \
+ const ItemType *pItem = (const ItemType*) \
+ SfxRequest::GetItem( pArgs, nSlotId, bDeep, TYPE(ItemType) )
+
+#endif
diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
new file mode 100644
index 000000000000..917bd75e4138
--- /dev/null
+++ b/sfx2/inc/sfx2/sfx.hrc
@@ -0,0 +1,444 @@
+/*************************************************************************
+ *
+ * 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_HRC
+#define _SFX_HRC
+
+// include ---------------------------------------------------------------
+
+#ifndef _SOLAR_HRC
+#include <svl/solar.hrc>
+#endif
+
+#ifndef _MEMBERID_HRC
+#include <svl/memberid.hrc>
+#endif
+
+#define RID_GROUPS_OFFSET 32000
+#define RID_GROUPS_SFXOFFSET 32700
+#define RID_GROUPS_END 32767
+
+//--------------------------------------------------------------------
+
+#define EVENT_SFX_START 5000
+#define EVENT_SFX_END 9999
+
+#define EVENT_LIB_START 10000
+#define EVENT_LIB_END 19999
+
+#define EVENT_APP_START 20000
+#define EVENT_APP_END 29999
+
+#define EVENT_OBJ_START 30000
+#define EVENT_OBJ0_START (EVENT_OBJ_START+0x0000)
+#define EVENT_OBJ2_START (EVENT_OBJ_START+0x0100)
+#define EVENT_OBJ1_START (EVENT_OBJ_START+0x0200)
+#define EVENT_OBJ3_START (EVENT_OBJ_START+0x0300)
+#define EVENT_OBJ4_START (EVENT_OBJ_START+0x0400)
+#define EVENT_OBJ5_START (EVENT_OBJ_START+0x0500)
+#define EVENT_OBJ6_START (EVENT_OBJ_START+0x0600)
+#define EVENT_OBJ7_START (EVENT_OBJ_START+0x0700)
+#define EVENT_OBJ_END 31999
+
+#define EVENT_SIM_START EVENT_OBJ0_START
+#define EVENT_SCH_START EVENT_OBJ1_START
+#define EVENT_SMA_START EVENT_OBJ2_START
+#define EVENT_SGA_START EVENT_OBJ3_START
+#define EVENT_SVX_START EVENT_OBJ4_START
+
+// Achtung: die folgenden sind gleichzeitig SID_ON_...
+#define SFX_EVENT_STARTAPP (EVENT_SFX_START)
+#define SFX_EVENT_CLOSEAPP (EVENT_SFX_START + 1)
+#define SFX_EVENT_CREATEDOC (EVENT_SFX_START + 2)
+#define SFX_EVENT_OPENDOC (EVENT_SFX_START + 3)
+#define SFX_EVENT_CLOSEDOC (EVENT_SFX_START + 4)
+#define SFX_EVENT_SAVEDOC (EVENT_SFX_START + 5)
+#define SFX_EVENT_SAVEASDOC (EVENT_SFX_START + 6)
+#define SFX_EVENT_ACTIVATEDOC (EVENT_SFX_START + 7)
+#define SFX_EVENT_DEACTIVATEDOC (EVENT_SFX_START + 8)
+#define SFX_EVENT_PRINTDOC (EVENT_SFX_START + 9)
+#define SFX_EVENT_ONERROR (EVENT_SFX_START + 10)
+
+#define SFX_EVENT_LOADFINISHED (EVENT_SFX_START + 11)
+#define SFX_EVENT_SAVEFINISHED (EVENT_SFX_START + 12)
+
+#define SFX_EVENT_MODIFYCHANGED (EVENT_SFX_START + 13)
+#define SFX_EVENT_PREPARECLOSEDOC (EVENT_SFX_START + 14)
+#define SFX_EVENT_NEWMESSAGE (EVENT_SFX_START + 15)
+#define SFX_EVENT_TOGGLEFULLSCREENMODE (EVENT_SFX_START + 16)
+#define SFX_EVENT_SAVEDOCDONE (EVENT_SFX_START + 17)
+#define SFX_EVENT_SAVEASDOCDONE (EVENT_SFX_START + 18)
+
+#define SFX_EVENT_SAVETODOC (EVENT_SFX_START + 19)
+#define SFX_EVENT_SAVETODOCDONE (EVENT_SFX_START + 20)
+
+#define SFX_EVENT_VIEWCREATED (EVENT_SFX_START + 21)
+#define SFX_EVENT_PREPARECLOSEVIEW (EVENT_SFX_START + 22)
+#define SFX_EVENT_CLOSEVIEW (EVENT_SFX_START + 23)
+
+#define SFX_EVENT_STORAGECHANGED (EVENT_SFX_START + 24)
+#define SFX_EVENT_VISAREACHANGED (EVENT_SFX_START + 25)
+
+#define SFX_EVENT_DOCCREATED (EVENT_SFX_START + 26)
+
+#define SFX_EVENT_SAVEASDOCFAILED (EVENT_SFX_START + 27)
+#define SFX_EVENT_SAVEDOCFAILED (EVENT_SFX_START + 28)
+#define SFX_EVENT_SAVETODOCFAILED (EVENT_SFX_START + 29)
+
+#define SFX_EVENT_TITLECHANGED (EVENT_SFX_START + 30)
+#define SFX_EVENT_MODECHANGED (EVENT_SFX_START + 31)
+
+// Events f"ur Controls etc.
+#define SFX_EVENT_MOUSEOVER_OBJECT ( EVENT_SFX_START + 100 )
+#define SFX_EVENT_MOUSECLICK_OBJECT ( EVENT_SFX_START + 101 )
+#define SFX_EVENT_MOUSEOUT_OBJECT ( EVENT_SFX_START + 102 )
+
+//--------------------------------------------------------------------
+
+#define RID_SFX_APP_START (RID_SFX_START + 256)
+#define RID_SFX_MENU_START (RID_SFX_START + 768)
+#define RID_SFX_CONFIG_START (RID_SFX_START + 1536)
+#define RID_SFX_DOC_START (RID_SFX_START + 1792)
+#define RID_SFX_DIALOG_START (RID_SFX_START + 2048)
+#define RID_SFX_BASTYP_START (RID_SFX_START + 2304)
+#define RID_SFX_EXPLORER_START (RID_SFX_START + 2816)
+
+#define RID_CNT_START (RID_SFX_START + 3072)
+
+#define RID_SFX_SFXLOCAL_START (RID_SFX_START + 3082)
+#define RID_SFX_VIEW_START (RID_SFX_START + 4096)
+#define RID_SFX_NODES_START (RID_SFX_START + 4500)
+#define RID_CNT_START2 (RID_SFX_NODES_START)
+#define RID_SFX_CHAOSDOC_START (RID_SFX_START + 5120)
+#define RID_SFX_TPLCOMPONENT_START (RID_SFX_START + 6800)
+#define RID_SFX_HELPCOMPONENT_START (RID_SFX_START + 7000)
+
+//--------------------------------------------------------------------
+
+#define SFX_MSG_NAME 1
+#define SFX_MSG_HELPTEXT 2
+#define SFX_MSG_BASICNAME 3
+
+#define SFX_MSG_ENABLEDBMP 1
+#define SFX_MSG_DISABLEDBMP 2
+#define SFX_MSG_ENABLEDSMALLBMP SFX_MSG_ENABLEDBMP
+#define SFX_MSG_DISABLEDSMALLBMP SFX_MSG_DISABLEDBMP
+#define SFX_MSG_ENABLEDLARGEBMP 3
+#define SFX_MSG_DISABLEDLARGEBMP 4
+#define SFX_MSG_MONO 10
+
+#define SFX_OBJECTBAR_APPLICATION 0
+#define SFX_OBJECTBAR_OBJECT 1
+#define SFX_OBJECTBAR_TOOLS 2
+#define SFX_OBJECTBAR_MACRO 3
+#define SFX_OBJECTBAR_FULLSCREEN 4
+#define SFX_OBJECTBAR_RECORDING 5
+#define SFX_OBJECTBAR_COMMONTASK 6
+#define SFX_OBJECTBAR_OPTIONS 7
+#define SFX_OBJECTBAR_USERDEF1 8
+#define SFX_OBJECTBAR_USERDEF2 9
+#define SFX_OBJECTBAR_USERDEF3 10
+#define SFX_OBJECTBAR_USERDEF4 11
+#define SFX_OBJECTBAR_NAVIGATION 12
+#define SFX_OBJECTBAR_MAX 13
+
+// temp. wg. Kompatibilitaet
+
+#define SFX_OBJECTBAR_IDE 2
+#define SFX_OBJECTBAR_FRAME 3
+#define SFX_OBJECTBAR_DOCUMENT 4
+#define SFX_OBJECTBAR_VIEW 5
+#define SFX_OBJECTBAR_SELECTION 7
+
+#define MSG_QUERY_LASTVERSION RID_SFX_START
+
+#define RID_APPFONT RID_SFX_START
+#define RID_APPLICATION RID_SFX_START
+#define RID_APPWINDOWICON RID_SFX_START
+#define RID_DEFAULTIMAGELIST_SC (RID_SFX_START+15)
+#define RID_DEFAULTIMAGELIST_SM (RID_SFX_START+16)
+#define RID_DEFAULTIMAGELIST_LC (RID_SFX_START+17)
+#define RID_DEFAULTIMAGELIST_LM (RID_SFX_START+18)
+#define RID_STYLEDLG (RID_SFX_START+28)
+#define RID_DEFAULTIMAGELIST_SCH (RID_SFX_START+35)
+#define RID_DEFAULTIMAGELIST_SMH (RID_SFX_START+36)
+#define RID_DEFAULTIMAGELIST_LCH (RID_SFX_START+37)
+#define RID_DEFAULTIMAGELIST_LMH (RID_SFX_START+38)
+#define RID_IMAGELIST_SCH (RID_SFX_START+39)
+#define RID_IMAGELIST_SMH (RID_SFX_START+40)
+#define RID_IMAGELIST_LCH (RID_SFX_START+41)
+#define RID_IMAGELIST_LMH (RID_SFX_START+42)
+#define RID_APPIMAGELIST_SCH (RID_SFX_START+43)
+#define RID_APPIMAGELIST_SMH (RID_SFX_START+44)
+#define RID_APPIMAGELIST_LCH (RID_SFX_START+45)
+#define RID_APPIMAGELIST_LMH (RID_SFX_START+46)
+#define RID_OFFICEIMAGELIST_SCH (RID_SFX_START+47)
+#define RID_OFFICEIMAGELIST_SMH (RID_SFX_START+48)
+#define RID_OFFICEIMAGELIST_LCH (RID_SFX_START+49)
+#define RID_OFFICEIMAGELIST_LMH (RID_SFX_START+50)
+#define RID_DEFAULTINTRO (RID_SFX_START+0)
+#define RID_DEFAULTINTRO_ADABAS (RID_SFX_START+1)
+#define RID_DEFAULTINTRO_PORTAL (RID_SFX_START+2)
+#define RID_DEFAULT_ABOUT_BMP_LOGO (RID_SFX_START+3)
+
+#define RID_STYLECATALOG (RID_SFX_START+1201)
+
+#define RID_DEFAULTABOUT (RID_SFX_START+0)
+
+#define ABOUT_BTN_OK 1
+
+#define ABOUT_FTXT_VERSION 1
+#define ABOUT_FTXT_COPYRIGHT 2
+
+#define ABOUT_STR_DEVELOPER_ARY 1
+#define ABOUT_STR_FRENCH_COPYRIGHT 2
+#define ABOUT_STR_ACCEL 3
+#define ABOUT_STR_COPYRIGHT 4
+
+#define RID_APPTITLE (RID_SFX_START+4)
+#define RID_BUILDVERSION (RID_SFX_START+5)
+
+#define RID_DOCALREADYLOADED_DLG (RID_SFX_START+1)
+#define RID_CANTLOADDOC_DLG (RID_SFX_START+2)
+
+#define TP_DOCINFODESC (RID_SFX_START+3)
+#define TP_DOCINFODOC (RID_SFX_START+4)
+#define TP_DOCINFOUSER (RID_SFX_START+5)
+#define TP_DOCINFORELOAD (RID_SFX_START+13)
+#define TP_CUSTOMPROPERTIES (RID_SFX_START+14)
+#define DLG_DOCINFO_EDT (RID_SFX_START+6)
+#define TP_MANAGE_STYLES (RID_SFX_START+7)
+#define DLG_STYLE_DESIGNER (RID_SFX_START+8)
+
+#define STR_STYLE_FILTER_AUTO (RID_SFX_START+9)
+#define STR_STYLE_FILTER_USED (RID_SFX_START+10)
+#define STR_STYLE_FILTER_USERDEF (RID_SFX_START+11)
+#define STR_STYLE_FILTER_ALL (RID_SFX_START+12)
+// +13 schon benutzt!
+#define STR_STYLE_FILTER_HIERARCHICAL (RID_SFX_START+1200)
+
+#define STR_NONAME (RID_SFX_START+100)
+#define STR_NONE (RID_SFX_START+101)
+#define STR_CLOSE (RID_SFX_START+103)
+#define STR_STANDARD (RID_SFX_START+104)
+#define STR_READONLY (RID_SFX_START+105)
+
+#define STR_SFX_FILTERNAME_ALL (RID_SFX_START+106)
+#define STR_EDIT (RID_SFX_START+108)
+#define STR_QUERY_SAVE_DOCUMENT (RID_SFX_START+110)
+#define STR_BYTES (RID_SFX_START+111)
+#define STR_KB (RID_SFX_START+112)
+#define STR_MB (RID_SFX_START+113)
+#define STR_GB (RID_SFX_START+114)
+
+#define STR_VERSION_TYPE (RID_SFX_START+115)
+#define STR_VERSION_ID (RID_SFX_START+116)
+#define STR_STANDARD_SHORTCUT (RID_SFX_START+117)
+#define STR_REPAIREDDOCUMENT (RID_SFX_START+118)
+
+#define STR_ERRUNOEVENTBINDUNG (RID_SFX_START+119)
+#define STR_SHARED (RID_SFX_START+120)
+#define RID_XMLSEC_DOCUMENTSIGNED (RID_SFX_START+121)
+
+//=========================================================================
+
+// group ids
+//=========================================================================
+// !! If you add a new group, please change sfxbasecontroller.cxx and
+// !! com.sun.star.frame.CommandGroup accordingly!
+//=========================================================================
+
+#define GID_INTERN (RID_GROUPS_SFXOFFSET+ 0)
+#define GID_APPLICATION (RID_GROUPS_SFXOFFSET+ 1)
+#define GID_DOCUMENT (RID_GROUPS_SFXOFFSET+ 2)
+#define GID_VIEW (RID_GROUPS_SFXOFFSET+ 3)
+#define GID_EDIT (RID_GROUPS_SFXOFFSET+ 4)
+#define GID_MACRO (RID_GROUPS_SFXOFFSET+ 5)
+#define GID_OPTIONS (RID_GROUPS_SFXOFFSET+ 6)
+#define GID_MATH (RID_GROUPS_SFXOFFSET+ 7)
+#define GID_NAVIGATOR (RID_GROUPS_SFXOFFSET+ 8)
+#define GID_INSERT (RID_GROUPS_SFXOFFSET+ 9)
+#define GID_FORMAT (RID_GROUPS_SFXOFFSET+10)
+#define GID_TEMPLATE (RID_GROUPS_SFXOFFSET+11)
+#define GID_TEXT (RID_GROUPS_SFXOFFSET+12)
+#define GID_FRAME (RID_GROUPS_SFXOFFSET+13)
+#define GID_GRAPHIC (RID_GROUPS_SFXOFFSET+14)
+#define GID_TABLE (RID_GROUPS_SFXOFFSET+15)
+#define GID_ENUMERATION (RID_GROUPS_SFXOFFSET+16)
+#define GID_DATA (RID_GROUPS_SFXOFFSET+17)
+#define GID_SPECIAL (RID_GROUPS_SFXOFFSET+18)
+#define GID_IMAGE (RID_GROUPS_SFXOFFSET+19)
+#define GID_CHART (RID_GROUPS_SFXOFFSET+20)
+#define GID_EXPLORER (RID_GROUPS_SFXOFFSET+21)
+#define GID_CONNECTOR (RID_GROUPS_SFXOFFSET+22)
+#define GID_MODIFY (RID_GROUPS_SFXOFFSET+23)
+#define GID_DRAWING (RID_GROUPS_SFXOFFSET+24)
+#define GID_CONTROLS (RID_GROUPS_SFXOFFSET+25)
+
+// compatibility-#defines
+#define GID_FORMEL GID_MATH
+#define GID_ERROR GID_MATH
+#define GID_OPT GID_OPTIONS
+#define GID_DOC GID_DOCUMENT
+#define GID_APP GID_APPLICATION
+#define GID_HELP GID_APPLICATION
+
+// ------------------------------------------------------------------------
+
+#define BMP_COLS 21
+#define BMP_SFX_SMALL 1
+#define BMP_SFX_LARGE 2
+
+#define RID_SFX_GLOBALS 1000
+
+#define BMP_SFX_COLOR (RID_SFX_GLOBALS + 1)
+#define BMP_SFX_MONO (RID_SFX_GLOBALS + 2)
+#define SFX_MSG_RES (RID_SFX_GLOBALS + 3)
+
+// =========================================================================
+
+#define RID_OPTIONS_START (SID_LIB_START + 2000)
+#define RID_OPTIONS_END (RID_OPTIONS_START + 100)
+
+// ResId's ------------------------------------------------------------------
+
+#define RID_SFXLANG_BEGIN (RID_OPTIONS_START + 0)
+#define RID_SFXLANG_NO (RID_SFXLANG_BEGIN + 0)
+#define RID_SFXLANG_GERMAN (RID_SFXLANG_BEGIN + 1)
+#define RID_SFXLANG_SWISS_GERMAN (RID_SFXLANG_BEGIN + 2)
+#define RID_SFXLANG_US_ENGLISH (RID_SFXLANG_BEGIN + 3)
+#define RID_SFXLANG_UK_ENGLISH (RID_SFXLANG_BEGIN + 4)
+#define RID_SFXLANG_FRENCH (RID_SFXLANG_BEGIN + 5)
+#define RID_SFXLANG_ITALIAN (RID_SFXLANG_BEGIN + 6)
+#define RID_SFXLANG_CAST_SPANISH (RID_SFXLANG_BEGIN + 7)
+#define RID_SFXLANG_PORTUGUESE (RID_SFXLANG_BEGIN + 8)
+#define RID_SFXLANG_DANISH (RID_SFXLANG_BEGIN + 9)
+#define RID_SFXLANG_DUTCH (RID_SFXLANG_BEGIN + 10)
+#define RID_SFXLANG_SWEDISH (RID_SFXLANG_BEGIN + 11)
+#define RID_SFXLANG_FINNISH (RID_SFXLANG_BEGIN + 12)
+#define RID_SFXLANG_NORWEG_BOKMAL (RID_SFXLANG_BEGIN + 13)
+#define RID_SFXLANG_NORWEG_NYNORSK (RID_SFXLANG_BEGIN + 14)
+#define RID_SFXLANG_ALL (RID_SFXLANG_BEGIN + 15)
+
+#define RID_SFXPAGE_SAVE (RID_OPTIONS_START + 0)
+#define RID_SFXPAGE_GENERAL (RID_OPTIONS_START + 1)
+#define RID_SFXPAGE_SPELL (RID_OPTIONS_START + 2)
+#define RID_SFXDLG_NEWDICT (RID_OPTIONS_START + 3)
+#define RID_SFXDLG_EDITDICT (RID_OPTIONS_START + 4)
+#define RID_SFXQB_DELDICT (RID_OPTIONS_START + 5)
+#define RID_SFXPAGE_PATH (RID_OPTIONS_START + 6)
+#define RID_SFXPAGE_LINGU (RID_OPTIONS_START + 7)
+#define RID_SFXPAGE_INET (RID_OPTIONS_START + 8)
+#define RID_SFXQB_DEL_IGNORELIST (RID_OPTIONS_START + 9)
+#define RID_SFXQB_SET_LANGUAGE (RID_OPTIONS_START + 10)
+#define RID_ITEMLIST_LINGU (RID_OPTIONS_START + 11)
+#define RID_SFXPAGE_PRINTOPTIONS (RID_OPTIONS_START + 12)
+
+#define STR_UNDO (RID_SFX_VIEW_START+11)
+#define STR_REDO (RID_SFX_VIEW_START+12)
+#define STR_REPEAT (RID_SFX_VIEW_START+13)
+#define RID_STR_NEW_TASK (RID_SFX_DOC_START+ 76)
+
+// Member-Ids ------------------------------------------------------------
+
+#define MID_DOCINFO_DESCRIPTION 0x13
+#define MID_DOCINFO_KEYWORDS 0x17
+#define MID_DOCINFO_SUBJECT 0x1b
+#define MID_DOCINFO_TITLE 0x1d
+#define MID_DOCINFO_AUTOLOADENABLED 0x2d
+#define MID_DOCINFO_AUTOLOADURL 0x2e
+#define MID_DOCINFO_AUTOLOADSECS 0x2f
+#define MID_DOCINFO_DEFAULTTARGET 0x30
+#define MID_DOCINFO_USEUSERDATA 0x31
+#define MID_DOCINFO_DELETEUSERDATA 0x32
+
+// only for FastPropertySet
+#define MID_DOCINFO_AUTHOR 0x10
+#define MID_DOCINFO_CREATIONDATE 0x11
+#define MID_DOCINFO_CREATIONTIME 0x12
+#define MID_DOCINFO_FILENAME 0x14
+#define MID_DOCINFO_REVISION 0x15
+#define MID_DOCINFO_EDITTIME 0x16
+#define MID_DOCINFO_MODIFICATIONAUTHOR 0x18
+#define MID_DOCINFO_MODIFICATIONDATE 0x19
+#define MID_DOCINFO_MODIFICATIONTIME 0x1a
+#define MID_DOCINFO_TEMPLATE 0x1c
+#define MID_DOCINFO_PRINTDATE 0x28
+#define MID_DOCINFO_PRINTTIME 0x29
+#define MID_DOCINFO_PRINTEDBY 0x2a
+#define MID_DOCINFO_TEMPLATEDATE 0x2b
+#define MID_DOCINFO_ENCRYPTED 0x2c
+#define MID_DOCINFO_STATISTIC 0x33
+#define MID_DOCINFO_CHARLOCALE 0x34
+
+#define MID_LAST_USED_PROPID MID_DOCINFO_CHARLOCALE
+
+// Config-Ids -----------------------------------------------------------
+
+#define SFX_ITEMTYPE_SW_BEGIN 20000
+#define SFX_ITEMTYPE_SW_END 22999
+
+#define SFX_ITEMTYPE_SD_BEGIN 23000
+#define SFX_ITEMTYPE_SD_END 25999
+
+#define SFX_ITEMTYPE_SC_BEGIN 26000
+#define SFX_ITEMTYPE_SC_END 27999
+
+#define SFX_ITEMTYPE_SIM_BEGIN 28000
+#define SFX_ITEMTYPE_SIM_END 28999
+
+#define SFX_ITEMTYPE_SCH_BEGIN 29000
+#define SFX_ITEMTYPE_SCH_END 29999
+
+#define SFX_ITEMTYPE_SMA_BEGIN 30000
+#define SFX_ITEMTYPE_SMA_END 30999
+
+#define SFX_ITEMTYPE_SBA_BEGIN 31000
+#define SFX_ITEMTYPE_SBA_END 31999
+
+#define SFX_ITEMTYPE_BASICIDE_BEGIN 32000
+#define SFX_ITEMTYPE_BASICIDE_END 32767
+
+// Slot-Ids -------------------------------------------------------------
+
+#ifndef _SFXSIDS_HRC
+#include <sfx2/sfxsids.hrc>
+#endif
+
+#define HID_INTERFACE_SFXMAILVIEW 13
+#define HID_INTERFACE_SFXEXPLVIEWSH 17
+#define HID_INTERFACE_SFXFRAMESETVIEW 21
+#define HID_INTERFACE_SFXFRAMESETSOURCEVIEW 22
+#define HID_INTERFACE_SFXPLUGINVIEW 9
+#define HID_INTERFACE_SFXHELP_VIEWSH 24
+
+#define RET_NEWTASK 200
+#define RET_PENDING 201
+
+#endif // #ifndef _SFX_HRC
+
+// ******************************************************************* EOF
+
diff --git a/sfx2/inc/sfx2/sfxbasecontroller.hxx b/sfx2/inc/sfx2/sfxbasecontroller.hxx
new file mode 100644
index 000000000000..ca30d243bbac
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxbasecontroller.hxx
@@ -0,0 +1,418 @@
+/*************************************************************************
+ *
+ * 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_SFXBASECONTROLLER_HXX_
+#define _SFX_SFXBASECONTROLLER_HXX_
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
+#include <com/sun/star/frame/XController2.hpp>
+#include <com/sun/star/frame/XControllerBorder.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XTitle.hpp>
+#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
+#include <com/sun/star/util/URL.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <cppuhelper/implbase9.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <osl/mutex.hxx>
+#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+#include <com/sun/star/ui/XContextMenuInterception.hpp>
+#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
+#include <com/sun/star/awt/XMouseClickHandler.hpp>
+#include <com/sun/star/awt/XKeyHandler.hpp>
+#include <com/sun/star/awt/XUserInputInterception.hpp>
+
+//________________________________________________________________________________________________________
+// include of my own project
+//________________________________________________________________________________________________________
+#include <sfx2/viewsh.hxx>
+#include <sfx2/sfxuno.hxx>
+
+//________________________________________________________________________________________________________
+// defines
+//________________________________________________________________________________________________________
+
+// Some defines to write better code :-)
+#define REFERENCE ::com::sun::star::uno::Reference
+#define ANY ::com::sun::star::uno::Any
+#define SEQUENCE ::com::sun::star::uno::Sequence
+#define XDISPATCH ::com::sun::star::frame::XDispatch
+#define DISPATCHDESCRIPTOR ::com::sun::star::frame::DispatchDescriptor
+#define XMODEL ::com::sun::star::frame::XModel
+#define XFRAME ::com::sun::star::frame::XFrame
+#define XEVENTLISTENER ::com::sun::star::lang::XEventListener
+#define MUTEX ::osl::Mutex
+#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
+#define UNOTYPE ::com::sun::star::uno::Type
+#define UNOURL ::com::sun::star::util::URL
+#define OUSTRING ::rtl::OUString
+#define XCONTEXTMENUINTERCEPTOR ::com::sun::star::ui::XContextMenuInterceptor
+
+//________________________________________________________________________________________________________
+// forwards
+//________________________________________________________________________________________________________
+
+struct IMPL_SfxBaseController_DataContainer ; // impl. struct to hold member of class SfxBaseController
+
+class SfxViewFrame;
+
+sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID );
+sal_Bool SupportsCommandGroup( sal_Int16 nCommandGroup );
+sal_Int16 MapCommandGroupToGroupID( sal_Int16 nCommandGroup );
+
+//________________________________________________________________________________________________________
+// class declarations
+//________________________________________________________________________________________________________
+
+typedef ::cppu::WeakImplHelper9 < ::com::sun::star::frame::XController2
+ , ::com::sun::star::frame::XControllerBorder
+ , ::com::sun::star::frame::XDispatchProvider
+ , ::com::sun::star::task::XStatusIndicatorSupplier
+ , ::com::sun::star::ui::XContextMenuInterception
+ , ::com::sun::star::awt::XUserInputInterception
+ , ::com::sun::star::frame::XDispatchInformationProvider
+ , ::com::sun::star::frame::XTitle
+ , ::com::sun::star::frame::XTitleChangeBroadcaster
+ > SfxBaseController_Base;
+
+class SFX2_DLLPUBLIC SfxBaseController :public SfxBaseController_Base
+ ,public ::cppu::BaseMutex
+{
+//________________________________________________________________________________________________________
+// public methods
+//________________________________________________________________________________________________________
+
+public:
+
+ //____________________________________________________________________________________________________
+ // constructor/destructor
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ SfxBaseController( SfxViewShell* pView ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ ~SfxBaseController() ;
+
+ SAL_DLLPRIVATE void ReleaseShell_Impl();
+ SAL_DLLPRIVATE void BorderWidthsChanged_Impl();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > SAL_CALL getStatusIndicator( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XController2
+ //____________________________________________________________________________________________________
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getComponentWindow() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getViewControllerName() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCreationArguments() throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XController
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL attachFrame( const REFERENCE< XFRAME >& xFrame ) throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual sal_Bool SAL_CALL attachModel( const REFERENCE< XMODEL >& xModel ) throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual sal_Bool SAL_CALL suspend( sal_Bool bSuspend ) throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ ANY SAL_CALL getViewData() throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ void SAL_CALL restoreViewData( const ANY& aValue ) throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ REFERENCE< XFRAME > SAL_CALL getFrame() throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ REFERENCE< XMODEL > SAL_CALL getModel() throw( RUNTIMEEXCEPTION ) ;
+
+ //____________________________________________________________________________________________________
+ // XDispatchProvider
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual REFERENCE< XDISPATCH > SAL_CALL queryDispatch( const UNOURL & aURL ,
+ const OUSTRING & sTargetFrameName,
+ FrameSearchFlags eSearchFlags ) throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescriptor ) throw( RUNTIMEEXCEPTION ) ;
+
+ //____________________________________________________________________________________________________
+ // XControllerBorder
+ //____________________________________________________________________________________________________
+
+ virtual ::com::sun::star::frame::BorderWidths SAL_CALL getBorder() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addBorderResizeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XBorderResizeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeBorderResizeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XBorderResizeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL queryBorderedArea( const ::com::sun::star::awt::Rectangle& aPreliminaryRectangle ) throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XComponent
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL dispose() throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL addEventListener( const REFERENCE< XEVENTLISTENER >& aListener ) throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL removeEventListener( const REFERENCE< XEVENTLISTENER >& aListener ) throw( RUNTIMEEXCEPTION ) ;
+ virtual void SAL_CALL registerContextMenuInterceptor( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor ) throw( RUNTIMEEXCEPTION );
+ virtual void SAL_CALL releaseContextMenuInterceptor( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor ) throw( RUNTIMEEXCEPTION );
+
+ virtual void SAL_CALL addKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XDispatchInformationProvider
+ //____________________________________________________________________________________________________
+ virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSupportedCommandGroups() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( sal_Int16 nCommandGroup ) throw (::com::sun::star::uno::RuntimeException);
+
+ // css::frame::XTitle
+ virtual ::rtl::OUString SAL_CALL getTitle( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (::com::sun::star::uno::RuntimeException);
+
+ // css::frame::XTitleChangeBroadcaster
+ virtual void SAL_CALL addTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+//#if 0 // _SOLAR__PRIVATE
+ // FIXME: TL needs this in sw/source/ui/uno/unotxdoc.cxx now;
+ // either the _Impl name should vanish or there should be an "official" API
+ SfxViewShell* GetViewShell_Impl() const;
+ SAL_DLLPRIVATE BOOL HandleEvent_Impl( NotifyEvent& rEvent );
+ SAL_DLLPRIVATE BOOL HasKeyListeners_Impl();
+ SAL_DLLPRIVATE BOOL HasMouseClickListeners_Impl();
+ SAL_DLLPRIVATE void SetCreationArguments_Impl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rCreationArgs );
+ SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle > impl_getTitleHelper ();
+//#endif
+private:
+ enum ConnectSfxFrame
+ {
+ E_CONNECT,
+ E_DISCONNECT,
+ E_RECONNECT
+ };
+ SAL_DLLPRIVATE void ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect );
+ SAL_DLLPRIVATE SfxViewFrame& GetViewFrame_Impl() const;
+
+//________________________________________________________________________________________________________
+// private variables
+//________________________________________________________________________________________________________
+
+private:
+
+ IMPL_SfxBaseController_DataContainer* m_pData ;
+
+} ; // class SfxBaseController
+
+#endif // _SFX_SFXBASECONTROLLER_HXX
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx
new file mode 100644
index 000000000000..578dd1fd33bb
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxbasemodel.hxx
@@ -0,0 +1,1596 @@
+/*************************************************************************
+ *
+ * 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_SFXBASEMODEL_HXX_
+#define _SFX_SFXBASEMODEL_HXX_
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/frame/XModule.hpp>
+#include <com/sun/star/frame/XTitle.hpp>
+#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
+#include <com/sun/star/frame/XUntitledNumbers.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/container/XNameReplace.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/document/XDocumentInfo.hpp>
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/document/XDocumentRecovery.hpp>
+
+#include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
+
+#include <com/sun/star/document/XEventBroadcaster.hpp>
+#include <com/sun/star/document/XEventListener.hpp>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+#include <com/sun/star/document/XEmbeddedScripts.hpp>
+#include <com/sun/star/document/EventObject.hpp>
+#include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
+#include <com/sun/star/document/XStorageBasedDocument.hpp>
+#include <com/sun/star/document/XScriptInvocationContext.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/lang/NotInitializedException.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/frame/XModel2.hpp>
+#include <com/sun/star/frame/DoubleInitializationException.hpp>
+#include <com/sun/star/util/XModifiable2.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/util/XCloseBroadcaster.hpp>
+#include <com/sun/star/util/XCloseListener.hpp>
+#include <com/sun/star/util/CloseVetoException.hpp>
+#include <com/sun/star/view/XPrintable.hpp>
+#include <com/sun/star/view/XPrintJobBroadcaster.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/frame/XStorable2.hpp>
+#include <com/sun/star/frame/XLoadable.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/datatransfer/XTransferable.hpp>
+#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
+#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/embed/XVisualObject.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <com/sun/star/script/XStarBasicAccess.hpp>
+#include <osl/mutex.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+
+#include <tools/link.hxx>
+
+#include <com/sun/star/document/XViewDataSupplier.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+
+#include <com/sun/star/task/XInteractionHandler.hpp>
+
+//________________________________________________________________________________________________________
+#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30)
+#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30
+#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 30
+#include <comphelper/implbase_var.hxx>
+#endif
+
+// include of my own project
+//________________________________________________________________________________________________________
+#include <svl/lstner.hxx>
+
+//________________________________________________________________________________________________________
+// defines
+//________________________________________________________________________________________________________
+
+// Some defines to write better code :-)
+#define XCHILD ::com::sun::star::container::XChild
+#define XNAMECONTAINER ::com::sun::star::container::XNameContainer
+#define XCONTROLLER ::com::sun::star::frame::XController
+#define XEVENTLISTENER ::com::sun::star::lang::XEventListener
+#define XINTERFACE ::com::sun::star::uno::XInterface
+#define XCOMPONENT ::com::sun::star::lang::XComponent
+#define XMODEL ::com::sun::star::frame::XModel
+#define XMODEL2 ::com::sun::star::frame::XModel2
+#define XMODIFIABLE ::com::sun::star::util::XModifiable
+#define XMODIFIABLE2 ::com::sun::star::util::XModifiable2
+#define XMODIFYBROADCASTER ::com::sun::star::util::XModifyBroadcaster
+#define XMODIFYLISTENER ::com::sun::star::util::XModifyListener
+#define XCLOSEABLE ::com::sun::star::util::XCloseable
+#define XCLOSEBROADCASTER ::com::sun::star::util::XCloseBroadcaster
+#define XCLOSELISTENER ::com::sun::star::util::XCloseListener
+#define XPRINTABLE ::com::sun::star::view::XPrintable
+#define XPRINTJOBBROADCASTER ::com::sun::star::view::XPrintJobBroadcaster
+#define XSTORABLE ::com::sun::star::frame::XStorable
+#define XSTORABLE2 ::com::sun::star::frame::XStorable2
+#define XLOADABLE ::com::sun::star::frame::XLoadable
+#define XTYPEPROVIDER ::com::sun::star::lang::XTypeProvider
+#define XSTARBASICACCESS ::com::sun::star::script::XStarBasicAccess
+#define NOSUCHELEMENTEXCEPTION ::com::sun::star::container::NoSuchElementException
+#define ELEMENTEXISTEXCEPTION ::com::sun::star::container::ElementExistException
+#define XNAMEREPLACE ::com::sun::star::container::XNameReplace
+#define XINDEXCONTAINER ::com::sun::star::container::XIndexContainer
+#define DISPOSEDEXCEPTION ::com::sun::star::lang::DisposedException
+#define DOCEVENTOBJECT ::com::sun::star::document::EventObject
+#define XDOCEVENTLISTENER ::com::sun::star::document::XEventListener
+#define XDOCUMENTINFO ::com::sun::star::document::XDocumentInfo
+#define XDOCUMENTINFOSUPPLIER ::com::sun::star::document::XDocumentInfoSupplier
+#define XEVENTBROADCASTER ::com::sun::star::document::XEventBroadcaster
+#define XEVENTSSUPPLIER ::com::sun::star::document::XEventsSupplier
+#define XEMBEDDEDSCRIPTS ::com::sun::star::document::XEmbeddedScripts
+#define XSCRIPTINVOCATIONCONTEXT ::com::sun::star::document::XScriptInvocationContext
+
+#define NOSUPPORTEXCEPTION ::com::sun::star::lang::NoSupportException
+#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
+#define CLOSEVETOEXCEPTION ::com::sun::star::util::CloseVetoException
+#define DOUBLEINITIALIZATIONEXCEPTION ::com::sun::star::frame::DoubleInitializationException
+#define ILLEGALARGUMENTEXCEPTION ::com::sun::star::lang::IllegalArgumentException
+#define IOEXCEPTION ::com::sun::star::io::IOException
+#define EXCEPTION ::com::sun::star::uno::Exception
+
+#define ANY ::com::sun::star::uno::Any
+#define EVENTOBJECT ::com::sun::star::lang::EventObject
+#define PROPERTYVALUE ::com::sun::star::beans::PropertyValue
+#define REFERENCE ::com::sun::star::uno::Reference
+#define SEQUENCE ::com::sun::star::uno::Sequence
+#define MUTEX ::osl::Mutex
+#define OUSTRING ::rtl::OUString
+#define UNOTYPE ::com::sun::star::uno::Type
+#define XVIEWDATASUPPLIER ::com::sun::star::document::XViewDataSupplier
+#define XINDEXACCESS ::com::sun::star::container::XIndexAccess
+#define XTRANSFERABLE ::com::sun::star::datatransfer::XTransferable
+#define DATAFLAVOR ::com::sun::star::datatransfer::DataFlavor
+
+#define XUNOTUNNEL ::com::sun::star::lang::XUnoTunnel
+
+#define XDOCUMENTSUBSTORAGESUPPLIER ::com::sun::star::document::XDocumentSubStorageSupplier
+#define XSTORAGEBASEDDOCUMENT ::com::sun::star::document::XStorageBasedDocument
+#define XSTORAGE ::com::sun::star::embed::XStorage
+#define XVISUALOBJECT ::com::sun::star::embed::XVisualObject
+
+#define XSCRIPTPROVIDERSUPPLIER ::com::sun::star::script::provider::XScriptProviderSupplier
+#define XSCRIPTPROVIDER ::com::sun::star::script::provider::XScriptProvider
+
+#define XUICONFIGURATIONMANAGERSUPPLIER ::com::sun::star::ui::XUIConfigurationManagerSupplier
+#define XUICONFIGURATIONMANAGER ::com::sun::star::ui::XUIConfigurationManager
+#define XMODULE ::com::sun::star::frame::XModule
+#define XTITLE ::com::sun::star::frame::XTitle
+#define XTITLECHANGEBROADCASTER ::com::sun::star::frame::XTitleChangeBroadcaster
+#define XUNTITLEDNUMBERS ::com::sun::star::frame::XUntitledNumbers
+
+//________________________________________________________________________________________________________
+// namespace
+//________________________________________________________________________________________________________
+#ifdef css
+ #error "class is using css as namespace define .-)"
+#else
+ #define css ::com::sun::star
+#endif
+
+//________________________________________________________________________________________________________
+// forwards
+//________________________________________________________________________________________________________
+class SfxPrinter;
+class SfxViewShell;
+class SfxObjectShell ;
+class SfxEventHint;
+class SfxViewFrame;
+struct IMPL_SfxBaseModel_DataContainer ; // impl. struct to hold member of class SfxBaseModel
+
+namespace sfx { namespace intern {
+ class ViewCreationGuard;
+} }
+//________________________________________________________________________________________________________
+// class declarations
+//________________________________________________________________________________________________________
+
+/**_______________________________________________________________________________________________________
+ @short -
+
+ @descr -
+
+ @implements XChild
+ XComponent
+ XDocumentInfoSupplier
+ document::XDocumentPropertiesSupplier
+ rdf::XDocumentMetadataAccess
+ XEventListener
+ XModel
+ XModifiable2
+ XPrintable
+ XStorable2
+ document::XEventBroadcaster
+ document::XEventsSupplier
+ document::XEmbeddedScripts
+ document::XScriptInvocationContext
+ XCloseable
+ XCloseBroadcaster
+
+ @base cppu::BaseMutex
+ SfxListener
+*/
+
+typedef ::comphelper::WeakImplHelper30 < XCHILD
+ , XDOCUMENTINFOSUPPLIER
+ , ::com::sun::star::document::XDocumentPropertiesSupplier
+ , ::com::sun::star::rdf::XDocumentMetadataAccess
+ , ::com::sun::star::document::XDocumentRecovery
+ , XEVENTBROADCASTER
+ , XEVENTLISTENER
+ , XEVENTSSUPPLIER
+ , XEMBEDDEDSCRIPTS
+ , XSCRIPTINVOCATIONCONTEXT
+ , XMODEL2
+ , XMODIFIABLE2
+ , XPRINTABLE
+ , XPRINTJOBBROADCASTER
+ , XSTORABLE2
+ , XLOADABLE
+ , XSTARBASICACCESS
+ , XVIEWDATASUPPLIER
+ , XCLOSEABLE // => XCLOSEBROADCASTER
+ , XTRANSFERABLE
+ , XDOCUMENTSUBSTORAGESUPPLIER
+ , XSTORAGEBASEDDOCUMENT
+ , XSCRIPTPROVIDERSUPPLIER
+ , XUICONFIGURATIONMANAGERSUPPLIER
+ , XVISUALOBJECT
+ , XUNOTUNNEL
+ , XMODULE
+ , XTITLE
+ , XTITLECHANGEBROADCASTER
+ , XUNTITLEDNUMBERS
+ > SfxBaseModel_Base;
+
+class SFX2_DLLPUBLIC SfxBaseModel : protected ::cppu::BaseMutex
+ , public SfxBaseModel_Base
+ , public SfxListener
+{
+
+//________________________________________________________________________________________________________
+// public methods
+//________________________________________________________________________________________________________
+
+public:
+
+ //____________________________________________________________________________________________________
+ // constructor/destructor
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ SfxBaseModel( SfxObjectShell *pObjektShell = NULL ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual ~SfxBaseModel() ;
+
+ //____________________________________________________________________________________________________
+ // XInterface
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short give answer, if interface is supported
+ @descr The interfaces are searched by type.
+
+ @seealso XInterface
+
+ @param "rType" is the type of searched interface.
+
+ @return Any information about found interface
+
+ @onerror A RuntimeException is thrown.
+ */
+
+ virtual ANY SAL_CALL queryInterface( const UNOTYPE& rType ) throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short increment refcount
+ @descr -
+
+ @seealso XInterface
+ @seealso release()
+
+ @param -
+
+ @return -
+
+ @onerror A RuntimeException is thrown.
+ */
+
+ virtual void SAL_CALL acquire() throw() ;
+
+ /**___________________________________________________________________________________________________
+ @short decrement refcount
+ @descr -
+
+ @seealso XInterface
+ @seealso acquire()
+
+ @param -
+
+ @return -
+
+ @onerror A RuntimeException is thrown.
+ */
+
+ virtual void SAL_CALL release() throw() ;
+
+ //____________________________________________________________________________________________________
+ // XTypeProvider
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short get information about supported interfaces
+ @descr -
+
+ @seealso XTypeProvider
+
+ @param -
+
+ @return Sequence of types of all supported interfaces
+
+ @onerror A RuntimeException is thrown.
+ */
+
+ virtual SEQUENCE< UNOTYPE > SAL_CALL getTypes() throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short get implementation id
+ @descr This ID is neccessary for UNO-caching. If there no ID, cache is disabled.
+ Another way, cache is enabled.
+
+ @seealso XTypeProvider
+
+ @param -
+
+ @return ID as Sequence of byte
+
+ @onerror A RuntimeException is thrown.
+ */
+
+ virtual SEQUENCE< sal_Int8 > SAL_CALL getImplementationId() throw( RUNTIMEEXCEPTION ) ;
+
+
+ //____________________________________________________________________________________________________
+ // XStarBasicAccess
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @seealso XStarBasicAccess
+ */
+ virtual REFERENCE< XNAMECONTAINER > SAL_CALL getLibraryContainer() throw( RUNTIMEEXCEPTION );
+
+ /**___________________________________________________________________________________________________
+ @seealso XStarBasicAccess
+ */
+ virtual void SAL_CALL createLibrary( const OUSTRING& LibName, const OUSTRING& Password,
+ const OUSTRING& ExternalSourceURL, const OUSTRING& LinkTargetURL )
+ throw(ELEMENTEXISTEXCEPTION, RUNTIMEEXCEPTION);
+
+ /**___________________________________________________________________________________________________
+ @seealso XStarBasicAccess
+ */
+ virtual void SAL_CALL addModule( const OUSTRING& LibraryName, const OUSTRING& ModuleName,
+ const OUSTRING& Language, const OUSTRING& Source )
+ throw( NOSUCHELEMENTEXCEPTION, RUNTIMEEXCEPTION);
+
+ /**___________________________________________________________________________________________________
+ @seealso XStarBasicAccess
+ */
+ virtual void SAL_CALL addDialog( const OUSTRING& LibraryName, const OUSTRING& DialogName,
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& Data )
+ throw(NOSUCHELEMENTEXCEPTION, RUNTIMEEXCEPTION);
+
+
+ //____________________________________________________________________________________________________
+ // XChild
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual REFERENCE< XINTERFACE > SAL_CALL getParent() throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL setParent( const REFERENCE< XINTERFACE >& xParent ) throw( NOSUPPORTEXCEPTION ,
+ RUNTIMEEXCEPTION ) ;
+
+ //____________________________________________________________________________________________________
+ // XComponent
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL addEventListener(const REFERENCE< XEVENTLISTENER >& aListener) throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL removeEventListener(const REFERENCE< XEVENTLISTENER >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XDocumentInfoSupplier
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual REFERENCE< XDOCUMENTINFO > SAL_CALL getDocumentInfo() throw (::com::sun::star::uno::RuntimeException);
+
+ // XDocumentPropertiesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties >
+ SAL_CALL getDocumentProperties()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XEventListener
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL disposing( const EVENTOBJECT& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XModel
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual sal_Bool SAL_CALL attachResource( const OUSTRING& sURL ,
+ const SEQUENCE< PROPERTYVALUE >& aArgs )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual OUSTRING SAL_CALL getURL() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual SEQUENCE< PROPERTYVALUE > SAL_CALL getArgs() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL connectController( const REFERENCE< XCONTROLLER >& xController ) throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL disconnectController( const REFERENCE< XCONTROLLER >& xController ) throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL lockControllers() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL unlockControllers() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual sal_Bool SAL_CALL hasControllersLocked() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual REFERENCE< XCONTROLLER > SAL_CALL getCurrentController() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL setCurrentController( const REFERENCE< XCONTROLLER >& xController )
+ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual REFERENCE< XINTERFACE > SAL_CALL getCurrentSelection() throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XModel2
+ //____________________________________________________________________________________________________
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL getControllers()
+ throw (css::uno::RuntimeException);
+
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableViewControllerNames()
+ throw (css::uno::RuntimeException);
+
+ virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createDefaultViewController(const css::uno::Reference< css::frame::XFrame >& Frame )
+ throw (css::uno::RuntimeException ,
+ css::lang::IllegalArgumentException,
+ css::uno::Exception );
+
+ virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createViewController(const ::rtl::OUString& ViewName ,
+ const css::uno::Sequence< css::beans::PropertyValue >& Arguments ,
+ const css::uno::Reference< css::frame::XFrame >& Frame )
+ throw (css::uno::RuntimeException ,
+ css::lang::IllegalArgumentException,
+ css::uno::Exception );
+
+ //____________________________________________________________________________________________________
+ // XModifiable2
+ //____________________________________________________________________________________________________
+
+ virtual ::sal_Bool SAL_CALL disableSetModified( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL enableSetModified( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isSetModifiedEnabled( ) throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual sal_Bool SAL_CALL isModified() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL setModified( sal_Bool bModified )
+ throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL addModifyListener( const REFERENCE< XMODIFYLISTENER >& xListener ) throw( RUNTIMEEXCEPTION ) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL removeModifyListener(const REFERENCE< XMODIFYLISTENER > & xListener) throw( RUNTIMEEXCEPTION ) ;
+
+ //____________________________________________________________________________________________________
+ // XCloseable
+ //____________________________________________________________________________________________________
+
+ virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (CLOSEVETOEXCEPTION, RUNTIMEEXCEPTION);
+
+ //____________________________________________________________________________________________________
+ // XCloseBroadcaster
+ //____________________________________________________________________________________________________
+
+ virtual void SAL_CALL addCloseListener( const REFERENCE< XCLOSELISTENER >& xListener ) throw (RUNTIMEEXCEPTION);
+ virtual void SAL_CALL removeCloseListener( const REFERENCE< XCLOSELISTENER >& xListener ) throw (RUNTIMEEXCEPTION);
+
+ //____________________________________________________________________________________________________
+ // XPrintJobBroadcaster
+ //____________________________________________________________________________________________________
+
+ virtual void SAL_CALL addPrintJobListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XPrintJobListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePrintJobListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XPrintJobListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XPrintable
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual SEQUENCE< PROPERTYVALUE > SAL_CALL getPrinter() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL setPrinter( const SEQUENCE< PROPERTYVALUE >& seqPrinter )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL print( const SEQUENCE< PROPERTYVALUE >& seqOptions )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XStorable2
+ //____________________________________________________________________________________________________
+
+ virtual void SAL_CALL storeSelf( const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XStorable
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual sal_Bool SAL_CALL hasLocation() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual OUSTRING SAL_CALL getLocation() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual sal_Bool SAL_CALL isReadonly() throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL store() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL storeAsURL( const OUSTRING& sURL ,
+ const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL storeToURL( const OUSTRING& sURL ,
+ const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+
+
+
+ //____________________________________________________________________________________________________
+ // XLoadable
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL initNew()
+ throw (::com::sun::star::frame::DoubleInitializationException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::uno::Exception);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL load( const SEQUENCE< PROPERTYVALUE >& seqArguments )
+ throw (::com::sun::star::frame::DoubleInitializationException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::uno::Exception);
+
+ //____________________________________________________________________________________________________
+ // XDocumentSubStorageSupplier
+ //____________________________________________________________________________________________________
+
+ virtual REFERENCE< XSTORAGE > SAL_CALL getDocumentSubStorage( const ::rtl::OUString& aStorageName, sal_Int32 nMode )
+ throw ( RUNTIMEEXCEPTION );
+
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getDocumentSubStoragesNames()
+ throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
+
+ //____________________________________________________________________________________________________
+ // XStorageBasedDocument
+ //____________________________________________________________________________________________________
+
+ virtual void SAL_CALL loadFromStorage( const REFERENCE< XSTORAGE >& xStorage,
+ const SEQUENCE< PROPERTYVALUE >& aMediaDescriptor )
+ throw ( ILLEGALARGUMENTEXCEPTION,
+ DOUBLEINITIALIZATIONEXCEPTION,
+ IOEXCEPTION,
+ EXCEPTION,
+ RUNTIMEEXCEPTION );
+
+ virtual void SAL_CALL storeToStorage( const REFERENCE< XSTORAGE >& xStorage,
+ const SEQUENCE< PROPERTYVALUE >& aMediaDescriptor )
+ throw ( ILLEGALARGUMENTEXCEPTION,
+ IOEXCEPTION,
+ EXCEPTION,
+ RUNTIMEEXCEPTION );
+
+ virtual void SAL_CALL switchToStorage( const REFERENCE< XSTORAGE >& xStorage )
+ throw ( ILLEGALARGUMENTEXCEPTION,
+ IOEXCEPTION,
+ EXCEPTION,
+ RUNTIMEEXCEPTION );
+
+ virtual REFERENCE< XSTORAGE > SAL_CALL getDocumentStorage()
+ throw ( IOEXCEPTION,
+ EXCEPTION,
+ RUNTIMEEXCEPTION );
+
+ virtual void SAL_CALL addStorageChangeListener(
+ const REFERENCE< ::com::sun::star::document::XStorageChangeListener >& xListener )
+ throw ( RUNTIMEEXCEPTION );
+
+ virtual void SAL_CALL removeStorageChangeListener(
+ const REFERENCE< ::com::sun::star::document::XStorageChangeListener >& xListener )
+ throw ( RUNTIMEEXCEPTION );
+
+ //____________________________________________________________________________________________________
+ // XVisualObject
+ //____________________________________________________________________________________________________
+
+ virtual void SAL_CALL setVisualAreaSize( sal_Int64 nAspect, const ::com::sun::star::awt::Size& aSize )
+ throw ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::embed::WrongStateException,
+ ::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::awt::Size SAL_CALL getVisualAreaSize( sal_Int64 nAspect )
+ throw ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::embed::WrongStateException,
+ ::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation( ::sal_Int64 nAspect )
+ throw ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::embed::WrongStateException,
+ ::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL getMapUnit( sal_Int64 nAspect )
+ throw ( ::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException );
+
+ //____________________________________________________________________________________________________
+ // XScriptProviderSupplier
+ //____________________________________________________________________________________________________
+
+ virtual REFERENCE< XSCRIPTPROVIDER > SAL_CALL getScriptProvider() throw ( RUNTIMEEXCEPTION );
+
+ //____________________________________________________________________________________________________
+ // XUIConfigurationManagerSupplier
+ //____________________________________________________________________________________________________
+ virtual REFERENCE< XUICONFIGURATIONMANAGER > SAL_CALL getUIConfigurationManager() throw ( RUNTIMEEXCEPTION );
+
+ //____________________________________________________________________________________________________
+ // XTransferable
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual ANY SAL_CALL getTransferData( const DATAFLAVOR& aFlavor )
+ throw (::com::sun::star::datatransfer::UnsupportedFlavorException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+
+ virtual SEQUENCE< DATAFLAVOR > SAL_CALL getTransferDataFlavors()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual sal_Bool SAL_CALL isDataFlavorSupported( const DATAFLAVOR& aFlavor )
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ //____________________________________________________________________________________________________
+ // XEventsSupplier
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr - offers a list of event handlers which are be bound to events of
+ this object.
+ @seealso -
+
+ @param -
+
+ @return - an <type>Events</type> object.
+
+ @onerror -
+ */
+
+ virtual REFERENCE< XNAMEREPLACE > SAL_CALL getEvents() throw( RUNTIMEEXCEPTION );
+
+
+ //____________________________________________________________________________________________________
+ // XEmbeddedScripts
+ //____________________________________________________________________________________________________
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer > SAL_CALL getBasicLibraries() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer > SAL_CALL getDialogLibraries() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAllowMacroExecution() throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XScriptInvocationContext
+ //____________________________________________________________________________________________________
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > SAL_CALL getScriptContainer() throw (::com::sun::star::uno::RuntimeException);
+
+ //____________________________________________________________________________________________________
+ // XEventBroadcaster
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr - registers the given <type>XEventListener</type>.
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL addEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr - unregisters the given <type>XEventListener</type>.
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ virtual void SAL_CALL removeEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
+
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ // css.frame.XModule
+ virtual void SAL_CALL setIdentifier(const ::rtl::OUString& sIdentifier)
+ throw (css::uno::RuntimeException);
+
+ // css.frame.XModule
+ virtual ::rtl::OUString SAL_CALL getIdentifier()
+ throw (css::uno::RuntimeException);
+
+ // css.frame.XTitle
+ virtual ::rtl::OUString SAL_CALL getTitle()
+ throw (css::uno::RuntimeException);
+
+ // css.frame.XTitle
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle )
+ throw (css::uno::RuntimeException);
+
+ // css.frame.XTitleChangeBroadcaster
+ virtual void SAL_CALL addTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener )
+ throw (css::uno::RuntimeException);
+
+ // css.frame.XTitleChangeBroadcaster
+ virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener )
+ throw (css::uno::RuntimeException);
+
+ // css.frame.XUntitledNumbers
+ virtual ::sal_Int32 SAL_CALL leaseNumber( const css::uno::Reference< css::uno::XInterface >& xComponent )
+ throw (css::lang::IllegalArgumentException,
+ css::uno::RuntimeException );
+
+ // css.frame.XUntitledNumbers
+ virtual void SAL_CALL releaseNumber( ::sal_Int32 nNumber )
+ throw (css::lang::IllegalArgumentException,
+ css::uno::RuntimeException );
+
+ // css.frame.XUntitledNumbers
+ virtual void SAL_CALL releaseNumberForComponent( const css::uno::Reference< css::uno::XInterface >& xComponent )
+ throw (css::lang::IllegalArgumentException,
+ css::uno::RuntimeException );
+
+ // css.frame.XUntitledNumbers
+ virtual ::rtl::OUString SAL_CALL getUntitledPrefix()
+ throw (css::uno::RuntimeException);
+
+ // css.document.XDocumentRecovery
+ virtual ::sal_Bool SAL_CALL wasModifiedSinceLastSave()
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL storeToRecoveryFile( const ::rtl::OUString& i_TargetLocation, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_MediaDescriptor )
+ throw ( ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::lang::WrappedTargetException );
+ virtual void SAL_CALL recoverFromFile( const ::rtl::OUString& i_SourceLocation, const ::rtl::OUString& i_SalvagedFile, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_MediaDescriptor )
+ throw ( ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::lang::WrappedTargetException );
+
+ //____________________________________________________________________________________________________
+
+ // ::com::sun::star::rdf::XNode:
+ virtual ::rtl::OUString SAL_CALL getStringValue()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::rdf::XURI:
+ virtual ::rtl::OUString SAL_CALL getNamespace()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getLocalName()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::rdf::XRepositorySupplier:
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XRepository > SAL_CALL getRDFRepository()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::rdf::XDocumentMetadataAccess:
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > SAL_CALL
+ getElementByMetadataReference(
+ const ::com::sun::star::beans::StringPair & i_rReference)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > SAL_CALL
+ getElementByURI(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xURI)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > > SAL_CALL getMetadataGraphsWithType(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xType)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI> SAL_CALL
+ addMetadataFile(const ::rtl::OUString & i_rFileName,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XURI >
+ > & i_rTypes)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::ElementExistException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI> SAL_CALL
+ importMetadataFile(::sal_Int16 i_Format,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::io::XInputStream > & i_xInStream,
+ const ::rtl::OUString & i_rFileName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xBaseURI,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XURI >
+ > & i_rTypes)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::datatransfer::UnsupportedFlavorException,
+ ::com::sun::star::container::ElementExistException,
+ ::com::sun::star::rdf::ParseException,
+ ::com::sun::star::io::IOException);
+ virtual void SAL_CALL removeMetadataFile(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xGraphName)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException);
+ virtual void SAL_CALL addContentOrStylesFile(
+ const ::rtl::OUString & i_rFileName)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::ElementExistException);
+ virtual void SAL_CALL removeContentOrStylesFile(
+ const ::rtl::OUString & i_rFileName)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException);
+
+ virtual void SAL_CALL loadMetadataFromStorage(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::embed::XStorage > & i_xStorage,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XURI > & i_xBaseURI,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::task::XInteractionHandler> & i_xHandler)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+ virtual void SAL_CALL storeMetadataToStorage(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::embed::XStorage > & i_xStorage)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+ virtual void SAL_CALL loadMetadataFromMedium(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > & i_rMedium)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+ virtual void SAL_CALL storeMetadataToMedium(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > & i_rMedium)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException);
+
+
+ //____________________________________________________________________________________________________
+ // SfxListener
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ void Notify( SfxBroadcaster& aBC ,
+ const SfxHint& aHint ) ;
+
+ //____________________________________________________________________________________________________
+ // public IMPL?
+ //____________________________________________________________________________________________________
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ void changing() ;
+ SAL_DLLPRIVATE void impl_change() ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ SfxObjectShell* GetObjectShell() const ;
+ SAL_DLLPRIVATE SfxObjectShell* impl_getObjectShell() const ;
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ SAL_DLLPRIVATE sal_Bool impl_isDisposed() const ;
+ sal_Bool IsDisposed() const ;
+ sal_Bool IsInitialized() const;
+
+ ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData() throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setViewData( const ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess >& aData ) throw (::com::sun::star::uno::RuntimeException);
+
+ /** calls all XEventListeners */
+ void notifyEvent( const ::com::sun::star::document::EventObject& aEvent ) const;
+
+ /** returns true if someone added a XEventListener to this XEventBroadcaster */
+ sal_Bool hasEventListeners() const;
+
+protected:
+
+ /* returns a unique id for the model that is valid as long as the document
+ is loaded. The id is not saved across document close/reload. */
+ rtl::OUString getRuntimeUID() const;
+
+ /* returns true if the document signatures are valid, otherwise false */
+ sal_Bool hasValidSignatures() const;
+
+//________________________________________________________________________________________________________
+// private methods
+//________________________________________________________________________________________________________
+
+private:
+
+ /**___________________________________________________________________________________________________
+ @short -
+ @descr -
+
+ @seealso -
+
+ @param -
+
+ @return -
+
+ @onerror -
+ */
+
+ bool impl_getPrintHelper();
+ SAL_DLLPRIVATE void ListenForStorage_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ SAL_DLLPRIVATE ::rtl::OUString GetMediumFilterName_Impl();
+
+ SAL_DLLPRIVATE void impl_store( const OUSTRING& sURL ,
+ const SEQUENCE< PROPERTYVALUE >& seqArguments ,
+ sal_Bool bSaveTo ) ;
+ SAL_DLLPRIVATE void postEvent_Impl( ::rtl::OUString );
+ SAL_DLLPRIVATE String getEventName_Impl( long nID );
+ SAL_DLLPRIVATE void NotifyStorageListeners_Impl();
+ SAL_DLLPRIVATE bool QuerySaveSizeExceededModules( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler );
+
+ SAL_DLLPRIVATE css::uno::Reference< css::frame::XTitle > impl_getTitleHelper ();
+ SAL_DLLPRIVATE css::uno::Reference< css::frame::XUntitledNumbers > impl_getUntitledHelper ();
+
+ SAL_DLLPRIVATE SfxViewFrame* FindOrCreateViewFrame_Impl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
+ ::sfx::intern::ViewCreationGuard& i_rGuard
+ ) const;
+
+ SAL_DLLPRIVATE void NotifyModifyListeners_Impl() const;
+
+//________________________________________________________________________________________________________
+// private variables and methods
+//________________________________________________________________________________________________________
+
+private:
+
+ IMPL_SfxBaseModel_DataContainer* m_pData ;
+ // cannot be held in m_pData, since it needs to be accessed in non-threadsafe context
+ const bool m_bSupportEmbeddedScripts;
+ const bool m_bSupportDocRecovery;
+
+} ; // class SfxBaseModel
+
+class SFX2_DLLPUBLIC SfxModelGuard
+{
+public:
+ enum AllowedModelState
+ {
+ // not yet initialized
+ E_INITIALIZING,
+ // fully alive, i.e. initialized, and not yet disposed
+ E_FULLY_ALIVE
+ };
+
+ SfxModelGuard( SfxBaseModel& i_rModel, const AllowedModelState i_eState = E_FULLY_ALIVE )
+ :m_aGuard( Application::GetSolarMutex() )
+ {
+ if ( i_rModel.IsDisposed() )
+ throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(), *&i_rModel );
+ if ( ( i_eState != E_INITIALIZING ) && !i_rModel.IsInitialized() )
+ throw ::com::sun::star::lang::NotInitializedException( ::rtl::OUString(), *&i_rModel );
+ }
+ ~SfxModelGuard()
+ {
+ }
+
+ void clear()
+ {
+ m_aGuard.clear();
+ }
+
+private:
+ ::vos::OClearableGuard m_aGuard;
+};
+
+#undef css
+
+#endif // _SFX_SFXBASEMODEL_HXX_
diff --git a/sfx2/inc/sfx2/sfxdefs.hxx b/sfx2/inc/sfx2/sfxdefs.hxx
new file mode 100644
index 000000000000..7a5a7e96f70b
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxdefs.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * 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 _SFXDEFS_HXX
+#define _SFXDEFS_HXX
+
+#define MESSAGEFILE_SDM_EXT "sdm" // Extension des neuen Formats
+#define MESSAGEFILE_EXT "smd" // Extension der Single-Mail/News-Files
+#define MESSAGETEMPFILE_EXT "sd~" // Extension f"ur Mail/News-TempFiles
+
+#define SfxFilterFlags ULONG
+#define PRODUCT_VERSION "5.0"
+
+#endif
+
diff --git a/sfx2/inc/sfx2/sfxdlg.hxx b/sfx2/inc/sfx2/sfxdlg.hxx
new file mode 100644
index 000000000000..d82abeefe8bc
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxdlg.hxx
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * 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 _SFX2_DIALOG_HXX
+#define _SFX2_DIALOG_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <vcl/abstdlg.hxx>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+
+#include <sot/exchange.hxx>
+#include <sfx2/lnkbase.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.h>
+
+class SfxTabPage;
+class SfxViewFrame;
+class SfxBindings;
+class SfxItemSet;
+class ResId;
+class Window;
+class String;
+class SfxItemPool;
+class SvObjectServerList;
+class TransferableDataHelper;
+struct TransferableObjectDescriptor;
+
+#include <sfx2/tabdlg.hxx>
+//typedef SfxTabPage* (*CreateTabPage)(Window *pParent, const SfxItemSet &rAttrSet);
+//typedef USHORT* (*GetTabPageRanges)();
+
+namespace sfx2
+{
+ class LinkManager;
+}
+
+namespace com { namespace sun { namespace star { namespace frame {
+ class XModel;
+} } } }
+
+class SfxAbstractDialog : public VclAbstractDialog
+{
+public:
+ virtual const SfxItemSet* GetOutputItemSet() const = 0;
+ virtual void SetText( const XubString& rStr ) = 0;
+ virtual String GetText() const = 0;
+};
+
+class SfxAbstractTabDialog : public SfxAbstractDialog
+{
+public:
+ virtual void SetCurPageId( USHORT nId ) = 0;
+ virtual const USHORT* GetInputRanges( const SfxItemPool& ) = 0;
+ virtual void SetInputSet( const SfxItemSet* pInSet ) = 0;
+};
+
+class SfxAbstractInsertObjectDialog : public VclAbstractDialog
+{
+public:
+ virtual com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObject()=0;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetIconIfIconified( ::rtl::OUString* pGraphicMediaType )=0;
+ virtual BOOL IsCreateNew()=0;
+};
+
+class SfxAbstractPasteDialog : public VclAbstractDialog
+{
+public:
+ virtual void Insert( SotFormatStringId nFormat, const String & rFormatName ) = 0;
+ virtual void SetObjName( const SvGlobalName & rClass, const String & rObjName ) = 0;
+ virtual ULONG GetFormat( const TransferableDataHelper& aHelper,
+ const DataFlavorExVector* pFormats=0,
+ const TransferableObjectDescriptor* pDesc=0 ) = 0;
+};
+
+class SfxAbstractLinksDialog : public VclAbstractDialog
+{
+};
+
+class AbstractScriptSelectorDialog : public VclAbstractDialog
+{
+public:
+ virtual String GetScriptURL() const = 0;
+ virtual void SetRunLabel() = 0;
+};
+
+namespace com { namespace sun { namespace star { namespace frame { class XFrame; } } } }
+
+class SFX2_DLLPUBLIC SfxAbstractDialogFactory : virtual public VclAbstractDialogFactory
+{
+public:
+ virtual ~SfxAbstractDialogFactory(); // needed for export of vtable
+ static SfxAbstractDialogFactory* Create();
+ virtual VclAbstractDialog* CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ) = 0;
+ virtual VclAbstractDialog* CreateFrameDialog( Window* pParent, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, sal_uInt32 nResId, const String& rParameter ) = 0;
+ virtual SfxAbstractTabDialog* CreateTabDialog( sal_uInt32 nResId,
+ Window* pParent,
+ const SfxItemSet* pAttrSet,
+ SfxViewFrame* pViewFrame,
+ bool bEditFmt=false,
+ const String *pUserButtonText=0 ) = 0;
+ virtual SfxAbstractTabDialog* CreateTabDialog( sal_uInt32 nResId,
+ Window* pParent,
+ const SfxItemSet* pAttrSet,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xViewFrame,
+ bool bEditFmt=false,
+ const String *pUserButtonText=0 ) = 0;
+ virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0;
+ virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0;
+ virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( Window* pParent, USHORT nSlotId,
+ const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStor,
+ const SvObjectServerList* pList = 0 )=0;
+ virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, USHORT nSlotId,
+ const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj )=0;
+ virtual SfxAbstractPasteDialog* CreatePasteDialog( Window* pParent )=0;
+ virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML=FALSE, sfx2::SvBaseLink* p=0 )=0;
+ virtual VclAbstractDialog * CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage ) = 0;
+
+ virtual AbstractScriptSelectorDialog*
+ CreateScriptSelectorDialog(
+ Window* pParent,
+ BOOL bShowSlots,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame
+ ) = 0;
+
+ virtual VclAbstractDialog* CreateScriptErrorDialog(
+ Window* pParent, com::sun::star::uno::Any aException ) = 0;
+
+ virtual VclAbstractDialog* CreateOptionsDialog(
+ Window* pParent, const rtl::OUString& rExtensionId, const rtl::OUString& rApplicationContext ) = 0;
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/sfxhtml.hxx b/sfx2/inc/sfx2/sfxhtml.hxx
new file mode 100644
index 000000000000..9b1fcf60efbb
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxhtml.hxx
@@ -0,0 +1,133 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFXHTML_HXX
+#define _SFXHTML_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <i18npool/lang.h>
+#include <svtools/parhtml.hxx>
+#include <svl/macitem.hxx>
+
+
+class ImageMap;
+class SfxMedium;
+class SfxObjectShell;
+
+class SFX2_DLLPUBLIC SfxHTMLParser : public HTMLParser
+{
+ DECL_DLLPRIVATE_STATIC_LINK( SfxHTMLParser, FileDownloadDone, void* );
+
+ String aScriptType;
+
+ SfxMedium* pMedium;
+ SfxMedium *pDLMedium; // Medium fuer Download von Files
+
+ USHORT nMetaTags; // Anzahl der bisher gelesenen Meta-Tags
+ ScriptType eScriptType;
+
+ SAL_DLLPRIVATE void GetScriptType_Impl( SvKeyValueIterator* );
+
+protected:
+
+ SfxHTMLParser( SvStream& rStream, BOOL bNewDoc=TRUE, SfxMedium *pMedium=0 );
+
+ virtual ~SfxHTMLParser();
+
+public:
+ // Lesen der Optionen einer Image-Map
+ // <MAP>: TRUE = Image-Map hat einen Namen
+ // <AREA>: TRUE = Image-Map hat jetzt einen Bereich mehr
+ static BOOL ParseMapOptions(ImageMap * pImageMap,
+ const HTMLOptions * pOptions );
+ BOOL ParseMapOptions(ImageMap * pImageMap)
+ { return ParseMapOptions(pImageMap, GetOptions()); }
+ static BOOL ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
+ const HTMLOptions * pOptions,
+ USHORT nEventMouseOver = 0,
+ USHORT nEventMouseOut = 0 );
+ inline BOOL ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
+ USHORT nEventMouseOver = 0,
+ USHORT nEventMouseOut = 0);
+
+ // <TD SDVAL="..." SDNUM="...">
+ static double GetTableDataOptionsValNum( sal_uInt32& nNumForm,
+ LanguageType& eNumLang, const String& aValStr,
+ const String& aNumStr, SvNumberFormatter& rFormatter );
+
+protected:
+
+ // Start eines File-Downloads. Dieser erfolgt synchron oder asynchron.
+ // Im synchronen Fall befindet sich der Parser nach dem Aufruf im
+ // Working-Zustand. Die gelesene Datei kann dann direkt mit
+ // FinishFileDownload abgeholt werden.
+ // Im asynchronen Fall befindet sich der Parser nach dem Aufruf im
+ // Pending-Zustand. Der Parser muss dann ueber das Continue verlassen
+ // werden (ohne Reschedule!). Wenn die Datei geladen ist, wird
+ // ein Continue mit dem uebergebenen Token aufgerufen. Die Datei kann
+ // dann wiederum mit FinishFileDownload abgeholt werden.
+ // Zum Abbrechen des Dwonloads sollte eine Shell uebergeben werden.
+ // Es kann nur ein einziger Download gleichzeitig existieren. Fuer jeden
+ // gestarteten Download muss FinshFileDownload aufgerufen werden.
+ void StartFileDownload( const String& rURL, int nToken,
+ SfxObjectShell *pSh=0 );
+
+ // Ermittelnd des MIME-Types eines zuvor downloadeten Files. Kann nur
+ // unmittelbar vor FinishFileDownload aufgerufen werden, nie aber
+ // danach.
+
+ BOOL GetFileDownloadMIME( String& rMime );
+
+ // Beenden eines asynchronen File-Downloads. Gibt TRUE zurueck, wenn
+ // der Download geklappt hat. Das gelesene File befindet sich dann in
+ // dem uebergeben String.
+ BOOL FinishFileDownload( String& rStr );
+
+ // Gibt TRUE zurueck, wenn ein File downloaded wurde und
+ // FileDownloadFinished noch nicht gerufen wurde.
+ BOOL ShouldFinishFileDownload() const { return pDLMedium != 0; }
+
+ SfxMedium *GetMedium() { return pMedium; }
+ const SfxMedium *GetMedium() const { return pMedium; }
+
+ // Default (auch ohne Iterator) ist JavaScript
+ ScriptType GetScriptType( SvKeyValueIterator* ) const;
+ const String& GetScriptTypeString( SvKeyValueIterator* ) const;
+};
+
+inline BOOL SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
+ USHORT nEventMouseOver,
+ USHORT nEventMouseOut)
+{
+ return ParseAreaOptions( pImageMap, rBaseURL, GetOptions(),
+ nEventMouseOver, nEventMouseOut );
+}
+
+
+#endif
diff --git a/sfx2/inc/sfx2/sfxmodelfactory.hxx b/sfx2/inc/sfx2/sfxmodelfactory.hxx
new file mode 100644
index 000000000000..416358cb60e2
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxmodelfactory.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SFX2_SFXMODELFACTORY_HXX
+#define SFX2_SFXMODELFACTORY_HXX
+
+#include "sfx2/dllapi.h"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+/** === end UNO includes === **/
+
+//........................................................................
+namespace sfx2
+{
+//........................................................................
+
+ #define SFXMODEL_STANDARD (sal_uInt64)(0x0000)
+ #define SFXMODEL_EMBEDDED_OBJECT (sal_uInt64)(0x0001)
+ #define SFXMODEL_DISABLE_EMBEDDED_SCRIPTS (sal_uInt64)(0x0002)
+ #define SFXMODEL_DISABLE_DOCUMENT_RECOVERY (sal_uInt64)(0x0004)
+
+ typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ( SAL_CALL * SfxModelFactoryFunc ) (
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
+ const sal_uInt64 _nCreationFlags
+ );
+
+ //====================================================================
+ //= createSfxModelFactory
+ //====================================================================
+ /** creates a XSingleServiceFactory which can be used to created instances
+ of classes derived from SfxBaseModel
+
+ In opposite to the default implementations from module cppuhelper, this
+ factory evaluates certain creation arguments (passed to createInstanceWithArguments)
+ and passes them to the factory function of the derived class.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory >
+ SFX2_DLLPUBLIC createSfxModelFactory(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceFactory,
+ const ::rtl::OUString& _rImplementationName,
+ const SfxModelFactoryFunc _pComponentFactoryFunc,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rServiceNames
+ );
+
+//........................................................................
+} // namespace sfx2
+//........................................................................
+
+#endif // SFX2_SFXMODELFACTORY_HXX
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
new file mode 100644
index 000000000000..bc4c11b53184
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -0,0 +1,1002 @@
+/*************************************************************************
+ *
+ * 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 _SFXSIDS_HRC
+#define _SFXSIDS_HRC
+
+// include ---------------------------------------------------------------
+
+#include <svl/solar.hrc>
+#include <sfx2/cntids.hrc>
+#include <svl/memberid.hrc>
+
+// Please be careful:
+// Changing just one part here doesn't add new
+// docking windows automatically!
+//
+
+#define SID_DOCKWIN_0 SID_DOCKWIN_START
+#define SID_DOCKWIN_1 SID_DOCKWIN_START+1
+#define SID_DOCKWIN_2 SID_DOCKWIN_START+2
+#define SID_DOCKWIN_3 SID_DOCKWIN_START+3
+#define SID_DOCKWIN_4 SID_DOCKWIN_START+4
+#define SID_DOCKWIN_5 SID_DOCKWIN_START+5
+#define SID_DOCKWIN_6 SID_DOCKWIN_START+6
+#define SID_DOCKWIN_7 SID_DOCKWIN_START+7
+#define SID_DOCKWIN_8 SID_DOCKWIN_START+8
+#define SID_DOCKWIN_9 SID_DOCKWIN_START+9
+
+//=========================================================================
+
+#define SID_NONE 0
+#define SID_UNKNOWN SID_SFX_START
+
+//-------------------------------------------------------------------------
+
+#define SID_STDTENPLATE_MENU_START (SID_SFX_START + 3100)
+#define SID_STDTENPLATE_MENU_END (SID_SFX_START + 3140)
+
+// default-ids for application
+#define SID_QUITAPP (SID_SFX_START + 300)
+#define SID_ABOUT (SID_SFX_START + 301)
+#define SID_SETUPPRINTER (SID_SFX_START + 302)
+#define SID_EXITANDRETURN (SID_SFX_START + 303)
+
+// SID_TITLE steht unter diesem Wert in chaos/cntids.hrc!!
+//#define SID_TITLE (SID_SFX_START + 307)
+
+#define SID_CONTEXT (SID_SFX_START + 310)
+
+#define SID_PASTE_SPECIAL (SID_SFX_START + 311)
+#define SID_CLIPBOARD_FORMAT_ITEMS (SID_SFX_START + 312)
+
+#define SID_VERSION_VISIBLE (SID_SFX_START + 313)
+#define SID_PASTE_UNFORMATTED (SID_SFX_START + 314)
+#define SID_PRINTER_NOTFOUND_WARN (SID_SFX_START + 320)
+#define SID_PRINTER_USETHREAD (SID_SFX_START + 321)
+#define SID_PRINTER_NAME (SID_SFX_START + 322)
+#define SID_PRINTER_FORMATCHG_WARN (SID_SFX_START + 323)
+#define SID_PRINTER_CHANGESTODOC (SID_SFX_START + 324)
+#define SID_PRINTPREVIEW (SID_SFX_START + 325)
+
+#define SID_MAIL_SUBJECT (SID_SFX_START + 328)
+#define SID_MAIL_NOTIFY (SID_SFX_START + 330)
+#define SID_MAIL_SENDDOC (SID_SFX_START + 331)
+#define SID_MAIL_SENDDOCASPDF (SID_SFX_START + 1672)
+
+#define SID_MAIL_RECIPIENT (SID_SFX_START + 334)
+#define SID_MAIL_TEXT (SID_SFX_START + 335)
+#define SID_MAIL_ATTACH (SID_SFX_START + 336)
+#define SID_MAIL_PRIORITY (SID_SFX_START + 337)
+
+#define SID_MAIL_ATTACH_FILE (SID_SFX_START + 375)
+
+#define SID_MAIL_EXPORT_FINISHED (SID_SFX_START + 388)
+#define SID_WEBHTML (SID_SFX_START + 393)
+#define SID_MAIL_SCROLLBODY_PAGEDOWN (SID_SFX_START + 1588)
+
+#define SID_PROGRESS_STATUSBAR_CONTROL (SID_SFX_START + 1597)
+
+#define SID_APPLICATION (SID_SFX_START + 340)
+#define SID_PROGNAME (SID_SFX_START + 341)
+#define SID_PROGFILENAME (SID_SFX_START + 342)
+#define SID_SELECTION (SID_SFX_START + 346)
+
+// 360-400 siehe SID_MAIL_...
+
+// default-ids for help
+#define SID_HELPONHELP (SID_SFX_START + 400)
+#define SID_HELPINDEX (SID_SFX_START + 401)
+#define SID_EXTENDEDHELP (SID_SFX_START + 402)
+#define SID_HELPBALLOONS (SID_SFX_START + 403)
+#define SID_HELPTIPS (SID_SFX_START + 404)
+#define SID_HELPMENU (SID_SFX_START + 410)
+#define SID_HELP_INDEX (SID_SFX_START + 411)
+#define SID_HELP_SEARCH (SID_SFX_START + 412)
+#define SID_HELP_ANNOTATE (SID_SFX_START + 413)
+#define SID_HELP_BOOKMARK (SID_SFX_START + 414)
+#define SID_HELP_DOWNLOAD (SID_SFX_START + 415)
+#define SID_HELP_START (SID_SFX_START + 416)
+#define SID_HELP_ZOOMIN (SID_SFX_START + 417)
+#define SID_HELP_ZOOMOUT (SID_SFX_START + 418)
+#define SID_HELP_HELPFILEBOX (SID_SFX_START + 419)
+#define SID_HELP_HELPFILEBOX_SELECTED (SID_SFX_START + 420)
+#define SID_HELP_SUPPORTPAGE (SID_SFX_START + 1683)
+#define SID_HELP_TUTORIALS (SID_SFX_START + 1695)
+
+// default-ids for document
+#define SID_NEWDOC (SID_SFX_START + 500)
+#define SID_OPENDOC (SID_SFX_START + 501)
+#define SID_OPENURL (SID_SFX_START + 596)
+#define SID_SAVEASURL (SID_SFX_START + 643)
+#define SID_JUMPTOMARK (SID_SFX_START + 598)
+#define SID_OPENTEMPLATE (SID_SFX_START + 594)
+#define SID_SAVEASDOC (SID_SFX_START + 502)
+#define SID_CLOSING (SID_SFX_START +1539)
+#define SID_CLOSEDOC (SID_SFX_START + 503)
+#define SID_CLOSEDOCS (SID_SFX_START + 595)
+#define SID_CLOSEDOC_SAVE (SID_SFX_START + 1)
+#define SID_CLOSEDOC_FILENAME (SID_SFX_START + 2)
+#define SID_PRINTDOC (SID_SFX_START + 504)
+#define SID_PRINT_FIRST_PAGE (SID_SFX_START + 1)
+#define SID_PRINT_LAST_PAGE (SID_SFX_START + 2)
+#define SID_PRINT_COPIES (SID_SFX_START + 3)
+#define SID_PRINT_PAGES (SID_SFX_START +1589)
+#define SID_PRINT_COLLATE (SID_SFX_START +1590)
+#define SID_PRINT_SORT (SID_SFX_START +1591)
+#define SID_SAVEDOC (SID_SFX_START + 505)
+#define SID_UPDATEDOC (SID_SFX_START + 506)
+#define SID_FILE_NAME (SID_SFX_START + 507)
+#define SID_DOCINFO_TITLE (SID_SFX_START + 557)
+#define SID_FILE_FILTEROPTIONS (SID_SFX_START + 527)
+#define SID_RELOAD (SID_SFX_START + 508)
+#define SID_PRINTDOCDIRECT (SID_SFX_START + 509)
+#define SID_PICKLIST (SID_SFX_START + 510)
+#define SID_PLUGIN_MODE (SID_SFX_START + 827)
+#define SID_EXPORTDOC (SID_SFX_START + 829)
+#define SID_EXPORTDOCASPDF (SID_SFX_START + 1673)
+#define SID_DIRECTEXPORTDOCASPDF (SID_SFX_START + 1674)
+#define SID_UPDATEDOCMODE (SID_SFX_START + 1668)
+
+#define SID_FORCERELOAD (SID_SFX_START + 1502)
+#define SID_FILE_DIALOG (SID_SFX_START + 304)
+#define SID_PATH (SID_SFX_START + 308)
+#define SID_SAVEDOCS (SID_SFX_START + 309)
+#define SID_STANDARD_DIR (SID_SFX_START + 450)
+#define SID_BLACK_LIST (SID_SFX_START + 451)
+
+// browse-ids
+#define SID_BROWSE_FORWARD (SID_SFX_START + 1300)
+#define SID_BROWSE_BACKWARD (SID_SFX_START + 1301)
+#define SID_BROWSE_HOME (SID_SFX_START + 1303)
+#define SID_CREATELINK (SID_SFX_START + 1309)
+#define SID_BOOKMARK_TITLE (SID_SFX_START + 1310)
+#define SID_BOOKMARK_URL (SID_SFX_START + 1311)
+#define SID_EDITDOC (SID_SFX_START + 1312)
+#define SID_BROWSER_MODE (SID_SFX_START + 1313)
+#define SID_PLUGINS_ACTIVE (SID_SFX_START + 1314)
+#define SID_BROWSER (SID_SFX_START + 1318)
+#define SID_MACROEXECMODE (SID_SFX_START + 1319)
+
+// die Id steht mit diesem Wert in chaos/cntids.hrc!!
+//#define SID_INTERNET_ONLINE (SID_SFX_START + 1370)
+
+#define SID_FILTER_DATA (SID_SFX_START + 1375)
+
+#define SID_EXPLORER_FILEPROPS_START (SID_SFX_START + 1390)
+#define SID_EXPLORER_FILEPROPS_END (SID_SFX_START + 1399)
+
+#define ID_FILETP_START SID_EXPLORER_FILEPROPS_START
+#define ID_FILETP_READONLY (ID_FILETP_START + 0)
+#define ID_FILETP_TITLE (ID_FILETP_START + 1)
+
+#define SID_EXPLORER_PROPS_START (SID_SFX_START + 1410)
+#define SID_EXPLORER_PROPS_END (SID_SFX_START + 1499)
+
+#define SID_AUTOLOAD (SID_SFX_START + 1509)
+#define SID_FILLFRAME (SID_SFX_START + 1516)
+#define SID_BASEURL (SID_SFX_START + 1518)
+#define SID_TEMPLATE (SID_SFX_START + 1519)
+
+#define SID_ONLINE_REGISTRATION (SID_SFX_START + 1537)
+
+#define SID_ONLINE_REGISTRATION_DLG (SID_SFX_START + 1540)
+#define SID_CONTENTTYPE (SID_SFX_START + 1541)
+
+#define SID_SAVETO (SID_SFX_START + 1546)
+
+#define SID_CREATE_BASICOBJECT (SID_SFX_START + 1555)
+#define SID_DELETE_BASICOBJECT (SID_SFX_START + 1556)
+
+//#define SID_EXPLORER_CREATEPROJECT (SID_SFX_START + 1567)
+
+#define SID_UPDATE_VERSION (SID_SFX_START + 1568)
+#define SID_BUILD_VERSION (SID_SFX_START + 1569)
+
+#define SID_VERSION (SID_SFX_START + 1583)
+
+#define SID_DOCUMENT_COMPARE (SID_SFX_START + 1586)
+#define SID_DOCUMENT_MERGE (SID_SFX_START + 1587)
+
+#define SID_OFFICE_PLK (SID_SFX_START + 1601)
+#define SID_OFFICE_PALK (SID_SFX_START + 1604)
+#define SID_CHECK_KEY (SID_SFX_START + 1605)
+#define SID_OFFICE_PRIVATE_USE (SID_SFX_START + 1606)
+#define SID_OFFICE_COMMERCIAL_USE (SID_SFX_START + 1607)
+#define SID_OFFICE_CUSTOMERNUMBER (SID_SFX_START + 1608)
+#define SID_OFFICE_INVALIDATE_TITLE (SID_SFX_START + 1609)
+#define SID_OFFICE_CHECK_PLZ (SID_SFX_START + 1610)
+#define SID_INTERNET_SEARCH (SID_SFX_START + 1611)
+#define SID_CURRENT_URL (SID_SFX_START + 1613)
+#define SID_FSETHTMLPARSER (SID_SFX_START + 1614)
+#define SID_NEXTWINDOW (SID_SFX_START + 1615)
+#define SID_PREVWINDOW (SID_SFX_START + 1616)
+#define SID_OLD_PALK (SID_SFX_START + 1620)
+#define SID_GROUPVIEW (SID_SFX_START + 1621)
+#define SID_NEW_MSG_PARENT (SID_SFX_START + 1622)
+
+
+#define SID_PGP_ENCODE (SID_SFX_START + 1625)
+#define SID_PGP_DECODE (SID_SFX_START + 1626)
+#define SID_TIPWINDOW (SID_SFX_START + 1632)
+#define SID_CHARSET (SID_SFX_START + 1633)
+#define SID_OVERWRITE (SID_SFX_START + 1634)
+#define SID_RENAME (SID_SFX_START + 1653)
+#define SID_PARTWIN (SID_SFX_START + 1640)
+#define SID_CRASH (SID_SFX_START + 1645)
+#define SID_FAIL_ON_WARNING (SID_SFX_START + 1646)
+#define SID_MAIL_CHILDWIN (SID_SFX_START + 1647)
+#define SID_INPUTSTREAM (SID_SFX_START + 1648)
+#define SID_LOGOUT (SID_SFX_START + 1652)
+#define SID_JUMPMARK (SID_SFX_START + 1654)
+#define SID_BROWSE (SID_SFX_START + 1658)
+ // FREE (was: SID_BACKTOWEBTOP)
+#define SID_SEGMENTSIZE (SID_SFX_START + 1659)
+#define SID_VIEW_DATA_SOURCE_BROWSER (SID_SFX_START + 1660)
+#define SID_TOGGLE_MENUBAR (SID_SFX_START + 1661)
+#define SID_UNPACK (SID_SFX_START + 1662)
+// (SID_SFX_START + 1663) used further down
+#define SID_MACRO_WARNING (SID_SFX_START + 1664)
+#define SID_MACRO_CONFIRMATION (SID_SFX_START + 1665)
+#define SID_OUTPUTSTREAM (SID_SFX_START + 1666)
+#define SID_IMAGE_ORIENTATION (SID_SFX_START + 1667)
+
+#define SID_SAVE_VERSION_ON_CLOSE (SID_SFX_START + 1670)
+#define SID_STOP_RECORDING (SID_SFX_START + 1671)
+#define SID_INTERACTIONHANDLER (SID_SFX_START + 1675)
+#define SID_OPENHYPERLINK (SID_SFX_START + 1676)
+#define SID_ADDONLIST (SID_SFX_START + 1677)
+#define SID_ADDONS (SID_SFX_START + 1678)
+#define SID_CONTENT (SID_SFX_START + 1679)
+#define SID_SHOW_IME_STATUS_WINDOW (SID_SFX_START + 1680)
+#define SID_UPDATE_CONFIG (SID_SFX_START + 1681)
+#define SID_VIEWONLY (SID_SFX_START + 1682)
+#define SID_REPAIRPACKAGE (SID_SFX_START + 1683)
+#define SID_ADDONHELP (SID_SFX_START + 1684)
+#define SID_OBJECTSHELL (SID_SFX_START + 1685)
+#define SID_MINIMIZED (SID_SFX_START + 1687)
+#define SID_COMPONENTDATA (SID_SFX_START + 1688)
+#define SID_COMPONENTCONTEXT (SID_SFX_START + 1689)
+#define SID_SCRIPTORGANIZER (SID_SFX_START + 1690)
+#define SID_MACROORGANIZER (SID_SFX_START + 1691)
+#define SID_RUNMACRO (SID_SFX_START + 1692)
+#define SID_AVMEDIA_TOOLBOX (SID_SFX_START + 1693)
+#define SID_AVMEDIA_PLAYER (SID_SFX_START + 1694)
+#define SID_INSERT_AVMEDIA (SID_SFX_START + 1696)
+#define SID_RECENTFILELIST (SID_SFX_START + 1697)
+#define SID_AVAILABLE_TOOLBARS (SID_SFX_START + 1698)
+#define SID_STREAM (SID_SFX_START + 1699)
+#define SID_DOC_BASEURL (SID_SFX_START + 1700)
+#define SID_DOC_HIERARCHICALNAME (SID_SFX_START + 1701)
+#define SID_TERMINATE_INPLACEACTIVATION (SID_SFX_START + 1702)
+#define SID_APPLY_STYLE (SID_SFX_START + 1703)
+#define SID_MACRO_SIGNATURE (SID_SFX_START + 1704)
+#define SID_ATTR_WARNALIENFORMAT (SID_SFX_START + 1705)
+#define SID_COPY_STREAM_IF_POSSIBLE (SID_SFX_START + 1706)
+#define SID_MAIL_SENDDOCASFORMAT (SID_SFX_START + 1707)
+#define SID_MAIL_SENDDOCASMS (SID_SFX_START + 1708)
+#define SID_MAIL_SENDDOCASOOO (SID_SFX_START + 1709)
+#define SID_NOAUTOSAVE (SID_SFX_START + 1711)
+#define SID_PRINT_SELECTEDSHEET (SID_SFX_START + 1712)
+#define SID_OPTIONS_PAGEURL (SID_SFX_START + 1713)
+#define SID_MORE_DICTIONARIES (SID_SFX_START + 1714)
+#define SID_ACTIVATE_STYLE_APPLY (SID_SFX_START + 1715)
+#define SID_FONT_NAME (SID_SFX_START + 1716)
+#define SID_DEFAULTFILENAME (SID_SFX_START + 1717)
+#define SID_SFX_free_START (SID_SFX_START + 1718)
+#define SID_SFX_free_END (SID_SFX_START + 3999)
+
+#define SID_OPEN_NEW_VIEW (SID_SFX_START + 520)
+ // FREE, was SID_VIEW_ZOOM_MODE
+ // FREE, was SID_VIEW_POS_SIZE
+#define SID_VIEW_ID (SID_SFX_START + 523)
+ // FREE, was SID_USER_DATA
+#define SID_VIEW_DATA (SID_SFX_START + 1582)
+#define SID_SILENT (SID_SFX_START + 528)
+#define SID_HIDDEN (SID_SFX_START + 534)
+#define SID_PREVIEW (SID_SFX_START + 1404)
+
+#define SID_FOCUSURLBOX (SID_SFX_START + 1406)
+
+#define SID_ACTIVATE (SID_SFX_START + 525)
+#define SID_PRINTOUT (SID_SFX_START + 526)
+
+#define SID_FILE_LONGNAME (SID_SFX_START + 529)
+#define SID_FILTER_NAME (SID_SFX_START + 530)
+#define SID_DOC_SALVAGE (SID_SFX_START + 531)
+#define SID_INSERTDOC (SID_SFX_START + 532)
+#define SID_TYPE_NAME (SID_SFX_START + 533)
+
+#define SID_DOC_READONLY (SID_SFX_START + 590)
+#define SID_DOC_MODIFIED (SID_SFX_START + 584)
+#define SID_DOC_LOADING (SID_SFX_START + 585)
+#define SID_IMG_LOADING (SID_SFX_START + 586)
+#define SID_DOC_SAVED (SID_SFX_START + 599)
+#define SID_DOC_MODAL (SID_SFX_START + 655)
+#define SID_DOCINFO (SID_SFX_START + 535)
+#define SID_DOCINFO_LOAD (SID_SFX_START + 536)
+#define SID_DOCINFO_SAVE (SID_SFX_START + 537)
+#define SID_DOCINFO_KEYWORDS (SID_SFX_START + 591)
+#define SID_DOCINFO_COMMENTS (SID_SFX_START + 592)
+#define SID_DOCINFO_AUTHOR (SID_SFX_START + 593)
+#define SID_HAS_PASSWORD (SID_SFX_START + 536)
+#define SID_NEWDOCDIRECT (SID_SFX_START + 537)
+#define SID_DOCVIEW (SID_SFX_START + 597)
+#define SID_DOCFRAME (SID_SFX_START + 598)
+#define SID_ONLYSUBFRAMES (SID_SFX_START + 690)
+#define SID_TARGETNAME (SID_SFX_START + 560)
+#define SID_ORIGURL (SID_SFX_START + 644)
+#define SID_POSTSTRING (SID_SFX_START + 645)
+#define SID_POSTDATA (SID_SFX_START + 1536)
+#define SID_DONELINK (SID_SFX_START + 646)
+#define SID_REFERER (SID_SFX_START + 654)
+#define SID_EXPLORER_CONTENT (SID_SFX_START + 656)
+#define SID_MODIFIER (SID_SFX_START + 669)
+#define SID_SETOPTIONS (SID_SFX_START + 670)
+#define SID_OPENCOPY (SID_SFX_START + 674)
+#define SID_SOURCEVIEW (SID_SFX_START + 675)
+#define SID_DOC_STARTPRESENTATION (SID_SFX_START + 695)
+
+#define SID_PLUGFRAMEARG (SID_SFX_START + 666)
+#define SID_NEWWINDOWFOREDIT (SID_SFX_START + 667)
+#define SID_FRAMETITLE (SID_SFX_START + 668)
+
+#define SID_DOCTEMPLATE (SID_SFX_START + 538)
+#define SID_JSCALL (SID_SFX_START + 1382)
+#define SID_AUTOPILOTMENU (SID_SFX_START + 1381)
+
+// Floating Window Vorlagen
+#define SID_STYLE_DESIGNER (SID_SFX_START + 539)
+
+// Organizer
+#define SID_ORGANIZER (SID_SFX_START + 540)
+#define SID_TEMPLATE_ADDRESSBOKSOURCE (SID_SFX_START + 1655)
+
+// Ruby dialog
+#define SID_RUBY_DIALOG (SID_SFX_START + 1656)
+
+#define SID_STYLE_FAMILY_START (SID_SFX_START + 541)
+#define SID_STYLE_FAMILY1 (SID_STYLE_FAMILY_START)
+#define SID_STYLE_FAMILY2 (SID_STYLE_FAMILY_START + 1)
+#define SID_STYLE_FAMILY3 (SID_STYLE_FAMILY_START + 2)
+#define SID_STYLE_FAMILY4 (SID_STYLE_FAMILY_START + 3)
+#define SID_STYLE_FAMILY5 (SID_STYLE_FAMILY_START + 4)
+
+#define SID_ENABLE_METAFILEPRINT (SID_SFX_START + 543)
+#define SID_FILEDIALOG_EXTENSION (SID_SFX_START + 544)
+
+#define SID_STYLE_NEW (SID_SFX_START + 549)
+#define SID_STYLE_EDIT (SID_SFX_START + 550)
+#define SID_STYLE_DELETE (SID_SFX_START + 551)
+#define SID_STYLE_APPLY (SID_SFX_START + 552)
+#define SID_STYLE_FAMILY (SID_SFX_START + 553)
+#define SID_STYLE_FAMILYNAME (SID_SFX_START + 566)
+#define SID_STYLE_WATERCAN (SID_SFX_START + 554)
+#define SID_STYLE_NEW_BY_EXAMPLE (SID_SFX_START + 555)
+#define SID_STYLE_UPDATE_BY_EXAMPLE (SID_SFX_START + 556)
+#define SID_STYLE_DRAGHIERARCHIE (SID_SFX_START + 565)
+#define SID_STYLE_DISABLEDRAGHIERARCHIE (SID_SFX_START + 567)
+#define SID_STYLE_DISABLENEW (SID_SFX_START + 568)
+#define SID_STYLE_MASK (SID_SFX_START + 562)
+#define SID_STYLE_NAME (SID_SFX_START + 564)
+#define SID_STYLE_UPD_BY_EX_NAME (SID_SFX_START + 1585)
+#define SID_STYLE_REFERENCE (SID_SFX_START + 1602)
+
+#define SID_TEMPLATE_NAME (SID_SFX_START + 660)
+#define SID_TEMPLATE_REGION (SID_SFX_START + 661)
+#define SID_TEMPLATE_REGIONNAME (SID_SFX_START + 662)
+#define SID_TEMPLATE_LOAD (SID_SFX_START + 663)
+#define SID_LOAD_LAYOUT (SID_SFX_START + 664)
+
+#define SID_WRITE_REGFILE (SID_SFX_START + 560)
+#define SID_INSERT_OBJECT (SID_SFX_START + 561)
+#define SID_INSERT_FLOATINGFRAME (SID_SFX_START + 563)
+#define SID_INSERT_OBJFROMFILE (SID_SFX_START + 671)
+#define SID_INSERT_PLUGIN (SID_SFX_START + 672)
+#define SID_INSERT_SOUND (SID_SFX_START + 676)
+#define SID_INSERT_VIDEO (SID_SFX_START + 677)
+#define SID_INSERT_APPLET (SID_SFX_START + 673)
+
+#define SID_HYPERLINK_DIALOG (SID_SFX_START + 678)
+
+#define SID_ACTIVEDOCUMENT (SID_SFX_START + 570)
+#define SID_DEFAULTFILEPATH (SID_SFX_START + 571)
+#define SID_DOCUMENTLIST (SID_SFX_START + 572)
+#define SID_STYLE_CATALOG (SID_SFX_START + 573)
+#define SID_ACTIVEWINDOW (SID_SFX_START + 574)
+#define SID_OBJECT (SID_SFX_START + 575)
+#define SID_THISDOCUMENT (SID_SFX_START + 576)
+#define SID_THISWINDOW (SID_SFX_START + 577)
+#define SID_TOPWINDOW (SID_SFX_START + 589)
+#define SID_ACTIVEMODULE (SID_SFX_START + 587)
+#define SID_DOCUMENTS (SID_SFX_START + 578)
+#define SID_WINDOWS (SID_SFX_START + 579)
+
+// Doc-Properties
+#define SID_DOCNAME (SID_SFX_START + 580)
+#define SID_DOCFULLNAME (SID_SFX_START + 581)
+#define SID_DOCPATH (SID_SFX_START + 582)
+#define SID_DOCTITLE (SID_SFX_START + 583)
+
+#define SID_DOCUMENT (SID_SFX_START + 588)
+
+// default-ids for windows
+
+#define SID_CLOSEWINS (SID_SFX_START + 605)
+#define SID_MDIWINDOWLIST (SID_SFX_START + 610)
+#define SID_MDIWINDOW1 (SID_SFX_START + 611)
+#define SID_MDIWINDOW2 (SID_SFX_START + 612)
+#define SID_MDIWINDOW3 (SID_SFX_START + 613)
+#define SID_MDIWINDOW4 (SID_SFX_START + 614)
+#define SID_MDIWINDOW5 (SID_SFX_START + 615)
+#define SID_MDIWINDOW6 (SID_SFX_START + 616)
+#define SID_MDIWINDOW7 (SID_SFX_START + 617)
+#define SID_MDIWINDOW8 (SID_SFX_START + 618)
+#define SID_MDIWINDOW9 (SID_SFX_START + 619)
+#define SID_MDIWINDOW_END SID_MDIWINDOW9
+#define SID_NEWWINDOW (SID_SFX_START + 620)
+#define SID_CLOSEWIN (SID_SFX_START + 621)
+#define SID_OPTIMIZEWIN (SID_SFX_START + 622)
+#define SID_VIEWSHELL (SID_SFX_START + 623)
+#define SID_WIN_MINIMIZED (SID_SFX_START + 625)
+#define SID_WIN_MAXIMIZED (SID_SFX_START + 626)
+#define SID_WIN_FULLSCREEN (SID_SFX_START + 627)
+ // FREE, was SID_WIN_POSSIZE
+#define SID_WIN_VISIBLE (SID_SFX_START + 629)
+
+#define SID_VIEWSHELL0 (SID_SFX_START + 630)
+#define SID_VIEWSHELL1 (SID_SFX_START + 631)
+#define SID_VIEWSHELL2 (SID_SFX_START + 632)
+#define SID_VIEWSHELL3 (SID_SFX_START + 633)
+#define SID_VIEWSHELL4 (SID_SFX_START + 634)
+#define SID_RESTOREWIN (SID_SFX_START + 635)
+
+#define SID_CAPTION (SID_SFX_START + 641)
+#define SID_STATUSBARTEXT (SID_SFX_START + 642)
+
+// default-ids for editing, cursor travellung and selection
+#define SID_REDO (SID_SFX_START + 700)
+#define SID_UNDO (SID_SFX_START + 701)
+#define SID_REPEAT (SID_SFX_START + 702)
+#define SID_CLEARHISTORY (SID_SFX_START + 703)
+#define SID_CUT (SID_SFX_START + 710)
+#define SID_COPY (SID_SFX_START + 711)
+#define SID_PASTE (SID_SFX_START + 712)
+
+// steht unter diesem Wert in chaos/cntids.hrc!!!
+//#define SID_DELETE (SID_SFX_START + 713)
+
+#define SID_BACKSPACE (SID_SFX_START + 714)
+#define SID_FORMATPAINTBRUSH (SID_SFX_START + 715)
+#define SID_SELECT (SID_SFX_START + 720)
+#define SID_EXPANDSELECTION (SID_SFX_START + 721)
+#define SID_ENHANCESELECTION (SID_SFX_START + 722)
+#define SID_SELECTALL (SID_SFX_START + 723)
+#define SID_SELECTDOWN (SID_SFX_START + 724)
+#define SID_SELECTUP (SID_SFX_START + 725)
+#define SID_CURSORDOWN (SID_SFX_START + 731)
+#define SID_CURSORUP (SID_SFX_START + 732)
+#define SID_CURSORLEFT (SID_SFX_START + 733)
+#define SID_CURSORRIGHT (SID_SFX_START + 734)
+#define SID_CURSORPAGEDOWN (SID_SFX_START + 735)
+#define SID_CURSORPAGEUP (SID_SFX_START + 736)
+#define SID_CURSORPAGERIGHT (SID_SFX_START + 737)
+#define SID_CURSORPAGELEFT (SID_SFX_START + 738)
+#define SID_CURSORENDOFFILE (SID_SFX_START + 741)
+#define SID_CURSORTOPOFFILE (SID_SFX_START + 742)
+#define SID_CURSORENDOFSCREEN (SID_SFX_START + 743)
+#define SID_CURSORTOPOFSCREEN (SID_SFX_START + 744)
+#define SID_CURSORHOME (SID_SFX_START + 745)
+#define SID_CURSOREND (SID_SFX_START + 746)
+#define SID_SCROLLDOWN (SID_SFX_START + 751)
+#define SID_SCROLLUP (SID_SFX_START + 752)
+#define SID_FORMATMENU (SID_SFX_START + 780)
+#define SID_OBJECTMENU0 SID_FORMATMENU
+#define SID_OBJECTMENU1 (SID_SFX_START + 781)
+#define SID_OBJECTMENU2 (SID_SFX_START + 782)
+#define SID_OBJECTMENU3 (SID_SFX_START + 783)
+#define SID_OBJECTMENU_LAST SID_OBJECTMENU3
+#define SID_EDITMENU (SID_SFX_START + 790)
+#define SID_FORMATMENUSTATE (SID_SFX_START + 791)
+
+// default-ids for macros
+#define SID_RECORDING_FLOATWINDOW (SID_SFX_START + 800)
+#define SID_RECORDMACRO (SID_SFX_START + 1669)
+#define SID_PLAYMACRO (SID_SFX_START + 801)
+#define SID_EDITMACRO (SID_SFX_START + 802)
+#define SID_MACROLIBMANAGER (SID_SFX_START + 803)
+#define SID_LOADMACROLIB (SID_SFX_START + 804)
+#define SID_RELEASEMACROLIB (SID_SFX_START + 805)
+#define SID_BASICNAME (SID_SFX_START + 806)
+#define SID_LIBNAME (SID_SFX_START + 807)
+#define SID_MODULENAME (SID_SFX_START + 808)
+#define SID_STATEMENT (SID_SFX_START + 810)
+#define SID_ASYNCHRON (SID_SFX_START + 811)
+
+#define SID_START_APP (SID_SFX_START + 820)
+#define SID_START_BEGIN (SID_SFX_START + 821)
+#define SID_STARTSW SID_START_BEGIN
+#define SID_STARTSC (SID_START_BEGIN + 1)
+#define SID_STARTSD (SID_START_BEGIN + 2)
+#define SID_STARTSIM (SID_START_BEGIN + 3)
+#define SID_STARTSCH (SID_START_BEGIN + 4)
+#define SID_STARTSMA (SID_START_BEGIN + 5)
+#define SID_START_END SID_STARTSMA
+
+// default-ids for configuration
+#define SID_RESTOREMENU (SID_SFX_START + 901)
+#define SID_RESTOREACCELS (SID_SFX_START + 902)
+#define SID_RESTORETOOLBOX (SID_SFX_START + 903)
+#define SID_CONFIG (SID_SFX_START + 904)
+#define SID_TOGGLECOMMONTASKBAR (SID_SFX_START + 928)
+#define SID_TOGGLEINETBAR (SID_SFX_START + 928)
+#define SID_TOGGLEOBJECTBAR (SID_SFX_START + 905)
+#define SID_CONFIGTOOLBOX (SID_SFX_START + 906)
+#define SID_TOOLBOXOPTIONS (SID_SFX_START + 907)
+#define SID_TOGGLETOOLBAR (SID_SFX_START + 909)
+#define SID_CUSTOMIZETOOLBOX (SID_SFX_START + 908)
+#define SID_TOGGLEFUNCTIONBAR (SID_SFX_START + 910)
+#define SID_TOGGLEOPTIONBAR (SID_SFX_START + 911)
+#define SID_PREPTOGGLEFLOATMODE (SID_SFX_START + 912)
+#define SID_TOGGLEFLOATMODE (SID_SFX_START + 913)
+#define SID_SETDOCKINGRECTS (SID_SFX_START + 914)
+#define SID_SETTOOLBOXLINES (SID_SFX_START + 915)
+#define SID_STYLETOOLBOXSYMBOL (SID_SFX_START + 916)
+#define SID_STYLETOOLBOXTEXT (SID_SFX_START + 917)
+#define SID_CONFIGITEMID (SID_SFX_START + 919)
+#define SID_MACROINFO (SID_SFX_START + 919)
+#define SID_TOGGLESTATUSBAR (SID_SFX_START + 920)
+#define SID_CONFIGSTATUSBAR (SID_SFX_START + 921)
+#define SID_CONFIGDOCKWIN (SID_SFX_START + 922)
+#define SID_TOGGLEMACROBAR (SID_SFX_START + 923)
+#define SID_CONFIGMENU (SID_SFX_START + 924)
+#define SID_CONFIGACCEL (SID_SFX_START + 925)
+#define SID_CONFIGEVENT (SID_SFX_START + 926)
+#define SID_CFGFILE (SID_SFX_START + 927)
+#define SID_SHOWPOPUPS (SID_SFX_START + 929)
+#define SID_TASKBAR (SID_SFX_START + 931)
+#define SID_AUTOHIDE (SID_SFX_START + 932)
+#define SID_TOGGLENAVBAR (SID_SFX_START + 1603)
+
+// Item-Id f"ur die Ereigniszuweisen-Tabpage
+#define SID_ATTR_MACROITEM (SID_SFX_START + 934)
+
+#define SID_SAVECONFIG (SID_SFX_START + 930)
+#define SID_LOADCONFIG (SID_SFX_START + 933)
+#define SID_OPTIONS (SID_SFX_START + 940)
+#define SID_BASICIDE (SID_SFX_START + 950)
+#define SID_BASICLOAD (SID_SFX_START + 951)
+#define SID_BASICSAVE (SID_SFX_START + 952)
+#define SID_BASICSAVEAS (SID_SFX_START + 953)
+#define SID_BASICCOMPILE (SID_SFX_START + 954)
+#define SID_BASICRUN (SID_SFX_START + 955)
+#define SID_BASICSTEPINTO (SID_SFX_START + 956)
+#define SID_BASICSTEPOVER (SID_SFX_START + 957)
+#define SID_BASICSTEPOUT (SID_SFX_START + 963)
+#define SID_BASICSTOP (SID_SFX_START + 958)
+#define SID_BASICCHOOSER (SID_SFX_START + 959)
+#define SID_GALLERY (SID_SFX_START + 960)
+#define SID_SEARCH_DLG (SID_SFX_START + 961)
+#define SID_SEARCH_QUIET (SID_SFX_START + 1684)
+#define SID_HELP_PI (SID_SFX_START + 962)
+#define SID_BASIC_ENABLED (SID_SFX_START + 964)
+#define SID_EXPORT_DIALOG (SID_SFX_START + 965)
+#define SID_IMPORT_DIALOG (SID_SFX_START + 966)
+
+#define SID_BASICBREAK (SID_SFX_START +1521)
+
+#define SID_OBJECTRESIZE (SID_SFX_START + 1000)
+#define SID_INSERT_TEXT (SID_SFX_START + 1001)
+
+#define SID_MACRO_START (SID_SFX_START + 1002)
+#define SID_MACRO_END (SID_SFX_START + 1100)
+#define SID_EVENTCONFIG (SID_MACRO_END + 1)
+#define SID_VERB_START (SID_MACRO_END + 2)
+#define SID_VERB_END (SID_MACRO_END + 21)
+
+#define SID_BROWSER_TASK (SID_MACRO_END + 22)
+
+#define SID_SAVESETTINGS (SID_SFX_START + 1200)
+#define SID_OPT_AUTOSAVE (SID_SFX_START + 1201)
+#define SID_OPT_AUTOSAVEINTERVAL (SID_SFX_START + 1202)
+#define SID_OPT_AUTOSAVEQUERY (SID_SFX_START + 1203)
+#define SID_OPT_BACKUP (SID_SFX_START + 1204)
+#define SID_OPT_GRAPHICSFORMAT (SID_SFX_START + 1205)
+#define SID_OPT_SAVEDOCINFO (SID_SFX_START + 1206)
+#define SID_OPT_SAVEWORKINGSET (SID_SFX_START + 1207)
+#define SID_OPT_SAVEWINDOWS (SID_SFX_START + 1208)
+#define SID_OPT_SAVEVIEW (SID_SFX_START + 1209)
+
+#define SID_PATHSETTINGS (SID_SFX_START + 1210)
+#define SID_OPT_AUTOTEXT_PATH (SID_SFX_START + 1211)
+#define SID_OPT_BACKUP_PATH (SID_SFX_START + 1212)
+#define SID_OPT_BASIC_PATH (SID_SFX_START + 1213)
+#define SID_OPT_CONFIG_PATH (SID_SFX_START + 1214)
+#define SID_OPT_DATABASEQUERIES_PATH (SID_SFX_START + 1215)
+#define SID_OPT_DICTIONARIES_PATH (SID_SFX_START + 1216)
+#define SID_OPT_DOCMANAGERINI_PATH (SID_SFX_START + 1217)
+#define SID_OPT_GRAPHICS_PATH (SID_SFX_START + 1218)
+#define SID_OPT_MODULES_PATH (SID_SFX_START + 1219)
+#define SID_OPT_PALLETS_PATH (SID_SFX_START + 1220)
+#define SID_OPT_SUBINI_PATH (SID_SFX_START + 1221)
+#define SID_OPT_SYMBOLS_PATH (SID_SFX_START + 1222)
+#define SID_OPT_TEMPLATES_PATH (SID_SFX_START + 1223)
+#define SID_OPT_WORKING_PATH (SID_SFX_START + 1224)
+
+#define SID_OPT_DESKTOP_PATH (SID_SFX_START + 1558)
+#define SID_OPT_CACHE_PATH (SID_SFX_START + 1559)
+#define SID_OPT_HELP_PATH (SID_SFX_START + 1560)
+#define SID_OPT_BOOKMARKS_PATH (SID_SFX_START + 1561)
+#define SID_OPT_GALLERY_PATH (SID_SFX_START + 1562)
+#define SID_OPT_NEWDOC_PATH (SID_SFX_START + 1563)
+#define SID_OPT_AGENTS_PATH (SID_SFX_START + 1564)
+#define SID_OPT_AUTOPILOT_PATH (SID_SFX_START + 1565)
+#define SID_OPT_EXPLORER_PATH (SID_SFX_START + 1566)
+#define SID_OPT_TRASH_PATH (SID_SFX_START + 1557)
+
+#define SID_OPT_STORAGE_PATH (SID_SFX_START + 1627)
+#define SID_OPT_STARTMENU_PATH (SID_SFX_START + 1628)
+#define SID_OPT_DOWNLOAD_PATH (SID_SFX_START + 1629)
+#define SID_OPT_QUICKSTART_PATH (SID_SFX_START + 1630)
+#define SID_OPT_GROUP_PATH (SID_SFX_START + 1631)
+
+#define SID_OPT_PLUGINS_PATH (SID_SFX_START + 1636)
+#define SID_OPT_FAVORITES_PATH (SID_SFX_START + 1637)
+#define SID_OPT_FILTER_PATH (SID_SFX_START + 1638)
+#define SID_OPT_ADDINS_PATH (SID_SFX_START + 1639)
+#define SID_OPT_USERCONFIG_PATH (SID_SFX_START + 1641)
+#define SID_OPT_USERDICTIONARIES_DIR (SID_SFX_START + 1642)
+#define SID_SIGNATURE (SID_SFX_START + 1643)
+#define SID_OPT_INSTPATH (SID_SFX_START + 1649)
+#define SID_OPT_PROGPATH (SID_SFX_START + 1650)
+#define SID_OPT_USERPATH (SID_SFX_START + 1651)
+
+#define SID_CONVERTSTRING (SID_SFX_START + 1225)
+#define SID_SYMBOLSET (SID_SFX_START + 1226)
+#define SID_BUTTONTYPE (SID_SFX_START + 1227)
+#define SID_OUTSTYLE (SID_SFX_START + 1228)
+#define SID_FRAMEDESCRIPTOR (SID_SFX_START + 1229)
+
+#define SID_SFXNODES_START (SID_SFX_START + 1230)
+#define SID_SFXNODES_SUBJECT (SID_SFXNODES_START)
+#define SID_SFXNODES_BCC (SID_SFXNODES_START + 1)
+#define SID_SFXNODES_CC (SID_SFXNODES_START + 2)
+#define SID_SFXNODES_COMMENTS (SID_SFXNODES_START + 3)
+#define SID_SFXNODES_DATE (SID_SFXNODES_START + 4)
+#define SID_SFXNODES_FROM (SID_SFXNODES_START + 5)
+#define SID_SFXNODES_IN_REPLY_TO (SID_SFXNODES_START + 6)
+#define SID_SFXNODES_KEYWORDS (SID_SFXNODES_START + 7)
+#define SID_SFXNODES_MESSAGE_ID (SID_SFXNODES_START + 8)
+#define SID_SFXNODES_RECEIVED (SID_SFXNODES_START + 9)
+#define SID_SFXNODES_REFERENCES (SID_SFXNODES_START + 10)
+#define SID_SFXNODES_REPLY_TO (SID_SFXNODES_START + 11)
+#define SID_SFXNODES_RETURN_PATH (SID_SFXNODES_START + 12)
+#define SID_SFXNODES_SENDER (SID_SFXNODES_START + 13)
+#define SID_SFXNODES_TO (SID_SFXNODES_START + 14)
+#define SID_SFXNODES_XMAILER (SID_SFXNODES_START + 15)
+#define SID_SFXNODES_XSTAROFFICE_RCPT (SID_SFXNODES_START + 16)
+#define SID_SFXNODES_MIME_VERSION (SID_SFXNODES_START + 17)
+#define SID_SFXNODES_CONTENT_DESCRIPTION (SID_SFXNODES_START + 18)
+#define SID_SFXNODES_CONTENT_DISPOSITION (SID_SFXNODES_START + 19)
+#define SID_SFXNODES_CONTENT_ID (SID_SFXNODES_START + 20)
+#define SID_SFXNODES_CONTENT_TYPE (SID_SFXNODES_START + 21)
+#define SID_SFXNODES_CONTENT_TRANSFER_ENCODING (SID_SFXNODES_START + 22)
+#define SID_SFXNODES_IS_CONTAINER (SID_SFXNODES_START + 23)
+#define SID_SFXNODES_IS_MESSAGE (SID_SFXNODES_START + 24)
+#define SID_SFXNODES_IS_MULTIPART (SID_SFXNODES_START + 25)
+#define SID_SFXNODES_APPROVED (SID_SFXNODES_START + 26)
+#define SID_SFXNODES_CONTROL (SID_SFXNODES_START + 27)
+#define SID_SFXNODES_DISTRIBUTION (SID_SFXNODES_START + 28)
+#define SID_SFXNODES_EXPIRES (SID_SFXNODES_START + 29)
+#define SID_SFXNODES_FOLLOWUPTO (SID_SFXNODES_START + 30)
+#define SID_SFXNODES_LINES (SID_SFXNODES_START + 31)
+#define SID_SFXNODES_ORGANIZATION (SID_SFXNODES_START + 32)
+#define SID_SFXNODES_SUMMARY (SID_SFXNODES_START + 33)
+#define SID_SFXNODES_XREF (SID_SFXNODES_START + 34)
+#define SID_SFXNODES_XNEWSREADER (SID_SFXNODES_START + 35)
+#define SID_SFXNODES_SEND_DATETIME (SID_SFXNODES_START + 36)
+#define SID_SFXNODES_RETURN_RECEIPT (SID_SFXNODES_START + 37)
+#define SID_SFXNODES_PRIORITY (SID_SFXNODES_START + 38)
+#define SID_SFXNODES_MESSAGE (SID_SFXNODES_START + 39)
+#define SID_SFXNODES_RECEIVERLIST (SID_SFXNODES_START + 40)
+#define SID_SFXNODES_ATTACHLIST (SID_SFXNODES_START + 41)
+#define SID_SFXNODES_END SID_SFXNODES_ATTACHLIST
+
+// SaveTabPage
+#define SID_ATTR_DOCINFO (SID_OPTIONS_START + 0)
+#define SID_ATTR_BACKUP (SID_OPTIONS_START + 1)
+#define SID_ATTR_AUTOSAVE (SID_OPTIONS_START + 2)
+#define SID_ATTR_AUTOSAVEPROMPT (SID_OPTIONS_START + 3)
+#define SID_ATTR_AUTOSAVEMINUTE (SID_OPTIONS_START + 5)
+#define SID_ATTR_WORKINGSET (SID_OPTIONS_START + 13)
+#define SID_ATTR_UNDO_COUNT (SID_OPTIONS_START + 16)
+ // unused
+#define SID_ATTR_SAVEDOCVIEW (SID_OPTIONS_START + 18)
+
+// GeneralTabPage
+
+#define SID_ATTR_METRIC (SID_OPTIONS_START + 8)
+#define SID_ATTR_DEFTABSTOP (SID_OPTIONS_START + 14)
+#define SID_ATTR_BUTTON_OUTSTYLE3D (SID_OPTIONS_START + 62)
+#define SID_ATTR_BUTTON_BIGSIZE (SID_OPTIONS_START + 63)
+#define SID_ATTR_AUTOHELPAGENT (SID_OPTIONS_START + 67)
+#define SID_AUTOHELPAGENT_RESET (SID_OPTIONS_START + 68)
+#define SID_HELPAGENT_TIMEOUT (SID_OPTIONS_START + 93)
+#define SID_ATTR_WELCOMESCREEN (SID_OPTIONS_START + 81)
+#define SID_WELCOMESCREEN_RESET (SID_OPTIONS_START + 82)
+#define SID_RESTORE_EXPAND_STATE (SID_OPTIONS_START + 83)
+#define SID_ATTR_QUICKLAUNCHER (SID_OPTIONS_START + 74)
+#define SID_ATTR_YEAR2000 (SID_OPTIONS_START + 87)
+#define SID_ATTR_ALLOWFOLDERWEBVIEW (SID_OPTIONS_START + 92)
+
+
+// PathTabPage
+#define SID_ATTR_PATHGROUP (SID_OPTIONS_START + 10)
+#define SID_ATTR_PATHNAME (SID_OPTIONS_START + 11)
+
+// LinguTabPage
+#define SID_ATTR_LANGUAGE (SID_OPTIONS_START + 7)
+#define SID_ATTR_SPELL (SID_OPTIONS_START + 9)
+#define SID_ATTR_HYPHENREGION (SID_OPTIONS_START + 12)
+#define SID_SPELL_MODIFIED (SID_OPTIONS_START + 15)
+#define SID_AUTOSPELL_CHECK (SID_OPTIONS_START + 21)
+
+// InetTabPage
+#define SID_INET_SMTPGATEWAY (SID_OPTIONS_START + 50)
+#define SID_INET_EMAIL_NAME (SID_OPTIONS_START + 19)
+#define SID_INET_PROXY (SID_OPTIONS_START + 20)
+
+#define SID_INET_PROXY_TYPE (SID_OPTIONS_START + 23)
+#define SID_INET_PROXY_NAME (SID_OPTIONS_START + 24)
+#define SID_INET_PROXY_PORT (SID_OPTIONS_START + 25)
+#define SID_INET_HOMEPAGE (SID_OPTIONS_START + 26)
+#define SID_INET_MEMCACHE (SID_OPTIONS_START + 27)
+#define SID_INET_DISKCACHE (SID_OPTIONS_START + 28)
+#define SID_INET_EXPIRATION (SID_OPTIONS_START + 29)
+#define SID_INET_CACHEDIR (SID_OPTIONS_START + 32)
+
+#define SID_INET_SMTPSERVER (SID_OPTIONS_START + 33)
+#define SID_INET_POPSERVER (SID_OPTIONS_START + 34)
+#define SID_INET_MAILUSERNAME (SID_OPTIONS_START + 35)
+#define SID_INET_MAILPASSWORD (SID_OPTIONS_START + 36)
+#define SID_PASSWORD (SID_OPTIONS_START + 36)
+#define SID_INET_MAILTEXTFORMAT (SID_OPTIONS_START + 61)
+
+#define SID_INET_NOPROXY (SID_OPTIONS_START + 37)
+
+#define SID_INET_HTTP_PROXY_NAME (SID_OPTIONS_START + 38)
+#define SID_INET_HTTP_PROXY_PORT (SID_OPTIONS_START + 39)
+#define SID_INET_FTP_PROXY_NAME (SID_OPTIONS_START + 40)
+#define SID_INET_FTP_PROXY_PORT (SID_OPTIONS_START + 41)
+#define SID_INET_SOCKS_PROXY_NAME (SID_OPTIONS_START + 42)
+#define SID_INET_SOCKS_PROXY_PORT (SID_OPTIONS_START + 43)
+#define SID_INET_SECURITY_PROXY_NAME (SID_OPTIONS_START + 44)
+#define SID_INET_SECURITY_PROXY_PORT (SID_OPTIONS_START + 45)
+
+#define SID_INET_NNTPSERVER (SID_OPTIONS_START + 46)
+#define SID_INET_MAXNEWS (SID_OPTIONS_START + 47)
+
+#define SID_INET_MAXHTTPCONS (SID_OPTIONS_START + 48)
+#define SID_INET_MAXFTPCONS (SID_OPTIONS_START + 49)
+
+#define SID_INET_EXE_JAVASCRIPT (SID_OPTIONS_START + 51)
+#define SID_INET_EXE_PLUGIN (SID_OPTIONS_START + 52)
+#define SID_INET_EXE_APPLETS (SID_OPTIONS_START + 91)
+
+#define SID_INET_JAVA_ENABLE (SID_OPTIONS_START + 53)
+#define SID_INET_JAVA_ACCESSTYPE (SID_OPTIONS_START + 54)
+#define SID_INET_JAVA_SECURITY (SID_OPTIONS_START + 55)
+#define SID_INET_JAVA_CLASSPATH (SID_OPTIONS_START + 56)
+
+#define SID_INET_DNS_AUTO (SID_OPTIONS_START + 57)
+#define SID_INET_DNS_SERVER (SID_OPTIONS_START + 58)
+
+#define SID_INET_USERAGENT (SID_OPTIONS_START + 59)
+#define SID_INET_NONCACHED_SERVER (SID_OPTIONS_START + 60)
+
+#define SID_INET_CHANNELS_ONOFF (SID_OPTIONS_START + 64)
+
+#define SID_INET_COOKIESHANDLE (SID_OPTIONS_START + 69)
+
+#define SID_INET_CACHEJS (SID_OPTIONS_START + 70)
+#define SID_INET_CACHEEXPIRED (SID_OPTIONS_START + 71)
+#define SID_INET_CACHEABORTED (SID_OPTIONS_START + 72)
+#define SID_INET_REVEAL_MAILADDR (SID_OPTIONS_START + 73)
+
+#define SID_SAVEREL_INET (SID_OPTIONS_START + 30)
+#define SID_SAVEREL_FSYS (SID_OPTIONS_START + 31)
+
+// Automatisches update von Styles - Verwalten-TabPage
+#define SID_ATTR_AUTO_STYLE_UPDATE (SID_OPTIONS_START + 65)
+
+#define SID_SECURE_URL (SID_OPTIONS_START + 66)
+
+
+#define SID_OPT_SCREENSCALING (SID_OPTIONS_START + 78)
+#define SID_OPT_SNAPTYPE (SID_OPTIONS_START + 79)
+#define SID_OPT_DRAGMODE (SID_OPTIONS_START + 80)
+
+// configured locale changed
+#define SID_OPT_LOCALE_CHANGED (SID_OPTIONS_START + 94)
+#define SID_OPT_FONT_ANTIALIASING_ENABLED (SID_OPTIONS_START + 95)
+#define SID_OPT_FONT_ANTIALIASING_MINPIXELS (SID_OPTIONS_START + 96)
+//middle mouse button
+#define SID_OPT_MIDDLE_MOUSE (SID_OPTIONS_START + 97)
+#define SID_ATTR_PRETTYPRINTING (SID_OPTIONS_START + 98)
+#define SID_HELP_STYLESHEET (SID_OPTIONS_START + 99)
+
+// slot IDs from SVX (svxids.hrc) ---------------------------------------------
+
+#define SID_ZOOM_TOOLBOX (SID_SVX_START + 96)
+#define SID_ZOOM_OUT (SID_SVX_START + 97)
+#define SID_ZOOM_IN (SID_SVX_START + 98)
+#define SID_SIZE_REAL (SID_SVX_START + 99)
+#define SID_ZOOM_100_PERCENT (SID_SIZE_REAL)
+#define SID_SIZE_PAGE (SID_SVX_START + 100)
+#define SID_ZOOM_PAGE (SID_SIZE_PAGE)
+#define SID_SHOW_BROWSER (SID_SVX_START + 163)
+#define SID_GALLERY_BG_BRUSH (SID_SVX_START + 279)
+#define SID_SEARCH_OPTIONS (SID_SVX_START + 281)
+#define SID_ZOOM (SID_SVX_START + 289)
+#define SID_SEARCH_ITEM (SID_SVX_START + 291)
+#define SID_ATTR_CHAR_FONTWIDTH (SID_SVX_START + 303)
+#define SID_HYPERLINK_INSERT (SID_SVX_START + 360)
+#define SID_HYPERLINK_GETLINK (SID_SVX_START + 361)
+#define SID_HYPERLINK_SETLINK (SID_SVX_START + 362)
+#define SID_NAVIGATOR (SID_SVX_START + 366)
+#define SID_ZOOM_NEXT (SID_SVX_START + 402)
+#define SID_ZOOM_PREV (SID_SVX_START + 403)
+#define SID_INET_DLG (SID_SVX_START + 416)
+#define SID_AUTO_CORRECT_DLG (SID_SVX_START + 424)
+#define SID_SD_AUTOPILOT (SID_SVX_START + 425)
+#define SID_SW_AGENDA_WIZZARD (SID_SVX_START + 426)
+#define SID_SW_FAX_WIZZARD (SID_SVX_START + 427)
+#define SID_SW_LETTER_WIZZARD (SID_SVX_START + 428)
+#define SID_SW_MEMO_WIZZARD (SID_SVX_START + 429)
+#define SID_ATTR_CHAR_COLOR_EXT (SID_SVX_START + 488)
+#define SID_ATTR_CHAR_COLOR_BACKGROUND (SID_SVX_START + 489)
+#define SID_ATTR_CHAR_COLOR_BACKGROUND_EXT (SID_SVX_START + 490)
+#define SID_ATTR_CHAR_COLOR2 (SID_SVX_START + 537)
+#define SID_COMP_BIBLIOGRAPHY (SID_SVX_START + 880)
+#define SID_ADDRESS_DATA_SOURCE (SID_SVX_START + 934)
+
+#define FID_SVX_START (SID_LIB_START + 500)
+#define FID_SEARCH_NOW (FID_SVX_START + 2)
+
+// SlotIds f"ur Basic -------------------------------------------------------
+#define SID_BASICIDE_TOGGLEBRKPNT ( SID_BASICIDE_START + 0 )
+#define SID_BASICIDE_ADDWATCH ( SID_BASICIDE_START + 1 )
+#define SID_BASICIDE_APPEAR ( SID_BASICIDE_START + 15 )
+#define SID_BASICIDE_BRKPNTSCHANGED ( SID_BASICIDE_START + 36 )
+#define SID_BASICIDE_CHOOSEMACRO ( SID_BASICIDE_START + 2 )
+#define SID_BASICIDE_CREATEMACRO ( SID_BASICIDE_START + 4 )
+#define SID_BASICIDE_DELETECURRENT ( SID_BASICIDE_START + 22 )
+#define SID_BASICIDE_EDITMACRO ( SID_BASICIDE_START + 3 )
+#define SID_BASICIDE_HIDECURPAGE ( SID_BASICIDE_START + 10 )
+#define SID_BASICIDE_LIBLOADED ( SID_BASICIDE_START + 27 )
+#define SID_BASICIDE_LIBSELECTOR ( SID_BASICIDE_START + 19 )
+#define SID_BASICIDE_LIBSELECTED ( SID_BASICIDE_START + 18 )
+#define SID_BASICIDE_LIBREMOVED ( SID_BASICIDE_START + 28 )
+#define SID_BASICIDE_ARG_LIBNAME ( SID_BASICIDE_START + 34 )
+#define SID_BASICIDE_MATCHGROUP ( SID_BASICIDE_START + 14 )
+#define SID_BASICIDE_MODULEDLG ( SID_BASICIDE_START + 5 )
+#define SID_BASICIDE_NAMECHANGEDONTAB ( SID_BASICIDE_START + 11 )
+#define SID_BASICIDE_ARG_TABID ( SID_BASICIDE_START + 30 )
+#define SID_BASICIDE_ARG_MACROINFO ( SID_BASICIDE_START + 32 )
+#define SID_BASICIDE_ARG_MODULENAME ( SID_BASICIDE_START + 35 )
+#define SID_BASICIDE_ARG_SBX ( SID_BASICIDE_START + 31 )
+#define SID_BASICIDE_NEWMODULE ( SID_BASICIDE_START + 21 )
+#define SID_BASICIDE_NEWDIALOG ( SID_BASICIDE_START + 20 )
+#define SID_BASICIDE_OBJCAT ( SID_BASICIDE_START + 6 )
+#define SID_BASICIDE_REMOVEWATCH ( SID_BASICIDE_START + 7 )
+#define SID_BASICIDE_RENAMECURRENT ( SID_BASICIDE_START + 23 )
+#define SID_BASICIDE_SBXDELETED ( SID_BASICIDE_START + 24 )
+#define SID_BASICIDE_SBXINSERTED ( SID_BASICIDE_START + 25 )
+#define SID_BASICIDE_SBXRENAMED ( SID_BASICIDE_START + 26 )
+#define SID_BASICIDE_SHOWSBX ( SID_BASICIDE_START + 9 )
+#define SID_BASICIDE_STAT_POS ( SID_BASICIDE_START + 38 )
+#define SID_BASICIDE_STAT_DATE ( SID_BASICIDE_START + 39 )
+#define SID_BASICIDE_STAT_TITLE ( SID_BASICIDE_START + 40 )
+#define SID_BASICIDE_STOREMODULESOURCE ( SID_BASICIDE_START + 13 )
+#define SID_BASICIDE_STOREALLMODULESOURCES ( SID_BASICIDE_START + 16 )
+#define SID_BASICIDE_UPDATEALLMODULESOURCES ( SID_BASICIDE_START + 17 )
+#define SID_BASICIDE_UPDATEMODULESOURCE ( SID_BASICIDE_START + 12 )
+#define SID_BASICIDE_MANAGEBRKPNTS ( SID_BASICIDE_START + 42 )
+#define SID_BASICIDE_TOGGLEBRKPNTENABLED ( SID_BASICIDE_START + 43 )
+#define SID_BASICIDE_SHOWWINDOW ( SID_BASICIDE_START + 44 )
+#define SID_BASICIDE_ARG_DOCUMENT ( SID_BASICIDE_START + 45 )
+#define SID_BASICIDE_ARG_NAME ( SID_BASICIDE_START + 46 )
+#define SID_BASICIDE_ARG_TYPE ( SID_BASICIDE_START + 47 )
+#define SID_BASICIDE_ARG_LINE ( SID_BASICIDE_START + 48 )
+#define SID_BASICIDE_ARG_COLUMN1 ( SID_BASICIDE_START + 49 )
+#define SID_BASICIDE_ARG_COLUMN2 ( SID_BASICIDE_START + 50 )
+#define SID_BASICIDE_ARG_DOCUMENT_MODEL ( SID_BASICIDE_START + 51 )
+#define SID_BASICIDE_MANAGE_LANG ( SID_BASICIDE_START + 52 )
+#define SID_BASICIDE_CURRENT_LANG ( SID_BASICIDE_START + 53 )
+
+// SlotIds f"ur Apps --------------------------------------------------------
+#define FN_PARAM (SID_SW_START + 1100)
+#define FN_PARAM_1 (FN_PARAM+60)
+#define FN_PARAM_2 (FN_PARAM+61)
+#define FN_PARAM_3 (FN_PARAM+62)
+#define FN_PARAM_4 (FN_PARAM+63)
+#define FN_PARAM_5 (FN_PARAM+64)
+#define FN_PARAM_6 (FN_PARAM+65)
+#define FN_PARAM_7 (FN_PARAM+66)
+#define FN_PARAM_8 (FN_PARAM+67)
+#define FN_FAX (SID_SW_START + 28) /* Faxen */
+
+#define SID_KEYFUNC_START (SID_SC_START + 521)
+#define SID_CURSORDOWN_SEL (SID_KEYFUNC_START + 0)
+#define SID_CURSORUP_SEL (SID_KEYFUNC_START + 1)
+#define SID_CURSORLEFT_SEL (SID_KEYFUNC_START + 2)
+#define SID_CURSORRIGHT_SEL (SID_KEYFUNC_START + 3)
+#define SID_CURSORPAGEDOWN_SEL (SID_KEYFUNC_START + 4)
+#define SID_CURSORPAGEUP_SEL (SID_KEYFUNC_START + 5)
+#define SID_CURSORPAGELEFT_SEL (SID_KEYFUNC_START + 7)
+#define SID_CURSORPAGERIGHT_SEL (SID_KEYFUNC_START + 9)
+#define SID_CURSORTOPOFFILE_SEL (SID_KEYFUNC_START + 10)
+#define SID_CURSORENDOFFILE_SEL (SID_KEYFUNC_START + 11)
+#define SID_CURSORHOME_SEL (SID_KEYFUNC_START + 12)
+#define SID_CURSOREND_SEL (SID_KEYFUNC_START + 13)
+#define SID_REPAINT (SID_SC_START + 12)
+
+#define SID_MODIFIED (SID_SD_START+89)
+#define ID_VAL_DUMMY0 (SID_SD_START+230)
+#define ID_VAL_ZOOM (SID_SD_START+234)
+#define SID_SIZE_OPTIMAL (SID_SD_START+99)
+#define SID_ZOOM_OBJECTS (SID_SIZE_OPTIMAL)
+
+//-----------------------------------------------------------------------
+
+#define SID_STARWRITER (SID_SFX_START+1401)
+#define SID_STARDRAW (SID_SFX_START+1402)
+#define SID_STARCALC (SID_SFX_START+1403)
+
+#define SID_LANGUAGEID (SID_SFX_START+1407)
+#define SID_COUNTRYID (SID_SFX_START+1408)
+#define SID_SUBSTPATHVARS (SID_SFX_START+1409)
+
+//-----------------------------------------------------------------------
+
+#define SID_ATTR_CHAR_FILLCOLOR (SID_SFX_START + 1551)
+
+// SfxScriptOrganizerItem
+#define MID_SCRIPT_ORGANIZER_LANGUAGE 1 // Don't use zero for MID's. It's forbidden to do it!
+
+#define SID_NEWSD (SID_SFX_START + 1686)
+#define FN_LABEL (SID_SW_START + 1051 )
+#define FN_BUSINESS_CARD (SID_SW_START + 1052)
+#define FN_XFORMS_INIT (SID_SW_START + 1053)
+#define SID_OPTIONS_TREEDIALOG ( SID_BASICIDE_START + 862)
+
+
+#define SID_RESTORE_EDITING_VIEW (SID_SFX_START + 1663)
+
+#endif // #ifndef _SFXSIDS_HRC
+
+// eof ------------------------------------------------------------------------
+
diff --git a/sfx2/inc/sfx2/sfxstatuslistener.hxx b/sfx2/inc/sfx2/sfxstatuslistener.hxx
new file mode 100644
index 000000000000..e24db0ac577a
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxstatuslistener.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SFXSTATUSLISTENER_HXX
+#define _SFXSTATUSLISTENER_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <svl/poolitem.hxx>
+#include <cppuhelper/weak.hxx>
+#include <osl/conditn.hxx>
+#include <com/sun/star/frame/FeatureStateEvent.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
+
+#include <sfx2/sfxuno.hxx>
+
+// Interface for implementations which needs to get notifications about state changes
+class SfxStatusListenerInterface
+{
+ public:
+ virtual void StateChanged( USHORT nSlotId, SfxItemState eState, const SfxPoolItem* pState ) = 0;
+};
+
+class SFX2_DLLPUBLIC SfxStatusListener :
+ public ::com::sun::star::frame::XStatusListener ,
+ public ::com::sun::star::lang::XTypeProvider ,
+ public ::com::sun::star::lang::XComponent ,
+ public ::cppu::OWeakObject
+{
+ public:
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ SfxStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const rtl::OUString& aCommand );
+ virtual ~SfxStatusListener();
+
+ // old methods from SfxControllerItem
+ USHORT GetId() const { return m_nSlotID; }
+ void Bind();
+ void Bind( USHORT nSlotID, const rtl::OUString& rNewCommand );
+ void UnBind();
+ void ReBind();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
+
+ private:
+ SfxStatusListener( const SfxStatusListener& );
+ SfxStatusListener();
+ SfxStatusListener& operator=( const SfxStatusListener& );
+
+ USHORT m_nSlotID;
+ ::com::sun::star::util::URL m_aCommand;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider;
+ ::com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > m_xDispatch;
+};
+
+#endif // _SFXSTATUSLISTENER_HXX
diff --git a/sfx2/inc/sfx2/sfxuno.hxx b/sfx2/inc/sfx2/sfxuno.hxx
new file mode 100644
index 000000000000..fb331889a573
--- /dev/null
+++ b/sfx2/inc/sfx2/sfxuno.hxx
@@ -0,0 +1,657 @@
+/*************************************************************************
+ *
+ * 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_SFXUNO_HXX
+#define _SFX_SFXUNO_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/util/URL.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/task/ErrorCodeIOException.hpp>
+
+
+//________________________________________________________________________________________________________________________
+// fix uno header
+//________________________________________________________________________________________________________________________
+#include <com/sun/star/uno/Type.h>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/queryinterface.hxx>
+#include <cppuhelper/factory.hxx>
+
+//________________________________________________________________________________________________________________________
+// something else ... header
+//________________________________________________________________________________________________________________________
+#include <osl/mutex.hxx>
+
+#ifndef _RTL_USTRING_HXX
+#include <rtl/ustring.hxx>
+#endif
+
+//________________________________________________________________________________________________________________________
+// defines for namespaces !
+//________________________________________________________________________________________________________________________
+
+#define UNOANY ::com::sun::star::uno::Any
+#define UNOEXCEPTION ::com::sun::star::uno::Exception
+#define UNOMUTEX ::osl::Mutex
+#define UNOMUTEXGUARD ::osl::MutexGuard
+#define UNOOIMPLEMENTATIONID ::cppu::OImplementationId
+#define UNOOTYPECOLLECTION ::cppu::OTypeCollection
+#define UNOOUSTRING ::rtl::OUString
+#define UNOPROPERTYVALUE ::com::sun::star::beans::PropertyValue
+#define UNOREFERENCE ::com::sun::star::uno::Reference
+#define UNORUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
+#define UNOINVALIDREGISTRYEXCEPTION ::com::sun::star::registry::InvalidRegistryException
+#define UNOSEQUENCE ::com::sun::star::uno::Sequence
+#define UNOTYPE ::com::sun::star::uno::Type
+#define UNOURL ::com::sun::star::util::URL
+#define UNOXINTERFACE ::com::sun::star::uno::XInterface
+#define UNOXMULTISERVICEFACTORY ::com::sun::star::lang::XMultiServiceFactory
+#define UNOXSINGLESERVICEFACTORY ::com::sun::star::lang::XSingleServiceFactory
+#define UNOXTYPEPROVIDER ::com::sun::star::lang::XTypeProvider
+
+//________________________________________________________________________________________________________________________
+// declarations and defines for sfx
+//________________________________________________________________________________________________________________________
+
+inline sal_Bool operator==( const UNOURL& aURL1, const UNOURL& aURL2 )
+{
+ return aURL1.Complete == aURL2.Complete;
+}
+
+class SfxAllItemSet ;
+class SfxItemSet ;
+class SfxSlot ;
+
+SFX2_DLLPUBLIC void TransformParameters( sal_uInt16 nSlotId ,
+ const UNOSEQUENCE< UNOPROPERTYVALUE >& seqArgs ,
+ SfxAllItemSet& aSet ,
+ const SfxSlot* pSlot = 0 );
+
+SFX2_DLLPUBLIC void TransformItems( sal_uInt16 nSlotId ,
+ const SfxItemSet& aSet ,
+ UNOSEQUENCE< UNOPROPERTYVALUE >& seqArgs ,
+ const SfxSlot* pSlot = 0 );
+
+sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, ::rtl::OUString& rPasswd );
+
+#define FrameSearchFlags sal_Int32
+
+// Macros to convert string -> unicode and unicode -> string.
+// We use UTF8 everytime. Its the best way to do this!
+#define S2U(STRING) ::rtl::OStringToOUString(STRING, RTL_TEXTENCODING_UTF8)
+#define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
+
+// Macro to define const unicode a'la "..."
+// It's better then "OUString::createFromAscii(...)" !!!
+#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
+#define DEFINE_CONST_OUSTRING(CONSTASCII) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
+
+//________________________________________________________________________________________________________________________
+// macros for declaration and definition of uno-services
+//________________________________________________________________________________________________________________________
+
+//************************************************************************************************************************
+// declaration of XInterface::queryInterface()
+// XInterface::aquire()
+// XInterface::release()
+// XTypeProvider::getTypes()
+// XTypeProvider::getImplementationId()
+//************************************************************************************************************************
+#define SFX_DECL_XINTERFACE \
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); \
+ virtual void SAL_CALL acquire() throw(); \
+ virtual void SAL_CALL release() throw();
+
+#define SFX_DECL_XTYPEPROVIDER \
+ /* XTypeProvider */ \
+ virtual UNOSEQUENCE< UNOTYPE > SAL_CALL getTypes() throw( UNORUNTIMEEXCEPTION ); \
+ virtual UNOSEQUENCE< sal_Int8 > SAL_CALL getImplementationId() throw( UNORUNTIMEEXCEPTION );
+
+#define SFX_DECL_XINTERFACE_XTYPEPROVIDER \
+ SFX_DECL_XINTERFACE \
+ SFX_DECL_XTYPEPROVIDER
+//************************************************************************************************************************
+// declaration of XInterface::queryInterface()
+// XInterface::aquire()
+// XInterface::release()
+// XTypeProvider::getTypes()
+// XTypeProvider::getImplementationId()
+// XServiceInfo::getImplementationName()
+// XServiceInfo::supportsService()
+// XServiceInfo::getSupportedServiceNames()
+// static xxx::impl_getStaticSupportedServiceNames()
+// static xxx::impl_getStaticImplementationName()
+// static xxx::impl_createInstance()
+// static xxx::impl_createFactory()
+//************************************************************************************************************************
+#define SFX_DECL_XSERVICEINFO \
+ /* XServiceInfo */ \
+ virtual UNOOUSTRING SAL_CALL getImplementationName() throw( UNORUNTIMEEXCEPTION ); \
+ virtual sal_Bool SAL_CALL supportsService( const UNOOUSTRING& sServiceName ) throw( UNORUNTIMEEXCEPTION ); \
+ virtual UNOSEQUENCE< UNOOUSTRING > SAL_CALL getSupportedServiceNames() throw( UNORUNTIMEEXCEPTION ); \
+ \
+ /* Helper for XServiceInfo */ \
+ static UNOSEQUENCE< UNOOUSTRING > impl_getStaticSupportedServiceNames(); \
+ static UNOOUSTRING impl_getStaticImplementationName(); \
+ \
+ /* Helper for registry */ \
+ static UNOREFERENCE< UNOXINTERFACE > SAL_CALL impl_createInstance( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ) throw( UNOEXCEPTION );\
+ static UNOREFERENCE< UNOXSINGLESERVICEFACTORY > impl_createFactory( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager );
+
+#define SFX_DECL_XINTERFACE_XTYPEPROVIDER_XSERVICEINFO \
+ \
+ /* XInterface + XTypeProvider */ \
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER \
+ SFX_DECL_XSERVICEINFO
+
+//************************************************************************************************************************
+// implementation of XInterface::queryInterface()
+// XInterface::aquire()
+// XInterface::release()
+//************************************************************************************************************************
+/*_________________________________________________________________________________________________________________________*/
+// DON'T USE FOLLOW MACROS DIRECTLY!!!
+#define SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, IMPLINTERFACES ) \
+ \
+ void SAL_CALL IMPLCLASS::acquire() throw() \
+ { \
+ /* Don't use mutex in methods of XInterface! */ \
+ BASECLASS::acquire(); \
+ } \
+ \
+ void SAL_CALL IMPLCLASS::release() throw() \
+ { \
+ /* Don't use mutex in methods of XInterface! */ \
+ BASECLASS::release(); \
+ } \
+ \
+ UNOANY SAL_CALL IMPLCLASS::queryInterface( const UNOTYPE& rType ) throw( UNORUNTIMEEXCEPTION ) \
+ { \
+ /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \
+ /* Ask for my own supported interfaces ... */ \
+ UNOANY aReturn ( ::cppu::queryInterface( rType, \
+ IMPLINTERFACES \
+ ) \
+ ); \
+ /* If searched interface supported by this class ... */ \
+ if ( aReturn.hasValue() == sal_True ) \
+ { \
+ /* ... return this information. */ \
+ return aReturn ; \
+ } \
+ else \
+ { \
+ /* Else; ... ask baseclass for interfaces! */ \
+ return BASECLASS::queryInterface( rType ); \
+ } \
+ }
+
+#define SFX_IMPL_INTERFACE_0 \
+ static_cast< UNOXTYPEPROVIDER* >( this )
+
+#define SFX_IMPL_INTERFACE_1( INTERFACE1 ) \
+ SFX_IMPL_INTERFACE_0, \
+ static_cast< INTERFACE1* >( this )
+
+#define SFX_IMPL_INTERFACE_2( INTERFACE1, INTERFACE2 ) \
+ SFX_IMPL_INTERFACE_1( INTERFACE1 ), \
+ static_cast< INTERFACE2* >( this )
+
+#define SFX_IMPL_INTERFACE_3( INTERFACE1, INTERFACE2, INTERFACE3 ) \
+ SFX_IMPL_INTERFACE_2( INTERFACE1, INTERFACE2 ), \
+ static_cast< INTERFACE3* >( this )
+
+#define SFX_IMPL_INTERFACE_4( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ) \
+ SFX_IMPL_INTERFACE_3( INTERFACE1, INTERFACE2, INTERFACE3 ), \
+ static_cast< INTERFACE4* >( this )
+
+#define SFX_IMPL_INTERFACE_5( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ) \
+ SFX_IMPL_INTERFACE_4( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ), \
+ static_cast< INTERFACE5* >( this )
+
+#define SFX_IMPL_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ) \
+ SFX_IMPL_INTERFACE_5( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ), \
+ static_cast< INTERFACE6* >( this )
+
+#define SFX_IMPL_INTERFACE_7( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ) \
+ SFX_IMPL_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ), \
+ static_cast< INTERFACE7* >( this )
+
+#define SFX_IMPL_INTERFACE_8( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ) \
+ SFX_IMPL_INTERFACE_7( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ), \
+ static_cast< INTERFACE8* >( this )
+
+#define SFX_IMPL_INTERFACE_9( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ) \
+ SFX_IMPL_INTERFACE_8( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ), \
+ static_cast< INTERFACE9* >( this )
+
+#define SFX_IMPL_INTERFACE_10( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ) \
+ SFX_IMPL_INTERFACE_9( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ), \
+ static_cast< INTERFACE10* >( this )
+
+#define SFX_IMPL_INTERFACE_11( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 ) \
+ SFX_IMPL_INTERFACE_10( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ), \
+ static_cast< INTERFACE11* >( this )
+
+#define SFX_IMPL_INTERFACE_12( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12 ) \
+ SFX_IMPL_INTERFACE_11( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 ), \
+ static_cast< INTERFACE12* >( this )
+
+#define SFX_IMPL_INTERFACE_13( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13 ) \
+ SFX_IMPL_INTERFACE_12( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12 ), \
+ static_cast< INTERFACE13* >( this )
+/*_________________________________________________________________________________________________________________________*/
+
+// Follow macros can used directly :-)
+// implementation of XInterface with 0 additional interface for queryInterface()
+#define SFX_IMPL_XINTERFACE_0( IMPLCLASS, BASECLASS ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_0 )
+
+// implementation of XInterface with 1 additional interface for queryInterface()
+#define SFX_IMPL_XINTERFACE_1( IMPLCLASS, BASECLASS, INTERFACE1 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_1( INTERFACE1 ) )
+
+// implementation of XInterface with 2 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_2( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_2( INTERFACE1, INTERFACE2 ) )
+
+// implementation of XInterface with 3 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_3( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_3( INTERFACE1, INTERFACE2, INTERFACE3 ) )
+
+// implementation of XInterface with 4 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_4( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_4( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ) )
+
+// implementation of XInterface with 5 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_5( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_5( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ) )
+
+// implementation of XInterface with 6 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_6( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ) )
+
+// implementation of XInterface with 7 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_7( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_7( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ) )
+
+// implementation of XInterface with 8 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_8( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_8( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ) )
+
+// implementation of XInterface with 9 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_9( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_9( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ) )
+
+// implementation of XInterface with 10 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_10( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_10( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ) )
+
+// implementation of XInterface with 11 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_11( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_11( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 ) )
+
+// implementation of XInterface with 11 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_12( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_12( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12 ) )
+
+// implementation of XInterface with 11 additional interfaces for queryInterface()
+#define SFX_IMPL_XINTERFACE_13( IMPLCLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13 ) \
+ SFX_IMPL_XINTERFACE_BASE( IMPLCLASS, BASECLASS, SFX_IMPL_INTERFACE_13( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13 ) )
+
+//************************************************************************************************************************
+// implementation of XTypeProvider::getTypes()
+// XTypeProvider::getImplementationId()
+//************************************************************************************************************************
+/*_________________________________________________________________________________________________________________________*/
+// DON'T USE FOLLOW MACROS DIRECTLY!!!
+#define SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, IMPLTYPES ) \
+ \
+ UNOSEQUENCE< sal_Int8 > SAL_CALL IMPLCLASS::getImplementationId() throw( UNORUNTIMEEXCEPTION ) \
+ { \
+ /* Create one Id for all instances of this class. */ \
+ /* Use ethernet address to do this! (sal_True) */ \
+ /* Optimize this method */ \
+ /* We initialize a static variable only one time. And we don't must use a mutex at every call! */ \
+ /* For the first call; pID is NULL - for the second call pID is different from NULL! */ \
+ static UNOOIMPLEMENTATIONID* pID = NULL ; \
+ if ( pID == NULL ) \
+ { \
+ /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
+ UNOMUTEXGUARD aGuard( UNOMUTEX::getGlobalMutex() ); \
+ /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
+ if ( pID == NULL ) \
+ { \
+ /* Create a new static ID ... */ \
+ static UNOOIMPLEMENTATIONID aID( sal_False ); \
+ /* ... and set his address to static pointer! */ \
+ pID = &aID ; \
+ } \
+ } \
+ return pID->getImplementationId(); \
+ } \
+ \
+ UNOSEQUENCE< UNOTYPE > SAL_CALL IMPLCLASS::getTypes() throw( UNORUNTIMEEXCEPTION ) \
+ { \
+ /* Optimize this method ! */ \
+ /* We initialize a static variable only one time. And we don't must use a mutex at every call! */ \
+ /* For the first call; pTypeCollection is NULL - for the second call pTypeCollection is different from NULL!*/ \
+ static UNOOTYPECOLLECTION* pTypeCollection = NULL ; \
+ if ( pTypeCollection == NULL ) \
+ { \
+ /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
+ UNOMUTEXGUARD aGuard( UNOMUTEX::getGlobalMutex() ); \
+ /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
+ if ( pTypeCollection == NULL ) \
+ { \
+ /* Create a static typecollection ... */ \
+ static UNOOTYPECOLLECTION aTypeCollection( IMPLTYPES ); \
+ /* ... and set his address to static pointer! */ \
+ pTypeCollection = &aTypeCollection ; \
+ } \
+ } \
+ return pTypeCollection->getTypes(); \
+ }
+
+#define SFX_IMPL_TYPE_0 \
+ ::getCppuType(( const UNOREFERENCE< UNOXTYPEPROVIDER >*)NULL )
+
+#define SFX_IMPL_TYPE_1( TYPE1 ) \
+ SFX_IMPL_TYPE_0, \
+ ::getCppuType(( const UNOREFERENCE< TYPE1 >*)NULL )
+
+#define SFX_IMPL_TYPE_2( TYPE1, TYPE2 ) \
+ SFX_IMPL_TYPE_1( TYPE1 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE2 >*)NULL )
+
+#define SFX_IMPL_TYPE_3( TYPE1, TYPE2, TYPE3 ) \
+ SFX_IMPL_TYPE_2( TYPE1, TYPE2 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE3 >*)NULL )
+
+#define SFX_IMPL_TYPE_4( TYPE1, TYPE2, TYPE3, TYPE4 ) \
+ SFX_IMPL_TYPE_3( TYPE1, TYPE2, TYPE3 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE4 >*)NULL )
+
+#define SFX_IMPL_TYPE_5( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
+ SFX_IMPL_TYPE_4( TYPE1, TYPE2, TYPE3, TYPE4 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE5 >*)NULL )
+
+#define SFX_IMPL_TYPE_6( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ) \
+ SFX_IMPL_TYPE_5( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE6 >*)NULL )
+
+#define SFX_IMPL_TYPE_7( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ) \
+ SFX_IMPL_TYPE_6( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE7 >*)NULL )
+
+#define SFX_IMPL_TYPE_8( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ) \
+ SFX_IMPL_TYPE_7( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE8 >*)NULL )
+
+#define SFX_IMPL_TYPE_9( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ) \
+ SFX_IMPL_TYPE_8( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE9 >*)NULL )
+
+#define SFX_IMPL_TYPE_10( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ) \
+ SFX_IMPL_TYPE_9( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE10 >*)NULL )
+
+#define SFX_IMPL_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ) \
+ SFX_IMPL_TYPE_10( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE11 >*)NULL )
+
+#define SFX_IMPL_TYPE_12( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ) \
+ SFX_IMPL_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE12 >*)NULL )
+
+#define SFX_IMPL_TYPE_13( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13 ) \
+ SFX_IMPL_TYPE_12( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ), \
+ ::getCppuType(( const UNOREFERENCE< TYPE13 >*)NULL )
+/*_________________________________________________________________________________________________________________________*/
+
+// FOLLOW MACROS CAN USED DIRECTLY :-)
+
+// implementation of XInterface with 1 additional interface for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_0( IMPLCLASS ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_0 )
+
+// implementation of XInterface with 1 additional interface for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_1( IMPLCLASS, TYPE1 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_1( TYPE1 ) )
+
+// implementation of XInterface with 2 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_2( IMPLCLASS, TYPE1, TYPE2 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_2( TYPE1, TYPE2 ) )
+
+// implementation of XInterface with 3 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_3( IMPLCLASS, TYPE1, TYPE2, TYPE3 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_3( TYPE1, TYPE2, TYPE3 ) )
+
+// implementation of XInterface with 4 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_4( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_4( TYPE1, TYPE2, TYPE3, TYPE4 ) )
+
+// implementation of XInterface with 5 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_5( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_5( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) )
+
+// implementation of XInterface with 6 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_6( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_6( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ) )
+
+// implementation of XInterface with 7 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_7( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_7( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ) )
+
+// implementation of XInterface with 8 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_8( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_8( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ) )
+
+// implementation of XInterface with 9 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_9( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_9( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ) )
+
+// implementation of XInterface with 10 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_10( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_10( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ) )
+
+// implementation of XInterface with 11 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_11( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ) )
+
+// implementation of XInterface with 11 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_12( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_12( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ) )
+
+// implementation of XInterface with 11 additional interfaces for queryInterface()
+#define SFX_IMPL_XTYPEPROVIDER_13( IMPLCLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13 ) \
+ SFX_IMPL_XTYPEPROVIDER_BASE( IMPLCLASS, SFX_IMPL_TYPE_13( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13 ) )
+
+//************************************************************************************************************************
+// implementation of XServiceInfo::getImplementationName()
+// XServiceInfo::supportsService()
+// XServiceInfo::getSupportedServiceNames()
+// static xxx::impl_getStaticSupportedServiceNames()
+// static xxx::impl_getStaticImplementationName()
+// static xxx::impl_createInstance()
+//************************************************************************************************************************
+#define SFX_IMPL_XSERVICEINFO( IMPLCLASS, IMPLSERVICENAME, IMPLNAME ) \
+ \
+ /* XServiceInfo */ \
+ UNOOUSTRING SAL_CALL IMPLCLASS::getImplementationName() throw( UNORUNTIMEEXCEPTION ) \
+ { \
+ return impl_getStaticImplementationName(); \
+ } \
+ \
+ /* XServiceInfo */ \
+ sal_Bool SAL_CALL IMPLCLASS::supportsService( const UNOOUSTRING& sServiceName ) throw( UNORUNTIMEEXCEPTION ) \
+ { \
+ UNOSEQUENCE< UNOOUSTRING > seqServiceNames = getSupportedServiceNames(); \
+ const UNOOUSTRING* pArray = seqServiceNames.getConstArray(); \
+ for ( sal_Int32 nCounter=0; nCounter<seqServiceNames.getLength(); nCounter++ ) \
+ { \
+ if ( pArray[nCounter] == sServiceName ) \
+ { \
+ return sal_True ; \
+ } \
+ } \
+ return sal_False ; \
+ } \
+ \
+ /* XServiceInfo */ \
+ UNOSEQUENCE< UNOOUSTRING > SAL_CALL IMPLCLASS::getSupportedServiceNames() throw( UNORUNTIMEEXCEPTION ) \
+ { \
+ return impl_getStaticSupportedServiceNames(); \
+ } \
+ \
+ /* Helper for XServiceInfo */ \
+ UNOSEQUENCE< UNOOUSTRING > IMPLCLASS::impl_getStaticSupportedServiceNames() \
+ { \
+ UNOMUTEXGUARD aGuard( UNOMUTEX::getGlobalMutex() ); \
+ UNOSEQUENCE< UNOOUSTRING > seqServiceNames( 1 ); \
+ seqServiceNames.getArray() [0] = UNOOUSTRING::createFromAscii( IMPLSERVICENAME ); \
+ return seqServiceNames ; \
+ } \
+ \
+ /* Helper for XServiceInfo */ \
+ UNOOUSTRING IMPLCLASS::impl_getStaticImplementationName() \
+ { \
+ return UNOOUSTRING::createFromAscii( IMPLNAME ); \
+ } \
+ \
+ /* Helper for registry */ \
+ UNOREFERENCE< UNOXINTERFACE > SAL_CALL IMPLCLASS::impl_createInstance( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ) throw( UNOEXCEPTION ) \
+ { \
+ return UNOREFERENCE< UNOXINTERFACE >( *new IMPLCLASS( xServiceManager ) ); \
+ }
+
+//************************************************************************************************************************
+// definition of createFactory() for MultiServices
+//************************************************************************************************************************
+#define SFX_IMPL_SINGLEFACTORY( IMPLCLASS ) \
+ \
+ UNOREFERENCE< UNOXSINGLESERVICEFACTORY > IMPLCLASS::impl_createFactory( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ) \
+ { \
+ UNOREFERENCE< UNOXSINGLESERVICEFACTORY > xReturn ( \
+ cppu::createSingleFactory( xServiceManager , \
+ IMPLCLASS::impl_getStaticImplementationName() , \
+ IMPLCLASS::impl_createInstance , \
+ IMPLCLASS::impl_getStaticSupportedServiceNames() ) \
+ ); \
+ return xReturn ; \
+ }
+
+//************************************************************************************************************************
+// definition of createFactory() for OneInstance-Services
+//************************************************************************************************************************
+#define SFX_IMPL_ONEINSTANCEFACTORY( IMPLCLASS ) \
+ \
+ UNOREFERENCE< UNOXSINGLESERVICEFACTORY > IMPLCLASS::impl_createFactory( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ) \
+ { \
+ UNOREFERENCE< UNOXSINGLESERVICEFACTORY > xReturn( \
+ cppu::createOneInstanceFactory( xServiceManager , \
+ IMPLCLASS::impl_getStaticImplementationName() , \
+ IMPLCLASS::impl_createInstance , \
+ IMPLCLASS::impl_getStaticSupportedServiceNames() ) \
+ ); \
+ return xReturn ; \
+ }
+
+//************************************************************************************************************************
+// definition for "extern c component_writeInfo()"
+//************************************************************************************************************************
+#define COMPONENT_INFO(CLASS) \
+ \
+ try \
+ { \
+ /* Set default result of follow operations !!! */ \
+ bReturn = sal_False ; \
+ \
+ /* Do the follow only, if given key is valid ! */ \
+ if ( xKey.is () ) \
+ { \
+ /* Build new keyname */ \
+ sKeyName = UNOOUSTRING::createFromAscii( "/" ) ; \
+ sKeyName += CLASS::impl_getStaticImplementationName() ; \
+ sKeyName += UNOOUSTRING::createFromAscii( "/UNO/SERVICES" ); \
+ \
+ /* Create new key with new name. */ \
+ xNewKey = xKey->createKey( sKeyName ); \
+ \
+ /* If this new key valid ... */ \
+ if ( xNewKey.is () ) \
+ { \
+ /* Get information about supported services. */ \
+ seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \
+ pArray = seqServiceNames.getArray() ; \
+ nLength = seqServiceNames.getLength() ; \
+ nCounter = 0 ; \
+ \
+ /* Then set this information on this key. */ \
+ for ( nCounter = 0; nCounter < nLength; ++nCounter ) \
+ { \
+ xNewKey->createKey( pArray [nCounter] ); \
+ } \
+ \
+ /* Result of this operations = OK. */ \
+ bReturn = sal_True ; \
+ } \
+ } \
+ } \
+ catch( UNOINVALIDREGISTRYEXCEPTION& ) \
+ { \
+ bReturn = sal_False ; \
+ } \
+
+//************************************************************************************************************************
+// definition for "extern c component_getFactory()"
+//************************************************************************************************************************
+#define CREATEFACTORY(CLASS) \
+ \
+ /* Create right factory ... */ \
+ xFactory = CLASS::impl_createFactory( xServiceManager );
+
+//************************************************************************************************************************
+// definition for "extern c component_getFactory()"
+//************************************************************************************************************************
+#define IF_NAME_CREATECOMPONENTFACTORY(CLASS) \
+ \
+ if ( CLASS::impl_getStaticImplementationName().equals( UNOOUSTRING::createFromAscii( pImplementationName ) ) ) \
+ { \
+ CREATEFACTORY ( CLASS ) \
+ }
+
+#endif // _SFX_SFXUNO_HXX
diff --git a/sfx2/inc/sfx2/shell.hxx b/sfx2/inc/sfx2/shell.hxx
new file mode 100644
index 000000000000..314c16fdbf1f
--- /dev/null
+++ b/sfx2/inc/sfx2/shell.hxx
@@ -0,0 +1,393 @@
+/*************************************************************************
+ *
+ * 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_SHELL_HXX
+#define _SFX_SHELL_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/embed/VerbDescriptor.hpp>
+#include <tools/debug.hxx>
+#include <tools/rtti.hxx>
+#include <svl/brdcst.hxx>
+
+#include <tools/ownlist.hxx>
+#include <tools/unqid.hxx>
+#include <tools/string.hxx>
+
+#include <sfx2/sfxuno.hxx>
+
+class ResMgr;
+class Window;
+class ToolBox;
+class SfxItemPool;
+class SfxPoolItem;
+class SfxRequest;
+class SfxItemSet;
+struct SfxFormalArgument;
+class StatusBar;
+class SfxInterface;
+class SfxViewShell;
+class SfxObjectShell;
+class SfxSlotPool;
+class SvGlobalName;
+
+class SfxShellObject;
+class SfxShell;
+struct SfxShell_Impl;
+struct SfxTypeLibImpl;
+class SfxShellObject;
+class SfxShellSubObject;
+class SfxDispatcher;
+class SfxViewFrame;
+class SfxSlot;
+class SfxUndoManager;
+class SfxRepeatTarget;
+class SbxVariable;
+class SbxBase;
+class SfxBindings;
+
+//====================================================================
+
+enum SfxInterfaceId
+
+/* [Beschreibung]
+
+ Id f"ur die <SfxInterface>s, damit wird "uber ein Array an der
+ <SfxApplication> ein quasi-statischer Zugriff auf die Interfaces
+ erlaubt.
+*/
+
+{
+ SFX_INTERFACE_NONE,
+ SFX_INTERFACE_SFXAPP,
+ SFX_INTERFACE_SFXDOCSH,
+ SFX_INTERFACE_SFXIPFRM,
+ SFX_INTERFACE_SFXVIEWSH,
+ SFX_INTERFACE_SFXVIEWFRM,
+ SFX_INTERFACE_SFXPLUGINFRM,
+ SFX_INTERFACE_SFXPLUGINOBJ,
+ SFX_INTERFACE_SFXPLUGINVIEWSH,
+ SFX_INTERFACE_SFXFRAMESETOBJ,
+ SFX_INTERFACE_SFXFRAMESETVIEWSH,
+ SFX_INTERFACE_SFXINTERNALFRM,
+ SFX_INTERFACE_SFXCOMPONENTDOCSH,
+ SFX_INTERFACE_SFXGENERICOBJ,
+ SFX_INTERFACE_SFXGENERICVIEWSH,
+ SFX_INTERFACE_SFXEXPLOBJ,
+ SFX_INTERFACE_SFXEXPLVIEWSH,
+ SFX_INTERFACE_SFXPLUGINVIEWSHDYNAMIC,
+ SFX_INTERFACE_SFXEXTERNALVIEWFRM,
+ SFX_INTERFACE_SFXMODULE,
+ SFX_INTERFACE_SFXFRAMESETVIEW,
+ SFX_INTERFACE_SFXFRAMESETSOURCEVIEW,
+ SFX_INTERFACE_SFXHELP_DOCSH,
+ SFX_INTERFACE_SFXHELP_VIEWSH,
+ SFX_INTERFACE_SFXTASK,
+ SFX_INTERFACE_OFA_START = 100,
+ SFX_INTERFACE_OFA_END = 100,
+ SFX_INTERFACE_SC_START = 150,
+ SFX_INTERFACE_SC_END = 199,
+ SFX_INTERFACE_SD_START = 200,
+ SFX_INTERFACE_SD_END = 249,
+ SFX_INTERFACE_SW_START = 250,
+ SFX_INTERFACE_SW_END = 299,
+ SFX_INTERFACE_SIM_START = 300,
+ SFX_INTERFACE_SIM_END = 319,
+ SFX_INTERFACE_SCH_START = 320,
+ SFX_INTERFACE_SCH_END = 339,
+ SFX_INTERFACE_SMA_START = 340,
+ SFX_INTERFACE_SMA_END = 359,
+ SFX_INTERFACE_SBA_START = 360,
+ SFX_INTERFACE_SBA_END = 399,
+ SFX_INTERFACE_IDE_START = 400,
+ SFX_INTERFACE_IDE_END = 409,
+ //-falls die noch einer braucht
+ SFX_INTERFACE_APP = SFX_INTERFACE_SW_START,
+ SFX_INTERFACE_LIB = 450
+};
+
+//TODO/CLEANUP: replace by UNO constant
+#define SVVERB_SHOW -1
+
+//====================================================================
+
+typedef void (*SfxExecFunc)(SfxShell *, SfxRequest &rReq);
+typedef void (*SfxStateFunc)(SfxShell *, SfxItemSet &rSet);
+
+class SFX2_DLLPUBLIC SfxShell: public SfxBroadcaster
+
+/* [Beschreibung]
+
+ Die Klasse SfxShell ist Basisklasse f"ur alle Schichten, die
+ Funktionalit"at Form von <Slot>s bereitstellen wollen.
+
+ Jede Instanz hat einen Verweis auf eine Interface-Beschreibung, der
+ mit <SfxShell::GetInterface()const> erh"altlich ist. Dieses Interface
+ stellt die Verbindung zu konkreten Methoden her und enth"alt einige
+ weitere beschreibende Daten f"ur Controller wie Menus und Toolboxen, aber
+ auch f"ur die diversen APIs. Der Hautpteil der Interface-Beschreibung
+ liegt in Form einer <Type-Library> vor, die mit dem <SVIDL-Compiler>
+ aus einem IDL-File generiert wird. F"ur jede SfxShell-Subclass ist ein
+ solches IDL-File zu schreiben.
+
+*/
+
+{
+ friend class SfxObjectItem;
+
+ SfxShell_Impl* pImp;
+ SfxItemPool* pPool;
+ SfxUndoManager* pUndoMgr;
+
+private:
+ SfxShell( const SfxShell & ); // n.i.
+ SfxShell& operator = ( const SfxShell & ); // n.i.
+
+protected:
+ SfxShell();
+ SfxShell( SfxViewShell *pViewSh );
+
+#ifndef _SFXSH_HXX
+ SAL_DLLPRIVATE void SetViewShell_Impl( SfxViewShell* pView );
+ SAL_DLLPRIVATE void Invalidate_Impl( SfxBindings& rBindings, USHORT nId );
+ SAL_DLLPRIVATE SfxShellObject* GetShellObj_Impl() const;
+ SAL_DLLPRIVATE void SetShellObj_Impl( SfxShellObject* pObj );
+#endif
+
+public:
+ TYPEINFO();
+ virtual ~SfxShell();
+
+ SfxBroadcaster* GetBroadcaster();
+
+ // TODO/CLEANUP: still needed?!
+ virtual SvGlobalName GetGlobalName() const;
+
+ virtual SfxInterface* GetInterface() const;
+ static SfxInterface* GetStaticInterface() { return 0; }
+
+ void SetName( const String &rName );
+ const String& GetName() const;
+
+ SfxViewShell* GetViewShell() const;
+
+ void CallExec( SfxExecFunc pFunc, SfxRequest &rReq )
+ { (*pFunc)(this, rReq); }
+ void CallState( SfxStateFunc pFunc, SfxItemSet &rSet )
+ { (*pFunc)(this, rSet); }
+
+ static void EmptyExecStub(SfxShell *pShell, SfxRequest &);
+ static void EmptyStateStub(SfxShell *pShell, SfxItemSet &);
+
+ const SfxPoolItem* GetSlotState( USHORT nSlotId, const SfxInterface *pIF = 0, SfxItemSet *pStateSet = 0 );
+ const SfxPoolItem* ExecuteSlot( SfxRequest &rReq, const SfxInterface *pIF = 0 );
+ const SfxPoolItem* ExecuteSlot( SfxRequest &rReq, BOOL bAsync );
+ ULONG ExecuteSlot( USHORT nSlot, USHORT nMemberId, SbxVariable& rRet, SbxBase* pArgs = 0 );
+
+ inline SfxItemPool& GetPool() const;
+ inline void SetPool( SfxItemPool *pNewPool ) ;
+
+ virtual SfxUndoManager* GetUndoManager();
+ void SetUndoManager( SfxUndoManager *pNewUndoMgr );
+
+ SfxRepeatTarget* GetRepeatTarget() const;
+ void SetRepeatTarget( SfxRepeatTarget *pTarget );
+
+ virtual void Invalidate(USHORT nId = 0);
+
+ BOOL IsActive() const;
+ virtual void Activate(BOOL bMDI);
+ virtual void Deactivate(BOOL bMDI);
+ virtual void ParentActivate();
+ virtual void ParentDeactivate();
+
+ SfxDispatcher* GetDispatcher() const;
+ SfxViewFrame* GetFrame() const;
+ ResMgr* GetResMgr() const;
+ virtual sal_Bool HasUIFeature( sal_uInt32 nFeature );
+ void UIFeatureChanged();
+
+ // Items
+ const SfxPoolItem* GetItem( USHORT nSlotId ) const;
+ void PutItem( const SfxPoolItem& rItem );
+ void RemoveItem( USHORT nSlotId );
+
+ // TODO/CLEANUP: still needed?!
+ void SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& aVerbs);
+ const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& GetVerbs() const;
+ void VerbExec (SfxRequest&);
+ void VerbState (SfxItemSet&);
+ SAL_DLLPRIVATE const SfxSlot* GetVerbSlot_Impl(USHORT nId) const;
+
+ void SetHelpId(ULONG nId);
+ ULONG GetHelpId() const;
+ virtual SfxObjectShell* GetObjectShell();
+ void SetDisableFlags( ULONG nFlags );
+ ULONG GetDisableFlags() const;
+
+ virtual SfxItemSet* CreateItemSet( USHORT nId );
+ virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
+
+#ifndef _SFXSH_HXX
+ SAL_DLLPRIVATE FASTBOOL CanExecuteSlot_Impl( const SfxSlot &rSlot );
+ SAL_DLLPRIVATE void DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI);
+ SAL_DLLPRIVATE void DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI);
+#endif
+};
+
+//--------------------------------------------------------------------
+SfxItemPool& SfxShell::GetPool() const
+/*
+ [Beschreibung]
+
+ Jede Subclass von SfxShell mu"s einen Pool referenzieren. Dieser
+ wird teilweise von SFx-eigenen Subklassen gesetzt (z.B. <SfxViewShell>),
+ mu"s aber insbesondere bei direkt von SfxShell abgeleiteten Klassen
+ und bei Ableitungen von SfxObjectShell selbst gesetzt werden.
+
+ Die Klasse SfxShell selbst hat noch keinen SfxItemPool, es wird
+ daher ein 0-Pointer zur"uckgeliefert.
+*/
+
+{
+ DBG_ASSERT( pPool, "no pool" );
+ return *pPool;
+}
+//-------------------------------------------------------------------
+inline void SfxShell::SetPool
+(
+ SfxItemPool* pNewPool // Pointer auf den neuen Pool oder 0
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode melden die Subklassen ihren speziellen <SfxItemPool>
+ an der SfxShell an. Jede SfxShell Instanz mu\s Zugriff auf einen
+ SfxItemPool haben. In der Regel ist dies der SfxItemPool der
+ SfxDocumentShell. Die SfxShell Subklasse "ubernimmt nicht die
+ Eigent"umerschaft "uber den "ubergebenen Pool. Bevor er gel"oscht
+ wirde, mu\s er mit SetPool(0) abgemeldet werden.
+*/
+
+{
+ pPool = pNewPool;
+}
+
+//=====================================================================
+
+#define SFX_ARGUMENTMAP(ShellClass) static SfxFormalArgument __FAR_DATA a##ShellClass##Args_Impl[] =
+
+#define SFX_SLOTMAP(ShellClass) static SfxFormalArgument __FAR_DATA a##ShellClass##Args_Impl[1]; \
+ static SfxSlot __FAR_DATA a##ShellClass##Slots_Impl[] =
+
+#define SFX_SLOTMAP_ARG(ShellClass) static SfxSlot __FAR_DATA a##ShellClass##Slots_Impl[] =
+
+#define SFX_DECL_INTERFACE(nId) \
+ static SfxInterface* pInterface; \
+ private: \
+ static void InitInterface_Impl(); \
+ public: \
+ static const SfxFormalArgument* pSfxFormalArgs_Impl; \
+ static SfxInterface* GetStaticInterface(); \
+ static SfxInterfaceId GetInterfaceId() {return SfxInterfaceId(nId);} \
+ static void RegisterInterface(SfxModule* pMod=NULL); \
+ virtual SfxInterface* GetInterface() const;
+
+#define SFX_IMPL_INTERFACE(Class,SuperClass,NameResId) \
+ \
+ SfxInterface* Class::pInterface = 0; \
+ const SfxFormalArgument* Class::pSfxFormalArgs_Impl = a##Class##Args_Impl;\
+ SfxInterface* __EXPORT Class::GetStaticInterface() \
+ { \
+ if ( !pInterface ) \
+ { \
+ pInterface = \
+ new SfxInterface( \
+ #Class, NameResId, GetInterfaceId(), \
+ SuperClass::GetStaticInterface(), \
+ a##Class##Slots_Impl[0], \
+ (USHORT) (sizeof(a##Class##Slots_Impl) / sizeof(SfxSlot) ) ); \
+ InitInterface_Impl(); \
+ } \
+ return pInterface; \
+ } \
+ \
+ SfxInterface* Class::GetInterface() const \
+ { \
+ return GetStaticInterface(); \
+ } \
+ \
+ void Class::RegisterInterface(SfxModule* pMod) \
+ { \
+ GetStaticInterface()->Register(pMod); \
+ } \
+ \
+ void Class::InitInterface_Impl()
+
+#define SFX_POSITION_MASK 0x000F
+#define SFX_VISIBILITY_MASK 0xFFF0
+#define SFX_VISIBILITY_UNVISIBLE 0x0000 // nie sichtbar
+#define SFX_VISIBILITY_PLUGSERVER 0x0010
+#define SFX_VISIBILITY_PLUGCLIENT 0x0020
+#define SFX_VISIBILITY_VIEWER 0x0040
+ // noch 1 sind frei!
+#define SFX_VISIBILITY_RECORDING 0x0200
+#define SFX_VISIBILITY_READONLYDOC 0x0400
+#define SFX_VISIBILITY_DESKTOP 0x0800
+#define SFX_VISIBILITY_STANDARD 0x1000
+#define SFX_VISIBILITY_FULLSCREEN 0x2000
+#define SFX_VISIBILITY_CLIENT 0x4000
+#define SFX_VISIBILITY_SERVER 0x8000
+#define SFX_VISIBILITY_NOCONTEXT 0xFFFF // immer sichtbar
+
+#define SFX_OBJECTBAR_REGISTRATION(nPos,rResId) \
+ GetStaticInterface()->RegisterObjectBar( nPos, rResId )
+
+#define SFX_FEATURED_OBJECTBAR_REGISTRATION(nPos,rResId,nFeature) \
+ GetStaticInterface()->RegisterObjectBar( nPos, rResId, nFeature )
+
+#define SFX_CHILDWINDOW_REGISTRATION(nId) \
+ GetStaticInterface()->RegisterChildWindow( nId, (BOOL) FALSE )
+
+#define SFX_FEATURED_CHILDWINDOW_REGISTRATION(nId,nFeature) \
+ GetStaticInterface()->RegisterChildWindow( nId, (BOOL) FALSE, nFeature )
+
+#define SFX_CHILDWINDOW_CONTEXT_REGISTRATION(nId) \
+ GetStaticInterface()->RegisterChildWindow( nId, (BOOL) TRUE )
+
+#define SFX_POPUPMENU_REGISTRATION(rResId) \
+ GetStaticInterface()->RegisterPopupMenu( rResId )
+
+#define SFX_OBJECTMENU_REGISTRATION(nPos,rResId) \
+ GetStaticInterface()->RegisterObjectMenu( nPos, rResId )
+
+#define SFX_STATUSBAR_REGISTRATION(rResId) \
+ GetStaticInterface()->RegisterStatusBar( rResId )
+
+#endif
+
diff --git a/sfx2/inc/sfx2/signaturestate.hxx b/sfx2/inc/sfx2/signaturestate.hxx
new file mode 100644
index 000000000000..bea01c6e283a
--- /dev/null
+++ b/sfx2/inc/sfx2/signaturestate.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SFX2_SIGNATURESTATE_HXX
+#define SFX2_SIGNATURESTATE_HXX
+
+// xmlsec05, check with SFX team
+#define SIGNATURESTATE_UNKNOWN (sal_Int16)(-1)
+#define SIGNATURESTATE_NOSIGNATURES (sal_Int16)0
+#define SIGNATURESTATE_SIGNATURES_OK (sal_Int16)1
+#define SIGNATURESTATE_SIGNATURES_BROKEN (sal_Int16)2
+// State was SIGNATURES_OK, but doc is modified now
+#define SIGNATURESTATE_SIGNATURES_INVALID (sal_Int16)3
+// signature is OK, but certificate could not be validated
+#define SIGNATURESTATE_SIGNATURES_NOTVALIDATED (sal_Int16)4
+//signatur and certificate are ok,but not al files are signed, as was the case in
+//OOo 2.x - OOo 3.1.1. This state is only used together with document signatures.
+#define SIGNATURESTATE_SIGNATURES_PARTIAL_OK (sal_Int16)5
+
+#endif // SFX2_SIGNATURESTATE_HXX
diff --git a/sfx2/inc/sfx2/styfitem.hxx b/sfx2/inc/sfx2/styfitem.hxx
new file mode 100644
index 000000000000..76be875d6d70
--- /dev/null
+++ b/sfx2/inc/sfx2/styfitem.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * 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_STYFITEM_HXX
+#define _SFX_STYFITEM_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#ifndef _BITMAP_HXX //autogen
+#include <vcl/bitmap.hxx>
+#endif
+#ifndef _IMAGE_HXX //autogen
+#include <vcl/image.hxx>
+#endif
+#include <tools/list.hxx>
+#ifndef _RC_HXX //autogen
+#include <tools/rc.hxx>
+#endif
+#include <rsc/rscsfx.hxx>
+
+#ifndef _SFX_STYFITEM_HXX_NOLIST
+struct SfxFilterTupel {
+ String aName;
+ USHORT nFlags;
+};
+
+DECLARE_LIST(SfxStyleFilter, SfxFilterTupel*)
+#else
+typedef List SfxStyleFilter;
+#endif
+
+// CLASS -----------------------------------------------------------------
+
+class SfxStyleFamilyItem: public Resource
+{
+ Image aImage;
+ Bitmap aBitmap;
+ String aText;
+ String aHelpText;
+ USHORT nFamily;
+ SfxStyleFilter aFilterList;
+
+public:
+ SfxStyleFamilyItem( const ResId &rId );
+ ~SfxStyleFamilyItem();
+
+ const Bitmap& GetBitmap() const { return aBitmap; }
+ const String& GetText() const { return aText; }
+ const String& GetHelpText() const { return aHelpText; }
+ SfxStyleFamily GetFamily() const { return (SfxStyleFamily)nFamily; }
+ const SfxStyleFilter& GetFilterList() const { return aFilterList; }
+ const Image& GetImage() const { return aImage; }
+
+ // --------------------------------------------------------------------
+ class GrantAccess { friend class SfxStyleFamilies; };
+ void SetImage( const Image& _rImg ) { aImage = _rImg; }
+};
+
+//#if 0 // _SOLAR__PRIVATE
+DECLARE_LIST(SfxStyleFamilyList, SfxStyleFamilyItem*)
+//#else
+//typedef List SfxStyleFamilyList;
+//#endif
+
+class SFX2_DLLPUBLIC SfxStyleFamilies: public Resource
+{
+ SfxStyleFamilyList aEntryList;
+
+public:
+ /** ctor
+ <p>Will automatically call updateImages with BMP_COLOR_NORMAL.</p>
+ */
+ SfxStyleFamilies( const ResId &);
+ SfxStyleFamilies( ) {};
+ ~SfxStyleFamilies();
+
+ USHORT Count() const
+ { return (USHORT)aEntryList.Count(); }
+
+ const SfxStyleFamilyItem* GetObject(ULONG nIdx) const
+ { return (SfxStyleFamilyItem*)aEntryList.GetObject(nIdx); }
+
+ /** updates the images of all single SfxStyleFamilyItems with new images from the given resource
+
+ <p>The resource must contain a local image lists, with the id beeing the integer equivalent for the
+ requested bitmap mode, incremented by 1.</p>
+
+ <p>Usually, you will use the same resource which originally constructed the object.</p>
+
+ @return
+ <TRUE/> if an image list for the requested mode could be found in the given resource.
+ */
+ sal_Bool updateImages( const ResId& _rId, const BmpColorMode _eMode );
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/styledlg.hxx b/sfx2/inc/sfx2/styledlg.hxx
new file mode 100644
index 000000000000..9e2ffdadac4d
--- /dev/null
+++ b/sfx2/inc/sfx2/styledlg.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_STYLEDLG_HXX
+#define _SFX_STYLEDLG_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <sfx2/tabdlg.hxx>
+
+class SfxStyleSheetBase;
+
+class SFX2_DLLPUBLIC SfxStyleDialog: public SfxTabDialog
+{
+private:
+ SfxStyleSheetBase* pStyle;
+//#if 0 // _SOLAR__PRIVATE
+ DECL_DLLPRIVATE_LINK( CancelHdl, Button * );
+//#endif
+protected:
+ virtual const SfxItemSet* GetRefreshedSet();
+
+public:
+#define ID_TABPAGE_MANAGESTYLES 1
+ SfxStyleDialog( Window* pParent, const ResId& rResId, SfxStyleSheetBase&,
+ BOOL bFreeRes = TRUE, const String* pUserBtnTxt = 0 );
+
+ ~SfxStyleDialog();
+
+ SfxStyleSheetBase& GetStyleSheet() { return *pStyle; }
+ const SfxStyleSheetBase& GetStyleSheet() const { return *pStyle; }
+
+ virtual short Ok();
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/tabdlg.hxx b/sfx2/inc/sfx2/tabdlg.hxx
new file mode 100644
index 000000000000..cedc8f256010
--- /dev/null
+++ b/sfx2/inc/sfx2/tabdlg.hxx
@@ -0,0 +1,318 @@
+/*************************************************************************
+ *
+ * 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 _SFXTABDLG_HXX
+#define _SFXTABDLG_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <vcl/tabdlg.hxx>
+#include <vcl/button.hxx>
+#include <vcl/tabctrl.hxx>
+#include <vcl/tabpage.hxx>
+#include <svl/itempool.hxx>
+#include <svl/itemset.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+
+#if ENABLE_LAYOUT
+#include <layout/layout.hxx>
+namespace layout { class SfxTabDialog; class SfxTabDialogController; }
+#endif /* ENABLE_LAYOUT */
+
+class SfxPoolItem;
+class SfxTabDialog;
+class SfxViewFrame;
+class SfxTabPage;
+class SfxBindings;
+
+#ifndef ENABLE_LAYOUT_SFX_TABDIALOG
+#define ENABLE_LAYOUT_SFX_TABDIALOG 0
+#define NAMESPACE_LAYOUT_SFX_TABDIALOG
+#define END_NAMESPACE_LAYOUT_SFX_TABDIALOG
+#define LAYOUT_NS_SFX_TABDIALOG
+#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG*/
+
+typedef SfxTabPage* (*CreateTabPage)(Window *pParent, const SfxItemSet &rAttrSet);
+typedef USHORT* (*GetTabPageRanges)(); // liefert internationale Which-Wert
+struct TabPageImpl;
+class SfxUs_Impl;
+
+#if ENABLE_LAYOUT_SFX_TABDIALOG
+#include <layout/layout-pre.hxx>
+#undef SfxTabDialog
+#undef SfxTabPage
+#endif /* ENABLE_LAYOUT_SFX_TABDIALOG */
+
+NAMESPACE_LAYOUT_SFX_TABDIALOG
+
+struct TabDlg_Impl;
+
+#define ID_TABCONTROL 1
+#define RET_USER 100
+#define RET_USER_CANCEL 101
+
+class SFX2_DLLPUBLIC SfxTabDialogItem: public SfxSetItem
+{
+public:
+ TYPEINFO();
+ SfxTabDialogItem( USHORT nId, const SfxItemSet& rItemSet );
+ SfxTabDialogItem(const SfxTabDialogItem& rAttr, SfxItemPool* pItemPool=NULL);
+ virtual SfxPoolItem* Clone(SfxItemPool* pToPool) const;
+ virtual SfxPoolItem* Create(SvStream& rStream, USHORT nVersion) const;
+};
+
+class SFX2_DLLPUBLIC SfxTabDialog : public TabDialog
+{
+private:
+friend class SfxTabPage;
+friend class SfxTabDialogController;
+
+ SfxViewFrame* pFrame;
+
+ TabControl aTabCtrl;
+ OKButton aOKBtn;
+ PushButton* pUserBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
+ PushButton aResetBtn;
+ PushButton aBaseFmtBtn;
+
+ const SfxItemSet* pSet;
+ SfxItemSet* pOutSet;
+ TabDlg_Impl* pImpl;
+ USHORT* pRanges;
+ sal_uInt32 nResId;
+ USHORT nAppPageId;
+ BOOL bItemsReset;
+ BOOL bFmt;
+
+//#if 0 // _SOLAR__PRIVATE
+ DECL_DLLPRIVATE_LINK( ActivatePageHdl, TabControl * );
+ DECL_DLLPRIVATE_LINK( DeactivatePageHdl, TabControl * );
+ DECL_DLLPRIVATE_LINK( OkHdl, Button * );
+ DECL_DLLPRIVATE_LINK( ResetHdl, Button * );
+ DECL_DLLPRIVATE_LINK( BaseFmtHdl, Button * );
+ DECL_DLLPRIVATE_LINK( UserHdl, Button * );
+ DECL_DLLPRIVATE_LINK( CancelHdl, Button * );
+ SAL_DLLPRIVATE void Init_Impl(BOOL, const String *);
+//#endif
+
+protected:
+ virtual short Ok();
+ // wird im Sfx gel"oscht!
+ virtual SfxItemSet* CreateInputItemSet( USHORT nId );
+ // wird *nicht* im Sfx gel"oscht!
+ virtual const SfxItemSet* GetRefreshedSet();
+ virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual long Notify( NotifyEvent& rNEvt );
+
+ SfxItemSet* pExampleSet;
+ SfxItemSet* GetInputSetImpl();
+ SfxTabPage* GetTabPage( USHORT nPageId ) const;
+
+ BOOL IsInOK() const;
+ /** prepare to leace the current page. Calls the DeactivatePage method of the current page, (if necessary),
+ handles the item sets to copy.
+ @return TRUE if it is allowed to leave the current page, FALSE otherwise
+ */
+ bool PrepareLeaveCurrentPage();
+
+public:
+ SfxTabDialog( Window* pParent, const ResId &rResId, USHORT nSetId, SfxBindings& rBindings,
+ BOOL bEditFmt = FALSE, const String *pUserButtonText = 0 );
+ SfxTabDialog( Window* pParent, const ResId &rResId, const SfxItemSet * = 0,
+ BOOL bEditFmt = FALSE, const String *pUserButtonText = 0 );
+ SfxTabDialog( SfxViewFrame *pViewFrame, Window* pParent, const ResId &rResId,
+ const SfxItemSet * = 0, BOOL bEditFmt = FALSE,
+ const String *pUserButtonText = 0 );
+ ~SfxTabDialog();
+
+ void AddTabPage( USHORT nId,
+ CreateTabPage pCreateFunc, // != 0
+ GetTabPageRanges pRangesFunc, // darf 0 sein
+ BOOL bItemsOnDemand = FALSE);
+ void AddTabPage( USHORT nId,
+ const String &rRiderText,
+ CreateTabPage pCreateFunc, // != 0
+ GetTabPageRanges pRangesFunc, // darf 0 sein
+ BOOL bItemsOnDemand = FALSE,
+ USHORT nPos = TAB_APPEND);
+ void AddTabPage( USHORT nId,
+ const Bitmap &rRiderBitmap,
+ CreateTabPage pCreateFunc, // != 0
+ GetTabPageRanges pRangesFunc, // darf 0 sein
+ BOOL bItemsOnDemand = FALSE,
+ USHORT nPos = TAB_APPEND);
+
+ void AddTabPage( USHORT nId,
+ BOOL bItemsOnDemand = FALSE);
+ void AddTabPage( USHORT nId,
+ const String &rRiderText,
+ BOOL bItemsOnDemand = FALSE,
+ USHORT nPos = TAB_APPEND);
+ void AddTabPage( USHORT nId,
+ const Bitmap &rRiderBitmap,
+ BOOL bItemsOnDemand = FALSE,
+ USHORT nPos = TAB_APPEND);
+
+ void RemoveTabPage( USHORT nId );
+
+ void SetCurPageId( USHORT nId ) { nAppPageId = nId; }
+ USHORT GetCurPageId() const
+ { return aTabCtrl.GetCurPageId(); }
+ void ShowPage( USHORT nId );
+
+ // liefert ggf. per Map konvertierte lokale Slots
+ const USHORT* GetInputRanges( const SfxItemPool& );
+ void SetInputSet( const SfxItemSet* pInSet );
+ const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
+ const SfxItemSet* GetOutputItemSet( USHORT nId ) const;
+ int FillOutputItemSet();
+ BOOL IsFormat() const { return bFmt; }
+
+ const OKButton& GetOKButton() const { return aOKBtn; }
+ OKButton& GetOKButton() { return aOKBtn; }
+ const CancelButton& GetCancelButton() const { return aCancelBtn; }
+ CancelButton& GetCancelButton() { return aCancelBtn; }
+ const HelpButton& GetHelpButton() const { return aHelpBtn; }
+ HelpButton& GetHelpButton() { return aHelpBtn; }
+ const PushButton& GetResetButton() const { return aResetBtn; }
+ PushButton& GetResetButton() { return aResetBtn; }
+
+ const PushButton* GetApplyButton() const;
+ PushButton* GetApplyButton();
+
+ const PushButton* GetUserButton() const { return pUserBtn; }
+ PushButton* GetUserButton() { return pUserBtn; }
+ void RemoveResetButton();
+
+ short Execute();
+ void StartExecuteModal( const Link& rEndDialogHdl );
+ void Start( BOOL bShow = TRUE );
+
+#if !ENABLE_LAYOUT_SFX_TABDIALOG
+ const SfxItemSet* GetExampleSet() const { return pExampleSet; }
+#else /* ENABLE_LAYOUT_SFX_TABDIALOG */
+ SfxItemSet* GetExampleSet() const { return 0; }
+#endif /* ENABLE_LAYOUT_SFX_TABDIALOG */
+ SfxViewFrame* GetViewFrame() const { return pFrame; }
+
+ void EnableApplyButton(BOOL bEnable = TRUE);
+ BOOL IsApplyButtonEnabled() const;
+ void SetApplyHandler(const Link& _rHdl);
+ Link GetApplyHandler() const;
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE void Start_Impl();
+ SAL_DLLPRIVATE BOOL OK_Impl() { return PrepareLeaveCurrentPage(); }
+//#endif
+};
+
+END_NAMESPACE_LAYOUT_SFX_TABDIALOG
+
+#if ENABLE_LAYOUT_SFX_TABDIALOG
+#include <layout/layout-post.hxx>
+#endif /* ENABLE_LAYOUT_SFX_TABDIALOG */
+
+#if !ENABLE_LAYOUT_SFX_TABDIALOG
+
+namespace sfx { class ItemConnectionBase; }
+
+class SFX2_DLLPUBLIC SfxTabPage: public TabPage
+{
+friend class SfxTabDialog;
+ #if ENABLE_LAYOUT
+ friend class layout::SfxTabDialog;
+ #endif
+
+private:
+ const SfxItemSet* pSet;
+ String aUserString;
+ BOOL bHasExchangeSupport;
+ SfxTabDialog* pTabDlg;
+ TabPageImpl* pImpl;
+
+ SAL_DLLPRIVATE void SetTabDialog( SfxTabDialog* pNew ) { pTabDlg = pNew; }
+ SAL_DLLPRIVATE void SetInputSet( const SfxItemSet* pNew ) { pSet = pNew; }
+
+protected:
+ SfxTabPage( Window *pParent, const ResId &, const SfxItemSet &rAttrSet );
+ SfxTabPage( Window *pParent, WinBits nStyle, const SfxItemSet &rAttrSet );
+
+ USHORT GetSlot( USHORT nWhich ) const
+ { return pSet->GetPool()->GetSlotId( nWhich ); }
+ USHORT GetWhich( USHORT nSlot, sal_Bool bDeep = sal_True ) const
+ { return pSet->GetPool()->GetWhich( nSlot, bDeep ); }
+ const SfxPoolItem* GetOldItem( const SfxItemSet& rSet, USHORT nSlot, sal_Bool bDeep = sal_True );
+ const SfxPoolItem* GetExchangeItem( const SfxItemSet& rSet, USHORT nSlot );
+ SfxTabDialog* GetTabDialog() const { return pTabDlg; }
+
+ void AddItemConnection( sfx::ItemConnectionBase* pConnection );
+
+public:
+ virtual ~SfxTabPage();
+
+ const SfxItemSet& GetItemSet() const { return *pSet; }
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+
+ BOOL HasExchangeSupport() const
+ { return bHasExchangeSupport; }
+ void SetExchangeSupport( BOOL bNew = TRUE )
+ { bHasExchangeSupport = bNew; }
+
+ enum sfxpg {
+ KEEP_PAGE = 0x0000, // Fehlerbehandlung; Seite nicht wechseln
+ // 2. F"ullen eines ItemSets f"ur die Aktualilsierung
+ // "ubergeordneter Beispiele; dieser Pointer kann immer
+ // NULL sein!!
+ LEAVE_PAGE = 0x0001,
+ // Set aktualisieren und andere Page aktualisieren
+ REFRESH_SET = 0x0002
+ };
+
+ using TabPage::ActivatePage;
+ using TabPage::DeactivatePage;
+ virtual void ActivatePage( const SfxItemSet& );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+ void SetUserData(const String& rString)
+ { aUserString = rString; }
+ String GetUserData() { return aUserString; }
+ virtual void FillUserData();
+ virtual BOOL IsReadOnly() const;
+ virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
+ static const SfxPoolItem* GetItem( const SfxItemSet& rSet, USHORT nSlot, sal_Bool bDeep = sal_True );
+
+ void SetFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame);
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetFrame();
+};
+
+#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */
+
+#endif
+
diff --git a/sfx2/inc/sfx2/tbxctrl.hxx b/sfx2/inc/sfx2/tbxctrl.hxx
new file mode 100644
index 000000000000..d618051e4063
--- /dev/null
+++ b/sfx2/inc/sfx2/tbxctrl.hxx
@@ -0,0 +1,451 @@
+/*************************************************************************
+ *
+ * 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 _SFXTBXCTRL_HXX
+#define _SFXTBXCTRL_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <vcl/timer.hxx>
+#ifndef _MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _FLOATWIN_HXX //autogen
+#include <vcl/floatwin.hxx>
+#endif
+#include <sfx2/ctrlitem.hxx>
+#include <sfx2/sfxstatuslistener.hxx>
+#include <svtools/toolboxcontroller.hxx>
+#include <svtools/framestatuslistener.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/awt/XDockableWindowListener.hpp>
+#include <com/sun/star/awt/XDockableWindow.hpp>
+#include <com/sun/star/frame/XSubToolbarController.hpp>
+
+//------------------------------------------------------------------
+
+class SfxUnoToolBoxControl;
+class SfxToolBoxControl;
+class SfxBindings;
+class SfxModule;
+class SfxUnoControllerItem;
+
+svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const ::rtl::OUString& aCommandURL );
+
+//typedef SfxToolBoxControl* (*SfxToolBoxControlCtor)( USHORT nId, ToolBox &rTbx, SfxBindings & );
+typedef SfxToolBoxControl* (*SfxToolBoxControlCtor)( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+
+struct SfxTbxCtrlFactory
+{
+ SfxToolBoxControlCtor pCtor;
+ TypeId nTypeId;
+ USHORT nSlotId;
+
+ SfxTbxCtrlFactory( SfxToolBoxControlCtor pTheCtor,
+ TypeId nTheTypeId, USHORT nTheSlotId ):
+ pCtor(pTheCtor),
+ nTypeId(nTheTypeId),
+ nSlotId(nTheSlotId)
+ {}
+};
+
+//------------------------------------------------------------------
+
+enum SfxPopupWindowType
+{
+ SFX_POPUPWINDOW_NONE,
+ SFX_POPUPWINDOW_ONCLICK,
+ SFX_POPUPWINDOW_ONTIMEOUT,
+ SFX_POPUPWINDOW_ONCLICKANDMOVE,
+ SFX_POPUPWINDOW_ONTIMEOUTANDMOVE,
+ SFX_POPUPWINDOW_CONTEXTMENU
+};
+
+//------------------------------------------------------------------
+
+class SfxFrameStatusListener : public svt::FrameStatusListener
+{
+ public:
+ SfxFrameStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame,
+ SfxStatusListenerInterface* pCallee );
+ virtual ~SfxFrameStatusListener();
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ private:
+ SfxStatusListenerInterface* m_pCallee;
+};
+
+//------------------------------------------------------------------
+
+/* FloatingWindows, die aus ToolBoxen abgerissen werden k"onnen, sollten
+ dieser Klasse abgeleitet werden. Da sie ebenfalls von SfxControllerItem
+ abgeleitet ist, erhalten ihre Instanzen auch die StateChanged Aufrufe.
+*/
+
+class SFX2_DLLPUBLIC SfxPopupWindow: public FloatingWindow, public SfxStatusListenerInterface
+{
+friend class SfxToolBox_Impl;
+ BOOL m_bFloating;
+ ULONG m_nEventId;
+ BOOL m_bCascading;
+ Link m_aDeleteLink;
+ USHORT m_nId;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
+ SfxFrameStatusListener* m_pStatusListener;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xStatusListener;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+
+private:
+ SfxFrameStatusListener* GetOrCreateStatusListener();
+
+ SAL_DLLPRIVATE SfxPopupWindow(SfxPopupWindow &); // not defined
+ SAL_DLLPRIVATE void operator =(SfxPopupWindow &); // not defined
+
+//#if 0 // _SOLAR__PRIVATE
+ DECL_DLLPRIVATE_LINK( Delete, void * );
+//#endif
+
+protected:
+ virtual void PopupModeEnd();
+ virtual BOOL Close();
+ virtual void DeleteFloatingWindow();
+
+ USHORT GetId() const { return m_nId; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& GetFrame() const { return m_xFrame; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& GetServiceManager() const { return m_xServiceManager; }
+
+ void BindListener();
+ void UnbindListener();
+ void AddStatusListener( const rtl::OUString& rCommandURL );
+ void RemoveStatusListener( const rtl::OUString& rCommandURL );
+ void UpdateStatus( const rtl::OUString& rCommandURL );
+
+ // SfxStatusListenerInterface
+ using FloatingWindow::StateChanged;
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+
+public:
+ SfxPopupWindow( USHORT nId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
+ WinBits nBits );
+ SfxPopupWindow( USHORT nId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
+ const ResId &rId );
+ SfxPopupWindow( USHORT nId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
+ Window* pParentWindow,
+ const ResId &rId );
+ SfxPopupWindow( USHORT nId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
+ Window* pParentWindow,
+ WinBits nBits );
+ ~SfxPopupWindow();
+
+ virtual SfxPopupWindow* Clone() const;
+ virtual void MouseMove( const MouseEvent& rMEvt );
+
+ void StartCascading();
+ void EndCascading();
+ SAL_DLLPRIVATE void SetDeleteLink_Impl( const Link& rLink )
+ {
+ m_aDeleteLink = rLink;
+ }
+};
+
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+
+#define SFX_DECL_TOOLBOX_CONTROL() \
+ static SfxToolBoxControl* CreateImpl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ); \
+ static void RegisterControl(USHORT nSlotId = 0, SfxModule *pMod=NULL)
+
+/* F"ur spezielle ToolBox-Controls, z.B. eine Font-Auswahl-Box oder
+ aus ToolBoxen abrei"sbare FloatingWindows mu"s passend zur Item-Subclass
+ eine Subclass von SfxTooBoxControl implementiert werden.
+
+ Diese Klasse mu"s in SfxApplication::Init() mit der statischen Methode
+ RegisterControl() registriert werden. Der SFx erzeugt dann automatisch
+ diese Controls in ToolBoxen, wenn die dazugeh"origen Slots von dem
+ angegebenen Typ sind.
+ */
+
+struct SfxToolBoxControl_Impl;
+class SFX2_DLLPUBLIC SfxToolBoxControl:
+ public ::com::sun::star::awt::XDockableWindowListener,
+ public ::com::sun::star::frame::XSubToolbarController,
+ public svt::ToolboxController
+
+{
+friend class SfxToolbox;
+friend class SfxToolBox_Impl;
+friend class SfxToolboxCustomizer;
+friend class SfxPopupWindow;
+friend struct SfxTbxCtrlFactory;
+
+ SfxToolBoxControl_Impl* pImpl;
+
+protected:
+ DECL_LINK( PopupModeEndHdl, void * );
+ DECL_LINK( ClosePopupWindow, SfxPopupWindow * );
+
+ // old SfxToolBoxControl methods
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void Select( BOOL bMod1 = FALSE );
+ virtual void Select( USHORT nModifier );
+
+ virtual void DoubleClick();
+ virtual void Click();
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+ virtual SfxPopupWindow* CreatePopupWindowCascading();
+ virtual Window* CreateItemWindow( Window *pParent );
+
+ // Must be called by subclass to set a new popup window instance
+ void SetPopupWindow( SfxPopupWindow* pWindow );
+
+ // 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();
+ virtual void SAL_CALL release() throw();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
+
+ // new controller API
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XToolbarController
+ virtual void SAL_CALL execute( sal_Int16 KeyModifier )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL click()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL doubleClick()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& rParent )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSubToolbarController
+ virtual ::sal_Bool SAL_CALL opensSubToolbar( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSubToolbarName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL functionSelected( const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateImage( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XDockableWindowListener
+ virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+
+ // helper methods
+ void createAndPositionSubToolBar( const ::rtl::OUString& rSubToolBarResName );
+ ::Size getPersistentFloatingSize( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const ::rtl::OUString& rSubToolBarResName );
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SfxToolBoxControl( USHORT nSlotID, USHORT nId, ToolBox& rBox, BOOL bShowStrings = FALSE );
+ virtual ~SfxToolBoxControl();
+
+ ToolBox& GetToolBox() const;
+ unsigned short GetId() const;
+ unsigned short GetSlotId() const;
+
+ void Dispatch( const ::rtl::OUString& aCommand,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
+ static void Dispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider,
+ const rtl::OUString& rCommand,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
+
+ static SfxItemState GetItemState( const SfxPoolItem* pState );
+ static SfxToolBoxControl* CreateControl( USHORT nSlotId, USHORT nTbxId, ToolBox *pBox, SfxModule *pMod );
+ static void RegisterToolBoxControl( SfxModule*, SfxTbxCtrlFactory*);
+};
+
+#define SFX_IMPL_TOOLBOX_CONTROL(Class, nItemClass) \
+ SfxToolBoxControl* __EXPORT Class::CreateImpl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ) \
+ { return new Class( nSlotId, nId, rTbx ); } \
+ void Class::RegisterControl(USHORT nSlotId, SfxModule *pMod) \
+ { SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( \
+ Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+
+#define SFX_IMPL_TOOLBOX_CONTROL_ARG(Class, nItemClass, Arg) \
+ SfxToolBoxControl* __EXPORT Class::CreateImpl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ) \
+ { return new Class( nSlotId, nId, rTbx, Arg); } \
+ void Class::RegisterControl(USHORT nSlotId, SfxModule *pMod) \
+ { SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( \
+ Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+
+//=========================================================================
+
+//#if 0 // _SOLAR__PRIVATE
+
+class SfxDragButton_Impl : public FixedImage
+{
+public:
+
+ SfxDragButton_Impl( Window *pParent );
+ virtual void Command ( const CommandEvent& rCEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+};
+
+class SfxDragToolBoxControl_Impl : public SfxToolBoxControl
+/* [Beschreibung]
+
+*/
+
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SfxDragToolBoxControl_Impl( USHORT nId, ToolBox& rBox );
+ virtual Window* CreateItemWindow( Window *pParent );
+ using SfxToolBoxControl::Select;
+ virtual void Select( BOOL bMod1 = FALSE );
+};
+
+//------------------------------------------------------------------------
+
+class SfxAppToolBoxControl_Impl : public SfxToolBoxControl
+
+/* [Beschreibung]
+
+ Interne Hilfsklasse f"ur um das Popup-Menu <AppMenu_Impl> unter Neu
+ im SDT zu starten.
+*/
+
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SfxAppToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ ~SfxAppToolBoxControl_Impl();
+ void SetImage( const String& rFacName );
+
+ struct ExecuteInfo
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
+ ::com::sun::star::util::URL aTargetURL;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
+ };
+
+ DECL_STATIC_LINK( SfxAppToolBoxControl_Impl, ExecuteHdl_Impl, ExecuteInfo* );
+
+protected:
+ virtual void Click();
+ using SfxToolBoxControl::Select;
+ virtual void Select( BOOL );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual SfxPopupWindow* CreatePopupWindow();
+ DECL_LINK( Activate, Menu * ); // Needed to support high contrast images
+private:
+ String aLastURL;
+ BOOL bBigImages;
+ PopupMenu* pMenu;
+ ULONG m_nSymbolsStyle;
+ BOOL m_bWasHiContrastMode;
+ BOOL m_bShowMenuImages;
+};
+
+class SfxHistoryToolBoxControl_Impl : public SfxToolBoxControl
+{
+ Timer aTimer;
+
+private:
+ DECL_LINK( Timeout, Timer * );
+
+protected:
+ virtual void Click( );
+ using SfxToolBoxControl::Select;
+ virtual void Select( BOOL );
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SfxHistoryToolBoxControl_Impl( USHORT nId, ToolBox& rBox );
+};
+
+class SfxReloadToolBoxControl_Impl : public SfxToolBoxControl
+{
+ protected:
+ using SfxToolBoxControl::Select;
+ virtual void Select( USHORT nSelectModifier );
+
+ public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SfxReloadToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+};
+
+class SfxPopupMenuManager;
+class SfxAddonsToolBoxControl_Impl : public SfxToolBoxControl
+
+/* [Description]
+
+ Internal helper class to provide the addons popup menu through the addons
+ toolbox button.
+*/
+
+{
+ BOOL bBigImages;
+ PopupMenu* pMenu;
+ BOOL m_bWasHiContrastMode;
+ BOOL m_bShowMenuImages;
+
+protected:
+ virtual void Click();
+ using SfxToolBoxControl::Select;
+ virtual void Select( BOOL );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ DECL_LINK( Activate, Menu * ); // Needed to support high contrast images
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SfxAddonsToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ ~SfxAddonsToolBoxControl_Impl();
+
+ void RefreshMenuImages( Menu* pMenu );
+};
+
+//#endif
+
+#endif
diff --git a/sfx2/inc/sfx2/templdlg.hxx b/sfx2/inc/sfx2/templdlg.hxx
new file mode 100644
index 000000000000..3602f200e2a9
--- /dev/null
+++ b/sfx2/inc/sfx2/templdlg.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_TEMPLDLG_HXX
+#define _SFX_TEMPLDLG_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+
+#include <rsc/rscsfx.hxx>
+
+#include <sfx2/dockwin.hxx>
+#include <sfx2/childwin.hxx>
+#include <sfx2/basedlgs.hxx>
+
+class SfxTemplateDialog_Impl;
+class SfxTemplateCatalog_Impl;
+
+// class ISfxTemplateCommon ----------------------------------------------
+
+class ISfxTemplateCommon
+{
+public:
+ virtual SfxStyleFamily GetActualFamily() const = 0;
+ virtual String GetSelectedEntry() const = 0;
+};
+
+// class SfxTemplateDialog -----------------------------------------------
+
+class SfxTemplateDialog : public SfxDockingWindow
+{
+private:
+friend class SfxTemplateDialogWrapper;
+friend class SfxTemplateDialog_Impl;
+
+ SfxTemplateDialog_Impl* pImpl;
+
+ virtual void DataChanged( const DataChangedEvent& _rDCEvt );
+ virtual void Resize();
+ virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment );
+ virtual void StateChanged( StateChangedType nStateChange );
+
+public:
+ SfxTemplateDialog( SfxBindings*, SfxChildWindow*, Window* );
+ ~SfxTemplateDialog();
+
+ virtual void Update();
+
+ ISfxTemplateCommon* GetISfxTemplateCommon();
+ void SetParagraphFamily();
+};
+
+// class SfxTemplateCatalog ----------------------------------------------
+
+class SfxTemplateCatalog : public SfxModalDialog
+{
+private:
+ SfxTemplateCatalog_Impl *pImpl;
+
+public:
+ SfxTemplateCatalog(Window * pParent, SfxBindings *pBindings);
+ ~SfxTemplateCatalog();
+ friend class SfxTemplateCatalog_Impl;
+};
+
+// class SfxTemplateDialogWrapper ----------------------------------------
+
+class SFX2_DLLPUBLIC SfxTemplateDialogWrapper : public SfxChildWindow
+{
+public:
+ SfxTemplateDialogWrapper
+ (Window*,USHORT,SfxBindings*,SfxChildWinInfo*);
+ SFX_DECL_CHILDWINDOW(SfxTemplateDialogWrapper);
+
+ void SetParagraphFamily();
+};
+
+#endif
+
diff --git a/sfx2/inc/sfx2/unoctitm.hxx b/sfx2/inc/sfx2/unoctitm.hxx
new file mode 100644
index 000000000000..f30a544922b5
--- /dev/null
+++ b/sfx2/inc/sfx2/unoctitm.hxx
@@ -0,0 +1,211 @@
+/*************************************************************************
+ *
+ * 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_UNOCTITM_HXX
+#define _SFX_UNOCTITM_HXX
+
+#include <functional>
+#include <com/sun/star/frame/XNotifyingDispatch.hpp>
+#include <com/sun/star/frame/XDispatchResultListener.hpp>
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#include <com/sun/star/frame/FeatureStateEvent.hpp>
+#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+
+#include <sfx2/sfxuno.hxx>
+#include <sfx2/ctrlitem.hxx>
+#include <osl/mutex.hxx>
+
+class SfxBindings;
+class SfxFrame;
+class SfxDispatcher;
+
+class SfxUnoControllerItem : public ::com::sun::star::frame::XStatusListener ,
+ public ::com::sun::star::lang::XTypeProvider ,
+ public ::cppu::OWeakObject
+{
+ ::com::sun::star::util::URL aCommand;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
+ SfxControllerItem* pCtrlItem;
+ SfxBindings* pBindings;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > TryGetDispatch( SfxFrame* pFrame );
+
+public:
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+
+ SfxUnoControllerItem( SfxControllerItem*, SfxBindings&, const String& );
+ ~SfxUnoControllerItem();
+
+ const ::com::sun::star::util::URL& GetCommand() const
+ { return aCommand; }
+ void Execute();
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
+
+ // Something else
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
+ void UnBind();
+ void GetNewDispatch();
+ void ReleaseDispatch();
+ void ReleaseBindings();
+};
+
+struct SfxStatusDispatcher_Impl_hashType
+{
+ size_t operator()(const ::rtl::OUString& s) const
+ { return s.hashCode(); }
+};
+
+typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< ::rtl::OUString, SfxStatusDispatcher_Impl_hashType, std::equal_to< ::rtl::OUString > > SfxStatusDispatcher_Impl_ListenerContainer ;
+
+class SfxStatusDispatcher : public ::com::sun::star::frame::XNotifyingDispatch,
+ public ::com::sun::star::lang::XTypeProvider,
+ public ::cppu::OWeakObject
+{
+ ::osl::Mutex aMutex;
+ SfxStatusDispatcher_Impl_ListenerContainer aListeners;
+
+public:
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ SfxStatusDispatcher();
+
+ // XDispatch
+ virtual void SAL_CALL dispatchWithNotification( const ::com::sun::star::util::URL& aURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchResultListener >& rListener ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
+
+ // Something else
+ void ReleaseAll();
+ SfxStatusDispatcher_Impl_ListenerContainer& GetListeners()
+ { return aListeners; }
+};
+
+class SfxSlotServer;
+class SfxDispatchController_Impl;
+class SfxOfficeDispatch : public SfxStatusDispatcher
+ , public ::com::sun::star::lang::XUnoTunnel
+{
+friend class SfxDispatchController_Impl;
+ SfxDispatchController_Impl* pControllerItem;
+public:
+ SfxOfficeDispatch( SfxBindings& rBind,
+ SfxDispatcher* pDispat,
+ const SfxSlot* pSlot,
+ const ::com::sun::star::util::URL& rURL );
+ SfxOfficeDispatch( SfxDispatcher* pDispat,
+ const SfxSlot* pSlot,
+ const ::com::sun::star::util::URL& rURL );
+ ~SfxOfficeDispatch();
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ virtual void SAL_CALL dispatchWithNotification( const ::com::sun::star::util::URL& aURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchResultListener >& rListener )
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs )
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl,
+ const ::com::sun::star::util::URL& aURL)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException) ;
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& impl_getStaticIdentifier();
+
+ static sal_Bool IsMasterUnoCommand( const ::com::sun::star::util::URL& aURL );
+ static rtl::OUString GetMasterUnoCommand( const ::com::sun::star::util::URL& aURL );
+
+ void SetFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame);
+
+ void SetMasterUnoCommand( sal_Bool bSet );
+ sal_Bool IsMasterUnoCommand() const;
+
+ SfxDispatcher* GetDispatcher_Impl();
+};
+
+//#if 0 // _SOLAR__PRIVATE
+class SfxDispatchController_Impl : public SfxControllerItem
+{
+ ::com::sun::star::util::URL aDispatchURL;
+ SfxDispatcher* pDispatcher;
+ SfxBindings* pBindings;
+ const SfxPoolItem* pLastState;
+ sal_uInt16 nSlot;
+ SfxOfficeDispatch* pDispatch;
+ sal_Bool bMasterSlave;
+ sal_Bool bVisible;
+ const char* pUnoName;
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XFrame > xFrame;
+
+ void addParametersToArgs( const com::sun::star::util::URL& aURL,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ) const;
+ using SfxControllerItem::GetCoreMetric;
+ SfxMapUnit GetCoreMetric( SfxItemPool& rPool, sal_uInt16 nSlot );
+
+public:
+ SfxDispatchController_Impl( SfxOfficeDispatch* pDisp,
+ SfxBindings* pBind,
+ SfxDispatcher* pDispat,
+ const SfxSlot* pSlot,
+ const ::com::sun::star::util::URL& rURL );
+ ~SfxDispatchController_Impl();
+
+ static rtl::OUString getSlaveCommand( const ::com::sun::star::util::URL& rURL );
+
+ void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer* pServ );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
+ void setMasterSlaveCommand( sal_Bool bSet );
+ sal_Bool isMasterSlaveCommand() const;
+ void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchResultListener >& rListener ) throw( ::com::sun::star::uno::RuntimeException );
+ void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
+ void UnBindController();
+ SfxDispatcher* GetDispatcher();
+ void SetFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame);
+};
+//#endif
+
+#endif
+
diff --git a/sfx2/inc/sfx2/userinputinterception.hxx b/sfx2/inc/sfx2/userinputinterception.hxx
new file mode 100644
index 000000000000..16504af6331e
--- /dev/null
+++ b/sfx2/inc/sfx2/userinputinterception.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * 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 USERINPUTINTERCEPTION_HXX
+#define USERINPUTINTERCEPTION_HXX
+
+#include "sfx2/dllapi.h"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XUserInputInterception.hpp>
+/** === end UNO includes === **/
+
+#include <boost/noncopyable.hpp>
+#include <memory>
+
+class NotifyEvent;
+
+namespace cppu { class OWeakObject; }
+
+//........................................................................
+namespace sfx2
+{
+//........................................................................
+
+ //====================================================================
+ //= UserInputInterception
+ //====================================================================
+ struct UserInputInterception_Data;
+ /** helper class for implementing the XUserInputInterception interface
+ for a controller implementation
+ */
+ class SFX2_DLLPUBLIC UserInputInterception : public ::boost::noncopyable
+ {
+ public:
+ UserInputInterception( ::cppu::OWeakObject& _rControllerImpl, ::osl::Mutex& _rMutex );
+ ~UserInputInterception();
+
+ // delegator functions for your XUserInputInterception implementation
+ void addKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+ void removeKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+ void addMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+ void removeMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+
+ // state
+ bool hasKeyHandlers() const;
+ bool hasMouseClickListeners() const;
+
+ // forwarding a NotifyEvent to the KeyListeners respectively MouseClickListeners
+ bool handleNotifyEvent( const NotifyEvent& _rEvent );
+
+ private:
+ ::std::auto_ptr< UserInputInterception_Data > m_pData;
+ };
+
+//........................................................................
+} // namespace sfx2
+//........................................................................
+
+#endif // USERINPUTINTERCEPTION_HXX
diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
new file mode 100644
index 000000000000..8350bc5f0f9d
--- /dev/null
+++ b/sfx2/inc/sfx2/viewfrm.hxx
@@ -0,0 +1,405 @@
+/*************************************************************************
+ *
+ * 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 _SFXVIEWFRM_HXX
+#define _SFXVIEWFRM_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <svl/lstner.hxx>
+#include <sfx2/module.hxx>
+#include <sfx2/frame.hxx>
+#include <sfx2/shell.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <svl/poolitem.hxx>
+#include <com/sun/star/frame/status/Verb.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XController2.hpp>
+
+class SfxMacro;
+class SvBorder;
+class SfxDispatcher;
+class SfxObjectShell;
+class SfxBindings;
+class SfxProgress;
+class SvData;
+class SfxViewShell;
+class SvPseudoObject;
+class SystemWindow;
+class Fraction;
+class Point;
+class Size;
+class SfxChildWindow;
+
+namespace sfx2
+{
+class SvLinkSource;
+}
+namespace svtools
+{
+ class AsynchronLink;
+}
+
+#ifndef SFX_DECL_OBJECTSHELL_DEFINED
+#define SFX_DECL_OBJECTSHELL_DEFINED
+SV_DECL_REF(SfxObjectShell)
+#endif
+
+//========================================================================
+#include <tools/gen.hxx>
+class SvBorder
+{
+ long nTop, nRight, nBottom, nLeft;
+public:
+ SvBorder()
+ { nTop = nRight = nBottom = nLeft = 0; }
+ SvBorder( const Size & rSz )
+ { nTop = nBottom = rSz.Height(); nRight = nLeft = rSz.Width(); }
+ SvBorder( const Rectangle & rOuter, const Rectangle & rInner );
+ SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP )
+ { nLeft = nLeftP; nTop = nTopP; nRight = nRightP; nBottom = nBottomP; }
+ BOOL operator == ( const SvBorder & rObj ) const
+ {
+ return nTop == rObj.nTop && nRight == rObj.nRight &&
+ nBottom == rObj.nBottom && nLeft == rObj.nLeft;
+ }
+ BOOL operator != ( const SvBorder & rObj ) const
+ { return !(*this == rObj); }
+ SvBorder & operator = ( const SvBorder & rBorder )
+ {
+ Left() = rBorder.Left();
+ Top() = rBorder.Top();
+ Right() = rBorder.Right();
+ Bottom() = rBorder.Bottom();
+ return *this;
+ }
+ SvBorder & operator += ( const SvBorder & rBorder )
+ {
+ Left() += rBorder.Left();
+ Top() += rBorder.Top();
+ Right() += rBorder.Right();
+ Bottom() += rBorder.Bottom();
+ return *this;
+ }
+ SvBorder & operator -= ( const SvBorder & rBorder )
+ {
+ Left() -= rBorder.Left();
+ Top() -= rBorder.Top();
+ Right() -= rBorder.Right();
+ Bottom() -= rBorder.Bottom();
+ return *this;
+ }
+ BOOL IsInside( const SvBorder & rInside )
+ {
+ return nTop >= rInside.nTop && nRight >= rInside.nRight &&
+ nBottom >= rInside.nBottom && nLeft >= rInside.nLeft;
+ }
+ long & Top() { return nTop; }
+ long & Right() { return nRight; }
+ long & Bottom() { return nBottom; }
+ long & Left() { return nLeft; }
+ long Top() const { return nTop; }
+ long Right() const { return nRight; }
+ long Bottom() const { return nBottom; }
+ long Left() const { return nLeft; }
+};
+Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder );
+Rectangle & operator -= ( Rectangle & rRect, const SvBorder & rBorder );
+
+
+DBG_NAMEEX(SfxViewFrame)
+class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public SfxListener
+{
+ struct SfxViewFrame_Impl* pImp;
+
+ SfxObjectShellRef xObjSh;
+ SfxDispatcher* pDispatcher;
+ SfxBindings* pBindings;
+ USHORT nAdjustPosPixelLock;
+
+private:
+#ifndef _SFX_HXX
+ SAL_DLLPRIVATE void Construct_Impl( SfxObjectShell *pObjSh=NULL );
+#endif
+
+protected:
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+#ifndef _SFX_HXX
+ SAL_DLLPRIVATE void KillDispatcher_Impl();
+#endif
+
+ virtual ~SfxViewFrame();
+
+public:
+ SfxViewFrame( SfxFrame& rFrame, SfxObjectShell *pDoc = NULL );
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SFX_INTERFACE_SFXVIEWFRM)
+
+ static void SetViewFrame( SfxViewFrame* );
+
+ static SfxViewFrame* LoadHiddenDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId );
+ static SfxViewFrame* LoadDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId );
+ static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const USHORT i_nViewId = 0 );
+ static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrameItem, const USHORT i_nViewId = 0 );
+ static SfxViewFrame* DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const USHORT i_nViewId = 0 );
+
+ static SfxViewFrame* Current();
+ static SfxViewFrame* GetFirst( const SfxObjectShell* pDoc = 0, BOOL bOnlyVisible = TRUE );
+ static SfxViewFrame* GetNext( const SfxViewFrame& rPrev, const SfxObjectShell* pDoc = 0, BOOL bOnlyVisible = TRUE );
+ static USHORT Count();
+
+ static SfxViewFrame* Get( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController>& i_rController, const SfxObjectShell* i_pDoc = NULL );
+
+ void DoActivate(BOOL bMDI, SfxViewFrame *pOld=NULL);
+ void DoDeactivate(BOOL bMDI, SfxViewFrame *pOld=NULL);
+
+ SfxViewFrame* GetParentViewFrame() const;
+
+ using SfxShell::GetDispatcher;
+ SfxDispatcher* GetDispatcher() { return pDispatcher; }
+ SfxBindings& GetBindings() { return *pBindings; }
+ const SfxBindings& GetBindings() const { return *pBindings; }
+ Window& GetWindow() const;
+ virtual void SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY );
+
+ SfxProgress* GetProgress() const;
+#ifdef ENABLE_INIMANAGER//MUSTINI
+ SfxIniManager* GetIniManager() const;
+#endif
+
+ SfxObjectShell* GetObjectShell() const
+ { return xObjSh; }
+
+ void DoAdjustPosSize( SfxViewShell *pSh,
+ const Point rPos, const Size &rSize );
+ void LockAdjustPosSizePixel()
+ { nAdjustPosPixelLock++; }
+ void UnlockAdjustPosSizePixel()
+ { nAdjustPosPixelLock--; }
+ void DoAdjustPosSizePixel( SfxViewShell * pSh,
+ const Point &rPos, const Size &rSize );
+ void Hide();
+ void Show();
+ BOOL IsVisible() const;
+ void ToTop();
+ void Enable( BOOL bEnable );
+ virtual BOOL Close();
+ virtual void Activate( BOOL bUI );
+ virtual void Deactivate( BOOL bUI );
+
+ // DDE-Interface
+ virtual long DdeExecute( const String& rCmd );
+ virtual long DdeGetData( const String& rItem,
+ const String& rMimeType,
+ ::com::sun::star::uno::Any & rValue );
+ virtual long DdeSetData( const String& rItem,
+ const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+ virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem );
+
+ void ShowStatusText( const String& rText );
+ void HideStatusText();
+
+ String UpdateTitle();
+
+ // interne Handler
+ SAL_DLLPRIVATE virtual BOOL SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
+ SAL_DLLPRIVATE virtual const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const;
+ SAL_DLLPRIVATE virtual void InvalidateBorderImpl( const SfxViewShell *pSh );
+
+ virtual SfxObjectShell* GetObjectShell();
+ USHORT GetCurViewId() const;
+ SfxFrame& GetFrame() const;
+ SfxViewFrame* GetTopViewFrame() const;
+
+ BOOL DoClose();
+ ULONG GetFrameType() const
+ { return GetFrame().GetFrameType(); }
+ SfxFrame& GetTopFrame() const
+ { return GetFrame().GetTopFrame(); }
+ void GetTargetList( TargetList& rList ) const
+ { GetFrame().GetTargetList( rList ); }
+ void CancelTransfers()
+ { GetFrame().CancelTransfers(); }
+
+ void SetModalMode( BOOL );
+ BOOL IsInModalMode() const;
+ void Resize(BOOL bForce=FALSE);
+
+ //void SetChildWindow(USHORT nId, BOOL bVisible );
+ void SetChildWindow(USHORT nId, BOOL bVisible, BOOL bSetFocus=TRUE);
+ void ToggleChildWindow(USHORT);
+ BOOL HasChildWindow(USHORT);
+ BOOL KnowsChildWindow(USHORT);
+ void ShowChildWindow(USHORT,BOOL bVisible=TRUE);
+ SfxChildWindow* GetChildWindow(USHORT);
+ void ChildWindowExecute(SfxRequest&);
+ void ChildWindowState(SfxItemSet&);
+
+//#if 0 // _SOLAR__PRIVATE
+ SAL_DLLPRIVATE void SetDowning_Impl();
+ SAL_DLLPRIVATE void GetDocNumber_Impl();
+ SAL_DLLPRIVATE BOOL IsDowning_Impl() const;
+ SAL_DLLPRIVATE void SetViewShell_Impl( SfxViewShell *pVSh );
+ SAL_DLLPRIVATE void ReleaseObjectShell_Impl();
+
+ SAL_DLLPRIVATE void GetState_Impl( SfxItemSet &rSet );
+ SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq );
+ SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq, BOOL bAsync );
+ SAL_DLLPRIVATE void StateReload_Impl( SfxItemSet &rSet );
+ SAL_DLLPRIVATE void ExecView_Impl( SfxRequest &rReq );
+ SAL_DLLPRIVATE void StateView_Impl( SfxItemSet &rSet );
+ SAL_DLLPRIVATE void ExecHistory_Impl( SfxRequest &rReq );
+ SAL_DLLPRIVATE void StateHistory_Impl( SfxItemSet &rSet );
+ SAL_DLLPRIVATE SfxViewFrame* GetParentViewFrame_Impl() const;
+ SAL_DLLPRIVATE void ForceOuterResize_Impl(BOOL bOn=TRUE);
+ SAL_DLLPRIVATE BOOL IsResizeInToOut_Impl() const;
+ SAL_DLLPRIVATE BOOL IsAdjustPosSizePixelLocked_Impl() const
+ { return nAdjustPosPixelLock != 0; }
+ SAL_DLLPRIVATE void ForceInnerResize_Impl( BOOL bOn );
+ SAL_DLLPRIVATE void UpdateDocument_Impl();
+
+ SAL_DLLPRIVATE void LockObjectShell_Impl(BOOL bLock=TRUE);
+
+ SAL_DLLPRIVATE void MakeActive_Impl( BOOL bActivate );
+ SAL_DLLPRIVATE void SetQuietMode_Impl( BOOL );
+ SAL_DLLPRIVATE const Size& GetMargin_Impl() const;
+ SAL_DLLPRIVATE void SetActiveChildFrame_Impl( SfxViewFrame* );
+ SAL_DLLPRIVATE SfxViewFrame* GetActiveChildFrame_Impl() const;
+ SAL_DLLPRIVATE String GetActualPresentationURL_Impl() const;
+ SAL_DLLPRIVATE static void CloseHiddenFrames_Impl();
+ SAL_DLLPRIVATE void MiscExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void MiscState_Impl(SfxItemSet &);
+ SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl( USHORT nId );
+ SAL_DLLPRIVATE void AddDispatchMacroToBasic_Impl(const ::rtl::OUString& sMacro);
+
+ SAL_DLLPRIVATE void Exec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void INetExecute_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &);
+
+ SAL_DLLPRIVATE void SetCurViewId_Impl( const USHORT i_nID );
+
+//#endif
+private:
+ SAL_DLLPRIVATE BOOL SwitchToViewShell_Impl( USHORT nNo, BOOL bIsIndex = FALSE );
+ SAL_DLLPRIVATE void PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell );
+
+ /** loads the given existing document into the given frame
+
+ This is done using the XComponentLoader interface of the frame, so the SFX document loader is invoked.
+
+ @param i_rDoc
+ the document to load
+ @param i_rFrame
+ the frame to load the document into
+ @param i_rLoadArgs
+ the arguments to pass to the component loader. If this sequence is empty, then the current arguments of the
+ model will be obtained, and passed to the loader. This ensures that any arguments in the model will be preserved,
+ instead of being reset.
+ @param i_nViewId
+ the ID of the view to create
+ @throws Exception
+ if something goes wrong. The caller is responsible for handling this.
+ */
+ SAL_DLLPRIVATE static SfxViewShell* LoadViewIntoFrame_Impl(
+ const SfxObjectShell& i_rDoc,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rLoadArgs,
+ const USHORT i_nViewId,
+ const bool i_bHidden
+ );
+
+ /** loads the given existing document into the given frame
+
+ This is done using the XComponentLoader interface of the frame, so the SFX document loader is invoked.
+
+ If no frame is given, a blank top level frame is created.
+
+ If anything fails during the process, as much as possible is cleaned up.
+
+ @param i_rDoc
+ the document to load
+ @param i_rFrame
+ the frame to load the document into. Might be <NULL/>, in which case a new frame is created.
+ @param i_nViewId
+ the ID of the view to create
+ */
+ SAL_DLLPRIVATE static SfxViewFrame* LoadViewIntoFrame_Impl_NoThrow(
+ const SfxObjectShell& i_rDoc,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
+ const USHORT i_nViewId,
+ const bool i_bHidden
+ );
+};
+
+//--------------------------------------------------------------------
+
+class SFX2_DLLPUBLIC SfxViewFrameItem: public SfxPoolItem
+{
+ SfxViewFrame* pFrame;
+
+public:
+ TYPEINFO();
+ SfxViewFrameItem( SfxViewFrame *pViewFrame ):
+ SfxPoolItem( 0 ),
+ pFrame( pViewFrame)
+ {}
+ SfxViewFrameItem( USHORT nWhichId, SfxViewFrame *pViewFrame ):
+ SfxPoolItem( nWhichId ),
+ pFrame( pViewFrame)
+ {}
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual String GetValueText() const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ SfxViewFrame* GetFrame() const
+ { return pFrame; }
+};
+
+class SfxVerbListItem : public SfxPoolItem
+{
+ com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > aVerbs;
+
+public:
+ TYPEINFO();
+ SfxVerbListItem( USHORT nWhichId = SID_OBJECT ) :
+ SfxPoolItem( nWhichId )
+ {}
+
+ SfxVerbListItem( USHORT nWhichId, const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& );
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& GetVerbList() const { return aVerbs; }
+};
+
+#endif
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
new file mode 100644
index 000000000000..8465a238cd5b
--- /dev/null
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -0,0 +1,383 @@
+/*************************************************************************
+ *
+ * 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 _SFXVIEWSH_HXX
+#define _SFXVIEWSH_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/view/XRenderable.hpp>
+#include <com/sun/star/uno/Reference.h>
+#include <svl/lstner.hxx>
+#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp>
+#include <cppuhelper/interfacecontainer.hxx>
+#include "shell.hxx"
+#include <tools/gen.hxx>
+#include <tools/errcode.hxx>
+#include <vcl/jobset.hxx>
+class SfxBaseController;
+class Size;
+class Fraction;
+class Window;
+class KeyEvent;
+class WorkWindow;
+class SvBorder;
+class SdrView;
+class SfxFrame;
+class SfxMedium;
+class SfxModule;
+class SfxViewFrame;
+class SfxItemPool;
+class SfxTabPage;
+class SfxPrintMonitor;
+class SfxFrameSetDescriptor;
+class PrintDialog;
+class Printer;
+class SfxPrinter;
+class SfxProgress;
+class SvStringsDtor;
+class SfxFrameItem;
+class Dialog;
+class Menu;
+class NotifyEvent;
+
+#define SFX_PRINTER_PRINTER 1 // ohne JOBSETUP => temporaer
+#define SFX_PRINTER_JOBSETUP 2
+#define SFX_PRINTER_OPTIONS 4
+#define SFX_PRINTER_CHG_ORIENTATION 8
+#define SFX_PRINTER_CHG_SIZE 16
+#define SFX_PRINTER_ALL 31
+
+#define SFX_PRINTER_CHG_ORIENTATION_FLAG 3
+#define SFX_PRINTER_CHG_SIZE_FLAG 4
+
+#define SFX_PRINTERROR_NONE 0
+#define SFX_PRINTERROR_BUSY 1
+
+enum SfxScrollingMode
+{
+ SCROLLING_NO,
+ SCROLLING_YES,
+ SCROLLING_AUTO,
+ SCROLLING_DEFAULT
+};
+
+// "Geeicht" mit www.apple.com und Netscape 3.01
+#define DEFAULT_MARGIN_WIDTH 8
+#define DEFAULT_MARGIN_HEIGHT 12
+
+//========================================================================
+
+// @[SfxViewShell-Flags]
+
+#define SFX_VIEW_HAS_PRINTOPTIONS 0x0010 /* Options-Button und Options-
+ Dialog im PrintDialog */
+#define SFX_VIEW_CAN_PRINT 0x0020 /* enabled Printing ohne Printer
+ erzeugen zu m"ussen */
+#define SFX_VIEW_NO_SHOW 0x0040 /* Window der ViewShell darf nicht
+ automatisch geshowed werden */
+#define SFX_VIEW_NO_NEWWINDOW 0x0100 /* keine weitere View erlauben */
+
+/* [Beschreibung]
+
+ Die SfxViewShell-Flags steuern das Verhalten der SfxViewShell f"ur die
+ Dauer ihrer Lebenszeit. Sie werden im Konstruktor der <SfxViewShell>
+ angegeben.
+*/
+
+//=========================================================================
+
+#define SFX_DECL_VIEWFACTORY(Class) \
+private: \
+ static SfxViewFactory *pFactory; \
+public: \
+ static SfxViewShell *CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView); \
+ static void RegisterFactory( USHORT nPrio = USHRT_MAX ); \
+ static SfxViewFactory&Factory() { return *pFactory; } \
+ static void InitFactory()
+
+#define SFX_IMPL_VIEWFACTORY(Class, rResId) \
+ SfxViewFactory* Class::pFactory; \
+ SfxViewShell* __EXPORT Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView) \
+ { return new Class(pFrame, pOldView); } \
+ void Class::RegisterFactory( USHORT nPrio ) \
+ { \
+ pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio,rResId);\
+ InitFactory(); \
+ } \
+ void Class::InitFactory()
+
+#define SFX_VIEW_REGISTRATION(DocClass) \
+ DocClass::Factory().RegisterViewFactory( Factory() )
+
+#define SFX_REGISTER_VIEW(ViewShellClass) \
+ Factory().RegisterViewFactory( ViewShellClass::Factory() )
+
+class SfxInPlaceClient;
+DECLARE_LIST( SfxInPlaceClientList, SfxInPlaceClient* )
+
+// -----------------------------------------------------------------------
+class SFX2_DLLPUBLIC SfxViewShell: public SfxShell, public SfxListener
+{
+#ifdef _SFXVIEWSH_HXX
+friend class SfxViewFrame;
+friend class SfxPlugInFrame;
+friend class SfxBaseController;
+friend class SfxPrinterController;
+#endif
+
+ struct SfxViewShell_Impl* pImp;
+ SfxInPlaceClientList* pIPClientList;
+ SfxViewFrame* pFrame;
+ SfxShell* pSubShell;
+ Window* pWindow;
+ BOOL bNoNewWindow;
+
+protected:
+ virtual void Activate(BOOL IsMDIActivate);
+ virtual void Deactivate(BOOL IsMDIActivate);
+
+ virtual Size GetOptimalSizePixel() const;
+
+ virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
+ virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
+ virtual void SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY );
+
+ virtual void Move();
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+public:
+ // Iteration
+ static SfxViewShell* GetFirst( const TypeId* pType = 0, BOOL bOnlyVisible = TRUE );
+ static SfxViewShell* GetNext( const SfxViewShell& rPrev,
+ const TypeId* pType = 0, BOOL bOnlyVisible = TRUE );
+ static SfxViewShell* Current();
+
+ static SfxViewShell* Get( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController>& i_rController );
+
+ // Ctoren/Dtoren Initialisierung
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SFX_INTERFACE_SFXVIEWSH)
+
+ SfxViewShell( SfxViewFrame *pFrame, USHORT nFlags = 0 );
+ virtual ~SfxViewShell();
+
+ SfxInPlaceClient* GetIPClient() const;
+ SfxInPlaceClient* GetUIActiveClient() const;
+ SfxInPlaceClient* FindIPClient( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, Window *pObjParentWin ) const;
+
+ virtual ErrCode DoVerb(long nVerb);
+
+ virtual void OutplaceActivated( sal_Bool bActive, SfxInPlaceClient* pClient );
+ virtual void InplaceActivating( SfxInPlaceClient* pClient );
+ virtual void InplaceDeactivated( SfxInPlaceClient* pClient );
+ virtual void UIActivating( SfxInPlaceClient* pClient );
+ virtual void UIDeactivated( SfxInPlaceClient* pClient );
+
+ virtual void JumpToMark( const String& rMark );
+ void VisAreaChanged(const Rectangle& rRect);
+
+ // Verhaltens-Flags
+ SfxScrollingMode GetScrollingMode() const;
+ void SetScrollingMode( SfxScrollingMode eMode );
+
+ // Misc
+ virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ virtual String GetSelectionText( BOOL bCompleteWords = FALSE );
+ virtual BOOL HasSelection( BOOL bText = TRUE ) const;
+ virtual SdrView* GetDrawView() const;
+ void SetSubShell( SfxShell *pShell );
+ SfxShell* GetSubShell() const { return pSubShell; }
+ void AddSubShell( SfxShell& rShell );
+ void RemoveSubShell( SfxShell *pShell=NULL );
+ SfxShell* GetSubShell( USHORT );
+
+ // Focus, KeyInput, Cursor
+ void GotFocus() const;
+ inline void LostFocus() const;
+ virtual void ShowCursor( FASTBOOL bOn = TRUE );
+ virtual FASTBOOL KeyInput( const KeyEvent &rKeyEvent );
+ BOOL Escape();
+
+ // Viewing Interface
+ Window* GetWindow() const { return pWindow; }
+ void SetWindow( Window *pViewPort );
+ virtual void AdjustPosSizePixel( const Point &rOfs, const Size &rSize );
+ const SvBorder& GetBorderPixel() const;
+ void SetBorderPixel( const SvBorder &rBorder );
+ void InvalidateBorder();
+ inline SfxViewFrame* GetViewFrame() const;
+ void AdjustVisArea(const Rectangle& rRect);
+
+ // Printing Interface
+ virtual void PreparePrint( PrintDialog *pPrintDialog = 0 );
+ virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
+ virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0 );
+ virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=FALSE );
+ virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
+ virtual PrintDialog* CreatePrintDialog( Window *pParent );
+ void LockPrinter( BOOL bLock = TRUE );
+ BOOL IsPrinterLocked() const;
+ virtual JobSetup GetJobSetup() const;
+ Printer* GetActivePrinter() const;
+
+ // Workingset
+ virtual void WriteUserData( String&, BOOL bBrowse = FALSE );
+ virtual void ReadUserData( const String&, BOOL bBrowse = FALSE );
+ virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+ virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+ virtual void QueryObjAreaPixel( Rectangle& rRect ) const;
+
+ virtual SfxObjectShell* GetObjectShell();
+ /** retrieves the document which shall be considered the "current document" when the frame is active
+
+ The default implementation simply returns the XModel of the associated SfxObjectShell. You will rarely
+ need to overwrite this behavior.
+ */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetCurrentDocument() const;
+ /** forwards the current document, as returned by ->GetCurrentDocument, to SfxObjectShell::SetWorkingDocument
+ */
+ void SetCurrentDocument() const;
+
+ /** get an XRenderable instance that can render this docuement
+ */
+ virtual com::sun::star::uno::Reference< com::sun::star::view::XRenderable > GetRenderable();
+
+
+ virtual void MarginChanged();
+ const Size& GetMargin() const;
+ void SetMargin( const Size& );
+ void DisconnectAllClients();
+ virtual SfxFrame* GetSmartSelf( SfxFrame* pSelf, SfxMedium& rMedium );
+ BOOL NewWindowAllowed() const { return !bNoNewWindow; }
+ void SetNewWindowAllowed( BOOL bSet ) { bNoNewWindow = !bSet; }
+
+ void SetController( SfxBaseController* pController );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
+ GetController();
+
+ ::cppu::OInterfaceContainerHelper& GetContextMenuInterceptors() const;
+ BOOL TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ::com::sun::star::ui::ContextMenuExecuteEvent aEvent );
+
+ void SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
+ void ExecPrint( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool, sal_Bool );
+
+ void AddRemoveClipboardListener( const com::sun::star::uno::Reference < com::sun::star::datatransfer::clipboard::XClipboardListener>&, BOOL );
+
+#if _SOLAR__PRIVATE
+ SAL_DLLPRIVATE SfxInPlaceClient* GetUIActiveIPClient_Impl() const;
+ SAL_DLLPRIVATE void AddContextMenuInterceptor_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::ui::XContextMenuInterceptor >& xInterceptor );
+ SAL_DLLPRIVATE void RemoveContextMenuInterceptor_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::ui::XContextMenuInterceptor >& xInterceptor );
+ SAL_DLLPRIVATE FASTBOOL GlobalKeyInput_Impl( const KeyEvent &rKeyEvent );
+
+ SAL_DLLPRIVATE void NewIPClient_Impl( SfxInPlaceClient *pIPClient )
+ { GetIPClientList_Impl(TRUE)->Insert(pIPClient); }
+ SAL_DLLPRIVATE void IPClientGone_Impl( SfxInPlaceClient *pIPClient )
+ { GetIPClientList_Impl(TRUE)->Remove(pIPClient); }
+ SAL_DLLPRIVATE SfxInPlaceClientList* GetIPClientList_Impl( BOOL bCreate = TRUE ) const;
+ SAL_DLLPRIVATE void ResetAllClients_Impl( SfxInPlaceClient *pIP );
+ SAL_DLLPRIVATE void DiscardClients_Impl();
+ SAL_DLLPRIVATE BOOL PlugInsActive() const;
+
+ SAL_DLLPRIVATE SfxPrinter* SetPrinter_Impl( SfxPrinter *pNewPrinter );
+ SAL_DLLPRIVATE BOOL IsShowView_Impl() const;
+
+ SAL_DLLPRIVATE long HandleNotifyEvent_Impl( NotifyEvent& rEvent );
+ SAL_DLLPRIVATE BOOL HasKeyListeners_Impl();
+ SAL_DLLPRIVATE BOOL HasMouseClickListeners_Impl();
+
+ SAL_DLLPRIVATE SfxBaseController* GetBaseController_Impl() const;
+
+ // Shell Interface
+ SAL_DLLPRIVATE void ExecPrint_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void ExecMisc_Impl(SfxRequest &);
+ SAL_DLLPRIVATE void GetState_Impl(SfxItemSet&);
+ SAL_DLLPRIVATE SfxFrameSetDescriptor* GetFrameSet_Impl() const;
+ SAL_DLLPRIVATE void SetFrameSet_Impl(SfxFrameSetDescriptor*);
+ SAL_DLLPRIVATE void CheckIPClient_Impl( SfxInPlaceClient*, const Rectangle& );
+ SAL_DLLPRIVATE void PushSubShells_Impl( BOOL bPush=TRUE );
+ SAL_DLLPRIVATE void PopSubShells_Impl() { PushSubShells_Impl( FALSE ); }
+ SAL_DLLPRIVATE void TakeOwnerShip_Impl();
+ SAL_DLLPRIVATE void CheckOwnerShip_Impl();
+ SAL_DLLPRIVATE void TakeFrameOwnerShip_Impl();
+ SAL_DLLPRIVATE BOOL ExecKey_Impl(const KeyEvent& aKey);
+#endif
+};
+
+//========================================================================
+
+inline void SfxViewShell::LostFocus() const
+
+/* [Beschreibung]
+
+ Diese Methode mu\s vom Applikationsentwickler gerufen werden, wenn
+ das Edit-Window den Focus verloren hat. Der SFx hat so z.B. die
+ M"oglichkeit, den Accelerator auszuschalten, damit in bestimmten
+ Floating-Windows die Cursor-Tasten, die Delete-Taste etc. funktionieren,
+ obwohl sie "uber den Accelerator umdefiniert sind.
+
+
+ [Anmerkung]
+
+ <StarView> liefert leider keine M"oglichkeit, solche Events
+ 'von der Seite' einzuh"angen.
+*/
+
+{
+}
+
+//------------------------------------------------------------------------
+
+inline SfxViewFrame* SfxViewShell::GetViewFrame() const
+
+/* [Bechreibung]
+
+ Diese Methode liefert einen Pointer auf die <SfxViewFrame>-Instanz,
+ in der diese SfxViewShell dargestellt wird. Dieses ist die Instanz,
+ die imKonstruktor durchgereicht wurde. Es ist gew"ahrleistet, da\s
+ der zur"uckgegebene Pointer auf eine g"ultige SfxViewFrame-Instanz
+ zeigt.
+
+
+ [Querverweise]
+
+ <SfxShell::GetFrame()const>
+*/
+
+{
+ return pFrame;
+}
+
+#endif // #ifndef _SFXVIEWSH_HXX
+
+
diff --git a/sfx2/inc/sfxbasic.hxx b/sfx2/inc/sfxbasic.hxx
new file mode 100644
index 000000000000..ff5f097500a5
--- /dev/null
+++ b/sfx2/inc/sfxbasic.hxx
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * 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 _SFXBASIC_HXX
+#define _SFXBASIC_HXX
+
+class BasicManager;
+class SbMethod;
+
+//------------------------------------------------------------------
+
+SbMethod* SfxQueryMacro( BasicManager* pMgr, const String& rMacro );
+
+ErrCode SfxCallMacro( BasicManager* pMgr, const String& rMacro,
+ SbxArray *pArgs = 0, SbxValue *pRet = 0 );
+
+
+#endif
+
diff --git a/sfx2/inc/sfxhelp.hxx b/sfx2/inc/sfxhelp.hxx
new file mode 100644
index 000000000000..60ad04b2e9ab
--- /dev/null
+++ b/sfx2/inc/sfxhelp.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_HELP_HXX
+#define _SFX_HELP_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include "sal/types.h"
+#include <vcl/help.hxx>
+#include <tools/string.hxx>
+
+class SfxHelp_Impl;
+class SfxFrame;
+class SFX2_DLLPUBLIC SfxHelp : public Help
+{
+ String aTicket; // for Plugins
+ String aUser;
+ String aLanguageStr;
+ String aCountryStr;
+ sal_Bool bIsDebug;
+ SfxHelp_Impl* pImp;
+
+private:
+ SAL_DLLPRIVATE virtual BOOL Start( ULONG nHelpId, const Window* pWindow );
+ SAL_DLLPRIVATE virtual BOOL Start( const String& rURL, const Window* pWindow );
+ SAL_DLLPRIVATE virtual void OpenHelpAgent( ULONG nHelpId );
+
+ SAL_DLLPRIVATE String GetHelpModuleName_Impl();
+ SAL_DLLPRIVATE String CreateHelpURL_Impl( ULONG nHelpId, const String& rModuleName );
+ SAL_DLLPRIVATE String CreateHelpURL_Impl( const String& aCommandURL, const String& rModuleName );
+
+public:
+ SfxHelp();
+ ~SfxHelp();
+
+ inline void SetTicket( const String& rTicket ) { aTicket = rTicket; }
+ inline void SetUser( const String& rUser ) { aUser = rUser; }
+
+ virtual XubString GetHelpText( ULONG nHelpId, const Window* pWindow );
+ virtual XubString GetHelpText( const String&, const Window* pWindow );
+
+ static String CreateHelpURL( ULONG nHelpId, const String& rModuleName );
+ static String CreateHelpURL( const String& aCommandURL, const String& rModuleName );
+ static void OpenHelpAgent( SfxFrame* pFrame, ULONG nHelpId );
+ static String GetDefaultHelpModule();
+ static ::rtl::OUString GetCurrentModuleIdentifier();
+};
+
+#endif // #ifndef _SFX_HELP_HXX
+
diff --git a/sfx2/inc/sfxresid.hxx b/sfx2/inc/sfxresid.hxx
new file mode 100644
index 000000000000..ceea5452a0d5
--- /dev/null
+++ b/sfx2/inc/sfxresid.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * 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_SFXRESID_HXX
+#define _SFX_SFXRESID_HXX
+
+#include <tools/string.hxx>
+
+#ifndef _RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+
+class SfxResId: public ResId
+{
+public:
+ SfxResId( USHORT nId );
+ static ResMgr* GetResMgr();
+ static void DeleteResMgr();
+};
+
+//============================================================================
+class SfxSimpleResId
+{
+ String m_sText;
+
+public:
+ SfxSimpleResId(USHORT nID);
+
+ String getText() const { return m_sText; }
+
+ operator String() const { return getText(); }
+};
+
+
+#endif
diff --git a/sfx2/inc/sorgitm.hxx b/sfx2/inc/sorgitm.hxx
new file mode 100644
index 000000000000..18056e26b730
--- /dev/null
+++ b/sfx2/inc/sorgitm.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_SORGITM_HXX
+#define _SFX_SORGITM_HXX
+
+#include <svl/stritem.hxx>
+
+// class SfxScriptOrganizerItem ---------------------------------------------
+
+class SfxScriptOrganizerItem : public SfxStringItem
+{
+private:
+ String aLanguage;
+
+public:
+ TYPEINFO();
+ SfxScriptOrganizerItem();
+ SfxScriptOrganizerItem( const String &rLanguage );
+ SfxScriptOrganizerItem( const SfxScriptOrganizerItem& );
+ virtual ~SfxScriptOrganizerItem();
+
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ String getLanguage() { return aLanguage; };
+};
+
+#endif
+
diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
new file mode 100644
index 000000000000..e45d8f591342
--- /dev/null
+++ b/sfx2/inc/srchdlg.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_SRCHDLG_HXX_
+#define _SFX_SRCHDLG_HXX_
+
+#ifndef _VCL_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/combobox.hxx>
+#ifndef _VCL_EDIT_HXX
+#include <vcl/edit.hxx>
+#endif
+#ifndef _VCL_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#include <sfx2/basedlgs.hxx>
+
+// ============================================================================
+
+namespace sfx2 {
+
+// ============================================================================
+// SearchDialog
+// ============================================================================
+
+class SearchDialog : public ModelessDialog
+{
+private:
+ FixedText m_aSearchLabel;
+ ComboBox m_aSearchEdit;
+ CheckBox m_aWholeWordsBox;
+ CheckBox m_aMatchCaseBox;
+ CheckBox m_aWrapAroundBox;
+ CheckBox m_aBackwardsBox;
+ PushButton m_aFindBtn;
+ CancelButton m_aCancelBtn;
+
+ Link m_aFindHdl;
+ Link m_aCloseHdl;
+
+ String m_sToggleText;
+ ::rtl::OUString m_sConfigName;
+ ByteString m_sWinState;
+
+ bool m_bIsConstructed;
+
+ void LoadConfig();
+ void SaveConfig();
+
+ DECL_LINK( FindHdl, PushButton* );
+ DECL_LINK( ToggleHdl, CheckBox* );
+
+public:
+ SearchDialog( Window* pWindow, const ::rtl::OUString& rConfigName );
+ ~SearchDialog();
+
+ inline void SetFindHdl( const Link& rLink ) { m_aFindHdl = rLink; }
+ inline void SetCloseHdl( const Link& rLink ) { m_aCloseHdl = rLink; }
+
+ inline String GetSearchText() const { return m_aSearchEdit.GetText(); }
+ inline void SetSearchText( const String& _rText ) { m_aSearchEdit.SetText( _rText ); }
+ inline bool IsOnlyWholeWords() const { return ( m_aWholeWordsBox.IsChecked() != FALSE ); }
+ inline bool IsMarchCase() const { return ( m_aMatchCaseBox.IsChecked() != FALSE ); }
+ inline bool IsWrapAround() const { return ( m_aWrapAroundBox.IsChecked() != FALSE ); }
+ inline bool IsSearchBackwards() const { return ( m_aBackwardsBox.IsChecked() != FALSE ); }
+
+ void SetFocusOnEdit();
+
+ virtual BOOL Close();
+ virtual void Move();
+ virtual void StateChanged( StateChangedType nStateChange );
+};
+
+// ============================================================================
+
+} // namespace sfx2
+
+// ============================================================================
+
+#endif // _SFX_SRCHDLG_HXX_
+
diff --git a/sfx2/inc/stbitem.hxx b/sfx2/inc/stbitem.hxx
new file mode 100644
index 000000000000..977ba869750d
--- /dev/null
+++ b/sfx2/inc/stbitem.hxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * 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 _SFXSTBITEM_HXX
+#define _SFXSTBITEM_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <svl/poolitem.hxx>
+#include <svtools/statusbarcontroller.hxx>
+
+//------------------------------------------------------------------
+
+class SfxModule;
+class StatusBar;
+class SfxStatusBarControl;
+class SfxBindings;
+
+svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
+ StatusBar* pStatusBar,
+ unsigned short nID,
+ const ::rtl::OUString& aCommandURL );
+typedef SfxStatusBarControl* (*SfxStatusBarControlCtor)( USHORT nSlotId, USHORT nId, StatusBar &rStb );
+
+struct SfxStbCtrlFactory
+{
+ SfxStatusBarControlCtor pCtor;
+ TypeId nTypeId;
+ USHORT nSlotId;
+
+ SfxStbCtrlFactory( SfxStatusBarControlCtor pTheCtor,
+ TypeId nTheTypeId, USHORT nTheSlotId ):
+ pCtor(pTheCtor),
+ nTypeId(nTheTypeId),
+ nSlotId(nTheSlotId)
+ {}
+};
+
+//------------------------------------------------------------------
+
+class CommandEvent;
+class MouseEvent;
+class UserDrawEvent;
+
+class SFX2_DLLPUBLIC SfxStatusBarControl: public svt::StatusbarController
+{
+ USHORT nSlotId;
+ USHORT nId;
+ StatusBar* pBar;
+
+protected:
+ // new controller API
+ // 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();
+ virtual void SAL_CALL release() throw();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XStatusbarController
+ virtual ::sal_Bool SAL_CALL mouseButtonDown( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL mouseMove( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL mouseButtonUp( const ::com::sun::star::awt::MouseEvent& aMouseEvent ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL command( const ::com::sun::star::awt::Point& aPos,
+ ::sal_Int32 nCommand,
+ ::sal_Bool bMouseEvent,
+ const ::com::sun::star::uno::Any& aData ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL paint( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics,
+ const ::com::sun::star::awt::Rectangle& rOutputRectangle,
+ ::sal_Int32 nItemId, ::sal_Int32 nStyle ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException);
+
+ // Old sfx2 interface
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void Click();
+ virtual void DoubleClick();
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual BOOL MouseButtonDown( const MouseEvent & );
+ virtual BOOL MouseMove( const MouseEvent & );
+ virtual BOOL MouseButtonUp( const MouseEvent & );
+ virtual void Paint( const UserDrawEvent &rUDEvt );
+
+ static USHORT convertAwtToVCLMouseButtons( sal_Int16 nAwtMouseButtons );
+
+public:
+ SfxStatusBarControl( USHORT nSlotID, USHORT nId, StatusBar& rBar );
+ virtual ~SfxStatusBarControl();
+
+ USHORT GetSlotId() const { return nSlotId; }
+ USHORT GetId() const { return nId; }
+ StatusBar& GetStatusBar() const { return *pBar; }
+ void CaptureMouse();
+ void ReleaseMouse();
+
+ static SfxStatusBarControl* CreateControl( USHORT nSlotID, USHORT nId, StatusBar *pBar, SfxModule* );
+ static void RegisterStatusBarControl(SfxModule*, SfxStbCtrlFactory*);
+
+};
+
+//------------------------------------------------------------------
+
+#define SFX_DECL_STATUSBAR_CONTROL() \
+ static SfxStatusBarControl* CreateImpl( USHORT nSlotId, USHORT nId, StatusBar &rStb ); \
+ static void RegisterControl(USHORT nSlotId = 0, SfxModule *pMod=NULL)
+
+#define SFX_IMPL_STATUSBAR_CONTROL(Class, nItemClass) \
+ SfxStatusBarControl* __EXPORT Class::CreateImpl( USHORT nSlotId, USHORT nId, StatusBar &rStb ) \
+ { return new Class( nSlotId, nId, rStb ); } \
+ void Class::RegisterControl(USHORT nSlotId, SfxModule *pMod) \
+ { SfxStatusBarControl::RegisterStatusBarControl( pMod, new SfxStbCtrlFactory( \
+ Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+
+
+#endif
diff --git a/sfx2/inc/tplpitem.hxx b/sfx2/inc/tplpitem.hxx
new file mode 100644
index 000000000000..38198e0ff7ee
--- /dev/null
+++ b/sfx2/inc/tplpitem.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SFX_TPLPITEM_HXX
+#define _SFX_TPLPITEM_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <tools/string.hxx>
+#include <tools/rtti.hxx>
+#include <svl/flagitem.hxx>
+
+class SFX2_DLLPUBLIC SfxTemplateItem: public SfxFlagItem
+{
+ String aStyle;
+public:
+ TYPEINFO();
+ SfxTemplateItem();
+ SfxTemplateItem( USHORT nWhich,
+ const String &rStyle,
+ USHORT nMask = 0xffff );
+ SfxTemplateItem( const SfxTemplateItem& );
+
+ const String& GetStyleName() const { return aStyle; }
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual BYTE GetFlagCount() const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+#endif
diff --git a/sfx2/inc/viewfac.hxx b/sfx2/inc/viewfac.hxx
new file mode 100644
index 000000000000..6f9ae1d3cb37
--- /dev/null
+++ b/sfx2/inc/viewfac.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * 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 _VIEWFAC_HXX
+#define _VIEWFAC_HXX
+
+#include "sal/config.h"
+#include "sfx2/dllapi.h"
+#include <tools/string.hxx>
+#ifndef _RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+
+class SfxViewFrame;
+class SfxViewShell;
+class Window;
+
+typedef SfxViewShell* (*SfxViewCtor)(SfxViewFrame*, SfxViewShell*);
+typedef void (*SfxViewInit)();
+
+// CLASS -----------------------------------------------------------------
+class SFX2_DLLPUBLIC SfxViewFactory
+{
+public:
+ SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
+ USHORT nOrdinal, const ResId& aDescrResId );
+ ~SfxViewFactory();
+
+ SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh);
+ void InitFactory();
+
+ String GetDescription() const
+ { return String( aDescription ); }
+ USHORT GetOrdinal() const { return nOrd; }
+
+ /// returns an API-compatible view name. For the moment, this is "view" with an appended ordinal/ID
+ String GetViewName() const;
+
+private:
+ SfxViewCtor fnCreate;
+ SfxViewInit fnInit;
+ USHORT nOrd;
+ ResId aDescription;
+};
+
+#endif
+