summaryrefslogtreecommitdiffstats
path: root/sfx2/source/appl
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/app.cxx2
-rw-r--r--sfx2/source/appl/appopen.cxx41
-rw-r--r--sfx2/source/appl/appserv.cxx2
3 files changed, 20 insertions, 25 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 3925544fd6d2..4b800583a6f8 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -535,7 +535,7 @@ SfxApplication::ChooseScript()
uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
std::unique_ptr<AbstractScriptSelectorDialog> pDlg(
- pFact->CreateScriptSelectorDialog( nullptr, false, xFrame ));
+ pFact->CreateScriptSelectorDialog( nullptr, xFrame ));
SAL_INFO( "sfx.appl", "done, now exec it");
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 879ac5c750a5..07a1deef8619 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -278,7 +278,7 @@ sal_uInt32 CheckPasswd_Impl
}
-sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &rFileName, bool bCopy, SfxItemSet* pSet )
+sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &rFileName, SfxItemSet* pSet )
{
std::shared_ptr<const SfxFilter> pFilter;
SfxMedium aMedium( rFileName, ( StreamMode::READ | StreamMode::SHARE_DENYNONE ) );
@@ -348,34 +348,29 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri
}
}
- if( bCopy )
+ try
{
- try
- {
- // TODO: introduce error handling
-
- uno::Reference< embed::XStorage > xTempStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
- if( !xTempStorage.is() )
- throw uno::RuntimeException();
+ // TODO: introduce error handling
- xDoc->GetStorage()->copyToStorage( xTempStorage );
+ uno::Reference< embed::XStorage > xTempStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
+ if( !xTempStorage.is() )
+ throw uno::RuntimeException();
- if ( !xDoc->DoSaveCompleted( new SfxMedium( xTempStorage, OUString() ) ) )
- throw uno::RuntimeException();
- }
- catch( uno::Exception& )
- {
- xDoc->DoClose();
- xDoc.Clear();
+ xDoc->GetStorage()->copyToStorage( xTempStorage );
- // TODO: transfer correct error outside
- return ERRCODE_SFX_GENERAL;
- }
+ if ( !xDoc->DoSaveCompleted( new SfxMedium( xTempStorage, OUString() ) ) )
+ throw uno::RuntimeException();
+ }
+ catch( uno::Exception& )
+ {
+ xDoc->DoClose();
+ xDoc.Clear();
- SetTemplate_Impl( rFileName, OUString(), xDoc );
+ // TODO: transfer correct error outside
+ return ERRCODE_SFX_GENERAL;
}
- else
- SetTemplate_Impl( rFileName, OUString(), xDoc );
+
+ SetTemplate_Impl( rFileName, OUString(), xDoc );
xDoc->SetNoName();
xDoc->InvalidateName();
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 25fb7729cb33..f467783104ce 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1151,7 +1151,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
do // artificial loop for flow control
{
std::unique_ptr<AbstractScriptSelectorDialog> pDlg(pFact->CreateScriptSelectorDialog(
- lcl_getDialogParent( xFrame, GetTopWindow() ), false, xFrame ));
+ lcl_getDialogParent( xFrame, GetTopWindow() ), xFrame ));
OSL_ENSURE( pDlg, "SfxApplication::OfaExec_Impl( SID_RUNMACRO ): no dialog!" );
if ( !pDlg )
break;