tdf#47890 - Remember last used position and size of the mail merge dialog
Change-Id: Ibc6ba048d9f330f499d873c220f750964438c52e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211862 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <tools/urlobj.hxx>
|
||||
#include <svl/urihelper.hxx>
|
||||
#include <unotools/pathoptions.hxx>
|
||||
#include <svtools/viewoptions.hxx>
|
||||
#include <view.hxx>
|
||||
#include <docsh.hxx>
|
||||
#include <IDocumentDeviceAccess.hxx>
|
||||
@@ -203,6 +204,11 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell,
|
||||
};
|
||||
xD->dispatch(aURL, aProperties);
|
||||
m_xBeamerWin->show();
|
||||
|
||||
// tdf#47890 - remember last used position and size of the mail merge dialog
|
||||
SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id());
|
||||
if (aDlgOpt.Exists())
|
||||
m_xDialog->set_window_state(aDlgOpt.GetWindowState());
|
||||
}
|
||||
uno::Reference<XController> xController = m_xFrame->getController();
|
||||
m_pImpl->xFController.set(xController, UNO_QUERY);
|
||||
@@ -352,6 +358,10 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell,
|
||||
SwMailMergeDlg::~SwMailMergeDlg()
|
||||
{
|
||||
if(m_xFrame.is()) {
|
||||
// tdf#47890 - remember last used position and size of the mail merge dialog
|
||||
SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id());
|
||||
aDlgOpt.SetWindowState(m_xDialog->get_window_state(vcl::WindowDataMask::PosSize));
|
||||
|
||||
m_xFrame->setComponent(nullptr, nullptr);
|
||||
m_xFrame->dispose();
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="vexpand">False</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame1">
|
||||
@@ -826,7 +826,7 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
|
||||
Reference in New Issue
Block a user