officecfg/registry/schema/org/openoffice/Office/Common.xcs |   10 ----------
 vcl/source/window/printdlg.cxx                             |   11 -----------
 2 files changed, 21 deletions(-)

New commits:
commit 1009228764ea37c613a9f4ea041013c0d8fc210c
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Apr 29 12:02:06 2021 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Apr 30 11:05:39 2021 +0200

    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 <xiscofa...@libreoffice.org>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114890
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index cf1695b2cc2a..9097c23c3c6a 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -3511,16 +3511,6 @@
           </info>
           <value>false</value>
         </prop>
-        <prop oor:name="Width" oor:type="xs:int">
-          <info>
-            <desc>Stores the width of the print dialog.</desc>
-          </info>
-        </prop>
-        <prop oor:name="Height" oor:type="xs:int">
-          <info>
-            <desc>Stores the height of the print dialog.</desc>
-          </info>
-        </prop>
       </group>
     </group>
     <group oor:name="AddXMLToStorage">
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 6583e1891e52..d37c0ec068bc 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -683,15 +683,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const 
std::shared_ptr<PrinterC
         mxScrolledWindow->get_preferred_size().Width() + 
mxScrolledWindow->get_vscroll_width(),
         450);
 
-    // restore dialog size
-    std::optional<long> aWidth = 
officecfg::Office::Common::Print::Dialog::Width::get();
-    std::optional<long> 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);
 }
 
@@ -700,8 +691,6 @@ PrintDialog::~PrintDialog()
     std::shared_ptr<comphelper::ConfigurationChanges> 
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();
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to