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

New commits:
commit 1dd45462fd55ba2069b1303f8713a591ef57feab
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Thu Jan 9 22:02:37 2025 +0530
Commit:     Pranam Lashkari <lpra...@collabora.com>
CommitDate: Thu Jan 16 11:44:30 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>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180288
    Tested-by: Jenkins
    Reviewed-by: Pranam Lashkari <lpra...@collabora.com>

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 04844ff1fee2..d6d232286495 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -552,8 +552,6 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrWidth->set_text(u""_ustr);
             mbMtrWidthBlanked = true;
             break;
 
@@ -578,8 +576,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrHeight->set_text( u""_ustr);
+            mbMtrHeightBlanked = true;
             break;
 
         case SID_ATTR_TRANSFORM_POS_X:
@@ -602,8 +599,6 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrPosX->set_text(u""_ustr);
             mbMtrPosXBlanked = true;
             break;
 
@@ -627,8 +622,6 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrPosY->set_text(u""_ustr);
             mbMtrPosYBlanked = true;
             break;
 
@@ -735,8 +728,6 @@ void PosSizePropertyPanel::NotifyItemUpdate(
                     break;
                 }
             }
-
-            mxMtrAngle->set_text(u""_ustr);
             mbMtrAngleBlanked = true;
             mxCtrlDial->SetRotation( 0_deg100 );
             break;
@@ -935,7 +926,6 @@ void PosSizePropertyPanel::MetricState(SfxItemState eState, 
const SfxPoolItem* p
     SetFieldUnit( *mxMtrPosX, meDlgUnit, true );
     if (bPosXBlank)
     {
-        mxMtrPosX->set_text(u""_ustr);
         mbMtrPosXBlanked = true;
     }
 
@@ -944,7 +934,6 @@ void PosSizePropertyPanel::MetricState(SfxItemState eState, 
const SfxPoolItem* p
     SetFieldUnit( *mxMtrPosY, meDlgUnit, true );
     if (bPosYBlank)
     {
-        mxMtrPosY->set_text(u""_ustr);
         mbMtrPosYBlanked = true;
     }
 
@@ -955,7 +944,6 @@ void PosSizePropertyPanel::MetricState(SfxItemState eState, 
const SfxPoolItem* p
     SetFieldUnit( *mxMtrWidth, meDlgUnit, true );
     if (bWidthBlank)
     {
-        mxMtrWidth->set_text(u""_ustr);
         mbMtrWidthBlanked = true;
     }
 
@@ -964,7 +952,6 @@ void PosSizePropertyPanel::MetricState(SfxItemState eState, 
const SfxPoolItem* p
     SetFieldUnit( *mxMtrHeight, meDlgUnit, true );
     if (bHeightBlank)
     {
-        mxMtrHeight->set_text(u""_ustr);
         mbMtrHeightBlanked = true;
     }
 }

Reply via email to