diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2010-01-07 17:58:13 +0100 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2010-01-07 17:58:13 +0100 |
commit | e5d0376c47d22195bab569da37248f1715c189e2 (patch) | |
tree | 7ac9a0e1f8fb3af00ceef8f5794b21d7ee8c559c /sfx2/source | |
parent | 93551bdf06411cbb37acf68192c94a41c146a03c (diff) | |
parent | b0c799c7fbaa93f707bf18a87eb9aef5d86be52c (diff) |
rebase to dev300 m69.
Diffstat (limited to 'sfx2/source')
128 files changed, 1354 insertions, 760 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 53ea87703ac6..8d13066a8340 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 37ba123b2aca..4fe352c3c4bc 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -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 af31659ec24c..5638800a9e4f 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -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 f9698c3b4782..5817337ae60d 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 23de7317c379..e53a4cacdb93 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 ec26ead8a792..f5b3a2e6dca1 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -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 98439eb5a6dc..837ccc461586 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -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> diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx index a65a16e3b518..253311c54f3d 100644 --- a/sfx2/source/appl/appmain.cxx +++ b/sfx2/source/appl/appmain.cxx @@ -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 08a61b1f0ce6..1bb12990cb42 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -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 c6cb16f8f3f6..bf3cb633cf6a 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 16ae1fe236a9..63d33e54997b 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -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 184ecb9f1a5c..4580a11270e0 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 c9814eb50e6a..7fb6ef35167f 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 60beac537e53..23a08e71356f 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -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 e5c93b0bdbba..2bf84f87e973 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 f06ecada0226..3533fb8a428f 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 8ad25458e1b2..f7ff7b161588 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 5f10d4062e68..8a852b44b6f7 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 df47180c9f77..c5412f35d0f6 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -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; } diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index 69b16058db8f..acda2cf312e7 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -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 8a6622636c14..491de2138917 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 91227e3e34ec..48b7ecdd1540 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -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 995b8250e072..52805082de38 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 6b69b5d0fae8..f4108950db22 100644 --- a/sfx2/source/appl/shutdowniconOs2.cxx +++ b/sfx2/source/appl/shutdowniconOs2.cxx @@ -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> diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm index e9326b4a22c2..27aa37e05c74 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 f68d367df658..b9799f5818b7 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> diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 414b400d7377..676a46ab584f 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -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" diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index d2338a9c7226..7287023f1845 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 358c226d6c4a..4b4c17a2c5f2 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -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 4086cf2b1b96..5cb4f0200614 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 96a55c9a95f4..2d1c6db11762 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 121b8604e02d..8f143bb4baee 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 13a75eb05693..794ee142708c 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 daf9174d20cb..763595913fcd 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 0da17ba3b158..7bf2c1c6dfe7 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 1c2c047b228d..f39c480fbdeb 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 f57ca40e8519..fa3330059859 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 ebc621a56bd9..d4149421f161 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 481952409d6c..9d936549b5b3 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 e65c866428e4..0b0a8d2480ed 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 f5794094f15f..f57d3a3d32f2 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 61747fae7d32..ef47fc088e32 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 cba060b812f3..f7bf79f8a0f6 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 fcfd93cbc9ef..7c88c4bef24a 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -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 8f1507a45610..5702103e3398 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 cb7e0f042f0d..527851e7664a 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 190cc47dc2f6..f33f898237f9 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 5ed5569ea336..f7f3f7b14ec9 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 6b92cb0137de..89075b918b42 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 72cc8c659bc4..44d9c7e346cf 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 e0a57c2e5e9e..fe03231c6db7 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -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 94bfb9ba16b6..49647c40e3ee 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 d8bf2085a5d9..3cad63ecb565 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 cf7d04ef0875..0b278a55872b 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 5a0d2f4a69a0..683aedcbf32f 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 848719547ab4..2f9a7574bb2f 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 aac052ff4ae2..07f20b0801b8 100644 --- a/sfx2/source/dialog/intro.cxx +++ b/sfx2/source/dialog/intro.cxx @@ -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 01ed733358d9..211afd11bc6d 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 11d586ea2026..b36a6923184e 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -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> diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx index d5fececf3b38..2e87d2c4a9ba 100644 --- a/sfx2/source/dialog/mailmodelapi.cxx +++ b/sfx2/source/dialog/mailmodelapi.cxx @@ -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> diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 1300f18e37ac..319c3b873b48 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 0e2dc5039a05..05920c07973e 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 c0802b573cc6..29472b65208b 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 c2b13fae76f1..7782b5178d8f 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 f30fef23dbd0..750bf90d175c 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -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 0cbecdc719b0..500d530bab3f 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -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 f8df0ea2b082..7d4e60e117e9 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 80f0daba71b9..1008c76b8d9f 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 fb21ff8463a1..584dd488da56 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 e4475268b57d..111cab903f7e 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 accb6b5c3a37..5d2cf91b0c8f 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -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 ef36831ab681..476d6f5186a5 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 c6e5bfabbe94..8a98a1f8bd70 100644 --- a/sfx2/source/doc/applet.cxx +++ b/sfx2/source/doc/applet.cxx @@ -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> diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src index 3f8ab1ae7177..c914d9fe2927 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 3a00bbe3097a..012109cac21a 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -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 302233a93ad7..108c9f27858a 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -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" @@ -383,6 +383,8 @@ public: Reference < XInputStream > xInputStream; Reference < XStream > xStream; + uno::Reference< io::XStream > m_xLockingStream; + sal_uInt32 nLastStorageError; ::rtl::OUString aCharset; @@ -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& ) @@ -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 { @@ -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 ) + if ( pImp->m_xLockingStream.is() && !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(); + // 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,11 +2751,31 @@ 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 @@ -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(); @@ -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(); diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index ecd9ae7aee42..9615cc4f51a7 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 f1b889821de7..8d96c08a51d4 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -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 3d5ba474fb3e..a00b047230d1 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 f3e7b789a062..bb7d15d0b5b2 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -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 099e649506c0..4439dc05f9ff 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -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 d0c10556abd3..86a86ccb61b4 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -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 6f333586a22e..23616edf9279 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 5916fb625787..bceca0db94ca 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> diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index cffa86c0540d..0fe45c49db95 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 9c14ed84cc7e..6883f0976566 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 efd3f04444ba..3c78bad9220e 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -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 206350fd03d6..fb555c5edeec 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> diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 19873a5d7c7f..630624e857fb 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> @@ -1799,12 +1798,12 @@ sal_Bool SfxObjectShell::SaveTo_Impl typedef struct _EA_ASCII_header { USHORT usAttr; /* value: EAT_ASCII */ USHORT usLen; /* length of data */ - CHAR szType[_MAX_PATH]; /* ASCII data fits in here ... */ + CHAR szType[_MAX_PATH]; /* ASCII data fits in here ... */ } EA_ASCII_HEADER; - char filePath[_MAX_PATH]; - char fileExt[_MAX_PATH]; - char docType[_MAX_PATH]; - int rc; + char filePath[_MAX_PATH]; + char fileExt[_MAX_PATH]; + char docType[_MAX_PATH]; + int rc; oslFileError eRet; ::rtl::OUString aSystemFileURL; const ::rtl::OUString aFileURL = rMedium.GetName(); @@ -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 1f1cbba7d7e0..eb022afc60df 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 950ecf9ea239..91c0f605e453 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> diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index cd8e28ee771c..d61bd4701e1b 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 94370e9a1c52..b156d409c9be 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 03e6e9170153..158dbdb9e13e 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 223f0b767845..4c7a1fcbe102 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 bd782b76a5ae..8b0420ef1e97 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 53b97b2656ff..f8906a7670dd 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 0940d4bb66e3..a720c2369cf5 100644 --- a/sfx2/source/inc/eventsupplier.hxx +++ b/sfx2/source/inc/eventsupplier.hxx @@ -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> //-------------------------------------------------------------------------------------------------------- diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc index 1b2cc2220a28..b8beacafee3a 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 bec875659e28..9abfd70ab663 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 77162423cabe..fed465c69986 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" diff --git a/sfx2/source/inc/plugin.hxx b/sfx2/source/inc/plugin.hxx index bba36717a946..f258ca720b15 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 2ad3670ab014..bc7d267d75d8 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 541fad8c3c2e..6e502bd9d7ad 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 c1ffb7a79a0a..b4ea96c1ed4e 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 f3c466343205..aecb2c0cf4cb 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 a8d84187691e..59b9d29c479d 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 d6ce65c96b6d..de399eaaa956 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 a6d592bf48d5..92454ae62f36 100644 --- a/sfx2/source/layout/sfxtabdialog.cxx +++ b/sfx2/source/layout/sfxtabdialog.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/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 88247a0966e7..0e80cc207ce0 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 f0bb48b54261..076932ba9dea 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 ba27fdcd797d..3d88009e7c0e 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 326431c3ffbd..87f35805d1e7 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 a01b1df73c82..ec542c4af595 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -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" diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index 503995d97b30..df463ac92396 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 0d659826d453..eb9305fc0e49 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 b6e69156214d..29e6b85d67d2 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -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> diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 42e9a1d04cb6..c88297e477f7 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 b91e1e6b4998..b439dca4ffed 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -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 d13beadee9f0..c81b48b20aa2 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 21215fa6e730..d0b83ad619af 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 a8b57be6714b..3e9989760b11 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 c99d45db6397..1ea49ecd879b 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -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 21d484e550ab..f875143bfab0 100644 --- a/sfx2/source/view/prnmon.cxx +++ b/sfx2/source/view/prnmon.cxx @@ -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 01c48f8f2be0..f3596de6b1c2 100644 --- a/sfx2/source/view/topfrm.cxx +++ b/sfx2/source/view/topfrm.cxx @@ -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 )); @@ -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 592926bca1ce..945419189b78 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -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; diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index c944264dd20c..e4a53a8a6e7a 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -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> diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index f6053a467ed4..86c9ba0bb70e 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -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> |