sd/source/ui/dlg/tpoption.cxx                    |   12 ++++++++----
 sd/source/ui/inc/tpoption.hxx                    |    2 +-
 sd/uiconfig/simpress/ui/optimpressgeneralpage.ui |    4 ++--
 3 files changed, 11 insertions(+), 7 deletions(-)

New commits:
commit 6d9930f307f08d2c32ee1bcca577cf643955cec9
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Thu Mar 5 18:40:42 2020 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Fri Mar 6 07:04:34 2020 +0100

    tdf#131137: Fix Checkbox "Do not distort objects in curve" does nothing
    
    See https://bugs.documentfoundation.org/show_bug.cgi?id=131137#c3
    and above all
    https://bugs.documentfoundation.org/show_bug.cgi?id=131137#c4
    
    Change-Id: Ibd38d13be7ef6956d6c26e6f5f71a6751a56b25e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90054
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 2adcd977111f..9a4e69e77086 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -198,7 +198,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, 
weld::DialogController*
     , m_xHeightLb(m_xBuilder->weld_label("heightlbl"))
     , m_xFiInfo2(m_xBuilder->weld_label("info2"))
     , 
m_xMtrFldOriginalHeight(m_xBuilder->weld_metric_spin_button("metricHeightFields",
 FieldUnit::MM))
-    , m_xCbxDistrot(m_xBuilder->weld_check_button("distrotcb"))
+    , m_xCbxDistort(m_xBuilder->weld_check_button("distortcb"))
     , m_xMtrFldInfo1(m_xBuilder->weld_metric_spin_button("metricInfo1Fields", 
FieldUnit::MM))
     , m_xMtrFldInfo2(m_xBuilder->weld_metric_spin_button("metricInfo2Fields", 
FieldUnit::MM))
 {
@@ -219,7 +219,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, 
weld::DialogController*
     SetFieldUnit( *m_xMtrFldTabstop , eFUnit );
 
     // Impress is default mode, let' hide the entire scale frame etc.
-    m_xCbxDistrot->hide();
+    m_xCbxDistort->hide();
     m_xScaleFrame->hide();
 
     // fill ListBox with metrics
@@ -342,7 +342,8 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs )
         m_xCbxEnableSdremote->get_state_changed_from_saved()        ||
         m_xCbxEnablePresenterScreen->get_state_changed_from_saved() ||
         m_xCbxCompatibility->get_state_changed_from_saved()         ||
-        m_xCbxUsePrinterMetrics->get_state_changed_from_saved() )
+        m_xCbxUsePrinterMetrics                                     ||
+        m_xCbxDistort->get_state_changed_from_saved())
     {
         SdOptionsMiscItem aOptsItem;
 
@@ -359,6 +360,7 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs )
             m_xCbxUsePrinterMetrics->get_active()
             ? css::document::PrinterIndependentLayout::DISABLED
             : css::document::PrinterIndependentLayout::ENABLED);
+        aOptsItem.GetOptionsMisc().SetCrookNoContortion( 
m_xCbxDistort->get_active() );
         rAttrs->Put( aOptsItem );
 
         bModified = true;
@@ -410,6 +412,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
     m_xCbxEnablePresenterScreen->set_active( 
aOptsItem.GetOptionsMisc().IsEnablePresenterScreen() );
     m_xCbxCompatibility->set_active( 
aOptsItem.GetOptionsMisc().IsSummationOfParagraphs() );
     m_xCbxUsePrinterMetrics->set_active( 
aOptsItem.GetOptionsMisc().GetPrinterIndependentLayout()==1 );
+    m_xCbxDistort->set_active( 
aOptsItem.GetOptionsMisc().IsCrookNoContortion() );
     m_xCbxStartWithTemplate->save_state();
     m_xCbxMarkedHitMovesAlways->save_state();
     m_xCbxQuickEdit->save_state();
@@ -421,6 +424,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
     m_xCbxEnablePresenterScreen->save_state();
     m_xCbxCompatibility->save_state();
     m_xCbxUsePrinterMetrics->save_state();
+    m_xCbxDistort->save_state();
 
     // metric
     sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC );
@@ -519,7 +523,7 @@ void SdTpOptionsMisc::SetDrawMode()
     m_xMtrFldOriginalWidth->show();
     m_xFiInfo2->show();
     m_xMtrFldOriginalHeight->show();
-    m_xCbxDistrot->show();
+    m_xCbxDistort->show();
     m_xCbxCompatibility->hide();
 }
 
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 1cc5a88f2ffa..d66a5317e6b1 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -102,7 +102,7 @@ private:
     std::unique_ptr<weld::Label> m_xHeightLb;
     std::unique_ptr<weld::Label> m_xFiInfo2;
     std::unique_ptr<weld::MetricSpinButton> m_xMtrFldOriginalHeight;
-    std::unique_ptr<weld::CheckButton> m_xCbxDistrot;
+    std::unique_ptr<weld::CheckButton> m_xCbxDistort;
     std::unique_ptr<weld::MetricSpinButton> m_xMtrFldInfo1;
     std::unique_ptr<weld::MetricSpinButton> m_xMtrFldInfo2;
 
diff --git a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui 
b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
index 064ff490b914..6c0365bd9f10 100644
--- a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
+++ b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
@@ -287,8 +287,8 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="distrotcb">
-                    <property name="label" translatable="yes" 
context="optimpressgeneralpage|distrotcb">Do not distort objects in 
curve</property>
+                  <object class="GtkCheckButton" id="distortcb">
+                    <property name="label" translatable="yes" 
context="optimpressgeneralpage|distortcb">Do not distort objects in 
curve</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to