diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-11-25 09:34:02 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-11-25 09:34:02 +0100 |
commit | 8f285df32df738b54e572b2e5918ba8217bbebbf (patch) | |
tree | 7585e9df81018781345e5af80b782a57309366e9 /sfx2/source/appl/appuno.cxx | |
parent | 4f36183eb9be25a723afee4b4e2b4555591ee903 (diff) |
[CWS autorecovery] #i65597# moved creation of new documents from application to loader
The loader was the only client of the respective application code, and needs to have better
control over the document creation process.
In the course of this move, some dead/duplicate/obsolete code has been removed.
Diffstat (limited to 'sfx2/source/appl/appuno.cxx')
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 110 |
1 files changed, 62 insertions, 48 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index c9814eb50e6a..df6fa08773b3 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -147,54 +147,56 @@ using namespace ::com::sun::star::io; #define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader" #define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler" -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 sWindowState = String::CreateFromAscii( "WindowState" ); -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" ); +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 sWindowState = String::CreateFromAscii( "WindowState" ); +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" ); +static const String sSuggestedSaveAsDir = String::CreateFromAscii( "SuggestedSaveAsDir" ); +static const String sSuggestedSaveAsName = String::CreateFromAscii( "SuggestedSaveAsName" ); void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) { @@ -701,6 +703,18 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque rSet.Put( stringList ); } } + else if ( aName == sSuggestedSaveAsDir ) + { + SfxStringItem aItem( SID_DEFAULTFILEPATH, String() ); + if ( aItem.PutValue( rProp.Value ) ) + rSet.Put( aItem ); + } + else if ( aName == sSuggestedSaveAsName ) + { + SfxStringItem aItem( SID_DEFAULTFILENAME, String() ); + if ( aItem.PutValue( rProp.Value ) ) + rSet.Put( aItem ); + } else if ( aName == sFileName ) { ::rtl::OUString sVal; |