diff options
Diffstat (limited to 'sfx2/source')
107 files changed, 475 insertions, 2133 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 6e13894feb49..a260df92bc92 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,7 +109,7 @@ #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> @@ -291,7 +280,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; diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src index 0858e66e7347..1ecfe4dcbb40 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." ; @@ -1054,19 +1093,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/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 6afa8c68ed83..9481b7ff5730 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -80,7 +80,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> @@ -93,7 +93,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..ddec7341f4c5 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -81,8 +81,8 @@ #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" 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 89bb5f23f1de..fa2a60a45dcc 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 d615d90ff37a..2ce4eac67295 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -53,7 +53,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 bd9efc9bca1e..1387317f7581 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -118,12 +118,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 +132,7 @@ #include <sfx2/sfxdlg.hxx> #include <sfx2/dialogs.hrc> #include "sorgitm.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::beans; diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 6f9d3b258745..24a1725aa99c 100755 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -52,10 +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> #include <svl/lckbitem.hxx> @@ -97,6 +94,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; @@ -131,7 +129,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 "applet.hxx" @@ -144,54 +142,53 @@ using namespace ::com::sun::star::io; #define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader" #define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler" -static char const sTemplateRegionName[] = "TemplateRegionName"; -static char const sTemplateName[] = "TemplateName"; -static char const sAsTemplate[] = "AsTemplate"; -static char const sOpenNewView[] = "OpenNewView"; -static char const sViewId[] = "ViewId"; -static char const sPluginMode[] = "PluginMode"; -static char const sReadOnly[] = "ReadOnly"; -static char const sStartPresentation[] = "StartPresentation"; -static char const sFrameName[] = "FrameName"; -static char const sMediaType[] = "MediaType"; -static char const sPostData[] = "PostData"; -static char const sCharacterSet[] = "CharacterSet"; -static char const sInputStream[] = "InputStream"; -static char const sStream[] = "Stream"; -static char const sOutputStream[] = "OutputStream"; -static char const sHidden[] = "Hidden"; -static char const sPreview[] = "Preview"; -static char const sViewOnly[] = "ViewOnly"; -static char const sDontEdit[] = "DontEdit"; -static char const sSilent[] = "Silent"; -static char const sJumpMark[] = "JumpMark"; -static char const sFileName[] = "FileName"; -static char const sSalvageURL[] = "SalvagedFile"; -static char const sStatusInd[] = "StatusIndicator"; -static char const sModel[] = "Model"; -static char const sFrame[] = "Frame"; -static char const sViewData[] = "ViewData"; -static char const sFilterData[] = "FilterData"; -static char const sSelectionOnly[] = "SelectionOnly"; -static char const sFilterFlags[] = "FilterFlags"; -static char const sMacroExecMode[] = "MacroExecutionMode"; -static char const sUpdateDocMode[] = "UpdateDocMode"; -static char const sMinimized[] = "Minimized"; -static char const sInteractionHdl[] = "InteractionHandler"; -static char const sUCBContent[] = "UCBContent"; -static char const sRepairPackage[] = "RepairPackage"; -static char const sDocumentTitle[] = "DocumentTitle"; -static char const sComponentData[] = "ComponentData"; -static char const sComponentContext[] = "ComponentContext"; -static char const sDocumentBaseURL[] = "DocumentBaseURL"; -static char const sHierarchicalDocumentName[] = "HierarchicalDocumentName"; -static char const sCopyStreamIfPossible[] = "CopyStreamIfPossible"; -static char const sNoAutoSave[] = "NoAutoSave"; -static char const sFolderName[] = "FolderName"; -static char const sUseSystemDialog[] = "UseSystemDialog"; -static char const sStandardDir[] = "StandardDir"; -static char const sBlackList[] = "BlackList"; -static char const sModifyPasswordInfo[] = "ModifyPasswordInfo"; +static const String sTemplateRegionName = String::CreateFromAscii( "TemplateRegionName" ); +static const String sTemplateName = String::CreateFromAscii( "TemplateName" ); +static const String sAsTemplate = String::CreateFromAscii( "AsTemplate" ); +static const String sOpenNewView = String::CreateFromAscii( "OpenNewView" ); +static const String sViewId = String::CreateFromAscii( "ViewId" ); +static const String sPluginMode = String::CreateFromAscii( "PluginMode" ); +static const String sReadOnly = String::CreateFromAscii( "ReadOnly" ); +static const String sStartPresentation = String::CreateFromAscii( "StartPresentation" ); +static const String sFrameName = String::CreateFromAscii( "FrameName" ); +static const String sMediaType = String::CreateFromAscii( "MediaType" ); +static const String sPostData = String::CreateFromAscii( "PostData" ); +static const String sCharacterSet = String::CreateFromAscii( "CharacterSet" ); +static const String sInputStream = String::CreateFromAscii( "InputStream" ); +static const String sStream = String::CreateFromAscii( "Stream" ); +static const String sOutputStream = String::CreateFromAscii( "OutputStream" ); +static const String sHidden = String::CreateFromAscii( "Hidden" ); +static const String sPreview = String::CreateFromAscii( "Preview" ); +static const String sViewOnly = String::CreateFromAscii( "ViewOnly" ); +static const String sDontEdit = String::CreateFromAscii( "DontEdit" ); +static const String sSilent = String::CreateFromAscii( "Silent" ); +static const String sJumpMark = String::CreateFromAscii( "JumpMark" ); +static const String sFileName = String::CreateFromAscii( "FileName" ); +static const String sSalvageURL = String::CreateFromAscii( "SalvagedFile" ); +static const String sStatusInd = String::CreateFromAscii( "StatusIndicator" ); +static const String sModel = String::CreateFromAscii( "Model" ); +static const String sFrame = String::CreateFromAscii( "Frame" ); +static const String sViewData = String::CreateFromAscii( "ViewData" ); +static const String sFilterData = String::CreateFromAscii( "FilterData" ); +static const String sSelectionOnly = String::CreateFromAscii( "SelectionOnly" ); +static const String sFilterFlags = String::CreateFromAscii( "FilterFlags" ); +static const String sMacroExecMode = String::CreateFromAscii( "MacroExecutionMode" ); +static const String sUpdateDocMode = String::CreateFromAscii( "UpdateDocMode" ); +static const String sMinimized = String::CreateFromAscii( "Minimized" ); +static const String sInteractionHdl = String::CreateFromAscii( "InteractionHandler" ); +static const String sUCBContent = String::CreateFromAscii( "UCBContent" ); +static const String sRepairPackage = String::CreateFromAscii( "RepairPackage" ); +static const String sDocumentTitle = String::CreateFromAscii( "DocumentTitle" ); +static const String sComponentData = String::CreateFromAscii( "ComponentData" ); +static const String sComponentContext = String::CreateFromAscii( "ComponentContext" ); +static const String sDocumentBaseURL = String::CreateFromAscii( "DocumentBaseURL" ); +static const String sHierarchicalDocumentName = String::CreateFromAscii( "HierarchicalDocumentName" ); +static const String sCopyStreamIfPossible = String::CreateFromAscii( "CopyStreamIfPossible" ); +static const String sNoAutoSave = String::CreateFromAscii( "NoAutoSave" ); +static const String sFolderName = String::CreateFromAscii( "FolderName" ); +static const String sUseSystemDialog = String::CreateFromAscii( "UseSystemDialog" ); +static const String sStandardDir = String::CreateFromAscii( "StandardDir" ); +static const String sBlackList = String::CreateFromAscii( "BlackList" ); void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) { @@ -466,15 +463,15 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque for ( sal_uInt16 n=0; n<nCount; n++ ) { const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n]; - rtl::OUString aName = rProp.Name; - if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrame)) ) + String aName = rProp.Name; + if ( aName == sFrame ) { Reference< XFrame > xFrame; OSL_VERIFY( rProp.Value >>= xFrame ); rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) ); } else - if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) + if ( aName == sHidden ) { sal_Bool bVal = sal_False; if (rProp.Value >>= bVal) @@ -491,18 +488,18 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque ++nFoundArgs; #endif const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n]; - rtl::OUString aName = rProp.Name; - if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sModel)) ) + String aName = rProp.Name; + if ( aName == sModel ) rSet.Put( SfxUnoAnyItem( SID_DOCUMENT, rProp.Value ) ); - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentData)) ) + else if ( aName == sComponentData ) { rSet.Put( SfxUnoAnyItem( SID_COMPONENTDATA, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentContext)) ) + else if ( aName == sComponentContext ) { rSet.Put( SfxUnoAnyItem( SID_COMPONENTCONTEXT, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStatusInd)) ) + else if ( aName == sStatusInd ) { Reference< ::com::sun::star::task::XStatusIndicator > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -510,7 +507,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_PROGRESS_STATUSBAR_CONTROL, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInteractionHdl)) ) + else if ( aName == sInteractionHdl ) { Reference< ::com::sun::star::task::XInteractionHandler > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -518,11 +515,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewData)) ) + else if ( aName == sViewData ) rSet.Put( SfxUnoAnyItem( SID_VIEW_DATA, rProp.Value ) ); - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterData)) ) + else if ( aName == sFilterData ) rSet.Put( SfxUnoAnyItem( SID_FILTER_DATA, rProp.Value ) ); - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInputStream)) ) + else if ( aName == sInputStream ) { Reference< XInputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -530,7 +527,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_INPUTSTREAM, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStream)) ) + else if ( aName == sStream ) { Reference< XInputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -538,7 +535,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_STREAM, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUCBContent)) ) + else if ( aName == sUCBContent ) { Reference< XContent > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -546,7 +543,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_CONTENT, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOutputStream)) ) + else if ( aName == sOutputStream ) { Reference< XOutputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -554,7 +551,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_OUTPUTSTREAM, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPostData)) ) + else if ( aName == sPostData ) { Reference< XInputStream > xVal; sal_Bool bOK = (rProp.Value >>= xVal); @@ -562,7 +559,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_POSTDATA, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrame)) ) + else if ( aName == sFrame ) { Reference< XFrame > xFrame; sal_Bool bOK = (rProp.Value >>= xFrame); @@ -570,7 +567,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sAsTemplate)) ) + else if ( aName == sAsTemplate ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -578,7 +575,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_TEMPLATE, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOpenNewView)) ) + else if ( aName == sOpenNewView ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -586,7 +583,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_OPEN_NEW_VIEW, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewId)) ) + else if ( aName == sViewId ) { sal_Int16 nVal = -1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -594,7 +591,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_VIEW_ID, nVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPluginMode)) ) + else if ( aName == sPluginMode ) { sal_Int16 nVal = -1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -602,7 +599,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_PLUGIN_MODE, nVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sReadOnly)) ) + else if ( aName == sReadOnly ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -610,7 +607,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_DOC_READONLY, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStartPresentation)) ) + else if ( aName == sStartPresentation ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -618,7 +615,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSelectionOnly)) ) + else if ( aName == sSelectionOnly ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -626,7 +623,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_SELECTION, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) + else if ( aName == sHidden ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -634,7 +631,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_HIDDEN, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMinimized)) ) + else if ( aName == sMinimized ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -642,7 +639,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_MINIMIZED, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSilent)) ) + else if ( aName == sSilent ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -650,7 +647,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_SILENT, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPreview)) ) + else if ( aName == sPreview ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -658,7 +655,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_PREVIEW, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewOnly)) ) + else if ( aName == sViewOnly ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -666,7 +663,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_VIEWONLY, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDontEdit)) ) + else if ( aName == sDontEdit ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -674,7 +671,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_EDITDOC, !bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUseSystemDialog)) ) + else if ( aName == sUseSystemDialog ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -682,7 +679,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_FILE_DIALOG, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStandardDir)) ) + else if ( aName == sStandardDir ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -690,7 +687,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_STANDARD_DIR, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBlackList)) ) + else if ( aName == sBlackList ) { ::com::sun::star::uno::Sequence< ::rtl::OUString > xVal; sal_Bool bOK = (rProp.Value >>= xVal); @@ -702,7 +699,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque rSet.Put( stringList ); } } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFileName)) ) + else if ( aName == sFileName ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -710,7 +707,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_FILE_NAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvageURL)) ) + else if ( aName == sSalvageURL ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -718,7 +715,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFolderName)) ) + else if ( aName == sFolderName ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -726,7 +723,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_PATH, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrameName)) ) + else if ( aName == sFrameName ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -734,7 +731,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK && sVal.getLength()) rSet.Put( SfxStringItem( SID_TARGETNAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMediaType)) ) + else if ( aName == sMediaType ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -742,7 +739,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_CONTENTTYPE, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateName)) ) + else if ( aName == sTemplateName ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -750,7 +747,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_NAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateRegionName)) ) + else if ( aName == sTemplateRegionName ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -758,7 +755,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_REGIONNAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sJumpMark)) ) + else if ( aName == sJumpMark ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -766,7 +763,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_JUMPMARK, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCharacterSet)) ) + else if ( aName == sCharacterSet ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -774,7 +771,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_CHARSET, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterFlags)) ) + else if ( aName == sFilterFlags ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -782,7 +779,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_FILE_FILTEROPTIONS, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMacroExecMode)) ) + else if ( aName == sMacroExecMode ) { sal_Int16 nVal =-1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -790,7 +787,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_MACROEXECMODE, nVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUpdateDocMode)) ) + else if ( aName == sUpdateDocMode ) { sal_Int16 nVal =-1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -798,7 +795,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_UPDATEDOCMODE, nVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sRepairPackage)) ) + else if ( aName == sRepairPackage ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -806,7 +803,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_REPAIRPACKAGE, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentTitle)) ) + else if ( aName == sDocumentTitle ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -814,7 +811,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOCINFO_TITLE, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentBaseURL)) ) + else if ( aName == sDocumentBaseURL ) { ::rtl::OUString sVal; // the base url can be set to empty ( for embedded objects for example ) @@ -823,7 +820,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_BASEURL, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHierarchicalDocumentName)) ) + else if ( aName == sHierarchicalDocumentName ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); @@ -831,7 +828,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_HIERARCHICALNAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCopyStreamIfPossible)) ) + else if ( aName == sCopyStreamIfPossible ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -839,7 +836,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_COPY_STREAM_IF_POSSIBLE, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sNoAutoSave)) ) + else if ( aName == sNoAutoSave ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -847,10 +844,6 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_NOAUTOSAVE, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sModifyPasswordInfo)) ) - { - rSet.Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, rProp.Value ) ); - } #ifdef DBG_UTIL else --nFoundArgs; @@ -1063,8 +1056,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nAdditional++; if ( rSet.GetItemState( SID_NOAUTOSAVE ) == SFX_ITEM_SET ) nAdditional++; - if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SFX_ITEM_SET ) - nAdditional++; // consider additional arguments nProps += nAdditional; @@ -1204,9 +1195,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta // used only internally if ( nId == SID_SAVETO ) continue; - if ( nId == SID_MODIFYPASSWORDINFO ) - continue; - } + } ByteString aDbg( "Unknown item detected: "); aDbg += ByteString::CreateFromInt32( nId ); @@ -1329,67 +1318,67 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta const SfxPoolItem *pItem=0; if ( rSet.GetItemState( SID_COMPONENTDATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sComponentData)); + pValue[nActProp].Name = sComponentData; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_COMPONENTCONTEXT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sComponentContext)); + pValue[nActProp].Name = sComponentContext; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStatusInd)); + pValue[nActProp].Name = sStatusInd; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_INTERACTIONHANDLER, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sInteractionHdl)); + pValue[nActProp].Name = sInteractionHdl; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_VIEW_DATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewData)); + pValue[nActProp].Name = sViewData; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_FILTER_DATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFilterData)); + pValue[nActProp].Name = sFilterData; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOCUMENT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModel)); + pValue[nActProp].Name = sModel; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_CONTENT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUCBContent)); + pValue[nActProp].Name = sUCBContent; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_INPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sInputStream)); + pValue[nActProp].Name = sInputStream; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_STREAM, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStream)); + pValue[nActProp].Name = sStream; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_OUTPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOutputStream)); + pValue[nActProp].Name = sOutputStream; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_POSTDATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPostData)); + pValue[nActProp].Name = sPostData; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_FILLFRAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFrame)); + pValue[nActProp].Name = sFrame; if ( pItem->ISA( SfxUsrAnyItem ) ) { OSL_ENSURE( false, "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" ); @@ -1402,82 +1391,82 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_TEMPLATE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sAsTemplate)); + pValue[nActProp].Name = sAsTemplate; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOpenNewView)); + pValue[nActProp].Name = sOpenNewView; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_VIEW_ID, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewId)); + pValue[nActProp].Name = sViewId; pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_PLUGIN_MODE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPluginMode)); + pValue[nActProp].Name = sPluginMode; pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOC_READONLY, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sReadOnly)); + pValue[nActProp].Name = sReadOnly; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStartPresentation)); + pValue[nActProp].Name = sStartPresentation; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_SELECTION, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSelectionOnly)); + pValue[nActProp].Name = sSelectionOnly; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_HIDDEN, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sHidden)); + pValue[nActProp].Name = sHidden; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_MINIMIZED, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMinimized)); + pValue[nActProp].Name = sMinimized; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_SILENT, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSilent)); + pValue[nActProp].Name = sSilent; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_PREVIEW, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPreview)); + pValue[nActProp].Name = sPreview; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_VIEWONLY, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewOnly)); + pValue[nActProp].Name = sViewOnly; pValue[nActProp++].Value <<= (sal_Bool) (( ((SfxBoolItem*)pItem)->GetValue() )); } if ( rSet.GetItemState( SID_EDITDOC, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDontEdit)); + pValue[nActProp].Name = sDontEdit; pValue[nActProp++].Value <<= (sal_Bool) (!( ((SfxBoolItem*)pItem)->GetValue() )); } if ( rSet.GetItemState( SID_FILE_DIALOG, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUseSystemDialog)); + pValue[nActProp].Name = sUseSystemDialog; pValue[nActProp++].Value <<= (sal_Bool) ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_STANDARD_DIR, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sStandardDir)); + pValue[nActProp].Name = sStandardDir; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_BLACK_LIST, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sBlackList)); + pValue[nActProp].Name = sBlackList; com::sun::star::uno::Sequence< rtl::OUString > aList; ((SfxStringListItem*)pItem)->GetStringList( aList ); @@ -1485,90 +1474,86 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_TARGETNAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFrameName)); + pValue[nActProp].Name = sFrameName; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvageURL)); + pValue[nActProp].Name = sSalvageURL; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFolderName)); + pValue[nActProp].Name = sFolderName; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_CONTENTTYPE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMediaType)); + pValue[nActProp].Name = sMediaType; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_TEMPLATE_NAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sTemplateName)); + pValue[nActProp].Name = sTemplateName; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sTemplateRegionName)); + pValue[nActProp].Name = sTemplateRegionName; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_JUMPMARK, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sJumpMark)); + pValue[nActProp].Name = sJumpMark; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_CHARSET, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sCharacterSet)); + pValue[nActProp].Name = sCharacterSet; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_MACROEXECMODE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sMacroExecMode)); + pValue[nActProp].Name = sMacroExecMode; pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_UPDATEDOCMODE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sUpdateDocMode)); + pValue[nActProp].Name = sUpdateDocMode; pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_REPAIRPACKAGE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sRepairPackage)); + pValue[nActProp].Name = sRepairPackage; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_DOCINFO_TITLE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDocumentTitle)); + pValue[nActProp].Name = sDocumentTitle; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_DOC_BASEURL, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sDocumentBaseURL)); + pValue[nActProp].Name = sDocumentBaseURL; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sHierarchicalDocumentName)); + pValue[nActProp].Name = sHierarchicalDocumentName; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sCopyStreamIfPossible)); + pValue[nActProp].Name = sCopyStreamIfPossible; pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } if ( rSet.GetItemState( SID_NOAUTOSAVE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sNoAutoSave)); + pValue[nActProp].Name = sNoAutoSave; pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, sal_False, &pItem ) == SFX_ITEM_SET ) - { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModifyPasswordInfo)); - pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); - } + } } @@ -2383,7 +2368,7 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; + m_pAbort = new comphelper::OInteractionAbort; m_pOptions = new FilterOptionsContinuation; m_lContinuations.realloc( 2 ); @@ -2405,107 +2390,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; - - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; - + 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 ); } -/*uno::*/Any SAL_CALL RequestPackageReparation::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +sal_Bool RequestPackageReparation_Impl::isApproved() { - return ::cppu::queryInterface ( rType, - // OWeakObject interfaces - dynamic_cast< XInterface* > ( (XInteractionRequest *) this ), - static_cast< XWeak* > ( this ), - // my own interfaces - static_cast< XInteractionRequest* > ( this ) ); + return m_pApprove->wasSelected(); } -void SAL_CALL RequestPackageReparation::acquire( ) throw () +::com::sun::star::uno::Any SAL_CALL RequestPackageReparation_Impl::getRequest() + throw( ::com::sun::star::uno::RuntimeException ) { - OWeakObject::acquire(); + return m_aRequest; } -void SAL_CALL RequestPackageReparation::release( ) throw () +::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 ) { - OWeakObject::release(); + return m_lContinuations; } -::com::sun::star::uno::Any SAL_CALL RequestPackageReparation::getRequest() - throw( ::com::sun::star::uno::RuntimeException ) +RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) { - return m_aRequest; + pImp = new RequestPackageReparation_Impl( aName ); + pImp->acquire(); } -::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 ) +RequestPackageReparation::~RequestPackageReparation() { - return m_lContinuations; + pImp->release(); +} + +sal_Bool RequestPackageReparation::isApproved() +{ + return pImp->isApproved(); +} + +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > RequestPackageReparation::GetRequest() +{ + 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; - + m_pAbort = new comphelper::OInteractionAbort; m_lContinuations.realloc( 1 ); m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); } -/*uno::*/Any SAL_CALL NotifyBrokenPackage::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +sal_Bool NotifyBrokenPackage_Impl::isAborted() +{ + return m_pAbort->wasSelected(); +} + +::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 10e3c9b1a04a..02763d0480dd 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 index 72ac94a9b38e..274e06b13cdf 100644 --- a/sfx2/source/appl/makefile.mk +++ b/sfx2/source/appl/makefile.mk @@ -56,7 +56,8 @@ CFLAGS+=-DENABLE_QUICKSTART_APPLET .INCLUDE: pkg_config.mk CFLAGS+=$(PKGCONFIG_CFLAGS) CFLAGS+=-DENABLE_QUICKSTART_APPLET - CDEFS+=-DPLUGIN_NAME=libqstart_gtk$(DLLPOSTFIX)$(DLLPOST) +# definition moved to shutdownicon.cxx +# CDEFS+=-DPLUGIN_NAME=libqstart_gtk$(DLLPOSTFIX)$(DLLPOST) .ENDIF # "$(ENABLE_SYSTRAY_GTK)"=="TRUE" .ELSE CDEFS+=-DDLL_NAME=sfx$(DLLPOSTFIX)$(DLLPOST) 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 597509cf34bd..49c89cf32fa9 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 a4d134df27fa..53907f875fe8 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 b9ff344a1513..a1183019e8d1 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <algorithm> #include <com/sun/star/uno/Reference.h> @@ -70,7 +70,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..04d9ce06aa9c 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; @@ -89,6 +89,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/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/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index e66dd2c56eaf..dc496258d091 100644 --- 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/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/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 fab379f9f215..39f59cb775d9 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 2ea5ef5fe4b1..5b0a42a20444 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 7b4e4289a49c..c78568757b77 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 <com/sun/star/frame/XController.hpp> diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index b0890a3ee781..2112a03dd63f 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -92,7 +92,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 0e0c6ec22ee1..aadaba176285 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -47,27 +47,22 @@ #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> #include <com/sun/star/ucb/InsertCommandArgument.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/document/XExporter.hpp> - -#ifndef _RTL_TEXTENC_H -#include <rtl/textench.h> -#endif +#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 16d12f469205..000000000000 --- a/sfx2/source/dialog/mailmodelapi.cxx +++ /dev/null @@ -1,695 +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> - -extern sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, String& rPasswd ); - -// -------------------------------------------------------------- -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 index 4c56cd683e34..26acd12c1413 100755 --- a/sfx2/source/dialog/makefile.mk +++ b/sfx2/source/dialog/makefile.mk @@ -104,16 +104,6 @@ CFLAGS+=-DBUILD_VER_STRING="$(subst,",\" "$(BUILD_VER_STRING)")" .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 diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 1f5472cf2052..4a2886e6fa3c 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 e7cc73ca04bf..3a4e2e7637b2 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..afad5053a5f7 100755..100644 --- a/sfx2/source/dialog/sfxdlg.cxx +++ b/sfx2/source/dialog/sfxdlg.cxx @@ -29,7 +29,9 @@ #include "precompiled_sfx2.hxx" #include <sfx2/sfxdlg.hxx> -#include "cuilib.hxx" +//#include "cuilib.hxx" + +#define DLL_NAME "libcuili.so" #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 93c2e0e09595..df010f6bf292 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 9edeb05b43ac..299cd594e47d 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 beb43c192810..a640dad447e2 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/applet.cxx b/sfx2/source/doc/applet.cxx deleted file mode 100644 index 844eb5726b1a..000000000000 --- a/sfx2/source/doc/applet.cxx +++ /dev/null @@ -1,383 +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 "applet.hxx" -#include <sfx2/sfxdlg.hxx> -#include <sfx2/sfxsids.hrc> - -#include "com/sun/star/uno/XComponentContext.hpp" -#include "cppuhelper/factory.hxx" -#include <tools/urlobj.hxx> -#include <tools/debug.hxx> -#include <sj2/sjapplet.hxx> -#include <vcl/syschild.hxx> -#include <rtl/ustring.hxx> -#include <toolkit/helper/vclunohelper.hxx> -#include <unotools/javaoptions.hxx> -#include <svtools/miscopt.hxx> -#include <comphelper/TypeGeneration.hxx> - -using namespace ::com::sun::star; -using namespace ::comphelper; - -namespace sfx2 -{ -class AppletWindow_Impl : public SystemChildWindow -{ -public: - SjApplet2* pApplet; - AppletWindow_Impl( Window* pParent, SjApplet2* pApp ) - : SystemChildWindow( pParent, WB_CLIPCHILDREN ) - , pApplet(pApp) - {} - - virtual void Resize(); -}; - -void AppletWindow_Impl::Resize() -{ - Size aSize( GetOutputSizePixel() ); - if ( pApplet ) - pApplet->setSizePixel( aSize ); -} - -class AppletWrapper_Impl : public SjApplet2 -{ - virtual void appletResize( const Size & ); - virtual void showDocument( const INetURLObject &, const XubString & ); - virtual void showStatus( const XubString & ); -}; - -void AppletWrapper_Impl::appletResize( const Size & ) {} -void AppletWrapper_Impl::showDocument( const INetURLObject &, const XubString & ) {} -void AppletWrapper_Impl::showStatus( const XubString & ) {} - -#define PROPERTY_UNBOUND 0 -#define PROPERTY_MAYBEVOID ::com::sun::star::beans::PropertyAttribute::MAYBEVOID - -#define WID_APPLET_CODE 1 -#define WID_APPLET_CODEBASE 2 -#define WID_APPLET_COMMANDS 3 -#define WID_APPLET_DOCBASE 4 -#define WID_APPLET_ISSCRIPT 5 -#define WID_APPLET_NAME 6 -const SfxItemPropertyMapEntry* lcl_GetAppletPropertyMap_Impl() -{ - static SfxItemPropertyMapEntry aAppletPropertyMap_Impl[] = - { - { MAP_CHAR_LEN("AppletCode") , WID_APPLET_CODE , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 }, - { MAP_CHAR_LEN("AppletCodeBase"), WID_APPLET_CODEBASE , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 }, - { MAP_CHAR_LEN("AppletCommands"), WID_APPLET_COMMANDS , CPPU_E2T(CPPUTYPE_PROPERTYVALUE), PROPERTY_UNBOUND, 0 }, - { MAP_CHAR_LEN("AppletDocBase"), WID_APPLET_DOCBASE , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 }, - { MAP_CHAR_LEN("AppletIsScript"), WID_APPLET_ISSCRIPT , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_UNBOUND, 0 }, - { MAP_CHAR_LEN("AppletName") , WID_APPLET_NAME , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 }, - {0,0,0,0,0,0} - }; -return aAppletPropertyMap_Impl; -} - -::rtl::OUString AppletObject::getImplementationName() - throw( ::com::sun::star::uno::RuntimeException ) -{ - return impl_getStaticImplementationName(); -} - -::sal_Bool AppletObject::supportsService( const ::rtl::OUString& sServiceName ) - throw( ::com::sun::star::uno::RuntimeException ) -{ - ::com::sun::star::uno::Sequence< ::rtl::OUString > seqServiceNames = - getSupportedServiceNames(); - const ::rtl::OUString* pArray = seqServiceNames.getConstArray(); - for ( ::sal_Int32 nCounter=0; nCounter<seqServiceNames.getLength(); - nCounter++ ) - { - if ( pArray[nCounter] == sServiceName ) - { - return sal_True ; - } - } - return sal_False ; -} - -::com::sun::star::uno::Sequence< ::rtl::OUString > -AppletObject::getSupportedServiceNames() - throw( ::com::sun::star::uno::RuntimeException ) -{ - return impl_getStaticSupportedServiceNames(); -} - -::com::sun::star::uno::Sequence< ::rtl::OUString > -AppletObject::impl_getStaticSupportedServiceNames() -{ - ::com::sun::star::uno::Sequence< ::rtl::OUString > seqServiceNames( 1 ); - seqServiceNames.getArray() [0] = ::rtl::OUString::createFromAscii( - "com.sun.star.embed.SpecialEmbeddedObject" ); - return seqServiceNames ; -} - -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > -AppletObject::impl_createInstance( - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XComponentContext >& xContext ) - throw( ::com::sun::star::uno::Exception ) -{ - return static_cast< ::cppu::OWeakObject * >( new AppletObject( xContext ) ); -} - -::rtl::OUString AppletObject::impl_getStaticImplementationName() -{ - return ::rtl::OUString::createFromAscii( - "com.sun.star.comp.sfx2.AppletObject" ); -} - -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > -AppletObject::impl_createFactory() -{ - return uno::Reference< uno::XInterface >( - cppu::createSingleComponentFactory( - impl_createInstance, impl_getStaticImplementationName(), - impl_getStaticSupportedServiceNames() ), - uno::UNO_QUERY_THROW ); -} - -AppletObject::AppletObject( - const uno::Reference < uno::XComponentContext >& rContext ) - : mxContext( rContext ) - , maPropMap( lcl_GetAppletPropertyMap_Impl() ) - , mpApplet( NULL ) - , mbMayScript( FALSE ) -{ -} - -AppletObject::~AppletObject() -{ -} - -void SAL_CALL AppletObject::initialize( const uno::Sequence< uno::Any >& aArguments ) throw ( uno::Exception, uno::RuntimeException ) -{ - if ( aArguments.getLength() ) - aArguments[0] >>= mxObj; -} - -sal_Bool SAL_CALL AppletObject::load( - const uno::Sequence < com::sun::star::beans::PropertyValue >& /*lDescriptor*/, - const uno::Reference < frame::XFrame >& xFrame ) -throw( uno::RuntimeException ) -{ - if ( SvtJavaOptions().IsExecuteApplets() && SvtMiscOptions().IsPluginsEnabled() ) - { - mpApplet = new AppletWrapper_Impl; - - Window* pParent = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); - Window* pWin = new AppletWindow_Impl( pParent, mpApplet ); - pWin->SetBackground(); - pWin->Show(); - - // aCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "width" ) ), String( aPosSize.GetWidth() ) ); - // aCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "height" ) ), String( aPosSize.GetHeight() ) ); - - if( maName.getLength() ) - maCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "name" ) ), maName ); - - if( maCodeBase.getLength() ) - { - for ( sal_uInt32 nParams=0; nParams<maCmdList.Count(); nParams++ ) - { - if ( maCmdList[nParams].GetCommand().EqualsAscii("codebase") ) - { - maCmdList.Remove(nParams); - break; - } - } - - maCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "codebase" ) ), maCodeBase ); - } - - if( maClass.getLength() ) - maCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "code" ) ), maClass ); - - if( mbMayScript ) - maCmdList.Append( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "mayscript" ) ), String() ); - - INetURLObject aDocBase( maDocBase ); - mpApplet->Init( mxContext, pWin, aDocBase, maCmdList ); - uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY ); - - // we must destroy the applet before the parent is destroyed - xWindow->addEventListener( this ); - - xFrame->setComponent( xWindow, uno::Reference < frame::XController >() ); - return TRUE; - } - - return FALSE; -} - -void SAL_CALL AppletObject::cancel() throw( com::sun::star::uno::RuntimeException ) -{ - if ( mpApplet ) - { - mpApplet->appletClose(); // reparenting window - DELETEZ( mpApplet ); - } -} - -void SAL_CALL AppletObject::close( sal_Bool /*bDeliverOwnership*/ ) throw( com::sun::star::util::CloseVetoException, com::sun::star::uno::RuntimeException ) -{ -} - -void SAL_CALL AppletObject::addCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& ) throw( com::sun::star::uno::RuntimeException ) -{ -} - -void SAL_CALL AppletObject::removeCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& ) throw( com::sun::star::uno::RuntimeException ) -{ -} - -void SAL_CALL AppletObject::disposing( const com::sun::star::lang::EventObject& ) throw (com::sun::star::uno::RuntimeException) -{ - cancel(); -} - -uno::Reference< beans::XPropertySetInfo > SAL_CALL AppletObject::getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException ) -{ - static uno::Reference< beans::XPropertySetInfo > xInfo = new SfxItemPropertySetInfo( &maPropMap ); - return xInfo; -} - -void SAL_CALL AppletObject::setPropertyValue(const ::rtl::OUString& aPropertyName, const uno::Any& aAny) - throw ( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) -{ - - const SfxItemPropertySimpleEntry* pEntry = maPropMap.getByName( aPropertyName ); - if( !pEntry ) - throw beans::UnknownPropertyException(); - switch( pEntry->nWID ) - { - case WID_APPLET_CODE : - aAny >>= maClass; - break; - case WID_APPLET_CODEBASE : - //pImpl->aCodeBase = rURL.GetMainURL( INetURLObject::NO_DECODE ); - //if( rURL.GetProtocol() == INET_PROT_FILE - // && pImpl->aCodeBase.GetChar( 9 ) == INET_ENC_DELIM_TOKEN ) - // // Laufwerksbuchstabe auf ':' patchen - // pImpl->aCodeBase.SetChar( 9, INET_DELIM_TOKEN ); - - aAny >>= maCodeBase; - break; - case WID_APPLET_COMMANDS : - { - maCmdList.Clear(); - uno::Sequence < beans::PropertyValue > aCommandSequence; - if( aAny >>= aCommandSequence ) - maCmdList.FillFromSequence( aCommandSequence ); - } - break; - case WID_APPLET_DOCBASE : - aAny >>= maDocBase; - break; - case WID_APPLET_ISSCRIPT : - aAny >>= mbMayScript; - break; - case WID_APPLET_NAME : - aAny >>= maName; - break; - default:; - - } -} - -uno::Any SAL_CALL AppletObject::getPropertyValue(const ::rtl::OUString& aPropertyName) throw ( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) -{ - uno::Any aAny; - const SfxItemPropertySimpleEntry* pEntry = maPropMap.getByName( aPropertyName ); - if( !pEntry ) - throw beans::UnknownPropertyException(); - switch( pEntry->nWID ) - { - case WID_APPLET_CODE : - aAny <<= maClass; - break; - case WID_APPLET_CODEBASE : - aAny <<= maCodeBase; - break; - case WID_APPLET_COMMANDS : - { - uno::Sequence< beans::PropertyValue > aCommandSequence; - maCmdList.FillSequence( aCommandSequence ); - aAny <<= aCommandSequence; - } - break; - case WID_APPLET_DOCBASE : - break; - case WID_APPLET_ISSCRIPT : - aAny <<= mbMayScript; - break; - case WID_APPLET_NAME : - aAny <<= maName; - break; - default:; - - } - return aAny; -} - -void SAL_CALL AppletObject::addPropertyChangeListener(const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & ) throw( ::com::sun::star::uno::RuntimeException ) -{ -} - -void SAL_CALL AppletObject::removePropertyChangeListener(const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & ) throw( ::com::sun::star::uno::RuntimeException ) -{ -} - -void SAL_CALL AppletObject::addVetoableChangeListener(const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & ) throw( ::com::sun::star::uno::RuntimeException ) -{ -} - -void SAL_CALL AppletObject::removeVetoableChangeListener(const ::rtl::OUString&, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & ) throw( ::com::sun::star::uno::RuntimeException ) -{ -} - -::sal_Int16 SAL_CALL AppletObject::execute() throw (::com::sun::star::uno::RuntimeException) -{ - SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - uno::Reference < beans::XPropertySet > xSet( this ); - VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( NULL, SID_INSERT_APPLET, mxObj ); - if ( pDlg ) - pDlg->Execute(); - return 0; -} - -void SAL_CALL AppletObject::setTitle( const ::rtl::OUString& ) throw (::com::sun::star::uno::RuntimeException) -{ -} - -} diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index bfd67210ec44..5b95f09d7f5f 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 1dea202e0d0e..d33418c6fbb2 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" @@ -3826,19 +3827,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 b921f2d97f1f..1abf43e4ebd8 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 3c4df7276d6b..e8c81f4b7080 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/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 451e33084c07..81a6274034ba 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 addb648ef2e9..855791d6dd24 100755 --- 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 c063546da1c7..962a738e3ea3 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 49188defc4f1..9cb475a1689b 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 f202266dd74e..3884f42088cb 100755 --- 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 8e006721351a..d3a669e999c3 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 <vcl/svapp.hxx> diff --git a/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx index de6528794e20..de6528794e20 100644..100755 --- a/sfx2/source/doc/sfxacldetect.cxx +++ b/sfx2/source/doc/sfxacldetect.cxx diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index b5a9536b12c5..1bc0f1f79a6e 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -101,7 +101,7 @@ //________________________________________________________________________________________________________ #include <sfx2/sfxbasecontroller.hxx> -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include "workwin.hxx" #include <sfx2/signaturestate.hxx> #include <sfx2/sfxuno.hxx> @@ -113,7 +113,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> @@ -124,12 +124,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 @@ -1791,10 +1791,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 ) ); @@ -1814,9 +1813,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() ); } } } @@ -3274,7 +3272,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/syspath.cxx b/sfx2/source/doc/syspath.cxx index a1025370ed24..a1025370ed24 100755..100644 --- a/sfx2/source/doc/syspath.cxx +++ b/sfx2/source/doc/syspath.cxx diff --git a/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx index b4aed7ccdd99..5cb3f162e6c8 100644 --- a/sfx2/source/inc/fltoptint.hxx +++ b/sfx2/source/inc/fltoptint.hxx @@ -28,11 +28,11 @@ #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 +49,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 +57,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() { 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/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 b264a5b47861..eddc97eeb4af 100755..100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -75,7 +75,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/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx index de1137bd6a74..de1137bd6a74 100755..100644 --- a/sfx2/source/menu/thessubmenu.cxx +++ b/sfx2/source/menu/thessubmenu.cxx diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 13c84bc531e2..0428d015dcea 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/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index defccd4e23be..dc5ad5f15d41 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/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 d99ad8733e03..306523677d66 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 ed158ce009e3..592163f20f17 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/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 f5c24b195af7..dc61cb293a26 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 b58bbc2840da..a633403a2bb1 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 ----------------------------------------------------------- @@ -59,16 +59,12 @@ String SfxViewFactory::GetViewName() const // CTOR / DTOR ----------------------------------------------------------- -SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, - USHORT nOrdinal, const ResId& aDescrResId ): +SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, USHORT nOrdinal ): fnCreate(fnC), fnInit(fnI), - nOrd(nOrdinal), - aDescription(aDescrResId.GetId(), *aDescrResId.GetResMgr()) + nOrd(nOrdinal) { - aDescription.SetRT(aDescrResId.GetRT()); DBG_CTOR(SfxViewFactory, 0); -// SFX_APP()->RegisterViewFactory_Impl(*this); } SfxViewFactory::~SfxViewFactory() diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 035fd3f794de..ea2af12ab258 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> @@ -96,6 +90,8 @@ #include <comphelper/storagehelper.hxx> #include <svtools/asynclink.hxx> #include <svl/sharecontrolfile.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtdata.hxx> #include <boost/optional.hpp> @@ -127,10 +123,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> @@ -147,7 +143,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" @@ -1018,8 +1014,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 @@ -1027,7 +1023,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 ) ); } @@ -1037,7 +1033,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 f62ae4c1ddc7..8255bed82592 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 5c65c967434f..224176ca4a45 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> |