From e53ac4207d2f9e53f7bfe4f927961ebe2bd17182 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 29 Apr 2021 12:02:06 +0200 Subject: vcl: print dialog: remove broken code This was introduced in 149807eb6100090e178505ba4a264bb38eba1e0c < Resolves tdf#127782 - Print dialog height > trying to fix the problem of the window size not being remembered after reopening the dialog, however, the problem is still reproducible in master with GEN, thus, remove this code Change-Id: I65f327fa692cd3e2b5597d04e9e15abc952fe6d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114874 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- officecfg/registry/schema/org/openoffice/Office/Common.xcs | 10 ---------- vcl/source/window/printdlg.cxx | 11 ----------- 2 files changed, 21 deletions(-) diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index ca7a467c2cca..908decfc99e0 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -3524,16 +3524,6 @@ false - - - Stores the width of the print dialog. - - - - - Stores the height of the print dialog. - - diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index be53d3511365..9f5906310799 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -732,15 +732,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptrget_preferred_size().Width() + mxScrolledWindow->get_scroll_thickness(), 450); - // restore dialog size - std::optional aWidth = officecfg::Office::Common::Print::Dialog::Width::get(); - std::optional aHeight = officecfg::Office::Common::Print::Dialog::Height::get(); - WindowStateData aState; - if (aWidth) aState.SetWidth(*aWidth); else aWidth = -1; - if (aHeight) aState.SetHeight(*aHeight); else aHeight = -1; - aState.SetMask(WindowStateMask::Width | WindowStateMask::Height); - m_xDialog->set_window_state(aState.ToStr()); - m_xDialog->set_centered_on_parent(true); } @@ -749,8 +740,6 @@ PrintDialog::~PrintDialog() std::shared_ptr batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::Print::Dialog::RangeSectionExpanded::set(mxRangeExpander->get_expanded(), batch); officecfg::Office::Common::Print::Dialog::LayoutSectionExpanded::set(mxLayoutExpander->get_expanded(), batch); - officecfg::Office::Common::Print::Dialog::Width::set(m_xDialog->get_size().getWidth(), batch); - officecfg::Office::Common::Print::Dialog::Height::set(m_xDialog->get_size().getHeight(), batch); batch->commit(); } -- cgit