summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-02 14:23:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-02 18:28:49 +0100
commitfffd76195e0701cf774e36963105cd63a2e65a26 (patch)
tree511c19fc078d484942b93a39bdd0f8e9f270e2e7 /sfx2
parent8423861a74d7c6425ed2c3699806dd97415a04e1 (diff)
Revert "tdf#120343 show pdf in async pdf export dialog callback"
This reverts commit 9df8a2eb8c216b16927aac2182b881b21d8b2d14 to try an alternative approach. Change-Id: I2f1e2cd28cbaee5ab3d7a3cec808ec5bb7777cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124604 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/guisaveas.cxx36
1 files changed, 12 insertions, 24 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 4c50b5e19f27..d5eb3369d735 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1305,22 +1305,6 @@ uno::Reference< css::frame::XModuleManager2 > const & SfxStoringHelper::GetModul
return m_xModuleManager;
}
-namespace
-{
- void LaunchPDFViewer(const INetURLObject& rURL)
- {
- // Launch PDF viewer
- FilterConfigItem aItem( u"Office.Common/Filter/PDF/Export/" );
- bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", false );
-
- if ( aViewPDF )
- {
- uno::Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create(::comphelper::getProcessComponentContext()));
- xSystemShellExecute->execute(rURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), "", SystemShellExecuteFlags::URIS_ONLY);
- }
- }
-}
-
bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xModel,
std::u16string_view aSlotName,
uno::Sequence< beans::PropertyValue >& aArgsSequence,
@@ -1672,11 +1656,6 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
{
SfxStoringHelper::SetDocInfoState(aModel.GetModel(), xOldDocProps);
}
-
- // Launch PDF viewer
- if (nStoreMode & PDFEXPORT_REQUESTED)
- LaunchPDFViewer(aURL);
-
};
// use dispatch API to show document info dialog
@@ -1698,10 +1677,19 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
aModelData.GetStorable()->storeToURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aArgsSequence );
else
aModelData.GetStorable()->storeAsURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aArgsSequence );
+ }
- // Launch PDF viewer
- if (nStoreMode & PDFEXPORT_REQUESTED)
- LaunchPDFViewer(aURL);
+ // Launch PDF viewer
+ if ( nStoreMode & PDFEXPORT_REQUESTED )
+ {
+ FilterConfigItem aItem(u"Office.Common/Filter/PDF/Export/");
+ bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", false );
+
+ if ( aViewPDF )
+ {
+ uno::Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) );
+ xSystemShellExecute->execute( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "", SystemShellExecuteFlags::URIS_ONLY );
+ }
}
return bDialogUsed;