diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-12-17 12:43:22 +0100 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-12-17 12:43:22 +0100 |
commit | 94160afa68a6bf633c5fb14944c5f239187fa7c1 (patch) | |
tree | 65743009389efd14619dc13db601ef7e1d453c7c /sfx2/source | |
parent | 9c5a2fb27f432c2fe4528f2239f560b515d2021c (diff) | |
parent | 213e25168a934890e60546be9c819d16754aaa49 (diff) |
CWS-TOOLING: integrate CWS gnumake2
Diffstat (limited to 'sfx2/source')
120 files changed, 367 insertions, 2604 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 7e4e9921573a..4a1586175e15 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -43,14 +43,10 @@ #include <basic/basrdll.hxx> #include <svtools/asynclink.hxx> #include <svl/stritem.hxx> -#ifndef _SOUND_HXX //autogen #include <vcl/sound.hxx> -#endif #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> @@ -58,8 +54,6 @@ #include <tools/urlobj.hxx> #include <unotools/tempfile.hxx> #include <osl/file.hxx> -#ifndef GCC -#endif #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> @@ -78,23 +72,18 @@ #include <com/sun/star/frame/XFramesSupplier.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <com/sun/star/uri/XUriReferenceFactory.hpp> #include <com/sun/star/uri/XVndSunStarScriptUrl.hpp> - #include <basic/basmgr.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> - #include <rtl/logfile.hxx> - #include <sfx2/appuno.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/request.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "arrdecl.hxx" #include <sfx2/progress.hxx> #include <sfx2/objsh.hxx> @@ -120,9 +109,10 @@ #include <sfx2/module.hxx> #include <sfx2/tbxctrl.hxx> #include <sfx2/sfxdlg.hxx> -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include "eventsupplier.hxx" #include <sfx2/dockwin.hxx> +#include <tools/svlibrary.hxx>
#ifdef DBG_UTIL #include <sfx2/tbxctrl.hxx> @@ -291,7 +281,7 @@ void SfxPropertyHandler::Property( ApplicationProperty& rProp ) #include <framework/imageproducer.hxx> #include <framework/acceleratorinfo.hxx> #include <framework/sfxhelperfunctions.hxx> -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include "fwkhelper.hxx" ::osl::Mutex SfxApplication::gMutex; @@ -736,9 +726,7 @@ extern "C" { static void SAL_CALL thisModule() {} } IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module oslModule handleMod = osl_loadModuleRelative( @@ -827,9 +815,7 @@ SfxApplication::ChooseScript() void SfxApplication::MacroOrganizer( INT16 nTabId ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module oslModule handleMod = osl_loadModuleRelative( diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src index 47750cd73f78..f8a387bba79b 100644 --- a/sfx2/source/appl/app.src +++ b/sfx2/source/appl/app.src @@ -31,6 +31,45 @@ #include "app.hrc" #include "helpid.hrc" +String STR_NONAME +{ + Text [ en-US ] = "Untitled" ; +}; +String STR_CLOSE +{ + Text [ en-US ] = "Close" ; +}; +String STR_STYLE_FILTER_AUTO +{ + Text [ en-US ] = "Automatic" ; +}; +String STR_STANDARD_SHORTCUT +{ + Text [ en-US ] = "Standard" ; +}; +String STR_BYTES +{ + Text [ en-US ] = "Bytes" ; +}; +String STR_KB +{ + Text [ en-US ] = "KB" ; +}; +String STR_MB +{ + Text [ en-US ] = "MB" ; +}; +String STR_GB +{ + Text [ en-US ] = "GB" ; +}; +QueryBox MSG_QUERY_LASTVERSION +{ + Buttons = WB_YES_NO ; + DefButton = WB_DEF_NO ; + Message [ en-US ] = "Cancel all changes?" ; +}; + InfoBox RID_DOCALREADYLOADED_DLG { Message [ en-US ] = "Document already open." ; @@ -891,19 +930,37 @@ Image IMG_MISSING_4 ImageBitmap = Bitmap { File = "sn064.bmp" ; }; }; +String STR_STANDARD +{ + Text [ en-US ] = "Standard" ; +}; + String RID_SVXSTR_FILELINK { Text [ en-US ] = "Document" ; }; + +String STR_NONE +{ + Text [ en-US ] = "- None -" ; +}; String RID_SVXSTR_GRAFIKLINK { Text [ en-US ] = "Graphic" ; }; +String STR_SFX_FILTERNAME_ALL +{ + Text [ en-US ] = "All files (*.*)" ; +}; String RID_SVXSTR_EDITGRFLINK { Text [ en-US ] = "Link graphics" ; }; - +// i66948 used in project scripting +String STR_ERRUNOEVENTBINDUNG +{ + Text [ en-US ] = "An appropriate component method %1\ncould not be found.\n\nCheck spelling of method name."; +}; String RID_SVXSTR_GRFILTER_OPENERROR { Text [ en-US ] = "Graphics file cannot be opened" ; diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 10c4a6bc6797..7e775cbbb502 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -60,7 +60,7 @@ #include "arrdecl.hxx" #include <sfx2/app.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/msg.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/progress.hxx> @@ -69,8 +69,8 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/dispatch.hxx> -#include "tplpitem.hxx" -#include "minfitem.hxx" +#include "sfx2/tplpitem.hxx" +#include "sfx2/minfitem.hxx" #include "app.hrc" #include <sfx2/evntconf.hxx> #include <sfx2/macrconf.hxx> @@ -78,8 +78,8 @@ #include <sfx2/dinfdlg.hxx> #include "appdata.hxx" #include "appbas.hxx" -#include "sfxhelp.hxx" -#include "basmgr.hxx" +#include "sfx2/sfxhelp.hxx" +#include "sfx2/basmgr.hxx" #include "sorgitm.hxx" #include "appbaslib.hxx" #include <basic/basicmanagerrepository.hxx> diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx index 96c998b2674d..7f4e8cedb637 100644..100755 --- a/sfx2/source/appl/appbaslib.cxx +++ b/sfx2/source/appl/appbaslib.cxx @@ -25,6 +25,9 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + #include "appbaslib.hxx" #include <sfx2/sfxuno.hxx> diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 0b5e94ea24f0..c876db373d35 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -78,7 +78,7 @@ #include <sfx2/app.hxx> #include <sfx2/docfile.hxx> #include <sfx2/viewfrm.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "sfxtypes.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> @@ -91,7 +91,7 @@ #include <sfx2/macrconf.hxx> #include "helper.hxx" // SfxContentHelper::... #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "shutdownicon.hxx" using namespace ::com::sun::star::uno; diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index 38ea69280c49..32b56717293c 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -57,7 +57,7 @@ #include <sfx2/request.hxx> #include "referers.hxx" #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "objshimp.hxx" #include <sfx2/appuno.hxx> #include "imestatuswindow.hxx" diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 08023c5414a6..2aa19901d87c 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -65,9 +65,6 @@ #include <rtl/logfile.hxx> #include <vcl/edit.hxx> -#ifndef GCC -#endif - #include <sfx2/unoctitm.hxx> #include "app.hrc" #include "sfxlocal.hrc" @@ -81,14 +78,15 @@ #include <sfx2/mnumgr.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/progress.hxx> -#include "sfxhelp.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxhelp.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxtypes.hxx" #include <sfx2/viewsh.hxx> #include "nochaos.hxx" #include <sfx2/fcontnr.hxx> #include "helper.hxx" // SfxContentHelper::Kill() #include "sfxpicklist.hxx" +#include <tools/svlibrary.hxx>
#ifdef UNX #define stricmp(a,b) strcmp(a,b) @@ -215,10 +213,7 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont) { bDetermineFunction = true; - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "cui" ) ) ); - - rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "cui" ) ) );
oslModule handleMod = osl_loadModuleRelative( &thisModule, aLibName.pData, 0 ); diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx index cf097b900b52..546b6b1c6558 100644 --- a/sfx2/source/appl/appmain.cxx +++ b/sfx2/source/appl/appmain.cxx @@ -53,7 +53,7 @@ #include <sfx2/app.hxx> #include "arrdecl.hxx" #include <sfx2/dispatch.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/fcontnr.hxx> #include <sfx2/viewsh.hxx> #include "intro.hxx" diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 70147e8d9146..94b921f8122e 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -64,12 +64,12 @@ #include <unotools/moduleoptions.hxx> #include <osl/file.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/app.hxx> #include "appdata.hxx" #include "arrdecl.hxx" #include <sfx2/tbxctrl.hxx> -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include <sfx2/mnuitem.hxx> #include <sfx2/docfac.hxx> #include <sfx2/docfile.hxx> diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 807834ca41a5..0f4c1f651082 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -98,7 +98,7 @@ #include <sfx2/passwd.hxx> #include "referers.hxx" #include <sfx2/request.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/viewsh.hxx> #include "app.hrc" #include <sfx2/viewfrm.hxx> diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index 7399742d1e94..e7d0fd70bf58 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -50,7 +50,7 @@ #include <sfx2/dispatch.hxx> #include <sfx2/printer.hxx> #include "arrdecl.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/event.hxx> #include <sfx2/macrconf.hxx> #include <sfx2/mnumgr.hxx> diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx index addace134362..9fd2dfc696d3 100644 --- a/sfx2/source/appl/appreg.cxx +++ b/sfx2/source/appl/appreg.cxx @@ -36,11 +36,11 @@ #include <sfx2/app.hxx> #include "appdata.hxx" #include "arrdecl.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/templdlg.hxx> #include "objmnctl.hxx" #include "inettbc.hxx" -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include <sfx2/navigat.hxx> #include <sfx2/taskpane.hxx> #include <sfx2/module.hxx> diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 439396d2ffa7..c1858c5b33fb 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include <com/sun/star/uno/Reference.hxx> -#ifndef _COM_SUN_STAR_LANG_XMultiServiceFactory_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/frame/DispatchResultEvent.hpp> #include <com/sun/star/frame/DispatchResultState.hpp> @@ -40,9 +38,7 @@ #include <com/sun/star/frame/XDispatchHelper.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> #include <com/sun/star/util/XCloseable.hpp> -#ifndef _COM_SUN_STAR_UTIL_CloseVetoException_HPP_ #include <com/sun/star/util/CloseVetoException.hpp> -#endif #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/embed/XStorage.hpp> @@ -118,12 +114,12 @@ #include <sfx2/sfx.hrc> #include "app.hrc" #include <sfx2/passwd.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "arrdecl.hxx" #include <sfx2/childwin.hxx> #include "appdata.hxx" #include <sfx2/macrconf.hxx> -#include "minfitem.hxx" +#include "sfx2/minfitem.hxx" #include <sfx2/event.hxx> #include <sfx2/module.hxx> #include <sfx2/viewfrm.hxx> @@ -132,7 +128,8 @@ #include <sfx2/sfxdlg.hxx> #include <sfx2/dialogs.hrc> #include "sorgitm.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" +#include <tools/svlibrary.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star::beans; @@ -749,9 +746,7 @@ extern "C" { static void SAL_CALL thisModule() {} } ::rtl::OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc = ::rtl::OUString() ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module oslModule handleMod = osl_loadModuleRelative( @@ -771,9 +766,7 @@ extern "C" { static void SAL_CALL thisModule() {} } void MacroOrganizer( INT16 nTabId ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module oslModule handleMod = osl_loadModuleRelative( diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 8d1ac08844bf..60b684d7385f 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -52,9 +52,7 @@ #include <basic/sbxobj.hxx> #include <basic/sberrors.hxx> #include <basic/basmgr.hxx> -#ifndef _BASIC_SBUNO_HXX #include <basic/sbuno.hxx> -#endif #include <basic/sbxcore.hxx> #include <svl/ownlist.hxx> @@ -97,6 +95,7 @@ #include <osl/mutex.hxx> #include <comphelper/sequence.hxx> #include <rtl/ustrbuf.hxx> +#include <comphelper/interaction.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::ucb; @@ -106,9 +105,6 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::io; -#ifndef GCC -#endif - #include "sfxtypes.hxx" #include <sfx2/sfxuno.hxx> #include <sfx2/app.hxx> @@ -131,7 +127,7 @@ using namespace ::com::sun::star::io; #include "fltoptint.hxx" #include <sfx2/docfile.hxx> #include <sfx2/sfxbasecontroller.hxx> -#include "brokenpackageint.hxx" +#include <sfx2/brokenpackageint.hxx> #include "eventsupplier.hxx" #include "xpackcreator.hxx" #include "plugin.hxx" @@ -139,7 +135,6 @@ using namespace ::com::sun::star::io; #include <ownsubfilterservice.hxx> #include "SfxDocumentMetaData.hxx" - #define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader" #define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler" @@ -2268,18 +2263,18 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::FilterOptionsRequest aOptionsRequest( temp, - temp2, + temp2, rModel, rProperties ); - m_aRequest <<= aOptionsRequest; + m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; - m_pOptions = new FilterOptionsContinuation; + m_pAbort = new comphelper::OInteractionAbort; + m_pOptions = new FilterOptionsContinuation; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); } ::com::sun::star::uno::Any SAL_CALL RequestFilterOptions::getRequest() @@ -2296,107 +2291,139 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: } //========================================================================= +class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionApprove* m_pApprove; + comphelper::OInteractionDisapprove* m_pDisapprove; -RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) +public: + RequestPackageReparation_Impl( ::rtl::OUString aName ); + sal_Bool isApproved(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +RequestPackageReparation_Impl::RequestPackageReparation_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); - - m_aRequest <<= aBrokenPackageRequest; + temp2, + aName ); + m_aRequest <<= aBrokenPackageRequest; + m_pApprove = new comphelper::OInteractionApprove; + m_pDisapprove = new comphelper::OInteractionDisapprove; + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); +} - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; +sal_Bool RequestPackageReparation_Impl::isApproved() +{ + return m_pApprove->wasSelected(); +} - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); +::com::sun::star::uno::Any SAL_CALL RequestPackageReparation_Impl::getRequest() + throw( ::com::sun::star::uno::RuntimeException ) +{ + return m_aRequest; } -/*uno::*/Any SAL_CALL RequestPackageReparation::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > + SAL_CALL RequestPackageReparation_Impl::getContinuations() + throw( ::com::sun::star::uno::RuntimeException ) { - return ::cppu::queryInterface ( rType, - // OWeakObject interfaces - dynamic_cast< XInterface* > ( (XInteractionRequest *) this ), - static_cast< XWeak* > ( this ), - // my own interfaces - static_cast< XInteractionRequest* > ( this ) ); + return m_lContinuations; } -void SAL_CALL RequestPackageReparation::acquire( ) throw () +RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) { - OWeakObject::acquire(); + pImp = new RequestPackageReparation_Impl( aName ); + pImp->acquire(); } -void SAL_CALL RequestPackageReparation::release( ) throw () +RequestPackageReparation::~RequestPackageReparation() { - OWeakObject::release(); + pImp->release(); } -::com::sun::star::uno::Any SAL_CALL RequestPackageReparation::getRequest() - throw( ::com::sun::star::uno::RuntimeException ) +sal_Bool RequestPackageReparation::isApproved() { - return m_aRequest; + return pImp->isApproved(); } -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL RequestPackageReparation::getContinuations() - throw( ::com::sun::star::uno::RuntimeException ) +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > RequestPackageReparation::GetRequest() { - return m_lContinuations; + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); } //========================================================================= +class NotifyBrokenPackage_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionAbort* m_pAbort; -NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) +public: + NotifyBrokenPackage_Impl( ::rtl::OUString aName ); + sal_Bool isAborted(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); - - m_aRequest <<= aBrokenPackageRequest; - - m_pAbort = new ContinuationAbort; + temp2, + aName ); + m_aRequest <<= aBrokenPackageRequest; + m_pAbort = new comphelper::OInteractionAbort; + m_lContinuations.realloc( 1 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); +} - m_lContinuations.realloc( 1 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); +sal_Bool NotifyBrokenPackage_Impl::isAborted() +{ + return m_pAbort->wasSelected(); } -/*uno::*/Any SAL_CALL NotifyBrokenPackage::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage_Impl::getRequest() + throw( ::com::sun::star::uno::RuntimeException ) { - return ::cppu::queryInterface ( rType, - // OWeakObject interfaces - dynamic_cast< XInterface* > ( (XInteractionRequest *) this ), - static_cast< XWeak* > ( this ), - // my own interfaces - static_cast< XInteractionRequest* > ( this ) ); + return m_aRequest; } -void SAL_CALL NotifyBrokenPackage::acquire( ) throw () +::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > + SAL_CALL NotifyBrokenPackage_Impl::getContinuations() + throw( ::com::sun::star::uno::RuntimeException ) { - OWeakObject::acquire(); + return m_lContinuations; } -void SAL_CALL NotifyBrokenPackage::release( ) throw () +NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) { - OWeakObject::release(); + pImp = new NotifyBrokenPackage_Impl( aName ); + pImp->acquire(); } -::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage::getRequest() - throw( ::com::sun::star::uno::RuntimeException ) +NotifyBrokenPackage::~NotifyBrokenPackage() { - return m_aRequest; + pImp->release(); } -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL NotifyBrokenPackage::getContinuations() - throw( ::com::sun::star::uno::RuntimeException ) +sal_Bool NotifyBrokenPackage::isAborted() { - return m_lContinuations; + return pImp->isAborted(); } +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > NotifyBrokenPackage::GetRequest() +{ + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); +} diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 294d6ef17da5..cb53305e4b01 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -48,7 +48,7 @@ #include <comphelper/processfactory.hxx> #include <sfx2/linkmgr.hxx> #include <sfx2/opengrf.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "fileobj.hxx" #include "app.hrc" diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index 3b26eae1858d..b9f4404d5555 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/ui/XImageManager.hpp> #include <com/sun/star/frame/XModuleManager.hpp> @@ -41,7 +41,7 @@ #include <rtl/ustring.hxx> #include <rtl/logfile.hxx> -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include <sfx2/app.hxx> #include <sfx2/unoctitm.hxx> #include <sfx2/dispatch.hxx> diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 20b7abb5d087..479e8ddea745 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -45,7 +45,7 @@ #include "dde.hrc" #include <sfx2/lnkbase.hxx> #include <sfx2/linkmgr.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index ce69ba225157..934b4051a638 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -50,7 +50,7 @@ #include "fileobj.hxx" #include "impldde.hxx" #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 314832e2249d..6a51783a8a04 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -37,7 +37,7 @@ #include <sfx2/linkmgr.hxx> #include <vcl/svapp.hxx> #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/filedlghelper.hxx> #include <tools/debug.hxx> #include <svl/svdde.hxx> diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk deleted file mode 100644 index 30f74355077a..000000000000 --- a/sfx2/source/appl/makefile.mk +++ /dev/null @@ -1,158 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=appl -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# w.g. compilerbugs -.IF "$(GUI)"=="WNT" -.IF "$(COM)"!="GCC" -CFLAGS+=-Od -CFLAGS+=-DENABLE_QUICKSTART_APPLET -.ENDIF -.ENDIF - -.IF "$(GUIBASE)"=="aqua" -CFLAGS+=-DENABLE_QUICKSTART_APPLET -.ENDIF - -.IF "$(GUI)"=="UNX" - CDEFS+=-DDLL_NAME=libsfx$(DLLPOSTFIX)$(DLLPOST) -.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE" - PKGCONFIG_MODULES=gtk+-2.0 - .INCLUDE: pkg_config.mk - CFLAGS+=$(PKGCONFIG_CFLAGS) - CFLAGS+=-DENABLE_QUICKSTART_APPLET - CDEFS+=-DPLUGIN_NAME=libqstart_gtk$(DLLPOSTFIX)$(DLLPOST) -.ENDIF # "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -.ELSE - CDEFS+=-DDLL_NAME=sfx$(DLLPOSTFIX)$(DLLPOST) -.ENDIF - -# --- Files -------------------------------------------------------- - -SRS1NAME=appl -SRC1FILES = \ - app.src newhelp.src dde.src - -SRS2NAME=sfx -SRC2FILES = \ - sfx.src - -SFX_OBJECTS = \ - $(SLO)$/app.obj \ - $(SLO)$/appbas.obj \ - $(SLO)$/appcfg.obj \ - $(SLO)$/appchild.obj \ - $(SLO)$/appdata.obj \ - $(SLO)$/appdde.obj \ - $(SLO)$/appinit.obj \ - $(SLO)$/appmain.obj \ - $(SLO)$/appmisc.obj \ - $(SLO)$/appopen.obj \ - $(SLO)$/appquit.obj \ - $(SLO)$/appreg.obj \ - $(SLO)$/appserv.obj \ - $(SLO)$/appuno.obj \ - $(SLO)$/appbaslib.obj \ - $(SLO)$/childwin.obj \ - $(SLO)$/fileobj.obj \ - $(SLO)$/helpdispatch.obj \ - $(SLO)$/helpinterceptor.obj \ - $(SLO)$/imagemgr.obj\ - $(SLO)$/imestatuswindow.obj \ - $(SLO)$/impldde.obj \ - $(SLO)$/linkmgr2.obj \ - $(SLO)$/linksrc.obj \ - $(SLO)$/lnkbase2.obj \ - $(SLO)$/module.obj \ - $(SLO)$/newhelp.obj \ - $(SLO)$/opengrf.obj \ - $(SLO)$/sfxhelp.obj \ - $(SLO)$/sfxpicklist.obj \ - $(SLO)$/shutdownicon.obj \ - $(SLO)$/shutdowniconw32.obj \ - $(SLO)$/workwin.obj \ - $(SLO)$/xpackcreator.obj \ - $(SLO)$/fwkhelper.obj - -.IF "$(GUI)"=="OS2" -SFX_OBJECTS += $(SLO)$/shutdowniconOs2.obj -.ENDIF - -.IF "$(GUIBASE)"=="aqua" -SFX_OBJECTS += $(SLO)$/shutdowniconaqua.obj -.ENDIF - -SLOFILES = $(SFX_OBJECTS) -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1OBJFILES= $(SFX_OBJECTS) - -.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -QUICKSTART_OBJECTS = $(SLO)$/shutdowniconunx.obj -SLOFILES += $(QUICKSTART_OBJECTS) - -LIB2TARGET= $(SLB)$/quickstart.lib -LIB2OBJFILES= $(QUICKSTART_OBJECTS) -.ENDIF - -.IF "$(GUI)"=="OS2" -SLOFILES += $(SLO)$/shutdowniconOs2.obj -.ENDIF - -EXCEPTIONSFILES=\ - $(SLO)$/imagemgr.obj \ - $(SLO)$/appopen.obj \ - $(SLO)$/appmain.obj \ - $(SLO)$/appmisc.obj \ - $(SLO)$/appinit.obj \ - $(SLO)$/appcfg.obj \ - $(SLO)$/fileobj.obj \ - $(SLO)$/helpinterceptor.obj \ - $(SLO)$/newhelp.obj \ - $(SLO)$/opengrf.obj \ - $(SLO)$/sfxhelp.obj \ - $(SLO)$/shutdownicon.obj \ - $(SLO)$/shutdowniconw32.obj \ - $(SLO)$/sfxpicklist.obj \ - $(SLO)$/helpdispatch.obj \ - $(SLO)$/xpackcreator.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index 895263ef4783..ba91d9c1117b 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -38,10 +38,10 @@ #include <sfx2/module.hxx> #include <sfx2/app.hxx> #include "arrdecl.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/msgpool.hxx> #include <sfx2/tbxctrl.hxx> -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include <sfx2/mnuitem.hxx> #include <sfx2/childwin.hxx> #include <sfx2/mnumgr.hxx> diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 1d79b89a776d..96f4c6b91f5b 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -30,16 +30,16 @@ #include "newhelp.hxx" #include <sfx2/sfxuno.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "helpinterceptor.hxx" #include "helper.hxx" #include <sfx2/msgpool.hxx> #include <sfx2/app.hxx> #include "sfxtypes.hxx" #include "panelist.hxx" -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "srchdlg.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "app.hrc" #include "newhelp.hrc" diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index fd2043a9a431..328bca2522b5 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -54,7 +54,7 @@ #include <unotools/pathoptions.hxx> #include <sfx2/opengrf.hxx> #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" //----------------------------------------------------------------------------- diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src index 7d4bb0db1726..c3b734e327de 100644 --- a/sfx2/source/appl/sfx.src +++ b/sfx2/source/appl/sfx.src @@ -27,107 +27,16 @@ #include <sfx2/sfx.hrc> -String STR_NONAME -{ - Text [ en-US ] = "Untitled" ; -}; - -String STR_NONE -{ - Text [ en-US ] = "- None -" ; -}; - -String STR_CLOSE -{ - Text [ en-US ] = "Close" ; -}; - -String STR_STYLE_FILTER_AUTO -{ - Text [ en-US ] = "Automatic" ; -}; - String STR_STYLE_FILTER_USED { Text [ en-US ] = "Applied Styles" ; }; - - - String STR_STYLE_FILTER_USERDEF { Text [ en-US ] = "Custom Styles" ; }; - String STR_STYLE_FILTER_ALL { Text [ en-US ] = "All Styles" ; }; -String STR_STANDARD -{ - Text [ en-US ] = "Standard" ; -}; -String STR_STANDARD_SHORTCUT -{ - Text [ en-US ] = "Standard" ; -}; - -String STR_SFX_FILTERNAME_ALL -{ - Text [ en-US ] = "All files (*.*)" ; -}; - -String STR_BYTES -{ - Text [ en-US ] = "Bytes" ; -}; - -String STR_KB -{ - Text [ en-US ] = "KB" ; -}; - -String STR_MB -{ - Text [ en-US ] = "MB" ; -}; - - -String STR_GB -{ - Text [ en-US ] = "GB" ; -}; - -String STR_UNDO -{ - Text [ en-US ] = "Undo: " ; -}; - -String STR_REDO -{ - Text [ en-US ] = "Re~do: " ; -}; - -String STR_REPEAT -{ - Text [ en-US ] = "~Repeat: " ; -}; - -String RID_STR_NEW_TASK -{ - Text [ en-US ] = "New task"; -}; -QueryBox MSG_QUERY_LASTVERSION -{ - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Cancel all changes?" ; -}; - -// i66948 used in project scripting -String STR_ERRUNOEVENTBINDUNG -{ - Text [ en-US ] = "An appropriate component method %1\ncould not be found.\n\nCheck spelling of method name."; -}; - diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index a12ced237f55..bab37281cb05 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" + #include <set> #include <algorithm> #include <com/sun/star/uno/Reference.h> @@ -70,7 +71,9 @@ #include <svl/svstdarr.hxx> #include "newhelp.hxx" -#include "sfxresid.hxx" +#include <sfx2/objsh.hxx> +#include <sfx2/docfac.hxx> +#include "sfx2/sfxresid.hxx" #include "helper.hxx" #include "app.hrc" #include <sfx2/sfxuno.hxx> diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 3fce25e7e0d6..3c323b05fd72 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -69,7 +69,7 @@ #endif #include <vcl/timer.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; @@ -80,7 +80,11 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::com::sun::star::ui::dialogs; using namespace ::vos; +#ifdef WNT +using ::rtl::OUString; +#else using namespace ::rtl; +#endif using namespace ::sfx2; #ifdef ENABLE_QUICKSTART_APPLET @@ -89,6 +93,10 @@ extern "C" { static void SAL_CALL thisModule() {} } # endif #endif +#if defined(UNX) && defined(ENABLE_SYSTRAY_GTK) +#define PLUGIN_NAME "libqstart_gtkli.so" +#endif + class SfxNotificationListener_Impl : public cppu::WeakImplHelper1< XDispatchResultListener > { public: diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index f9a388deee5c..2224643bc88f 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -47,7 +47,7 @@ #include <sfx2/viewsh.hxx> #include "splitwin.hxx" #include <sfx2/msgpool.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/objsh.hxx> #include <sfx2/request.hxx> // SFX_ITEMSET_SET #include <vcl/taskpanelist.hxx> diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index d11b8b5130ed..12f824ea4255 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -110,7 +110,7 @@ using namespace ::vos; #include <svtools/sfxecode.hxx> #include <unotools/syslocale.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "sfxbasic.hxx" #include <sfx2/docfilt.hxx> #include <sfx2/docfac.hxx> @@ -120,7 +120,7 @@ using namespace ::vos; #include <sfx2/progress.hxx> #include "openflag.hxx" #include "bastyp.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/doctempl.hxx> #include <sfx2/frame.hxx> #include <sfx2/dispatch.hxx> diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index df81eb3f4039..e17151c6e322 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -46,7 +46,7 @@ #include <sfx2/app.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/docfile.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/objsh.hxx> #include <sfx2/sfx.hrc> #include "bastyp.hrc" diff --git a/sfx2/source/bastyp/makefile.mk b/sfx2/source/bastyp/makefile.mk deleted file mode 100644 index 75c0cace40d6..000000000000 --- a/sfx2/source/bastyp/makefile.mk +++ /dev/null @@ -1,66 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=bastyp -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES =\ - $(SLO)$/sfxhtml.obj \ - $(SLO)$/frmhtml.obj \ - $(SLO)$/frmhtmlw.obj \ - $(SLO)$/misc.obj \ - $(SLO)$/progress.obj \ - $(SLO)$/sfxresid.obj \ - $(SLO)$/bitset.obj \ - $(SLO)$/minarray.obj \ - $(SLO)$/fltfnc.obj \ - $(SLO)$/mieclip.obj \ - $(SLO)$/fltlst.obj \ - $(SLO)$/helper.obj - -SRS1NAME=$(TARGET) -SRC1FILES =\ - fltfnc.src \ - bastyp.src - -EXCEPTIONSFILES =\ - $(SLO)$/helper.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx index ee2b15d34ab9..4154ddc6301b 100644 --- a/sfx2/source/bastyp/mieclip.cxx +++ b/sfx2/source/bastyp/mieclip.cxx @@ -33,7 +33,7 @@ #include <sot/storage.hxx> #include <sot/formats.hxx> -#include <mieclip.hxx> +#include <sfx2/mieclip.hxx> #include <sfx2/sfxuno.hxx> MSE40HTMLClipFormatObj::~MSE40HTMLClipFormatObj() diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index 3af0ba2b0a6f..9650c8155d84 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -51,7 +51,7 @@ #include "sfxtypes.hxx" #include <sfx2/docfile.hxx> #include "workwin.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "bastyp.hrc" #include <sfx2/msg.hxx> diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx index 11ab5a724099..cf1cd983f76e 100644 --- a/sfx2/source/bastyp/sfxresid.cxx +++ b/sfx2/source/bastyp/sfxresid.cxx @@ -32,7 +32,7 @@ #endif #include <tools/simplerm.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/app.hxx> // ----------------------------------------------------------------------- diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx index 9935c3a18c8b..8da7e4f10ce1 100644 --- a/sfx2/source/config/evntconf.cxx +++ b/sfx2/source/config/evntconf.cxx @@ -28,35 +28,27 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include <vcl/msgbox.hxx> -#ifndef _SV_RESARY_HXX #include <tools/resary.hxx> -#endif #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 <sot/storage.hxx> #include <unotools/securityoptions.hxx> -#ifndef _RTL_USTRING_ #include <rtl/ustring.h> -#endif - #include <com/sun/star/uno/Any.hxx> #include <framework/eventsconfiguration.hxx> #include <comphelper/processfactory.hxx> - #include <sfx2/evntconf.hxx> - #include <sfx2/macrconf.hxx> #include <sfx2/docfile.hxx> #include <sfx2/app.hxx> #include <sfx2/objsh.hxx> #include <sfx2/dispatch.hxx> #include "config.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "eventsupplier.hxx" #include <com/sun/star/beans/PropertyValue.hpp> diff --git a/sfx2/source/config/makefile.mk b/sfx2/source/config/makefile.mk deleted file mode 100644 index d090babd1505..000000000000 --- a/sfx2/source/config/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=config -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/evntconf.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 444be02127b3..c08d713547a0 100644..100755 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -57,7 +57,7 @@ // wg. nAutoPageID #include "appdata.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/minstack.hxx> #include <sfx2/msg.hxx> diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx index 9e8657ae0c82..079c7180ac1a 100644 --- a/sfx2/source/control/macrconf.cxx +++ b/sfx2/source/control/macrconf.cxx @@ -59,8 +59,8 @@ #include <sfx2/app.hxx> #include <sfx2/objsh.hxx> #include <sfx2/dispatch.hxx> -#include "minfitem.hxx" -#include "imgmgr.hxx" +#include "sfx2/minfitem.hxx" +#include "sfx2/imgmgr.hxx" #include <sfx2/evntconf.hxx> #include <sfx2/docfile.hxx> #include <sfx2/genlink.hxx> diff --git a/sfx2/source/control/makefile.mk b/sfx2/source/control/makefile.mk deleted file mode 100644 index 86797589e3aa..000000000000 --- a/sfx2/source/control/makefile.mk +++ /dev/null @@ -1,73 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=control -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# w.g. compilerbugs -.IF "$(GUI)"=="WNT" -.IF "$(COM)"!="GCC" -CFLAGS+=-Od -.ENDIF -.ENDIF - -.IF "$(COM)"=="GCC" -CFLAGS+=-O0 -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/bindings.obj \ - $(SLO)$/ctrlitem.obj \ - $(SLO)$/dispatch.obj \ - $(SLO)$/macrconf.obj \ - $(SLO)$/macro.obj \ - $(SLO)$/minfitem.obj \ - $(SLO)$/msg.obj \ - $(SLO)$/msgpool.obj \ - $(SLO)$/objface.obj \ - $(SLO)$/querystatus.obj \ - $(SLO)$/request.obj \ - $(SLO)$/sfxstatuslistener.obj \ - $(SLO)$/shell.obj \ - $(SLO)$/sorgitm.obj \ - $(SLO)$/statcach.obj \ - $(SLO)$/unoctitm.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx index 0c0c0124b612..b0cdd58d2645 100644 --- a/sfx2/source/control/minfitem.cxx +++ b/sfx2/source/control/minfitem.cxx @@ -30,10 +30,7 @@ // INCLUDE --------------------------------------------------------------- -#ifndef GCC -#endif - -#include "minfitem.hxx" +#include "sfx2/minfitem.hxx" // STATIC DATA ----------------------------------------------------------- diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx index f1abd25a5413..10359ba20f73 100644 --- a/sfx2/source/control/msgpool.cxx +++ b/sfx2/source/control/msgpool.cxx @@ -41,7 +41,7 @@ #include <sfx2/objface.hxx> #include "sfxtypes.hxx" #include <sfx2/macrconf.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "arrdecl.hxx" #include <sfx2/module.hxx> diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index 0692b99b8adb..d0ce2abae773 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -39,7 +39,7 @@ #include <sfx2/msg.hxx> #include <sfx2/app.hxx> #include <sfx2/msgpool.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/minarray.hxx> #include <sfx2/objsh.hxx> diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index 8688740ce0fb..bee4a5c87675 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -44,7 +44,7 @@ #include <com/sun/star/frame/status/ItemState.hpp> #include <com/sun/star/frame/status/Visibility.hpp> -using namespace ::rtl; +using ::rtl::OUString; using namespace ::cppu; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index f6bb2b2c3004..c2cf5f164e7c 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -50,7 +50,7 @@ #include <sfx2/unoctitm.hxx> #include <sfx2/msgpool.hxx> -using namespace ::rtl; +using ::rtl::OUString; using namespace ::cppu; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index e53f1766b7b9..f85d0d8e9e49 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -463,7 +463,7 @@ void SfxOfficeDispatch::SetMasterUnoCommand( sal_Bool bSet ) sal_Bool SfxOfficeDispatch::IsMasterUnoCommand() const { if ( pControllerItem ) - pControllerItem->isMasterSlaveCommand(); + return pControllerItem->isMasterSlaveCommand(); return sal_False; } diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx index 7d868eb97362..ea7b0a2bb0bd 100644 --- a/sfx2/source/dialog/about.cxx +++ b/sfx2/source/dialog/about.cxx @@ -29,7 +29,6 @@ #include "precompiled_sfx2.hxx" // include --------------------------------------------------------------- -#include <aboutbmpnames.hxx> #ifndef _SV_APP_HXX #include <vcl/svapp.hxx> @@ -114,7 +113,7 @@ Image SfxApplication::GetApplicationLogo() { Image aAppLogo; - rtl::OUString aAbouts( RTL_CONSTASCII_USTRINGPARAM( ABOUT_BITMAP_STRINGLIST ) ); + rtl::OUString aAbouts; bool bLoaded = false; sal_Int32 nIndex = 0; do diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index 6fd765dcb616..13a0433b7be5 100644 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include "alienwarn.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "alienwarn.hrc" diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index df1f13155513..5a7f8a1fd900 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -47,9 +47,9 @@ #include <sfx2/dispatch.hxx> #include <sfx2/childwin.hxx> #include <sfx2/viewsh.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "workwin.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "dialog.hrc" using namespace ::com::sun::star::uno; diff --git a/sfx2/source/dialog/dinfedt.cxx b/sfx2/source/dialog/dinfedt.cxx index 85f9f955e355..5c250f7cc912 100644 --- a/sfx2/source/dialog/dinfedt.cxx +++ b/sfx2/source/dialog/dinfedt.cxx @@ -31,8 +31,8 @@ #ifndef GCC #endif -#include "dinfedt.hxx" -#include "sfxresid.hxx" +#include "sfx2/dinfedt.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfx.hrc> #include "dinfedt.hrc" diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 0864b0e18c2b..4f55dfde21a7 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -44,7 +44,7 @@ #include "workwin.hxx" #include "splitwin.hxx" #include <sfx2/viewsh.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/objsh.hxx> #include <sfx2/msgpool.hxx> diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 5045f1e9d75c..c3624f50191a 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -91,7 +91,7 @@ #include <sfx2/docfac.hxx> #include "openflag.hxx" #include <sfx2/passwd.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxsids.hrc> #include "filedlghelper.hrc" #include "filtergrouping.hxx" diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index ea2429be8157..ab75d777c5ff 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -32,7 +32,7 @@ #include <sfx2/filedlghelper.hxx> #include <sfx2/sfx.hrc> #include <sfx2/docfac.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <osl/thread.h> #include <com/sun/star/ui/dialogs/XFilterGroupManager.hpp> #include <com/sun/star/beans/StringPair.hpp> diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index dfd099f6cf45..8c05fa424263 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -47,9 +47,7 @@ #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/security/CertificateValidity.hpp> -#ifndef _COM_SUN_STAR_SECURITY_DOCUMENTSIGNATURESINFORMATION_HPP_ #include <com/sun/star/security/DocumentSignatureInformation.hpp> -#endif #include <com/sun/star/security/XDocumentDigitalSignatures.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XDispatch.hpp> @@ -57,15 +55,15 @@ #include <com/sun/star/ucb/InsertCommandArgument.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/document/XExporter.hpp> - +#include <rtl/textenc.h> #include <rtl/uri.h> #include <rtl/uri.hxx> #include <rtl/ustrbuf.hxx> #include <vcl/msgbox.hxx> -#include <mailmodelapi.hxx> +#include <sfx2/mailmodelapi.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxsids.hrc> #include "dialog.hrc" diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx deleted file mode 100644 index 223807d37b11..000000000000 --- a/sfx2/source/dialog/mailmodelapi.cxx +++ /dev/null @@ -1,693 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sfx2.hxx" -// includes -------------------------------------------------------------- -#include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/io/XActiveDataSink.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/mozilla/XPluginInstance.hpp> -#include <com/sun/star/ucb/XDataContainer.hpp> -#include <com/sun/star/ucb/CommandAbortedException.hpp> -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/util/XURLTransformer.hpp> -#include <com/sun/star/frame/XStorable.hpp> -#include <com/sun/star/frame/XDispatchProvider.hpp> -#include <com/sun/star/frame/XDispatch.hpp> -#include <com/sun/star/util/XModifiable.hpp> -#include <com/sun/star/system/XSimpleMailClientSupplier.hpp> -#include <com/sun/star/system/SimpleMailClientFlags.hpp> -#include <com/sun/star/frame/XModuleManager.hpp> -#ifndef _RTL_TEXTENC_H -#include <rtl/textench.h> -#endif -#include <vos/mutex.hxx> -#include <rtl/uri.h> -#include <rtl/uri.hxx> -#include <rtl/ustrbuf.hxx> -#include <unotools/streamhelper.hxx> -#include <unotools/configitem.hxx> -#include <comphelper/mediadescriptor.hxx> -#include <vos/thread.hxx> -#include <vcl/msgbox.hxx> - -#include "mailmodelapi.hxx" -#include <sfx2/docfilt.hxx> -#include <sfx2/docfac.hxx> -#include "sfxtypes.hxx" - -#include "dialog.hrc" -#include "sfxresid.hxx" -#include <sfx2/sfxuno.hxx> -#include <sfx2/fcontnr.hxx> -#include "guisaveas.hxx" - -#include <unotools/tempfile.hxx> -#include <vcl/svapp.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> -#include <toolkit/helper/vclunohelper.hxx> -#include <tools/urlobj.hxx> - -// -------------------------------------------------------------- -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::io; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::mozilla; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::util; -using namespace ::com::sun::star::system; -using namespace ::rtl; - -namespace -{ - // functions ------------------------------------------------------------- - - BOOL CreateFromAddress_Impl( String& rFrom ) - - /* [Beschreibung] - - Diese Funktion versucht mit Hilfe des IniManagers eine From-Adresse - zu erzeugen. daf"ur werden die Felder 'Vorname', 'Name' und 'EMail' - aus der Applikations-Ini-Datei ausgelesen. Sollten diese Felder - nicht gesetzt sein, wird FALSE zur"uckgegeben. - - [R"uckgabewert] - - TRUE: Adresse konnte erzeugt werden. - FALSE: Adresse konnte nicht erzeugt werden. - */ - - { - SvtUserOptions aUserCFG; - String aName = aUserCFG.GetLastName (); - String aFirstName = aUserCFG.GetFirstName (); - if ( aFirstName.Len() || aName.Len() ) - { - if ( aFirstName.Len() ) - { - rFrom = TRIM( aFirstName ); - - if ( aName.Len() ) - rFrom += ' '; - } - rFrom += TRIM( aName ); - // unerlaubte Zeichen entfernen - rFrom.EraseAllChars( '<' ); - rFrom.EraseAllChars( '>' ); - rFrom.EraseAllChars( '@' ); - } - String aEmailName = aUserCFG.GetEmail(); - // unerlaubte Zeichen entfernen - aEmailName.EraseAllChars( '<' ); - aEmailName.EraseAllChars( '>' ); - - if ( aEmailName.Len() ) - { - if ( rFrom.Len() ) - rFrom += ' '; - ( ( rFrom += '<' ) += TRIM( aEmailName ) ) += '>'; - } - else - rFrom.Erase(); - return ( rFrom.Len() > 0 ); - } - -} - -// class OThread -class OMailSendThreadImpl : public ::vos::OThread -{ - public: - OMailSendThreadImpl( - Reference< XSimpleMailClient > xSimpleMailClient, - Reference< XSimpleMailMessage > xSimpleMailMessage, - const Reference< XFrame >& _xCurrentFrame, - long nSendFlags ) : - m_nSendFlags( nSendFlags ), - m_bSend( sal_False ), - m_xSimpleMailClient( xSimpleMailClient ), - m_xSimpleMailMessage( xSimpleMailMessage ), - m_xCurrentFrame(_xCurrentFrame) {} - - virtual ~OMailSendThreadImpl(); - - virtual void SAL_CALL run(); - virtual void SAL_CALL onTerminated(); - - private: - long m_nSendFlags; - sal_Bool m_bSend; - Reference< XSimpleMailClient > m_xSimpleMailClient; - Reference< XSimpleMailMessage > m_xSimpleMailMessage; - Reference< XFrame > m_xCurrentFrame; -}; - -OMailSendThreadImpl::~OMailSendThreadImpl() -{ -} - -void SAL_CALL OMailSendThreadImpl::run() -{ - try - { - m_xSimpleMailClient->sendSimpleMailMessage( m_xSimpleMailMessage, m_nSendFlags ); - m_bSend = sal_True; - } - catch ( IllegalArgumentException& ) - { - m_bSend = sal_False; - } - catch ( Exception& ) - { - m_bSend = sal_False; - } - - if ( m_bSend == sal_False ) - { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); - Reference< ::com::sun::star::awt::XWindow > xParentWindow = m_xCurrentFrame->getContainerWindow(); - Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow ); - - ErrorBox aBox( pParentWindow, SfxResId( RID_ERRBOX_MAIL_CONFIG )); - aBox.Execute(); - } -} - -void SAL_CALL OMailSendThreadImpl::onTerminated() -{ - delete this; -} - -// class AddressList_Impl ------------------------------------------------ - -typedef String* AddressItemPtr_Impl; -DECLARE_LIST( AddressList_Impl, AddressItemPtr_Impl ) - -// class SfxMailModel ----------------------------------------------- - -void SfxMailModel::ClearList( AddressList_Impl* pList ) -{ - if ( pList ) - { - ULONG i, nCount = pList->Count(); - for ( i = 0; i < nCount; ++i ) - delete pList->GetObject(i); - pList->Clear(); - } -} - -void SfxMailModel::MakeValueList( AddressList_Impl* pList, String& rValueList ) -{ - rValueList.Erase(); - if ( pList ) - { - ULONG i, nCount = pList->Count(); - for ( i = 0; i < nCount; ++i ) - { - if ( rValueList.Len() > 0 ) - rValueList += ','; - rValueList += *pList->GetObject(i); - } - } -} -namespace -{ - String lcl_getFactoryName(const Reference<XInterface>& _xModel) - { - rtl::OUString sModuleIdentifier; - rtl::OUString sFactoryShortName; - Reference < XModuleManager > xModuleManager( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")) ), UNO_QUERY ); - - if ( _xModel.is() ) - { - try - { - sModuleIdentifier = xModuleManager->identify( _xModel ); - } - catch ( ::com::sun::star::frame::UnknownModuleException& ) - { - DBG_WARNING( "SfxHelp::GetHelpModuleName_Impl(): unknown module (help in help?)" ); - } - catch ( Exception& ) - { - DBG_ERRORFILE( "SfxHelp::GetHelpModuleName_Impl(): exception of XModuleManager::identif y()" ); - } - } - - return sModuleIdentifier; - } - - String lcl_createTempFileName(const Reference < XModel >& _xModel,const ::rtl::OUString& _sAttachmentTitle) - { - // create temp file name with leading chars and extension - Reference < XStorable > xStor( _xModel, UNO_QUERY ); - String aLeadingStr; - if ( xStor.is() ) - { - sal_Bool bHasName = xStor->hasLocation(); - - if ( !bHasName ) - { - if ( _sAttachmentTitle.getLength() ) - aLeadingStr = _sAttachmentTitle; - else - aLeadingStr = String( DEFINE_CONST_UNICODE("noname") ); - } - else - { - INetURLObject aFileObj(_xModel->getURL()); - if ( aFileObj.hasExtension() ) - { - aFileObj.removeExtension(); - if ( _sAttachmentTitle.getLength() ) - aLeadingStr = _sAttachmentTitle; - else - aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); - aLeadingStr += String::CreateFromAscii( "_" ); - } - else - { - if ( _sAttachmentTitle.getLength() ) - aLeadingStr = _sAttachmentTitle; - else - aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); - aLeadingStr += String::CreateFromAscii( "_" ); - } - } - } - return aLeadingStr; - } - -} -SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAttachmentTitle - , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _xModel - , String& rFileName) -{ - SaveResult eRet = SAVE_CANCELLED; - try - { - Reference<XModifiable> xMod(_xModel,UNO_QUERY); - - // save the document - if ( xMod.is() ) - { - // detect filter - const SfxFilter* pFilter = SfxFilter::GetDefaultFilter(lcl_getFactoryName(_xModel)); -// sal_Bool bHasFilter = pFilter != NULL; - - sal_Bool bRet = sal_False; - // create temp file name with leading chars and extension - Reference < XStorable > xStor( _xModel, UNO_QUERY ); - if ( xStor.is() ) - { - String* pExt = NULL; - INetURLObject aFileObj(_xModel->getURL()); - if ( aFileObj.hasExtension() ) - pExt = new String( String::CreateFromAscii( "." ) + (OUString) aFileObj.getExtension() ); - - String aLeadingStr = lcl_createTempFileName(_xModel,_sAttachmentTitle); - - if ( pFilter && !pExt ) - { - pExt = new String( pFilter->GetWildcard()().GetToken(0) ); - // erase the '*' from the extension (e.g. "*.sdw") - pExt->Erase( 0, 1 ); - } - - { - ::utl::TempFile aTempFile( aLeadingStr, pExt ); - rFileName = aTempFile.GetURL(); - } - delete pExt; - // save document to temp file - - // save document to temp file - Sequence < PropertyValue > aArgs( _xModel->getArgs() ); - ::comphelper::MediaDescriptor aMedia(aArgs); - - if ( pFilter ) - { - ::rtl::OUString sFilter(pFilter->GetFilterName()); - ::rtl::OUString sFilterName(RTL_CONSTASCII_USTRINGPARAM("FilterName")); - if ( !aMedia.createItemIfMissing(sFilterName,sFilter) ) - aMedia[sFilterName] <<= sFilter; - } - - ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL")); - if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) ) - aMedia[sURL] <<= ::rtl::OUString(rFileName); - - ::rtl::OUString sSaveTo(RTL_CONSTASCII_USTRINGPARAM("SaveTo")); - if ( !aMedia.createItemIfMissing(sSaveTo,sal_True) ) - aMedia[sSaveTo] <<= sal_True; - - ::rtl::OUString sReadOnly(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); - if ( !aMedia.createItemIfMissing(sReadOnly,sal_False) ) - aMedia[sReadOnly] <<= sal_False; - - aMedia >> aArgs; - - try - { - Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - SfxStoringHelper aHelper(xMgr); - aHelper.GUIStoreModel(_xModel,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveAs")),aArgs, sal_False, ::rtl::OUString() ); - // xStor->storeToURL(rFileName,aArgs); - bRet = sal_True; - } - catch(Exception&) - { - } - } - - // restore old settings -/* TODO - if ( !bModified && xDocShell->IsEnableSetModified() ) - xDocShell->SetModified( FALSE ); -*/ - eRet = bRet ? SAVE_SUCCESSFULL : SAVE_ERROR; - } - } - catch(Exception&) - { - OSL_ENSURE(0,"Exception catched!"); - } - - return eRet; -} -SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAttachmentTitle - , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _xModel - , String& rFileName) -{ - SaveResult eRet = SAVE_CANCELLED; - try - { - Reference<XModifiable> xMod(_xModel,UNO_QUERY); - - // save the document - if ( xMod.is() ) - { - // Get PDF Filter from document - ::rtl::OUString sPDFMediaType(RTL_CONSTASCII_USTRINGPARAM("application/pdf")); - - sal_Bool bRet = sal_False; - // create temp file name with leading chars and extension - Reference < XStorable > xStor( _xModel, UNO_QUERY ); - if ( xStor.is() ) - { - String aLeadingStr = lcl_createTempFileName(_xModel,_sAttachmentTitle); - String aPDFExtension = String::CreateFromAscii( ".pdf" ); - ::utl::TempFile aTempFile( aLeadingStr, &aPDFExtension ); - - rFileName = aTempFile.GetURL(); - - // save document to temp file - Sequence < PropertyValue > aArgs( _xModel->getArgs() ); - ::comphelper::MediaDescriptor aMedia(aArgs); - - ::rtl::OUString sMediaType(RTL_CONSTASCII_USTRINGPARAM("MediaType")); - if ( !aMedia.createItemIfMissing(sMediaType,sPDFMediaType) ) - aMedia[sMediaType] <<= sPDFMediaType; - - ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL")); - if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) ) - aMedia[sURL] <<= ::rtl::OUString(rFileName); - aMedia >> aArgs; - - try - { - Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - SfxStoringHelper aHelper(xMgr); - aHelper.GUIStoreModel(_xModel,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ExportToPDF")),aArgs, sal_False, ::rtl::OUString); - // xStor->storeToURL(rFileName,aArgs); - bRet = sal_True; - } - catch(Exception&) - { - } - - eRet = bRet ? SAVE_SUCCESSFULL : SAVE_CANCELLED; - - // restore old settings - /* TODO - if ( !bModified && xDocShell->IsEnableSetModified() ) - xDocShell->SetModified( FALSE ); - */ - } - } - } - catch(Exception&) - { - OSL_ENSURE(0,"Exception catched!"); - } - - return eRet; -} -// ----------------------------------------------------------------------------- -SfxMailModel::SendMailResult SfxMailModel::AttachDocument( MailDocType _eMailDocType - , const Reference< XModel >& _xModel - , const ::rtl::OUString& _sAttachmentTitle) -{ - SaveResult eSaveResult; - String aFileName; - -// sal_Bool bSuccessfull = sal_False; - if ( _eMailDocType == TYPE_SELF ) - eSaveResult = SaveDocument( _sAttachmentTitle,_xModel,aFileName); - else - eSaveResult = SaveDocAsPDF( _sAttachmentTitle,_xModel,aFileName); - - if ( eSaveResult == SAVE_SUCCESSFULL && aFileName.Len() ) - maAttachedDocuments.push_back(aFileName); - return eSaveResult == SAVE_SUCCESSFULL ? SEND_MAIL_OK : SEND_MAIL_ERROR; -} -// ----------------------------------------------------------------------------- - -IMPL_LINK_INLINE_START( SfxMailModel, DoneHdl, void*, EMPTYARG ) -{ - mbLoadDone = sal_True; - return 0; -} -// ----------------------------------------------------------------------------- -IMPL_LINK_INLINE_END( SfxMailModel, DoneHdl, void*, EMPTYARG ) - -SfxMailModel::SfxMailModel( const Reference< XFrame >& _xFrame) : - - mpToList ( NULL ), - mpCcList ( NULL ), - mpBccList ( NULL ), - m_xCurrentFrame ( _xFrame ), - mePriority ( PRIO_NORMAL ), - mbLoadDone ( sal_True ) - -{ -} - -SfxMailModel::~SfxMailModel() -{ - ClearList( mpToList ); - delete mpToList; - ClearList( mpCcList ); - delete mpCcList; - ClearList( mpBccList ); - delete mpBccList; -} - -void SfxMailModel::AddAddress( const String& rAddress, AddressRole eRole ) -{ - // don't add a empty address - if ( rAddress.Len() > 0 ) - { - AddressList_Impl* pList = NULL; - if ( ROLE_TO == eRole ) - { - if ( !mpToList ) - // create the list - mpToList = new AddressList_Impl; - pList = mpToList; - } - else if ( ROLE_CC == eRole ) - { - if ( !mpCcList ) - // create the list - mpCcList = new AddressList_Impl; - pList = mpCcList; - } - else if ( ROLE_BCC == eRole ) - { - if ( !mpBccList ) - // create the list - mpBccList = new AddressList_Impl; - pList = mpBccList; - } - else - { - DBG_ERRORFILE( "invalid address role" ); - } - - if ( pList ) - { - // add address to list - AddressItemPtr_Impl pAddress = new String( rAddress ); - pList->Insert( pAddress, LIST_APPEND ); - } - } -} - -SfxMailModel::SendMailResult SfxMailModel::Send( ) -{ - OSL_ENSURE(!maAttachedDocuments.empty(),"No document added!"); - SendMailResult eResult = SEND_MAIL_ERROR; - if ( !maAttachedDocuments.empty() ) - { - - Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - if ( xMgr.is() ) - { - Reference< XSimpleMailClientSupplier > xSimpleMailClientSupplier; - - // Prefer the SimpleSystemMail service if available - xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( - xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleSystemMail" ))), - UNO_QUERY ); - - if ( ! xSimpleMailClientSupplier.is() ) - { - xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( - xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleCommandMail" ))), - UNO_QUERY ); - } - - if ( xSimpleMailClientSupplier.is() ) - { - Reference< XSimpleMailClient > xSimpleMailClient = xSimpleMailClientSupplier->querySimpleMailClient(); - - if ( !xSimpleMailClient.is() ) - { - // no mail client support => message box! - return SEND_MAIL_ERROR; - } - - // we have a simple mail client - Reference< XSimpleMailMessage > xSimpleMailMessage = xSimpleMailClient->createSimpleMailMessage(); - if ( xSimpleMailMessage.is() ) - { - sal_Int32 nSendFlags = SimpleMailClientFlags::DEFAULTS; - if ( maFromAddress.Len() == 0 ) - { - // from address not set, try figure out users e-mail address - CreateFromAddress_Impl( maFromAddress ); - } - xSimpleMailMessage->setOriginator( maFromAddress ); - - sal_Int32 nToCount = mpToList ? mpToList->Count() : 0; - sal_Int32 nCcCount = mpCcList ? mpCcList->Count() : 0; - sal_Int32 nCcSeqCount = nCcCount; - - // set recipient (only one) for this simple mail server!! - if ( nToCount > 1 ) - { - nCcSeqCount = nToCount - 1 + nCcCount; - xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 )); - nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE; - } - else if ( nToCount == 1 ) - { - xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 )); - nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE; - } - - // all other recipient must be handled with CC recipients! - if ( nCcSeqCount > 0 ) - { - sal_Int32 nIndex = 0; - Sequence< OUString > aCcRecipientSeq; - - aCcRecipientSeq.realloc( nCcSeqCount ); - if ( nCcSeqCount > nCcCount ) - { - for ( sal_Int32 i = 1; i < nToCount; ++i ) - { - aCcRecipientSeq[nIndex++] = *mpToList->GetObject(i); - } - } - - for ( sal_Int32 i = 0; i < nCcCount; i++ ) - { - aCcRecipientSeq[nIndex++] = *mpCcList->GetObject(i); - } - xSimpleMailMessage->setCcRecipient( aCcRecipientSeq ); - } - - sal_Int32 nBccCount = mpBccList ? mpBccList->Count() : 0; - if ( nBccCount > 0 ) - { - Sequence< OUString > aBccRecipientSeq( nBccCount ); - for ( sal_Int32 i = 0; i < nBccCount; ++i ) - { - aBccRecipientSeq[i] = *mpBccList->GetObject(i); - } - xSimpleMailMessage->setBccRecipient( aBccRecipientSeq ); - } - - Sequence< OUString > aAttachmentSeq(&(maAttachedDocuments[0]),maAttachedDocuments.size()); - - xSimpleMailMessage->setSubject( maSubject ); - xSimpleMailMessage->setAttachement( aAttachmentSeq ); - - // Bugfix: #95743# - // Due to the current clipboard implementation we cannot stop the main thread - // because the clipboard implementation calls the main thread from another thread - // and this would result in a deadlock! - // Currently we create a thread to send a message and process all remaining error - // handling in this thread!! - - OMailSendThreadImpl* pMailSendThread = new OMailSendThreadImpl( xSimpleMailClient, xSimpleMailMessage, m_xCurrentFrame,nSendFlags ); - pMailSendThread->create(); - - // Return always true as the real error handling occurss in the OMailSendThreadImpl-implementation! - eResult = SEND_MAIL_OK; - } - } - } - } - else - eResult = SEND_MAIL_CANCELLED; - - return eResult; -} diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk deleted file mode 100644 index 572053557e00..000000000000 --- a/sfx2/source/dialog/makefile.mk +++ /dev/null @@ -1,127 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=dialog - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------------- - -EXCEPTIONSFILES=\ - $(SLO)$/filedlghelper.obj \ - $(SLO)$/filtergrouping.obj \ - $(SLO)$/itemconnect.obj \ - $(SLO)$/mailmodel.obj \ - $(SLO)$/partwnd.obj \ - $(SLO)$/recfloat.obj \ - $(SLO)$/templdlg.obj \ - $(SLO)$/dinfdlg.obj \ - $(SLO)$/dockwin.obj \ - $(SLO)$/passwd.obj \ - $(SLO)$/taskpane.obj - -SLOFILES =\ - $(EXCEPTIONSFILES) \ - $(SLO)$/about.obj \ - $(SLO)$/alienwarn.obj \ - $(SLO)$/basedlgs.obj \ - $(SLO)$/dinfedt.obj \ - $(SLO)$/intro.obj \ - $(SLO)$/mgetempl.obj \ - $(SLO)$/navigat.obj \ - $(SLO)$/newstyle.obj \ - $(SLO)$/printopt.obj \ - $(SLO)$/sfxdlg.obj \ - $(SLO)$/splitwin.obj \ - $(SLO)$/srchdlg.obj \ - $(SLO)$/styfitem.obj \ - $(SLO)$/styledlg.obj \ - $(SLO)$/tabdlg.obj \ - $(SLO)$/tplcitem.obj \ - $(SLO)$/tplpitem.obj \ - $(SLO)$/versdlg.obj \ - $(SLO)$/securitypage.obj \ - $(SLO)$/titledockwin.obj - -SRS1NAME=$(TARGET) -SRC1FILES =\ - recfloat.src \ - alienwarn.src \ - dialog.src \ - dinfdlg.src \ - dinfedt.src \ - filedlghelper.src \ - mailwindow.src \ - mgetempl.src \ - newstyle.src \ - passwd.src \ - templdlg.src \ - versdlg.src \ - printopt.src \ - srchdlg.src \ - securitypage.src \ - titledockwin.src \ - taskpane.src - -.IF "$(BUILD_VER_STRING)"!="" -.IF "$(GUI)"=="UNX" -CFLAGS+=-DBUILD_VER_STRING='"$(BUILD_VER_STRING)"' -.ELSE # "$(GUI)"=="UNX" -CFLAGS+=-DBUILD_VER_STRING="$(subst,",\" "$(BUILD_VER_STRING)")" -.ENDIF # "$(GUI)"=="UNX" -.ENDIF - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(INCCOM)$/cuilib.hxx: makefile.mk -.IF "$(GUI)"=="UNX" - $(RM) $@ - @echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE - @echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@ -.ENDIF - -$(SLO)$/sfxdlg.obj : $(INCCOM)$/cuilib.hxx - -$(SLO)$/about.obj : $(INCCOM)$/aboutbmpnames.hxx - -.INCLUDE .IGNORE : $(MISC)$/about_bmp_names.mk - -.IF "$(ABOUT_BITMAPS:f)"!="$(LASTTIME_ABOUT_BITMAPS)" -DO_PHONY=.PHONY -.ENDIF # "$(ABOUT_BITMAPS:f)"!="$(LASTTIME_ABOUT_BITMAPS)" - -$(INCCOM)$/aboutbmpnames.hxx $(DO_PHONY): - echo const char ABOUT_BITMAP_STRINGLIST[]=$(EMQ)"$(ABOUT_BITMAPS:f:t",")$(EMQ)"$(EMQ); > $@ - echo LASTTIME_ABOUT_BITMAPS=$(ABOUT_BITMAPS:f) > $(MISC)$/about_bmp_names.mk diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 1666916b0c0b..d97847f5b6e0 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -46,7 +46,7 @@ #include <sfx2/mgetempl.hxx> #include <sfx2/objsh.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/module.hxx> #include <sfx2/sfx.hrc> diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx index d7f258e7ccb3..290886528e24 100644 --- a/sfx2/source/dialog/navigat.cxx +++ b/sfx2/source/dialog/navigat.cxx @@ -36,7 +36,7 @@ #include <sfx2/navigat.hxx> #include <sfx2/sfx.hrc> #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "helpid.hrc" SFX_IMPL_DOCKINGWINDOW( SfxNavigatorWrapper , SID_NAVIGATOR ); diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 7193129838b2..8235333857d5 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -36,7 +36,7 @@ #include <sfx2/newstyle.hxx> #include "dialog.hrc" #include "newstyle.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" // PRIVATE METHODES ------------------------------------------------------ diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 52c6acedd4ea..455479b9d125 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -35,7 +35,7 @@ #include <sfx2/passwd.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "dialog.hrc" #include "passwd.hrc" diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 80902204fa88..6b26cf9fb504 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -38,7 +38,7 @@ #include "printopt.hrc" #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/viewsh.hxx> #include <sfx2/printopt.hxx> diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index c678cfdffb6e..aaabdd3e5d74 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -42,13 +42,13 @@ #include "recfloat.hxx" #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/app.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" using namespace ::com::sun::star; diff --git a/sfx2/source/dialog/sfxdlg.cxx b/sfx2/source/dialog/sfxdlg.cxx index d62ed70b8490..becab5097ec3 100755 --- a/sfx2/source/dialog/sfxdlg.cxx +++ b/sfx2/source/dialog/sfxdlg.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include <sfx2/sfxdlg.hxx> -#include "cuilib.hxx" +//#include "cuilib.hxx" #include <osl/module.hxx> #include <tools/string.hxx> diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index f6e5f96cf0bd..d4cc7950612f 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -49,7 +49,7 @@ #include <sfx2/dockwin.hxx> #include <sfx2/app.hxx> #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/mnumgr.hxx> #include "virtmenu.hxx" #include <sfx2/msgpool.hxx> diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 0134b8d58bfa..f4d2392c9017 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include "srchdlg.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "srchdlg.hrc" diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index ff6406f0d5d3..e1d01de94955 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -39,7 +39,7 @@ #include <sfx2/styledlg.hxx> #include <sfx2/mgetempl.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "dialog.hrc" diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 3c7a58cd09f9..d149bea792dc 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -42,8 +42,8 @@ #include <sfx2/tabdlg.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/app.hxx> -#include "sfxresid.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxresid.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/ctrlitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/sfxdlg.hxx> diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 88801d95f0d5..b10e634be231 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -48,7 +48,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/frame/XModuleManager.hpp> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/bindings.hxx> @@ -60,8 +60,8 @@ #include <sfx2/objsh.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/newstyle.hxx> -#include "tplpitem.hxx" -#include "sfxresid.hxx" +#include "sfx2/tplpitem.hxx" +#include "sfx2/sfxresid.hxx" #include "templdlg.hrc" #include <sfx2/sfx.hrc> @@ -73,7 +73,7 @@ #include "docvor.hxx" #include <sfx2/doctempl.hxx> #include <sfx2/module.hxx> -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "helpid.hrc" #include "appdata.hxx" #include <sfx2/viewfrm.hxx> diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index 5d7569300cf8..0e03106b0d5e 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -33,12 +33,9 @@ #include <svl/intitem.hxx> #include <vcl/svapp.hxx> -#ifndef GCC -#endif - #include <sfx2/templdlg.hxx> #include <sfx2/bindings.hxx> -#include "tplpitem.hxx" +#include "sfx2/tplpitem.hxx" #include "tplcitem.hxx" #include "templdgi.hxx" diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx index 7b81fb54cdbd..566c379df508 100644 --- a/sfx2/source/dialog/tplpitem.cxx +++ b/sfx2/source/dialog/tplpitem.cxx @@ -30,10 +30,7 @@ // INCLUDE --------------------------------------------------------------- -#ifndef GCC -#endif - -#include "tplpitem.hxx" +#include "sfx2/tplpitem.hxx" #include <com/sun/star/frame/status/Template.hpp> diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index a050e07da5ae..f2a0cf2790f3 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -46,7 +46,7 @@ #include "versdlg.hrc" #include "versdlg.hxx" #include <sfx2/viewfrm.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> #include <sfx2/sfxsids.hrc> diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx index 642fe3c21af8..1907e54246ab 100644 --- a/sfx2/source/doc/QuerySaveDocument.cxx +++ b/sfx2/source/doc/QuerySaveDocument.cxx @@ -27,15 +27,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "QuerySaveDocument.hxx" +#include "sfx2/QuerySaveDocument.hxx" #include <sfx2/sfx.hrc> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "doc.hrc" -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif + // ----------------------------------------------------------------------------- short ExecuteQuerySaveDocument(Window* _pParent,const String& _rTitle) { diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 4311559f94af..ff0a15e20088 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -47,13 +47,13 @@ #include <sfx2/sfx.hrc> #include <sfx2/docfilt.hxx> #include <sfx2/docfac.hxx> -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include "fltfnc.hxx" #include "arrdecl.hxx" #include <sfx2/app.hxx> #include <sfx2/module.hxx> #include <sfx2/mnumgr.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "syspath.hxx" #include <osl/file.hxx> diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 6b9afa136e46..434553bdb226 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -81,6 +81,7 @@ #include <unotools/tempfile.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/componentcontext.hxx> +#include <comphelper/interaction.hxx> #include <framework/interaction.hxx> #include <unotools/streamhelper.hxx> #include <unotools/localedatawrapper.hxx> @@ -144,7 +145,7 @@ using namespace ::com::sun::star::io; #include <sfx2/docfac.hxx> // GetFilterContainer #include "doc.hrc" #include "openflag.hxx" // SFX_STREAM_READONLY etc. -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/appuno.hxx> //#include "xmlversion.hxx" @@ -3783,19 +3784,17 @@ sal_Bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteraction { uno::Sequence< uno::Reference< task::XInteractionContinuation > > aContinuations( bAllowAbort ? 2 : 1 ); - ::rtl::Reference< ::framework::ContinuationApprove > pApprove( new ::framework::ContinuationApprove() ); + ::rtl::Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove ); aContinuations[ 0 ] = pApprove.get(); if ( bAllowAbort ) { - ::rtl::Reference< ::framework::ContinuationAbort > pAbort( new ::framework::ContinuationAbort() ); + ::rtl::Reference< ::comphelper::OInteractionAbort > pAbort( new ::comphelper::OInteractionAbort ); aContinuations[ 1 ] = pAbort.get(); } - uno::Reference< task::XInteractionRequest > xRequest( new ::framework::InteractionRequest( aRequest, aContinuations ) ); - xHandler->handle( xRequest ); - - bResult = pApprove->isSelected(); + xHandler->handle(::framework::InteractionRequest::CreateRequest (aRequest,aContinuations)); + bResult = pApprove->wasSelected(); } catch( const Exception& ) { diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 2dcca2eadf56..360854dc3dbf 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include <sfx2/app.hxx> -#include "docinsert.hxx" +#include "sfx2/docinsert.hxx" #include <sfx2/docfile.hxx> #include <sfx2/fcontnr.hxx> #include <sfx2/filedlghelper.hxx> diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx index 7a5fea18004f..e6726e97e96d 100644 --- a/sfx2/source/doc/doctdlg.cxx +++ b/sfx2/source/doc/doctdlg.cxx @@ -37,7 +37,7 @@ #include <sfx2/doctdlg.hxx> #include "docvor.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxtypes.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/app.hxx> diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index db6f2a2d133f..f5ea04e5e08d 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -94,7 +94,7 @@ using namespace ::ucbhelper; #include <sfx2/objsh.hxx> #include "sfxtypes.hxx" #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" #include <sfx2/fcontnr.hxx> #include <svtools/templatefoldercache.hxx> diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 71f3683c0006..8644e79f611d 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -65,7 +65,7 @@ #include <unotools/configmgr.hxx> #include <unotools/ucbhelper.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxurlrelocator.hxx" #include "doctemplateslocal.hxx" #include <sfx2/docfac.hxx> diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 719dc5b8d223..6367f2a65d76 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -64,7 +64,7 @@ #include "sfxtypes.hxx" #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" #include <sfx2/sfx.hrc> #include "docvor.hrc" diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 388d85cefc25..eff1554526ea 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -78,7 +78,7 @@ #include <comphelper/processfactory.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "graphhelp.hxx" #include "doc.hrc" diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 6b2b5dcb8c0b..9eb82e7cfd44 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -77,7 +77,7 @@ #include <sfx2/sfxsids.hrc> #include <doc.hrc> -#include <sfxresid.hxx> +#include <sfx2/sfxresid.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/app.hxx> diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk deleted file mode 100644 index d663d34cf5ba..000000000000 --- a/sfx2/source/doc/makefile.mk +++ /dev/null @@ -1,103 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=doc -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(SYSTEM_LIBXML)" == "YES" -CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS) -.ENDIF - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - doc.src new.src doctdlg.src docvor.src doctempl.src graphhelp.src - -SLOFILES = \ - $(SLO)$/printhelper.obj \ - $(SLO)$/docinf.obj \ - $(SLO)$/oleprops.obj \ - $(SLO)$/iframe.obj \ - $(SLO)$/plugin.obj \ - $(SLO)$/docfile.obj \ - $(SLO)$/objuno.obj \ - $(SLO)$/frmdescr.obj \ - $(SLO)$/objxtor.obj \ - $(SLO)$/objmisc.obj \ - $(SLO)$/objstor.obj \ - $(SLO)$/objcont.obj \ - $(SLO)$/objserv.obj \ - $(SLO)$/objitem.obj \ - $(SLO)$/ownsubfilterservice.obj \ - $(SLO)$/docfac.obj \ - $(SLO)$/docfilt.obj \ - $(SLO)$/doctempl.obj \ - $(SLO)$/doctemplates.obj \ - $(SLO)$/doctemplateslocal.obj \ - $(SLO)$/docvor.obj \ - $(SLO)$/new.obj \ - $(SLO)$/doctdlg.obj \ - $(SLO)$/sfxbasemodel.obj \ - $(SLO)$/guisaveas.obj\ - $(SLO)$/objembed.obj\ - $(SLO)$/graphhelp.obj \ - $(SLO)$/QuerySaveDocument.obj \ - $(SLO)$/docinsert.obj \ - $(SLO)$/docmacromode.obj \ - $(SLO)$/SfxDocumentMetaData.obj \ - $(SLO)$/DocumentMetadataAccess.obj \ - $(SLO)$/Metadatable.obj \ - $(SLO)$/sfxmodelfactory.obj \ - $(SLO)$/sfxacldetect.obj \ - $(SLO)$/docstoragemodifylistener.obj \ - $(SLO)$/querytemplate.obj \ - $(SLO)$/syspath.obj \ - $(SLO)$/syspathw32.obj - -.IF "$(GUI)" == "WNT" - -#HACK TO DISABLE PCH -NOOPTFILES= \ - $(SLO)$/sfxacldetect.obj \ - $(SLO)$/syspathw32.obj -.ENDIF - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - - diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index d3235b1c7a7f..932f6f10ecb0 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -31,9 +31,7 @@ #include <vcl/gdimtf.hxx> #include <vcl/msgbox.hxx> #include <vcl/morebtn.hxx> -#ifndef _SVMEDIT_HXX #include <svtools/svmedit.hxx> -#endif #include <svl/itemset.hxx> #include <svl/eitem.hxx> #include <svtools/sfxecode.hxx> @@ -42,9 +40,7 @@ #include <unotools/localfilehelper.hxx> #include "new.hrc" -#ifndef _SFX_DOC_HRC #include "doc.hrc" -#endif #include <sfx2/sfx.hrc> #include "helpid.hrc" #include "sfxtypes.hxx" @@ -54,8 +50,8 @@ #include <sfx2/objsh.hxx> #include "fltfnc.hxx" #include <sfx2/viewsh.hxx> -#include "viewfac.hxx" -#include "sfxresid.hxx" +#include "sfx2/viewfac.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/docfile.hxx> #include "preview.hxx" #include <sfx2/printer.hxx> diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index e0e63da04bb8..91f5842c1fb7 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -62,7 +62,7 @@ #include <vcl/oldprintadaptor.hxx> #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "appdata.hxx" #include <sfx2/dinfdlg.hxx> #include "fltfnc.hxx" @@ -71,11 +71,11 @@ #include <sfx2/objsh.hxx> #include "objshimp.hxx" #include <sfx2/evntconf.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/printer.hxx> +#include "sfx2/basmgr.hxx" #include <sfx2/viewfrm.hxx> -#include "basmgr.hxx" #include <sfx2/doctempl.hxx> #include "doc.hrc" #include <sfx2/sfxbasemodel.hxx> diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index e386b2382acf..75bdcc44d34e 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -118,6 +118,7 @@ using namespace ::com::sun::star::container; #include <rtl/bootstrap.hxx> #include <vcl/svapp.hxx> #include <framework/interaction.hxx> +#include <comphelper/interaction.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/documentconstants.hxx> @@ -126,7 +127,7 @@ using namespace ::com::sun::star::container; #include "appdata.hxx" #include <sfx2/request.hxx> #include <sfx2/bindings.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/objsh.hxx> @@ -2286,8 +2287,8 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError( { uno::Any aInteraction; uno::Sequence< uno::Reference< task::XInteractionContinuation > > lContinuations(2); - ::framework::ContinuationAbort* pAbort = new ::framework::ContinuationAbort(); - ::framework::ContinuationApprove* pApprove = new ::framework::ContinuationApprove(); + ::comphelper::OInteractionAbort* pAbort = new ::comphelper::OInteractionAbort(); + ::comphelper::OInteractionApprove* pApprove = new ::comphelper::OInteractionApprove(); lContinuations[0] = uno::Reference< task::XInteractionContinuation >( static_cast< task::XInteractionContinuation* >( pAbort ), uno::UNO_QUERY ); lContinuations[1] = uno::Reference< task::XInteractionContinuation >( @@ -2296,14 +2297,8 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError( task::ErrorCodeRequest aErrorCode; aErrorCode.ErrCode = nError; aInteraction <<= aErrorCode; - - ::framework::InteractionRequest* pRequest = new ::framework::InteractionRequest(aInteraction,lContinuations); - uno::Reference< task::XInteractionRequest > xRequest( - static_cast< task::XInteractionRequest* >( pRequest ), - uno::UNO_QUERY); - - xHandler->handle(xRequest); - bResult = pAbort->isSelected(); + xHandler->handle(::framework::InteractionRequest::CreateRequest (aInteraction,lContinuations)); + bResult = pAbort->wasSelected(); } catch( uno::Exception& ) {} diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index b0be3638f2a4..c9b5e6f37293 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -69,7 +69,7 @@ #include <sfx2/app.hxx> #include <sfx2/signaturestate.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/event.hxx> #include <sfx2/request.hxx> #include <sfx2/printer.hxx> @@ -91,7 +91,7 @@ #include <sfx2/docfac.hxx> #include <sfx2/fcontnr.hxx> #include <sfx2/filedlghelper.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/msgpool.hxx> #include <sfx2/objface.hxx> diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index c3f532ad1ba6..0575660877a3 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -111,7 +111,7 @@ #include <sfx2/objsh.hxx> #include <sfx2/childwin.hxx> #include <sfx2/request.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/docfile.hxx> #include "fltfnc.hxx" #include <sfx2/docfilt.hxx> diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx index 466f8dd43104..32d50de40d51 100644 --- a/sfx2/source/doc/objuno.cxx +++ b/sfx2/source/doc/objuno.cxx @@ -68,7 +68,7 @@ #include <vector> #include <algorithm> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" using namespace ::com::sun::star; diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index b7567b89f02f..13fb08445431 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -54,7 +54,7 @@ #include <svl/eitem.hxx> #include <tools/rtti.hxx> #include <svl/lstner.hxx> -#include <sfxhelp.hxx> +#include <sfx2/sfxhelp.hxx> #include <basic/sbstar.hxx> #include <svl/stritem.hxx> #include <basic/sbx.hxx> @@ -96,7 +96,7 @@ #include <sfx2/dispatch.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/viewfrm.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "objshimp.hxx" #include "appbas.hxx" #include "sfxtypes.hxx" @@ -107,8 +107,8 @@ #include "appdata.hxx" #include <sfx2/appuno.hxx> #include <sfx2/sfxsids.hrc> -#include "basmgr.hxx" -#include "QuerySaveDocument.hxx" +#include "sfx2/basmgr.hxx" +#include "sfx2/QuerySaveDocument.hxx" #include "helpid.hrc" #include <sfx2/msg.hxx> #include "appbaslib.hxx" diff --git a/sfx2/source/doc/querytemplate.cxx b/sfx2/source/doc/querytemplate.cxx index 3e6a529bc67e..a2adce45d239 100644 --- a/sfx2/source/doc/querytemplate.cxx +++ b/sfx2/source/doc/querytemplate.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include "querytemplate.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" #include "helpid.hrc" #include <vcl/svapp.hxx> diff --git a/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx index de6528794e20..ded9d3000fc8 100644 --- a/sfx2/source/doc/sfxacldetect.cxx +++ b/sfx2/source/doc/sfxacldetect.cxx @@ -25,6 +25,10 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + + #ifdef WNT // necessary to include system headers without warnings diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index bf2654a1297e..21c06cb29615 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -102,7 +102,7 @@ //________________________________________________________________________________________________________ #include <sfx2/sfxbasecontroller.hxx> -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include "workwin.hxx" #include <sfx2/signaturestate.hxx> #include <sfx2/sfxuno.hxx> @@ -114,7 +114,7 @@ #include <sfx2/request.hxx> #include <sfx2/objuno.hxx> #include <sfx2/printer.hxx> -#include <basmgr.hxx> +#include <sfx2/basmgr.hxx> #include <sfx2/event.hxx> #include <eventsupplier.hxx> #include <sfx2/evntconf.hxx> @@ -125,12 +125,12 @@ #include <sfx2/docfac.hxx> #include <sfx2/fcontnr.hxx> #include "sfx2/docstoragemodifylistener.hxx" -#include "brokenpackageint.hxx" +#include "sfx2/brokenpackageint.hxx" #include "graphhelp.hxx" #include <sfx2/msgpool.hxx> #include <sfx2/DocumentMetadataAccess.hxx> -#include <sfxresid.hxx> +#include <sfx2/sfxresid.hxx> //________________________________________________________________________________________________________ // const @@ -1805,10 +1805,9 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >& SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairItem, SfxBoolItem, SID_REPAIRPACKAGE, FALSE ); if ( !pRepairItem || !pRepairItem->GetValue() ) { - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocName ); - com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > xRequest ( pRequest ); - xHandler->handle( xRequest ); - if( pRequest->isApproved() ) + RequestPackageReparation aRequest( aDocName ); + xHandler->handle( aRequest.GetRequest() ); + if( aRequest.isApproved() ) { // broken package: try second loading and allow repair pMedium->GetItemSet()->Put( SfxBoolItem( SID_REPAIRPACKAGE, sal_True ) ); @@ -1828,9 +1827,8 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >& if ( nError == ERRCODE_IO_BROKENPACKAGE ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocName ); - com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > xRequest ( pNotifyRequest ); - xHandler->handle( xRequest ); + NotifyBrokenPackage aRequest( aDocName ); + xHandler->handle( aRequest.GetRequest() ); } } } @@ -3288,7 +3286,7 @@ uno::Reference< ui::XUIConfigurationManager > SAL_CALL SfxBaseModel::getUIConfig uno::Reference< lang::XMultiServiceFactory > xServiceMgr( ::comphelper::getProcessServiceFactory() ); uno::Sequence< uno::Reference< container::XIndexContainer > > rToolbars; - sal_Bool bImported = UIConfigurationImporterOOo1x::ImportCustomToolbars( + sal_Bool bImported = framework::UIConfigurationImporterOOo1x::ImportCustomToolbars( xNewUIConfMan, rToolbars, xServiceMgr, xOOo1ConfigStorage ); if ( bImported ) { diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index c0a163bed39c..167dadea2e38 100644..100755 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -28,6 +28,10 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + + #ifdef WNT #ifdef _MSC_VER #pragma warning(disable:4917) diff --git a/sfx2/source/explorer/makefile.mk b/sfx2/source/explorer/makefile.mk deleted file mode 100644 index 75a15ebdb862..000000000000 --- a/sfx2/source/explorer/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=explorer -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/nochaos.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx index b4aed7ccdd99..d674c7620d54 100644 --- a/sfx2/source/inc/fltoptint.hxx +++ b/sfx2/source/inc/fltoptint.hxx @@ -24,15 +24,17 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ +#ifndef SFX2_FLTOPTINT_HXX +#define SFX2_FLTOPTINT_HXX #include <com/sun/star/document/FilterOptionsRequest.hpp> #include <com/sun/star/document/XInteractionFilterOptions.hpp> #include <com/sun/star/frame/XModel.hpp> -#include <framework/interaction.hxx> +#include <comphelper/interaction.hxx> -using namespace ::framework; +//using namespace ::framework; -class FilterOptionsContinuation : public ContinuationBase< ::com::sun::star::document::XInteractionFilterOptions > +class FilterOptionsContinuation : public comphelper::OInteraction< ::com::sun::star::document::XInteractionFilterOptions > { ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties; @@ -49,7 +51,7 @@ class RequestFilterOptions : public ::cppu::WeakImplHelper1< ::com::sun::star::t ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; - ContinuationAbort* m_pAbort; + comphelper::OInteractionAbort* m_pAbort; FilterOptionsContinuation* m_pOptions; @@ -57,7 +59,7 @@ public: RequestFilterOptions( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > rModel, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties ); - sal_Bool isAbort() { return m_pAbort->isSelected(); } + sal_Bool isAbort() { return m_pAbort->wasSelected(); } ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > getFilterOptions() { @@ -73,3 +75,4 @@ public: throw( ::com::sun::star::uno::RuntimeException ); }; +#endif diff --git a/sfx2/source/inet/makefile.mk b/sfx2/source/inet/makefile.mk deleted file mode 100644 index 9347e68a2cdb..000000000000 --- a/sfx2/source/inet/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=inet -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - - -SLOFILES = \ - $(SLO)$/inettbc.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/layout/makefile.mk b/sfx2/source/layout/makefile.mk deleted file mode 100644 index a11ba76a15bd..000000000000 --- a/sfx2/source/layout/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=layout -ENABLE_EXCEPTIONS=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(ENABLE_LAYOUT)" == "TRUE" - -SLOFILES = \ - $(SLO)$/sfxdialog.obj -# - -SLOFILES += $(SLO)$/sfxtabdialog.obj \ - $(SLO)$/factory.obj \ - $(SLO)$/sfxtabpage.obj - -.ENDIF # ENABLE_LAYOUT == TRUE - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/layout/sfxtabdialog.cxx b/sfx2/source/layout/sfxtabdialog.cxx index 782e890d81be..7909d404b524 100644 --- a/sfx2/source/layout/sfxtabdialog.cxx +++ b/sfx2/source/layout/sfxtabdialog.cxx @@ -42,8 +42,8 @@ #include <sfx2/tabdlg.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/app.hxx> -#include "sfxresid.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxresid.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/ctrlitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/sfxdlg.hxx> diff --git a/sfx2/source/menu/makefile.mk b/sfx2/source/menu/makefile.mk deleted file mode 100644 index 8b55bd0840ea..000000000000 --- a/sfx2/source/menu/makefile.mk +++ /dev/null @@ -1,55 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - - -PRJNAME=sfx2 -TARGET=menu -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = menu.src - -SLOFILES = \ - $(SLO)$/mnuitem.obj \ - $(SLO)$/mnumgr.obj \ - $(SLO)$/objmnctl.obj \ - $(SLO)$/thessubmenu.obj \ - $(SLO)$/virtmenu.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 281b451d8098..f101b0d426b9 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -72,9 +72,9 @@ #include <sfx2/module.hxx> #include <sfx2/unoctitm.hxx> #include <sfx2/viewfrm.hxx> -#include "imgmgr.hxx" -#include "imagemgr.hxx" -#include "sfxresid.hxx" +#include "sfx2/imgmgr.hxx" +#include "sfx2/imagemgr.hxx" +#include "sfx2/sfxresid.hxx" #include "../doc/doc.hrc" using namespace ::com::sun::star::uno; diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index b3e5717dd7b6..77dbd0dcb885 100755 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -76,7 +76,7 @@ #include "sfxtypes.hxx" #include <sfx2/bindings.hxx> #include "mnucfga.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/macrconf.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/sfx.hrc> diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 48ff6a3948c5..f0408a66a408 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -36,14 +36,9 @@ #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> #include <comphelper/processfactory.hxx> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif #include <tools/urlobj.hxx> -#ifndef GCC -#endif - #include "virtmenu.hxx" #include <sfx2/msgpool.hxx> #include "statcach.hxx" @@ -60,9 +55,9 @@ #include <sfx2/viewsh.hxx> #include "sfxpicklist.hxx" #include <sfx2/macrconf.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "menu.hrc" -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include <sfx2/viewfrm.hxx> #include <sfx2/objsh.hxx> #include <framework/addonsoptions.hxx> diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index 32e6887f802c..1ca10c6d9390 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -51,7 +51,7 @@ #include "eventsupplier.hxx" #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxsids.hrc> #include "sfxlocal.hrc" diff --git a/sfx2/source/notify/makefile.mk b/sfx2/source/notify/makefile.mk deleted file mode 100644 index e2ddde40f936..000000000000 --- a/sfx2/source/notify/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=notify - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/eventsupplier.obj \ - $(SLO)$/hintpost.obj - -EXCEPTIONSFILES = \ - $(SLO)$/eventsupplier.obj -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/statbar/makefile.mk b/sfx2/source/statbar/makefile.mk deleted file mode 100644 index f99c8fcdaa1e..000000000000 --- a/sfx2/source/statbar/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=statbar -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/stbitem.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index e5de57d835c3..68d855cbf6c6 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -41,7 +41,7 @@ #include <vcl/status.hxx> #include <sfx2/app.hxx> -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include "sfxtypes.hxx" #include <sfx2/msg.hxx> #include "arrdecl.hxx" diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx index 7694932d44c4..231baa76fc76 100644 --- a/sfx2/source/toolbox/imgmgr.cxx +++ b/sfx2/source/toolbox/imgmgr.cxx @@ -31,10 +31,10 @@ #include <stdio.h> #include <hash_map> -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include <sfx2/sfx.hrc> #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/bindings.hxx> #include "statcach.hxx" #include <sfx2/module.hxx> diff --git a/sfx2/source/toolbox/makefile.mk b/sfx2/source/toolbox/makefile.mk deleted file mode 100644 index ce4f011e6044..000000000000 --- a/sfx2/source/toolbox/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=toolbox -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/tbxitem.obj \ - $(SLO)$/imgmgr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index f5b38d5a8a18..7cc25c872eb1 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -92,7 +92,7 @@ #include "sfxtypes.hxx" #include <sfx2/macrconf.hxx> #include <sfx2/genlink.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfx.hrc> #include <sfx2/module.hxx> #include <sfx2/docfile.hxx> @@ -103,11 +103,11 @@ #include <sfx2/unoctitm.hxx> #include "helpid.hrc" #include "workwin.hxx" -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "virtmenu.hxx" #include <sfx2/viewfrm.hxx> #include <sfx2/module.hxx> -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include <comphelper/uieventslogger.hxx> #include <com/sun/star/frame/XModuleManager.hpp> diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 36edd34c973d..ef963b36d7bb 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -30,7 +30,7 @@ #include "impframe.hxx" #include "objshimp.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "workwin.hxx" #include "sfx2/app.hxx" diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index df252b831803..a4707f03d364 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -30,7 +30,6 @@ #include "frmload.hxx" #include "objshimp.hxx" -#include "viewfac.hxx" #include "sfx2/app.hxx" #include "sfx2/dispatch.hxx" #include "sfx2/docfac.hxx" @@ -45,6 +44,7 @@ #include "sfx2/sfxuno.hxx" #include "sfx2/viewfrm.hxx" #include "sfx2/viewsh.hxx" +#include "sfx2/viewfac.hxx" /** === begin UNO includes === **/ #include <com/sun/star/container/XContainerQuery.hpp> @@ -216,11 +216,10 @@ const SfxFilter* SfxFrameLoader_Impl::impl_getFilterFromServiceName_nothrow( con ::rtl::OUString sFilterName; try { - ::framework::RequestFilterSelect* pRequest = new ::framework::RequestFilterSelect( i_rDocumentURL ); - Reference< XInteractionRequest > xRequest ( pRequest ); - i_rxHandler->handle( xRequest ); - if( !pRequest->isAbort() ) - sFilterName = pRequest->getFilter(); + ::framework::RequestFilterSelect aRequest( i_rDocumentURL ); + i_rxHandler->handle( aRequest.GetRequest() ); + if( !aRequest.isAbort() ) + sFilterName = aRequest.getFilter(); } catch( const Exception& ) { diff --git a/sfx2/source/view/makefile.mk b/sfx2/source/view/makefile.mk deleted file mode 100644 index 9c257f4c9f75..000000000000 --- a/sfx2/source/view/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - - -PRJ=..$/.. - -PRJNAME= sfx2 -TARGET= view -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - view.src - -SLOFILES = \ - $(SLO)$/ipclient.obj \ - $(SLO)$/viewsh.obj \ - $(SLO)$/frmload.obj \ - $(SLO)$/frame.obj \ - $(SLO)$/frame2.obj \ - $(SLO)$/printer.obj \ - $(SLO)$/viewprn.obj \ - $(SLO)$/viewfac.obj \ - $(SLO)$/orgmgr.obj \ - $(SLO)$/viewfrm.obj \ - $(SLO)$/viewfrm2.obj \ - $(SLO)$/sfxbasecontroller.obj \ - $(SLO)$/userinputinterception.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx index b15392372b19..6c92cd448adf 100644 --- a/sfx2/source/view/orgmgr.cxx +++ b/sfx2/source/view/orgmgr.cxx @@ -53,7 +53,7 @@ #include "docvor.hxx" #include "orgmgr.hxx" #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "view.hrc" #include <sfx2/docfilt.hxx> #include "fltfnc.hxx" diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index 46a96bafab9a..310c1a58a578 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -44,7 +44,7 @@ #include <sfx2/prnmon.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/tabdlg.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "view.hrc" #ifdef MSC diff --git a/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx deleted file mode 100644 index a4e96ab1065e..000000000000 --- a/sfx2/source/view/prnmon.cxx +++ /dev/null @@ -1,495 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sfx2.hxx" -#include <com/sun/star/view/PrintableState.hpp> -#include <com/sun/star/util/XCloseable.hpp> -#include <com/sun/star/util/XCloseBroadcaster.hpp> -#include <com/sun/star/util/XCloseListener.hpp> -#include <com/sun/star/util/CloseVetoException.hpp> -#include <vcl/fixed.hxx> -#include <vcl/msgbox.hxx> -#include <svtools/asynclink.hxx> - -#include <unotools/printwarningoptions.hxx> -#include <svl/eitem.hxx> - -#ifndef GCC -#endif - -#include <sfx2/prnmon.hxx> -#include <sfx2/viewsh.hxx> -#include <sfx2/viewfrm.hxx> -#include <sfx2/objsh.hxx> -#include <sfx2/docfile.hxx> -#include "sfxtypes.hxx" -#include <sfx2/progress.hxx> -#include <sfx2/bindings.hxx> -#include "sfxresid.hxx" -#include <sfx2/event.hxx> -#include <sfx2/request.hxx> -#include <sfx2/app.hxx> - -#include "view.hrc" - -//------------------------------------------------------------------------ - -#define SFX_TITLE_MAXLEN_PRINTMONITOR 22 - -//------------------------------------------------------------------------ - -struct SfxPrintMonitor_Impl: public ModelessDialog -{ - - SfxPrintMonitor_Impl( Window *pParent, SfxViewShell *rpViewShell ); - virtual BOOL Close(); - - SfxViewShell* pViewShell; - FixedText aDocName; - FixedText aPrinting; - FixedText aPrinter; - FixedText aPrintInfo; - CancelButton aCancel; -}; - -//------------------------------------------------------------------------- - -struct SfxPrintProgress_Impl : public SfxListener -{ - SfxPrintMonitor_Impl* pMonitor; - SfxViewShell* pViewShell; - SfxPrinter* pPrinter; - SfxPrinter* pOldPrinter; - USHORT nLastPage; - BOOL bRunning; - BOOL bCancel; - BOOL bDeleteOnEndPrint; - BOOL bShow; - BOOL bCallbacks; - BOOL bOldEnablePrintFile; - BOOL bOldFlag; - BOOL bRestoreFlag; - BOOL bAborted; - svtools::AsynchronLink aDeleteLink; - Link aCancelHdl; - -private: - DECL_LINK( CancelHdl, Button * ); - DECL_STATIC_LINK( SfxPrintProgress_Impl, DeleteHdl, SfxPrintProgress * ); - -public: - SfxPrintProgress_Impl( SfxViewShell* pTheViewShell, SfxPrinter* pThePrinter ); - ~SfxPrintProgress_Impl(); - - void Delete( SfxPrintProgress* pAntiImpl ) { aDeleteLink.Call( pAntiImpl ); } - SfxViewShell* GetViewShell() const { return pViewShell; } - BOOL SetPage( USHORT nPage, const String &rPage ); - void CreateMonitor(); - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); -}; - -void SfxPrintProgress_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) -{ - SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint ); - if ( pPrintHint ) - { - if ( pPrintHint->GetWhich() == -2 ) - CancelHdl(0); - } -} - -//------------------------------------------------------------------------ - -SfxPrintMonitor_Impl::SfxPrintMonitor_Impl( Window* pParent, SfxViewShell* rpViewShell ) : - ModelessDialog( pParent, SfxResId( DLG_PRINTMONITOR ) ), - pViewShell ( rpViewShell ), - aDocName ( this, SfxResId( FT_DOCNAME ) ), - aPrinting ( this, SfxResId( FT_PRINTING ) ), - aPrinter ( this, SfxResId( FT_PRINTER ) ), - aPrintInfo ( this, SfxResId( FT_PRINTINFO ) ), - aCancel ( this, SfxResId( PB_CANCELPRNMON ) ) -{ - if( rpViewShell->GetPrinter()->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) != 0 ) - { - String aPrep( SfxResId( STR_FT_PREPARATION ) ); - aPrinting.SetText( aPrep ); - aPrinter.Show( FALSE ); - } - FreeResource(); -} - -//------------------------------------------------------------------------ - -IMPL_STATIC_LINK_NOINSTANCE( SfxPrintProgress_Impl, DeleteHdl, SfxPrintProgress*, pAntiImpl ) -{ - delete pAntiImpl; - return 0; -} - -void actualizePrintCancelState(CancelButton& rButton, const SfxObjectShell* pShell) -{ - sal_Bool bEnableCancelButton = sal_True; - if (pShell) - bEnableCancelButton = pShell->Stamp_GetPrintCancelState(); - - if (!bEnableCancelButton) - rButton.Disable(); - else - rButton.Enable(); -} - -//------------------------------------------------------------------------ - -SfxPrintProgress_Impl::SfxPrintProgress_Impl( SfxViewShell* pTheViewShell, - SfxPrinter* pThePrinter ) : - - pMonitor ( 0 ), - pViewShell ( pTheViewShell ), - pPrinter ( pThePrinter ), - pOldPrinter ( NULL ), - nLastPage ( 0 ), - bRunning ( TRUE ), - bCancel ( FALSE ), - bDeleteOnEndPrint ( FALSE ), - bShow ( FALSE ), - bCallbacks ( FALSE ), - bOldEnablePrintFile ( FALSE ), - bOldFlag ( TRUE ), - bRestoreFlag ( FALSE ), - bAborted ( FALSE ), - aDeleteLink ( STATIC_LINK( this, SfxPrintProgress_Impl, DeleteHdl ) ) -{ - StartListening( *pViewShell->GetObjectShell() ); -} - -void SfxPrintProgress_Impl::CreateMonitor() -{ - // mark monitor to been shown in first status indication - bShow = TRUE; - - if ( !pMonitor ) - { - Window* pParent = pViewShell->GetWindow(); - pMonitor = new SfxPrintMonitor_Impl( pParent, pViewShell ); - pMonitor->aDocName.SetText( pViewShell->GetObjectShell()->GetTitle( SFX_TITLE_MAXLEN_PRINTMONITOR ) ); - pMonitor->aPrinter.SetText( pViewShell->GetPrinter()->GetName() ); - - // Stampit enable/dsiable cancel button - actualizePrintCancelState( pMonitor->aCancel, pViewShell->GetObjectShell() ); - pMonitor->aCancel.SetClickHdl( LINK( this, SfxPrintProgress_Impl, CancelHdl ) ); - } -} - -//------------------------------------------------------------------------ - -SfxPrintProgress_Impl::~SfxPrintProgress_Impl() -{ -} - -//------------------------------------------------------------------------ - -BOOL SfxPrintProgress_Impl::SetPage( USHORT nPage, const String &rPage ) -{ - // wurde der Druckauftrag abgebrochen? - if ( bCancel || !pMonitor ) - return FALSE; - - // Stampit enable/dsiable cancel button - actualizePrintCancelState(pMonitor->aCancel, pViewShell->GetObjectShell()); - - nLastPage = nPage; - String aStrPrintInfo = String( SfxResId( STR_PAGE ) ); - if ( !rPage.Len() ) - aStrPrintInfo += String::CreateFromInt32( nLastPage ); - else - aStrPrintInfo += rPage; - pMonitor->aPrintInfo.SetText( aStrPrintInfo ); - pMonitor->Update(); - return TRUE; -} - -//------------------------------------------------------------------------ - -IMPL_LINK( SfxPrintProgress_Impl, CancelHdl, Button *, EMPTYARG ) -{ - if ( !pViewShell->GetPrinter()->IsJobActive() && pViewShell->GetPrinter()->IsPrinting() ) - // we are still in StartJob, cancelling now might lead to a crash - return 0; - - if ( pMonitor ) - pMonitor->Hide(); - - pViewShell->GetObjectShell()->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_ABORTED, NULL, NULL ) ); - pViewShell->GetPrinter()->AbortJob(); - bCancel = TRUE; - - if ( aCancelHdl.IsSet() ) - aCancelHdl.Call( this ); - - bAborted = TRUE; - return 0; -} - -BOOL SfxPrintMonitor_Impl::Close() -{ - BOOL bAgree = pViewShell ? pViewShell->GetObjectShell()->Stamp_GetPrintCancelState() : TRUE; - if (!bAgree) - return FALSE; - else - return ModelessDialog::Close(); -} - -//-------------------------------------------------------------------- - -SfxPrintProgress::SfxPrintProgress( SfxViewShell* pViewSh, FASTBOOL bShow ) -: SfxProgress( pViewSh->GetViewFrame()->GetObjectShell(), - String(SfxResId(STR_PRINTING)), 1, FALSE ), - pImp( new SfxPrintProgress_Impl( pViewSh, pViewSh->GetPrinter() ) ) -{ - #if 0 - pImp->pPrinter->SetEndPrintHdl( LINK( this, SfxPrintProgress, EndPrintNotify ) ); - pImp->pPrinter->SetErrorHdl( LINK( this, SfxPrintProgress, PrintErrorNotify ) ); - pImp->pPrinter->SetStartPrintHdl( LINK( this, SfxPrintProgress, StartPrintNotify ) ); - pImp->bCallbacks = TRUE; - #endif - - SfxObjectShell* pDoc = pViewSh->GetObjectShell(); - SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_HIDDEN, FALSE ); - if ( pItem && pItem->GetValue() ) - bShow = FALSE; - - if ( bShow ) - pImp->CreateMonitor(); - - Lock(); - if ( !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) - { - pImp->bRestoreFlag = TRUE; - pImp->bOldFlag = pDoc->IsEnableSetModified(); - if ( pImp->bOldFlag ) - pDoc->EnableSetModified( FALSE ); - } -} - -//-------------------------------------------------------------------- - -SfxPrintProgress::~SfxPrintProgress() -{ - // k"onnte auch schon weg sein (in EndPrintNotify) - DELETEZ(pImp->pMonitor); - - // ggf. Callbacks entfermen - if ( pImp->bCallbacks ) - { - // pImp->pPrinter->SetEndPrintHdl( Link() ); - pImp->pPrinter->SetErrorHdl( Link() ); - pImp->bCallbacks = FALSE; - } - - // ggf. vorherigen Drucker wieder einsetzen - if ( pImp->pOldPrinter ) - pImp->pViewShell->SetPrinter( pImp->pOldPrinter, SFX_PRINTER_PRINTER ); - else - // ggf. vorherigen Print-To-File-Status zuruecksetzen - pImp->pViewShell->GetPrinter()->EnablePrintFile( pImp->bOldEnablePrintFile ); - - // EndPrint-Notification an Frame - //pImp->pViewShell->GetViewFrame()->GetFrame().Lock_Impl(FALSE); - pImp->EndListening( *(pImp->pViewShell->GetObjectShell()) ); - - // the following call might destroy the view or even the document - pImp->pViewShell->CheckOwnerShip_Impl(); - delete pImp; -} - -//-------------------------------------------------------------------- - -BOOL SfxPrintProgress::SetState( ULONG nValue, ULONG nNewRange ) -{ - if ( pImp->bShow ) - { - pImp->bShow = FALSE; - if ( pImp->pMonitor ) - { - pImp->pMonitor->Show(); - pImp->pMonitor->Update(); - } - } - - return pImp->SetPage( (USHORT)nValue, GetStateText_Impl() ) && - SfxProgress::SetState( nValue, nNewRange ); -} - -//-------------------------------------------------------------------- - -void SfxPrintProgress::SetText( const String& rText ) -{ - if ( pImp->pMonitor ) - { - pImp->pMonitor->SetText( rText ); - pImp->pMonitor->Update(); - } - SfxProgress::SetText( rText ); -} - -//------------------------------------------------------------------------ - -IMPL_LINK_INLINE_START( SfxPrintProgress, PrintErrorNotify, void *, EMPTYARG ) -{ - if ( pImp->pMonitor ) - pImp->pMonitor->Hide(); - // AbortJob calls EndPrint hdl, so do not delete pImp just now - BOOL bWasDeleteOnEndPrint = pImp->bDeleteOnEndPrint; - pImp->bDeleteOnEndPrint = FALSE; - pImp->pPrinter->AbortJob(); - InfoBox( pImp->GetViewShell()->GetWindow(), - String( SfxResId(STR_ERROR_PRINT) ) ).Execute(); - if ( pImp->bRestoreFlag && pImp->pViewShell->GetObjectShell()->IsEnableSetModified() != pImp->bOldFlag ) - pImp->pViewShell->GetObjectShell()->EnableSetModified( pImp->bOldFlag ); - pImp->GetViewShell()->GetObjectShell()->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_FAILED, NULL, NULL ) ); - // now we can clean up like normally EndPrint hdl does - if( bWasDeleteOnEndPrint ) - { - DELETEZ(pImp->pMonitor); - delete this; - } - return 0; -} -IMPL_LINK_INLINE_END( SfxPrintProgress, PrintErrorNotify, void *, EMPTYARG ) - -//------------------------------------------------------------------------ - -IMPL_LINK( SfxPrintProgress, StartPrintNotify, void *, EMPTYARG ) -{ - SfxObjectShell *pObjShell = pImp->pViewShell->GetObjectShell(); - SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_PRINTDOC, GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ), pObjShell)); - pObjShell->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_STARTED, NULL, NULL ) ); - return 0; -} - -IMPL_LINK( SfxPrintProgress, EndPrintNotify, void *, EMPTYARG ) -{ - if ( pImp->pMonitor ) - pImp->pMonitor->Hide(); - - SfxViewShell* pViewShell = pImp->pViewShell; - - // Slots enablen - pViewShell->Invalidate( SID_PRINTDOC ); - pViewShell->Invalidate( SID_PRINTDOCDIRECT ); - pViewShell->Invalidate( SID_SETUPPRINTER ); - - // . . . falls der Printer im System umgestellt wurde, hier Aenderung - // nachziehen. - //! if( pMDI->IsPrinterChanged() ) pMDI->Changed( 0L ); - - // Callbacks rausnehmen - // pImp->pPrinter->SetEndPrintHdl( Link() ); - pImp->pPrinter->SetErrorHdl( Link() ); - pImp->bCallbacks = FALSE; - - // ggf. alten Printer wieder einsetzen - if ( pImp->pOldPrinter ) - { - // Fix #59613#: niemals den aktuellen Printer synchron abschiessen ! - // Da sowieso immer bDeleteOnEndPrint gesetzt wird, wird der der Drucker im - // dtor vom Printprogress ( dann aber asynchron !! ) zur"uckgesetzt. -/* - pImp->pViewShell->SetPrinter( pImp->pOldPrinter, SFX_PRINTER_PRINTER ); - pImp->pOldPrinter = 0; - pImp->pPrinter = 0; - */ - } - else - // ggf. vorherigen Print-To-File-Status zuruecksetzen - pViewShell->GetPrinter()->EnablePrintFile( pImp->bOldEnablePrintFile ); - - // it is possible that after printing the document or view is deleted (because the VieShell got the ownership) - // so first clean up - if ( pImp->bRestoreFlag && pViewShell->GetObjectShell()->IsEnableSetModified() != pImp->bOldFlag ) - pViewShell->GetObjectShell()->EnableSetModified( TRUE ); - - pViewShell->GetObjectShell()->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_COMPLETED, NULL, NULL ) ); - if ( pImp->bDeleteOnEndPrint ) - { - DELETEZ(pImp->pMonitor); - delete this; - } - else - { - DBG_ASSERT( !pImp->pOldPrinter, "Unable to restore printer!" ); - pImp->bRunning = FALSE; - } - - return 0; -} - -//------------------------------------------------------------------------ - -void SfxPrintProgress::DeleteOnEndPrint() -{ - UnLock(); // jetzt schon, wg. Drucken im Thread -#ifndef WNT - // da das Drucken im 'Thread' unter Windows zu undefiniert ist bleibt der - // Print-Monitor dort stehen, auf den anderen Plattformen kann man dann - // weiterarbeiten, also kommt das Teil weg - DELETEZ( pImp->pMonitor ); -#endif - - pImp->bDeleteOnEndPrint = TRUE; - if ( !pImp->bRunning ) - delete this; -} - -//------------------------------------------------------------------------ - -void SfxPrintProgress::RestoreOnEndPrint( SfxPrinter *pOldPrinter, - BOOL bOldEnablePrintFile ) -{ - pImp->pOldPrinter = pOldPrinter; - pImp->bOldEnablePrintFile = bOldEnablePrintFile; -} - -//------------------------------------------------------------------------ - -void SfxPrintProgress::RestoreOnEndPrint( SfxPrinter *pOldPrinter ) -{ - RestoreOnEndPrint( pOldPrinter, FALSE ); -} - -//------------------------------------------------------------------------ - -void SfxPrintProgress::SetCancelHdl( const Link& aCancelHdl ) -{ - pImp->aCancelHdl = aCancelHdl; -} - -BOOL SfxPrintProgress::IsAborted() const -{ - return pImp->bAborted; -} diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 19aa4b75ee0f..3a7185565408 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -93,7 +93,7 @@ #include <hash_map> #include <sfx2/event.hxx> -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #define OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper #define OINTERFACECONTAINERHELPER ::cppu::OInterfaceContainerHelper diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc index 243dcd56e4c8..3dce1ec795bb 100644 --- a/sfx2/source/view/view.hrc +++ b/sfx2/source/view/view.hrc @@ -41,12 +41,6 @@ #define STR_NOSTARTPRINTER (RID_SFX_VIEW_START+ 9) #define STR_PRINTING (RID_SFX_VIEW_START+10) -#ifndef STR_UNDO -#define STR_UNDO (RID_SFX_VIEW_START+11) -#define STR_REDO (RID_SFX_VIEW_START+12) -#define STR_REPEAT (RID_SFX_VIEW_START+13) -#endif - #define DLG_PRINTMONITOR (RID_SFX_VIEW_START) #define FT_DOCNAME 1 #define FT_PRINTING 2 diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx index f9469e8a9f88..3eed678420dd 100644 --- a/sfx2/source/view/viewfac.cxx +++ b/sfx2/source/view/viewfac.cxx @@ -30,8 +30,8 @@ // INCLUDE --------------------------------------------------------------- #include <sfx2/app.hxx> +#include "sfx2/viewfac.hxx" #include <rtl/ustrbuf.hxx> -#include "viewfac.hxx" // STATIC DATA ----------------------------------------------------------- diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 6222721d9b83..dbadbc54ebd4 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -36,12 +36,8 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif -#ifndef _SPLITWIN_HXX //autogen #include <vcl/splitwin.hxx> -#endif #include <unotools/moduleoptions.hxx> #include <svl/intitem.hxx> #include <svl/visitem.hxx> @@ -50,9 +46,7 @@ #include <svl/slstitm.hxx> #include <svl/whiter.hxx> #include <svl/undo.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> #include <tools/diagnose_ex.h> @@ -98,6 +92,8 @@ #include <comphelper/storagehelper.hxx> #include <svtools/asynclink.hxx> #include <svl/sharecontrolfile.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtdata.hxx> #include <framework/framelistanalyzer.hxx> #include <boost/optional.hpp> @@ -113,9 +109,6 @@ using ::com::sun::star::document::XViewDataSupplier; using ::com::sun::star::container::XIndexContainer; namespace css = ::com::sun::star; -#ifndef GCC -#endif - // wg. ViewFrame::Current #include "appdata.hxx" #include <sfx2/taskpane.hxx> @@ -132,10 +125,10 @@ namespace css = ::com::sun::star; #include <sfx2/request.hxx> #include <sfx2/docfac.hxx> #include <sfx2/ipclient.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "appbas.hxx" #include <sfx2/objitem.hxx> -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include <sfx2/event.hxx> #include "fltfnc.hxx" #include <sfx2/docfile.hxx> @@ -152,7 +145,7 @@ namespace css = ::com::sun::star; #include "workwin.hxx" #include "helper.hxx" #include "macro.hxx" -#include "minfitem.hxx" +#include "sfx2/minfitem.hxx" #include "../appl/app.hrc" #include "impviewframe.hxx" @@ -1030,8 +1023,8 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) if ( pShUndoMgr && pShUndoMgr->GetUndoActionCount() ) { - String aTmp( SfxResId( STR_UNDO ) ); - aTmp += pShUndoMgr->GetUndoActionComment(0); + String aTmp( SvtResId( STR_UNDO ) ); + aTmp+= pShUndoMgr->GetUndoActionComment(0); rSet.Put( SfxStringItem( SID_UNDO, aTmp ) ); } else @@ -1039,7 +1032,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) if ( pShUndoMgr && pShUndoMgr->GetRedoActionCount() ) { - String aTmp( SfxResId(STR_REDO) ); + String aTmp( SvtResId(STR_REDO) ); aTmp += pShUndoMgr->GetRedoActionComment(0); rSet.Put( SfxStringItem( SID_REDO, aTmp ) ); } @@ -1049,7 +1042,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() && pShUndoMgr->CanRepeat(*pTarget, 0) ) { - String aTmp( SfxResId(STR_REPEAT) ); + String aTmp( SvtResId(STR_REPEAT) ); aTmp += pShUndoMgr->GetRepeatActionComment(*pTarget, 0); rSet.Put( SfxStringItem( SID_REPEAT, aTmp ) ); } diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 480b5307df2e..05ce981a51b6 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -30,7 +30,7 @@ #include "impviewframe.hxx" #include "statcach.hxx" -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include "workwin.hxx" #include "sfx2/app.hxx" diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index d1cfd8c2d181..4ef4244f28e6 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -50,7 +50,7 @@ #include "viewimp.hxx" #include <sfx2/viewfrm.hxx> #include <sfx2/prnmon.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/request.hxx> #include <sfx2/objsh.hxx> #include "sfxtypes.hxx" diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 968d0cbe8676..2edd0f382aa9 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -70,7 +70,7 @@ #include "view.hrc" #include <sfx2/viewsh.hxx> #include "viewimp.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/request.hxx> #include <sfx2/templdlg.hxx> #include <sfx2/printer.hxx> @@ -81,8 +81,8 @@ #include "view.hrc" #include "sfxlocal.hrc" #include <sfx2/sfxbasecontroller.hxx> +#include "sfx2/mailmodelapi.hxx" #include <sfx2/viewfrm.hxx> -#include "mailmodelapi.hxx" #include <sfx2/event.hxx> #include <sfx2/fcontnr.hxx> #include <sfx2/ipclient.hxx> |