diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2019-10-18 12:33:34 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2019-10-19 22:44:26 +0200 |
commit | ff8e01b58c4d1a667c4db2163dcffade3de9fa7c (patch) | |
tree | c0260474aaeb9fac4f1b961f942c7f55e7f04f17 /sw/source | |
parent | 2571a11aeb0bdca20242caa5c96f0a5b3ea5db90 (diff) |
SwMMResultSaveDialog: Move some common code one level up
The dialog is called in any case.
Change-Id: I2cb14f227ad1e7417e2f44e4f0e357cb29d82fdc
Reviewed-on: https://gerrit.libreoffice.org/81091
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/dbui/mmresultdialogs.cxx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 6920fee3fe1c..9644ed99c538 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -529,15 +529,16 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, weld::Button&, void) SwView* pTargetView = xConfigItem->GetTargetView(); assert(pTargetView); + OUString sFilter; + OUString sPath = SwMailMergeHelper::CallSaveAsDialog(m_xDialog.get(), sFilter); + if (sPath.isEmpty()) + { + // just return back to the dialog + return; + } + if (m_xSaveAsOneRB->get_active()) { - OUString sFilter; - const OUString sPath = SwMailMergeHelper::CallSaveAsDialog(m_xDialog.get(), sFilter); - if (sPath.isEmpty()) - { - // just return back to the dialog - return; - } uno::Sequence< beans::PropertyValue > aValues(1); beans::PropertyValue* pValues = aValues.getArray(); pValues[0].Name = "FilterName"; @@ -581,13 +582,6 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, weld::Button&, void) if(nEnd > documentCount) nEnd = documentCount; } - OUString sFilter; - OUString sPath = SwMailMergeHelper::CallSaveAsDialog(m_xDialog.get(), sFilter); - if (sPath.isEmpty()) - { - // just return back to the dialog - return; - } OUString sTargetTempURL = URIHelper::SmartRel2Abs( INetURLObject(), utl::TempFile::CreateTempName(), URIHelper::GetMaybeFileHdl()); |