summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-02 14:23:22 +0000
committerXisco Fauli <xiscofauli@libreoffice.org>2021-11-03 14:34:09 +0100
commit3350ab7f2d5859ea242a5a63f66da5cdfcd0e6f3 (patch)
treed4a1675643a890ea7e091dff4902b5aa873886ac /sfx2
parent31613f1ade01a68b170adc6f9245b777671ba62d (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124616 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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 e2a2209e7b38..65e346cba6e8 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1289,22 +1289,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,
@@ -1657,11 +1641,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
@@ -1683,10 +1662,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;