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
This commit is contained in:
Philipp Hofer
2020-11-22 01:56:27 +01:00
committed by Christian Lohmaier
parent c096ab87c8
commit a9bce41c64
9 changed files with 50 additions and 68 deletions
+4 -5
View File
@@ -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();
}
+1 -2
View File
@@ -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
+2 -2
View File
@@ -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
+11 -11
View File
@@ -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
+11 -13
View File
@@ -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();
};
+5 -7
View File
@@ -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
+10 -11
View File
@@ -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();
};
@@ -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
-8
View File
@@ -10570,12 +10570,9 @@ sdext/source/minimizer/optimizerdialog.hxx
sdext/source/minimizer/optimizerdialogcontrols.cxx
sdext/source/minimizer/pagecollector.cxx
sdext/source/minimizer/pagecollector.hxx
sdext/source/minimizer/pppoptimizer.cxx
sdext/source/minimizer/pppoptimizer.hxx
sdext/source/minimizer/pppoptimizerdialog.cxx
sdext/source/minimizer/pppoptimizerdialog.hxx
sdext/source/minimizer/pppoptimizertoken.cxx
sdext/source/minimizer/pppoptimizertoken.hxx
sdext/source/minimizer/unodialog.cxx
sdext/source/minimizer/unodialog.hxx
sdext/source/pdfimport/filterdet.cxx
@@ -10644,13 +10641,11 @@ sdext/source/presenter/PresenterGeometryHelper.hxx
sdext/source/presenter/PresenterHelpView.cxx
sdext/source/presenter/PresenterHelpView.hxx
sdext/source/presenter/PresenterHelper.cxx
sdext/source/presenter/PresenterHelper.hxx
sdext/source/presenter/PresenterNotesView.cxx
sdext/source/presenter/PresenterNotesView.hxx
sdext/source/presenter/PresenterPaintManager.cxx
sdext/source/presenter/PresenterPaintManager.hxx
sdext/source/presenter/PresenterPane.cxx
sdext/source/presenter/PresenterPane.hxx
sdext/source/presenter/PresenterPaneBase.cxx
sdext/source/presenter/PresenterPaneBase.hxx
sdext/source/presenter/PresenterPaneBorderPainter.cxx
@@ -10672,9 +10667,7 @@ sdext/source/presenter/PresenterSlideShowView.hxx
sdext/source/presenter/PresenterSlideSorter.cxx
sdext/source/presenter/PresenterSlideSorter.hxx
sdext/source/presenter/PresenterSprite.cxx
sdext/source/presenter/PresenterSprite.hxx
sdext/source/presenter/PresenterSpritePane.cxx
sdext/source/presenter/PresenterSpritePane.hxx
sdext/source/presenter/PresenterTextView.cxx
sdext/source/presenter/PresenterTextView.hxx
sdext/source/presenter/PresenterTheme.cxx
@@ -10684,7 +10677,6 @@ sdext/source/presenter/PresenterTimer.hxx
sdext/source/presenter/PresenterToolBar.cxx
sdext/source/presenter/PresenterToolBar.hxx
sdext/source/presenter/PresenterUIPainter.cxx
sdext/source/presenter/PresenterUIPainter.hxx
sdext/source/presenter/PresenterViewFactory.cxx
sdext/source/presenter/PresenterViewFactory.hxx
sdext/source/presenter/PresenterWindowManager.cxx