sw/source/uibase/sidebar/PageSizeControl.cxx |   23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

New commits:
commit 771f1f3f1a08c675df64e26a1a30cad9553d861c
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Nov 25 00:14:29 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Tue Nov 25 13:43:48 2025 +0100

    sw: Simplify 'else { if(...) { ... }' to 'else if(...) { ... }'
    
    Change-Id: I3c26c46186d25e58ae116ab1012cbc3f786c510f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194495
    Reviewed-by: Michael Weghorn <[email protected]>
    Code-Style: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx 
b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 8f420f7b2696..ebac8aac3ca3 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -99,16 +99,9 @@ PageSizeControl::PageSizeControl(PageSizePopup* pControl, 
weld::Widget* pParent)
     {
         sal_Unicode c = aText[i];
         if ( rtl::isAsciiAlpha(c) || (c == '\'') || (c == '\"') || (c == '%') )
-        {
             aMetricStr = OUStringChar(c) + aMetricStr;
-        }
-        else
-        {
-            if (!aMetricStr.isEmpty())
-            {
-                break;
-            }
-        }
+        else if (!aMetricStr.isEmpty())
+            break;
     }
 
     bool bLandscape = false;
commit 3f8bb140885ecc344da99d06fd27d03195857ed5
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Nov 25 00:11:38 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Tue Nov 25 13:43:35 2025 +0100

    sw: Drop another extra scope/indentation in PageSizeControl ctor
    
    There's no reason to have an extra scope here, so drop it.
    
    (`git show --ignore-space-change` can help to see the
    "actual" change more easily.)
    
    Change-Id: Ia007fc11162213353a8beeb8d60473c07067df23
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194494
    Tested-by: Jenkins
    Code-Style: Michael Weghorn <[email protected]>
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx 
b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 3d4eb36283b4..8f420f7b2696 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -94,21 +94,19 @@ PageSizeControl::PageSizeControl(PageSizePopup* pControl, 
weld::Widget* pParent)
 
     sal_uInt16 nSelectedItem = 0;
     OUString aMetricStr;
+    const OUString aText = mxWidthHeightField->get_text();
+    for (short i = aText.getLength() - 1; i >= 0; i--)
     {
-        const OUString aText = mxWidthHeightField->get_text();
-        for (short i = aText.getLength() - 1; i >= 0; i--)
+        sal_Unicode c = aText[i];
+        if ( rtl::isAsciiAlpha(c) || (c == '\'') || (c == '\"') || (c == '%') )
         {
-            sal_Unicode c = aText[i];
-            if ( rtl::isAsciiAlpha(c) || (c == '\'') || (c == '\"') || (c == 
'%') )
-            {
-                aMetricStr = OUStringChar(c) + aMetricStr;
-            }
-            else
+            aMetricStr = OUStringChar(c) + aMetricStr;
+        }
+        else
+        {
+            if (!aMetricStr.isEmpty())
             {
-                if (!aMetricStr.isEmpty())
-                {
-                    break;
-                }
+                break;
             }
         }
     }

Reply via email to