sd/source/console/PresenterNotesView.cxx |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit ff36b49496445b8014b2685d7844152acf86fa9d
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri May 16 13:55:09 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri May 16 20:18:39 2025 +0200

    sd presenter: Reduce code duplication for RTL
    
    Change-Id: Ib2205499556bb8736b065ed4f81d6cad8647b95c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185410
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sd/source/console/PresenterNotesView.cxx 
b/sd/source/console/PresenterNotesView.cxx
index 24b5538c9663..f3f678422656 100644
--- a/sd/source/console/PresenterNotesView.cxx
+++ b/sd/source/console/PresenterNotesView.cxx
@@ -410,32 +410,30 @@ void PresenterNotesView::Layout()
                 {
                     OSL_ASSERT(false);
                 }
+
+            mpScrollBar->SetVisible(bShowVerticalScrollbar);
             if(AllSettings::GetLayoutRTL())
             {
-                    mpScrollBar->SetVisible(bShowVerticalScrollbar);
+
                     mpScrollBar->SetPosSize(
                                             geometry::RealRectangle2D(
                                                                       
aNewTextBoundingBox.X1 - mpScrollBar->GetSize(),
                                                                       
aNewTextBoundingBox.Y1,
                                                                       
aNewTextBoundingBox.X1,
                                                                       
aNewTextBoundingBox.Y2));
-                    if( ! bShowVerticalScrollbar)
-                        mpScrollBar->SetThumbPosition(0, false);
-                    UpdateScrollBar();
             }
             else
             {
-                    mpScrollBar->SetVisible(bShowVerticalScrollbar);
                     mpScrollBar->SetPosSize(
                                             geometry::RealRectangle2D(
                                                                       
aWindowBox.Width - mpScrollBar->GetSize(),
                                                                       
aNewTextBoundingBox.Y1,
                                                                       
aNewTextBoundingBox.X2 + mpScrollBar->GetSize(),
                                                                       
aNewTextBoundingBox.Y2));
-                    if( ! bShowVerticalScrollbar)
-                        mpScrollBar->SetThumbPosition(0, false);
-                    UpdateScrollBar();
             }
+            if (!bShowVerticalScrollbar)
+                mpScrollBar->SetThumbPosition(0, false);
+            UpdateScrollBar();
     }
     // Has the text area has changed it position or size?
     if (aNewTextBoundingBox.X1 != maTextBoundingBox.X1

Reply via email to