svx/source/sidebar/possize/PosSizePropertyPanel.cxx |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

New commits:
commit 142d0a9fb76b74ff37245515762bfef258442ed9
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Thu Jan 9 22:02:37 2025 +0530
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu Jan 9 17:55:08 2025 +0100

    svx: avoid emptying sidebar properties
    
    these properties are either updated or reformatted based on *Blanked 
variables so no need to do an extra update
    
    problem:
    emptying these properties causes to lose measurement units in LOK. It 
happens due to second time this sidebar is not completly initialised but just 
updated the value of the fields so units are lost for LOK.
    
    Change-Id: Id32638686578652ab4ffa25a638b5308c46eea2b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179583
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index a8e4e3186100..165452110df2 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -532,8 +532,6 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrWidth->set_text( "" );
             mbMtrWidthBlanked = true;
             break;
 
@@ -558,8 +556,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrHeight->set_text( "");
+            mbMtrHeightBlanked = true;
             break;
 
         case SID_ATTR_TRANSFORM_POS_X:
@@ -582,8 +579,6 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrPosX->set_text( "" );
             mbMtrPosXBlanked = true;
             break;
 
@@ -607,8 +602,6 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrPosY->set_text( "" );
             mbMtrPosYBlanked = true;
             break;
 
@@ -715,8 +708,6 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrAngle->set_text( "" );
             mbMtrAngleBlanked = true;
             mxCtrlDial->SetRotation( 0_deg100 );
             break;
@@ -914,7 +905,6 @@ void PosSizePropertyPanel::MetricState(SfxItemState eState, 
const SfxPoolItem* p
     SetFieldUnit( *mxMtrPosX, meDlgUnit, true );
     if (bPosXBlank)
     {
-        mxMtrPosX->set_text(OUString());
         mbMtrPosXBlanked = true;
     }
 
@@ -923,7 +913,6 @@ void PosSizePropertyPanel::MetricState(SfxItemState eState, 
const SfxPoolItem* p
     SetFieldUnit( *mxMtrPosY, meDlgUnit, true );
     if (bPosYBlank)
     {
-        mxMtrPosY->set_text(OUString());
         mbMtrPosYBlanked = true;
     }
 
@@ -934,7 +923,6 @@ void PosSizePropertyPanel::MetricState(SfxItemState eState, 
const SfxPoolItem* p
     SetFieldUnit( *mxMtrWidth, meDlgUnit, true );
     if (bWidthBlank)
     {
-        mxMtrWidth->set_text(OUString());
         mbMtrWidthBlanked = true;
     }
 
@@ -943,7 +931,6 @@ void PosSizePropertyPanel::MetricState(SfxItemState eState, 
const SfxPoolItem* p
     SetFieldUnit( *mxMtrHeight, meDlgUnit, true );
     if (bHeightBlank)
     {
-        mxMtrHeight->set_text(OUString());
         mbMtrHeightBlanked = true;
     }
 }

Reply via email to