diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 13:14:32 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-22 01:56:27 +0100 |
commit | a9bce41c64bda648be2609a0dc4aea728fa8ec77 (patch) | |
tree | bf485497dc9d8e78a3ba61e29c6944ce5814b8d2 /sdext | |
parent | c096ab87c8a11e8d75dc689ea7024288419cfd22 (diff) |
tdf#123936 Formatting files in module sdext with clang-format
Change-Id: Ibfed67a0f772ea0c02bf0e7267e9ed46517e2018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105704
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/pppoptimizer.cxx | 9 | ||||
-rw-r--r-- | sdext/source/minimizer/pppoptimizer.hxx | 3 | ||||
-rw-r--r-- | sdext/source/minimizer/pppoptimizertoken.hxx | 4 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterHelper.hxx | 22 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterPane.hxx | 24 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSprite.hxx | 12 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSpritePane.hxx | 21 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterUIPainter.hxx | 15 |
8 files changed, 50 insertions, 60 deletions
diff --git a/sdext/source/minimizer/pppoptimizer.cxx b/sdext/source/minimizer/pppoptimizer.cxx index 4d21ca3aabc9..c869f72187f6 100644 --- a/sdext/source/minimizer/pppoptimizer.cxx +++ b/sdext/source/minimizer/pppoptimizer.cxx @@ -17,19 +17,18 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "pppoptimizer.hxx" #include <osl/file.hxx> // returning filesize, on error zero is returned -sal_Int64 PPPOptimizer::GetFileSize( const OUString& rURL ) +sal_Int64 PPPOptimizer::GetFileSize(const OUString& rURL) { sal_Int64 nFileSize = 0; osl::DirectoryItem aItem; - if ( osl::DirectoryItem::get( rURL, aItem ) == osl::FileBase::E_None ) + if (osl::DirectoryItem::get(rURL, aItem) == osl::FileBase::E_None) { - osl::FileStatus aStatus( osl_FileStatus_Mask_FileSize ); - if ( aItem.getFileStatus( aStatus ) == osl::FileBase::E_None ) + osl::FileStatus aStatus(osl_FileStatus_Mask_FileSize); + if (aItem.getFileStatus(aStatus) == osl::FileBase::E_None) { nFileSize = aStatus.getFileSize(); } diff --git a/sdext/source/minimizer/pppoptimizer.hxx b/sdext/source/minimizer/pppoptimizer.hxx index cf1e5e0f244b..60b191a7bd07 100644 --- a/sdext/source/minimizer/pppoptimizer.hxx +++ b/sdext/source/minimizer/pppoptimizer.hxx @@ -22,10 +22,9 @@ #include <rtl/ustring.hxx> - struct PPPOptimizer { - static sal_Int64 GetFileSize( const OUString& rURL ); + static sal_Int64 GetFileSize(const OUString& rURL); }; #endif // INCLUDED_SDEXT_SOURCE_MINIMIZER_PPPOPTIMIZER_HXX diff --git a/sdext/source/minimizer/pppoptimizertoken.hxx b/sdext/source/minimizer/pppoptimizertoken.hxx index 8f83e8dd8f8e..d0ae65ed74ab 100644 --- a/sdext/source/minimizer/pppoptimizertoken.hxx +++ b/sdext/source/minimizer/pppoptimizertoken.hxx @@ -140,8 +140,8 @@ enum PPPOptimizerTokenEnum TK_NotFound }; -PPPOptimizerTokenEnum TKGet( const OUString& ); -OUString TKGet( const PPPOptimizerTokenEnum ); +PPPOptimizerTokenEnum TKGet(const OUString&); +OUString TKGet(const PPPOptimizerTokenEnum); #endif diff --git a/sdext/source/presenter/PresenterHelper.hxx b/sdext/source/presenter/PresenterHelper.hxx index 6704844d730c..7f4387c163bd 100644 --- a/sdext/source/presenter/PresenterHelper.hxx +++ b/sdext/source/presenter/PresenterHelper.hxx @@ -23,23 +23,23 @@ #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/presentation/XSlideShowController.hpp> -namespace sdext::presenter { - +namespace sdext::presenter +{ /** Collection of helper functions that do not fit in anywhere else. Provide access to frequently used strings of the drawing framework. */ namespace PresenterHelper { - extern const OUString msCenterPaneURL; - extern const OUString msFullScreenPaneURL; +extern const OUString msCenterPaneURL; +extern const OUString msFullScreenPaneURL; - /** Return the slide show controller of a running presentation that has - the same document as the given framework controller. - @return - When no presentation is running this method returns an empty reference. - */ - css::uno::Reference<css::presentation::XSlideShowController> GetSlideShowController ( - const css::uno::Reference<css::frame::XController>& rxController); +/** Return the slide show controller of a running presentation that has + the same document as the given framework controller. + @return + When no presentation is running this method returns an empty reference. +*/ +css::uno::Reference<css::presentation::XSlideShowController> +GetSlideShowController(const css::uno::Reference<css::frame::XController>& rxController); } } // end of namespace presenter diff --git a/sdext/source/presenter/PresenterPane.hxx b/sdext/source/presenter/PresenterPane.hxx index 62b1941695d6..2a057229f802 100644 --- a/sdext/source/presenter/PresenterPane.hxx +++ b/sdext/source/presenter/PresenterPane.hxx @@ -25,8 +25,8 @@ #include <com/sun/star/rendering/XCanvas.hpp> #include <rtl/ref.hxx> -namespace sdext::presenter { - +namespace sdext::presenter +{ /** Pane used by the presenter screen. Pane objects are stored in the PresenterPaneContainer. Sizes and positions are controlled by the PresenterWindowManager. Interactive positioning and resizing is @@ -36,9 +36,8 @@ namespace sdext::presenter { class PresenterPane : public PresenterPaneBase { public: - PresenterPane ( - const css::uno::Reference<css::uno::XComponentContext>& rxContext, - const ::rtl::Reference<PresenterController>& rpPresenterController); + PresenterPane(const css::uno::Reference<css::uno::XComponentContext>& rxContext, + const ::rtl::Reference<PresenterController>& rpPresenterController); virtual ~PresenterPane() override; // XPane @@ -49,17 +48,17 @@ public: // XWindowListener - virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent) override; + virtual void SAL_CALL windowResized(const css::awt::WindowEvent& rEvent) override; - virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent) override; + virtual void SAL_CALL windowMoved(const css::awt::WindowEvent& rEvent) override; - virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent) override; + virtual void SAL_CALL windowShown(const css::lang::EventObject& rEvent) override; - virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent) override; + virtual void SAL_CALL windowHidden(const css::lang::EventObject& rEvent) override; // XPaintListener - virtual void SAL_CALL windowPaint (const css::awt::PaintEvent& rEvent) override; + virtual void SAL_CALL windowPaint(const css::awt::PaintEvent& rEvent) override; private: /** Store the bounding box so that when the window is resized or moved @@ -67,11 +66,10 @@ private: */ css::awt::Rectangle maBoundingBox; - virtual void CreateCanvases ( + virtual void CreateCanvases( const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas) override; - void Invalidate ( - const css::awt::Rectangle& rRepaintBox); + void Invalidate(const css::awt::Rectangle& rRepaintBox); void UpdateBoundingBox(); }; diff --git a/sdext/source/presenter/PresenterSprite.hxx b/sdext/source/presenter/PresenterSprite.hxx index 386d6a4f2bc5..b550ec0a815f 100644 --- a/sdext/source/presenter/PresenterSprite.hxx +++ b/sdext/source/presenter/PresenterSprite.hxx @@ -23,8 +23,8 @@ #include <com/sun/star/rendering/XCustomSprite.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp> -namespace sdext::presenter { - +namespace sdext::presenter +{ /** A wrapper around a css::rendering::XCustomSprite that allows not only setting values like size, location, and transformation but also provides read access to them. @@ -44,16 +44,15 @@ public: is wrapped by objects of this class. It is also used to call updateScreen() at (wrapped by the Update() method). */ - void SetFactory ( - const css::uno::Reference<css::rendering::XSpriteCanvas>& rxSpriteFactory); + void SetFactory(const css::uno::Reference<css::rendering::XSpriteCanvas>& rxSpriteFactory); css::uno::Reference<css::rendering::XCanvas> GetCanvas(); void Show(); void Hide(); - void Resize (const css::geometry::RealSize2D& rSize); - void MoveTo (const css::geometry::RealPoint2D& rLocation); + void Resize(const css::geometry::RealSize2D& rSize); + void MoveTo(const css::geometry::RealPoint2D& rLocation); void Update(); @@ -67,7 +66,6 @@ private: void ProvideSprite(); void DisposeSprite(); }; - } #endif diff --git a/sdext/source/presenter/PresenterSpritePane.hxx b/sdext/source/presenter/PresenterSpritePane.hxx index 70af0d0f113a..377d5fa7898e 100644 --- a/sdext/source/presenter/PresenterSpritePane.hxx +++ b/sdext/source/presenter/PresenterSpritePane.hxx @@ -28,8 +28,8 @@ #include <rtl/ref.hxx> #include <memory> -namespace sdext::presenter { - +namespace sdext::presenter +{ /** Use a sprite to display the contents and the border of a pane. Windows are still used to define the locations and sizes of both the border and the pane content. Note that every resize results in a disposed canvas. @@ -38,9 +38,8 @@ namespace sdext::presenter { class PresenterSpritePane : public PresenterPaneBase { public: - PresenterSpritePane ( - const css::uno::Reference<css::uno::XComponentContext>& rxContext, - const ::rtl::Reference<PresenterController>& rpPresenterController); + PresenterSpritePane(const css::uno::Reference<css::uno::XComponentContext>& rxContext, + const ::rtl::Reference<PresenterController>& rpPresenterController); virtual ~PresenterSpritePane() override; virtual void SAL_CALL disposing() override; @@ -55,23 +54,23 @@ public: // XWindowListener - virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent) override; + virtual void SAL_CALL windowResized(const css::awt::WindowEvent& rEvent) override; - virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent) override; + virtual void SAL_CALL windowMoved(const css::awt::WindowEvent& rEvent) override; - virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent) override; + virtual void SAL_CALL windowShown(const css::lang::EventObject& rEvent) override; - virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent) override; + virtual void SAL_CALL windowHidden(const css::lang::EventObject& rEvent) override; // XPaintListener - virtual void SAL_CALL windowPaint (const css::awt::PaintEvent& rEvent) override; + virtual void SAL_CALL windowPaint(const css::awt::PaintEvent& rEvent) override; private: css::uno::Reference<css::rendering::XSpriteCanvas> mxParentCanvas; std::shared_ptr<PresenterSprite> mpSprite; - virtual void CreateCanvases ( + virtual void CreateCanvases( const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas) override; void UpdateCanvases(); }; diff --git a/sdext/source/presenter/PresenterUIPainter.hxx b/sdext/source/presenter/PresenterUIPainter.hxx index 5aa9d8900dfe..f21ca291a147 100644 --- a/sdext/source/presenter/PresenterUIPainter.hxx +++ b/sdext/source/presenter/PresenterUIPainter.hxx @@ -24,8 +24,8 @@ #include <com/sun/star/rendering/XCanvas.hpp> #include <com/sun/star/rendering/XBitmap.hpp> -namespace sdext::presenter { - +namespace sdext::presenter +{ /** Functions for painting UI elements. */ class PresenterUIPainter @@ -35,23 +35,20 @@ public: PresenterUIPainter(const PresenterUIPainter&) = delete; PresenterUIPainter& operator=(const PresenterUIPainter&) = delete; - static void PaintHorizontalBitmapComposite ( + static void PaintHorizontalBitmapComposite( const css::uno::Reference<css::rendering::XCanvas>& rxCanvas, - const css::awt::Rectangle& rRepaintBox, - const css::awt::Rectangle& rBoundingBox, + const css::awt::Rectangle& rRepaintBox, const css::awt::Rectangle& rBoundingBox, const css::uno::Reference<css::rendering::XBitmap>& rxLeftBitmap, const css::uno::Reference<css::rendering::XBitmap>& rxRepeatableCenterBitmap, const css::uno::Reference<css::rendering::XBitmap>& rxRightBitmap); - static void PaintVerticalBitmapComposite ( + static void PaintVerticalBitmapComposite( const css::uno::Reference<css::rendering::XCanvas>& rxCanvas, - const css::awt::Rectangle& rRepaintBox, - const css::awt::Rectangle& rBoundingBox, + const css::awt::Rectangle& rRepaintBox, const css::awt::Rectangle& rBoundingBox, const css::uno::Reference<css::rendering::XBitmap>& rxTopBitmap, const css::uno::Reference<css::rendering::XBitmap>& rxRepeatableCenterBitmap, const css::uno::Reference<css::rendering::XBitmap>& rxBottomBitmap); }; - } #endif |