diff options
Diffstat (limited to 'sfx2')
172 files changed, 1899 insertions, 1204 deletions
diff --git a/sfx2/inc/arrdecl.hxx b/sfx2/inc/arrdecl.hxx index faff7e0234..6bd705ecf3 100644 --- a/sfx2/inc/arrdecl.hxx +++ b/sfx2/inc/arrdecl.hxx @@ -31,7 +31,7 @@ #define _SFX_ARRDECL_HXX #include <tools/list.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <sfx2/minarray.hxx> struct CntUpdateResult; diff --git a/sfx2/inc/minfitem.hxx b/sfx2/inc/minfitem.hxx index ce7b0aeaaa..a5423b8784 100644 --- a/sfx2/inc/minfitem.hxx +++ b/sfx2/inc/minfitem.hxx @@ -33,7 +33,7 @@ #include "sal/config.h" #include "sfx2/dllapi.h" #include <tools/string.hxx> -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> class BasicManager; class SFX2_DLLPUBLIC SfxMacroInfoItem: public SfxPoolItem diff --git a/sfx2/inc/msgnodei.hxx b/sfx2/inc/msgnodei.hxx index c26b5e2e8f..b3256bc789 100644 --- a/sfx2/inc/msgnodei.hxx +++ b/sfx2/inc/msgnodei.hxx @@ -32,9 +32,9 @@ #define _MSGNODEI_HXX -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <tools/string.hxx> -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <tools/list.hxx> struct SfxMsgAttachFile { String aFile; diff --git a/sfx2/inc/orgmgr.hxx b/sfx2/inc/orgmgr.hxx index ac29d513cc..d8234f8edd 100644 --- a/sfx2/inc/orgmgr.hxx +++ b/sfx2/inc/orgmgr.hxx @@ -30,7 +30,7 @@ #ifndef _SFX_ORGMGR_HXX #define _SFX_ORGMGR_HXX -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> class SfxDocumentTemplates; class SfxOrganizeListBox_Impl; diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx index d5f547494e..0af35427d8 100644 --- a/sfx2/inc/pch/precompiled_sfx2.hxx +++ b/sfx2/inc/pch/precompiled_sfx2.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -491,105 +491,103 @@ #include "sot/object.hxx" #include "sot/storinfo.hxx" #include "svtools/accessibilityoptions.hxx" -#include "svtools/addxmltostorageoptions.hxx" -#include "svtools/adrparse.hxx" -#include "svtools/aeitem.hxx" +#include "svl/adrparse.hxx" +#include "svl/aeitem.hxx" #include "svtools/asynclink.hxx" -#include "svtools/brdcst.hxx" -#include "svtools/cancel.hxx" -#include "svtools/cntwids.hrc" +#include "svl/brdcst.hxx" +#include "svl/cancel.hxx" +#include "svl/cntwids.hrc" #include "svtools/controldims.hrc" -#include "svtools/cstitem.hxx" -#include "svtools/ctypeitm.hxx" -#include "svtools/dateitem.hxx" -#include "svtools/dynamicmenuoptions.hxx" +#include "svl/ctypeitm.hxx" +#include "svl/dateitem.hxx" +#include "unotools/dynamicmenuoptions.hxx" #include "svtools/ehdl.hxx" -#include "svtools/eitem.hxx" +#include "svl/eitem.hxx" #include "svtools/embedhlp.hxx" #include "svtools/embedtransfer.hxx" -#include "svtools/eventcfg.hxx" -#include "svtools/extendedsecurityoptions.hxx" -#include "svtools/flagitem.hxx" -#include "svtools/folderrestriction.hxx" -#include "svtools/fontoptions.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 "svtools/hint.hxx" -#include "svtools/historyoptions.hxx" +#include "svl/hint.hxx" +#include "unotools/historyoptions.hxx" #include "svtools/htmlkywd.hxx" #include "svtools/htmltokn.h" -#include "svtools/imageitm.hxx" +#include "svl/imageitm.hxx" #include "svtools/imagemgr.hxx" #include "svtools/imap.hxx" #include "svtools/imgdef.hxx" -#include "svtools/inetdef.hxx" -#include "svtools/inethist.hxx" -#include "svtools/inetmsg.hxx" -#include "svtools/inetoptions.hxx" -#include "svtools/inetstrm.hxx" -#include "svtools/inettype.hxx" -#include "svtools/internaloptions.hxx" -#include "svtools/intitem.hxx" -#include "svtools/isethint.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 "svtools/itemiter.hxx" -#include "svtools/itempool.hxx" -#include "svtools/itemprop.hxx" -#include "svtools/itemset.hxx" +#include "svl/itemiter.hxx" +#include "svl/itempool.hxx" +#include "svl/itemprop.hxx" +#include "svl/itemset.hxx" #include "svtools/javacontext.hxx" -#include "svtools/lckbitem.hxx" -#include "svtools/localisationoptions.hxx" +#include "svl/lckbitem.hxx" +#include "unotools/localisationoptions.hxx" #include "svtools/localresaccess.hxx" -#include "svtools/lstner.hxx" -#include "svtools/memberid.hrc" +#include "svl/lstner.hxx" +#include "svl/memberid.hrc" #include "svtools/menuoptions.hxx" -#include "svtools/misccfg.hxx" +#include "unotools/misccfg.hxx" #include "svtools/miscopt.hxx" -#include "svtools/moduleoptions.hxx" -#include "svtools/ownlist.hxx" +#include "unotools/moduleoptions.hxx" +#include "svl/ownlist.hxx" #include "svtools/parhtml.hxx" -#include "svtools/pathoptions.hxx" -#include "svtools/pickerhelper.hxx" -#include "svtools/poolitem.hxx" +#include "unotools/pathoptions.hxx" +#include "svl/pickerhelper.hxx" +#include "svl/poolitem.hxx" #include "svtools/printoptions.hxx" -#include "svtools/printwarningoptions.hxx" -#include "svtools/rectitem.hxx" -#include "svtools/regoptions.hxx" -#include "svtools/saveopt.hxx" -#include "svtools/searchopt.hxx" -#include "svtools/securityoptions.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 "svtools/slstitm.hxx" -#include "svtools/smplhint.hxx" +#include "svl/slstitm.hxx" +#include "svl/smplhint.hxx" #include "svtools/soerr.hxx" -#include "svtools/solar.hrc" -#include "svtools/startoptions.hxx" +#include "svl/solar.hrc" +#include "unotools/startoptions.hxx" #include "svtools/statusbarcontroller.hxx" -#include "svtools/stritem.hxx" -#include "svtools/style.hrc" -#include "svtools/style.hxx" -#include "svtools/svarray.hxx" -#include "svtools/svdde.hxx" -#include "svtools/svstdarr.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 "svtools/svtools.hrc" -#include "svtools/syslocale.hxx" -#include "svtools/syslocaleoptions.hxx" -#include "svtools/szitem.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 "svtools/undo.hxx" -#include "svtools/undoopt.hxx" -#include "svtools/urihelper.hxx" -#include "svtools/urlbmk.hxx" -#include "svtools/useroptions.hxx" -#include "svtools/viewoptions.hxx" -#include "svtools/visitem.hxx" -#include "svtools/whiter.hxx" -#include "svtools/workingsetoptions.hxx" -#include "svtools/zforlist.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" diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx index 39dde5cdc6..d30fd07cac 100644 --- a/sfx2/inc/sfx2/app.hxx +++ b/sfx2/inc/sfx2/app.hxx @@ -34,8 +34,8 @@ #include "sfx2/dllapi.h" #include "sal/types.h" #include <tools/solar.h> -#include <svtools/smplhint.hxx> -#include <svtools/poolitem.hxx> +#include <svl/smplhint.hxx> +#include <svl/poolitem.hxx> #include <tools/ref.hxx> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/script/XLibraryContainer.hpp> @@ -94,7 +94,6 @@ class SfxModule; class SfxModuleArr_Impl; class Window; class INetURLObject; -class SfxMiscCfg; struct SfxConstant; struct SfxChildWinFactory; struct SfxMenuCtrlFactory; @@ -229,7 +228,6 @@ public: USHORT GetFreeIndex(); void ReleaseIndex(USHORT i); SfxEventConfiguration* GetEventConfig() const; - SfxMiscCfg* GetMiscConfig(); // Basic/Scripting static sal_Bool IsXScriptURL( const String& rScriptURL ); diff --git a/sfx2/inc/sfx2/appuno.hxx b/sfx2/inc/sfx2/appuno.hxx index bfdd1a2ea9..9a331ad46a 100644 --- a/sfx2/inc/sfx2/appuno.hxx +++ b/sfx2/inc/sfx2/appuno.hxx @@ -65,9 +65,9 @@ // something else header //____________________________________________________________________________________________________________________________________ #include <tools/errcode.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <sfx2/sfxuno.hxx> //____________________________________________________________________________________________________________________________________ diff --git a/sfx2/inc/sfx2/cntids.hrc b/sfx2/inc/sfx2/cntids.hrc index e73b65afc1..984925d95e 100644 --- a/sfx2/inc/sfx2/cntids.hrc +++ b/sfx2/inc/sfx2/cntids.hrc @@ -32,11 +32,11 @@ #define _CNTIDS_HRC #ifndef _CNTWIDS_HRC -#include <svtools/cntwids.hrc> +#include <svl/cntwids.hrc> #endif #ifndef _SOLAR_HRC -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #endif // Slot-ID's ----------------------------------------------------------------- diff --git a/sfx2/inc/sfx2/ctrlitem.hxx b/sfx2/inc/sfx2/ctrlitem.hxx index 01582644bc..2f40d77ac9 100644 --- a/sfx2/inc/sfx2/ctrlitem.hxx +++ b/sfx2/inc/sfx2/ctrlitem.hxx @@ -33,7 +33,7 @@ #include "sal/config.h" #include "sfx2/dllapi.h" #include "sal/types.h" -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> class SfxPoolItem; class SfxBindings; diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx index ce84acd12a..57cc7f9a25 100644 --- a/sfx2/inc/sfx2/dinfdlg.hxx +++ b/sfx2/inc/sfx2/dinfdlg.hxx @@ -37,7 +37,7 @@ #include <vcl/edit.hxx> #include <vcl/field.hxx> #include <svtools/stdctrl.hxx> -#include <svtools/stritem.hxx> +#include <svl/stritem.hxx> #include <svtools/svmedit.hxx> #include <vcl/edit.hxx> @@ -46,7 +46,7 @@ #include <svtools/headbar.hxx> #include <svtools/syslocale.hxx> #include <svtools/zforlist.hxx> - +#include <com/sun/star/util/Duration.hpp> #include "tabdlg.hxx" namespace com { namespace sun { namespace star { @@ -358,6 +358,55 @@ public: 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: @@ -394,9 +443,18 @@ 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; @@ -413,6 +471,10 @@ 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; @@ -430,6 +492,8 @@ private: 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* ); diff --git a/sfx2/inc/sfx2/dispatch.hxx b/sfx2/inc/sfx2/dispatch.hxx index f126da5341..9a13785e20 100644 --- a/sfx2/inc/sfx2/dispatch.hxx +++ b/sfx2/inc/sfx2/dispatch.hxx @@ -37,7 +37,7 @@ #include <stdarg.h> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> // SvUShorts +#include <svl/svstdarr.hxx> // SvUShorts #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx index ad63ad325c..36a9caba89 100644 --- a/sfx2/inc/sfx2/docfile.hxx +++ b/sfx2/inc/sfx2/docfile.hxx @@ -48,10 +48,10 @@ #include <tools/stream.hxx> #include <tools/string.hxx> #include <tools/list.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <tools/globname.hxx> -#include <svtools/cancel.hxx> +#include <svl/cancel.hxx> #include <cppuhelper/weak.hxx> #include <ucbhelper/content.hxx> @@ -229,7 +229,7 @@ public: 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(); + 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(); @@ -290,6 +290,7 @@ public: 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(); diff --git a/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx index 60255b4b21..217e5910c1 100644 --- a/sfx2/inc/sfx2/event.hxx +++ b/sfx2/inc/sfx2/event.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,8 +33,8 @@ #include "sal/config.h" #include "sfx2/dllapi.h" #include <tools/string.hxx> -#include <svtools/hint.hxx> -#include <svtools/eventcfg.hxx> +#include <svl/hint.hxx> +#include <unotools/eventcfg.hxx> #include <rtl/ustring.hxx> #include <com/sun/star/uno/Sequence.hxx> diff --git a/sfx2/inc/sfx2/evntconf.hxx b/sfx2/inc/sfx2/evntconf.hxx index d228f4e4d6..e9001ca642 100644 --- a/sfx2/inc/sfx2/evntconf.hxx +++ b/sfx2/inc/sfx2/evntconf.hxx @@ -38,7 +38,7 @@ #include <vcl/button.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> // SvUShorts +#include <svl/svstdarr.hxx> // SvUShorts #include <sfx2/event.hxx> #include <sfx2/sfxsids.hrc> @@ -46,7 +46,7 @@ #undef ITEMID_MACRO #endif #define ITEMID_MACRO SID_ATTR_MACROITEM -#include <svtools/macitem.hxx> +#include <svl/macitem.hxx> class SfxMacroInfo; class SfxMacroInfoArr_Impl; diff --git a/sfx2/inc/sfx2/fcontnr.hxx b/sfx2/inc/sfx2/fcontnr.hxx index cfed48aa73..b22f1137d7 100644 --- a/sfx2/inc/sfx2/fcontnr.hxx +++ b/sfx2/inc/sfx2/fcontnr.hxx @@ -36,7 +36,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/container/XNameAccess.hpp> -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <vcl/window.hxx> #include <sfx2/docfilt.hxx> diff --git a/sfx2/inc/sfx2/frame.hxx b/sfx2/inc/sfx2/frame.hxx index c536e7d966..210b0c4a5a 100644 --- a/sfx2/inc/sfx2/frame.hxx +++ b/sfx2/inc/sfx2/frame.hxx @@ -68,9 +68,9 @@ namespace com #include <tools/link.hxx> #include <tools/ref.hxx> #include <tools/string.hxx> -#include <svtools/brdcst.hxx> +#include <svl/brdcst.hxx> #include <tools/list.hxx> -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> class SvBorder; class SfxWorkWindow; diff --git a/sfx2/inc/sfx2/frmdescr.hxx b/sfx2/inc/sfx2/frmdescr.hxx index 1ebf31042b..9de4ab3dc3 100644 --- a/sfx2/inc/sfx2/frmdescr.hxx +++ b/sfx2/inc/sfx2/frmdescr.hxx @@ -34,10 +34,10 @@ #include "sfx2/dllapi.h" #include <sfx2/sfxsids.hrc> -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <tools/urlobj.hxx> #include <tools/string.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <tools/gen.hxx> class SvStream; diff --git a/sfx2/inc/sfx2/itemwrapper.hxx b/sfx2/inc/sfx2/itemwrapper.hxx index 738f1039bc..d7f05ae699 100644 --- a/sfx2/inc/sfx2/itemwrapper.hxx +++ b/sfx2/inc/sfx2/itemwrapper.hxx @@ -33,10 +33,10 @@ #include "sal/config.h" #include "sfx2/dllapi.h" -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/itemset.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/itemset.hxx> // ============================================================================ diff --git a/sfx2/inc/sfx2/linkmgr.hxx b/sfx2/inc/sfx2/linkmgr.hxx index de41985a07..bf79f78569 100644 --- a/sfx2/inc/sfx2/linkmgr.hxx +++ b/sfx2/inc/sfx2/linkmgr.hxx @@ -34,7 +34,7 @@ #include "sfx2/dllapi.h" #include <sfx2/linksrc.hxx> #include <tools/string.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> class SfxObjectShell; diff --git a/sfx2/inc/sfx2/macrconf.hxx b/sfx2/inc/sfx2/macrconf.hxx index 02327edd81..35db4e8cd2 100644 --- a/sfx2/inc/sfx2/macrconf.hxx +++ b/sfx2/inc/sfx2/macrconf.hxx @@ -35,7 +35,7 @@ #include "sal/types.h" #include <tools/errcode.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> // SvUShorts +#include <svl/svstdarr.hxx> // SvUShorts #include <sfx2/evntconf.hxx> class SfxMacroInfo; diff --git a/sfx2/inc/sfx2/macropg.hxx b/sfx2/inc/sfx2/macropg.hxx index 9bb03415bd..c1a02a3855 100644 --- a/sfx2/inc/sfx2/macropg.hxx +++ b/sfx2/inc/sfx2/macropg.hxx @@ -35,7 +35,7 @@ #include <sfx2/basedlgs.hxx> #include <sfx2/tabdlg.hxx> -#include <svtools/macitem.hxx> +#include <svl/macitem.hxx> #include <vcl/lstbox.hxx> #include <com/sun/star/frame/XFrame.hpp> diff --git a/sfx2/inc/sfx2/msgpool.hxx b/sfx2/inc/sfx2/msgpool.hxx index 741f79008f..9b14354e17 100644 --- a/sfx2/inc/sfx2/msgpool.hxx +++ b/sfx2/inc/sfx2/msgpool.hxx @@ -36,7 +36,7 @@ #include <sfx2/msg.hxx> #include <tools/string.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> class SfxInterface; class SfxSlot; diff --git a/sfx2/inc/sfx2/objitem.hxx b/sfx2/inc/sfx2/objitem.hxx index b4f359d9a3..98bb320569 100644 --- a/sfx2/inc/sfx2/objitem.hxx +++ b/sfx2/inc/sfx2/objitem.hxx @@ -32,7 +32,7 @@ #include "sal/config.h" #include "sfx2/dllapi.h" -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <sfx2/shell.hxx> diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx index 00f12803e0..db004fa9e3 100644 --- a/sfx2/inc/sfx2/objsh.hxx +++ b/sfx2/inc/sfx2/objsh.hxx @@ -58,7 +58,7 @@ //#if 0 // _SOLAR__PRIVATE #include <vcl/timer.hxx> //#endif -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <vcl/timer.hxx> #include <vcl/bitmap.hxx> #include <sot/storage.hxx> diff --git a/sfx2/inc/sfx2/objuno.hxx b/sfx2/inc/sfx2/objuno.hxx index 74083423b1..03969bcebf 100644 --- a/sfx2/inc/sfx2/objuno.hxx +++ b/sfx2/inc/sfx2/objuno.hxx @@ -51,7 +51,7 @@ #include <com/sun/star/io/IOException.hpp> -#include <svtools/itemprop.hxx> +#include <svl/itemprop.hxx> #include <cppuhelper/implbase10.hxx> #include "sfxuno.hxx" diff --git a/sfx2/inc/sfx2/querystatus.hxx b/sfx2/inc/sfx2/querystatus.hxx index 9f7e0e910a..e205f67d7b 100644 --- a/sfx2/inc/sfx2/querystatus.hxx +++ b/sfx2/inc/sfx2/querystatus.hxx @@ -33,7 +33,7 @@ #include "sal/config.h" #include "sfx2/dllapi.h" -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <cppuhelper/weak.hxx> #include <osl/conditn.hxx> #include <com/sun/star/frame/FeatureStateEvent.hpp> diff --git a/sfx2/inc/sfx2/request.hxx b/sfx2/inc/sfx2/request.hxx index 5ec41cd73c..5aba53bfd6 100644 --- a/sfx2/inc/sfx2/request.hxx +++ b/sfx2/inc/sfx2/request.hxx @@ -33,8 +33,8 @@ #include "sal/config.h" #include "sfx2/dllapi.h" #include "sal/types.h" -#include <svtools/itemset.hxx> -#include <svtools/hint.hxx> +#include <svl/itemset.hxx> +#include <svl/hint.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/beans/PropertyValue.hpp> diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc index ce6b09adbb..45669204cf 100644 --- a/sfx2/inc/sfx2/sfx.hrc +++ b/sfx2/inc/sfx2/sfx.hrc @@ -33,11 +33,11 @@ // include --------------------------------------------------------------- #ifndef _SOLAR_HRC -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #endif #ifndef _MEMBERID_HRC -#include <svtools/memberid.hrc> +#include <svl/memberid.hrc> #endif #define RID_GROUPS_OFFSET 32000 diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx index e6d68889e4..93a7d1fb37 100644 --- a/sfx2/inc/sfx2/sfxbasemodel.hxx +++ b/sfx2/inc/sfx2/sfxbasemodel.hxx @@ -103,7 +103,7 @@ // include of my own project //________________________________________________________________________________________________________ -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> //________________________________________________________________________________________________________ // defines diff --git a/sfx2/inc/sfx2/sfxhtml.hxx b/sfx2/inc/sfx2/sfxhtml.hxx index 811db2f4db..ae8e3d0ea0 100644 --- a/sfx2/inc/sfx2/sfxhtml.hxx +++ b/sfx2/inc/sfx2/sfxhtml.hxx @@ -36,7 +36,7 @@ #include "sal/types.h" #include <i18npool/lang.h> #include <svtools/parhtml.hxx> -#include <svtools/macitem.hxx> +#include <svl/macitem.hxx> class ImageMap; diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index 09a9849d7c..6ce92380ee 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -33,7 +33,7 @@ // include --------------------------------------------------------------- #ifndef _SOLAR_HRC -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #endif #define SID_SFX_START 5000 diff --git a/sfx2/inc/sfx2/sfxstatuslistener.hxx b/sfx2/inc/sfx2/sfxstatuslistener.hxx index 57f3beb7dd..fc0c800071 100644 --- a/sfx2/inc/sfx2/sfxstatuslistener.hxx +++ b/sfx2/inc/sfx2/sfxstatuslistener.hxx @@ -33,7 +33,7 @@ #include "sal/config.h" #include "sfx2/dllapi.h" -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <cppuhelper/weak.hxx> #include <osl/conditn.hxx> #include <com/sun/star/frame/FeatureStateEvent.hpp> diff --git a/sfx2/inc/sfx2/shell.hxx b/sfx2/inc/sfx2/shell.hxx index 154cef1257..ba16f98f2c 100644 --- a/sfx2/inc/sfx2/shell.hxx +++ b/sfx2/inc/sfx2/shell.hxx @@ -36,7 +36,7 @@ #include <com/sun/star/embed/VerbDescriptor.hpp> #include <tools/debug.hxx> #include <tools/rtti.hxx> -#include <svtools/brdcst.hxx> +#include <svl/brdcst.hxx> #include <tools/ownlist.hxx> #include <tools/unqid.hxx> diff --git a/sfx2/inc/sfx2/srchitem.hxx b/sfx2/inc/sfx2/srchitem.hxx index 373c0b4e85..b8df62e0c6 100644 --- a/sfx2/inc/sfx2/srchitem.hxx +++ b/sfx2/inc/sfx2/srchitem.hxx @@ -39,7 +39,7 @@ #include <unotools/configitem.hxx> #include <rsc/rscsfx.hxx> #include <tools/string.hxx> -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <sfx2/msg.hxx> #include <sfx2/srchdefs.hxx> @@ -112,6 +112,7 @@ public: // ConfigItem virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString > &rPropertyNames ); + virtual void Commit(); sal_uInt16 GetCommand() const { return nCommand; } void SetCommand(sal_uInt16 nNewCommand) { nCommand = nNewCommand; } diff --git a/sfx2/inc/sfx2/tabdlg.hxx b/sfx2/inc/sfx2/tabdlg.hxx index ca312124e7..050b135486 100644 --- a/sfx2/inc/sfx2/tabdlg.hxx +++ b/sfx2/inc/sfx2/tabdlg.hxx @@ -37,8 +37,8 @@ #include <vcl/button.hxx> #include <vcl/tabctrl.hxx> #include <vcl/tabpage.hxx> -#include <svtools/itempool.hxx> -#include <svtools/itemset.hxx> +#include <svl/itempool.hxx> +#include <svl/itemset.hxx> #include <com/sun/star/frame/XFrame.hpp> #if ENABLE_LAYOUT diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx index b551a4942f..89bd00fc5d 100644 --- a/sfx2/inc/sfx2/viewfrm.hxx +++ b/sfx2/inc/sfx2/viewfrm.hxx @@ -33,12 +33,12 @@ #include "sal/config.h" #include "sfx2/dllapi.h" #include "sal/types.h" -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <sfx2/module.hxx> #include <sfx2/frame.hxx> #include <sfx2/shell.hxx> #include <sfx2/sfxsids.hrc> -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <com/sun/star/frame/status/Verb.hpp> #include <com/sun/star/frame/XModel.hpp> diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx index ae45545cba..696be7b565 100644 --- a/sfx2/inc/sfx2/viewsh.hxx +++ b/sfx2/inc/sfx2/viewsh.hxx @@ -36,7 +36,7 @@ #include <com/sun/star/embed/XEmbeddedObject.hpp> #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/uno/Reference.h> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <com/sun/star/ui/XContextMenuInterceptor.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp> #include <cppuhelper/interfacecontainer.hxx> diff --git a/sfx2/inc/sorgitm.hxx b/sfx2/inc/sorgitm.hxx index 9d135df393..4d5e4c2218 100644 --- a/sfx2/inc/sorgitm.hxx +++ b/sfx2/inc/sorgitm.hxx @@ -30,7 +30,7 @@ #ifndef _SFX_SORGITM_HXX #define _SFX_SORGITM_HXX -#include <svtools/stritem.hxx> +#include <svl/stritem.hxx> // class SfxScriptOrganizerItem --------------------------------------------- diff --git a/sfx2/inc/stbitem.hxx b/sfx2/inc/stbitem.hxx index 6a32a70748..c3ee01bd5f 100644 --- a/sfx2/inc/stbitem.hxx +++ b/sfx2/inc/stbitem.hxx @@ -32,7 +32,7 @@ #include "sal/config.h" #include "sfx2/dllapi.h" -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <svtools/statusbarcontroller.hxx> //------------------------------------------------------------------ diff --git a/sfx2/inc/tplpitem.hxx b/sfx2/inc/tplpitem.hxx index 46b437b0f2..8c721391d7 100644 --- a/sfx2/inc/tplpitem.hxx +++ b/sfx2/inc/tplpitem.hxx @@ -34,7 +34,7 @@ #include "sfx2/dllapi.h" #include <tools/string.hxx> #include <tools/rtti.hxx> -#include <svtools/flagitem.hxx> +#include <svl/flagitem.hxx> class SFX2_DLLPUBLIC SfxTemplateItem: public SfxFlagItem { diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst index 77acce9a7b..fe71b17157 100644 --- a/sfx2/prj/d.lst +++ b/sfx2/prj/d.lst @@ -3,8 +3,6 @@ mkdir: %COMMON_DEST%\res%_EXT% mkdir: %_DEST%\inc%_EXT%\sfx2 ..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\inc\sfxslots.ilb %_DEST%\inc%_EXT%\sfxslots.ilb -..\%__SRC%\inc\sfxslots.ilb* %_DEST%\inc%_EXT%\sfxslots.ilb* ..\%__SRC%\lib\sfx.lib %_DEST%\lib%_EXT%\sfx.lib ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% ..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a @@ -26,6 +24,8 @@ mkdir: %_DEST%\inc%_EXT%\sfx2 ..\%__SRC%\misc\sfx2.csv %_DEST%\inc%_EXT%\sfx2.csv ..\inc\sfx2\dllapi.h %_DEST%\inc%_EXT%\sfx2\dllapi.h +..\sdi\sfx.sdi %_DEST%\inc%_EXT%\sfx2\sfx.sdi +..\sdi\sfxitems.sdi %_DEST%\inc%_EXT%\sfx2\sfxitems.sdi ..\inc\sfx2\app.hxx %_DEST%\inc%_EXT%\sfx2\app.hxx ..\inc\sfx2\basedlgs.hxx %_DEST%\inc%_EXT%\sfx2\basedlgs.hxx ..\inc\sfx2\bindings.hxx %_DEST%\inc%_EXT%\sfx2\bindings.hxx diff --git a/sfx2/qa/complex/DocumentMetaData.java b/sfx2/qa/complex/DocumentMetaData.java index 8a4c1a91bd..c08531a697 100644 --- a/sfx2/qa/complex/DocumentMetaData.java +++ b/sfx2/qa/complex/DocumentMetaData.java @@ -41,8 +41,10 @@ import com.sun.star.lang.XSingleServiceFactory; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.Locale; import com.sun.star.lang.EventObject; -import com.sun.star.util.Time; +import com.sun.star.util.Date; import com.sun.star.util.DateTime; +import com.sun.star.util.Time; +import com.sun.star.util.Duration; import com.sun.star.util.XModifyListener; import com.sun.star.util.XModifyBroadcaster; import com.sun.star.beans.XPropertyContainer; @@ -351,14 +353,30 @@ public class DocumentMetaData extends ComplexTestCase // differently some day... boolean b = true; double d = 3.1415; + // note that Time is only supported for backward compatibilty! Time t = new Time(); t.Hours = 1; t.Minutes = 16; + Date date = new Date(); + date.Year = 2071; + date.Month = 2; + date.Day = 3; dt.Year = 2065; + Duration dur = new Duration(); + dur.Negative = true; + dur.Years = 1001; + dur.Months = 999; + dur.Days = 888; + dur.Hours = 777; + dur.Minutes = 666; + dur.Seconds = 555; + dur.HundredthSeconds = 444; udpc.addProperty("Frobnicate", PropertyAttribute.REMOVEABLE, new Boolean(b)); - udpc.addProperty("FrobDuration", PropertyAttribute.REMOVEABLE, t); + udpc.addProperty("FrobDuration", PropertyAttribute.REMOVEABLE, dur); + udpc.addProperty("FrobDuration2", PropertyAttribute.REMOVEABLE, t); + udpc.addProperty("FrobEndDate", PropertyAttribute.REMOVEABLE, date); udpc.addProperty("FrobStartTime", PropertyAttribute.REMOVEABLE, dt); udpc.addProperty("Pi", PropertyAttribute.REMOVEABLE, new Double(d)); udpc.addProperty("Foo", PropertyAttribute.REMOVEABLE, "bar"); @@ -383,9 +401,13 @@ public class DocumentMetaData extends ComplexTestCase assure ("UserDefined bool", new Boolean(b).equals( udps.getPropertyValue("Frobnicate"))); - assure ("UserDefined time", eqTime(t, (Time) + assure ("UserDefined duration", eqDuration(dur, (Duration) udps.getPropertyValue("FrobDuration"))); - assure ("UserDefined date", eqDateTime(dt, (DateTime) + assure ("UserDefined time", eqTime(t, (Time) + udps.getPropertyValue("FrobDuration2"))); + assure ("UserDefined date", eqDate(date, (Date) + udps.getPropertyValue("FrobEndDate"))); + assure ("UserDefined datetime", eqDateTime(dt, (DateTime) udps.getPropertyValue("FrobStartTime"))); assure ("UserDefined float", new Double(d).equals( udps.getPropertyValue("Pi"))); @@ -423,9 +445,13 @@ public class DocumentMetaData extends ComplexTestCase assure ("UserDefined bool", new Boolean(b).equals( udps.getPropertyValue("Frobnicate"))); - assure ("UserDefined time", eqTime(t, (Time) + assure ("UserDefined duration", eqDuration(dur, (Duration) udps.getPropertyValue("FrobDuration"))); - assure ("UserDefined date", eqDateTime(dt, (DateTime) + assure ("UserDefined time", eqTime(t, (Time) + udps.getPropertyValue("FrobDuration2"))); + assure ("UserDefined date", eqDate(date, (Date) + udps.getPropertyValue("FrobEndDate"))); + assure ("UserDefined datetime", eqDateTime(dt, (DateTime) udps.getPropertyValue("FrobStartTime"))); assure ("UserDefined float", new Double(d).equals( udps.getPropertyValue("Pi"))); @@ -474,12 +500,24 @@ public class DocumentMetaData extends ComplexTestCase && a.HundredthSeconds == b.HundredthSeconds; } + boolean eqDate(Date a, Date b) { + return a.Year == b.Year && a.Month == b.Month && a.Day == b.Day; + } + boolean eqTime(Time a, Time b) { return a.Hours == b.Hours && a.Minutes == b.Minutes && a.Seconds == b.Seconds && a.HundredthSeconds == b.HundredthSeconds; } + boolean eqDuration(Duration a, Duration b) { + return a.Years == b.Years && a.Months == b.Months && a.Days == b.Days + && a.Hours == b.Hours && a.Minutes == b.Minutes + && a.Seconds == b.Seconds + && a.HundredthSeconds == b.HundredthSeconds + && a.Negative == b.Negative; + } + java.util.Collection fromArray(Object[] os) { java.util.Collection ret = new java.util.HashSet(); for (int i = 0; i < os.length; ++i) { diff --git a/sfx2/sdi/sfxitems.sdi b/sfx2/sdi/sfxitems.sdi new file mode 100644 index 0000000000..b8501bcb07 --- /dev/null +++ b/sfx2/sdi/sfxitems.sdi @@ -0,0 +1,89 @@ + item void SfxVoidItem;
+ item BOOL SfxBoolItem;
+ item INT32 SfxUInt16Item;
+ item INT16 SfxInt16Item;
+ item INT32 SfxUInt32Item;
+ item INT32 SfxInt32Item;
+ item String SfxStringItem;
+ item BYTE SfxByteItem;
+ item INT16 SfxEnumItem;
+ item INT16 SfxAllEnumItem;
+ item INT16 TbxImageItem;
+
+ item String SbxItem; //! Dummy
+ item String SfxObjectItem; //! Dummy
+ item String SfxTemplateItem; //! Dummy
+ item String SfxMacroInfoItem; //! Dummy
+ item String SfxImageItem; //! Dummy
+ item String SfxFrameItem; //! Dummy
+ item String SfxObjectShellItem //! Dummy
+ item String SfxUsrAnyItem //! Dummy
+
+ struct Point
+ {
+ INT32 X MID_X;
+ INT32 Y MID_Y;
+ };
+ item Point SfxPointItem;
+
+ struct Rectangle
+ {
+ INT32 Left MID_RECT_LEFT;
+ INT32 Top MID_RECT_TOP;
+ INT32 Width MID_WIDTH;
+ INT32 Height MID_HEIGHT;
+ };
+ item Rectangle SfxRectangleItem;
+
+ struct DocInfo
+ {
+ BOOL UseUserData MID_DOCINFO_USEUSERDATA;
+ BOOL DeleteUserData MID_DOCINFO_DELETEUSERDATA;
+ String Title MID_DOCINFO_TITLE;
+ String Subject MID_DOCINFO_SUBJECT;
+ String KeyWords MID_DOCINFO_KEYWORDS;
+ String Description MID_DOCINFO_DESCRIPTION;
+ BOOL AutoReload MID_DOCINFO_AUTOLOADENABLED;
+ INT32 AutoReloadTime MID_DOCINFO_AUTOLOADSECS;
+ String AutoReloadURL MID_DOCINFO_AUTOLOADURL;
+ String AutoReloadFrame MID_DOCINFO_DEFAULTTARGET;
+ };
+ item DocInfo SfxDocumentInfoItem;
+
+ struct SvxSearch
+ {
+ INT16 StyleFamily MID_SEARCH_STYLEFAMILY;
+ UINT16 CellType MID_SEARCH_CELLTYPE;
+ BOOL RowDirection MID_SEARCH_ROWDIRECTION;
+ BOOL AllTables MID_SEARCH_ALLTABLES;
+ BOOL Backward MID_SEARCH_BACKWARD;
+ BOOL Pattern MID_SEARCH_PATTERN;
+ BOOL Content MID_SEARCH_CONTENT;
+ BOOL AsianOptions MID_SEARCH_ASIANOPTIONS;
+ INT16 AlgorithmType MID_SEARCH_ALGORITHMTYPE;
+ INT32 SearchFlags MID_SEARCH_FLAGS;
+ String SearchString MID_SEARCH_SEARCHSTRING;
+ String ReplaceString MID_SEARCH_REPLACESTRING;
+ INT16 Locale MID_SEARCH_LOCALE;
+ INT32 ChangedChars MID_SEARCH_CHANGEDCHARS;
+ INT32 DeletedChars MID_SEARCH_DELETEDCHARS;
+ INT32 InsertedChars MID_SEARCH_INSERTEDCHARS;
+ INT32 TransliterateFlags MID_SEARCH_TRANSLITERATEFLAGS;
+ INT16 Command MID_SEARCH_COMMAND;
+ };
+ item SvxSearch SvxSearchItem;
+
+ struct SvxSize
+ {
+ INT32 Width MID_SIZE_WIDTH;
+ INT32 Height MID_SIZE_HEIGHT;
+ };
+ item SvxSize SvxSizeItem;
+
+ struct SfxScriptOrganizer
+ {
+ String Language MID_SCRIPT_ORGANIZER_LANGUAGE;
+ };
+ item SfxScriptOrganizer SfxScriptOrganizerItem;
+ item String SvxClipboardFmtItem; //! Dummy
+
diff --git a/sfx2/sdi/sfxslots.sdi b/sfx2/sdi/sfxslots.sdi index 7954591236..44cd45d008 100644 --- a/sfx2/sdi/sfxslots.sdi +++ b/sfx2/sdi/sfxslots.sdi @@ -36,103 +36,15 @@ StarApplicationFrame [ HelpText( "StarDivision Application Framework" ), SlotIdFile( "sfx2/sfx.hrc" ) -TypeLibFile( "sfxslots.tlb" ) ] { - item void SfxVoidItem; - item BOOL SfxBoolItem; - item INT32 SfxUInt16Item; - item INT16 SfxInt16Item; - item INT32 SfxUInt32Item; - item INT32 SfxInt32Item; - item String SfxStringItem; - item BYTE SfxByteItem; - item INT16 SfxEnumItem; - item INT16 SfxAllEnumItem; - item INT16 TbxImageItem; - - item String SbxItem; //! Dummy - item String SfxObjectItem; //! Dummy - item String SfxTemplateItem; //! Dummy - item String SfxMacroInfoItem; //! Dummy - item String SfxImageItem; //! Dummy - item String SfxFrameItem; //! Dummy - item String SfxObjectShellItem //! Dummy - item String SfxUsrAnyItem //! Dummy - item String SvxClipboardFmtItem; //! Dummy - - struct Point - { - INT32 X MID_X; - INT32 Y MID_Y; - }; - item Point SfxPointItem; - - struct Rectangle - { - INT32 Left MID_RECT_LEFT; - INT32 Top MID_RECT_TOP; - INT32 Width MID_WIDTH; - INT32 Height MID_HEIGHT; - }; - item Rectangle SfxRectangleItem; - - struct DocInfo - { - BOOL UseUserData MID_DOCINFO_USEUSERDATA; - BOOL DeleteUserData MID_DOCINFO_DELETEUSERDATA; - String Title MID_DOCINFO_TITLE; - String Subject MID_DOCINFO_SUBJECT; - String KeyWords MID_DOCINFO_KEYWORDS; - String Description MID_DOCINFO_DESCRIPTION; - BOOL AutoReload MID_DOCINFO_AUTOLOADENABLED; - INT32 AutoReloadTime MID_DOCINFO_AUTOLOADSECS; - String AutoReloadURL MID_DOCINFO_AUTOLOADURL; - String AutoReloadFrame MID_DOCINFO_DEFAULTTARGET; - }; - item DocInfo SfxDocumentInfoItem; - - struct SvxSearch - { - INT16 StyleFamily MID_SEARCH_STYLEFAMILY; - UINT16 CellType MID_SEARCH_CELLTYPE; - BOOL RowDirection MID_SEARCH_ROWDIRECTION; - BOOL AllTables MID_SEARCH_ALLTABLES; - BOOL Backward MID_SEARCH_BACKWARD; - BOOL Pattern MID_SEARCH_PATTERN; - BOOL Content MID_SEARCH_CONTENT; - BOOL AsianOptions MID_SEARCH_ASIANOPTIONS; - INT16 AlgorithmType MID_SEARCH_ALGORITHMTYPE; - INT32 SearchFlags MID_SEARCH_FLAGS; - String SearchString MID_SEARCH_SEARCHSTRING; - String ReplaceString MID_SEARCH_REPLACESTRING; - INT16 Locale MID_SEARCH_LOCALE; - INT32 ChangedChars MID_SEARCH_CHANGEDCHARS; - INT32 DeletedChars MID_SEARCH_DELETEDCHARS; - INT32 InsertedChars MID_SEARCH_INSERTEDCHARS; - INT32 TransliterateFlags MID_SEARCH_TRANSLITERATEFLAGS; - INT16 Command MID_SEARCH_COMMAND; - }; - item SvxSearch SvxSearchItem; - - struct SvxSize - { - INT32 Width MID_SIZE_WIDTH; - INT32 Height MID_SIZE_HEIGHT; - }; - item SvxSize SvxSizeItem; - - struct SfxScriptOrganizer - { - String Language MID_SCRIPT_ORGANIZER_LANGUAGE; - }; - item SfxScriptOrganizer SfxScriptOrganizerItem; - + include "sfxitems.sdi" include "sfx.sdi" include "docslots.sdi" - include "frmslots.sdi" include "viwslots.sdi" + include "frmslots.sdi" include "mdislots.sdi" include "appslots.sdi" + } diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index d1aa10f5de..c75033ae71 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -45,19 +45,19 @@ #include <tools/config.hxx> #include <basic/basrdll.hxx> #include <svtools/asynclink.hxx> -#include <svtools/stritem.hxx> +#include <svl/stritem.hxx> #ifndef _SOUND_HXX //autogen #include <vcl/sound.hxx> #endif -#include <svtools/eitem.hxx> -#include <svtools/urlbmk.hxx> +#include <svl/eitem.hxx> +#include <svl/urlbmk.hxx> #ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> -#include <svtools/svdde.hxx> +#include <svl/svdde.hxx> #include <tools/urlobj.hxx> #include <unotools/tempfile.hxx> #include <osl/file.hxx> @@ -65,7 +65,7 @@ #endif #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/uno/Any.hxx> @@ -136,29 +136,28 @@ #define DDE_AVAILABLE #endif -#include <svtools/saveopt.hxx> -#include <svtools/undoopt.hxx> +#include <unotools/saveopt.hxx> +#include <unotools/undoopt.hxx> #include <svtools/helpopt.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/viewoptions.hxx> -#include <svtools/moduleoptions.hxx> -#include <svtools/historyoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/viewoptions.hxx> +#include <unotools/moduleoptions.hxx> +#include <unotools/historyoptions.hxx> #include <svtools/menuoptions.hxx> -#include <svtools/addxmltostorageoptions.hxx> #include <svtools/miscopt.hxx> -#include <svtools/useroptions.hxx> -#include <svtools/startoptions.hxx> -#include <svtools/securityoptions.hxx> -#include <svtools/localisationoptions.hxx> -#include <svtools/inetoptions.hxx> -#include <svtools/fontoptions.hxx> -#include <svtools/internaloptions.hxx> -#include <svtools/workingsetoptions.hxx> -#include <svtools/syslocaleoptions.hxx> -#include <svtools/syslocale.hxx> +#include <unotools/useroptions.hxx> +#include <unotools/startoptions.hxx> +#include <unotools/securityoptions.hxx> +#include <unotools/localisationoptions.hxx> +#include <unotools/inetoptions.hxx> +#include <unotools/fontoptions.hxx> +#include <unotools/internaloptions.hxx> +#include <unotools/workingsetoptions.hxx> +#include <unotools/syslocaleoptions.hxx> +#include <unotools/syslocale.hxx> #include <framework/addonsoptions.hxx> #include <svtools/ttprops.hxx> -#include <svtools/extendedsecurityoptions.hxx> +#include <unotools/extendedsecurityoptions.hxx> using namespace ::com::sun::star; @@ -359,7 +358,7 @@ SfxApplication::SfxApplication() RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ initialize DDE" ); #ifdef DDE_AVAILABLE -#ifdef PRODUCT +#ifndef DBG_UTIL InitializeDde(); #else if( !InitializeDde() ) diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index a7d965a097..36b6cd94f8 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,15 +36,15 @@ #include <com/sun/star/uno/Reference.h> #include <basic/basrdll.hxx> #include <tools/urlobj.hxx> -#include <svtools/macitem.hxx> +#include <svl/macitem.hxx> #include <basic/sbxfac.hxx> #include <basic/sbx.hxx> #include <vcl/gradient.hxx> -#include <svtools/rectitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> +#include <svl/rectitem.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> #include <basic/sbmod.hxx> -#include <svtools/whiter.hxx> +#include <svl/whiter.hxx> #include <basic/sbmeth.hxx> #include <basic/sbstar.hxx> #include <vcl/wrkwin.hxx> @@ -53,9 +53,9 @@ #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> -#include <svtools/undoopt.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/useroptions.hxx> +#include <unotools/undoopt.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/useroptions.hxx> #include <unotools/bootstrap.hxx> #include <sfx2/appuno.hxx> diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 172c584c93..fd2afddcb3 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,40 +46,39 @@ #include <vcl/sound.hxx> #include <vcl/msgbox.hxx> #include <tools/string.hxx> -#include <svtools/itempool.hxx> -#include <svtools/aeitem.hxx> -#include <svtools/slstitm.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/szitem.hxx> -#include <svtools/undo.hxx> +#include <svl/itempool.hxx> +#include <svl/aeitem.hxx> +#include <svl/slstitm.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> +#include <svl/szitem.hxx> +#include <svl/undo.hxx> #define _SVSTDARR_STRINGS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <svtools/ttprops.hxx> #include <sfx2/sfxsids.hrc> #include <sot/exchange.hxx> //#include <svtools/agprop.hxx> //#include <sj2/sjapplet.hxx> -#include <svtools/isethint.hxx> +#include <svl/isethint.hxx> #include <unotools/configmgr.hxx> #include <tools/urlobj.hxx> #include <tools/wldcrd.hxx> -#include <svtools/saveopt.hxx> +#include <unotools/saveopt.hxx> #include <svtools/helpopt.hxx> -#include <svtools/undoopt.hxx> -#include <svtools/securityoptions.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/inetoptions.hxx> +#include <unotools/undoopt.hxx> +#include <unotools/securityoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/inetoptions.hxx> #include <svtools/miscopt.hxx> #include <vcl/toolbox.hxx> #include <unotools/localfilehelper.hxx> #include <comphelper/processfactory.hxx> #include <rtl/ustrbuf.hxx> -#include <svtools/misccfg.hxx> #include <sfx2/app.hxx> #include <sfx2/docfile.hxx> @@ -1075,10 +1074,3 @@ void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, FASTBOOL bSync IMPL_OBJHINT( SfxStringHint, String ) -SfxMiscCfg* SfxApplication::GetMiscConfig() -{ - if ( !pAppData_Impl->pMiscConfig ) - pAppData_Impl->pMiscConfig = new SfxMiscCfg; - - return pAppData_Impl->pMiscConfig; -} diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx index dec26b4f0c..da7b56c97b 100644 --- a/sfx2/source/appl/appchild.cxx +++ b/sfx2/source/appl/appchild.cxx @@ -33,8 +33,8 @@ #ifndef GCC #endif -#include <svtools/whiter.hxx> -#include <svtools/eitem.hxx> +#include <svl/whiter.hxx> +#include <svl/eitem.hxx> #include <sfx2/app.hxx> #include "appdata.hxx" diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index d04ebcf822..8f24520a4b 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -33,17 +33,17 @@ #include <tools/cachestr.hxx> #include <tools/config.hxx> #ifndef _INETSTRM_HXX //autogen -#include <svtools/inetstrm.hxx> +#include <svl/inetstrm.hxx> #endif -#include <svtools/stritem.hxx> +#include <svl/stritem.hxx> #define _SVSTDARR_STRINGS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <vos/mutex.hxx> #include <vcl/menu.hxx> #include <vcl/msgbox.hxx> -#include <svtools/dateitem.hxx> +#include <svl/dateitem.hxx> #include <vcl/menu.hxx> #include <vcl/wrkwin.hxx> #include "comphelper/processfactory.hxx" @@ -109,7 +109,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* pApp ) : pEventConfig(0), pDisabledSlotList( 0 ), pSecureURLs(0), - pMiscConfig(0), pSaveOptions( 0 ), pUndoOptions( 0 ), pHelpOptions( 0 ), diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index 45e1e23d55..1c282bafd1 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,17 +31,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include <vcl/wrkwin.hxx> -#include <svtools/rectitem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/intitem.hxx> +#include <svl/rectitem.hxx> +#include <svl/eitem.hxx> +#include <svl/intitem.hxx> #include <basic/sbstar.hxx> -#include <svtools/stritem.hxx> -#include <svtools/svdde.hxx> +#include <svl/stritem.hxx> +#include <svl/svdde.hxx> #include <sfx2/lnkbase.hxx> #include <sfx2/linkmgr.hxx> #include <tools/urlobj.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #ifndef GCC #endif diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index a995006238..5345a050aa 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,17 +38,17 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <svtools/soerr.hxx> -#include <svtools/svtools.hrc> -#include <svtools/saveopt.hxx> -#include <svtools/localisationoptions.hxx> +#include <svl/svtools.hrc> +#include <unotools/saveopt.hxx> +#include <unotools/localisationoptions.hxx> #include <tools/config.hxx> #ifndef _SV_RESARY_HXX #include <tools/resary.hxx> #endif #include <tools/urlobj.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> #ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif @@ -60,9 +60,9 @@ #include <rtl/ustrbuf.hxx> #include <vos/security.hxx> #include <ucbhelper/configurationkeys.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/historyoptions.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/historyoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <cppuhelper/implbase2.hxx> #include <rtl/logfile.hxx> @@ -106,7 +106,7 @@ namespace css = ::com::sun::star; class SfxTerminateListener_Impl : public ::cppu::WeakImplHelper2< XTerminateListener, XServiceInfo > { public: - + // XTerminateListener virtual void SAL_CALL queryTermination( const EventObject& aEvent ) throw( TerminationVetoException, RuntimeException ); virtual void SAL_CALL notifyTermination( const EventObject& aEvent ) throw( RuntimeException ); diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx index d0e1e40f0d..f4e3dea030 100644 --- a/sfx2/source/appl/appmain.cxx +++ b/sfx2/source/appl/appmain.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,12 +37,11 @@ #include <stdio.h> #include <tools/urlobj.hxx> -#include <svtools/cstitem.hxx> #include <tools/config.hxx> #include <svtools/ehdl.hxx> -#include <svtools/startoptions.hxx> -#include <svtools/itempool.hxx> -#include <svtools/urihelper.hxx> +#include <unotools/startoptions.hxx> +#include <svl/itempool.hxx> +#include <svl/urihelper.hxx> #include <svtools/helpopt.hxx> #include <vos/process.hxx> #include <framework/sfxhelperfunctions.hxx> @@ -124,7 +123,7 @@ void SfxApplication::Init */ { #ifdef DDE_AVAILABLE -#ifdef PRODUCT +#ifndef DBG_UTIL InitializeDde(); #else if( !InitializeDde() ) diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 1768229b1d..cf219f6d26 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,13 +36,13 @@ #include <vos/process.hxx> #endif #include <vos/xception.hxx> -#include <svtools/whiter.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> +#include <svl/whiter.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> #include <svtools/filter.hxx> -#include <svtools/internaloptions.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/internaloptions.hxx> +#include <unotools/pathoptions.hxx> #include <com/sun/star/registry/InvalidRegistryException.hpp> #ifndef _COM_SUN_STAR_BEANS_PropertyValue_HPP_ #include <com/sun/star/beans/PropertyValue.hpp> @@ -64,7 +64,7 @@ #include <comphelper/processfactory.hxx> #include <unotools/localfilehelper.hxx> #include <unotools/bootstrap.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <osl/file.hxx> #include "sfxresid.hxx" @@ -189,7 +189,7 @@ void SfxApplication::InitializeDisplayName_Impl() aGuard.clear(); -#ifndef PRODUCT +#ifdef DBG_UTIL ::rtl::OUString aDefault; aTitle += DEFINE_CONST_UNICODE(" ["); diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 17b7b432eb..e6e0c4bdac 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -64,22 +64,22 @@ #include <comphelper/sequenceasvector.hxx> #include <vcl/wrkwin.hxx> -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <vcl/msgbox.hxx> -#include <svtools/stritem.hxx> -#include <svtools/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> #include <sfx2/doctempl.hxx> #include <svtools/sfxecode.hxx> #include <framework/preventduplicateinteraction.hxx> #include <svtools/ehdl.hxx> #include <basic/sbxobj.hxx> -#include <svtools/urihelper.hxx> +#include <svl/urihelper.hxx> #include <unotools/localfilehelper.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <svtools/templdlg.hxx> #include <osl/file.hxx> -#include <svtools/extendedsecurityoptions.hxx> +#include <unotools/extendedsecurityoptions.hxx> #include <comphelper/docpasswordhelper.hxx> #include <vcl/svapp.hxx> @@ -95,7 +95,7 @@ #include <sfx2/new.hxx> #include <sfx2/objitem.hxx> #include <sfx2/objsh.hxx> -#include <svtools/slstitm.hxx> +#include <svl/slstitm.hxx> #include "objshimp.hxx" #include "openflag.hxx" #include <sfx2/passwd.hxx> @@ -112,7 +112,7 @@ #include <sfx2/event.hxx> #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::beans; diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index 213abbb8df..63d33e5499 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,14 +36,14 @@ #ifdef WIN #define _TL_LANG_SPECIAL #endif -#include <svtools/svdde.hxx> +#include <svl/svdde.hxx> #ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> -#include <svtools/saveopt.hxx> -#include <svtools/misccfg.hxx> +#include <unotools/saveopt.hxx> +#include <unotools/misccfg.hxx> #ifndef GCC #endif @@ -77,7 +77,7 @@ using ::basic::BasicManagerRepository; -#ifndef PRODUCT +#ifdef DBG_UTIL DECLARE_LIST( SfxFrameWindowFactoryArray_Impl, SfxFrameWindowFactory* ) SV_DECL_PTRARR(SfxInitLinkList, Link*, 2, 2) #endif @@ -203,16 +203,15 @@ void SfxApplication::Deinitialize() delete pAppData_Impl->pLabelResMgr; -#ifndef PRODUCT +#ifdef DBG_UTIL DELETEX(pAppData_Impl->pSlotPool); DELETEX(pAppData_Impl->pEventConfig); - DELETEX(pAppData_Impl->pMiscConfig); SfxMacroConfig::Release_Impl(); DELETEX(pAppData_Impl->pFactArr); DELETEX(pAppData_Impl->pInitLinkList); #endif -#ifndef PRODUCT +#ifdef DBG_UTIL DELETEX(pAppData_Impl->pTbxCtrlFac); DELETEX(pAppData_Impl->pStbCtrlFac); DELETEX(pAppData_Impl->pMenuCtrlFac); diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 7a70f6f094..48b976b312 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -62,7 +62,7 @@ #ifndef _SVT_DOC_ADDRESSTEMPLATE_HXX_ #include <svtools/addresstemplate.hxx> #endif -#include <svtools/visitem.hxx> +#include <svl/visitem.hxx> #include <unotools/intlwrapper.hxx> #ifndef _UNOTOOLS_CONFIGMGR_HXX_ @@ -71,10 +71,10 @@ #include <tools/config.hxx> #include <tools/diagnose_ex.h> #include <vcl/msgbox.hxx> -#include <svtools/cancel.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/cancel.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> #include <basic/sbstar.hxx> #include <basic/basmgr.hxx> #include <basic/basrdll.hxx> @@ -84,9 +84,9 @@ #include <vcl/stdtext.hxx> #include <rtl/ustrbuf.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/moduleoptions.hxx> -#include <svtools/regoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/moduleoptions.hxx> +#include <unotools/regoptions.hxx> #include <svtools/helpopt.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <tools/shl.hxx> @@ -1209,7 +1209,7 @@ void SfxApplication::OfaState_Impl(SfxItemSet &rSet) { case SID_ONLINE_REGISTRATION: { - ::svt::RegOptions aOptions; + ::utl::RegOptions aOptions; if ( !aOptions.allowMenu() ) rSet.DisableItem( SID_ONLINE_REGISTRATION ); } diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 81d198412a..b623365c5a 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -43,8 +43,8 @@ #include "sfx2/dllapi.h" #include <basic/sbx.hxx> -#include <svtools/itempool.hxx> -#include <svtools/rectitem.hxx> +#include <svl/itempool.hxx> +#include <svl/rectitem.hxx> #include <tools/debug.hxx> #include <tools/wldcrd.hxx> @@ -60,12 +60,12 @@ #endif #include <basic/sbxcore.hxx> -#include <svtools/ownlist.hxx> -#include <svtools/lckbitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/slstitm.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> +#include <svl/ownlist.hxx> +#include <svl/lckbitem.hxx> +#include <svl/stritem.hxx> +#include <svl/slstitm.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> #include <com/sun/star/task/XStatusIndicatorFactory.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/io/XInputStream.hpp> diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index ae8f0e6abe..605af8e770 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ #ifndef _RCID_H #include <tools/rcid.h> #endif -#include <svtools/viewoptions.hxx> +#include <unotools/viewoptions.hxx> #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/util/XCloseable.hpp> diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 75df926968..a74e9def57 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -53,7 +53,7 @@ #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> -#include <svtools/svdde.hxx> +#include <svl/svdde.hxx> #include <sot/formats.hxx> #define DDELINK_COLD 0 diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index de1c524ec7..4306340dfc 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -47,7 +47,7 @@ #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> namespace sfx2 diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx index 5892f99781..f3565bdb55 100644 --- a/sfx2/source/appl/linksrc.cxx +++ b/sfx2/source/appl/linksrc.cxx @@ -39,7 +39,7 @@ #include <tools/debug.hxx> #include <vcl/timer.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> using namespace ::com::sun::star::uno; diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 41a139d19b..9b7a92fff0 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -50,7 +50,7 @@ #include <tools/debug.hxx> -#include <svtools/svdde.hxx> +#include <svl/svdde.hxx> using namespace ::com::sun::star::uno; diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 786a8849e1..5b073ab83c 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -95,10 +95,10 @@ #include <com/sun/star/view/XViewSettingsSupplier.hpp> #include <com/sun/star/ui/XDockingAreaAcceptor.hpp> #include <svtools/helpopt.hxx> -#include <svtools/historyoptions.hxx> +#include <unotools/historyoptions.hxx> #include <svtools/menuoptions.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/viewoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/viewoptions.hxx> #include <svtools/svtdata.hxx> #include <tools/urlobj.hxx> #include <tools/cachestr.hxx> @@ -2139,7 +2139,7 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) : if ( pEnv ) bIsDebug = sal_True; - SvtMiscOptions().AddListener( LINK( this, SfxHelpTextWindow_Impl, NotifyHdl ) ); + SvtMiscOptions().AddListenerLink( LINK( this, SfxHelpTextWindow_Impl, NotifyHdl ) ); if ( aOnStartupCB.GetHelpId() == 0 ) aOnStartupCB.SetHelpId( HID_HELP_ONSTARTUP_BOX ); @@ -2152,7 +2152,7 @@ SfxHelpTextWindow_Impl::~SfxHelpTextWindow_Impl() sfx2::RemoveFromTaskPaneList( &aToolBox ); bIsInClose = sal_True; - SvtMiscOptions().RemoveListener( LINK( this, SfxHelpTextWindow_Impl, NotifyHdl ) ); + SvtMiscOptions().RemoveListenerLink( LINK( this, SfxHelpTextWindow_Impl, NotifyHdl ) ); delete pSrchDlg; } @@ -3131,11 +3131,11 @@ IMPL_LINK( SfxHelpWindow_Impl, SelectFactoryHdl, SfxHelpIndexWindow_Impl* , pWin String aNewTitle = sTitle; aNewTitle += DEFINE_CONST_UNICODE(" - "); aNewTitle += pIndexWin->GetActiveFactoryTitle(); - + Reference< XTitle > xTitle(xFrame, UNO_QUERY); if (xTitle.is ()) xTitle->setTitle (aNewTitle); - + if ( pWin ) ShowStartPage(); pIndexWin->ClearSearchPage(); diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index c32dc800ad..a36e45f0c5 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,7 +52,7 @@ namespace com { namespace sun { namespace star { namespace text { class XTextRan #include <vcl/lstbox.hxx> #include <vcl/dialog.hxx> #include <svtools/svtreebx.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include "srchdlg.hxx" diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index f9b2777852..7421330cf9 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -56,12 +56,12 @@ #include <unotools/configmgr.hxx> #include <unotools/configitem.hxx> #include <svtools/helpopt.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <tools/urlobj.hxx> #include <unotools/configmgr.hxx> #include <ucbhelper/content.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <rtl/ustring.hxx> #include <osl/process.h> #include <osl/file.hxx> @@ -74,7 +74,7 @@ #define _SVSTDARR_STRINGSDTOR #define _SVSTDARR_ULONGSSORT -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <sfx2/sfxsids.hrc> #include <sfx2/app.hxx> @@ -237,6 +237,8 @@ public: ~SfxHelpOptions_Impl(); BOOL HasId( ULONG nId ) { USHORT nDummy; return m_pIds ? m_pIds->Seek_Entry( nId, &nDummy ) : FALSE; } + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); + virtual void Commit(); }; static Sequence< ::rtl::OUString > GetPropertyNames() @@ -309,6 +311,15 @@ SfxHelpOptions_Impl::~SfxHelpOptions_Impl() delete m_pIds; } + +void SfxHelpOptions_Impl::Notify( const com::sun::star::uno::Sequence< rtl::OUString >& ) +{ +} + +void SfxHelpOptions_Impl::Commit() +{ +} + // class SfxHelp_Impl ---------------------------------------------------- class SfxHelp_Impl diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index b96a5e7d03..73e10e85c4 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,13 +32,13 @@ #include "precompiled_sfx2.hxx" #include <com/sun/star/document/XDocumentProperties.hpp> -#include <svtools/historyoptions.hxx> -#include <svtools/useroptions.hxx> +#include <unotools/historyoptions.hxx> +#include <unotools/useroptions.hxx> #include <tools/urlobj.hxx> #include <framework/menuconfiguration.hxx> -#include <svtools/inethist.hxx> -#include <svtools/stritem.hxx> -#include <svtools/eitem.hxx> +#include <svl/inethist.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> #include <osl/file.hxx> #include <unotools/localfilehelper.hxx> #include <cppuhelper/implbase1.hxx> diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 693af2d0c0..985af75b1f 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -69,6 +69,7 @@ #include <unistd.h> #include <errno.h> #endif +#include <vcl/timer.hxx> #include "sfxresid.hxx" @@ -186,6 +187,23 @@ bool ShutdownIcon::LoadModule( osl::Module **pModule, return true; } +class IdleUnloader : Timer +{ + ::osl::Module *m_pModule; +public: + IdleUnloader (::osl::Module **pModule) : + m_pModule (*pModule) + { + *pModule = NULL; + Start(); + } + virtual void Timeout() + { + delete m_pModule; + delete this; + } +}; + void ShutdownIcon::initSystray() { if (m_bInitialized) @@ -201,15 +219,15 @@ void ShutdownIcon::deInitSystray() { if (!m_bInitialized) return; + if (m_pDeInitSystray) m_pDeInitSystray(); m_bVeto = false; m_pInitSystray = 0; m_pDeInitSystray = 0; - if (m_pPlugin) - delete m_pPlugin; - m_pPlugin = 0; + new IdleUnloader (&m_pPlugin); + delete m_pFileDlg; m_pFileDlg = NULL; m_bInitialized = false; @@ -233,6 +251,7 @@ ShutdownIcon::ShutdownIcon( Reference< XMultiServiceFactory > aSMgr ) : ShutdownIcon::~ShutdownIcon() { deInitSystray(); + new IdleUnloader (&m_pPlugin); } // --------------------------------------------------------------------------- @@ -853,9 +872,11 @@ void ShutdownIcon::SetAutostart( bool bActivate ) ::osl::File::getFileURLFromSystemPath( aShortcut, aShortcutUrl ); ::osl::File::remove( aShortcutUrl ); #ifdef UNX - ShutdownIcon *pIcon = getInstance(); - if( pIcon ) + if (pShutdownIcon) + { + ShutdownIcon *pIcon = getInstance(); pIcon->deInitSystray(); + } #endif } #elif defined OS2 diff --git a/sfx2/source/appl/shutdowniconOs2.cxx b/sfx2/source/appl/shutdowniconOs2.cxx index ae2c80b2a7..d4876acb5d 100644 --- a/sfx2/source/appl/shutdowniconOs2.cxx +++ b/sfx2/source/appl/shutdowniconOs2.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,9 +29,9 @@ ************************************************************************/ -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> -#include <svtools/dynamicmenuoptions.hxx> +#include <unotools/dynamicmenuoptions.hxx> #include "shutdownicon.hxx" #include <comphelper/processfactory.hxx> @@ -71,9 +71,9 @@ void ShutdownIcon::SetAutostartOs2( bool bActivate ) if( bActivate && IsQuickstarterInstalled() ) { // place quickstart shadow in the startup folder - hObject = WinCreateObject( "WPShadow", "dummy", - "OBJECTID=<" QUICKSTART_OBJID "_SHW>;SHADOWID=<" QUICKSTART_OBJID ">;", - "<WP_START>", + hObject = WinCreateObject( "WPShadow", "dummy", + "OBJECTID=<" QUICKSTART_OBJID "_SHW>;SHADOWID=<" QUICKSTART_OBJID ">;", + "<WP_START>", CO_UPDATEIFEXISTS); } else diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm index e9326b4a22..27aa37e05c 100644 --- a/sfx2/source/appl/shutdowniconaqua.mm +++ b/sfx2/source/appl/shutdowniconaqua.mm @@ -31,9 +31,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "svtools/moduleoptions.hxx" -#include "svtools/dynamicmenuoptions.hxx" -#include "svtools/historyoptions.hxx" +#include "unotools/moduleoptions.hxx" +#include "unotools/dynamicmenuoptions.hxx" +#include "unotools/historyoptions.hxx" #include "tools/urlobj.hxx" #include "osl/file.h" #include "comphelper/sequenceashashmap.hxx" diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index 44df4b42be..b9799f5818 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -1,9 +1,9 @@ #ifdef ENABLE_QUICKSTART_APPLET -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> -#include <svtools/dynamicmenuoptions.hxx> +#include <unotools/dynamicmenuoptions.hxx> #include <gtk/gtk.h> #include <glib.h> @@ -158,7 +158,7 @@ static void add_item( GtkMenuShell *pMenuShell, const char *pAsciiURL, GtkWidget *pMenuItem = gtk_image_menu_item_new_with_label( aLabel ); gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( pMenuItem ), pImage ); - g_signal_connect_data( pMenuItem, "activate", pFnCallback, pURL, + g_signal_connect_data( pMenuItem, "activate", pFnCallback, pURL, oustring_delete, GConnectFlags(0)); gtk_menu_shell_append( pMenuShell, pMenuItem ); @@ -376,7 +376,7 @@ void SAL_DLLPUBLIC_EXPORT plugin_init_sys_tray() pVCLResMgr = CREATEVERSIONRESMGR( vcl ); - GdkPixbuf *pPixbuf = ResIdToPixbuf( SV_ICON_ID_OFFICE ); + GdkPixbuf *pPixbuf = ResIdToPixbuf( SV_ICON_ID_OFFICE ); gtk_image_set_from_pixbuf( GTK_IMAGE( pIconImage ), pPixbuf ); g_object_unref( pPixbuf ); diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 53bbc380ad..80df524dbe 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ // necessary to include system headers without warnings #ifdef _MSC_VER -#pragma warning(disable:4668 4917) +#pragma warning(disable:4668 4917) #endif // Support Windows 95 too @@ -45,9 +45,9 @@ // // the systray icon is only available on windows // -#include <svtools/moduleoptions.hxx> -#include <svtools/dynamicmenuoptions.hxx> +#include <unotools/moduleoptions.hxx> +#include <unotools/dynamicmenuoptions.hxx> #include "shutdownicon.hxx" #include "app.hrc" @@ -951,7 +951,7 @@ void ShutdownIcon::EnableAutostartW32( const rtl::OUString &aShortcut ) OUString quickstartExe(aOfficepath); quickstartExe += OUString( RTL_CONSTASCII_USTRINGPARAM( "\\quickstart.exe" ) ); - + CreateShortcut( quickstartExe, aOfficepath, aShortcut, OUString(), OUString() ); } diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 5e2bb23e93..fc64b7243d 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -57,12 +57,12 @@ #include <vcl/toolbox.hxx> #include <tools/rcid.h> #include <toolkit/helper/vclunohelper.hxx> -#include <svtools/itempool.hxx> -#include <svtools/itemiter.hxx> -#include <svtools/whiter.hxx> -#include <svtools/intitem.hxx> +#include <svl/itempool.hxx> +#include <svl/itemiter.hxx> +#include <svl/whiter.hxx> +#include <svl/intitem.hxx> #ifndef _SFXEITEM_HXX //autogen -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #endif #include <com/sun/star/ui/XUIElement.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 9f944e01b4..c305aa862d 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,12 +60,12 @@ #include <rtl/ustring.hxx> #endif #include <rtl/ustrbuf.hxx> -#include <svtools/eitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/lckbitem.hxx> -#include <svtools/inettype.hxx> -#include <svtools/rectitem.hxx> +#include <svl/eitem.hxx> +#include <svl/intitem.hxx> +#include <svl/stritem.hxx> +#include <svl/lckbitem.hxx> +#include <svl/inettype.hxx> +#include <svl/rectitem.hxx> #include <sot/storage.hxx> #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp> @@ -97,8 +97,8 @@ #include <com/sun/star/ucb/XContent.hpp> #include <rtl/ustring.hxx> #include <vos/process.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <comphelper/mediadescriptor.hxx> #include <tools/urlobj.hxx> @@ -109,9 +109,9 @@ using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::document; using namespace ::com::sun::star::beans; using namespace ::vos; -#include <svtools/ctypeitm.hxx> +#include <svl/ctypeitm.hxx> #include <svtools/sfxecode.hxx> -#include <svtools/syslocale.hxx> +#include <unotools/syslocale.hxx> #include "sfxhelp.hxx" #include "sfxbasic.hxx" diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx index f1071be264..bae22d228f 100644 --- a/sfx2/source/bastyp/frmhtml.cxx +++ b/sfx2/source/bastyp/frmhtml.cxx @@ -38,7 +38,7 @@ #define _SVSTDARR_USHORTS #define _SVSTDARR_ULONGS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <sfx2/sfx.hrc> diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index d93f99bda7..5371f0697d 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -32,7 +32,7 @@ #include "precompiled_sfx2.hxx" #ifndef _INETDEF_HXX -#include <svtools/inetdef.hxx> +#include <svl/inetdef.hxx> #endif #include "svtools/htmlkywd.hxx" @@ -40,7 +40,7 @@ #include <rtl/tencinfo.h> #include <unotools/configmgr.hxx> -#include "svtools/urihelper.hxx" +#include "svl/urihelper.hxx" #include <tools/datetime.hxx> #include <sfx2/frmhtmlw.hxx> diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index 06791f4435..97dd4da66f 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -39,7 +39,7 @@ #include <basic/sbx.hxx> #endif -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <tools/time.hxx> // wg. nRescheduleLocks diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index eba014f892..59c25f1910 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -46,9 +46,9 @@ #include <svtools/imaprect.hxx> #ifndef _SVSTDARR_ULONGS_DECL #define _SVSTDARR_ULONGS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #endif -#include <svtools/zforlist.hxx> +#include <svl/zforlist.hxx> #include <rtl/tencinfo.h> #include <tools/tenccvt.hxx> diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx index ec52cacbeb..385260dce6 100644 --- a/sfx2/source/config/evntconf.cxx +++ b/sfx2/source/config/evntconf.cxx @@ -34,14 +34,14 @@ #ifndef _SV_RESARY_HXX #include <tools/resary.hxx> #endif -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <basic/basmgr.hxx> #include <basic/sbmod.hxx> #include <tools/urlobj.hxx> #include <basic/sbx.hxx> #include <sot/storage.hxx> -#include <svtools/securityoptions.hxx> +#include <unotools/securityoptions.hxx> #ifndef _RTL_USTRING_ #include <rtl/ustring.h> diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index f66e60c814..d1fece1831 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -32,13 +32,13 @@ #include "precompiled_sfx2.hxx" #include <hash_map> -#include <svtools/itempool.hxx> -#include <svtools/itemiter.hxx> -#include <svtools/eitem.hxx> -#include <svtools/aeitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/visitem.hxx> +#include <svl/itempool.hxx> +#include <svl/itemiter.hxx> +#include <svl/eitem.hxx> +#include <svl/aeitem.hxx> +#include <svl/intitem.hxx> +#include <svl/stritem.hxx> +#include <svl/visitem.hxx> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp> #include <com/sun/star/frame/XDispatch.hpp> diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index 71bfbbb5c0..a4fe8e70db 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> #ifndef GCC #endif diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index d76697b6c5..84414e164f 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -33,14 +33,14 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/frame/XDispatchRecorderSupplier.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> -#include <svtools/itempool.hxx> -#include <svtools/itemiter.hxx> -#include <svtools/whiter.hxx> -#include <svtools/intitem.hxx> +#include <svl/itempool.hxx> +#include <svl/itemiter.hxx> +#include <svl/whiter.hxx> +#include <svl/intitem.hxx> #ifndef _SFXEITEM_HXX //autogen -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #endif -#include <svtools/undo.hxx> +#include <svl/undo.hxx> #ifndef _WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> #endif @@ -50,7 +50,7 @@ #include <stdlib.h> // wg. bsearch #define _SVSTDARR_ULONGS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <svtools/helpopt.hxx> #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx index 84c9f7feb5..baee95519f 100644 --- a/sfx2/source/control/macrconf.cxx +++ b/sfx2/source/control/macrconf.cxx @@ -35,7 +35,7 @@ #ifndef _SBX_HXX //autogen #include <basic/sbx.hxx> #endif -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <basic/sbmeth.hxx> #include <basic/sbmod.hxx> #ifndef _BASIC_SBUNO_HXX diff --git a/sfx2/source/control/makefile.mk b/sfx2/source/control/makefile.mk index 481952409d..9d936549b5 100644 --- a/sfx2/source/control/makefile.mk +++ b/sfx2/source/control/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -47,6 +47,10 @@ CFLAGS+=-Od .ENDIF .ENDIF +.IF "$(COM)"=="GCC" +CFLAGS+=-O0 +.ENDIF + # --- Files -------------------------------------------------------- SLOFILES = \ diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx index abe1c78620..46e961b71d 100644 --- a/sfx2/source/control/msg.cxx +++ b/sfx2/source/control/msg.cxx @@ -30,8 +30,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include <svtools/itempool.hxx> -#include <svtools/eitem.hxx> +#include <svl/itempool.hxx> +#include <svl/eitem.hxx> #ifndef GCC #endif diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index a7448152ef..7a66ad2a33 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -31,13 +31,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include <sfx2/querystatus.hxx> -#include <svtools/poolitem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/itemset.hxx> +#include <svl/poolitem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/itemset.hxx> #include <svtools/itemdel.hxx> -#include <svtools/visitem.hxx> +#include <svl/visitem.hxx> #include <cppuhelper/weak.hxx> #include <comphelper/processfactory.hxx> #include <vos/mutex.hxx> diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 80de021867..c00aa9397c 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -39,10 +39,10 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatchRecorderSupplier.hpp> -#include <svtools/itemiter.hxx> +#include <svl/itemiter.hxx> #ifndef _ARGS_HXX //autogen -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> #endif #include <svtools/itemdel.hxx> @@ -51,7 +51,7 @@ #ifndef GCC #endif -#include <svtools/smplhint.hxx> +#include <svl/smplhint.hxx> #include <sfx2/request.hxx> #include <sfx2/dispatch.hxx> diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index 4fe13466f4..ee054cf1f6 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -31,13 +31,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include <sfx2/sfxstatuslistener.hxx> -#include <svtools/poolitem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/itemset.hxx> +#include <svl/poolitem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/itemset.hxx> #include <svtools/itemdel.hxx> -#include <svtools/visitem.hxx> +#include <svl/visitem.hxx> #include <cppuhelper/weak.hxx> #include <comphelper/processfactory.hxx> #include <vos/mutex.hxx> diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 403c331256..bfd280c786 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,13 +33,13 @@ #include <com/sun/star/embed/VerbDescriptor.hpp> #include <com/sun/star/embed/VerbAttributes.hpp> #include <basic/sbstar.hxx> -#include <svtools/itempool.hxx> -#include <svtools/undo.hxx> +#include <svl/itempool.hxx> +#include <svl/undo.hxx> #include <svtools/itemdel.hxx> #include <svtools/asynclink.hxx> #include <basic/sbx.hxx> -#include <svtools/undoopt.hxx> +#include <unotools/undoopt.hxx> #ifndef GCC #endif @@ -659,7 +659,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) */ { -#ifndef PRODUCT +#ifdef DBG_UTIL const SfxInterface *p_IF = GetInterface(); if ( !p_IF ) return; @@ -702,7 +702,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) */ { -#ifndef PRODUCT +#ifdef DBG_UTIL const SfxInterface *p_IF = GetInterface(); if ( !p_IF ) return; diff --git a/sfx2/source/control/srchitem.cxx b/sfx2/source/control/srchitem.cxx index 1af26b9c38..22b1342244 100644 --- a/sfx2/source/control/srchitem.cxx +++ b/sfx2/source/control/srchitem.cxx @@ -36,7 +36,7 @@ #ifndef __SBX_SBXVARIABLE_HXX #include <basic/sbxvar.hxx> #endif -#include <svtools/searchopt.hxx> +#include <unotools/searchopt.hxx> #include <com/sun/star/util/XReplaceable.hpp> #include <com/sun/star/util/XSearchable.hpp> #include <com/sun/star/util/XSearchDescriptor.hpp> @@ -44,7 +44,7 @@ #include <com/sun/star/util/XReplaceDescriptor.hpp> #include <com/sun/star/lang/Locale.hpp> -#include <svtools/memberid.hrc> +#include <svl/memberid.hrc> #include <i18npool/mslangid.hxx> #ifndef GCC @@ -359,6 +359,9 @@ void SvxSearchItem::Notify( const Sequence< ::rtl::OUString > & ) SetTransliterationFlags( SvtSearchOptions().GetTransliterationFlags() ); } +void SvxSearchItem::Commit() +{ +} void SvxSearchItem::SetMatchFullHalfWidthForms( sal_Bool bVal ) { diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index 795fb5e9be..39c34ed204 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -46,10 +46,10 @@ #include <com/sun/star/frame/FrameAction.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <cppuhelper/weak.hxx> -#include <svtools/eitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/visitem.hxx> +#include <svl/eitem.hxx> +#include <svl/intitem.hxx> +#include <svl/stritem.hxx> +#include <svl/visitem.hxx> #include <comphelper/processfactory.hxx> #ifndef GCC diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 11e9fd3d77..3b8fd4cf5c 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -32,13 +32,13 @@ #include "precompiled_sfx2.hxx" #include <tools/debug.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/itemset.hxx> -#include <svtools/visitem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/itemset.hxx> +#include <svl/visitem.hxx> #include <svtools/javacontext.hxx> -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> #include <tools/urlobj.hxx> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XController.hpp> diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index 5ed5569ea3..f7f3f7b14e 100644 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -38,7 +38,7 @@ #include "alienwarn.hrc" #include "dialog.hrc" #include <vcl/msgbox.hxx> -#include <svtools/saveopt.hxx> +#include <unotools/saveopt.hxx> // class SfxAlienWarningDialog ------------------------------------------- diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index d93a4884c1..432e2ed173 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -37,8 +37,8 @@ #include <vcl/fixed.hxx> #include <vcl/help.hxx> #include <vcl/msgbox.hxx> -#include <svtools/eitem.hxx> -#include <svtools/viewoptions.hxx> +#include <svl/eitem.hxx> +#include <unotools/viewoptions.hxx> #include <svtools/fixedhyper.hxx> #include <svtools/controldims.hrc> diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc index e41fbc0746..1d0e4c9066 100644 --- a/sfx2/source/dialog/dialog.hrc +++ b/sfx2/source/dialog/dialog.hrc @@ -109,6 +109,8 @@ #define STR_PDF_EXPORT_SEND ( RC_DIALOG_BEGIN + 120 ) #define STR_RECHECK_DOCUMENT ( RC_DIALOG_BEGIN + 121 ) #define IMG_INFO ( RC_DIALOG_BEGIN + 122 ) +#define RID_EDIT_DURATIONS ( RC_DIALOG_BEGIN + 123 ) +#define SFX_PB_EDIT ( RC_DIALOG_BEGIN + 124 ) #endif // #ifndef _SFX_DIALOG_HRC diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index b448392766..e5b555d977 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,13 +32,13 @@ #include "precompiled_sfx2.hxx" #include <tools/urlobj.hxx> #include <vcl/msgbox.hxx> -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <vcl/svapp.hxx> #include <sfx2/filedlghelper.hxx> #include <unotools/localedatawrapper.hxx> #include <comphelper/processfactory.hxx> -#include <svtools/urihelper.hxx> -#include <svtools/useroptions.hxx> +#include <svl/urihelper.hxx> +#include <unotools/useroptions.hxx> #include <svtools/imagemgr.hxx> #include <tools/datetime.hxx> @@ -49,12 +49,15 @@ #include <com/sun/star/security/DocumentSignatureInformation.hpp> #include <com/sun/star/security/XDocumentDigitalSignatures.hpp> #include <unotools/localedatawrapper.hxx> -#include <svtools/syslocale.hxx> +#include <unotools/syslocale.hxx> #include <rtl/math.hxx> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/XPropertyContainer.hpp> +#include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/util/Date.hpp> +#include <com/sun/star/util/Time.hpp> +#include <com/sun/star/util/Duration.hpp> #include <com/sun/star/document/XDocumentProperties.hpp> #include <vcl/timer.hxx> @@ -73,6 +76,8 @@ #include <sfx2/sfx.hrc> #include "dinfdlg.hrc" #include "sfxlocal.hrc" +#include <dialog.hrc> +#include <vcl/help.hxx> #include <algorithm> @@ -1577,7 +1582,168 @@ CustomPropertiesYesNoButton::CustomPropertiesYesNoButton( Window* pParent, const m_aYesButton.SetBackground( aWall ); m_aNoButton.SetBackground( aWall ); } +class DurationDialog_Impl : public ModalDialog +{ + FixedLine aDurationFL; + + OKButton aOKPB; + CancelButton aCancelPB; + HelpButton aHelpPB; + + CheckBox aNegativeCB; + FixedText aYearFT; + NumericField aYearNF; + FixedText aMonthFT; + NumericField aMonthNF; + FixedText aDayFT; + NumericField aDayNF; + FixedText aHourFT; + NumericField aHourNF; + FixedText aMinuteFT; + NumericField aMinuteNF; + FixedText aSecondFT; + NumericField aSecondNF; + FixedText aHSecondFT; + NumericField aHSecondNF; + +public: + + DurationDialog_Impl( Window* pParent, const util::Duration& rDuration ); + ~DurationDialog_Impl(); + + util::Duration GetDuration() const; +}; +/*-- 20.11.2009 15:40:46--------------------------------------------------- + + -----------------------------------------------------------------------*/ +DurationDialog_Impl::DurationDialog_Impl( Window* pParent, const util::Duration& rDuration ) : + ModalDialog( pParent, SfxResId( RID_EDIT_DURATIONS ) ), + aDurationFL(this, SfxResId( FL_DURATION )), + aOKPB( this, SfxResId( PB_OK )), + aCancelPB( this, SfxResId( PB_CANCEL )), + aHelpPB( this, SfxResId( PB_HELP )), + aNegativeCB(this, SfxResId( CB_NEGATIVE )), + aYearFT( this, SfxResId( FT_YEAR )), + aYearNF( this, SfxResId( ED_YEAR )), + aMonthFT( this, SfxResId( FT_MONTH )), + aMonthNF( this, SfxResId( ED_MONTH )), + aDayFT( this, SfxResId( FT_DAY )), + aDayNF( this, SfxResId( ED_DAY )), + aHourFT( this, SfxResId( FT_HOUR )), + aHourNF( this, SfxResId( ED_HOUR )), + aMinuteFT( this, SfxResId( FT_MINUTE )), + aMinuteNF( this, SfxResId( ED_MINUTE )), + aSecondFT( this, SfxResId( FT_SECOND )), + aSecondNF( this, SfxResId( ED_SECOND )), + aHSecondFT( this, SfxResId( FT_HSECOND )), + aHSecondNF( this, SfxResId( ED_HSECOND )) +{ + FreeResource(); + aNegativeCB.Check(rDuration.Negative); + aYearNF.SetValue(rDuration.Years); + aMonthNF.SetValue(rDuration.Months ); + aDayNF.SetValue(rDuration.Days ); + aHourNF.SetValue(rDuration.Hours ); + aMinuteNF.SetValue(rDuration.Minutes); + aSecondNF.SetValue(rDuration.Seconds); + aHSecondNF.SetValue(rDuration.HundredthSeconds); +} +/*-- 20.11.2009 16:08:55--------------------------------------------------- + + -----------------------------------------------------------------------*/ +DurationDialog_Impl::~DurationDialog_Impl() +{ +} +/*-- 20.11.2009 15:41:47--------------------------------------------------- + + -----------------------------------------------------------------------*/ +util::Duration DurationDialog_Impl::GetDuration() const +{ + util::Duration aRet; + aRet.Negative = aNegativeCB.IsChecked(); + aRet.Years = aYearNF.GetValue(); + aRet.Months = aMonthNF.GetValue( ); + aRet.Days = aDayNF.GetValue( ); + aRet.Hours = aHourNF.GetValue( ); + aRet.Minutes = aMinuteNF.GetValue(); + aRet.Seconds = aSecondNF.GetValue(); + aRet.HundredthSeconds = aHSecondNF.GetValue(); + return aRet; +} + +/*-- 20.11.2009 15:30:58--------------------------------------------------- + + -----------------------------------------------------------------------*/ +CustomPropertiesDurationField::CustomPropertiesDurationField( Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) : + Edit( pParent, rResId ), m_pLine( pLine ) + +{ + SetDuration( util::Duration(false, 0, 0, 0, 0, 0, 0, 0) ); +} +/*-- 23.11.2009 08:46:02--------------------------------------------------- + + -----------------------------------------------------------------------*/ +CustomPropertiesDurationField::~CustomPropertiesDurationField() +{ +} +/*-- 23.11.2009 09:23:35--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void CustomPropertiesDurationField::RequestHelp( const HelpEvent& rHEvt ) +{ + if( rHEvt.GetMode() & HELPMODE_QUICK ) + { + Size aSize( GetSizePixel() ); + Rectangle aItemRect( rHEvt.GetMousePosPixel(), aSize ); + if(Help::IsBalloonHelpEnabled()) + Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), GetText() ); + else + Help::ShowQuickHelp( this, aItemRect, GetText(), + QUICKHELP_LEFT|QUICKHELP_VCENTER ); + } +} +/*-- 20.11.2009 15:30:58--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void CustomPropertiesDurationField::SetDuration( const util::Duration& rDuration ) +{ + m_aDuration = rDuration; + String sText(rDuration.Negative ? '-' : '+'); + sText += m_pLine->m_sDurationFormat; + sText.SearchAndReplace(String::CreateFromAscii( "%1"), String::CreateFromInt32( rDuration.Years ) ); + sText.SearchAndReplace(String::CreateFromAscii( "%2"), String::CreateFromInt32( rDuration.Months ) ); + sText.SearchAndReplace(String::CreateFromAscii( "%3"), String::CreateFromInt32( rDuration.Days ) ); + sText.SearchAndReplace(String::CreateFromAscii( "%4"), String::CreateFromInt32( rDuration.Hours ) ); + sText.SearchAndReplace(String::CreateFromAscii( "%5"), String::CreateFromInt32( rDuration.Minutes) ); + sText.SearchAndReplace(String::CreateFromAscii( "%6"), String::CreateFromInt32( rDuration.Seconds) ); + SetText( sText ); +} +/*-- 23.11.2009 08:51:15--------------------------------------------------- + + -----------------------------------------------------------------------*/ +CustomPropertiesEditButton::CustomPropertiesEditButton( Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) : + PushButton( pParent, rResId ), m_pLine( pLine ) +{ + SetClickHdl( LINK( this, CustomPropertiesEditButton, ClickHdl )); +} +/*-- 23.11.2009 08:51:15--------------------------------------------------- + -----------------------------------------------------------------------*/ +CustomPropertiesEditButton::~CustomPropertiesEditButton() +{ +} +/*-- 23.11.2009 08:47:37--------------------------------------------------- + + -----------------------------------------------------------------------*/ +IMPL_LINK( CustomPropertiesEditButton, ClickHdl, PushButton*, EMPTYARG ) +{ + DurationDialog_Impl* pDurationDlg = new DurationDialog_Impl( this, m_pLine->m_aDurationField.GetDuration() ); + if( RET_OK == pDurationDlg->Execute() ) + m_pLine->m_aDurationField.SetDuration( pDurationDlg->GetDuration() ); + delete pDurationDlg; + return 1; +} +//-------------------------------------------------------------------------- void CustomPropertiesYesNoButton::Resize() { const long nWidth = GetSizePixel().Width(); @@ -1598,12 +1764,20 @@ CustomPropertyLine::CustomPropertyLine( Window* pParent ) : m_aNameBox ( pParent, SfxResId( SFX_CB_PROPERTY_NAME ) ), m_aTypeBox ( pParent, SfxResId( SFX_LB_PROPERTY_TYPE ), this ), m_aValueEdit ( pParent, SfxResId( SFX_ED_PROPERTY_VALUE ), this ), + m_aDateField ( pParent, SfxResId( SFX_FLD_DATE), this), + m_aTimeField ( pParent, SfxResId( SFX_FLD_TIME), this), + m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT )), + m_aDurationField( pParent, SfxResId( SFX_FLD_DURATION), this), + m_aEditButton( pParent, SfxResId( SFX_PB_EDIT ), this), m_aYesNoButton ( pParent, SfxResId( SFX_WIN_PROPERTY_YESNO ) ), m_aRemoveButton ( pParent, SfxResId( SFX_PB_PROPERTY_REMOVE ), this ), m_bIsRemoved ( false ), m_bTypeLostFocus( false ) { + m_aTimeField.SetExtFormat( EXTTIMEF_24H_LONG ); + m_aDateField.SetExtDateFormat( XTDATEF_SYSTEM_SHORT_YYYY ); + m_aRemoveButton.SetModeImage( SfxResId( SFX_IMG_PROPERTY_REMOVE ), BMP_COLOR_NORMAL ); m_aRemoveButton.SetModeImage( SfxResId( SFX_IMG_PROPERTY_REMOVE_HC ), BMP_COLOR_HIGHCONTRAST ); } @@ -1615,6 +1789,10 @@ void CustomPropertyLine::SetRemoved() m_aNameBox.Hide(); m_aTypeBox.Hide(); m_aValueEdit.Hide(); + m_aDateField.Hide(); + m_aTimeField.Hide(); + m_aDurationField.Hide(); + m_aEditButton.Hide(); m_aYesNoButton.Hide(); m_aRemoveButton.Hide(); } @@ -1627,6 +1805,10 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR m_aNameBox ( this, SfxResId( SFX_CB_PROPERTY_NAME ) ), m_aTypeBox ( this, SfxResId( SFX_LB_PROPERTY_TYPE ) ), m_aValueEdit ( this, SfxResId( SFX_ED_PROPERTY_VALUE ) ), + m_aDateField ( this, SfxResId( SFX_FLD_DATE) ), + m_aTimeField ( this, SfxResId( SFX_FLD_TIME) ), + m_aDurationField( this, SfxResId( SFX_FLD_DURATION) ), + m_aEditButton( this, SfxResId( SFX_PB_EDIT )), m_aYesNoButton ( this, SfxResId( SFX_WIN_PROPERTY_YESNO ) ), m_aRemoveButton ( this, SfxResId( SFX_PB_PROPERTY_REMOVE ) ), m_nScrollPos (0), @@ -1651,9 +1833,23 @@ IMPL_LINK( CustomPropertiesWindow, TypeHdl, CustomPropertiesTypeBox*, pBox ) { sal_Int64 nType = sal_Int64( (long)pBox->GetEntryData( pBox->GetSelectEntryPos() ) ); CustomPropertyLine* pLine = pBox->GetLine(); - BOOL bBooleanType = ( CUSTOM_TYPE_BOOLEAN == nType ); - pLine->m_aValueEdit.Show( !bBooleanType ); - pLine->m_aYesNoButton.Show( bBooleanType ); + pLine->m_aValueEdit.Show( (CUSTOM_TYPE_TEXT == nType) || (CUSTOM_TYPE_NUMBER == nType) ); + pLine->m_aDateField.Show( (CUSTOM_TYPE_DATE == nType) || (CUSTOM_TYPE_DATETIME == nType) ); + pLine->m_aTimeField.Show( CUSTOM_TYPE_DATETIME == nType ); + pLine->m_aDurationField.Show( CUSTOM_TYPE_DURATION == nType ); + pLine->m_aEditButton.Show( CUSTOM_TYPE_DURATION == nType ); + pLine->m_aYesNoButton.Show( CUSTOM_TYPE_BOOLEAN == nType ); + //adjust positions of date and time controls + if( nType == CUSTOM_TYPE_DATE ) + { + pLine->m_aDateField.SetPosSizePixel(pLine->m_aValueEdit.GetPosPixel(), pLine->m_aValueEdit.GetSizePixel()); + } + else if( nType == CUSTOM_TYPE_DATETIME) + { + pLine->m_aDateField.SetPosSizePixel( pLine->m_aDatePos, pLine->m_aDateTimeSize ); + pLine->m_aTimeField.SetPosSizePixel(pLine->m_aTimePos, pLine->m_aDateTimeSize ); + } + return 0; } @@ -1675,6 +1871,8 @@ IMPL_LINK( CustomPropertiesWindow, RemoveHdl, CustomPropertiesRemoveButton*, pBu continue; Window* pWindows[] = { &pLine->m_aNameBox, &pLine->m_aTypeBox, &pLine->m_aValueEdit, + &pLine->m_aDateField, &pLine->m_aTimeField, + &pLine->m_aDurationField, &pLine->m_aEditButton, &pLine->m_aYesNoButton, &pLine->m_aRemoveButton, NULL }; Window** pCurrent = pWindows; while ( *pCurrent ) @@ -1784,6 +1982,10 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa m_aNameBox.Hide(); m_aTypeBox.Hide(); m_aValueEdit.Hide(); + m_aDateField.Hide(); + m_aTimeField.Hide(); + m_aDurationField.Hide(); + m_aEditButton.Hide(); m_aYesNoButton.Hide(); m_aRemoveButton.Hide(); @@ -1815,11 +2017,23 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa if ( *pCurrent == &m_aValueEdit ) { + Point aDurationPos( aPos ); + m_aDurationField.SetPosPixel( aDurationPos ); + Size aDurationSize(aSize); + aDurationSize.Width() -= (m_aEditButton.GetSizePixel().Width() + 3 ); + m_aDurationField.SetSizePixel(aDurationSize); + aDurationPos.X() = aPos.X() - m_aEditButton.GetSizePixel().Width() + aSize.Width(); + m_aEditButton.SetPosPixel(aDurationPos); aSize = m_aYesNoButton.GetSizePixel(); aPos = m_aYesNoButton.GetPosPixel(); aSize.Width() = nWidth; aPos.X() = aRect.getX() + ( nOffset / 2 ); m_aYesNoButton.SetPosSizePixel( aPos, aSize ); + aSize.Width() /= 2; + aSize.Width() -= 2; + m_aDateField.SetPosSizePixel( aPos, aSize ); + aPos.X() += aSize.Width() + 4; + m_aTimeField.SetPosSizePixel( aPos, aSize ); } pCurrent++; @@ -1849,13 +2063,19 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) pNewLine->m_aTypeBox.SetSelectHdl( LINK( this, CustomPropertiesWindow, TypeHdl ) ); pNewLine->m_aRemoveButton.SetClickHdl( LINK( this, CustomPropertiesWindow, RemoveHdl ) ); pNewLine->m_aValueEdit.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, EditLoseFocusHdl ) ); + //add lose focus handlers of date/time fields + pNewLine->m_aTypeBox.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, BoxLoseFocusHdl ) ); long nPos = GetVisibleLineCount() * GetLineHeight(); m_aCustomPropertiesLines.push_back( pNewLine ); Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit, + &m_aDateField, &m_aTimeField, + &m_aDurationField, &m_aEditButton, &m_aYesNoButton, &m_aRemoveButton, NULL }; Window* pNewWindows[] = { &pNewLine->m_aNameBox, &pNewLine->m_aTypeBox, &pNewLine->m_aValueEdit, + &pNewLine->m_aDateField, &pNewLine->m_aTimeField, + &pNewLine->m_aDurationField, &pNewLine->m_aEditButton, &pNewLine->m_aYesNoButton, &pNewLine->m_aRemoveButton, NULL }; Window** pCurrent = pWindows; Window** pNewCurrent = pNewWindows; @@ -1870,11 +2090,17 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) pCurrent++; pNewCurrent++; } + // + pNewLine->m_aDatePos = pNewLine->m_aDateField.GetPosPixel(); + pNewLine->m_aTimePos = pNewLine->m_aTimeField.GetPosPixel(); + pNewLine->m_aDateTimeSize = pNewLine->m_aDateField.GetSizePixel(); double nTmpValue = 0; bool bTmpValue = false; ::rtl::OUString sTmpValue; - util::DateTime aTmpDate; + util::DateTime aTmpDateTime; + util::Date aTmpDate; + util::Duration aTmpDuration; SvtSysLocale aSysLocale; const LocaleDataWrapper& rLocaleWrapper = aSysLocale.GetLocaleData(); pNewLine->m_aNameBox.SetText( sName ); @@ -1885,6 +2111,7 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) { sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM ); m_aNumberFormatter.GetInputLineString( nTmpValue, nIndex, sValue ); + pNewLine->m_aValueEdit.SetText( sValue ); nType = CUSTOM_TYPE_NUMBER; } else if ( rAny >>= bTmpValue ) @@ -1894,50 +2121,26 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) } else if ( rAny >>= sTmpValue ) { - sValue = String( sTmpValue ); + pNewLine->m_aValueEdit.SetText( sTmpValue ); nType = CUSTOM_TYPE_TEXT; } else if ( rAny >>= aTmpDate ) { - DateFormat eFormat = rLocaleWrapper.getDateFormat(); - sal_Unicode cDateSep = rLocaleWrapper.getDateSep().GetChar(0); - switch ( eFormat ) - { - case MDY : - { - sValue = String::CreateFromInt32( aTmpDate.Month ); - sValue += cDateSep; - sValue += String::CreateFromInt32( aTmpDate.Day ); - sValue += cDateSep; - if ( aTmpDate.Year < 10 ) - sValue += '0'; - sValue += String::CreateFromInt32( aTmpDate.Year ); - break; - } - case DMY : - { - sValue = String::CreateFromInt32( aTmpDate.Day ); - sValue += cDateSep; - sValue += String::CreateFromInt32( aTmpDate.Month ); - sValue += cDateSep; - if ( aTmpDate.Year < 10 ) - sValue += '0'; - sValue += String::CreateFromInt32( aTmpDate.Year ); - break; - } - case YMD : - { - if ( aTmpDate.Year < 10 ) - sValue += '0'; - sValue += String::CreateFromInt32( aTmpDate.Year ); - sValue += cDateSep; - sValue += String::CreateFromInt32( aTmpDate.Month ); - sValue += cDateSep; - sValue += String::CreateFromInt32( aTmpDate.Day ); - break; - } - } nType = CUSTOM_TYPE_DATE; + pNewLine->m_aDateField.SetDate( Date( aTmpDate.Day, aTmpDate.Month, aTmpDate.Year ) ); + + } + else if ( rAny >>= aTmpDuration ) + { + nType = CUSTOM_TYPE_DURATION; + pNewLine->m_aDurationField.SetDuration( aTmpDuration ); + } + else if ( rAny >>= aTmpDateTime ) + { + pNewLine->m_aDateField.SetDate( Date( aTmpDateTime.Day, aTmpDateTime.Month, aTmpDateTime.Year ) ); + pNewLine->m_aTimeField.SetTime( Time( aTmpDateTime.Hours, aTmpDateTime.Minutes, aTmpDateTime.Seconds, aTmpDateTime.HundredthSeconds ) ); + + nType = CUSTOM_TYPE_DATETIME; } if ( nType != CUSTOM_TYPE_UNKNOWN ) @@ -1949,8 +2152,6 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) else pNewLine->m_aYesNoButton.CheckNo(); } - else - pNewLine->m_aValueEdit.SetText( sValue ); pNewLine->m_aTypeBox.SelectEntryPos( m_aTypeBox.GetEntryPos( (void*)nType ) ); } @@ -2001,7 +2202,7 @@ void CustomPropertiesWindow::DoScroll( sal_Int32 nNewPos ) if ( pLine->m_bIsRemoved ) continue; - Window* pWindows[] = { &pLine->m_aNameBox, &pLine->m_aTypeBox, &pLine->m_aValueEdit, + Window* pWindows[] = { &pLine->m_aNameBox, &pLine->m_aTypeBox, &pLine->m_aValueEdit, &pLine->m_aDurationField, &pLine->m_aYesNoButton, &pLine->m_aRemoveButton, NULL }; Window** pCurrent = pWindows; while ( *pCurrent ) @@ -2065,52 +2266,24 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c bool bValue = pLine->m_aYesNoButton.IsYesChecked(); aPropertiesSeq[i].Value <<= makeAny( bValue ); } + else if ( CUSTOM_TYPE_DATETIME == nType ) + { + Date aTmpDate = pLine->m_aDateField.GetDate(); + Time aTmpTime = pLine->m_aTimeField.GetTime(); + util::DateTime aDateTime(aTmpTime.Get100Sec(), aTmpTime.GetSec(), aTmpTime.GetMin(), aTmpTime.GetHour(), + aTmpDate.GetDay(), aTmpDate.GetMonth(), aTmpDate.GetYear() ); + aPropertiesSeq[i].Value <<= aDateTime; + } + else if ( CUSTOM_TYPE_DURATION == nType ) + { + aPropertiesSeq[i].Value <<= pLine->m_aDurationField.GetDuration(); + } else if ( CUSTOM_TYPE_DATE == nType ) { - const LocaleDataWrapper& rLocaleWrapper = SvtSysLocale().GetLocaleData(); - DateFormat eFormat = rLocaleWrapper.getDateFormat(); - sal_Unicode cDateSep = rLocaleWrapper.getDateSep().GetChar(0); - String sValue( pLine->m_aValueEdit.GetText() ); - if ( sValue.GetTokenCount( cDateSep ) == 3 ) - { - xub_StrLen nTokenDay = STRING_NOTFOUND; - xub_StrLen nTokenMonth = STRING_NOTFOUND; - xub_StrLen nTokenYear = STRING_NOTFOUND; - - switch ( eFormat ) - { - case MDY : - { - nTokenDay = 1; - nTokenMonth = 0; - nTokenYear = 2; - break; - } - case DMY : - { - nTokenDay = 0; - nTokenMonth = 1; - nTokenYear = 2; - break; - } - case YMD : - { - nTokenDay = 2; - nTokenMonth = 1; - nTokenYear = 0; - break; - } - } - - if ( nTokenDay != STRING_NOTFOUND ) - { - util::DateTime aDateTime( 0, 0, 0, 0, - sal_uInt16( sValue.GetToken( nTokenDay, cDateSep ).ToInt32() ), - sal_uInt16( sValue.GetToken( nTokenMonth, cDateSep ).ToInt32() ), - sal_uInt16( sValue.GetToken( nTokenYear, cDateSep ).ToInt32() ) ); - aPropertiesSeq[i].Value <<= makeAny( aDateTime ); - } - } + Date aTmpDate = pLine->m_aDateField.GetDate(); + util::Date aDate(aTmpDate.GetDay(), aTmpDate.GetMonth(), aTmpDate.GetYear()); + aPropertiesSeq[i].Value <<= aDate; + } else { diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc index ba2b30ecc3..6f3be56b59 100644 --- a/sfx2/source/dialog/dinfdlg.hrc +++ b/sfx2/source/dialog/dinfdlg.hrc @@ -39,6 +39,8 @@ #define CUSTOM_TYPE_NUMBER 2 #define CUSTOM_TYPE_DATE 3 #define CUSTOM_TYPE_BOOLEAN 4 +#define CUSTOM_TYPE_DURATION 5 +#define CUSTOM_TYPE_DATETIME 6 // 4 TP_DOCINFORELOAD #define PAGE_WIDTH 260 @@ -154,5 +156,25 @@ #define STR_HEADER_VALUE 92 #define STR_HEADER_ACTION 93 +#define PB_OK 100 +#define PB_CANCEL 101 +#define PB_HELP 102 +#define CB_NEGATIVE 103 +#define FT_YEAR 104 +#define ED_YEAR 105 +#define FT_MONTH 106 +#define ED_MONTH 107 +#define FT_DAY 108 +#define ED_DAY 109 +#define FT_HOUR 110 +#define ED_HOUR 111 +#define FT_MINUTE 112 +#define ED_MINUTE 113 +#define FT_SECOND 114 +#define ED_SECOND 115 +#define FT_HSECOND 116 +#define ED_HSECOND 117 +#define FL_DURATION 118 + #endif diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src index d5c57d56ab..429124b9bf 100644 --- a/sfx2/source/dialog/dinfdlg.src +++ b/sfx2/source/dialog/dinfdlg.src @@ -34,6 +34,7 @@ #include "helpid.hrc" #include "sfxlocal.hrc" #include "dinfdlg.hrc" +#include <dialog.hrc> // TP_DOCINFODESC -------------------------------------------------------- String STR_SFX_NEWOFFICEDOC @@ -579,14 +580,16 @@ ComboBox SFX_CB_PROPERTY_NAME ListBox SFX_LB_PROPERTY_TYPE { Pos = MAP_APPFONT ( 63 , 2 ) ; - Size = MAP_APPFONT ( 60 , 50 ) ; + Size = MAP_APPFONT ( 60 , 80 ) ; DropDown = TRUE; Border = TRUE; CurPos = 0; StringList [ en-US ] = { < "Text" ; CUSTOM_TYPE_TEXT ; > ; + < "DateTime" ; CUSTOM_TYPE_DATETIME ; > ; < "Date" ; CUSTOM_TYPE_DATE ; > ; + < "Duration" ; CUSTOM_TYPE_DURATION ; > ; < "Number" ; CUSTOM_TYPE_NUMBER ; > ; < "Yes or no" ; CUSTOM_TYPE_BOOLEAN ; > ; }; @@ -599,6 +602,44 @@ Edit SFX_ED_PROPERTY_VALUE TabStop = TRUE ; Left = TRUE ; }; +DateField SFX_FLD_DATE +{ + Border = TRUE ; + Pos = MAP_APPFONT ( 127 , 2 ) ; + Size = MAP_APPFONT ( 29 , RSC_CD_TEXTBOX_HEIGHT ) ; + TabStop = TRUE ; + Left = TRUE ; + Spin = TRUE; +}; +TimeField SFX_FLD_TIME +{ + Border = TRUE ; + Pos = MAP_APPFONT ( 159 , 2 ) ; + Size = MAP_APPFONT ( 29 , RSC_CD_TEXTBOX_HEIGHT ) ; + TabStop = TRUE ; + Left = TRUE ; + Spin = TRUE; +}; + +Edit SFX_FLD_DURATION +{ + Readonly = TRUE; + Border = TRUE ; + Pos = MAP_APPFONT ( 159 , 2 ) ; + Size = MAP_APPFONT ( 61 - RSC_CD_TEXTBOX_HEIGHT - 2, RSC_CD_TEXTBOX_HEIGHT ) ; + TabStop = TRUE ; +}; +PushButton SFX_PB_EDIT +{ + Pos = MAP_APPFONT ( 159 , 2 ) ; + Size = MAP_APPFONT ( RSC_CD_TEXTBOX_HEIGHT , RSC_CD_TEXTBOX_HEIGHT ) ; + Text = "..."; +}; +String SFX_ST_DURATION_FORMAT +{ + Text [en-US] = " Y: %1 M: %2 D: %3 H: %4 M: %5 S: %6"; +}; + Control SFX_WIN_PROPERTY_YESNO { HelpId = HID_CTRL_CUSTOMPROPS_YES_NO; @@ -684,3 +725,182 @@ TabDialog SID_DOCINFO }; }; +ModalDialog RID_EDIT_DURATIONS +{ + HelpId = HID_DLG_CUSTOMPROPS_DURATION; + OutputSize = TRUE ; + Size = MAP_APPFONT ( 176 , 140 ) ; + Text [ en-US ] = "Edit Duration" ; + Moveable = TRUE ; + OKButton PB_OK + { + Pos = MAP_APPFONT ( 120 , 7 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + DefButton = TRUE; + }; + CancelButton PB_CANCEL + { + Pos = MAP_APPFONT ( 120 , 24 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + }; + HelpButton PB_HELP + { + Pos = MAP_APPFONT ( 120 , 48 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + }; + FixedLine FL_DURATION + { + Pos = MAP_APPFONT ( 6 , 8 ) ; + Size = MAP_APPFONT ( 108 , 8 ) ; + Text [ en-US ] = "Duration" ; + }; + CheckBox CB_NEGATIVE + { + Pos = MAP_APPFONT ( 6 , 21 ) ; + Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ; + Text [ en-US ] = "~Negative" ; + }; + FixedText FT_YEAR + { + Pos = MAP_APPFONT ( 6 , 38 ) ; + Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ; + Left = TRUE ; + Text [ en-US ] = "~Years" ; + }; + NumericField ED_YEAR + { + Border = TRUE ; + Pos = MAP_APPFONT ( 70 , 36 ) ; + Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 0 ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + Value = 0 ; + }; + FixedText FT_MONTH + { + Pos = MAP_APPFONT ( 6 , 52 ) ; + Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ; + Left = TRUE ; + Text [ en-US ] = "~Months" ; + }; + NumericField ED_MONTH + { + Border = TRUE ; + Pos = MAP_APPFONT ( 70 , 50 ) ; + Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 0 ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + Value = 0 ; + }; + FixedText FT_DAY + { + Pos = MAP_APPFONT ( 6 , 66 ) ; + Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ; + Left = TRUE ; + Text [ en-US ] = "~Days" ; + }; + NumericField ED_DAY + { + Border = TRUE ; + Pos = MAP_APPFONT ( 70 , 64 ) ; + Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 0 ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + Value = 0 ; + }; + FixedText FT_HOUR + { + Pos = MAP_APPFONT ( 6 , 80 ) ; + Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ; + Left = TRUE ; + Text [ en-US ] = "H~ours" ; + }; + NumericField ED_HOUR + { + Border = TRUE ; + Pos = MAP_APPFONT ( 70 , 78 ) ; + Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 0 ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + Value = 0 ; + }; + FixedText FT_MINUTE + { + Pos = MAP_APPFONT ( 6 , 94 ) ; + Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ; + Left = TRUE ; + Text [ en-US ] = "Min~utes" ; + }; + NumericField ED_MINUTE + { + Border = TRUE ; + Pos = MAP_APPFONT ( 70, 92) ; + Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 0 ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + Value = 0 ; + }; + FixedText FT_SECOND + { + Pos = MAP_APPFONT ( 6, 108 ) ; + Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ; + Left = TRUE ; + Text [ en-US ] = "~Seconds" ; + }; + NumericField ED_SECOND + { + Border = TRUE ; + Pos = MAP_APPFONT ( 70 , 106 ) ; + Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 0 ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + Value = 0 ; + }; + FixedText FT_HSECOND + { + Pos = MAP_APPFONT ( 6 , 122 ) ; + Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ; + Left = TRUE ; + Text [ en-US ] = "1/100 se~conds" ; + }; + NumericField ED_HSECOND + { + Border = TRUE ; + Pos = MAP_APPFONT ( 70 , 120 ) ; + Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 0 ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + Value = 0 ; + }; + + + +}; diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 89aaf2a240..987f619392 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <vcl/decoview.hxx> #include <vcl/svapp.hxx> diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index e14d9118f0..cad9014c0a 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -71,17 +71,17 @@ #include <vcl/cvtgrf.hxx> #include <vcl/msgbox.hxx> #include <vcl/mnemonic.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/securityoptions.hxx> -#include <svtools/itemset.hxx> -#include <svtools/eitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/stritem.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/securityoptions.hxx> +#include <svl/itemset.hxx> +#include <svl/eitem.hxx> +#include <svl/intitem.hxx> +#include <svl/stritem.hxx> #include <svtools/filter.hxx> -#include <svtools/viewoptions.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/viewoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <svtools/helpid.hrc> -#include <svtools/pickerhelper.hxx> +#include <svl/pickerhelper.hxx> #include <comphelper/docpasswordrequest.hxx> #include <ucbhelper/content.hxx> #include <ucbhelper/commandenvironment.hxx> diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 09ddcfa868..abcd3125a1 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -41,7 +41,7 @@ #include <sfx2/fcontnr.hxx> #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <sfx2/filedlghelper.hxx> #include <comphelper/sequenceasvector.hxx> diff --git a/sfx2/source/dialog/intro.cxx b/sfx2/source/dialog/intro.cxx index 5ad3254a87..07f20b0801 100644 --- a/sfx2/source/dialog/intro.cxx +++ b/sfx2/source/dialog/intro.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,7 +38,7 @@ #include <tools/stream.hxx> #include <tools/urlobj.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <unotools/configmgr.hxx> #include <com/sun/star/uno/Any.h> diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx index ddf97257bc..add294746a 100644 --- a/sfx2/source/dialog/itemconnect.cxx +++ b/sfx2/source/dialog/itemconnect.cxx @@ -34,7 +34,7 @@ #include <boost/shared_ptr.hpp> #include <list> -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> // ============================================================================ diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 5d812751e8..d2f47233e5 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,7 +78,7 @@ #include <unotools/configitem.hxx> #include <ucbhelper/content.hxx> #include <tools/urlobj.hxx> -#include <svtools/useroptions.hxx> +#include <unotools/useroptions.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/extract.hxx> #include <comphelper/storagehelper.hxx> @@ -176,7 +176,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( try { uno::Sequence < beans::PropertyValue > aProps; - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFilterCFG = + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFilterCFG = uno::Reference< container::XNameAccess >( xSMGR->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), uno::UNO_QUERY ); @@ -184,7 +184,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( if ( !xFilterCFG.is() ) return eRet; - + uno::Any aAny = xFilterCFG->getByName( rFilterName ); if ( aAny >>= aProps ) @@ -207,26 +207,26 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( { uno::Sequence< beans::PropertyValue > aPropsForDialog(1); uno::Reference< document::XExporter > xExporter( xFilterDialog, uno::UNO_QUERY ); - + if ( rType.equalsAsciiL( PDF_DOCUMENT_TYPE, PDF_DOCUMENT_TYPE_LEN )) { //add an internal property, used to tell the dialog we want to set a different //string for the ok button //used in filter/source/pdf/impdialog.cxx String aOkSendText( SfxResId( STR_PDF_EXPORT_SEND )); - + uno::Sequence< beans::PropertyValue > aFilterDataValue(1); aFilterDataValue[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_OkButtonString" )); aFilterDataValue[0].Value = css::uno::makeAny( ::rtl::OUString( aOkSendText )); - + //add to the filterdata property, the only one the PDF export filter dialog will care for aPropsForDialog[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterData" )); aPropsForDialog[0].Value = css::uno::makeAny( aFilterDataValue ); - + //when executing the dialog will merge the persistent FilterData properties xFilterProperties->setPropertyValues( aPropsForDialog ); } - + if( xExporter.is() ) xExporter->setSourceDocument( uno::Reference< lang::XComponent >( xModel, uno::UNO_QUERY ) ); @@ -235,7 +235,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( { //get the filter data uno::Sequence< beans::PropertyValue > aPropsFromDialog = xFilterProperties->getPropertyValues(); - + //add them to the args for ( sal_Int32 nInd = 0; nInd < aPropsFromDialog.getLength(); nInd++ ) { @@ -251,7 +251,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( eRet = SAVE_SUCCESSFULL; } else - { + { // cancel from dialog, then do not send // If the model is not modified, it could be modified by the dispatch calls. // Therefore set back to modified = false. This should not hurt if we call @@ -280,26 +280,26 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( throw; } catch( uno::Exception& ) - { + { } return eRet; } sal_Int32 SfxMailModel::GetCount() const -{ +{ return maAttachedDocuments.size(); } sal_Bool SfxMailModel::IsEmpty() const -{ +{ return maAttachedDocuments.empty(); } -SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( +SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( const rtl::OUString& aSaveFileName, - const css::uno::Reference< css::uno::XInterface >& xFrameOrModel, - const rtl::OUString& rType, + const css::uno::Reference< css::uno::XInterface >& xFrameOrModel, + const rtl::OUString& rType, rtl::OUString& rFileNamePath ) { SaveResult eRet( SAVE_ERROR ); @@ -335,7 +335,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if ( xController.is() ) xModel = xController->getModel(); } - + // We need at least a valid module name and model reference if (( aModule.getLength() > 0 ) && xModel.is() ) { @@ -345,7 +345,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( css::uno::Reference< css::util::XModifiable > xModifiable( xModel, css::uno::UNO_QUERY ); css::uno::Reference< css::frame::XStorable > xStorable( xModel, css::uno::UNO_QUERY ); - + if ( xModifiable.is() ) bModified = xModifiable->isModified(); if ( xStorable.is() ) @@ -367,12 +367,12 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( rtl::OUString aTypeName( rType ); rtl::OUString aFileName; rtl::OUString aExtension; - + css::uno::Reference< css::container::XContainerQuery > xContainerQuery( - xSMGR->createInstance( rtl::OUString( + xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ))), css::uno::UNO_QUERY ); - + if ( bStoreTo ) { // Retrieve filter from type @@ -391,10 +391,10 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( aQuery[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Flags" )); aQuery[2].Value = css::uno::makeAny( sal_Int32(0x80042) ); // EXPORT ALIEN 3RDPARTY } - - css::uno::Reference< css::container::XEnumeration > xEnumeration = + + css::uno::Reference< css::container::XEnumeration > xEnumeration = xContainerQuery->createSubSetEnumerationByProperties( aQuery ); - + if ( xEnumeration->hasMoreElements() ) { ::comphelper::SequenceAsHashMap aFilterPropsHM( xEnumeration->nextElement() ); @@ -402,7 +402,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( ::rtl::OUString::createFromAscii( "Name" ), ::rtl::OUString() ); } - + if ( bHasLocation ) { // Retrieve filter from media descriptor @@ -415,7 +415,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( // We should save the document in the original format. Therefore this // is not a storeTo operation. To support signing in this case, reset // bStoreTo flag. - bStoreTo = false; + bStoreTo = false; } } } @@ -440,7 +440,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( aFilterName = aFilterPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "ooSetupFactoryDefaultFilter" ), ::rtl::OUString() ); - css::uno::Reference< css::container::XNameAccess > xNameAccess2( + css::uno::Reference< css::container::XNameAccess > xNameAccess2( xContainerQuery, css::uno::UNO_QUERY ); if ( xNameAccess2.is() ) { @@ -461,7 +461,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( // No filter found => error // No type and no location => error - if (( aFilterName.getLength() == 0 ) || + if (( aFilterName.getLength() == 0 ) || (( aTypeName.getLength() == 0 ) && !bHasLocation )) return eRet; @@ -474,10 +474,10 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( else { css::uno::Reference< container::XNameAccess > xTypeDetection( - xSMGR->createInstance( ::rtl::OUString( + xSMGR->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ))), css::uno::UNO_QUERY ); - + if ( xTypeDetection.is() ) { @@ -495,7 +495,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( } } } - + // Use provided save file name. If empty determine file name aFileName = aSaveFileName; if ( aFileName.getLength() == 0 ) @@ -513,14 +513,14 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( aFileName = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::NO_DECODE ); } } - + // No file name => error if ( aFileName.getLength() == 0 ) return eRet; - + OSL_ASSERT( aFilterName.getLength() > 0 ); OSL_ASSERT( aFileName.getLength() > 0 ); - + // Creates a temporary directory to store a predefined file into it. // This makes it possible to store the file for "send document as e-mail" // with the original file name. We cannot use the original file as @@ -532,7 +532,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( aFilePathObj.setExtension( aExtension ); rtl::OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::NO_DECODE ); - + sal_Int32 nNumArgs(0); const rtl::OUString aPasswordPropName( RTL_CONSTASCII_USTRINGPARAM( "Password" )); css::uno::Sequence< css::beans::PropertyValue > aArgs( ++nNumArgs ); @@ -561,7 +561,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY ); css::uno::Reference< css::frame::XDispatch > xDispatch; - + css::util::URL aURL; css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; @@ -575,7 +575,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if ( xDispatchProvider.is() ) { - xDispatch = css::uno::Reference< css::frame::XDispatch >( + xDispatch = css::uno::Reference< css::frame::XDispatch >( xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); if ( xDispatch.is() ) { @@ -597,14 +597,14 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( //check if this is the pdf otput filter (i#64555) if( bSendAsPDF ) { - SaveResult eShowPDFFilterDialog = ShowFilterOptionsDialog( + SaveResult eShowPDFFilterDialog = ShowFilterOptionsDialog( xSMGR, xModel, aFilterName, rType, bModified, nNumArgs, aArgs ); - + // don't continue on dialog cancel or error if ( eShowPDFFilterDialog != SAVE_SUCCESSFULL ) return eShowPDFFilterDialog; } - + xStorable->storeToURL( aFileURL, aArgs ); rFileNamePath = aFileURL; eRet = SAVE_SUCCESSFULL; @@ -617,10 +617,10 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( aURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:MailExportFinished" )); xURLTransformer->parseStrict( aURL ); } - + if ( xDispatchProvider.is() ) { - xDispatch = css::uno::Reference< css::frame::XDispatch >( + xDispatch = css::uno::Reference< css::frame::XDispatch >( xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); if ( xDispatch.is() ) { @@ -637,7 +637,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( } } } - } + } // If the model is not modified, it could be modified by the dispatch calls. // Therefore set back to modified = false. This should not hurt if we call // on a non-modified model. @@ -741,9 +741,9 @@ void SfxMailModel::AddAddress( const String& rAddress, AddressRole eRole ) } } -SfxMailModel::SendMailResult SfxMailModel::AttachDocument( - const ::rtl::OUString& sDocumentType, - const css::uno::Reference< css::uno::XInterface >& xFrameOrModel, +SfxMailModel::SendMailResult SfxMailModel::AttachDocument( + const ::rtl::OUString& sDocumentType, + const css::uno::Reference< css::uno::XInterface >& xFrameOrModel, const ::rtl::OUString& sAttachmentTitle ) { rtl::OUString sFileName; @@ -752,7 +752,7 @@ SfxMailModel::SendMailResult SfxMailModel::AttachDocument( if ( eSaveResult == SAVE_SUCCESSFULL && ( sFileName.getLength() > 0 ) ) maAttachedDocuments.push_back(sFileName); return eSaveResult == SAVE_SUCCESSFULL ? SEND_MAIL_OK : SEND_MAIL_ERROR; -} +} SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css::frame::XFrame >& xFrame ) { @@ -850,7 +850,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css: } Sequence< OUString > aAttachmentSeq(&(maAttachedDocuments[0]),maAttachedDocuments.size()); - + xSimpleMailMessage->setSubject( maSubject ); xSimpleMailMessage->setAttachement( aAttachmentSeq ); @@ -873,7 +873,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css: ::vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow ); - + ErrorBox aBox( pParentWindow, SfxResId( RID_ERRBOX_MAIL_CONFIG )); aBox.Execute(); eResult = SEND_MAIL_CANCELLED; @@ -946,7 +946,7 @@ BOOL CreateFromAddress_Impl( String& rFrom ) rFrom.EraseAllChars( '@' ); } String aEmailName = aUserCFG.GetEmail(); - + // unerlaubte Zeichen entfernen aEmailName.EraseAllChars( '<' ); aEmailName.EraseAllChars( '>' ); diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx index d2158c3dad..3abfb114a8 100644 --- a/sfx2/source/dialog/mailmodelapi.cxx +++ b/sfx2/source/dialog/mailmodelapi.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -73,9 +73,9 @@ #include <unotools/tempfile.hxx> #include <vcl/svapp.hxx> -#include <svtools/stritem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/useroptions.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> +#include <unotools/useroptions.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/extract.hxx> #include <ucbhelper/content.hxx> @@ -284,7 +284,7 @@ namespace String aLeadingStr; if ( xStor.is() ) { - sal_Bool bHasName = xStor->hasLocation(); + sal_Bool bHasName = xStor->hasLocation(); if ( !bHasName ) { @@ -342,12 +342,12 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt // detect filter const SfxFilter* pFilter = SfxFilter::GetDefaultFilter(lcl_getFactoryName(_xModel)); // sal_Bool bHasFilter = pFilter != NULL; - + sal_Bool bRet = sal_False; // create temp file name with leading chars and extension Reference < XStorable > xStor( _xModel, UNO_QUERY ); if ( xStor.is() ) - { + { String* pExt = NULL; INetURLObject aFileObj(_xModel->getURL()); if ( aFileObj.hasExtension() ) @@ -363,12 +363,12 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt } { - ::utl::TempFile aTempFile( aLeadingStr, pExt ); + ::utl::TempFile aTempFile( aLeadingStr, pExt ); rFileName = aTempFile.GetURL(); } delete pExt; // save document to temp file - + // save document to temp file Sequence < PropertyValue > aArgs( _xModel->getArgs() ); ::comphelper::MediaDescriptor aMedia(aArgs); @@ -392,8 +392,8 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt ::rtl::OUString sReadOnly(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); if ( !aMedia.createItemIfMissing(sReadOnly,sal_False) ) aMedia[sReadOnly] <<= sal_False; - - aMedia >> aArgs; + + aMedia >> aArgs; try { @@ -407,7 +407,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt { } } - + // restore old settings /* TODO if ( !bModified && xDocShell->IsEnableSetModified() ) @@ -460,7 +460,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAt // save document to temp file Sequence < PropertyValue > aArgs( _xModel->getArgs() ); ::comphelper::MediaDescriptor aMedia(aArgs); - + ::rtl::OUString sMediaType(RTL_CONSTASCII_USTRINGPARAM("MediaType")); if ( !aMedia.createItemIfMissing(sMediaType,sPDFMediaType) ) aMedia[sMediaType] <<= sPDFMediaType; @@ -468,7 +468,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAt ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL")); if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) ) aMedia[sURL] <<= ::rtl::OUString(rFileName); - aMedia >> aArgs; + aMedia >> aArgs; try { @@ -596,7 +596,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( ) SendMailResult eResult = SEND_MAIL_ERROR; if ( !maAttachedDocuments.empty() ) { - + Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); if ( xMgr.is() ) { @@ -606,7 +606,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( ) xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleSystemMail" ))), UNO_QUERY ); - + if ( ! xSimpleMailClientSupplier.is() ) { xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 24d08ee3e4..5a69e4e2fe 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -37,9 +37,9 @@ #include <vcl/msgbox.hxx> #endif #include <vcl/field.hxx> -#include <svtools/eitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/style.hxx> +#include <svl/eitem.hxx> +#include <svl/intitem.hxx> +#include <svl/style.hxx> #ifndef GCC #endif @@ -57,7 +57,7 @@ #include "mgetempl.hrc" #ifndef _SFX_STYLE_HRC -#include <svtools/style.hrc> +#include <svl/style.hrc> #endif // SfxManageStyleSheetPage ----------------------------------------------- diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 192f5917f3..642c87d75a 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -32,7 +32,7 @@ #include "precompiled_sfx2.hxx" // INCLUDE --------------------------------------------------------------- -#include <svtools/style.hxx> +#include <svl/style.hxx> #ifndef GCC #endif diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index fbfc43bc90..c73874f646 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -34,9 +34,9 @@ #ifndef GCC #endif #include <vcl/msgbox.hxx> -#include <svtools/printwarningoptions.hxx> +#include <unotools/printwarningoptions.hxx> #include <svtools/printoptions.hxx> -#include <svtools/flagitem.hxx> +#include <svl/flagitem.hxx> #include "printopt.hrc" diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index bb9ad7b9a5..fc95e472a8 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <svtools/generictoolboxcontroller.hxx> #include <vcl/msgbox.hxx> #include <comphelper/processfactory.hxx> diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index e35859a946..0dac077921 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ #ifndef _WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> #endif -#include <svtools/viewoptions.hxx> +#include <unotools/viewoptions.hxx> #ifndef GCC #endif diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 4a97f85a9d..1abd1ffa36 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,7 +38,7 @@ #include "srchdlg.hrc" #include "dialog.hrc" #include <tools/debug.hxx> -#include <svtools/viewoptions.hxx> +#include <unotools/viewoptions.hxx> using namespace ::com::sun::star::uno; diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index dfb7076089..bedb46152b 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -32,8 +32,8 @@ #include "precompiled_sfx2.hxx" // include --------------------------------------------------------------- -#include <svtools/whiter.hxx> -#include <svtools/style.hxx> +#include <svl/whiter.hxx> +#include <svl/style.hxx> #ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 6e52807a5c..51a3ce757a 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -34,10 +34,10 @@ #include <limits.h> #include <stdlib.h> #include <vcl/msgbox.hxx> -#include <svtools/viewoptions.hxx> +#include <unotools/viewoptions.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include "appdata.hxx" #include "sfxtypes.hxx" diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 315e9ee437..9195925359 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -34,14 +34,14 @@ #ifndef _MENU_HXX //autogen #include <vcl/menu.hxx> #endif -#include <svtools/intitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/style.hxx> +#include <svl/intitem.hxx> +#include <svl/stritem.hxx> +#include <svl/style.hxx> #ifndef GCC #endif #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> #include <unotools/intlwrapper.hxx> diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index 03103837b2..fa0e93d1d0 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -33,7 +33,7 @@ // INCLUDE --------------------------------------------------------------- -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <vcl/svapp.hxx> #ifndef GCC diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 64e7fcda94..fe75d4d0c1 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,17 +34,17 @@ #ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> #endif -#include <svtools/eitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/itemset.hxx> -#include <svtools/useroptions.hxx> +#include <svl/eitem.hxx> +#include <svl/intitem.hxx> +#include <svl/stritem.hxx> +#include <svl/itemset.hxx> +#include <unotools/useroptions.hxx> #include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #include <tools/datetime.hxx> #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include "versdlg.hrc" #include "versdlg.hxx" diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index c30cbd4dbc..b3e446a34c 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -66,6 +66,7 @@ #include "com/sun/star/xml/xpath/XXPathAPI.hpp" #include "com/sun/star/util/Date.hpp" #include "com/sun/star/util/Time.hpp" +#include "com/sun/star/util/Duration.hpp" #include "SfxDocumentMetaData.hxx" #include "rtl/ustrbuf.hxx" @@ -469,6 +470,11 @@ const char* s_nsODFMeta = "urn:oasis:names:tc:opendocument:xmlns:meta:1.0"; const char* s_metaXml = "meta.xml"; +bool isValidDate(const css::util::Date & i_rDate) +{ + return i_rDate.Month > 0; +} + bool isValidDateTime(const css::util::DateTime & i_rDateTime) { return i_rDateTime.Month > 0; @@ -500,16 +506,25 @@ getQualifier(const char* i_name) { return ::rtl::OUString::createFromAscii(ns); } +bool SAL_CALL +textToDateOrDateTime(css::util::Date & io_rd, css::util::DateTime & io_rdt, + bool & o_rIsDateTime, ::rtl::OUString i_text) throw () +{ + if (::sax::Converter::convertDateOrDateTime( + io_rd, io_rdt, o_rIsDateTime, i_text)) { + return true; + } else { + DBG_WARNING1("SfxDocumentMetaData: invalid date: %s", + OUStringToOString(i_text, RTL_TEXTENCODING_UTF8).getStr()); + return false; + } +} + // convert string to date/time bool SAL_CALL textToDateTime(css::util::DateTime & io_rdt, ::rtl::OUString i_text) throw () { if (::sax::Converter::convertDateTime(io_rdt, i_text)) { - // NB: there may be rounding errors; handle these here - if (io_rdt.HundredthSeconds > 0) { - io_rdt.Seconds++; - io_rdt.HundredthSeconds = 0; - } return true; } else { DBG_WARNING1("SfxDocumentMetaData: invalid date: %s", @@ -528,6 +543,20 @@ textToDateTimeDefault(::rtl::OUString i_text) throw () return dt; } +// convert date to string +::rtl::OUString SAL_CALL +dateToText(css::util::Date const& i_rd) throw () +{ + if (isValidDate(i_rd)) { + ::rtl::OUStringBuffer buf; + ::sax::Converter::convertDate(buf, i_rd); + return buf.makeStringAndClear(); + } else { + return ::rtl::OUString(); + } +} + + // convert date/time to string ::rtl::OUString SAL_CALL dateTimeToText(css::util::DateTime const& i_rdt) throw () @@ -542,60 +571,48 @@ dateTimeToText(css::util::DateTime const& i_rdt) throw () } // convert string to duration -bool SAL_CALL -textToDuration(css::util::Time& io_rut, ::rtl::OUString i_text) throw () +bool +textToDuration(css::util::Duration& io_rDur, ::rtl::OUString const& i_rText) +throw () { - css::util::DateTime dt; - if (::sax::Converter::convertTime(dt, i_text)) { - // NB: there may be rounding errors; handle these here - if (dt.HundredthSeconds > 0) { - dt.Seconds++; - dt.HundredthSeconds = 0; - } - io_rut.Hours = dt.Hours; - io_rut.Minutes = dt.Minutes; - io_rut.Seconds = dt.Seconds; - io_rut.HundredthSeconds = dt.HundredthSeconds; + if (::sax::Converter::convertDuration(io_rDur, i_rText)) { return true; } else { DBG_WARNING1("SfxDocumentMetaData: invalid duration: %s", - OUStringToOString(i_text, RTL_TEXTENCODING_UTF8).getStr()); + OUStringToOString(i_rText, RTL_TEXTENCODING_UTF8).getStr()); return false; } } -sal_Int32 SAL_CALL textToDuration(::rtl::OUString i_text) throw () +sal_Int32 textToDuration(::rtl::OUString const& i_rText) throw () { - css::util::Time t; - if (textToDuration(t, i_text)) { - return t.Hours * 3600 + t.Minutes * 60 + t.Seconds; + css::util::Duration d; + if (textToDuration(d, i_rText)) { + return (d.Days * (24*3600)) + + (d.Hours * 3600) + (d.Minutes * 60) + d.Seconds; } else { return 0; // default } } // convert duration to string -::rtl::OUString SAL_CALL durationToText(css::util::Time const& i_rut) throw () +::rtl::OUString durationToText(css::util::Duration const& i_rDur) throw () { - css::util::DateTime dt; - dt.Hours = i_rut.Hours; - dt.Minutes = i_rut.Minutes; - dt.Seconds = i_rut.Seconds; - dt.HundredthSeconds = i_rut.HundredthSeconds; ::rtl::OUStringBuffer buf; - ::sax::Converter::convertTime(buf, dt); + ::sax::Converter::convertDuration(buf, i_rDur); return buf.makeStringAndClear(); } // convert duration to string ::rtl::OUString SAL_CALL durationToText(sal_Int32 i_value) throw () { - css::util::Time ut; - ut.Hours = static_cast<sal_Int16>(i_value / 3600); - ut.Minutes = static_cast<sal_Int16>((i_value % 3600) / 60); - ut.Seconds = static_cast<sal_Int16>(i_value % 60); - ut.HundredthSeconds = 0; - return durationToText(ut); + css::util::Duration ud; + ud.Days = static_cast<sal_Int16>(i_value / (24 * 3600)); + ud.Hours = static_cast<sal_Int16>((i_value % (24 * 3600)) / 3600); + ud.Minutes = static_cast<sal_Int16>((i_value % 3600) / 60); + ud.Seconds = static_cast<sal_Int16>(i_value % 60); + ud.HundredthSeconds = 0; + return durationToText(ud); } // extract base URL (necessary for converting relative links) @@ -922,17 +939,26 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet) } else if (type == ::cppu::UnoType<css::util::Date>::get()) { css::util::Date d; any >>= d; - css::util::DateTime dt; - dt.Year = d.Year; - dt.Month = d.Month; - dt.Day = d.Day; - values.push_back(dateTimeToText(dt)); + values.push_back(dateToText(d)); as.push_back(std::make_pair(vt, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("date")))); } else if (type == ::cppu::UnoType<css::util::Time>::get()) { + // #i97029#: replaced by Duration + // Time is supported for backward compatibility with OOo 3.x, x<=2 css::util::Time ut; any >>= ut; - values.push_back(durationToText(ut)); + css::util::Duration ud; + ud.Hours = ut.Hours; + ud.Minutes = ut.Minutes; + ud.Seconds = ut.Seconds; + ud.HundredthSeconds = ut.HundredthSeconds; + values.push_back(durationToText(ud)); + as.push_back(std::make_pair(vt, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("time")))); + } else if (type == ::cppu::UnoType<css::util::Duration>::get()) { + css::util::Duration ud; + any >>= ud; + values.push_back(durationToText(ud)); as.push_back(std::make_pair(vt, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("time")))); } else if (::cppu::UnoType<double>::get().isAssignableFrom(type)) { @@ -1250,18 +1276,24 @@ void SAL_CALL SfxDocumentMetaData::init( continue; } } else if (type.equalsAscii("date")) { + bool isDateTime; + css::util::Date d; css::util::DateTime dt; - if (textToDateTime(dt, text)) { - any <<= dt; + if (textToDateOrDateTime(d, dt, isDateTime, text)) { + if (isDateTime) { + any <<= dt; + } else { + any <<= d; + } } else { DBG_WARNING1("SfxDocumentMetaData: invalid date: %s", OUStringToOString(text, RTL_TEXTENCODING_UTF8).getStr()); continue; } } else if (type.equalsAscii("time")) { - css::util::Time ut; - if (textToDuration(ut, text)) { - any <<= ut; + css::util::Duration ud; + if (textToDuration(ud, text)) { + any <<= ud; } else { DBG_WARNING1("SfxDocumentMetaData: invalid time: %s", OUStringToOString(text, RTL_TEXTENCODING_UTF8).getStr()); @@ -2251,17 +2283,19 @@ void SfxDocumentMetaData::createUserDefined() // values of allowed types if ( !m_xUserDefined.is() ) { - css::uno::Sequence<css::uno::Type> types(10); + css::uno::Sequence<css::uno::Type> types(11); types[0] = ::cppu::UnoType<bool>::get(); types[1] = ::cppu::UnoType< ::rtl::OUString>::get(); types[2] = ::cppu::UnoType<css::util::DateTime>::get(); types[3] = ::cppu::UnoType<css::util::Date>::get(); - types[4] = ::cppu::UnoType<css::util::Time>::get(); + types[4] = ::cppu::UnoType<css::util::Duration>::get(); types[5] = ::cppu::UnoType<float>::get(); types[6] = ::cppu::UnoType<double>::get(); types[7] = ::cppu::UnoType<sal_Int16>::get(); types[8] = ::cppu::UnoType<sal_Int32>::get(); types[9] = ::cppu::UnoType<sal_Int64>::get(); + // Time is supported for backward compatibility with OOo 3.x, x<=2 + types[10] = ::cppu::UnoType<css::util::Time>::get(); css::uno::Sequence<css::uno::Any> args(2); args[0] <<= css::beans::NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowedTypes")), diff --git a/sfx2/source/doc/applet.cxx b/sfx2/source/doc/applet.cxx index a1354d2b0f..8a98a1f8bd 100644 --- a/sfx2/source/doc/applet.cxx +++ b/sfx2/source/doc/applet.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ #include <vcl/syschild.hxx> #include <rtl/ustring.hxx> #include <toolkit/helper/vclunohelper.hxx> -#include <svtools/javaoptions.hxx> +#include <unotools/javaoptions.hxx> #include <svtools/miscopt.hxx> #include <comphelper/TypeGeneration.hxx> @@ -189,9 +189,9 @@ void SAL_CALL AppletObject::initialize( const uno::Sequence< uno::Any >& aArgume aArguments[0] >>= mxObj; } -sal_Bool SAL_CALL AppletObject::load( +sal_Bool SAL_CALL AppletObject::load( const uno::Sequence < com::sun::star::beans::PropertyValue >& /*lDescriptor*/, - const uno::Reference < frame::XFrame >& xFrame ) + const uno::Reference < frame::XFrame >& xFrame ) throw( uno::RuntimeException ) { if ( SvtJavaOptions().IsExecuteApplets() && SvtMiscOptions().IsPluginsEnabled() ) @@ -278,7 +278,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL AppletObject::getPropertySetI void SAL_CALL AppletObject::setPropertyValue(const ::rtl::OUString& aPropertyName, const uno::Any& aAny) throw ( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - + const SfxItemPropertySimpleEntry* pEntry = maPropMap.getByName( aPropertyName ); if( !pEntry ) throw beans::UnknownPropertyException(); @@ -314,7 +314,7 @@ void SAL_CALL AppletObject::setPropertyValue(const ::rtl::OUString& aPropertyNam aAny >>= maName; break; default:; - + } } @@ -348,7 +348,7 @@ uno::Any SAL_CALL AppletObject::getPropertyValue(const ::rtl::OUString& aPropert aAny <<= maName; break; default:; - + } return aAny; } diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src index 3f8ab1ae71..c914d9fe29 100644 --- a/sfx2/source/doc/doc.src +++ b/sfx2/source/doc/doc.src @@ -30,7 +30,7 @@ #include <sfx2/sfx.hrc> #include "doc.hrc" #define __RSC -#include <svtools/inetdef.hxx> +#include <svl/inetdef.hxx> //#include <so3/so2defs.hxx> // ----------------------------------------------------------------------- diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 1c1ac4ea27..b1c48a83e5 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,8 +35,8 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <comphelper/processfactory.hxx> #include <tools/config.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <tools/urlobj.hxx> #include <unotools/ucbstreamhelper.hxx> #include <comphelper/sequenceashashmap.hxx> diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 445508e2e1..7ec181492c 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -90,19 +90,19 @@ #ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif -#include <svtools/stritem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/lckbitem.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> +#include <svl/lckbitem.hxx> #include <svtools/sfxecode.hxx> -#include <svtools/itemset.hxx> -#include <svtools/intitem.hxx> +#include <svl/itemset.hxx> +#include <svl/intitem.hxx> #include <svtools/svparser.hxx> // SvKeyValue #include <cppuhelper/weakref.hxx> #include <cppuhelper/implbase1.hxx> #define _SVSTDARR_ULONGS #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <unotools/streamwrap.hxx> @@ -121,9 +121,9 @@ using namespace ::com::sun::star::io; #include <tools/urlobj.hxx> #include <tools/inetmime.hxx> #include <unotools/ucblockbytes.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <svtools/asynclink.hxx> -#include <svtools/inettype.hxx> +#include <svl/inettype.hxx> #include <ucbhelper/contentbroker.hxx> #include <ucbhelper/commandenvironment.hxx> #include <unotools/localfilehelper.hxx> @@ -133,8 +133,8 @@ using namespace ::com::sun::star::io; #include <ucbhelper/content.hxx> #include <ucbhelper/interactionrequest.hxx> #include <sot/stg.hxx> -#include <svtools/saveopt.hxx> -#include <svtools/documentlockfile.hxx> +#include <unotools/saveopt.hxx> +#include <svl/documentlockfile.hxx> #include "opostponedtruncationstream.hxx" #include "helper.hxx" @@ -219,7 +219,7 @@ sal_Bool IsOOoLockFileUsed() } } // anonymous namespace -//========================================================== +//========================================================== //---------------------------------------------------------------- @@ -383,6 +383,8 @@ public: Reference < XInputStream > xInputStream; Reference < XStream > xStream; + uno::Reference< io::XStream > m_xLockingStream; + sal_uInt32 nLastStorageError; ::rtl::OUString aCharset; @@ -577,7 +579,7 @@ void SfxMedium::CheckFileDate( const util::DateTime& aInitDate ) } catch ( uno::Exception& ) {} - } + } } } @@ -590,11 +592,14 @@ sal_Bool SfxMedium::DocNeedsFileDateCheck() //------------------------------------------------------------------ util::DateTime SfxMedium::GetInitFileDate( sal_Bool bIgnoreOldValue ) { - if ( ( bIgnoreOldValue || !pImp->m_bGotDateTime ) && GetContent().is() ) + if ( ( bIgnoreOldValue || !pImp->m_bGotDateTime ) && aLogicName.Len() ) { try { - pImp->aContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DateModified" )) ) >>= pImp->m_aDateTime; + uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv; + ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv ); + + aContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DateModified" )) ) >>= pImp->m_aDateTime; pImp->m_bGotDateTime = sal_True; } catch ( ::com::sun::star::uno::Exception& ) @@ -1008,7 +1013,7 @@ sal_Int8 SfxMedium::ShowLockedDocumentDialog( const uno::Sequence< ::rtl::OUStri ::rtl::OUString aDocumentURL = GetURLObject().GetLastName(); ::rtl::OUString aInfo; ::rtl::Reference< ::ucbhelper::InteractionRequest > xInteractionRequestImpl; - + if ( bOwnLock ) { if ( aData.getLength() > LOCKFILE_EDITTIME_ID ) @@ -1111,6 +1116,13 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) // otherwise the document should be opened readonly // if user cancel the loading the ERROR_ABORT is set + if ( pImp->m_bLocked && bLoading && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ) + { + // if the document is already locked the system locking might be temporarely off after storing + // check whether the system file locking should be taken again + GetLockingStream_Impl(); + } + sal_Bool bResult = pImp->m_bLocked; if ( !bResult ) @@ -1122,21 +1134,18 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) if ( !bResult && !IsReadOnly() ) { - // check whether the file is readonly in fs - // the check is only necessary if - // do it only for loading, some contents still might have problems with this property, let them not affect the saving sal_Bool bContentReadonly = sal_False; - if ( bLoading && ::utl::LocalFileHelper::IsLocalFile( aLogicName ) ) + if ( bLoading && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ) { - // let the stream be opened to check the possibility to open it for editing - GetMedium_Impl(); + // let the original document be opened to check the possibility to open it for editing + // and to let the writable stream stay open to hold the lock on the document + GetLockingStream_Impl(); } // "IsReadOnly" property does not allow to detect whether the file is readonly always // so we try always to open the file for editing // the file is readonly only in case the read-write stream can not be opened - SFX_ITEMSET_ARG( pSet, pWriteStreamItem, SfxUnoAnyItem, SID_STREAM, sal_False); - if ( bLoading && !pWriteStreamItem ) + if ( bLoading && !pImp->m_xLockingStream.is() ) { try { @@ -1184,7 +1193,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) do { try - { + { ::svt::DocumentLockFile aLockFile( aLogicName ); if ( !bHandleSysLocked ) { @@ -1206,7 +1215,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) { // system file locking is not active, ask user whether he wants to open the document without any locking uno::Reference< task::XInteractionHandler > xHandler = GetInteractionHandler(); - + if ( xHandler.is() ) { ::rtl::Reference< ::ucbhelper::InteractionRequest > xIgnoreRequestImpl @@ -1246,7 +1255,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) } } - + if ( !bResult ) { uno::Sequence< ::rtl::OUString > aData; @@ -1265,7 +1274,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) bOwnLock = ( aData.getLength() > LOCKFILE_USERURL_ID && aOwnData.getLength() > LOCKFILE_USERURL_ID && aOwnData[LOCKFILE_SYSUSERNAME_ID].equals( aData[LOCKFILE_SYSUSERNAME_ID] ) ); - + if ( bOwnLock && aOwnData[LOCKFILE_LOCALHOST_ID].equals( aData[LOCKFILE_LOCALHOST_ID] ) && aOwnData[LOCKFILE_USERURL_ID].equals( aData[LOCKFILE_USERURL_ID] ) ) @@ -1311,7 +1320,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); if ( !bLoading || (pReadOnlyItem && !pReadOnlyItem->GetValue()) ) SetError( ERRCODE_IO_ACCESSDENIED, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); - else + else GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) ); } @@ -2267,6 +2276,45 @@ void SfxMedium::ClearBackup_Impl() } //---------------------------------------------------------------- +void SfxMedium::GetLockingStream_Impl() +{ + if ( ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) + && !pImp->m_xLockingStream.is() ) + { + SFX_ITEMSET_ARG( pSet, pWriteStreamItem, SfxUnoAnyItem, SID_STREAM, sal_False); + if ( pWriteStreamItem ) + pWriteStreamItem->GetValue() >>= pImp->m_xLockingStream; + + if ( !pImp->m_xLockingStream.is() ) + { + // open the original document + uno::Sequence< beans::PropertyValue > xProps; + TransformItems( SID_OPENDOC, *GetItemSet(), xProps ); + comphelper::MediaDescriptor aMedium( xProps ); + + aMedium.addInputStreamOwnLock(); + + uno::Reference< io::XInputStream > xInputStream; + aMedium[comphelper::MediaDescriptor::PROP_STREAM()] >>= pImp->m_xLockingStream; + aMedium[comphelper::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; + + if ( !pImp->pTempFile && !aName.Len() ) + { + // the medium is still based on the original file, it makes sence to initialize the streams + if ( pImp->m_xLockingStream.is() ) + pImp->xStream = pImp->m_xLockingStream; + + if ( xInputStream.is() ) + pImp->xInputStream = xInputStream; + + if ( !pImp->xInputStream.is() && pImp->xStream.is() ) + pImp->xInputStream = pImp->xStream->getInputStream(); + } + } + } +} + +//---------------------------------------------------------------- void SfxMedium::GetMedium_Impl() { if ( !pInStream ) @@ -2332,27 +2380,36 @@ void SfxMedium::GetMedium_Impl() TransformItems( SID_OPENDOC, *GetItemSet(), xProps ); comphelper::MediaDescriptor aMedium( xProps ); - if ( bFromTempFile ) - { - aMedium[comphelper::MediaDescriptor::PROP_URL()] <<= ::rtl::OUString( aFileName ); - aMedium.erase( comphelper::MediaDescriptor::PROP_READONLY() ); - aMedium.addInputStream(); - } - else if ( ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ) + if ( pImp->m_xLockingStream.is() && !bFromTempFile ) { - // use the special locking approach only for file URLs - aMedium.addInputStreamOwnLock(); + // the medium is not based on the temporary file, so the original stream can be used + pImp->xStream = pImp->m_xLockingStream; } else - aMedium.addInputStream(); + { + if ( bFromTempFile ) + { + aMedium[comphelper::MediaDescriptor::PROP_URL()] <<= ::rtl::OUString( aFileName ); + aMedium.erase( comphelper::MediaDescriptor::PROP_READONLY() ); + aMedium.addInputStream(); + } + else if ( ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ) + { + // use the special locking approach only for file URLs + aMedium.addInputStreamOwnLock(); + } + else + aMedium.addInputStream(); + + // the ReadOnly property set in aMedium is ignored + // the check is done in LockOrigFileOnDemand() for file and non-file URLs - // the ReadOnly property set in aMedium is ignored - // the check is done in LockOrigFileOnDemand() for file and non-file URLs + //TODO/MBA: what happens if property is not there?! + aMedium[comphelper::MediaDescriptor::PROP_STREAM()] >>= pImp->xStream; + aMedium[comphelper::MediaDescriptor::PROP_INPUTSTREAM()] >>= pImp->xInputStream; + } - //TODO/MBA: what happens if property is not there?! GetContent(); - aMedium[comphelper::MediaDescriptor::PROP_STREAM()] >>= pImp->xStream; - aMedium[comphelper::MediaDescriptor::PROP_INPUTSTREAM()] >>= pImp->xInputStream; if ( !pImp->xInputStream.is() && pImp->xStream.is() ) pImp->xInputStream = pImp->xStream->getInputStream(); } @@ -2661,7 +2718,7 @@ void SfxMedium::Close() CloseStreams_Impl(); - UnlockFile(); + UnlockFile( sal_False ); } void SfxMedium::CloseAndRelease() @@ -2694,13 +2751,33 @@ void SfxMedium::CloseAndRelease() CloseAndReleaseStreams_Impl(); - UnlockFile(); + UnlockFile( sal_True ); } -void SfxMedium::UnlockFile() +void SfxMedium::UnlockFile( sal_Bool bReleaseLockStream ) { + if ( pImp->m_xLockingStream.is() ) + { + if ( bReleaseLockStream ) + { + try + { + uno::Reference< io::XInputStream > xInStream = pImp->m_xLockingStream->getInputStream(); + uno::Reference< io::XOutputStream > xOutStream = pImp->m_xLockingStream->getOutputStream(); + if ( xInStream.is() ) + xInStream->closeInput(); + if ( xOutStream.is() ) + xOutStream->closeOutput(); + } + catch( uno::Exception& ) + {} + } + + pImp->m_xLockingStream = uno::Reference< io::XStream >(); + } + if ( pImp->m_bLocked ) - { + { try { pImp->m_bLocked = sal_False; @@ -2720,8 +2797,14 @@ void SfxMedium::CloseAndReleaseStreams_Impl() uno::Reference< io::XInputStream > xInToClose = pImp->xInputStream; uno::Reference< io::XOutputStream > xOutToClose; if ( pImp->xStream.is() ) + { xOutToClose = pImp->xStream->getOutputStream(); + // if the locking stream is closed here the related member should be cleaned + if ( pImp->xStream == pImp->m_xLockingStream ) + pImp->m_xLockingStream = uno::Reference< io::XStream >(); + } + // The probably exsisting SvStream wrappers should be closed first CloseStreams_Impl(); @@ -3162,7 +3245,7 @@ void SfxMedium::SetStorage_Impl( const uno::Reference < embed::XStorage >& rStor SfxItemSet* SfxMedium::GetItemSet() const { // this method *must* return an ItemSet, returning NULL can cause crashes - if( !pSet ) + if( !pSet ) ((SfxMedium*)this)->pSet = new SfxAllItemSet( SFX_APP()->GetPool() ); return pSet; } @@ -3433,13 +3516,14 @@ void SfxMedium::CreateTempFile( sal_Bool bReplace ) if ( !( nStorOpenMode & STREAM_TRUNC ) ) { + sal_Bool bTransferSuccess = sal_False; + if ( GetContent().is() && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ) { // if there is already such a document, we should copy it // if it is a file system use OS copy process - sal_Bool bTransferSuccess = sal_False; try { uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > xComEnv; @@ -3460,16 +3544,14 @@ void SfxMedium::CreateTempFile( sal_Bool bReplace ) catch( uno::Exception& ) {} - if ( !bTransferSuccess ) + if ( bTransferSuccess ) { - SetError( ERRCODE_IO_CANTWRITE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); - return; + CloseOutStream(); + CloseInStream(); } - - CloseOutStream(); - CloseInStream(); } - else if ( pInStream ) + + if ( !bTransferSuccess && pInStream ) { // the case when there is no URL-access available or this is a remote protocoll // but there is an input stream @@ -3489,13 +3571,25 @@ void SfxMedium::CreateTempFile( sal_Bool bReplace ) pOutStream->Write( pBuf, nRead ); } + bTransferSuccess = sal_True; delete[] pBuf; CloseInStream(); } CloseOutStream_Impl(); } else + { + // Quite strange design, but currently it is expected that in this case no transfer happens + // TODO/LATER: get rid of this inconsistent part of the call design + bTransferSuccess = sal_True; CloseInStream(); + } + + if ( !bTransferSuccess ) + { + SetError( ERRCODE_IO_CANTWRITE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); + return; + } } CloseStorage(); @@ -3577,7 +3671,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl:: ::com::sun::star::uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures > xSigner( comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.security.DocumentDigitalSignatures" ) ), - aArgs ), + aArgs ), ::com::sun::star::uno::UNO_QUERY ); if ( xSigner.is() ) @@ -3608,7 +3702,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl:: { // If the signature has already the document signature it will be removed // after the scripting signature is inserted. - uno::Reference< io::XStream > xStream( + uno::Reference< io::XStream > xStream( xMetaInf->openStreamElement( xSigner->getScriptingContentSignatureDefaultStreamName(), embed::ElementModes::READWRITE ), uno::UNO_SET_THROW ); @@ -3840,7 +3934,7 @@ sal_Bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteraction { uno::Reference< embed::XStorage > xStorage = GetStorage(); uno::Reference< embed::XOptimizedStorage > xOptStorage( xStorage, uno::UNO_QUERY ); - + if ( xOptStorage.is() ) { // TODO/LATER: reuse the pImp->pTempFile if it already exists @@ -3905,7 +3999,7 @@ sal_Bool SfxMedium::SwitchDocumentToFile( ::rtl::OUString aURL ) { uno::Reference< embed::XStorage > xStorage = GetStorage(); uno::Reference< embed::XOptimizedStorage > xOptStorage( xStorage, uno::UNO_QUERY ); - + if ( xOptStorage.is() ) { // TODO/LATER: reuse the pImp->pTempFile if it already exists @@ -3946,7 +4040,7 @@ sal_Bool SfxMedium::SwitchDocumentToFile( ::rtl::OUString aURL ) } } } - + return bResult; } diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 5e2f3776d8..629c54a1dc 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -48,13 +48,13 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <tools/urlobj.hxx> #include <vcl/msgbox.hxx> -#include <svtools/itemset.hxx> -#include <svtools/eitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/itemset.hxx> +#include <svl/eitem.hxx> +#include <svl/intitem.hxx> +#include <svl/stritem.hxx> #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> using namespace ::com::sun::star::lang; using namespace ::com::sun::star::ui::dialogs; diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index a2e2963479..8d96c08a51 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ #include <framework/interaction.hxx> #include <osl/file.hxx> #include <rtl/ref.hxx> -#include <svtools/securityoptions.hxx> +#include <unotools/securityoptions.hxx> #include <svtools/sfxecode.hxx> #include <tools/diagnose_ex.h> #include <tools/urlobj.hxx> diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx index 40fafa0b16..a0258f2e8c 100644 --- a/sfx2/source/doc/doctdlg.cxx +++ b/sfx2/source/doc/doctdlg.cxx @@ -34,7 +34,7 @@ #ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif -#include <svtools/stritem.hxx> +#include <svl/stritem.hxx> #ifndef GCC #endif diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index d0ee1aacc8..e7dc765911 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <unotools/localedatawrapper.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <tools/string.hxx> #include <tools/urlobj.hxx> #include <svtools/ehdl.hxx> diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index cef00ca6e7..c8f7704061 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> #include <comphelper/sequenceashashmap.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <comphelper/processfactory.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 28c0760ddf..e93f59857f 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,17 +44,17 @@ #include <vcl/menubtn.hxx> #include <vcl/msgbox.hxx> #include <vcl/print.hxx> -#include <svtools/style.hxx> -#include <svtools/stritem.hxx> -#include <svtools/eitem.hxx> +#include <svl/style.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> #include <svtools/imagemgr.hxx> #include <vcl/waitobj.hxx> #include <tools/urlobj.hxx> #include <tools/color.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <sot/exchange.hxx> #include <comphelper/storagehelper.hxx> @@ -81,7 +81,7 @@ #endif #include <comphelper/processfactory.hxx> #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> static const char cDelim = ':'; BOOL SfxOrganizeListBox_Impl::bDropMoveOk = TRUE; diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx index 3db8bf61ed..2cf885323c 100644 --- a/sfx2/source/doc/frmdescr.cxx +++ b/sfx2/source/doc/frmdescr.cxx @@ -34,7 +34,7 @@ #include <sot/object.hxx> #include <tools/stream.hxx> #include <vcl/splitwin.hxx> -#include <svtools/itemset.hxx> +#include <svl/itemset.hxx> #ifndef GCC #endif diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index e55654043b..de934f5548 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -62,12 +62,11 @@ #include "guisaveas.hxx" -#include <svtools/pathoptions.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/itemset.hxx> -#include <svtools/adrparse.hxx> -#include <svtools/useroptions.hxx> -#include <svtools/saveopt.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <svl/itemset.hxx> +#include <unotools/useroptions.hxx> +#include <unotools/saveopt.hxx> #include <tools/debug.hxx> #include <tools/urlobj.hxx> #include <comphelper/processfactory.hxx> @@ -812,7 +811,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, eCtxt = sfx2::FileDialogHelper::SI_EXPORT; if( aDocServiceName.equalsAscii( "com.sun.star.text.TextDocument" ) ) eCtxt = sfx2::FileDialogHelper::SW_EXPORT; - + if ( eCtxt != sfx2::FileDialogHelper::UNKNOWN_CONTEXT ) pFileDlg->SetContext( eCtxt ); @@ -826,7 +825,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, { ::rtl::OUString aCtrlText = String( SfxResId( STR_EXPORTBUTTON ) ); xControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, aCtrlText ); - + aCtrlText = ::rtl::OUString( String( SfxResId( STR_LABEL_FILEFORMAT ) ) ); xControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER_LABEL, aCtrlText ); } @@ -1090,7 +1089,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog() ::rtl::OUString aConfigSuggestion( ( aCtxt != sfx2::FileDialogHelper::UNKNOWN_CONTEXT ) ? SvtPathOptions().GetGraphicPath() : SvtPathOptions().GetWorkPath() ); aReccomendedDir = INetURLObject( aConfigSuggestion ).GetMainURL( INetURLObject::NO_DECODE ); } - + return aReccomendedDir; } @@ -1316,7 +1315,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& // if it is no export, warn user that the signature will be removed if ( SIGNATURESTATE_SIGNATURES_OK == nDocumentSignatureState || SIGNATURESTATE_SIGNATURES_INVALID == nDocumentSignatureState - || SIGNATURESTATE_SIGNATURES_NOTVALIDATED == nDocumentSignatureState + || SIGNATURESTATE_SIGNATURES_NOTVALIDATED == nDocumentSignatureState || SIGNATURESTATE_SIGNATURES_PARTIAL_OK == nDocumentSignatureState) { if ( QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_LOSINGSIGNATURE ) ).Execute() != RET_YES ) diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 726e0bbfc5..bcef29a045 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -37,8 +37,8 @@ #ifndef _SVMEDIT_HXX #include <svtools/svmedit.hxx> #endif -#include <svtools/itemset.hxx> -#include <svtools/eitem.hxx> +#include <svl/itemset.hxx> +#include <svl/eitem.hxx> #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> #include <tools/urlobj.hxx> diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index d63d1fc17e..c8253f687e 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -41,25 +41,25 @@ #include <com/sun/star/beans/XFastPropertySet.hpp> #include <tools/cachestr.hxx> #include <vcl/msgbox.hxx> -#include <svtools/style.hxx> +#include <svl/style.hxx> #include <vcl/wrkwin.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/rectitem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/urihelper.hxx> -#include <svtools/ctloptions.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/rectitem.hxx> +#include <svl/eitem.hxx> +#include <svl/urihelper.hxx> +#include <svl/ctloptions.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/storagehelper.hxx> -#include <svtools/securityoptions.hxx> +#include <unotools/securityoptions.hxx> #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> #include <tools/datetime.hxx> #include <math.h> -#include <svtools/saveopt.hxx> -#include <svtools/useroptions.hxx> +#include <unotools/saveopt.hxx> +#include <unotools/useroptions.hxx> #include <unotools/localfilehelper.hxx> #include <vcl/virdev.hxx> diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 57f6aab335..b0a7b23855 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,12 +32,12 @@ #include "precompiled_sfx2.hxx" #ifndef _INETMSG_HXX //autogen -#include <svtools/inetmsg.hxx> +#include <svl/inetmsg.hxx> #endif #include <tools/diagnose_ex.h> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> #include <svtools/svparser.hxx> // SvKeyValue #include <vos/mutex.hxx> #include <cppuhelper/exc_hlp.hxx> @@ -80,7 +80,7 @@ #include <com/sun/star/uno/Any.h> #include <com/sun/star/ucb/XContent.hpp> #include <com/sun/star/task/ErrorCodeRequest.hpp> -#include <svtools/securityoptions.hxx> +#include <unotools/securityoptions.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/componentcontext.hxx> @@ -111,12 +111,12 @@ using namespace ::com::sun::star::container; #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <unotools/ucbhelper.hxx> #include <tools/inetmime.hxx> #include <tools/urlobj.hxx> -#include <svtools/inettype.hxx> -#include <svtools/sharecontrolfile.hxx> +#include <svl/inettype.hxx> +#include <svl/sharecontrolfile.hxx> #include <osl/file.hxx> #include <rtl/bootstrap.hxx> #include <vcl/svapp.hxx> @@ -2538,12 +2538,20 @@ void SfxObjectShell::StoreLog() if ( pImp->m_xLogRing.is() ) { - ::rtl::OUString aFileURL = - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}" ) ); +#ifdef WNT + ::rtl::OUString aFileURL = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}" ) ); +#else + ::rtl::OUString aFileURL = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/bootstraprc:UserInstallation}" ) ); +#endif + ::rtl::Bootstrap::expandMacros( aFileURL ); - ::rtl::OUString aBuildID = - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/setup.ini:buildid}" ) ); +#ifdef WNT + ::rtl::OUString aBuildID = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/setup.ini:buildid}" ) ); +#else + ::rtl::OUString aBuildID = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/setuprc:buildid}" ) ); +#endif + ::rtl::Bootstrap::expandMacros( aBuildID ); if ( aFileURL.getLength() ) diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 20ea6dfa77..e14bfdc222 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -54,20 +54,20 @@ #include <com/sun/star/security/DocumentSignatureInformation.hpp> #include <com/sun/star/security/XDocumentDigitalSignatures.hpp> #include <tools/urlobj.hxx> -#include <svtools/whiter.hxx> +#include <svl/whiter.hxx> #include <vcl/msgbox.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> #include <vcl/wrkwin.hxx> #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> #include <comphelper/string.hxx> #include <basic/sbx.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/useroptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/useroptions.hxx> #include <svtools/asynclink.hxx> -#include <svtools/saveopt.hxx> +#include <unotools/saveopt.hxx> #include <comphelper/documentconstants.hxx> #include <sfx2/app.hxx> @@ -1392,10 +1392,10 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) } catch( uno::Exception& ) {} - + bool bNoSig = false; - if ( IsModified() || !GetMedium() || !GetMedium()->GetName().Len() + if ( IsModified() || !GetMedium() || !GetMedium()->GetName().Len() || (!aODFVersion.equals( ODFVER_012_TEXT ) && !bHasSign) ) { // the document might need saving ( new, modified or in ODF1.1 format without signature ) @@ -1434,10 +1434,10 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) } else { - ErrorBox( NULL, WB_OK, SfxResId( STR_XMLSEC_ODF12_EXPECTED ) ).Execute(); + ErrorBox( NULL, WB_OK, SfxResId( STR_XMLSEC_ODF12_EXPECTED ) ).Execute(); return; } - + if ( IsModified() || !GetMedium() || !GetMedium()->GetName().Len() ) return; } @@ -1459,7 +1459,7 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) // We sign only ODF1.2, that means that if this point has been reached, // the ODF1.2 signing process should be used. // This code still might be called to show the signature of ODF1.1 document. - sal_Bool bSigned = GetMedium()->SignContents_Impl( + sal_Bool bSigned = GetMedium()->SignContents_Impl( bScriptingContent, aODFVersion, pImp->nDocumentSignatureState == SIGNATURESTATE_SIGNATURES_OK @@ -1481,7 +1481,7 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) pImp->nDocumentSignatureState = SIGNATURESTATE_UNKNOWN;// Re-Check pImp->bSignatureErrorIsShown = sal_False; - + Invalidate( SID_SIGNATURE ); Invalidate( SID_MACRO_SIGNATURE ); Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) ); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index e1a8c626b2..98afd75354 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -34,9 +34,9 @@ #ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> #include <tools/zcodec.hxx> #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/frame/XModel.hpp> @@ -80,16 +80,15 @@ #include <comphelper/configurationhelper.hxx> #include <comphelper/interaction.hxx> #include <svtools/sfxecode.hxx> -#include <svtools/securityoptions.hxx> +#include <unotools/securityoptions.hxx> #include <cppuhelper/weak.hxx> #include <comphelper/processfactory.hxx> #include <tools/cachestr.hxx> -#include <svtools/addxmltostorageoptions.hxx> #include <unotools/streamwrap.hxx> -#include <svtools/saveopt.hxx> -#include <svtools/useroptions.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/saveopt.hxx> +#include <unotools/useroptions.hxx> +#include <unotools/pathoptions.hxx> #include <tools/urlobj.hxx> #include <tools/diagnose_ex.h> #include <unotools/localfilehelper.hxx> @@ -669,7 +668,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) { // the macros in repaired documents should be disabled pMedium->GetItemSet()->Put( SfxUInt16Item( SID_MACROEXECMODE, document::MacroExecMode::NEVER_EXECUTE ) ); - + // the mediatype was retrieved by using fallback solution but this is a repairing mode // so it is acceptable to open the document if there is no contents that required manifest.xml bWarnMediaTypeFallback = sal_False; @@ -1697,7 +1696,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl catch( uno::Exception& ) { } - + pMedium->Close(); rMedium.CloseZipStorage_Impl(); } @@ -1794,7 +1793,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl #ifdef OS2 { -#define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer +#define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer // Header for a single-valued ASCII EA data item typedef struct _EA_ASCII_header { USHORT usAttr; /* value: EAT_ASCII */ @@ -1872,7 +1871,19 @@ sal_Bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMediu { uno::Reference< embed::XOptimizedStorage > xOptStorage( xStorage, uno::UNO_QUERY_THROW ); ::rtl::OUString aBackupURL = rTargetMedium.GetBackup_Impl(); - if ( aBackupURL.getLength() ) + if ( !aBackupURL.getLength() ) + { + // the backup could not be created, try to disconnect the storage and close the source SfxMedium + // in this case the optimization is not possible, connect storage to a temporary file + rTargetMedium.ResetError(); + xOptStorage->writeAndAttachToStream( uno::Reference< io::XStream >() ); + rSrcMedium.CanDisposeStorage_Impl( sal_False ); + rSrcMedium.Close(); + + // now try to create the backup + rTargetMedium.GetBackup_Impl(); + } + else { // the following call will only compare stream sizes // TODO/LATER: this is a very risky part, since if the URL contents are different from the storage diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx index e9e37a44c5..367325208d 100644 --- a/sfx2/source/doc/objuno.cxx +++ b/sfx2/source/doc/objuno.cxx @@ -59,7 +59,7 @@ #include <vos/mutex.hxx> #include <tools/errcode.hxx> -#include <svtools/cntwids.hrc> +#include <svl/cntwids.hrc> #include <comphelper/string.hxx> #include <comphelper/sequenceasvector.hxx> #include <comphelper/storagehelper.hxx> diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index d7470e9d8b..8f80ffbe1b 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -54,14 +54,14 @@ #include <vcl/wrkwin.hxx> #endif #include <vcl/svapp.hxx> -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <tools/rtti.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <sfxhelp.hxx> #include <basic/sbstar.hxx> -#include <svtools/stritem.hxx> +#include <svl/stritem.hxx> #include <basic/sbx.hxx> -#include <svtools/eventcfg.hxx> +#include <unotools/eventcfg.hxx> #include <sfx2/objsh.hxx> #include <sfx2/signaturestate.hxx> @@ -71,7 +71,7 @@ #endif #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> -#include <svtools/printwarningoptions.hxx> +#include <unotools/printwarningoptions.hxx> #ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> #endif @@ -82,9 +82,9 @@ #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/document/XScriptInvocationContext.hpp> -#include <svtools/urihelper.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/sharecontrolfile.hxx> +#include <svl/urihelper.hxx> +#include <unotools/pathoptions.hxx> +#include <svl/sharecontrolfile.hxx> #include <unotools/localfilehelper.hxx> #include <unotools/ucbhelper.hxx> #include <svtools/asynclink.hxx> @@ -584,7 +584,7 @@ sal_uInt16 SfxObjectShell::PrepareClose SfxApplication *pSfxApp = SFX_APP(); pSfxApp->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEDOC, GlobalEventConfig::GetEventName(STR_EVENT_PREPARECLOSEDOC), this) ); - + if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) { pImp->bPreparedForClose = sal_True; diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index ca0e28d322..957c245fb3 100755 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -43,10 +43,10 @@ #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/lang/EventObject.hpp> -#include <svtools/lstner.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> +#include <svl/lstner.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> #include <unotools/tempfile.hxx> #include <unotools/localfilehelper.hxx> #include <osl/file.hxx> diff --git a/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx index 94370e9a1c..45d0dc9a77 100755 --- a/sfx2/source/doc/sfxacldetect.cxx +++ b/sfx2/source/doc/sfxacldetect.cxx @@ -1,108 +1,108 @@ -/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: shutdowniconw32.cxx,v $
- * $Revision: 1.48 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied 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.
- *
- ************************************************************************/
-
-#ifdef WNT
-
-// necessary to include system headers without warnings
-#ifdef _MSC_VER
-#pragma warning(disable:4668 4917)
-#endif
-
-#include <windows.h>
-#include <lmaccess.h>
-#include <sal/types.h>
-
-sal_Bool IsReadonlyAccordingACL( const sal_Unicode* pFilePath )
-{
- sal_Bool bResult = sal_False;
-
- sal_uInt32 nFDSize = 0;
- GetFileSecurityW( pFilePath, DACL_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|OWNER_SECURITY_INFORMATION, NULL, 0, &nFDSize );
- if ( nFDSize )
- {
- PSECURITY_DESCRIPTOR pFileDescr = reinterpret_cast< PSECURITY_DESCRIPTOR >( malloc( nFDSize ) );
- if ( GetFileSecurityW( pFilePath, DACL_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|OWNER_SECURITY_INFORMATION, pFileDescr, nFDSize, &nFDSize ) )
- {
- HANDLE hToken = NULL;
- if ( OpenThreadToken( GetCurrentThread(), TOKEN_DUPLICATE|TOKEN_QUERY, TRUE, &hToken )
- || OpenProcessToken( GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &hToken) )
- {
- HANDLE hImpersonationToken = NULL;
- if ( DuplicateToken( hToken, SecurityImpersonation, &hImpersonationToken) )
- {
- sal_uInt32 nDesiredAccess = ACCESS_WRITE;
- GENERIC_MAPPING aGenericMapping = { ACCESS_READ, ACCESS_WRITE, 0, ACCESS_READ | ACCESS_WRITE };
- MapGenericMask( &nDesiredAccess, &aGenericMapping );
-
- PRIVILEGE_SET aPrivilegeSet;
- sal_uInt32 nPrivilegeSetSize = sizeof( PRIVILEGE_SET );
-
- sal_uInt32 nGrantedAccess;
- BOOL bAccessible = TRUE;
- if ( AccessCheck( pFileDescr,
- hImpersonationToken,
- nDesiredAccess,
- &aGenericMapping,
- &aPrivilegeSet,
- &nPrivilegeSetSize,
- &nGrantedAccess,
- &bAccessible ) )
- {
- bResult = !bAccessible;
- }
-
- CloseHandle( hImpersonationToken );
- }
-
- CloseHandle( hToken );
- }
- }
-
- free( pFileDescr );
- }
-
- return bResult;
-}
-
-#else // this is UNX
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-
-
-#include <sal/types.h>
-
-sal_Bool IsReadonlyAccordingACL( const sal_Unicode* )
-{
- // to be implemented
- return sal_False;
-}
-
-#endif
-
+/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: shutdowniconw32.cxx,v $ + * $Revision: 1.48 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied 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. + * + ************************************************************************/ + +#ifdef WNT + +// necessary to include system headers without warnings +#ifdef _MSC_VER +#pragma warning(disable:4668 4917) +#endif + +#include <windows.h> +#include <lmaccess.h> +#include <sal/types.h> + +sal_Bool IsReadonlyAccordingACL( const sal_Unicode* pFilePath ) +{ + sal_Bool bResult = sal_False; + + sal_uInt32 nFDSize = 0; + GetFileSecurityW( reinterpret_cast< LPCWSTR >(pFilePath), DACL_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|OWNER_SECURITY_INFORMATION, NULL, 0, &nFDSize ); + if ( nFDSize ) + { + PSECURITY_DESCRIPTOR pFileDescr = reinterpret_cast< PSECURITY_DESCRIPTOR >( malloc( nFDSize ) ); + if ( GetFileSecurityW( reinterpret_cast< LPCWSTR >(pFilePath), DACL_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|OWNER_SECURITY_INFORMATION, pFileDescr, nFDSize, &nFDSize ) ) + { + HANDLE hToken = NULL; + if ( OpenThreadToken( GetCurrentThread(), TOKEN_DUPLICATE|TOKEN_QUERY, TRUE, &hToken ) + || OpenProcessToken( GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &hToken) ) + { + HANDLE hImpersonationToken = NULL; + if ( DuplicateToken( hToken, SecurityImpersonation, &hImpersonationToken) ) + { + sal_uInt32 nDesiredAccess = ACCESS_WRITE; + GENERIC_MAPPING aGenericMapping = { ACCESS_READ, ACCESS_WRITE, 0, ACCESS_READ | ACCESS_WRITE }; + MapGenericMask( &nDesiredAccess, &aGenericMapping ); + + PRIVILEGE_SET aPrivilegeSet; + sal_uInt32 nPrivilegeSetSize = sizeof( PRIVILEGE_SET ); + + sal_uInt32 nGrantedAccess; + BOOL bAccessible = TRUE; + if ( AccessCheck( pFileDescr, + hImpersonationToken, + nDesiredAccess, + &aGenericMapping, + &aPrivilegeSet, + &nPrivilegeSetSize, + &nGrantedAccess, + &bAccessible ) ) + { + bResult = !bAccessible; + } + + CloseHandle( hImpersonationToken ); + } + + CloseHandle( hToken ); + } + } + + free( pFileDescr ); + } + + return bResult; +} + +#else // this is UNX +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + + +#include <sal/types.h> + +sal_Bool IsReadonlyAccordingACL( const sal_Unicode* ) +{ + // to be implemented + return sal_False; +} + +#endif + diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 25d2d964e9..f87a65d3f2 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -73,9 +73,9 @@ #include <cppuhelper/exc_hlp.hxx> #include <comphelper/processfactory.hxx> // can be removed when this is a "real" service #include <comphelper/componentcontext.hxx> -#include <svtools/itemset.hxx> -#include <svtools/stritem.hxx> -#include <svtools/eitem.hxx> +#include <svl/itemset.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> #include <basic/sbx.hxx> #include <basic/sbuno.hxx> #include <tools/urlobj.hxx> diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx index a5f69a2e9c..a76f0d0bbe 100644 --- a/sfx2/source/explorer/nochaos.cxx +++ b/sfx2/source/explorer/nochaos.cxx @@ -31,9 +31,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include <svtools/itempool.hxx> -#include <svtools/poolitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/itempool.hxx> +#include <svl/poolitem.hxx> +#include <svl/stritem.hxx> #include <nochaos.hxx> #include <sfx2/sfxuno.hxx> diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx index 402ca3bdae..555b2cc498 100644 --- a/sfx2/source/inc/appdata.hxx +++ b/sfx2/source/inc/appdata.hxx @@ -32,7 +32,7 @@ #include <tools/link.hxx> #include <tools/list.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <vcl/timer.hxx> #include <tools/string.hxx> #include "rtl/ref.hxx" @@ -58,7 +58,6 @@ class SfxFilterMatcher; class SfxCancelManager; class SfxStatusDispatcher; class SfxDdeTriggerTopic_Impl; -class SfxMiscCfg; class SfxDocumentTemplates; class SfxFrameArr_Impl; class SvtSaveOptions; @@ -122,7 +121,6 @@ public: SfxEventConfiguration* pEventConfig; SvUShorts* pDisabledSlotList; SvStrings* pSecureURLs; - SfxMiscCfg* pMiscConfig; SvtSaveOptions* pSaveOptions; SvtUndoOptions* pUndoOptions; SvtHelpOptions* pHelpOptions; diff --git a/sfx2/source/inc/applet.hxx b/sfx2/source/inc/applet.hxx index ee53c7dd66..73c9092ff5 100644 --- a/sfx2/source/inc/applet.hxx +++ b/sfx2/source/inc/applet.hxx @@ -43,8 +43,8 @@ #include <cppuhelper/implbase6.hxx> #include <rtl/ustring.hxx> -#include <svtools/ownlist.hxx> -#include <svtools/itemprop.hxx> +#include <svl/ownlist.hxx> +#include <svl/itemprop.hxx> namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx index f1a10d7b5f..e6a2c96608 100644 --- a/sfx2/source/inc/eventsupplier.hxx +++ b/sfx2/source/inc/eventsupplier.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,8 +57,8 @@ #include <vos/mutex.hxx> #include <cppuhelper/interfacecontainer.hxx> -#include <svtools/lstner.hxx> -#include <svtools/eventcfg.hxx> +#include <svl/lstner.hxx> +#include <unotools/eventcfg.hxx> //-------------------------------------------------------------------------------------------------------- @@ -143,10 +143,10 @@ struct ModelCollectionMutexBase typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > > TModelList; //============================================================================= -class ModelCollectionEnumeration : public ModelCollectionMutexBase +class ModelCollectionEnumeration : public ModelCollectionMutexBase , public ::cppu::WeakImplHelper1< ::com::sun::star::container::XEnumeration > { - + //------------------------------------------------------------------------- // member //------------------------------------------------------------------------- @@ -154,7 +154,7 @@ class ModelCollectionEnumeration : public ModelCollectionMutexBase ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMGR; TModelList m_lModels; TModelList::iterator m_pEnumerationIt; - + //------------------------------------------------------------------------- // native interface //------------------------------------------------------------------------- @@ -162,16 +162,16 @@ class ModelCollectionEnumeration : public ModelCollectionMutexBase ModelCollectionEnumeration(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMGR); virtual ~ModelCollectionEnumeration(); void setModelList(const TModelList& rList); - + //------------------------------------------------------------------------- - // uno interface + // uno interface //------------------------------------------------------------------------- public: - + // css.container.XEnumeration virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException); - + virtual ::com::sun::star::uno::Any SAL_CALL nextElement() throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException , @@ -179,7 +179,7 @@ class ModelCollectionEnumeration : public ModelCollectionMutexBase }; //============================================================================= -class SfxGlobalEvents_Impl : public ModelCollectionMutexBase +class SfxGlobalEvents_Impl : public ModelCollectionMutexBase , public ::cppu::WeakImplHelper7< ::com::sun::star::lang::XServiceInfo , ::com::sun::star::document::XEventsSupplier , ::com::sun::star::document::XEventBroadcaster @@ -193,22 +193,22 @@ class SfxGlobalEvents_Impl : public ModelCollectionMutexBase ::com::sun::star::uno::WeakReference< ::com::sun::star::document::XEventListener > m_xJobExecutorListener; OINTERFACECONTAINERHELPER m_aLegacyListeners; OINTERFACECONTAINERHELPER m_aDocumentListeners; - TModelList m_lModels; + TModelList m_lModels; GlobalEventConfig* pImp; public: SfxGlobalEvents_Impl(const com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& xSMGR); virtual ~SfxGlobalEvents_Impl(); - + SFX_DECL_XSERVICEINFO - + // css.document.XEventBroadcaster virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents() throw(::com::sun::star::uno::RuntimeException); - + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& xListener) throw(::com::sun::star::uno::RuntimeException); - + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& xListener) throw(::com::sun::star::uno::RuntimeException); @@ -216,23 +216,23 @@ public: virtual void SAL_CALL addDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& _ViewController, const ::com::sun::star::uno::Any& _Supplement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); - + // css.document.XEventListener virtual void SAL_CALL notifyEvent(const ::com::sun::star::document::EventObject& aEvent) throw(::com::sun::star::uno::RuntimeException); // css.document.XDocumentEventListener virtual void SAL_CALL documentEventOccured( const ::com::sun::star::document::DocumentEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - + // css.container.XSet virtual sal_Bool SAL_CALL has(const ::com::sun::star::uno::Any& aElement) throw(::com::sun::star::uno::RuntimeException); - + virtual void SAL_CALL insert(const ::com::sun::star::uno::Any& aElement) throw(::com::sun::star::lang::IllegalArgumentException , ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL remove(const ::com::sun::star::uno::Any& aElement) throw(::com::sun::star::lang::IllegalArgumentException , ::com::sun::star::container::NoSuchElementException, @@ -241,25 +241,25 @@ public: // css.container.XEnumerationAccess virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration() throw(::com::sun::star::uno::RuntimeException); - + // css.container.XElementAccess virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException); - + virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); - + // css.lang.XEventListener virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& aEvent) throw(::com::sun::star::uno::RuntimeException); - + private: // threadsafe void implts_notifyJobExecution(const ::com::sun::star::document::EventObject& aEvent); void implts_checkAndExecuteEventBindings(const ::com::sun::star::document::DocumentEvent& aEvent); void implts_notifyListener(const ::com::sun::star::document::DocumentEvent& aEvent); - + // not threadsafe TModelList::iterator impl_searchDoc(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel); }; diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc index 8e7643975d..9185f0c114 100644 --- a/sfx2/source/inc/helpid.hrc +++ b/sfx2/source/inc/helpid.hrc @@ -32,7 +32,7 @@ // include ------------------------------------------------------------------ -#include <svtools/solar.hrc> +#include <svl/solar.hrc> // Help-Ids ----------------------------------------------------------------- @@ -346,8 +346,9 @@ #define HID_TP_CUSTOMPROPERTIES (HID_SFX_START + 324) #define HID_CTRL_CUSTOMPROPERTIES (HID_SFX_START + 325) #define HID_CTRL_CUSTOMPROPS_YES_NO (HID_SFX_START + 326) +#define HID_DLG_CUSTOMPROPS_DURATION (HID_SFX_START + 327) -#define ACT_SFX_HID_END HID_CTRL_CUSTOMPROPS_YES_NO +#define ACT_SFX_HID_END HID_DLG_CUSTOMPROPS_DURATION // "Uberlaufpr"ufung -------------------------------------------------------- diff --git a/sfx2/source/inc/iframe.hxx b/sfx2/source/inc/iframe.hxx index 332aaa171f..f67ec1f591 100644 --- a/sfx2/source/inc/iframe.hxx +++ b/sfx2/source/inc/iframe.hxx @@ -45,8 +45,8 @@ #include <cppuhelper/implbase6.hxx> #include <rtl/ustring.hxx> -#include <svtools/ownlist.hxx> -#include <svtools/itemprop.hxx> +#include <svl/ownlist.hxx> +#include <svl/itemprop.hxx> #include <sfx2/sfxuno.hxx> #include <sfx2/frmdescr.hxx> diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx index 8ee3b79a6f..07421d0934 100644 --- a/sfx2/source/inc/objshimp.hxx +++ b/sfx2/source/inc/objshimp.hxx @@ -38,7 +38,7 @@ #include <com/sun/star/logging/XSimpleLogRing.hpp> #include <tools/datetime.hxx> -#include <svtools/securityoptions.hxx> +#include <unotools/securityoptions.hxx> #include <sfx2/objsh.hxx> #include "sfx2/docmacromode.hxx" #include "bitset.hxx" @@ -180,7 +180,7 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess virtual ~SfxObjectShell_Impl(); static sal_Bool NeedsOfficeUpdateDialog(); - + // IMacroDocumentAccess overridables virtual sal_Int16 getCurrentMacroExecMode() const; virtual sal_Bool setCurrentMacroExecMode( sal_uInt16 nMacroMode ); diff --git a/sfx2/source/inc/plugin.hxx b/sfx2/source/inc/plugin.hxx index 6c545e2fb2..f2dbfbdb03 100644 --- a/sfx2/source/inc/plugin.hxx +++ b/sfx2/source/inc/plugin.hxx @@ -45,8 +45,8 @@ #include <cppuhelper/implbase5.hxx> #include <rtl/ustring.hxx> -#include <svtools/ownlist.hxx> -#include <svtools/itemprop.hxx> +#include <svl/ownlist.hxx> +#include <svl/itemprop.hxx> #include <sfx2/sfxuno.hxx> diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc index 0c0c8a4250..932204440a 100644 --- a/sfx2/source/inc/sfxlocal.hrc +++ b/sfx2/source/inc/sfxlocal.hrc @@ -60,6 +60,11 @@ #define SFX_QB_WRONG_TYPE (RID_SFX_SFXLOCAL_START + 7) #define SFX_IMG_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 8) #define SFX_IMG_PROPERTY_REMOVE_HC (RID_SFX_SFXLOCAL_START + 9) +#define SFX_FLD_DATE (RID_SFX_SFXLOCAL_START + 10) +#define SFX_FLD_TIME (RID_SFX_SFXLOCAL_START + 11) +#define SFX_FLD_DURATION (RID_SFX_SFXLOCAL_START + 12) +#define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 13) + #endif diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx index 5097112f6a..618bb0b2c1 100644 --- a/sfx2/source/inc/sfxpicklist.hxx +++ b/sfx2/source/inc/sfxpicklist.hxx @@ -34,7 +34,7 @@ #include <osl/mutex.hxx> #include <tools/string.hxx> #include <vcl/menu.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <com/sun/star/util/XStringWidth.hpp> #include <vector> diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 55e7a317d2..f7f7740264 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -41,12 +41,12 @@ class SfxTemplateControllerItem; #ifndef _LSTBOX_HXX //autogen #include <vcl/lstbox.hxx> #endif -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <svtools/svtreebx.hxx> -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> // SvUShorts +#include <svl/svstdarr.hxx> // SvUShorts #include <rsc/rscsfx.hxx> #include <tools/rtti.hxx> diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx index 5e2436db51..f939ac775d 100644 --- a/sfx2/source/inc/virtmenu.hxx +++ b/sfx2/source/inc/virtmenu.hxx @@ -32,7 +32,7 @@ #define _SFXVIRTMENU_HXX -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <sfx2/mnuitem.hxx> #include "mnucfga.hxx" diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx index dc231c1af7..8735e24b90 100644 --- a/sfx2/source/inc/workwin.hxx +++ b/sfx2/source/inc/workwin.hxx @@ -42,7 +42,7 @@ #include <cppuhelper/propshlp.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> // SvUShorts +#include <svl/svstdarr.hxx> // SvUShorts #include <rtl/ustring.hxx> #include <vos/mutex.hxx> diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx index 895b1e7523..27ce878499 100644 --- a/sfx2/source/inet/inettbc.cxx +++ b/sfx2/source/inet/inettbc.cxx @@ -40,11 +40,11 @@ #include <com/sun/star/frame/XFramesSupplier.hpp> #endif #include <com/sun/star/task/XInteractionHandler.hpp> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/cancel.hxx> -#include <svtools/historyoptions.hxx> -#include <svtools/folderrestriction.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/cancel.hxx> +#include <unotools/historyoptions.hxx> +#include <svl/folderrestriction.hxx> #include <vcl/toolbox.hxx> #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> @@ -57,9 +57,9 @@ #endif #include <rtl/ustring.hxx> -#include <svtools/itemset.hxx> -#include <svtools/urihelper.hxx> -#include <svtools/pathoptions.hxx> +#include <svl/itemset.hxx> +#include <svl/urihelper.hxx> +#include <unotools/pathoptions.hxx> #include <svtools/asynclink.hxx> #include <svtools/inettbc.hxx> diff --git a/sfx2/source/layout/sfxtabdialog.cxx b/sfx2/source/layout/sfxtabdialog.cxx index bf7c521ade..92454ae62f 100644 --- a/sfx2/source/layout/sfxtabdialog.cxx +++ b/sfx2/source/layout/sfxtabdialog.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,10 +34,10 @@ #include <limits.h> #include <stdlib.h> #include <vcl/msgbox.hxx> -#include <svtools/viewoptions.hxx> +#include <unotools/viewoptions.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include "appdata.hxx" #include "sfxtypes.hxx" diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 8c1e42a44e..9286203551 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -51,8 +51,8 @@ #include <comphelper/processfactory.hxx> #endif #include <tools/urlobj.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> #include <svtools/imagemgr.hxx> #include <svtools/menuoptions.hxx> #include <framework/menuconfiguration.hxx> diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 4530277451..356582c7ac 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -54,13 +54,13 @@ #include <comphelper/processfactory.hxx> #include <unotools/ucbstreamhelper.hxx> #include <tools/urlobj.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <sfx2/mnumgr.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <svtools/menuoptions.hxx> #include "virtmenu.hxx" diff --git a/sfx2/source/menu/objmnctl.cxx b/sfx2/source/menu/objmnctl.cxx index 27b500d7ff..85829a5338 100644 --- a/sfx2/source/menu/objmnctl.cxx +++ b/sfx2/source/menu/objmnctl.cxx @@ -38,7 +38,7 @@ #include <vcl/menu.hxx> #endif #ifndef _SXSTRITEM_HXX //autogen -#include <svtools/stritem.hxx> +#include <svl/stritem.hxx> #endif #ifndef GCC #endif diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index b1eb2bd3d8..fe59bea965 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -34,7 +34,7 @@ #include <sot/factory.hxx> #include <svtools/menuoptions.hxx> #include <svtools/imagemgr.hxx> -#include <svtools/imageitm.hxx> +#include <svl/imageitm.hxx> #include <com/sun/star/container/XEnumeration.hpp> #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> @@ -284,7 +284,7 @@ SfxVirtualMenu::~SfxVirtualMenu() DBG_DTOR(SfxVirtualMenu, 0); DELETEZ( pImageControl ); - SvtMenuOptions().RemoveListener( LINK( this, SfxVirtualMenu, SettingsChanged ) ); + SvtMenuOptions().RemoveListenerLink( LINK( this, SfxVirtualMenu, SettingsChanged ) ); if ( bIsActive ) { @@ -396,7 +396,7 @@ void SfxVirtualMenu::CreateFromSVMenu() const int bOleServer = FALSE; const int bMac = FALSE; SvtMenuOptions aOptions; - aOptions.AddListener( LINK( this, SfxVirtualMenu, SettingsChanged ) ); + aOptions.AddListenerLink( LINK( this, SfxVirtualMenu, SettingsChanged ) ); // iterate through the items pBindings->ENTERREGISTRATIONS(); ++nLocks; diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index 933581c7fd..c1f6ee3767 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,14 +42,14 @@ #include <com/sun/star/util/XURLTransformer.hpp> #endif #include <tools/urlobj.hxx> -#include <svtools/macitem.hxx> +#include <svl/macitem.hxx> #include <sfx2/appuno.hxx> #include <sfx2/objsh.hxx> #include <sfx2/sfxbasemodel.hxx> #include <sfx2/evntconf.hxx> -#include <svtools/eventcfg.hxx> +#include <unotools/eventcfg.hxx> -#include <svtools/securityoptions.hxx> +#include <unotools/securityoptions.hxx> #include <comphelper/processfactory.hxx> #include "eventsupplier.hxx" @@ -339,7 +339,7 @@ void SAL_CALL SfxEvents_Impl::notifyEvent( const DOCEVENTOBJECT& aEvent ) throw( aGuard.clear(); Execute( aEventData, css::document::DocumentEvent(aEvent.Source, aEvent.EventName, NULL, css::uno::Any()), mpObjShell ); } - + //-------------------------------------------------------------------------------------------------------- // --- ::lang::XEventListener --- //-------------------------------------------------------------------------------------------------------- @@ -593,7 +593,7 @@ sal_Bool SAL_CALL ModelCollectionEnumeration::hasMoreElements() return (m_pEnumerationIt != m_lModels.end()); // <- SAFE } - + css::uno::Any SAL_CALL ModelCollectionEnumeration::nextElement() throw(css::container::NoSuchElementException, css::lang::WrappedTargetException , @@ -609,10 +609,10 @@ css::uno::Any SAL_CALL ModelCollectionEnumeration::nextElement() ++m_pEnumerationIt; aLock.clear(); // <- SAFE - + return css::uno::makeAny(xModel); } - + SFX_IMPL_XSERVICEINFO( SfxGlobalEvents_Impl, "com.sun.star.frame.GlobalEventBroadcaster", "com.sun.star.comp.sfx2.GlobalEventBroadcaster" ) SFX_IMPL_ONEINSTANCEFACTORY( SfxGlobalEvents_Impl ); @@ -650,7 +650,7 @@ css::uno::Reference< css::container::XNameReplace > SAL_CALL SfxGlobalEvents_Imp } //----------------------------------------------------------------------------- -void SAL_CALL SfxGlobalEvents_Impl::addEventListener(const css::uno::Reference< css::document::XEventListener >& xListener) +void SAL_CALL SfxGlobalEvents_Impl::addEventListener(const css::uno::Reference< css::document::XEventListener >& xListener) throw(css::uno::RuntimeException) { // container is threadsafe @@ -694,7 +694,7 @@ void SAL_CALL SfxGlobalEvents_Impl::notifyEvent(const css::document::EventObject { css::document::DocumentEvent aDocEvent(aEvent.Source, aEvent.EventName, NULL, css::uno::Any()); implts_notifyJobExecution(aEvent); - implts_checkAndExecuteEventBindings(aDocEvent); + implts_checkAndExecuteEventBindings(aDocEvent); implts_notifyListener(aDocEvent); } @@ -712,7 +712,7 @@ void SAL_CALL SfxGlobalEvents_Impl::disposing(const css::lang::EventObject& aEve throw(css::uno::RuntimeException) { css::uno::Reference< css::frame::XModel > xDoc(aEvent.Source, UNO_QUERY); - + // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); TModelList::iterator pIt = impl_searchDoc(xDoc); @@ -728,9 +728,9 @@ sal_Bool SAL_CALL SfxGlobalEvents_Impl::has(const css::uno::Any& aElement) { css::uno::Reference< css::frame::XModel > xDoc; aElement >>= xDoc; - + sal_Bool bHas = sal_False; - + // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); TModelList::iterator pIt = impl_searchDoc(xDoc); @@ -738,8 +738,8 @@ sal_Bool SAL_CALL SfxGlobalEvents_Impl::has(const css::uno::Any& aElement) bHas = sal_True; aLock.clear(); // <- SAFE - - return bHas; + + return bHas; } //----------------------------------------------------------------------------- @@ -755,7 +755,7 @@ void SAL_CALL SfxGlobalEvents_Impl::insert( const css::uno::Any& aElement ) ::rtl::OUString::createFromAscii("Cant locate at least the model parameter."), static_cast< css::container::XSet* >(this), 0); - + // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); TModelList::iterator pIt = impl_searchDoc(xDoc); @@ -792,7 +792,7 @@ void SAL_CALL SfxGlobalEvents_Impl::remove( const css::uno::Any& aElement ) ::rtl::OUString::createFromAscii("Cant locate at least the model parameter."), static_cast< css::container::XSet* >(this), 0); - + // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); TModelList::iterator pIt = impl_searchDoc(xDoc); @@ -800,10 +800,10 @@ void SAL_CALL SfxGlobalEvents_Impl::remove( const css::uno::Any& aElement ) throw css::container::NoSuchElementException( ::rtl::OUString(), static_cast< css::container::XSet* >(this)); - m_lModels.erase(pIt); + m_lModels.erase(pIt); aLock.clear(); // <- SAFE - + css::uno::Reference< css::document::XDocumentEventBroadcaster > xDocBroadcaster(xDoc, UNO_QUERY ); if (xDocBroadcaster.is()) xDocBroadcaster->removeDocumentEventListener(this); @@ -829,7 +829,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL SfxGlobalEvents_Imp UNO_QUERY); aLock.clear(); // <- SAFE - + return xEnum; } @@ -879,7 +879,7 @@ void SfxGlobalEvents_Impl::implts_checkAndExecuteEventBindings(const css::docume css::uno::Reference< css::container::XNameReplace > xEvents = m_xEvents; aLock.clear(); // <- SAFE - + css::uno::Any aAny; if (xEvents.is()) aAny = xEvents->getByName(aEvent.EventName); @@ -907,7 +907,7 @@ TModelList::iterator SfxGlobalEvents_Impl::impl_searchDoc(const css::uno::Refere { if (!xModel.is()) return m_lModels.end(); - + TModelList::iterator pIt; for ( pIt = m_lModels.begin(); pIt != m_lModels.end() ; @@ -917,7 +917,7 @@ TModelList::iterator SfxGlobalEvents_Impl::impl_searchDoc(const css::uno::Refere if (xContainerDoc == xModel) break; } - + return pIt; } diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index 6ceb8803de..7aa9ac545e 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include <svtools/stritem.hxx> +#include <svl/stritem.hxx> #ifndef GCC #endif #include <com/sun/star/util/URL.hpp> @@ -57,9 +57,9 @@ #include <sfx2/sfx.hrc> #include <comphelper/processfactory.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> #endif diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx index c634009ed3..3013dcf9a0 100644 --- a/sfx2/source/toolbox/imgmgr.cxx +++ b/sfx2/source/toolbox/imgmgr.cxx @@ -171,7 +171,7 @@ SfxImageManager_Impl::SfxImageManager_Impl( SfxModule* pModule ) : for ( sal_uInt32 i = 0; i < IMAGELIST_COUNT; i++ ) m_pImageList[i] = 0; - m_aOpt.AddListener( LINK( this, SfxImageManager_Impl, OptionsChanged_Impl ) ); + m_aOpt.AddListenerLink( LINK( this, SfxImageManager_Impl, OptionsChanged_Impl ) ); Application::AddEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) ); } @@ -179,7 +179,7 @@ SfxImageManager_Impl::SfxImageManager_Impl( SfxModule* pModule ) : SfxImageManager_Impl::~SfxImageManager_Impl() { - m_aOpt.RemoveListener( LINK( this, SfxImageManager_Impl, OptionsChanged_Impl ) ); + m_aOpt.RemoveListenerLink( LINK( this, SfxImageManager_Impl, OptionsChanged_Impl ) ); Application::RemoveEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) ); for ( sal_uInt32 i = 0; i < m_aToolBoxes.size(); i++ ) diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 417ec9bf44..fe3ce95119 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,14 +58,14 @@ #include <com/sun/star/ui/XUIFunctionListener.hpp> #include <com/sun/star/frame/status/Visibility.hpp> #include <com/sun/star/document/CorruptedFilterConfigurationException.hpp> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/imageitm.hxx> -#include <svtools/visitem.hxx> -#include <svtools/urlbmk.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/imageitm.hxx> +#include <svl/visitem.hxx> +#include <svl/urlbmk.hxx> #include <vcl/toolbox.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <svtools/imagemgr.hxx> #include <comphelper/processfactory.hxx> @@ -490,7 +490,7 @@ void SfxToolBoxControl::Dispatch( const ::rtl::OUString& aCommand, ::com::sun::s ::rtl::OUString sAppName; try { - static ::rtl::OUString our_aModuleManagerName = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager"); + static ::rtl::OUString our_aModuleManagerName = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager"); ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleManager( diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index e5d7ca0693..9b6d39b195 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -43,12 +43,12 @@ #ifndef _MENU_HXX //autogen #include <vcl/menu.hxx> #endif -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #ifndef _SPLITWIN_HXX //autogen #include <vcl/splitwin.hxx> #endif -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> #ifndef _TOOLKIT_UNOHLP_HXX #include <toolkit/helper/vclunohelper.hxx> #endif diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index cab7101731..b439dca4ff 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,10 +62,10 @@ #include <rtl/ustring.h> #include <rtl/logfile.hxx> -#include <svtools/itemset.hxx> +#include <svl/itemset.hxx> #include <vcl/window.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> #include <tools/urlobj.hxx> #include <vos/mutex.hxx> #include <svtools/sfxecode.hxx> @@ -73,7 +73,7 @@ #include <sot/storinfo.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/mediadescriptor.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #ifndef css namespace css = ::com::sun::star; diff --git a/sfx2/source/view/impframe.cxx b/sfx2/source/view/impframe.cxx index 5c22507979..d57771c1ae 100644 --- a/sfx2/source/view/impframe.cxx +++ b/sfx2/source/view/impframe.cxx @@ -36,7 +36,7 @@ #include "impframe.hxx" -#include <svtools/smplhint.hxx> +#include <svl/smplhint.hxx> #include <sfx2/frame.hxx> #include <sfx2/bindings.hxx> diff --git a/sfx2/source/view/impframe.hxx b/sfx2/source/view/impframe.hxx index de5995dfb8..ff40ec6f20 100644 --- a/sfx2/source/view/impframe.hxx +++ b/sfx2/source/view/impframe.hxx @@ -31,7 +31,7 @@ #ifndef _SFX_IMPFRAME_HXX #define _SFX_IMPFRAME_HXX -#include <svtools/cancel.hxx> +#include <svl/cancel.hxx> #include <sfx2/frame.hxx> #include <sfx2/viewfrm.hxx> // SvBorder diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 18fe96ebb0..1a8754d651 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -72,7 +72,7 @@ #include <toolkit/helper/convert.hxx> #include <tools/fract.hxx> #include <tools/gen.hxx> -#include <svtools/rectitem.hxx> +#include <svl/rectitem.hxx> #include <svtools/soerr.hxx> #include <comphelper/processfactory.hxx> diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index ec782c1750..e8007b6792 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ #include <vcl/metric.hxx> #include <vcl/msgbox.hxx> #include <svtools/printdlg.hxx> -#include <svtools/printwarningoptions.hxx> +#include <unotools/printwarningoptions.hxx> #include <svtools/printoptions.hxx> #include <vector> diff --git a/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx index 899b082c89..b840c40a25 100644 --- a/sfx2/source/view/prnmon.cxx +++ b/sfx2/source/view/prnmon.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,8 +39,8 @@ #include <vcl/msgbox.hxx> #include <svtools/asynclink.hxx> -#include <svtools/printwarningoptions.hxx> -#include <svtools/eitem.hxx> +#include <unotools/printwarningoptions.hxx> +#include <svl/eitem.hxx> #ifndef GCC #endif diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx index bf88a5775d..5d03bb3e61 100644 --- a/sfx2/source/view/topfrm.cxx +++ b/sfx2/source/view/topfrm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,15 +60,15 @@ #include <com/sun/star/beans/XMaterialHolder.hpp> #include <com/sun/star/awt/XWindow2.hpp> #include <vcl/menu.hxx> -#include <svtools/rectitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/rectitem.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> #include <svtools/asynclink.hxx> #include <svtools/sfxecode.hxx> #include <vcl/dialog.hxx> -#include <svtools/urihelper.hxx> -#include <svtools/moduleoptions.hxx> +#include <svl/urihelper.hxx> +#include <unotools/moduleoptions.hxx> #include <unotools/configmgr.hxx> #include <unotools/bootstrap.hxx> @@ -535,7 +535,7 @@ SfxTopFrame* SfxTopFrame::Create( SfxObjectShell* pDoc, USHORT nViewId, BOOL bHi aTitle += String(aProductName); aTitle += ' '; aTitle += String( GetModuleName_Impl( aDocServiceName ) ); -#ifndef PRODUCT +#ifdef DBG_UTIL ::rtl::OUString aDefault; aTitle += DEFINE_CONST_UNICODE(" ["); String aVerId( utl::Bootstrap::getBuildIdData( aDefault )); @@ -549,7 +549,7 @@ SfxTopFrame* SfxTopFrame::Create( SfxObjectShell* pDoc, USHORT nViewId, BOOL bHi /* AS_TITLE pWindow->SetText( aTitle ); */ - + /* AS_ICON if( pWindow->GetType() == WINDOW_WORKWINDOW ) { @@ -1098,7 +1098,7 @@ String SfxTopViewFrame::UpdateTitle() aTitle += ' '; ::rtl::OUString aDocServiceName( GetObjectShell()->GetFactory().GetDocumentServiceName() ); aTitle += String( GetModuleName_Impl( aDocServiceName ) ); -#ifndef PRODUCT +#ifdef DBG_UTIL ::rtl::OUString aDefault; aTitle += DEFINE_CONST_UNICODE(" ["); String aVerId( utl::Bootstrap::getBuildIdData( aDefault )); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 8f406833a5..577c9a8b07 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,13 +44,13 @@ #ifndef _SPLITWIN_HXX //autogen #include <vcl/splitwin.hxx> #endif -#include <svtools/moduleoptions.hxx> -#include <svtools/intitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/slstitm.hxx> -#include <svtools/whiter.hxx> -#include <svtools/undo.hxx> +#include <unotools/moduleoptions.hxx> +#include <svl/intitem.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> +#include <svl/slstitm.hxx> +#include <svl/whiter.hxx> +#include <svl/undo.hxx> #ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif @@ -90,7 +90,7 @@ #include <basic/sbx.hxx> #include <comphelper/storagehelper.hxx> #include <svtools/asynclink.hxx> -#include <svtools/sharecontrolfile.hxx> +#include <svl/sharecontrolfile.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -665,7 +665,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) pNewSet->Put( *pURLItem ); // Filter Detection - SfxMedium aMedium( pURLItem->GetValue(), SFX_STREAM_READWRITE ); + SfxMedium aMedium( pURLItem->GetValue(), SFX_STREAM_READWRITE ); SfxFilterMatcher().GuessFilter( aMedium, &pFilter ); if ( pFilter ) pNewSet->Put( SfxStringItem( SID_FILTER_NAME, pFilter->GetName() ) ); @@ -3471,8 +3471,8 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) { try { - xLMPropSet->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HideCurrentUI" )), + xLMPropSet->setPropertyValue( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HideCurrentUI" )), makeAny( bNewFullScreenMode )); } catch ( ::com::sun::star::beans::UnknownPropertyException& ) diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 0f1ae3d110..b9cb144f27 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,7 +33,7 @@ #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/view/PrintableState.hpp> -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> #ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif @@ -43,13 +43,13 @@ #ifndef _SV_PRNSETUP_HXX //autogen #include <svtools/prnsetup.hxx> #endif -#include <svtools/flagitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> +#include <svl/flagitem.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> #include <sfx2/app.hxx> -#include <svtools/useroptions.hxx> -#include <svtools/printwarningoptions.hxx> +#include <unotools/useroptions.hxx> +#include <unotools/printwarningoptions.hxx> #include <tools/datetime.hxx> #include <sfx2/viewsh.hxx> @@ -785,7 +785,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) ExecPrint_Impl( rReq ); return; } - + pPrinter->SetNextJobIsQuick(); } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index a16439698e..6d92dffdc5 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,12 +30,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include <svtools/stritem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/whiter.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> +#include <svl/whiter.hxx> #include <vcl/msgbox.hxx> #include <vcl/toolbox.hxx> -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> #include <com/sun/star/frame/XLayoutManager.hpp> @@ -55,12 +55,12 @@ #include <vos/mutex.hxx> #include <tools/urlobj.hxx> #include <unotools/tempfile.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <svtools/miscopt.hxx> #include <svtools/soerr.hxx> -#include <svtools/internaloptions.hxx> +#include <unotools/internaloptions.hxx> -#include <svtools/javaoptions.hxx> +#include <unotools/javaoptions.hxx> #include <basic/basmgr.hxx> #include <basic/sbuno.hxx> #include <framework/actiontriggerhelper.hxx> @@ -179,8 +179,8 @@ void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::c } -static ::rtl::OUString RetrieveLabelFromCommand( - const ::rtl::OUString& rCommandURL, +static ::rtl::OUString RetrieveLabelFromCommand( + const ::rtl::OUString& rCommandURL, const css::uno::Reference< css::frame::XFrame >& rFrame ) { static css::uno::WeakReference< frame::XModuleManager > s_xModuleManager; @@ -189,38 +189,38 @@ static ::rtl::OUString RetrieveLabelFromCommand( ::rtl::OUString aLabel; css::uno::Reference< css::frame::XModuleManager > xModuleManager( s_xModuleManager ); css::uno::Reference< css::container::XNameAccess > xNameAccess( s_xNameAccess ); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( + css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( ::comphelper::getProcessServiceFactory(), css::uno::UNO_QUERY_THROW); - + try { if ( !xModuleManager.is() ) { - xModuleManager = css::uno::Reference< css::frame::XModuleManager >( - xSMGR->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ))), + xModuleManager = css::uno::Reference< css::frame::XModuleManager >( + xSMGR->createInstance( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ))), css::uno::UNO_QUERY_THROW ); s_xModuleManager = xModuleManager; } - + ::rtl::OUString aModuleIdentifier = xModuleManager->identify( rFrame ); - + if ( !xNameAccess.is() ) { - xNameAccess = css::uno::Reference< css::container::XNameAccess >( - xSMGR->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ))), + xNameAccess = css::uno::Reference< css::container::XNameAccess >( + xSMGR->createInstance( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ))), css::uno::UNO_QUERY_THROW ); s_xNameAccess = xNameAccess; } - + css::uno::Any a = xNameAccess->getByName( aModuleIdentifier ); css::uno::Reference< css::container::XNameAccess > xUICommands; a >>= xUICommands; rtl::OUString aStr; css::uno::Sequence< css::beans::PropertyValue > aPropSeq; - + a = xUICommands->getByName( rCommandURL ); if ( a >>= aPropSeq ) { @@ -238,7 +238,7 @@ static ::rtl::OUString RetrieveLabelFromCommand( catch ( css::uno::Exception& ) { } - + return aLabel; } @@ -435,9 +435,9 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) if( pItemWin ) pItemWin->GrabFocus(); break; - } + } } - } + } } } } @@ -447,7 +447,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) } rReq.Done(); } - break; + break; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_MAIL_SENDDOCASMS: @@ -766,7 +766,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) if ( bEnabled ) { SfxPrinter *pPrinter = GetPrinter(FALSE); - + if ( SID_PRINTDOCDIRECT == nSID ) { rtl::OUString aPrinterName; @@ -777,15 +777,15 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) if ( aPrinterName.getLength() > 0 ) { uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame()->GetFrameInterface() ); - + ::rtl::OUStringBuffer aBuffer( 60 ); - aBuffer.append( RetrieveLabelFromCommand( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintDefault" )), + aBuffer.append( RetrieveLabelFromCommand( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintDefault" )), xFrame )); aBuffer.appendAscii( " (" ); aBuffer.append( aPrinterName ); aBuffer.appendAscii( ")" ); - + rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) ); } } |