diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-22 10:21:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-28 10:47:34 +0200 |
commit | bfc1600c6ade6f006eb774bffe7caa9c948e8603 (patch) | |
tree | c660fa18fc6a9e5f05c3cc58fa34411cdc4f4257 /sdext | |
parent | f9514beb9bfed51aee69227797e74504afed31c6 (diff) |
loplugin:indentation improve checks for brace alignment
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/tree/writertreevisiting.cxx | 2 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterController.cxx | 4 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterNotesView.cxx | 24 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSlideSorter.cxx | 32 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterToolBar.cxx | 8 |
5 files changed, 35 insertions, 35 deletions
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx index 79b799f7c9a3..0aab0c9a7261 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.cxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx @@ -201,7 +201,7 @@ void WriterXmlEmitter::fillFrameProps( DrawElement& rElem, aBuf.append( ' ' ); aBuf.append( convertPixelToUnitString( rel_y ) ); aBuf.append( " )" ); - } + } rProps[ "draw:transform" ] = aBuf.makeStringAndClear(); } diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index 7d4ac91b710e..86b57ca73794 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -1172,7 +1172,7 @@ void PresenterController::SwitchMonitors() void PresenterController::ExitPresenter() { if( mxController.is() ) - { + { Reference< XPresentationSupplier > xPS( mxController->getModel(), UNO_QUERY ); if( xPS.is() ) { @@ -1180,7 +1180,7 @@ void PresenterController::ExitPresenter() if( xP.is() ) xP->end(); } - } + } } } // end of namespace ::sdext::presenter diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx index 86258464471d..ad43f035b041 100644 --- a/sdext/source/presenter/PresenterNotesView.cxx +++ b/sdext/source/presenter/PresenterNotesView.cxx @@ -396,7 +396,7 @@ void PresenterNotesView::Layout() geometry::RealRectangle2D aNewTextBoundingBox (0,0,aWindowBox.Width, aWindowBox.Height); // Size the tool bar and the horizontal separator above it. if (mxToolBarWindow.is()) - { + { const geometry::RealSize2D aToolBarSize (mpToolBar->GetMinimalSize()); const sal_Int32 nToolBarHeight = sal_Int32(aToolBarSize.Height + 0.5); mxToolBarWindow->setPosSize(0, aWindowBox.Height - nToolBarHeight, @@ -409,23 +409,23 @@ void PresenterNotesView::Layout() mpCloseButton->SetCenter(geometry::RealPoint2D( (aWindowBox.Width + aToolBarSize.Width) / 2, aWindowBox.Height - aToolBarSize.Height/2)); - } + } // Check whether the vertical scroll bar is necessary. if (mpScrollBar) - { + { bool bShowVerticalScrollbar (false); try { const double nTextBoxHeight (aNewTextBoundingBox.Y2 - aNewTextBoundingBox.Y1); const double nHeight (mpTextView->GetTotalTextHeight()); if (nHeight > nTextBoxHeight) - { + { bShowVerticalScrollbar = true; if(!AllSettings::GetLayoutRTL()) aNewTextBoundingBox.X2 -= mpScrollBar->GetSize(); else aNewTextBoundingBox.X1 += mpScrollBar->GetSize(); - } + } mpScrollBar->SetTotalSize(nHeight); } catch(beans::UnknownPropertyException&) @@ -433,7 +433,7 @@ void PresenterNotesView::Layout() OSL_ASSERT(false); } if(AllSettings::GetLayoutRTL()) - { + { mpScrollBar->SetVisible(bShowVerticalScrollbar); mpScrollBar->SetPosSize( geometry::RealRectangle2D( @@ -444,9 +444,9 @@ void PresenterNotesView::Layout() if( ! bShowVerticalScrollbar) mpScrollBar->SetThumbPosition(0, false); UpdateScrollBar(); - } + } else - { + { mpScrollBar->SetVisible(bShowVerticalScrollbar); mpScrollBar->SetPosSize( geometry::RealRectangle2D( @@ -457,14 +457,14 @@ void PresenterNotesView::Layout() if( ! bShowVerticalScrollbar) mpScrollBar->SetThumbPosition(0, false); UpdateScrollBar(); - } - } + } + } // Has the text area has changed it position or size? if (aNewTextBoundingBox.X1 != maTextBoundingBox.X1 || aNewTextBoundingBox.Y1 != maTextBoundingBox.Y1 || aNewTextBoundingBox.X2 != maTextBoundingBox.X2 || aNewTextBoundingBox.Y2 != maTextBoundingBox.Y2) - { + { maTextBoundingBox = aNewTextBoundingBox; mpTextView->SetLocation( geometry::RealPoint2D( @@ -474,7 +474,7 @@ void PresenterNotesView::Layout() geometry::RealSize2D( aNewTextBoundingBox.X2 - aNewTextBoundingBox.X1, aNewTextBoundingBox.Y2 - aNewTextBoundingBox.Y1)); - } + } } void PresenterNotesView::Paint (const awt::Rectangle& rUpdateBox) diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index 493e33a39ce9..c06c0dfd79ec 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -692,11 +692,11 @@ geometry::RealRectangle2D PresenterSlideSorter::PlaceScrollBars ( Reference<container::XIndexAccess> xSlides (mxSlideShowController, UNO_QUERY_THROW); bIsScrollBarNeeded = mpLayout->IsScrollBarNeeded(xSlides->getCount()); if (mpVerticalScrollBar) - { + { if (bIsScrollBarNeeded) - { + { if(AllSettings::GetLayoutRTL()) - { + { mpVerticalScrollBar->SetPosSize(geometry::RealRectangle2D( rUpperBox.X1, rUpperBox.Y1, @@ -710,9 +710,9 @@ geometry::RealRectangle2D PresenterSlideSorter::PlaceScrollBars ( rUpperBox.Y1, rUpperBox.X2, rUpperBox.Y2); - } + } else - { + { // if it's not RTL place vertical scroll bar at right border. mpVerticalScrollBar->SetPosSize(geometry::RealRectangle2D( rUpperBox.X2 - mpVerticalScrollBar->GetSize(), @@ -727,11 +727,11 @@ geometry::RealRectangle2D PresenterSlideSorter::PlaceScrollBars ( rUpperBox.Y1, rUpperBox.X2 - mpVerticalScrollBar->GetSize() - gnHorizontalGap, rUpperBox.Y2); - } - } + } + } else mpVerticalScrollBar->SetVisible(false); - } + } return rUpperBox; } @@ -1202,34 +1202,34 @@ geometry::RealPoint2D PresenterSlideSorter::Layout::GetLocalPosition( const geometry::RealPoint2D& rWindowPoint) const { if(AllSettings::GetLayoutRTL()) - { + { return css::geometry::RealPoint2D( -rWindowPoint.X + maBoundingBox.X2 + mnHorizontalOffset, rWindowPoint.Y - maBoundingBox.Y1 + mnVerticalOffset); - } + } else - { + { return css::geometry::RealPoint2D( rWindowPoint.X - maBoundingBox.X1 + mnHorizontalOffset, rWindowPoint.Y - maBoundingBox.Y1 + mnVerticalOffset); - } + } } geometry::RealPoint2D PresenterSlideSorter::Layout::GetWindowPosition( const geometry::RealPoint2D& rLocalPoint) const { if(AllSettings::GetLayoutRTL()) - { + { return css::geometry::RealPoint2D( -rLocalPoint.X + mnHorizontalOffset + maBoundingBox.X2, rLocalPoint.Y - mnVerticalOffset + maBoundingBox.Y1); - } + } else - { + { return css::geometry::RealPoint2D( rLocalPoint.X - mnHorizontalOffset + maBoundingBox.X1, rLocalPoint.Y - mnVerticalOffset + maBoundingBox.Y1); - } + } } sal_Int32 PresenterSlideSorter::Layout::GetColumn ( diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index 9f9af15da731..a840165914b1 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -1872,10 +1872,10 @@ void PresentationTimeLabel::TimeHasChanged (const oslDateTime& rCurrentTime) //the presentation was paused for in order to continue the //timer from the same position if(!isPaused()) - { - TimeValue pauseTime = getPauseTimeValue(); - if(pauseTime.Seconds != 0 || pauseTime.Nanosec != 0) - { + { + TimeValue pauseTime = getPauseTimeValue(); + if(pauseTime.Seconds != 0 || pauseTime.Nanosec != 0) + { TimeValue incrementValue(0, 0); incrementValue.Seconds = aCurrentTimeValue.Seconds - pauseTime.Seconds; if(pauseTime.Nanosec > aCurrentTimeValue.Nanosec) |