summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 13:19:58 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-11-16 11:42:31 +0100
commit69397a13d9458174ea3d0160cb65d77ac83c205c (patch)
tree5511df93af26e29d91db5ce7934d76b6a1be55fe /svx
parent81a11c6f1c2caec8c177cb4e061631561a4d102e (diff)
tdf#123936 Formatting files in module svx with clang-format
Change-Id: I482a00c9f65fd08be03f101c0e18f044c9323137 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105716 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/AffineMatrixItem.hxx8
-rw-r--r--svx/inc/DescriptionGenerator.hxx41
-rw-r--r--svx/inc/GalleryControl.hxx7
-rw-r--r--svx/inc/dbcharsethelper.hxx6
-rw-r--r--svx/inc/extrusiondepthdialog.hxx5
-rw-r--r--svx/inc/polygn3d.hxx6
-rw-r--r--svx/inc/sdr/contact/viewcontactofe3d.hxx37
-rw-r--r--svx/inc/sdr/contact/viewcontactofpageobj.hxx18
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx20
-rw-r--r--svx/inc/sdr/contact/viewcontactofsdrrectobj.hxx13
-rw-r--r--svx/inc/sdr/contact/viewcontactoftextobj.hxx5
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx10
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx8
-rw-r--r--svx/inc/sdr/primitive2d/sdrprimitivetools.hxx14
-rw-r--r--svx/inc/sxcaitm.hxx8
-rw-r--r--svx/inc/sxmoitm.hxx8
-rw-r--r--svx/inc/sxmsitm.hxx8
-rw-r--r--svx/inc/sxroaitm.hxx8
-rw-r--r--svx/inc/sxsaitm.hxx8
-rw-r--r--svx/inc/textchain.hxx41
-rw-r--r--svx/inc/textchainflow.hxx35
-rw-r--r--svx/inc/uiobject.hxx11
-rw-r--r--svx/inc/unomlstr.hxx9
-rw-r--r--svx/qa/unit/svdraw/test_SdrTextObject.cxx17
-rw-r--r--svx/qa/unit/svx-dialogs-test.cxx9
-rw-r--r--svx/source/accessibility/DescriptionGenerator.cxx85
-rw-r--r--svx/source/accessibility/lookupcolorname.cxx40
-rw-r--r--svx/source/accessibility/lookupcolorname.hxx5
-rw-r--r--svx/source/dialog/SvxNumOptionsTabPageHelper.cxx18
-rw-r--r--svx/source/dialog/dialmgr.cxx10
-rw-r--r--svx/source/dialog/dlgunit.hxx15
-rw-r--r--svx/source/dialog/measctrl.cxx24
-rw-r--r--svx/source/dialog/rubydialog.cxx174
-rw-r--r--svx/source/dialog/srchctrl.hxx7
-rw-r--r--svx/source/dialog/strarray.cxx16
-rw-r--r--svx/source/dialog/svxdlg.cxx7
-rw-r--r--svx/source/engine3d/camera3d.cxx26
-rw-r--r--svx/source/engine3d/deflt3d.cxx6
-rw-r--r--svx/source/engine3d/helperminimaldepth3d.hxx3
-rw-r--r--svx/source/engine3d/polygn3d.cxx59
-rw-r--r--svx/source/engine3d/svx3ditems.cxx121
-rw-r--r--svx/source/gallery2/codec.hxx11
-rw-r--r--svx/source/inc/celltypes.hxx36
-rw-r--r--svx/source/inc/fmslotinvalidator.hxx3
-rw-r--r--svx/source/inc/tbxform.hxx35
-rw-r--r--svx/source/items/numfmtsh.cxx152
-rw-r--r--svx/source/sdr/contact/viewcontact.cxx91
-rw-r--r--svx/source/sdr/contact/viewcontactofpageobj.cxx24
-rw-r--r--svx/source/sdr/contact/viewcontactoftextobj.cxx11
-rw-r--r--svx/source/sdr/contact/viewobjectcontactredirector.cxx19
-rw-r--r--svx/source/sidebar/EmptyPanel.cxx11
-rw-r--r--svx/source/sidebar/EmptyPanel.hxx7
-rw-r--r--svx/source/sidebar/SelectionAnalyzer.cxx88
-rw-r--r--svx/source/sidebar/line/LineWidthPopup.cxx62
-rw-r--r--svx/source/sidebar/nbdtmgfact.cxx11
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx17
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingPopup.cxx19
-rw-r--r--svx/source/sidebar/text/TextUnderlinePopup.cxx19
-rw-r--r--svx/source/svdraw/sdrundomanager.cxx34
-rw-r--r--svx/source/svdraw/svdoattr.cxx21
-rw-r--r--svx/source/svdraw/svdviter.cxx39
-rw-r--r--svx/source/table/tablerows.hxx20
-rw-r--r--svx/source/tbxctrls/SvxPresetListBox.cxx26
-rw-r--r--svx/source/tbxctrls/verttexttbxctrl.cxx33
-rw-r--r--svx/source/uitest/sdrobject.cxx37
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx8
-rw-r--r--svx/source/unodraw/gluepts.hxx8
-rw-r--r--svx/source/unodraw/unodtabl.cxx31
-rw-r--r--svx/source/unodraw/unogtabl.cxx35
-rw-r--r--svx/source/unodraw/unottabl.cxx26
-rw-r--r--svx/source/xoutdev/XPropertyEntry.cxx8
71 files changed, 906 insertions, 1012 deletions
diff --git a/svx/inc/AffineMatrixItem.hxx b/svx/inc/AffineMatrixItem.hxx
index 7d1c48a538f6..c7eb5cb71e8e 100644
--- a/svx/inc/AffineMatrixItem.hxx
+++ b/svx/inc/AffineMatrixItem.hxx
@@ -27,7 +27,7 @@ class SfxItemPool;
class AffineMatrixItem final : public SfxPoolItem
{
private:
- css::geometry::AffineMatrix2D maMatrix;
+ css::geometry::AffineMatrix2D maMatrix;
public:
AffineMatrixItem(const css::geometry::AffineMatrix2D* pMatrix);
@@ -35,10 +35,10 @@ public:
virtual ~AffineMatrixItem() override;
virtual bool operator==(const SfxPoolItem&) const override;
- virtual AffineMatrixItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual AffineMatrixItem* Clone(SfxItemPool* pPool = nullptr) const override;
- virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
- virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override;
+ virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/DescriptionGenerator.hxx b/svx/inc/DescriptionGenerator.hxx
index c1407a769188..5895b310b3fe 100644
--- a/svx/inc/DescriptionGenerator.hxx
+++ b/svx/inc/DescriptionGenerator.hxx
@@ -17,18 +17,22 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#pragma once
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ustrbuf.hxx>
-namespace com::sun::star::beans { class XPropertySet; }
-namespace com::sun::star::drawing { class XShape; }
-
-
-namespace accessibility {
+namespace com::sun::star::beans
+{
+class XPropertySet;
+}
+namespace com::sun::star::drawing
+{
+class XShape;
+}
+namespace accessibility
+{
/** This class creates description strings for shapes.
<p>Initialized with a given shape additional calls to the
<member>addProperty</member> method will build a descriptive string that
@@ -39,7 +43,8 @@ namespace accessibility {
class DescriptionGenerator
{
public:
- enum class PropertyType {
+ enum class PropertyType
+ {
Color,
Integer
};
@@ -51,8 +56,7 @@ public:
The shape from which properties will be extracted by later calls
to <member>addProperty</member>.
*/
- DescriptionGenerator (const css::uno::Reference<
- css::drawing::XShape>& xShape);
+ DescriptionGenerator(const css::uno::Reference<css::drawing::XShape>& xShape);
~DescriptionGenerator();
@@ -62,7 +66,7 @@ public:
An introductory description of the shape that is made more
specific by later calls to <member>addProperty</member>.
*/
- void Initialize (const OUString& sPrefix);
+ void Initialize(const OUString& sPrefix);
/** Initialize the description with the specified string from the
resource followed by the shape style in parentheses and a colon.
@@ -78,7 +82,7 @@ public:
@return
The description string in its current form.
*/
- OUString operator() (void);
+ OUString operator()(void);
/** Add the given property name and its associated value to the
description string. If the property value does not differ from the
@@ -93,22 +97,21 @@ public:
Localized name of the property. An empty string tells the
method to use the property name instead.
*/
- void AddProperty (const OUString& sPropertyName,
- PropertyType aType);
+ void AddProperty(const OUString& sPropertyName, PropertyType aType);
/** Append the given string as is to the current description.
@param sString
String to append to the current description. It is not modified
in any way.
*/
- void AppendString (const OUString& sString);
+ void AppendString(const OUString& sString);
private:
/// Reference to the shape from which the properties are extracted.
- css::uno::Reference< css::drawing::XShape> mxShape;
+ css::uno::Reference<css::drawing::XShape> mxShape;
/// Reference to the shape's property set.
- css::uno::Reference< css::beans::XPropertySet> mxSet;
+ css::uno::Reference<css::beans::XPropertySet> mxSet;
/// The description string that is build.
OUStringBuffer msDescription;
@@ -120,15 +123,13 @@ private:
/** Add a property value formatted as color to the description string.
*/
- void AddColor (const OUString& sPropertyName);
+ void AddColor(const OUString& sPropertyName);
/** Add a property value formatted as integer to the description string.
*/
- void AddInteger (const OUString& sPropertyName);
+ void AddInteger(const OUString& sPropertyName);
};
-
} // end of namespace accessibility
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/GalleryControl.hxx b/svx/inc/GalleryControl.hxx
index 5b40f4bc83be..8f8e6339df85 100644
--- a/svx/inc/GalleryControl.hxx
+++ b/svx/inc/GalleryControl.hxx
@@ -31,13 +31,12 @@ class GalleryBrowser2;
class FmFormModel;
class Splitter;
-namespace svx::sidebar {
-
-
+namespace svx::sidebar
+{
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) GalleryControl final : public PanelLayout
{
public:
- GalleryControl( vcl::Window* pParentWindow );
+ GalleryControl(vcl::Window* pParentWindow);
private:
Gallery* mpGallery;
diff --git a/svx/inc/dbcharsethelper.hxx b/svx/inc/dbcharsethelper.hxx
index 207d89fb25d6..8dfaf27ca693 100644
--- a/svx/inc/dbcharsethelper.hxx
+++ b/svx/inc/dbcharsethelper.hxx
@@ -25,12 +25,10 @@
namespace svxform::charset_helper
{
-
- /** enumerates all supported charsets
+/** enumerates all supported charsets
@return the number of charsets supported
*/
- sal_Int32 getSupportedTextEncodings( ::std::vector< rtl_TextEncoding >& _rEncs );
-
+sal_Int32 getSupportedTextEncodings(::std::vector<rtl_TextEncoding>& _rEncs);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/extrusiondepthdialog.hxx b/svx/inc/extrusiondepthdialog.hxx
index e7f2e07a514b..11d69c17033f 100644
--- a/svx/inc/extrusiondepthdialog.hxx
+++ b/svx/inc/extrusiondepthdialog.hxx
@@ -22,8 +22,8 @@
#include <vcl/weld.hxx>
-namespace svx {
-
+namespace svx
+{
class ExtrusionDepthDialog final : public weld::GenericDialogController
{
std::unique_ptr<weld::MetricSpinButton> m_xMtrDepth;
@@ -34,7 +34,6 @@ public:
double getDepth() const;
};
-
}
#endif // INCLUDED_SVX_INC_EXTRUSIONDEPTHDIALOG_HXX
diff --git a/svx/inc/polygn3d.hxx b/svx/inc/polygn3d.hxx
index 05b15c83fd1d..2665efdffcb8 100644
--- a/svx/inc/polygn3d.hxx
+++ b/svx/inc/polygn3d.hxx
@@ -29,7 +29,7 @@ class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) E3dPolygonObj final : public E3dCompou
basegfx::B3DPolyPolygon aPolyPoly3D;
basegfx::B3DPolyPolygon aPolyNormals3D;
basegfx::B2DPolyPolygon aPolyTexture2D;
- bool bLineOnly;
+ bool bLineOnly;
SVX_DLLPRIVATE void CreateDefaultNormals();
SVX_DLLPRIVATE void CreateDefaultTexture();
@@ -44,9 +44,7 @@ public:
void SetPolyNormals3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D);
void SetPolyTexture2D(const basegfx::B2DPolyPolygon& rNewPolyPoly2D);
- E3dPolygonObj(
- SdrModel& rSdrModel,
- const basegfx::B3DPolyPolygon& rPolyPoly3D);
+ E3dPolygonObj(SdrModel& rSdrModel, const basegfx::B3DPolyPolygon& rPolyPoly3D);
E3dPolygonObj(SdrModel& rSdrModel);
const basegfx::B3DPolyPolygon& GetPolyPolygon3D() const { return aPolyPoly3D; }
diff --git a/svx/inc/sdr/contact/viewcontactofe3d.hxx b/svx/inc/sdr/contact/viewcontactofe3d.hxx
index 982d28752984..2f24460cd106 100644
--- a/svx/inc/sdr/contact/viewcontactofe3d.hxx
+++ b/svx/inc/sdr/contact/viewcontactofe3d.hxx
@@ -23,14 +23,18 @@
#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
#include <drawinglayer/primitive3d/baseprimitive3d.hxx>
-namespace drawinglayer::attribute { class SdrLineAttribute; }
-namespace basegfx {
- class BColor;
- class B3DHomMatrix;
+namespace drawinglayer::attribute
+{
+class SdrLineAttribute;
+}
+namespace basegfx
+{
+class BColor;
+class B3DHomMatrix;
}
-namespace sdr::contact {
-
+namespace sdr::contact
+{
class ViewContactOfE3dScene;
class ViewContactOfE3d : public ViewContactOfSdrObj
@@ -38,7 +42,8 @@ class ViewContactOfE3d : public ViewContactOfSdrObj
protected:
// Create an Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something.
- virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
+ virtual ViewObjectContact&
+ CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
public:
// basic constructor, used from E3dObject.
@@ -46,38 +51,36 @@ public:
virtual ~ViewContactOfE3d() override;
// access to E3dObject
- const E3dObject& GetE3dObject() const
- {
- return static_cast<const E3dObject&>(GetSdrObject());
- }
+ const E3dObject& GetE3dObject() const { return static_cast<const E3dObject&>(GetSdrObject()); }
// public helpers
drawinglayer::primitive2d::Primitive2DContainer impCreateWithGivenPrimitive3DContainer(
const drawinglayer::primitive3d::Primitive3DContainer& rxContent3D) const;
-
// primitive stuff
// Primitive3DContainer of the ViewContact. This contains all necessary information
// for the graphical visualisation and needs to be supported by all 3D VCs which
// can be visualized. It does NOT contain the object transformation to be able to
// buffer for all possible usages
- drawinglayer::primitive3d::Primitive3DContainer mxViewIndependentPrimitive3DContainer;
+ drawinglayer::primitive3d::Primitive3DContainer mxViewIndependentPrimitive3DContainer;
protected:
// This method is responsible for creating the graphical visualisation data which is
// stored in mxViewIndependentPrimitive3DContainer, but without object transformation
- virtual drawinglayer::primitive3d::Primitive3DContainer createViewIndependentPrimitive3DContainer() const = 0;
+ virtual drawinglayer::primitive3d::Primitive3DContainer
+ createViewIndependentPrimitive3DContainer() const = 0;
// This method is responsible for creating the graphical visualisation data derived ONLY from
// the model data. The default implementation will try to create a 3D to 2D embedding (will work
// when scene is known) which can then be used for 2D processing concerning ranges
- virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer
+ createViewIndependentPrimitive2DSequence() const override;
public:
// access to the local primitive without the object's local 3D transform. This is e.g. needed
// to get the not-yet transformed BoundVolume for e.g. interactions
- drawinglayer::primitive3d::Primitive3DContainer const & getVIP3DSWithoutObjectTransform() const;
+ drawinglayer::primitive3d::Primitive3DContainer const& getVIP3DSWithoutObjectTransform() const;
// access to the local primitive. This will ensure that the list is
// current in comparing the local list content with a fresh created incarnation. It will
@@ -85,8 +88,6 @@ public:
// local 3d transform is used
drawinglayer::primitive3d::Primitive3DContainer getViewIndependentPrimitive3DContainer() const;
};
-
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/sdr/contact/viewcontactofpageobj.hxx b/svx/inc/sdr/contact/viewcontactofpageobj.hxx
index e1cb66a8b42a..f7ca5a7efd63 100644
--- a/svx/inc/sdr/contact/viewcontactofpageobj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofpageobj.hxx
@@ -25,16 +25,19 @@
class SdrPage;
-namespace sdr::contact {
-
+namespace sdr::contact
+{
class ViewContactOfPageObj final : public ViewContactOfSdrObj
{
// Create an Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something.
- virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
+ virtual ViewObjectContact&
+ CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
// create graphical visualisation data
- virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer
+ createViewIndependentPrimitive2DSequence() const override;
+
public:
// basic constructor, used from SdrObject.
explicit ViewContactOfPageObj(SdrPageObj& rPageObj);
@@ -44,13 +47,8 @@ public:
virtual void ActionChanged() override;
// access to SdrObject
- const SdrPageObj& GetPageObj() const
- {
- return static_cast<const SdrPageObj&>(GetSdrObject());
- }
+ const SdrPageObj& GetPageObj() const { return static_cast<const SdrPageObj&>(GetSdrObject()); }
};
-
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
index 7a79e3ee4f12..ac7a861e924f 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
@@ -26,8 +26,8 @@
class Graphic;
-namespace sdr::contact {
-
+namespace sdr::contact
+{
class ViewContactOfSdrOle2Obj final : public ViewContactOfSdrRectObj
{
private:
@@ -36,14 +36,12 @@ private:
// Create an Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something.
- virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
+ virtual ViewObjectContact&
+ CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
public:
// access to SdrOle2Obj
- const SdrOle2Obj& GetOle2Obj() const
- {
- return static_cast<const SdrOle2Obj&>(GetSdrObject());
- }
+ const SdrOle2Obj& GetOle2Obj() const { return static_cast<const SdrOle2Obj&>(GetSdrObject()); }
/// helper to create transformation from SdrObject
basegfx::B2DHomMatrix createObjectTransform() const;
@@ -61,17 +59,17 @@ public:
// #i123539# get rid of buffered chart content (if there) on change
virtual void ActionChanged() override;
- virtual basegfx::B2DRange getRange( const drawinglayer::geometry::ViewInformation2D& rViewInfo2D ) const override;
+ virtual basegfx::B2DRange
+ getRange(const drawinglayer::geometry::ViewInformation2D& rViewInfo2D) const override;
private:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data, just wraps to call createPrimitive2DSequenceWithParameters(false)
- virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer
+ createViewIndependentPrimitive2DSequence() const override;
};
-
}
-
#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/sdr/contact/viewcontactofsdrrectobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrrectobj.hxx
index b1de079e3177..3477ce4f8f87 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrrectobj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrrectobj.hxx
@@ -22,16 +22,13 @@
#include <sdr/contact/viewcontactoftextobj.hxx>
#include <svx/svdorect.hxx>
-namespace sdr::contact {
-
+namespace sdr::contact
+{
class ViewContactOfSdrRectObj : public ViewContactOfTextObj
{
protected:
// internal access to SdrRectObj
- const SdrRectObj& GetRectObj() const
- {
- return static_cast<const SdrRectObj&>(GetSdrObject());
- }
+ const SdrRectObj& GetRectObj() const { return static_cast<const SdrRectObj&>(GetSdrObject()); }
public:
// basic constructor, used from SdrObject.
@@ -41,9 +38,9 @@ public:
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
- virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer
+ createViewIndependentPrimitive2DSequence() const override;
};
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/sdr/contact/viewcontactoftextobj.hxx b/svx/inc/sdr/contact/viewcontactoftextobj.hxx
index 132744d0019e..cdf88e10c7bd 100644
--- a/svx/inc/sdr/contact/viewcontactoftextobj.hxx
+++ b/svx/inc/sdr/contact/viewcontactoftextobj.hxx
@@ -23,8 +23,8 @@
class SdrTextObj;
-namespace sdr::contact {
-
+namespace sdr::contact
+{
class ViewContactOfTextObj : public ViewContactOfSdrObj
{
public:
@@ -32,7 +32,6 @@ public:
explicit ViewContactOfTextObj(SdrTextObj& rTextObj);
virtual ~ViewContactOfTextObj() override;
};
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx b/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx
index c0f67e83ed53..16e168c41235 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx
@@ -24,8 +24,8 @@
class SdrPage;
-namespace sdr::contact {
-
+namespace sdr::contact
+{
class PagePrimitiveExtractor;
class ViewObjectContactOfPageObj final : public ViewObjectContactOfSdrObj
@@ -37,15 +37,13 @@ private:
// This method is responsible for creating the graphical visualisation data which is
// stored/cached in the local primitive.
// This method will not handle included hierarchies and not check geometric visibility.
- virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer
+ createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfPageObj(ObjectContact& rObjectContact, ViewContact& rViewContact);
virtual ~ViewObjectContactOfPageObj() override;
};
-
}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx
index 4d227a9c20e5..8afd0c2cc76d 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx
@@ -24,18 +24,18 @@
class SdrOle2Obj;
-namespace sdr::contact {
-
+namespace sdr::contact
+{
class ViewObjectContactOfSdrOle2Obj final : public ViewObjectContactOfSdrObj
{
// This method is responsible for creating the graphical visualisation data
- virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer
+ createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
public:
ViewObjectContactOfSdrOle2Obj(ObjectContact& rObjectContact, ViewContact& rViewContact);
virtual ~ViewObjectContactOfSdrOle2Obj() override;
};
-
}
#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX
diff --git a/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx b/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx
index 5b2bd6d30535..71e50cdf7fd8 100644
--- a/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx
+++ b/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx
@@ -22,23 +22,21 @@
#include <vcl/bitmapex.hxx>
-
// predefines
-namespace basegfx {
- class BColor;
+namespace basegfx
+{
+class BColor;
}
-
// helper methods
namespace drawinglayer::primitive2d
- {
- // create a 3x3 cross in given color as BitmapEx
- BitmapEx createDefaultCross_3x3(const basegfx::BColor& rBColor);
+{
+// create a 3x3 cross in given color as BitmapEx
+BitmapEx createDefaultCross_3x3(const basegfx::BColor& rBColor);
} // end of namespace drawinglayer::primitive2d
-
#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRPRIMITIVETOOLS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/sxcaitm.hxx b/svx/inc/sxcaitm.hxx
index 8ffaec240f30..d6e216bf5493 100644
--- a/svx/inc/sxcaitm.hxx
+++ b/svx/inc/sxcaitm.hxx
@@ -32,9 +32,13 @@
// only if Type2, Type3 and Type4
// and only if SdrCaptionIsFixedAngleItem=TRUE
-class SdrCaptionAngleItem final : public SdrAngleItem {
+class SdrCaptionAngleItem final : public SdrAngleItem
+{
public:
- SdrCaptionAngleItem(tools::Long nAngle=0): SdrAngleItem(SDRATTR_CAPTIONANGLE,nAngle) {}
+ SdrCaptionAngleItem(tools::Long nAngle = 0)
+ : SdrAngleItem(SDRATTR_CAPTIONANGLE, nAngle)
+ {
+ }
virtual SdrCaptionAngleItem* Clone(SfxItemPool*) const override
{
return new SdrCaptionAngleItem(*this);
diff --git a/svx/inc/sxmoitm.hxx b/svx/inc/sxmoitm.hxx
index db4989134990..24ee1fc32b6b 100644
--- a/svx/inc/sxmoitm.hxx
+++ b/svx/inc/sxmoitm.hxx
@@ -24,9 +24,13 @@
// Overlap of the measure line over the measure helper lines
// Only of the measure arrows are on the outside
-class SdrMeasureOverhangItem: public SdrMetricItem {
+class SdrMeasureOverhangItem : public SdrMetricItem
+{
public:
- SdrMeasureOverhangItem(tools::Long nVal): SdrMetricItem(SDRATTR_MEASUREOVERHANG,nVal) {}
+ SdrMeasureOverhangItem(tools::Long nVal)
+ : SdrMetricItem(SDRATTR_MEASUREOVERHANG, nVal)
+ {
+ }
virtual SdrMeasureOverhangItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureOverhangItem(*this);
diff --git a/svx/inc/sxmsitm.hxx b/svx/inc/sxmsitm.hxx
index 78dea13bf74e..f821c73fe047 100644
--- a/svx/inc/sxmsitm.hxx
+++ b/svx/inc/sxmsitm.hxx
@@ -25,9 +25,13 @@
// Measure scale setting
// We do not overwrite a measure scale (UIScale), If the model already has one set.
// Instead, we multiply them with each other.
-class SdrMeasureScaleItem final : public SdrScaleItem {
+class SdrMeasureScaleItem final : public SdrScaleItem
+{
public:
- SdrMeasureScaleItem() : SdrScaleItem(SDRATTR_MEASURESCALE,Fraction(1,1)) {}
+ SdrMeasureScaleItem()
+ : SdrScaleItem(SDRATTR_MEASURESCALE, Fraction(1, 1))
+ {
+ }
virtual SdrMeasureScaleItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureScaleItem(*this);
diff --git a/svx/inc/sxroaitm.hxx b/svx/inc/sxroaitm.hxx
index dde8f989cde1..66785c68af7e 100644
--- a/svx/inc/sxroaitm.hxx
+++ b/svx/inc/sxroaitm.hxx
@@ -22,9 +22,13 @@
#include <svx/svddef.hxx>
#include <svx/sdangitm.hxx>
-class SdrRotateAllItem final : public SdrAngleItem {
+class SdrRotateAllItem final : public SdrAngleItem
+{
public:
- SdrRotateAllItem(): SdrAngleItem(SDRATTR_ROTATEALL,0) {}
+ SdrRotateAllItem()
+ : SdrAngleItem(SDRATTR_ROTATEALL, 0)
+ {
+ }
virtual SdrRotateAllItem* Clone(SfxItemPool*) const override
{
return new SdrRotateAllItem(*this);
diff --git a/svx/inc/sxsaitm.hxx b/svx/inc/sxsaitm.hxx
index 8d9fbd6a5c7f..1591dfa4938f 100644
--- a/svx/inc/sxsaitm.hxx
+++ b/svx/inc/sxsaitm.hxx
@@ -22,9 +22,13 @@
#include <svx/svddef.hxx>
#include <svx/sdangitm.hxx>
-class SdrShearAngleItem: public SdrAngleItem {
+class SdrShearAngleItem : public SdrAngleItem
+{
public:
- SdrShearAngleItem(tools::Long nAngle=0): SdrAngleItem(SDRATTR_SHEARANGLE,nAngle) {}
+ SdrShearAngleItem(tools::Long nAngle = 0)
+ : SdrAngleItem(SDRATTR_SHEARANGLE, nAngle)
+ {
+ }
virtual SdrShearAngleItem* Clone(SfxItemPool*) const override
{
return new SdrShearAngleItem(*this);
diff --git a/svx/inc/textchain.hxx b/svx/inc/textchain.hxx
index d5cae0be281c..a74b6c9f6768 100644
--- a/svx/inc/textchain.hxx
+++ b/svx/inc/textchain.hxx
@@ -26,8 +26,9 @@ class ImpChainLinkProperties;
class SdrTextObj;
class SdrModel;
-namespace rtl {
- class OUString;
+namespace rtl
+{
+class OUString;
}
typedef OUString ChainLinkId;
@@ -45,11 +46,12 @@ class ImpChainLinkProperties
protected:
friend class TextChain;
- ImpChainLinkProperties() {
+ ImpChainLinkProperties()
+ {
aNilChainingEvent = false;
aCursorEvent = CursorChainingEvent::NULL_EVENT;
- aPreChainingSel = ESelection(0,0,0,0);
- aPostChainingSel = ESelection(0,0,0,0);
+ aPreChainingSel = ESelection(0, 0, 0, 0);
+ aPostChainingSel = ESelection(0, 0, 0, 0);
aIsPartOfLastParaInNextLink = false; // XXX: Should come from file
aSwitchingToNextBox = false;
}
@@ -64,40 +66,39 @@ private:
bool aSwitchingToNextBox;
};
-
class TextChain
{
public:
~TextChain();
- ImpChainLinkProperties *GetLinkProperties(const SdrTextObj *);
+ ImpChainLinkProperties* GetLinkProperties(const SdrTextObj*);
// Specific Link Properties
- CursorChainingEvent const & GetCursorEvent(const SdrTextObj *);
- void SetCursorEvent(const SdrTextObj *, CursorChainingEvent const &);
+ CursorChainingEvent const& GetCursorEvent(const SdrTextObj*);
+ void SetCursorEvent(const SdrTextObj*, CursorChainingEvent const&);
- bool GetNilChainingEvent(const SdrTextObj *);
- void SetNilChainingEvent(const SdrTextObj *, bool);
+ bool GetNilChainingEvent(const SdrTextObj*);
+ void SetNilChainingEvent(const SdrTextObj*, bool);
- ESelection const & GetPreChainingSel(const SdrTextObj *);
- void SetPreChainingSel(const SdrTextObj *, ESelection const &);
+ ESelection const& GetPreChainingSel(const SdrTextObj*);
+ void SetPreChainingSel(const SdrTextObj*, ESelection const&);
- ESelection const & GetPostChainingSel(const SdrTextObj *);
- void SetPostChainingSel(const SdrTextObj *, ESelection const &);
+ ESelection const& GetPostChainingSel(const SdrTextObj*);
+ void SetPostChainingSel(const SdrTextObj*, ESelection const&);
// return whether a paragraph is split between this box and the next
- bool GetIsPartOfLastParaInNextLink(const SdrTextObj *);
- void SetIsPartOfLastParaInNextLink(const SdrTextObj *, bool );
+ bool GetIsPartOfLastParaInNextLink(const SdrTextObj*);
+ void SetIsPartOfLastParaInNextLink(const SdrTextObj*, bool);
// return whether we are currently moving the cursor to the next box (useful to know whether we should prevent SetOutlinerParaObject invocations in SdrTextObj::EndTextEdit)
- bool GetSwitchingToNextBox(const SdrTextObj *);
- void SetSwitchingToNextBox(const SdrTextObj *, bool);
+ bool GetSwitchingToNextBox(const SdrTextObj*);
+ void SetSwitchingToNextBox(const SdrTextObj*, bool);
protected:
TextChain();
private:
- std::map< ChainLinkId, ImpChainLinkProperties *> maLinkPropertiesMap;
+ std::map<ChainLinkId, ImpChainLinkProperties*> maLinkPropertiesMap;
friend class SdrModel;
};
diff --git a/svx/inc/textchainflow.hxx b/svx/inc/textchainflow.hxx
index c823663d631b..e8ffd654b5b6 100644
--- a/svx/inc/textchainflow.hxx
+++ b/svx/inc/textchainflow.hxx
@@ -34,21 +34,21 @@ class UFlowChainedText;
class TextChainFlow
{
public:
- TextChainFlow(SdrTextObj *pChainTarget);
+ TextChainFlow(SdrTextObj* pChainTarget);
virtual ~TextChainFlow();
// Check for flow events in Outliner
- virtual void CheckForFlowEvents(SdrOutliner *);
+ virtual void CheckForFlowEvents(SdrOutliner*);
- void ExecuteUnderflow(SdrOutliner *);
+ void ExecuteUnderflow(SdrOutliner*);
// Uses two outliners: one for the non-overflow text and one for overflowing (might be the same)
- void ExecuteOverflow(SdrOutliner *, SdrOutliner *);
+ void ExecuteOverflow(SdrOutliner*, SdrOutliner*);
bool IsOverflow() const;
bool IsUnderflow() const;
- SdrTextObj *GetLinkTarget() const;
+ SdrTextObj* GetLinkTarget() const;
protected:
// Cursor related
@@ -59,43 +59,42 @@ protected:
std::unique_ptr<OFlowChainedText> mpOverflChText;
std::unique_ptr<UFlowChainedText> mpUnderflChText;
- void impCheckForFlowEvents(SdrOutliner *, SdrOutliner *);
+ void impCheckForFlowEvents(SdrOutliner*, SdrOutliner*);
- TextChain *GetTextChain() const;
+ TextChain* GetTextChain() const;
- virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *);
- void impMoveChainedTextToNextLink(SdrOutliner *);
+ virtual void impLeaveOnlyNonOverflowingText(SdrOutliner*);
+ void impMoveChainedTextToNextLink(SdrOutliner*);
- virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *);
+ virtual void impSetFlowOutlinerParams(SdrOutliner*, SdrOutliner*);
private:
bool mbOFisUFinduced;
void impUpdateCursorInfo();
- SdrTextObj *mpTargetLink;
- SdrTextObj *mpNextLink;
+ SdrTextObj* mpTargetLink;
+ SdrTextObj* mpNextLink;
- TextChain *mpTextChain;
+ TextChain* mpTextChain;
bool bUnderflow;
bool bOverflow;
};
-
// NOTE: EditingTextChainFlow might be strongly coupled with behavior in SdrTextObj::onChainingEvent
class EditingTextChainFlow : public TextChainFlow
{
public:
- EditingTextChainFlow(SdrTextObj *);
- virtual void CheckForFlowEvents(SdrOutliner *) override;
+ EditingTextChainFlow(SdrTextObj*);
+ virtual void CheckForFlowEvents(SdrOutliner*) override;
//virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *) override;
protected:
- virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *) override;
+ virtual void impLeaveOnlyNonOverflowingText(SdrOutliner*) override;
- virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *) override;
+ virtual void impSetFlowOutlinerParams(SdrOutliner*, SdrOutliner*) override;
private:
void impBroadcastCursorInfo() const;
diff --git a/svx/inc/uiobject.hxx b/svx/inc/uiobject.hxx
index 34659619cf83..bddf321a130e 100644
--- a/svx/inc/uiobject.hxx
+++ b/svx/inc/uiobject.hxx
@@ -24,36 +24,29 @@ class SvxShowCharSetUIObject final : public DrawingAreaUIObject
public:
SvxShowCharSetUIObject(const VclPtr<vcl::Window>& rCharSetWin);
- virtual void execute(const OUString& rAction,
- const StringMap& rParameters) override;
+ virtual void execute(const OUString& rAction, const StringMap& rParameters) override;
static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
private:
-
OUString get_name() const override;
};
-
class SvxNumValueSetUIObject final : public DrawingAreaUIObject
{
SvxNumValueSet* mpNumValueSet;
public:
-
SvxNumValueSetUIObject(vcl::Window* pNumValueSetWin);
- virtual void execute(const OUString& rAction,
- const StringMap& rParameters) override;
+ virtual void execute(const OUString& rAction, const StringMap& rParameters) override;
static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
virtual StringMap get_state() override;
private:
-
OUString get_name() const override;
-
};
#endif // INCLUDED_SVX_INC_UIOBJECT_HXX
diff --git a/svx/inc/unomlstr.hxx b/svx/inc/unomlstr.hxx
index af2559fa09b4..55cae9c0dfdc 100644
--- a/svx/inc/unomlstr.hxx
+++ b/svx/inc/unomlstr.hxx
@@ -25,12 +25,13 @@
class SdrObject;
-class SvxUnoShapeModifyListener final : public ::cppu::WeakAggImplHelper1< css::util::XModifyListener >
+class SvxUnoShapeModifyListener final
+ : public ::cppu::WeakAggImplHelper1<css::util::XModifyListener>
{
- SdrObject* mpObj;
+ SdrObject* mpObj;
public:
- SvxUnoShapeModifyListener( SdrObject* pObj ) throw();
+ SvxUnoShapeModifyListener(SdrObject* pObj) throw();
virtual ~SvxUnoShapeModifyListener() throw() override;
// css::util::XModifyListener
@@ -43,8 +44,6 @@ public:
void invalidate() throw();
};
-
#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/qa/unit/svdraw/test_SdrTextObject.cxx b/svx/qa/unit/svdraw/test_SdrTextObject.cxx
index 7af646b0bb16..93b06272fd3d 100644
--- a/svx/qa/unit/svdraw/test_SdrTextObject.cxx
+++ b/svx/qa/unit/svdraw/test_SdrTextObject.cxx
@@ -15,7 +15,8 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
-class SdrTextObjTest : public CppUnit::TestFixture {
+class SdrTextObjTest : public CppUnit::TestFixture
+{
public:
void AllFamiliesCanBeRestoredFromSavedString();
@@ -24,18 +25,20 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-void SdrTextObjTest::AllFamiliesCanBeRestoredFromSavedString() {
+void SdrTextObjTest::AllFamiliesCanBeRestoredFromSavedString()
+{
std::vector<SfxStyleFamily> allFamilies;
allFamilies.push_back(SfxStyleFamily::Char);
allFamilies.push_back(SfxStyleFamily::Para);
allFamilies.push_back(SfxStyleFamily::Page);
allFamilies.push_back(SfxStyleFamily::Pseudo);
- for (SfxStyleFamily family : allFamilies) {
- OUString styleName = "styleName";
- SdrTextObj::AppendFamilyToStyleName(styleName, family);
- SfxStyleFamily readFamily = SdrTextObj::ReadFamilyFromStyleName(styleName);
- CPPUNIT_ASSERT_EQUAL(static_cast<int>(family), static_cast<int>(readFamily));
+ for (SfxStyleFamily family : allFamilies)
+ {
+ OUString styleName = "styleName";
+ SdrTextObj::AppendFamilyToStyleName(styleName, family);
+ SfxStyleFamily readFamily = SdrTextObj::ReadFamilyFromStyleName(styleName);
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(family), static_cast<int>(readFamily));
}
}
diff --git a/svx/qa/unit/svx-dialogs-test.cxx b/svx/qa/unit/svx-dialogs-test.cxx
index eaa829569914..0a182e7fb026 100644
--- a/svx/qa/unit/svx-dialogs-test.cxx
+++ b/svx/qa/unit/svx-dialogs-test.cxx
@@ -36,19 +36,14 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-SvxDialogsTest::SvxDialogsTest()
-{
-}
+SvxDialogsTest::SvxDialogsTest() {}
void SvxDialogsTest::registerKnownDialogsByID(mapType& /*rKnownDialogs*/)
{
// fill map of known dialogs
}
-VclPtr<VclAbstractDialog> SvxDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
-{
- return nullptr;
-}
+VclPtr<VclAbstractDialog> SvxDialogsTest::createDialogByID(sal_uInt32 /*nID*/) { return nullptr; }
void SvxDialogsTest::openAnyDialog()
{
diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx
index ae2e90240baa..2ed65c5dbf38 100644
--- a/svx/source/accessibility/DescriptionGenerator.cxx
+++ b/svx/source/accessibility/DescriptionGenerator.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <DescriptionGenerator.hxx>
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -34,23 +33,16 @@
using namespace ::com::sun::star;
-
-namespace accessibility {
-
-
-DescriptionGenerator::DescriptionGenerator (
- const uno::Reference<drawing::XShape>& xShape)
- : mxShape (xShape),
- mxSet (mxShape, uno::UNO_QUERY),
- mbIsFirstProperty (true)
+namespace accessibility
{
-}
-
-
-DescriptionGenerator::~DescriptionGenerator()
+DescriptionGenerator::DescriptionGenerator(const uno::Reference<drawing::XShape>& xShape)
+ : mxShape(xShape)
+ , mxSet(mxShape, uno::UNO_QUERY)
+ , mbIsFirstProperty(true)
{
}
+DescriptionGenerator::~DescriptionGenerator() {}
void DescriptionGenerator::Initialize(const char* pResourceId)
{
@@ -62,11 +54,10 @@ void DescriptionGenerator::Initialize(const char* pResourceId)
}
// Forward the call with the resulting string.
- Initialize (sPrefix);
+ Initialize(sPrefix);
}
-
-void DescriptionGenerator::Initialize (const OUString& sPrefix)
+void DescriptionGenerator::Initialize(const OUString& sPrefix)
{
msDescription = sPrefix;
if (!mxSet.is())
@@ -79,7 +70,7 @@ void DescriptionGenerator::Initialize (const OUString& sPrefix)
msDescription.append(SvxResId(RID_SVXSTR_A11Y_WITH));
msDescription.append(' ');
- msDescription.append(SvxResId (RID_SVXSTR_A11Y_STYLE));
+ msDescription.append(SvxResId(RID_SVXSTR_A11Y_STYLE));
msDescription.append('=');
}
@@ -87,41 +78,38 @@ void DescriptionGenerator::Initialize (const OUString& sPrefix)
{
if (mxSet.is())
{
- uno::Any aValue = mxSet->getPropertyValue ("Style");
- uno::Reference<container::XNamed> xStyle (aValue, uno::UNO_QUERY);
+ uno::Any aValue = mxSet->getPropertyValue("Style");
+ uno::Reference<container::XNamed> xStyle(aValue, uno::UNO_QUERY);
if (xStyle.is())
- msDescription.append (xStyle->getName());
+ msDescription.append(xStyle->getName());
}
else
- msDescription.append ("<no style>");
+ msDescription.append("<no style>");
}
- catch (const css::beans::UnknownPropertyException &)
+ catch (const css::beans::UnknownPropertyException&)
{
- msDescription.append ("<unknown>");
+ msDescription.append("<unknown>");
}
}
-
-OUString DescriptionGenerator::operator() ()
+OUString DescriptionGenerator::operator()()
{
msDescription.append('.');
return msDescription.makeStringAndClear();
}
-
-void DescriptionGenerator::AddProperty (const OUString& sPropertyName,
- PropertyType aType)
+void DescriptionGenerator::AddProperty(const OUString& sPropertyName, PropertyType aType)
{
- uno::Reference<beans::XPropertyState> xState (mxShape, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertyState> xState(mxShape, uno::UNO_QUERY);
if (!xState.is()
- || xState->getPropertyState(sPropertyName)==beans::PropertyState_DEFAULT_VALUE)
+ || xState->getPropertyState(sPropertyName) == beans::PropertyState_DEFAULT_VALUE)
return;
if (!mxSet.is())
return;
// Append a separator from previous Properties.
- if ( ! mbIsFirstProperty)
+ if (!mbIsFirstProperty)
msDescription.append(',');
else
{
@@ -137,48 +125,41 @@ void DescriptionGenerator::AddProperty (const OUString& sPropertyName,
switch (aType)
{
case PropertyType::Color:
- AddColor (sPropertyName);
+ AddColor(sPropertyName);
break;
case PropertyType::Integer:
- AddInteger (sPropertyName);
+ AddInteger(sPropertyName);
break;
}
}
-
-void DescriptionGenerator::AppendString (const OUString& sString)
-{
- msDescription.append (sString);
-}
-
+void DescriptionGenerator::AppendString(const OUString& sString) { msDescription.append(sString); }
/** Search for the given color in the global color table. If found append
its name to the description. Otherwise append its RGB tuple.
*/
-void DescriptionGenerator::AddColor (const OUString& sPropertyName)
+void DescriptionGenerator::AddColor(const OUString& sPropertyName)
{
msDescription.append('=');
try
{
-
tools::Long nValue(0);
if (mxSet.is())
{
- uno::Any aValue = mxSet->getPropertyValue (sPropertyName);
+ uno::Any aValue = mxSet->getPropertyValue(sPropertyName);
aValue >>= nValue;
}
- msDescription.append (lookUpColorName(nValue));
+ msDescription.append(lookUpColorName(nValue));
}
- catch (const css::beans::UnknownPropertyException &)
+ catch (const css::beans::UnknownPropertyException&)
{
- msDescription.append ("<unknown>");
+ msDescription.append("<unknown>");
}
}
-
-void DescriptionGenerator::AddInteger (const OUString& sPropertyName)
+void DescriptionGenerator::AddInteger(const OUString& sPropertyName)
{
msDescription.append('=');
@@ -186,15 +167,15 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName)
{
if (mxSet.is())
{
- uno::Any aValue = mxSet->getPropertyValue (sPropertyName);
+ uno::Any aValue = mxSet->getPropertyValue(sPropertyName);
tools::Long nValue = 0;
aValue >>= nValue;
- msDescription.append (nValue);
+ msDescription.append(nValue);
}
}
- catch (const css::beans::UnknownPropertyException &)
+ catch (const css::beans::UnknownPropertyException&)
{
- msDescription.append ("<unknown>");
+ msDescription.append("<unknown>");
}
}
diff --git a/svx/source/accessibility/lookupcolorname.cxx b/svx/source/accessibility/lookupcolorname.cxx
index d74c22d3d984..520843c26caa 100644
--- a/svx/source/accessibility/lookupcolorname.cxx
+++ b/svx/source/accessibility/lookupcolorname.cxx
@@ -33,9 +33,10 @@
#include "lookupcolorname.hxx"
#include <unordered_map>
-namespace {
-
-class ColorNameMap {
+namespace
+{
+class ColorNameMap
+{
public:
ColorNameMap();
ColorNameMap(const ColorNameMap&) = delete;
@@ -44,20 +45,21 @@ public:
OUString lookUp(tools::Long color) const;
private:
- typedef std::unordered_map< tools::Long, OUString > Map;
+ typedef std::unordered_map<tools::Long, OUString> Map;
Map map_;
};
-ColorNameMap::ColorNameMap() {
- css::uno::Sequence< OUString > aNames;
- css::uno::Reference< css::container::XNameAccess > xNA;
+ColorNameMap::ColorNameMap()
+{
+ css::uno::Sequence<OUString> aNames;
+ css::uno::Reference<css::container::XNameAccess> xNA;
try
{
// Create color table in which to look up the given color.
- css::uno::Reference< css::container::XNameContainer > xColorTable =
- css::drawing::ColorTable::create( comphelper::getProcessComponentContext() );
+ css::uno::Reference<css::container::XNameContainer> xColorTable
+ = css::drawing::ColorTable::create(comphelper::getProcessComponentContext());
// Get list of color names in order to iterate over the color table.
@@ -95,25 +97,25 @@ ColorNameMap::ColorNameMap() {
}
}
-OUString ColorNameMap::lookUp(tools::Long color) const {
+OUString ColorNameMap::lookUp(tools::Long color) const
+{
Map::const_iterator i(map_.find(color));
- if (i != map_.end()) {
+ if (i != map_.end())
+ {
return i->second;
}
// Did not find the given color; return its RGB tuple representation:
return "#" + OUString::number(color, 16);
}
-struct theColorNameMap: public rtl::Static< ColorNameMap, theColorNameMap > {};
-
-}
-
-namespace accessibility {
-
-OUString lookUpColorName(tools::Long color) {
- return theColorNameMap::get().lookUp(color);
+struct theColorNameMap : public rtl::Static<ColorNameMap, theColorNameMap>
+{
+};
}
+namespace accessibility
+{
+OUString lookUpColorName(tools::Long color) { return theColorNameMap::get().lookUp(color); }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/accessibility/lookupcolorname.hxx b/svx/source/accessibility/lookupcolorname.hxx
index f6e4c9234d38..2dc31ff92b2e 100644
--- a/svx/source/accessibility/lookupcolorname.hxx
+++ b/svx/source/accessibility/lookupcolorname.hxx
@@ -24,8 +24,8 @@
#include <rtl/ustring.hxx>
-namespace accessibility {
-
+namespace accessibility
+{
/** This is a color name lookup targeted to be used by the accessibility
<type>DescriptionGenerator</type> class. It encapsulates a
<type>com.sun.star.drawing.ColorTable</type> and provides an inverse look
@@ -49,7 +49,6 @@ namespace accessibility {
digits for each color component.
*/
OUString lookUpColorName(tools::Long color);
-
}
#endif
diff --git a/svx/source/dialog/SvxNumOptionsTabPageHelper.cxx b/svx/source/dialog/SvxNumOptionsTabPageHelper.cxx
index 5eb062b176e9..7c6e010e9c2f 100644
--- a/svx/source/dialog/SvxNumOptionsTabPageHelper.cxx
+++ b/svx/source/dialog/SvxNumOptionsTabPageHelper.cxx
@@ -30,7 +30,7 @@ using namespace css::style;
Reference<XDefaultNumberingProvider> SvxNumOptionsTabPageHelper::GetNumberingProvider()
{
- Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
+ Reference<XComponentContext> xContext(::comphelper::getProcessComponentContext());
Reference<XDefaultNumberingProvider> xRet = text::DefaultNumberingProvider::create(xContext);
return xRet;
}
@@ -44,19 +44,19 @@ void SvxNumOptionsTabPageHelper::GetI18nNumbering(weld::ComboBox& rFmtLB, sal_uI
// the i18n framework per configuration must be removed from the listbox.
// Do not remove a special entry matching nDoNotRemove.
const sal_uInt16 nDontRemove = SAL_MAX_UINT16;
- ::std::vector< sal_uInt16> aRemove( rFmtLB.get_count(), nDontRemove);
- for (size_t i=0; i<aRemove.size(); ++i)
+ ::std::vector<sal_uInt16> aRemove(rFmtLB.get_count(), nDontRemove);
+ for (size_t i = 0; i < aRemove.size(); ++i)
{
sal_uInt16 nEntryData = rFmtLB.get_id(i).toInt32();
if (nEntryData > NumberingType::CHARS_LOWER_LETTER_N && nEntryData != nDoNotRemove)
aRemove[i] = nEntryData;
}
- if(xInfo.is())
+ if (xInfo.is())
{
- Sequence<sal_Int16> aTypes = xInfo->getSupportedNumberingTypes( );
- for(const sal_Int16 nCurrent : aTypes)
+ Sequence<sal_Int16> aTypes = xInfo->getSupportedNumberingTypes();
+ for (const sal_Int16 nCurrent : aTypes)
{
- if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N)
+ if (nCurrent > NumberingType::CHARS_LOWER_LETTER_N)
{
bool bInsert = true;
for (int nEntry = 0; nEntry < rFmtLB.get_count(); ++nEntry)
@@ -69,9 +69,9 @@ void SvxNumOptionsTabPageHelper::GetI18nNumbering(weld::ComboBox& rFmtLB, sal_uI
break;
}
}
- if(bInsert)
+ if (bInsert)
{
- OUString aIdent = xInfo->getNumberingIdentifier( nCurrent );
+ OUString aIdent = xInfo->getNumberingIdentifier(nCurrent);
rFmtLB.append(OUString::number(nCurrent), aIdent);
}
}
diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx
index cba8fbcc9e03..4e4389bd8463 100644
--- a/svx/source/dialog/dialmgr.cxx
+++ b/svx/source/dialog/dialmgr.cxx
@@ -20,14 +20,8 @@
#include <unotools/resmgr.hxx>
#include <svx/dialmgr.hxx>
-std::locale SvxResLocale()
-{
- return Translate::Create("svx");
-}
+std::locale SvxResLocale() { return Translate::Create("svx"); }
-OUString SvxResId(const char* pId)
-{
- return Translate::get(pId, SvxResLocale());
-}
+OUString SvxResId(const char* pId) { return Translate::get(pId, SvxResLocale()); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/dlgunit.hxx b/svx/source/dialog/dlgunit.hxx
index 7d9a98ac5a9a..bb8ac83d28d5 100644
--- a/svx/source/dialog/dlgunit.hxx
+++ b/svx/source/dialog/dlgunit.hxx
@@ -24,17 +24,18 @@
#include <svx/svdtrans.hxx>
#include <vcl/fieldvalues.hxx>
-inline OUString GetUnitString( tools::Long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep )
+inline OUString GetUnitString(tools::Long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep)
{
- OUStringBuffer aVal = OUString::number(
- vcl::ConvertValue(nVal_100, 2, MapUnit::Map100thMM, eFieldUnit));
+ OUStringBuffer aVal
+ = OUString::number(vcl::ConvertValue(nVal_100, 2, MapUnit::Map100thMM, eFieldUnit));
- while( aVal.getLength() < 3 )
- aVal.insert( 0, "0" );
+ while (aVal.getLength() < 3)
+ aVal.insert(0, "0");
- aVal.insert( aVal.getLength() - 2, cSep );
+ aVal.insert(aVal.getLength() - 2, cSep);
OUString aSuffix = SdrFormatter::GetUnitStr(eFieldUnit);
- if (eFieldUnit != FieldUnit::NONE && eFieldUnit != FieldUnit::DEGREE && eFieldUnit != FieldUnit::INCH)
+ if (eFieldUnit != FieldUnit::NONE && eFieldUnit != FieldUnit::DEGREE
+ && eFieldUnit != FieldUnit::INCH)
aVal.append(" ");
if (eFieldUnit == FieldUnit::INCH)
{
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index 0bad56b64454..c3fbee97ef3c 100644
--- a/svx/source/dialog/measctrl.cxx
+++ b/svx/source/dialog/measctrl.cxx
@@ -71,9 +71,7 @@ void SvxXMeasurePreview::Resize()
Invalidate();
}
-SvxXMeasurePreview::~SvxXMeasurePreview()
-{
-}
+SvxXMeasurePreview::~SvxXMeasurePreview() {}
void SvxXMeasurePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
@@ -99,9 +97,9 @@ void SvxXMeasurePreview::SetAttributes(const SfxItemSet& rInAttrs)
bool SvxXMeasurePreview::MouseButtonDown(const MouseEvent& rMEvt)
{
- bool bZoomIn = rMEvt.IsLeft() && !rMEvt.IsShift();
+ bool bZoomIn = rMEvt.IsLeft() && !rMEvt.IsShift();
bool bZoomOut = rMEvt.IsRight() || rMEvt.IsShift();
- bool bCtrl = rMEvt.IsMod1();
+ bool bCtrl = rMEvt.IsMod1();
if (bZoomIn || bZoomOut)
{
@@ -127,8 +125,8 @@ bool SvxXMeasurePreview::MouseButtonDown(const MouseEvent& rMEvt)
aXFrac *= *pMultFrac;
aYFrac *= *pMultFrac;
- if (double(aXFrac) > 0.001 && double(aXFrac) < 1000.0 &&
- double(aYFrac) > 0.001 && double(aYFrac) < 1000.0)
+ if (double(aXFrac) > 0.001 && double(aXFrac) < 1000.0 && double(aYFrac) > 0.001
+ && double(aYFrac) < 1000.0)
{
m_aMapMode.SetScaleX(aXFrac);
m_aMapMode.SetScaleY(aYFrac);
@@ -140,10 +138,14 @@ bool SvxXMeasurePreview::MouseButtonDown(const MouseEvent& rMEvt)
rRefDevice.Pop();
Point aPt(m_aMapMode.GetOrigin());
- tools::Long nX = tools::Long((double(aOutSize.Width()) - (double(aOutSize.Width()) * double(*pMultFrac))) / 2.0 + 0.5);
- tools::Long nY = tools::Long((double(aOutSize.Height()) - (double(aOutSize.Height()) * double(*pMultFrac))) / 2.0 + 0.5);
- aPt.AdjustX(nX );
- aPt.AdjustY(nY );
+ tools::Long nX = tools::Long(
+ (double(aOutSize.Width()) - (double(aOutSize.Width()) * double(*pMultFrac))) / 2.0
+ + 0.5);
+ tools::Long nY = tools::Long(
+ (double(aOutSize.Height()) - (double(aOutSize.Height()) * double(*pMultFrac))) / 2.0
+ + 0.5);
+ aPt.AdjustX(nX);
+ aPt.AdjustY(nY);
m_aMapMode.SetOrigin(aPt);
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index a2769bb6f09b..361a5828a2d3 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -57,7 +57,6 @@ SFX_IMPL_CHILDWINDOW(SvxRubyChildWindow, SID_RUBY_DIALOG);
namespace
{
-
const char cRubyBaseText[] = "RubyBaseText";
const char cRubyText[] = "RubyText";
const char cRubyAdjust[] = "RubyAdjust";
@@ -66,7 +65,8 @@ const char cRubyCharStyleName[] = "RubyCharStyleName";
} // end anonymous namespace
-SvxRubyChildWindow::SvxRubyChildWindow(vcl::Window* _pParent, sal_uInt16 nId,SfxBindings* pBindings, SfxChildWinInfo const * pInfo)
+SvxRubyChildWindow::SvxRubyChildWindow(vcl::Window* _pParent, sal_uInt16 nId,
+ SfxBindings* pBindings, SfxChildWinInfo const* pInfo)
: SfxChildWindow(_pParent, nId)
{
auto xDlg = std::make_shared<SvxRubyDialog>(pBindings, this, _pParent->GetFrameWeld());
@@ -74,10 +74,7 @@ SvxRubyChildWindow::SvxRubyChildWindow(vcl::Window* _pParent, sal_uInt16 nId,Sfx
xDlg->Initialize(pInfo);
}
-SfxChildWinInfo SvxRubyChildWindow::GetInfo() const
-{
- return SfxChildWindow::GetInfo();
-}
+SfxChildWinInfo SvxRubyChildWindow::GetInfo() const { return SfxChildWindow::GetInfo(); }
class SvxRubyData_Impl : public cppu::WeakImplHelper<css::view::XSelectionChangeListener>
{
@@ -92,7 +89,7 @@ public:
virtual ~SvxRubyData_Impl() override;
void SetController(const Reference<XController>& xCtrl);
- Reference<XModel> const & GetModel()
+ Reference<XModel> const& GetModel()
{
if (!xController.is())
xModel = nullptr;
@@ -100,11 +97,8 @@ public:
xModel = xController->getModel();
return xModel;
}
- bool HasSelectionChanged() const
- {
- return bHasSelectionChanged;
- }
- Reference<XRubySelection> const & GetRubySelection()
+ bool HasSelectionChanged() const { return bHasSelectionChanged; }
+ Reference<XRubySelection> const& GetRubySelection()
{
xSelection.set(xController, UNO_QUERY);
return xSelection;
@@ -117,15 +111,11 @@ public:
aRubyValues = xSelection->getRubyList(false);
bHasSelectionChanged = false;
}
- Sequence<PropertyValues>& GetRubyValues()
- {
- return aRubyValues;
- }
+ Sequence<PropertyValues>& GetRubyValues() { return aRubyValues; }
void AssertOneEntry();
virtual void SAL_CALL selectionChanged(const css::lang::EventObject& aEvent) override;
- virtual void SAL_CALL disposing( const css::lang::EventObject& Source) override;
-
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
};
SvxRubyData_Impl::SvxRubyData_Impl()
@@ -133,9 +123,7 @@ SvxRubyData_Impl::SvxRubyData_Impl()
{
}
-SvxRubyData_Impl::~SvxRubyData_Impl()
-{
-}
+SvxRubyData_Impl::~SvxRubyData_Impl() {}
void SvxRubyData_Impl::SetController(const Reference<XController>& xCtrl)
{
@@ -159,10 +147,7 @@ void SvxRubyData_Impl::SetController(const Reference<XController>& xCtrl)
}
}
-void SvxRubyData_Impl::selectionChanged(const EventObject& )
-{
- bHasSelectionChanged = true;
-}
+void SvxRubyData_Impl::selectionChanged(const EventObject&) { bHasSelectionChanged = true; }
void SvxRubyData_Impl::disposing(const EventObject&)
{
@@ -196,13 +181,13 @@ void SvxRubyData_Impl::AssertOneEntry()
}
SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, weld::Window* pParent)
- : SfxModelessDialogController(pBind, pCW, pParent,
- "svx/ui/asianphoneticguidedialog.ui", "AsianPhoneticGuideDialog")
+ : SfxModelessDialogController(pBind, pCW, pParent, "svx/ui/asianphoneticguidedialog.ui",
+ "AsianPhoneticGuideDialog")
, nLastPos(0)
, nCurrentEdit(0)
, bModified(false)
, pBindings(pBind)
- , m_pImpl( new SvxRubyData_Impl )
+ , m_pImpl(new SvxRubyData_Impl)
, m_xLeftFT(m_xBuilder->weld_label("basetextft"))
, m_xRightFT(m_xBuilder->weld_label("rubytextft"))
, m_xLeft1ED(m_xBuilder->weld_entry("Left1ED"))
@@ -231,10 +216,14 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, weld::Wind
m_xScrolledWindow->set_size_request(-1, m_xGrid->get_preferred_size().Height());
m_xScrolledWindow->set_vpolicy(VclPolicyType::NEVER);
- aEditArr[0] = m_xLeft1ED.get(); aEditArr[1] = m_xRight1ED.get();
- aEditArr[2] = m_xLeft2ED.get(); aEditArr[3] = m_xRight2ED.get();
- aEditArr[4] = m_xLeft3ED.get(); aEditArr[5] = m_xRight3ED.get();
- aEditArr[6] = m_xLeft4ED.get(); aEditArr[7] = m_xRight4ED.get();
+ aEditArr[0] = m_xLeft1ED.get();
+ aEditArr[1] = m_xRight1ED.get();
+ aEditArr[2] = m_xLeft2ED.get();
+ aEditArr[3] = m_xRight2ED.get();
+ aEditArr[4] = m_xLeft3ED.get();
+ aEditArr[5] = m_xRight3ED.get();
+ aEditArr[6] = m_xLeft4ED.get();
+ aEditArr[7] = m_xRight4ED.get();
m_xApplyPB->connect_clicked(LINK(this, SvxRubyDialog, ApplyHdl_Impl));
m_xClosePB->connect_clicked(LINK(this, SvxRubyDialog, CloseHdl_Impl));
@@ -246,10 +235,10 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, weld::Wind
Link<weld::ScrolledWindow&, void> aScrLk(LINK(this, SvxRubyDialog, ScrollHdl_Impl));
m_xScrolledWindow->connect_vadjustment_changed(aScrLk);
- Link<weld::Entry&,void> aEditLk(LINK(this, SvxRubyDialog, EditModifyHdl_Impl));
- Link<weld::Widget&,void> aFocusLk(LINK(this, SvxRubyDialog, EditFocusHdl_Impl));
- Link<const KeyEvent&,bool> aKeyUpDownLk(LINK(this, SvxRubyDialog, KeyUpDownHdl_Impl));
- Link<const KeyEvent&,bool> aKeyTabUpDownLk(LINK(this, SvxRubyDialog, KeyUpDownTabHdl_Impl));
+ Link<weld::Entry&, void> aEditLk(LINK(this, SvxRubyDialog, EditModifyHdl_Impl));
+ Link<weld::Widget&, void> aFocusLk(LINK(this, SvxRubyDialog, EditFocusHdl_Impl));
+ Link<const KeyEvent&, bool> aKeyUpDownLk(LINK(this, SvxRubyDialog, KeyUpDownHdl_Impl));
+ Link<const KeyEvent&, bool> aKeyTabUpDownLk(LINK(this, SvxRubyDialog, KeyUpDownTabHdl_Impl));
for (sal_uInt16 i = 0; i < 8; i++)
{
aEditArr[i]->connect_changed(aEditLk);
@@ -268,10 +257,7 @@ SvxRubyDialog::~SvxRubyDialog()
m_pImpl->disposing(aEvent);
}
-void SvxRubyDialog::ClearCharStyleList()
-{
- m_xCharStyleLB->clear();
-}
+void SvxRubyDialog::ClearCharStyleList() { m_xCharStyleLB->clear(); }
void SvxRubyDialog::Close()
{
@@ -287,17 +273,17 @@ void SvxRubyDialog::Activate()
SfxModelessDialogController::Activate();
//get selection from current view frame
SfxViewFrame* pCurFrm = SfxViewFrame::Current();
- Reference< XController > xCtrl = pCurFrm->GetFrame().GetController();
+ Reference<XController> xCtrl = pCurFrm->GetFrame().GetController();
m_pImpl->SetController(xCtrl);
if (!m_pImpl->HasSelectionChanged())
return;
- Reference< XRubySelection > xRubySel = m_pImpl->GetRubySelection();
+ Reference<XRubySelection> xRubySel = m_pImpl->GetRubySelection();
m_pImpl->UpdateRubyValues();
EnableControls(xRubySel.is());
if (xRubySel.is())
{
- Reference< XModel > xModel = m_pImpl->GetModel();
+ Reference<XModel> xModel = m_pImpl->GetModel();
const OUString sCharStyleSelect = m_xCharStyleLB->get_active_text();
ClearCharStyleList();
Reference<XStyleFamiliesSupplier> xSupplier(xModel, UNO_QUERY);
@@ -338,7 +324,6 @@ void SvxRubyDialog::Activate()
if (!sName.isEmpty())
{
m_xCharStyleLB->append(sCoreName, sName);
-
}
}
}
@@ -388,17 +373,17 @@ void SvxRubyDialog::SetRubyText(sal_Int32 nPos, weld::Entry& rLeft, weld::Entry&
void SvxRubyDialog::GetRubyText()
{
tools::Long nTempLastPos = GetLastPos();
- for (int i = 0; i < 8; i+=2)
+ for (int i = 0; i < 8; i += 2)
{
- if (aEditArr[i]->get_sensitive() &&
- (aEditArr[i]->get_value_changed_from_saved() ||
- aEditArr[i + 1]->get_value_changed_from_saved()))
+ if (aEditArr[i]->get_sensitive()
+ && (aEditArr[i]->get_value_changed_from_saved()
+ || aEditArr[i + 1]->get_value_changed_from_saved()))
{
Sequence<PropertyValues>& aRubyValues = m_pImpl->GetRubyValues();
- DBG_ASSERT(aRubyValues.getLength() > (i / 2 + nTempLastPos), "wrong index" );
+ DBG_ASSERT(aRubyValues.getLength() > (i / 2 + nTempLastPos), "wrong index");
SetModified(true);
Sequence<PropertyValue>& rProps = aRubyValues.getArray()[i / 2 + nTempLastPos];
- for (PropertyValue & propVal : rProps)
+ for (PropertyValue& propVal : rProps)
{
if (propVal.Name == cRubyBaseText)
propVal.Value <<= aEditArr[i]->get_text();
@@ -427,7 +412,7 @@ void SvxRubyDialog::Update()
bool bCharStyleEqual = true;
for (sal_Int32 nRuby = 0; nRuby < nLen; nRuby++)
{
- const Sequence<PropertyValue> &rProps = aRubyValues.getConstArray()[nRuby];
+ const Sequence<PropertyValue>& rProps = aRubyValues.getConstArray()[nRuby];
for (const PropertyValue& rProp : rProps)
{
if (nAdjust > -2 && rProp.Name == cRubyAdjust)
@@ -436,16 +421,16 @@ void SvxRubyDialog::Update()
rProp.Value >>= nTmp;
if (!nRuby)
nAdjust = nTmp;
- else if(nAdjust != nTmp)
+ else if (nAdjust != nTmp)
nAdjust = -2;
}
- if (nPosition > -2 && rProp.Name == cRubyPosition )
+ if (nPosition > -2 && rProp.Name == cRubyPosition)
{
sal_Int16 nTmp = sal_Int16();
rProp.Value >>= nTmp;
if (!nRuby)
nPosition = nTmp;
- else if(nPosition != nTmp)
+ else if (nPosition != nTmp)
nPosition = -2;
}
if (bCharStyleEqual && rProp.Name == cRubyCharStyleName)
@@ -539,16 +524,14 @@ IMPL_LINK_NOARG(SvxRubyDialog, ApplyHdl_Impl, weld::Button&, void)
}
}
-IMPL_LINK_NOARG(SvxRubyDialog, CloseHdl_Impl, weld::Button&, void)
-{
- Close();
-}
+IMPL_LINK_NOARG(SvxRubyDialog, CloseHdl_Impl, weld::Button&, void) { Close(); }
IMPL_LINK_NOARG(SvxRubyDialog, StylistHdl_Impl, weld::Button&, void)
{
std::unique_ptr<SfxPoolItem> pState;
SfxItemState eState = pBindings->QueryState(SID_STYLE_DESIGNER, pState);
- if (eState <= SfxItemState::SET || !pState || !static_cast<SfxBoolItem*>(pState.get())->GetValue())
+ if (eState <= SfxItemState::SET || !pState
+ || !static_cast<SfxBoolItem*>(pState.get())->GetValue())
{
pBindings->GetDispatcher()->Execute(SID_STYLE_DESIGNER,
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
@@ -560,9 +543,9 @@ IMPL_LINK(SvxRubyDialog, AdjustHdl_Impl, weld::ComboBox&, rBox, void)
AssertOneEntry();
sal_Int16 nAdjust = rBox.get_active();
Sequence<PropertyValues>& aRubyValues = m_pImpl->GetRubyValues();
- for (PropertyValues & rProps : aRubyValues)
+ for (PropertyValues& rProps : aRubyValues)
{
- for (PropertyValue & propVal : rProps)
+ for (PropertyValue& propVal : rProps)
{
if (propVal.Name == cRubyAdjust)
propVal.Value <<= nAdjust;
@@ -577,9 +560,9 @@ IMPL_LINK(SvxRubyDialog, PositionHdl_Impl, weld::ComboBox&, rBox, void)
AssertOneEntry();
sal_Int16 nPosition = rBox.get_active();
Sequence<PropertyValues>& aRubyValues = m_pImpl->GetRubyValues();
- for (PropertyValues & rProps : aRubyValues)
+ for (PropertyValues& rProps : aRubyValues)
{
- for (PropertyValue & propVal : rProps)
+ for (PropertyValue& propVal : rProps)
{
if (propVal.Name == cRubyPosition)
propVal.Value <<= nPosition;
@@ -596,9 +579,9 @@ IMPL_LINK_NOARG(SvxRubyDialog, CharStyleHdl_Impl, weld::ComboBox&, void)
if (m_xCharStyleLB->get_active() != -1)
sStyleName = m_xCharStyleLB->get_active_id();
Sequence<PropertyValues>& aRubyValues = m_pImpl->GetRubyValues();
- for (PropertyValues & rProps : aRubyValues)
+ for (PropertyValues& rProps : aRubyValues)
{
- for (PropertyValue & propVal : rProps)
+ for (PropertyValue& propVal : rProps)
{
if (propVal.Name == cRubyCharStyleName)
{
@@ -631,18 +614,21 @@ bool SvxRubyDialog::EditScrollHdl_Impl(sal_Int32 nParam)
{
bool bRet = false;
//scroll forward
- if (nParam > 0 && (aEditArr[7]->has_focus() || aEditArr[6]->has_focus() ))
+ if (nParam > 0 && (aEditArr[7]->has_focus() || aEditArr[6]->has_focus()))
{
- if (m_xScrolledWindow->vadjustment_get_upper() >
- m_xScrolledWindow->vadjustment_get_value() + m_xScrolledWindow->vadjustment_get_page_size())
+ if (m_xScrolledWindow->vadjustment_get_upper()
+ > m_xScrolledWindow->vadjustment_get_value()
+ + m_xScrolledWindow->vadjustment_get_page_size())
{
- m_xScrolledWindow->vadjustment_set_value(m_xScrolledWindow->vadjustment_get_value() + 1);
+ m_xScrolledWindow->vadjustment_set_value(m_xScrolledWindow->vadjustment_get_value()
+ + 1);
aEditArr[6]->grab_focus();
bRet = true;
}
}
//scroll backward
- else if (m_xScrolledWindow->vadjustment_get_value() && (aEditArr[0]->has_focus()||aEditArr[1]->has_focus()) )
+ else if (m_xScrolledWindow->vadjustment_get_value()
+ && (aEditArr[0]->has_focus() || aEditArr[1]->has_focus()))
{
m_xScrolledWindow->vadjustment_set_value(m_xScrolledWindow->vadjustment_get_value() - 1);
aEditArr[1]->grab_focus();
@@ -659,7 +645,7 @@ bool SvxRubyDialog::EditJumpHdl_Impl(sal_Int32 nParam)
sal_uInt16 nIndex = USHRT_MAX;
for (sal_uInt16 i = 0; i < 8; i++)
{
- if(aEditArr[i]->has_focus())
+ if (aEditArr[i]->has_focus())
nIndex = i;
}
if (nIndex < 8)
@@ -668,14 +654,14 @@ bool SvxRubyDialog::EditJumpHdl_Impl(sal_Int32 nParam)
{
if (nIndex < 6)
aEditArr[nIndex + 2]->grab_focus();
- else if( EditScrollHdl_Impl(nParam))
+ else if (EditScrollHdl_Impl(nParam))
aEditArr[nIndex]->grab_focus();
}
else
{
if (nIndex > 1)
aEditArr[nIndex - 2]->grab_focus();
- else if( EditScrollHdl_Impl(nParam))
+ else if (EditScrollHdl_Impl(nParam))
aEditArr[nIndex]->grab_focus();
}
bHandled = true;
@@ -683,10 +669,7 @@ bool SvxRubyDialog::EditJumpHdl_Impl(sal_Int32 nParam)
return bHandled;
}
-void SvxRubyDialog::AssertOneEntry()
-{
- m_pImpl->AssertOneEntry();
-}
+void SvxRubyDialog::AssertOneEntry() { m_pImpl->AssertOneEntry(); }
void SvxRubyDialog::EnableControls(bool bEnable)
{
@@ -699,9 +682,7 @@ RubyPreview::RubyPreview()
{
}
-RubyPreview::~RubyPreview()
-{
-}
+RubyPreview::~RubyPreview() {}
void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
{
@@ -749,7 +730,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
bool bRubyStretch = nBaseWidth >= nRubyWidth;
tools::Long nCenter = aWinSize.Width() / 2;
- tools::Long nHalfWidth = std::max( nBaseWidth, nRubyWidth ) /2;
+ tools::Long nHalfWidth = std::max(nBaseWidth, nRubyWidth) / 2;
tools::Long nLeftStart = nCenter - nHalfWidth;
tools::Long nRightEnd = nCenter + nHalfWidth;
@@ -758,17 +739,17 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
tools::Long nYBase = aWinSize.Height() * 3 / 4 - nTextHeight / 2;
sal_Int16 nRubyPos = m_pParentDlg->m_xPositionLB->get_active();
- if ( nRubyPos == 1 ) // BOTTOM
+ if (nRubyPos == 1) // BOTTOM
{
tools::Long nTmp = nYRuby;
nYRuby = nYBase;
nYBase = nTmp;
}
- else if ( nRubyPos == 2 ) // RIGHT ( vertically )
+ else if (nRubyPos == 2) // RIGHT ( vertically )
{
// Align the ruby text and base text to the vertical center.
- nYBase = ( aWinSize.Height() - nTextHeight ) / 2;
- nYRuby = ( aWinSize.Height() - nRubyWidth ) / 2;
+ nYBase = (aWinSize.Height() - nTextHeight) / 2;
+ nYRuby = (aWinSize.Height() - nRubyWidth) / 2;
// Align the ruby text at the right side of the base text
nAdjust = RubyAdjust_RIGHT;
@@ -788,7 +769,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
if (bRubyStretch)
{
- rRenderContext.DrawText(Point(nLeftStart , nYBase), sBaseText);
+ rRenderContext.DrawText(Point(nLeftStart, nYBase), sBaseText);
nYOutput = nYRuby;
sOutputText = sRubyText;
nOutTextWidth = nRubyWidth;
@@ -797,7 +778,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
else
{
rRenderContext.SetFont(aRubyFont);
- rRenderContext.DrawText(Point(nLeftStart , nYRuby), sRubyText);
+ rRenderContext.DrawText(Point(nLeftStart, nYRuby), sRubyText);
nYOutput = nYBase;
sOutputText = sBaseText;
nOutTextWidth = nBaseWidth;
@@ -807,11 +788,11 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
switch (nAdjust)
{
case RubyAdjust_LEFT:
- rRenderContext.DrawText(Point(nLeftStart , nYOutput), sOutputText);
- break;
+ rRenderContext.DrawText(Point(nLeftStart, nYOutput), sOutputText);
+ break;
case RubyAdjust_RIGHT:
rRenderContext.DrawText(Point(nRightEnd - nOutTextWidth, nYOutput), sOutputText);
- break;
+ break;
case RubyAdjust_INDENT_BLOCK:
{
tools::Long nCharWidth = rRenderContext.GetTextWidth("X");
@@ -828,11 +809,13 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
if (sOutputText.getLength() > 1)
{
sal_Int32 nCount = sOutputText.getLength();
- tools::Long nSpace = ((nRightEnd - nLeftStart) - rRenderContext.GetTextWidth(sOutputText)) / (nCount - 1);
+ tools::Long nSpace
+ = ((nRightEnd - nLeftStart) - rRenderContext.GetTextWidth(sOutputText))
+ / (nCount - 1);
for (sal_Int32 i = 0; i < nCount; i++)
{
OUString sChar(sOutputText[i]);
- rRenderContext.DrawText(Point(nLeftStart , nYOutput), sChar);
+ rRenderContext.DrawText(Point(nLeftStart, nYOutput), sChar);
tools::Long nCharWidth = rRenderContext.GetTextWidth(sChar);
nLeftStart += nCharWidth + nSpace;
}
@@ -841,9 +824,10 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
[[fallthrough]];
}
case RubyAdjust_CENTER:
- rRenderContext.DrawText(Point(nCenter - nOutTextWidth / 2 , nYOutput), sOutputText);
- break;
- default: break;
+ rRenderContext.DrawText(Point(nCenter - nOutTextWidth / 2, nYOutput), sOutputText);
+ break;
+ default:
+ break;
}
rRenderContext.Pop();
}
diff --git a/svx/source/dialog/srchctrl.hxx b/svx/source/dialog/srchctrl.hxx
index 96fe59b66e22..ec220a52fb8f 100644
--- a/svx/source/dialog/srchctrl.hxx
+++ b/svx/source/dialog/srchctrl.hxx
@@ -24,16 +24,15 @@ class SvxSearchDialog;
class SvxSearchController : public SfxControllerItem
{
- SvxSearchDialog& rSrchDlg;
+ SvxSearchDialog& rSrchDlg;
protected:
- virtual void StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState ) override;
+ virtual void StateChanged(sal_uInt16, SfxItemState, const SfxPoolItem* pState) override;
public:
- SvxSearchController( sal_uInt16 nId, SfxBindings& rBnd, SvxSearchDialog& rDlg );
+ SvxSearchController(sal_uInt16 nId, SfxBindings& rBnd, SvxSearchDialog& rDlg);
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/strarray.cxx b/svx/source/dialog/strarray.cxx
index 2742c3f9584e..33564245230f 100644
--- a/svx/source/dialog/strarray.cxx
+++ b/svx/source/dialog/strarray.cxx
@@ -24,10 +24,7 @@
#include <fieldunit.hrc>
#include <numberingtype.hrc>
-sal_uInt32 SvxFieldUnitTable::Count()
-{
- return SAL_N_ELEMENTS(RID_SVXSTR_FIELDUNIT_TABLE);
-}
+sal_uInt32 SvxFieldUnitTable::Count() { return SAL_N_ELEMENTS(RID_SVXSTR_FIELDUNIT_TABLE); }
OUString SvxFieldUnitTable::GetString(sal_uInt32 nPos)
{
@@ -50,10 +47,7 @@ OUString SvxAttrNameTable::GetString(sal_uInt32 nPos)
return OUString();
}
-sal_uInt32 SvxAttrNameTable::Count()
-{
- return SAL_N_ELEMENTS(RID_ATTR_NAMES);
-}
+sal_uInt32 SvxAttrNameTable::Count() { return SAL_N_ELEMENTS(RID_ATTR_NAMES); }
sal_uInt32 SvxAttrNameTable::FindIndex(int nValue)
{
@@ -72,10 +66,7 @@ OUString SvxNumberingTypeTable::GetString(sal_uInt32 nPos)
return OUString();
}
-sal_uInt32 SvxNumberingTypeTable::Count()
-{
- return SAL_N_ELEMENTS(RID_SVXSTRARY_NUMBERINGTYPE);
-}
+sal_uInt32 SvxNumberingTypeTable::Count() { return SAL_N_ELEMENTS(RID_SVXSTRARY_NUMBERINGTYPE); }
int SvxNumberingTypeTable::GetValue(sal_uInt32 nPos)
{
@@ -94,5 +85,4 @@ sal_uInt32 SvxNumberingTypeTable::FindIndex(int nValue)
return RESARRAY_INDEX_NOTFOUND;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/svxdlg.cxx b/svx/source/dialog/svxdlg.cxx
index 152811ed867d..c073fb241f89 100644
--- a/svx/source/dialog/svxdlg.cxx
+++ b/svx/source/dialog/svxdlg.cxx
@@ -17,16 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <svx/svxdlg.hxx>
SvxAbstractDialogFactory* SvxAbstractDialogFactory::Create()
{
- return dynamic_cast< SvxAbstractDialogFactory* >( VclAbstractDialogFactory::Create() );
+ return dynamic_cast<SvxAbstractDialogFactory*>(VclAbstractDialogFactory::Create());
}
-SvxAbstractDialogFactory::~SvxAbstractDialogFactory()
-{
-}
+SvxAbstractDialogFactory::~SvxAbstractDialogFactory() {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/engine3d/camera3d.cxx b/svx/source/engine3d/camera3d.cxx
index abb7b39910f8..30a1b09fb36e 100644
--- a/svx/source/engine3d/camera3d.cxx
+++ b/svx/source/engine3d/camera3d.cxx
@@ -20,9 +20,9 @@
#include <svx/camera3d.hxx>
Camera3D::Camera3D(const basegfx::B3DPoint& rPos, const basegfx::B3DPoint& rLookAt,
- double fFocalLen) :
- fBankAngle(0),
- bAutoAdjustProjection(true)
+ double fFocalLen)
+ : fBankAngle(0)
+ , bAutoAdjustProjection(true)
{
SetPosition(rPos);
SetLookAt(rLookAt);
@@ -41,13 +41,13 @@ Camera3D::Camera3D()
void Camera3D::SetViewWindow(double fX, double fY, double fW, double fH)
{
Viewport3D::SetViewWindow(fX, fY, fW, fH);
- if ( bAutoAdjustProjection )
+ if (bAutoAdjustProjection)
SetFocalLength(fFocalLength);
}
void Camera3D::SetPosition(const basegfx::B3DPoint& rNewPos)
{
- if ( rNewPos != aPosition )
+ if (rNewPos != aPosition)
{
aPosition = rNewPos;
SetVRP(aPosition);
@@ -58,7 +58,7 @@ void Camera3D::SetPosition(const basegfx::B3DPoint& rNewPos)
void Camera3D::SetLookAt(const basegfx::B3DPoint& rNewLookAt)
{
- if ( rNewLookAt != aLookAt )
+ if (rNewLookAt != aLookAt)
{
aLookAt = rNewLookAt;
SetVPN(aPosition - aLookAt);
@@ -69,7 +69,7 @@ void Camera3D::SetLookAt(const basegfx::B3DPoint& rNewLookAt)
void Camera3D::SetPosAndLookAt(const basegfx::B3DPoint& rNewPos,
const basegfx::B3DPoint& rNewLookAt)
{
- if ( rNewPos != aPosition || rNewLookAt != aLookAt )
+ if (rNewPos != aPosition || rNewLookAt != aLookAt)
{
aPosition = rNewPos;
aLookAt = rNewLookAt;
@@ -86,15 +86,15 @@ void Camera3D::SetBankAngle(double fAngle)
basegfx::B3DVector aPrj(aDiff);
fBankAngle = fAngle;
- if ( aDiff.getY() == 0 )
+ if (aDiff.getY() == 0)
{
aPrj.setY(-1.0);
}
else
- { // aPrj = Projection from aDiff on the XZ-plane
+ { // aPrj = Projection from aDiff on the XZ-plane
aPrj.setY(0.0);
- if ( aDiff.getY() < 0.0 )
+ if (aDiff.getY() < 0.0)
{
aPrj = -aPrj;
}
@@ -110,7 +110,7 @@ void Camera3D::SetBankAngle(double fAngle)
basegfx::B3DHomMatrix aTf;
const double fV(sqrt(aDiff.getY() * aDiff.getY() + aDiff.getZ() * aDiff.getZ()));
- if ( fV != 0.0 )
+ if (fV != 0.0)
{
basegfx::B3DHomMatrix aTemp;
const double fSin(aDiff.getY() / fV);
@@ -152,7 +152,7 @@ void Camera3D::SetBankAngle(double fAngle)
aTf *= aTemp;
}
- if ( fV != 0.0 )
+ if (fV != 0.0)
{
basegfx::B3DHomMatrix aTemp;
const double fSin(-aDiff.getY() / fV);
@@ -171,7 +171,7 @@ void Camera3D::SetBankAngle(double fAngle)
void Camera3D::SetFocalLength(double fLen)
{
- if ( fLen < 5 )
+ if (fLen < 5)
fLen = 5;
SetPRP(basegfx::B3DPoint(0.0, 0.0, fLen / 35.0 * aViewWin.W));
fFocalLength = fLen;
diff --git a/svx/source/engine3d/deflt3d.cxx b/svx/source/engine3d/deflt3d.cxx
index 76589032bca6..89342e67601d 100644
--- a/svx/source/engine3d/deflt3d.cxx
+++ b/svx/source/engine3d/deflt3d.cxx
@@ -17,15 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <svx/deflt3d.hxx>
// Class to manage the 3D default attributes
-E3dDefaultAttributes::E3dDefaultAttributes()
-{
- Reset();
-}
+E3dDefaultAttributes::E3dDefaultAttributes() { Reset(); }
void E3dDefaultAttributes::Reset()
{
diff --git a/svx/source/engine3d/helperminimaldepth3d.hxx b/svx/source/engine3d/helperminimaldepth3d.hxx
index 15da40d099be..392ba49f64e6 100644
--- a/svx/source/engine3d/helperminimaldepth3d.hxx
+++ b/svx/source/engine3d/helperminimaldepth3d.hxx
@@ -20,12 +20,10 @@
#ifndef INCLUDED_SVX_SOURCE_ENGINE3D_HELPERMINIMALDEPTH3D_HXX
#define INCLUDED_SVX_SOURCE_ENGINE3D_HELPERMINIMALDEPTH3D_HXX
-
// predefines
class E3dCompoundObject;
-
/** support extracting the minimal depth of a 3d object in its scene
@param rObject
@@ -42,7 +40,6 @@ class E3dCompoundObject;
double getMinimalDepthInViewCoordinates(const E3dCompoundObject& rObject);
-
#endif // INCLUDED_SVX_SOURCE_ENGINE3D_HELPERMINIMALDEPTH3D_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/engine3d/polygn3d.cxx b/svx/source/engine3d/polygn3d.cxx
index 5d2d290b3821..2a14e7efdd2f 100644
--- a/svx/source/engine3d/polygn3d.cxx
+++ b/svx/source/engine3d/polygn3d.cxx
@@ -30,11 +30,9 @@ std::unique_ptr<sdr::contact::ViewContact> E3dPolygonObj::CreateObjectSpecificVi
return std::make_unique<sdr::contact::ViewContactOfE3dPolygon>(*this);
}
-E3dPolygonObj::E3dPolygonObj(
- SdrModel& rSdrModel,
- const basegfx::B3DPolyPolygon& rPolyPoly3D)
-: E3dCompoundObject(rSdrModel),
- bLineOnly(true)
+E3dPolygonObj::E3dPolygonObj(SdrModel& rSdrModel, const basegfx::B3DPolyPolygon& rPolyPoly3D)
+ : E3dCompoundObject(rSdrModel)
+ , bLineOnly(true)
{
// Set geometry
SetPolyPolygon3D(rPolyPoly3D);
@@ -47,8 +45,8 @@ E3dPolygonObj::E3dPolygonObj(
}
E3dPolygonObj::E3dPolygonObj(SdrModel& rSdrModel)
-: E3dCompoundObject(rSdrModel),
- bLineOnly(false)
+ : E3dCompoundObject(rSdrModel)
+ , bLineOnly(false)
{
// Create no geometry
}
@@ -58,7 +56,7 @@ void E3dPolygonObj::CreateDefaultNormals()
basegfx::B3DPolyPolygon aPolyNormals;
// Create a complete tools::PolyPolygon with the plane normal
- for(sal_uInt32 a(0); a < aPolyPoly3D.count(); a++)
+ for (sal_uInt32 a(0); a < aPolyPoly3D.count(); a++)
{
// Find source polygon
const basegfx::B3DPolygon aPolygon(aPolyPoly3D.getB3DPolygon(a));
@@ -70,7 +68,7 @@ void E3dPolygonObj::CreateDefaultNormals()
basegfx::B3DVector aNormal(-aPolygon.getNormal());
// Fill new polygon
- for(sal_uInt32 b(0); b < aPolygon.count(); b++)
+ for (sal_uInt32 b(0); b < aPolygon.count(); b++)
{
aNormals.append(aNormal);
}
@@ -89,7 +87,7 @@ void E3dPolygonObj::CreateDefaultTexture()
// Create a complete tools::PolyPolygon with the texture coordinates
// The texture coordinates extend over X,Y and Z
// on the whole extreme values in the range 0.0 .. 1.0
- for(sal_uInt32 a(0); a < aPolyPoly3D.count(); a++)
+ for (sal_uInt32 a(0); a < aPolyPoly3D.count(); a++)
{
// Find source polygon
const basegfx::B3DPolygon& aPolygon(aPolyPoly3D.getB3DPolygon(a));
@@ -107,9 +105,9 @@ void E3dPolygonObj::CreateDefaultTexture()
sal_uInt16 nSourceMode = 0;
// Determine the greatest degree of freedom
- if(aNormal.getX() <= aNormal.getY() || aNormal.getX() <= aNormal.getZ())
+ if (aNormal.getX() <= aNormal.getY() || aNormal.getX() <= aNormal.getZ())
{
- if(aNormal.getY() > aNormal.getZ())
+ if (aNormal.getY() > aNormal.getZ())
{
// Y is the largest, use X,Z as mapping
nSourceMode = 1;
@@ -125,31 +123,31 @@ void E3dPolygonObj::CreateDefaultTexture()
basegfx::B2DPolygon aTexture;
// Fill new polygon
- for(sal_uInt32 b(0); b < aPolygon.count(); b++)
+ for (sal_uInt32 b(0); b < aPolygon.count(); b++)
{
basegfx::B2DPoint aTex;
const basegfx::B3DPoint aCandidate(aPolygon.getB3DPoint(b));
- switch(nSourceMode)
+ switch (nSourceMode)
{
case 0: //Source is Y,Z
- if(aVolume.getHeight())
+ if (aVolume.getHeight())
aTex.setX((aCandidate.getY() - aVolume.getMinY()) / aVolume.getHeight());
- if(aVolume.getDepth())
+ if (aVolume.getDepth())
aTex.setY((aCandidate.getZ() - aVolume.getMinZ()) / aVolume.getDepth());
break;
case 1: // Source is X,Z
- if(aVolume.getWidth())
+ if (aVolume.getWidth())
aTex.setX((aCandidate.getX() - aVolume.getMinX()) / aVolume.getWidth());
- if(aVolume.getDepth())
+ if (aVolume.getDepth())
aTex.setY((aCandidate.getZ() - aVolume.getMinZ()) / aVolume.getDepth());
break;
case 2: // Source is X,Y
- if(aVolume.getWidth())
+ if (aVolume.getWidth())
aTex.setX((aCandidate.getX() - aVolume.getMinX()) / aVolume.getWidth());
- if(aVolume.getHeight())
+ if (aVolume.getHeight())
aTex.setY((aCandidate.getY() - aVolume.getMinY()) / aVolume.getHeight());
break;
}
@@ -165,18 +163,13 @@ void E3dPolygonObj::CreateDefaultTexture()
SetPolyTexture2D(aPolyTexture);
}
-E3dPolygonObj::~E3dPolygonObj()
-{
-}
+E3dPolygonObj::~E3dPolygonObj() {}
-SdrObjKind E3dPolygonObj::GetObjIdentifier() const
-{
- return E3D_POLYGONOBJ_ID;
-}
+SdrObjKind E3dPolygonObj::GetObjIdentifier() const { return E3D_POLYGONOBJ_ID; }
void E3dPolygonObj::SetPolyPolygon3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D)
{
- if ( aPolyPoly3D != rNewPolyPoly3D )
+ if (aPolyPoly3D != rNewPolyPoly3D)
{
// New PolyPolygon; copying
aPolyPoly3D = rNewPolyPoly3D;
@@ -188,7 +181,7 @@ void E3dPolygonObj::SetPolyPolygon3D(const basegfx::B3DPolyPolygon& rNewPolyPoly
void E3dPolygonObj::SetPolyNormals3D(const basegfx::B3DPolyPolygon& rNewPolyNormals3D)
{
- if ( aPolyNormals3D != rNewPolyNormals3D )
+ if (aPolyNormals3D != rNewPolyNormals3D)
{
// New PolyPolygon; copying
aPolyNormals3D = rNewPolyNormals3D;
@@ -200,7 +193,7 @@ void E3dPolygonObj::SetPolyNormals3D(const basegfx::B3DPolyPolygon& rNewPolyNorm
void E3dPolygonObj::SetPolyTexture2D(const basegfx::B2DPolyPolygon& rNewPolyTexture2D)
{
- if ( aPolyTexture2D != rNewPolyTexture2D )
+ if (aPolyTexture2D != rNewPolyTexture2D)
{
// New PolyPolygon; copying
aPolyTexture2D = rNewPolyTexture2D;
@@ -219,12 +212,12 @@ SdrObjectUniquePtr E3dPolygonObj::DoConvertToPolyObj(bool /*bBezier*/, bool /*bA
E3dPolygonObj* E3dPolygonObj::CloneSdrObject(SdrModel& rTargetModel) const
{
- return CloneHelper< E3dPolygonObj >(rTargetModel);
+ return CloneHelper<E3dPolygonObj>(rTargetModel);
}
E3dPolygonObj& E3dPolygonObj::operator=(const E3dPolygonObj& rObj)
{
- if( this == &rObj )
+ if (this == &rObj)
return *this;
E3dCompoundObject::operator=(rObj);
@@ -238,7 +231,7 @@ E3dPolygonObj& E3dPolygonObj::operator=(const E3dPolygonObj& rObj)
void E3dPolygonObj::SetLineOnly(bool bNew)
{
- if(bNew != bLineOnly)
+ if (bNew != bLineOnly)
{
bLineOnly = bNew;
ActionChanged();
diff --git a/svx/source/engine3d/svx3ditems.cxx b/svx/source/engine3d/svx3ditems.cxx
index 1468fb0ff5cb..68f31b1203e0 100644
--- a/svx/source/engine3d/svx3ditems.cxx
+++ b/svx/source/engine3d/svx3ditems.cxx
@@ -25,106 +25,117 @@
#include <com/sun/star/drawing/ProjectionMode.hpp>
#include <com/sun/star/drawing/ShadeMode.hpp>
-
using namespace ::com::sun::star;
// #i28528#
// Added extra Item (Bool) for chart2 to be able to show reduced line geometry
Svx3DReducedLineGeometryItem::Svx3DReducedLineGeometryItem(bool bVal)
-: SfxBoolItem(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY, bVal)
-{}
+ : SfxBoolItem(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY, bVal)
+{
+}
-Svx3DReducedLineGeometryItem* Svx3DReducedLineGeometryItem::Clone(SfxItemPool *) const
+Svx3DReducedLineGeometryItem* Svx3DReducedLineGeometryItem::Clone(SfxItemPool*) const
{
return new Svx3DReducedLineGeometryItem(*this);
}
Svx3DNormalsKindItem::Svx3DNormalsKindItem(sal_uInt16 nVal)
-: SfxUInt16Item(SDRATTR_3DOBJ_NORMALS_KIND, nVal)
-{}
+ : SfxUInt16Item(SDRATTR_3DOBJ_NORMALS_KIND, nVal)
+{
+}
Svx3DTextureProjectionXItem::Svx3DTextureProjectionXItem(sal_uInt16 nVal)
-: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_X, nVal)
-{}
+ : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_X, nVal)
+{
+}
Svx3DTextureProjectionYItem::Svx3DTextureProjectionYItem(sal_uInt16 nVal)
-: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_Y, nVal)
-{}
+ : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_Y, nVal)
+{
+}
Svx3DTextureKindItem::Svx3DTextureKindItem(sal_uInt16 nVal)
-: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_KIND, nVal)
-{}
+ : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_KIND, nVal)
+{
+}
Svx3DTextureModeItem::Svx3DTextureModeItem(sal_uInt16 nVal)
-: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_MODE, nVal)
-{}
+ : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_MODE, nVal)
+{
+}
Svx3DPerspectiveItem::Svx3DPerspectiveItem(ProjectionType nVal)
-: SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, static_cast<sal_uInt16>(nVal))
-{}
+ : SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, static_cast<sal_uInt16>(nVal))
+{
+}
Svx3DShadeModeItem::Svx3DShadeModeItem(sal_uInt16 nVal)
-: SfxUInt16Item(SDRATTR_3DSCENE_SHADE_MODE, nVal)
-{}
-
+ : SfxUInt16Item(SDRATTR_3DSCENE_SHADE_MODE, nVal)
+{
+}
Svx3DSmoothNormalsItem::Svx3DSmoothNormalsItem(bool bVal)
-: SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_NORMALS, bVal)
-{}
+ : SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_NORMALS, bVal)
+{
+}
-Svx3DSmoothNormalsItem* Svx3DSmoothNormalsItem::Clone(SfxItemPool *) const
+Svx3DSmoothNormalsItem* Svx3DSmoothNormalsItem::Clone(SfxItemPool*) const
{
return new Svx3DSmoothNormalsItem(*this);
}
Svx3DSmoothLidsItem::Svx3DSmoothLidsItem(bool bVal)
-: SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_LIDS, bVal)
-{}
+ : SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_LIDS, bVal)
+{
+}
-Svx3DSmoothLidsItem* Svx3DSmoothLidsItem::Clone(SfxItemPool *) const
+Svx3DSmoothLidsItem* Svx3DSmoothLidsItem::Clone(SfxItemPool*) const
{
return new Svx3DSmoothLidsItem(*this);
}
Svx3DCharacterModeItem::Svx3DCharacterModeItem(bool bVal)
-: SfxBoolItem(SDRATTR_3DOBJ_CHARACTER_MODE, bVal)
-{}
+ : SfxBoolItem(SDRATTR_3DOBJ_CHARACTER_MODE, bVal)
+{
+}
-Svx3DCharacterModeItem* Svx3DCharacterModeItem::Clone(SfxItemPool *) const
+Svx3DCharacterModeItem* Svx3DCharacterModeItem::Clone(SfxItemPool*) const
{
return new Svx3DCharacterModeItem(*this);
}
Svx3DCloseFrontItem::Svx3DCloseFrontItem(bool bVal)
-: SfxBoolItem(SDRATTR_3DOBJ_CLOSE_FRONT, bVal)
-{}
+ : SfxBoolItem(SDRATTR_3DOBJ_CLOSE_FRONT, bVal)
+{
+}
-Svx3DCloseFrontItem* Svx3DCloseFrontItem::Clone(SfxItemPool *) const
+Svx3DCloseFrontItem* Svx3DCloseFrontItem::Clone(SfxItemPool*) const
{
return new Svx3DCloseFrontItem(*this);
}
Svx3DCloseBackItem::Svx3DCloseBackItem(bool bVal)
-: SfxBoolItem(SDRATTR_3DOBJ_CLOSE_BACK, bVal)
-{}
+ : SfxBoolItem(SDRATTR_3DOBJ_CLOSE_BACK, bVal)
+{
+}
-Svx3DCloseBackItem* Svx3DCloseBackItem::Clone(SfxItemPool *) const
+Svx3DCloseBackItem* Svx3DCloseBackItem::Clone(SfxItemPool*) const
{
return new Svx3DCloseBackItem(*this);
}
// Svx3DNormalsKindItem: use drawing::NormalsKind
-bool Svx3DNormalsKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+bool Svx3DNormalsKindItem::QueryValue(uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= static_cast<drawing::NormalsKind>(GetValue());
return true;
}
-bool Svx3DNormalsKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+bool Svx3DNormalsKindItem::PutValue(const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
drawing::NormalsKind eVar;
- if(!(rVal >>= eVar))
+ if (!(rVal >>= eVar))
return false;
SetValue(static_cast<sal_Int16>(eVar));
return true;
@@ -136,16 +147,16 @@ Svx3DNormalsKindItem* Svx3DNormalsKindItem::Clone(SfxItemPool* /*pPool*/) const
}
// Svx3DTextureProjectionXItem: use drawing::TextureProjectionMode
-bool Svx3DTextureProjectionXItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+bool Svx3DTextureProjectionXItem::QueryValue(uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= static_cast<drawing::TextureProjectionMode>(GetValue());
return true;
}
-bool Svx3DTextureProjectionXItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+bool Svx3DTextureProjectionXItem::PutValue(const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
drawing::TextureProjectionMode eVar;
- if(!(rVal >>= eVar))
+ if (!(rVal >>= eVar))
return false;
SetValue(static_cast<sal_Int16>(eVar));
return true;
@@ -157,16 +168,16 @@ Svx3DTextureProjectionXItem* Svx3DTextureProjectionXItem::Clone(SfxItemPool* /*p
}
// Svx3DTextureProjectionYItem: use drawing::TextureProjectionMode
-bool Svx3DTextureProjectionYItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+bool Svx3DTextureProjectionYItem::QueryValue(uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= static_cast<drawing::TextureProjectionMode>(GetValue());
return true;
}
-bool Svx3DTextureProjectionYItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+bool Svx3DTextureProjectionYItem::PutValue(const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
drawing::TextureProjectionMode eVar;
- if(!(rVal >>= eVar))
+ if (!(rVal >>= eVar))
return false;
SetValue(static_cast<sal_Int16>(eVar));
return true;
@@ -178,16 +189,16 @@ Svx3DTextureProjectionYItem* Svx3DTextureProjectionYItem::Clone(SfxItemPool* /*p
}
// Svx3DTextureKindItem: use drawing::TextureKind
-bool Svx3DTextureKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+bool Svx3DTextureKindItem::QueryValue(uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= static_cast<drawing::TextureKind>(GetValue());
return true;
}
-bool Svx3DTextureKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+bool Svx3DTextureKindItem::PutValue(const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
drawing::TextureKind eVar;
- if(!(rVal >>= eVar))
+ if (!(rVal >>= eVar))
return false;
SetValue(static_cast<sal_Int16>(eVar));
return true;
@@ -199,16 +210,16 @@ Svx3DTextureKindItem* Svx3DTextureKindItem::Clone(SfxItemPool* /*pPool*/) const
}
// Svx3DTextureModeItem: use drawing:TextureMode
-bool Svx3DTextureModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+bool Svx3DTextureModeItem::QueryValue(uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= static_cast<drawing::TextureMode>(GetValue());
return true;
}
-bool Svx3DTextureModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+bool Svx3DTextureModeItem::PutValue(const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
drawing::TextureMode eVar;
- if(!(rVal >>= eVar))
+ if (!(rVal >>= eVar))
return false;
SetValue(static_cast<sal_Int16>(eVar));
return true;
@@ -220,16 +231,16 @@ Svx3DTextureModeItem* Svx3DTextureModeItem::Clone(SfxItemPool* /*pPool*/) const
}
// Svx3DPerspectiveItem: use drawing::ProjectionMode
-bool Svx3DPerspectiveItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+bool Svx3DPerspectiveItem::QueryValue(uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= static_cast<drawing::ProjectionMode>(GetValue());
return true;
}
-bool Svx3DPerspectiveItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+bool Svx3DPerspectiveItem::PutValue(const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
drawing::ProjectionMode eVar;
- if(!(rVal >>= eVar))
+ if (!(rVal >>= eVar))
return false;
SetValue(static_cast<sal_Int16>(eVar));
return true;
@@ -241,16 +252,16 @@ Svx3DPerspectiveItem* Svx3DPerspectiveItem::Clone(SfxItemPool* /*pPool*/) const
}
// Svx3DShadeModeItem: use drawing::ShadeMode
-bool Svx3DShadeModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+bool Svx3DShadeModeItem::QueryValue(uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= static_cast<drawing::ShadeMode>(GetValue());
return true;
}
-bool Svx3DShadeModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+bool Svx3DShadeModeItem::PutValue(const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
drawing::ShadeMode eVar;
- if(!(rVal >>= eVar))
+ if (!(rVal >>= eVar))
return false;
SetValue(static_cast<sal_Int16>(eVar));
return true;
diff --git a/svx/source/gallery2/codec.hxx b/svx/source/gallery2/codec.hxx
index 35ead899ccb7..8d8196d70d0e 100644
--- a/svx/source/gallery2/codec.hxx
+++ b/svx/source/gallery2/codec.hxx
@@ -26,17 +26,16 @@ class SvStream;
class GalleryCodec
{
private:
-
- SvStream& rStm;
+ SvStream& rStm;
public:
- explicit GalleryCodec( SvStream& rIOStm );
+ explicit GalleryCodec(SvStream& rIOStm);
~GalleryCodec();
- void Write( SvStream& rStmToWrite );
- void Read( SvStream& rStmToRead );
+ void Write(SvStream& rStmToWrite);
+ void Read(SvStream& rStmToRead);
- static bool IsCoded( SvStream& rStm, sal_uInt32& rVersion );
+ static bool IsCoded(SvStream& rStm, sal_uInt32& rVersion);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/celltypes.hxx b/svx/source/inc/celltypes.hxx
index 7f8a9d87fc4c..39edf2c5a81e 100644
--- a/svx/source/inc/celltypes.hxx
+++ b/svx/source/inc/celltypes.hxx
@@ -23,21 +23,21 @@
#include <rtl/ref.hxx>
#include <vector>
-namespace sdr::table {
-
+namespace sdr::table
+{
class Cell;
class TableModel;
class TableRow;
class TableColumn;
class TableRows;
class TableColumns;
-typedef rtl::Reference< Cell > CellRef;
-typedef rtl::Reference< TableModel > TableModelRef;
-typedef rtl::Reference< TableRow > TableRowRef;
-typedef rtl::Reference< TableColumn > TableColumnRef;
-typedef std::vector< CellRef > CellVector;
-typedef std::vector< TableRowRef > RowVector;
-typedef std::vector< TableColumnRef > ColumnVector;
+typedef rtl::Reference<Cell> CellRef;
+typedef rtl::Reference<TableModel> TableModelRef;
+typedef rtl::Reference<TableRow> TableRowRef;
+typedef rtl::Reference<TableColumn> TableColumnRef;
+typedef std::vector<CellRef> CellVector;
+typedef std::vector<TableRowRef> RowVector;
+typedef std::vector<TableColumnRef> ColumnVector;
class TableDesignUser
{
@@ -48,37 +48,36 @@ protected:
~TableDesignUser() {}
};
-template< typename T >
-class RangeIterator
+template <typename T> class RangeIterator
{
public:
/** creates an iterator from rStart (including) to rEnd (excluding) if
bForward is true or from nEnd (excluding to nStart (including).
rStart must be <= rEnd.
*/
- RangeIterator( const T& rStart, const T& rEnd, bool bForward )
+ RangeIterator(const T& rStart, const T& rEnd, bool bForward)
{
- if( bForward )
+ if (bForward)
{
maIter = rStart;
maEnd = rEnd;
}
else
{
- maIter = rEnd-1;
- maEnd = rStart-1;
+ maIter = rEnd - 1;
+ maEnd = rStart - 1;
}
}
/* iterates in the configured direction and returns true if rValue
now contains a valid position in the range of this iterator */
- bool next( T& rValue )
+ bool next(T& rValue)
{
- if( maIter == maEnd )
+ if (maIter == maEnd)
return false;
rValue = maIter;
- if( maIter < maEnd )
+ if (maIter < maEnd)
++maIter;
else
--maIter;
@@ -89,7 +88,6 @@ private:
T maEnd;
T maIter;
};
-
}
#endif
diff --git a/svx/source/inc/fmslotinvalidator.hxx b/svx/source/inc/fmslotinvalidator.hxx
index aa000a4eac60..4027b63fa757 100644
--- a/svx/source/inc/fmslotinvalidator.hxx
+++ b/svx/source/inc/fmslotinvalidator.hxx
@@ -24,10 +24,9 @@
namespace svx
{
- typedef sal_uInt16 SfxSlotId;
+typedef sal_uInt16 SfxSlotId;
}
#endif // INCLUDED_SVX_SOURCE_INC_FMSLOTINVALIDATOR_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/tbxform.hxx b/svx/source/inc/tbxform.hxx
index cd8f7e037502..0850082ab55a 100644
--- a/svx/source/inc/tbxform.hxx
+++ b/svx/source/inc/tbxform.hxx
@@ -25,12 +25,12 @@
class SvxFmAbsRecWin final : public RecordItemWindow
{
public:
- SvxFmAbsRecWin( vcl::Window* _pParent, SfxToolBoxControl* _pController );
+ SvxFmAbsRecWin(vcl::Window* _pParent, SfxToolBoxControl* _pController);
private:
virtual void PositionFired(sal_Int64 nRecord) override;
- SfxToolBoxControl* m_pController;
+ SfxToolBoxControl* m_pController;
};
class SvxFmTbxCtlAbsRec : public SfxToolBoxControl
@@ -38,13 +38,13 @@ class SvxFmTbxCtlAbsRec : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SvxFmTbxCtlAbsRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ SvxFmTbxCtlAbsRec(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
virtual ~SvxFmTbxCtlAbsRec() override;
- virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window* pParent ) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
- const SfxPoolItem* pState ) override;
+ virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
};
class SvxFmTbxCtlRecText : public SfxToolBoxControl
@@ -52,10 +52,10 @@ class SvxFmTbxCtlRecText : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SvxFmTbxCtlRecText( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ SvxFmTbxCtlRecText(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
virtual ~SvxFmTbxCtlRecText() override;
- virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window* pParent ) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
};
class SvxFmTbxCtlRecFromText : public SfxToolBoxControl
@@ -63,10 +63,10 @@ class SvxFmTbxCtlRecFromText : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SvxFmTbxCtlRecFromText( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ SvxFmTbxCtlRecFromText(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
virtual ~SvxFmTbxCtlRecFromText() override;
- virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window* pParent ) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
};
class LabelItemWindow;
@@ -78,31 +78,28 @@ class SvxFmTbxCtlRecTotal : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SvxFmTbxCtlRecTotal( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ SvxFmTbxCtlRecTotal(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
virtual ~SvxFmTbxCtlRecTotal() override;
- virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window* pParent ) override;
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
- const SfxPoolItem* pState ) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
+ virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
};
-
class SvxFmTbxNextRec : public SfxToolBoxControl
{
public:
SFX_DECL_TOOLBOX_CONTROL();
- SvxFmTbxNextRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ SvxFmTbxNextRec(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
};
-
class SvxFmTbxPrevRec : public SfxToolBoxControl
{
public:
SFX_DECL_TOOLBOX_CONTROL();
- SvxFmTbxPrevRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ SvxFmTbxPrevRec(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 8b8f327c838c..833dbccdfc3c 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -56,7 +56,7 @@ double GetDefaultValNum(const SvNumFormatType nType)
case SvNumFormatType::LOGICAL:
return fSvxNumValConst[SvxNumValCategory::Boolean];
default:
- break;
+ break;
}
return fSvxNumValConst[SvxNumValCategory::NoValue];
}
@@ -99,7 +99,7 @@ SvxNumberFormatShell::SvxNumberFormatShell(SvNumberFormatter* pNumFormatter, sal
{
case SvxNumberValueType::String:
aValStr = rNumStr;
- break;
+ break;
case SvxNumberValueType::Number:
if (pFormatter)
{
@@ -138,7 +138,7 @@ SvxNumberFormatShell::SvxNumberFormatShell(SvNumberFormatter* pNumFormatter, sal
{
case SvxNumberValueType::Number:
nValNum = nNumVal;
- break;
+ break;
case SvxNumberValueType::String:
case SvxNumberValueType::Undefined:
default:
@@ -204,7 +204,8 @@ void SvxNumberFormatShell::FormatChanged(sal_uInt16 nFmtLbPos, OUString& rPrevie
{
if (static_cast<size_t>(nFmtLbPos) < aCurrencyFormatList.size())
{
- MakePrevStringFromVal(aCurrencyFormatList[nFmtLbPos], rPreviewStr, rpFontColor, nValNum);
+ MakePrevStringFromVal(aCurrencyFormatList[nFmtLbPos], rPreviewStr, rpFontColor,
+ nValNum);
}
}
}
@@ -313,13 +314,15 @@ void SvxNumberFormatShell::MakeFormat(OUString& rFormat, bool bThousand, bool bN
sal_Int32 rErrPos = 0;
std::vector<OUString> aFmtEList;
- sal_uInt32 nFound = pFormatter->TestNewString(aCurrencyFormatList[nCurrencyPos], eCurLanguage);
+ sal_uInt32 nFound
+ = pFormatter->TestNewString(aCurrencyFormatList[nCurrencyPos], eCurLanguage);
if (nFound == NUMBERFORMAT_ENTRY_NOT_FOUND)
{
sal_uInt16 rCatLbSelPos = 0;
short rFmtSelPos = 0;
- AddFormat(aCurrencyFormatList[nCurrencyPos], rErrPos, rCatLbSelPos, rFmtSelPos, aFmtEList);
+ AddFormat(aCurrencyFormatList[nCurrencyPos], rErrPos, rCatLbSelPos, rFmtSelPos,
+ aFmtEList);
}
if (rErrPos == 0)
@@ -360,8 +363,9 @@ void SvxNumberFormatShell::GetOptions(const OUString& rFormat, bool& rThousand,
sal_uInt16 nPos = FindCurrencyTableEntry(rFormat, bTestBanking);
if (IsInTable(nPos, bTestBanking, rFormat)
- && pFormatter->GetFormatSpecialInfo(rFormat, rThousand, rNegRed, rPrecision,
- rLeadingZeroes, eCurLanguage) == 0)
+ && pFormatter->GetFormatSpecialInfo(rFormat, rThousand, rNegRed, rPrecision,
+ rLeadingZeroes, eCurLanguage)
+ == 0)
{
rCatLbPos = CAT_CURRENCY;
}
@@ -379,7 +383,8 @@ void SvxNumberFormatShell::MakePreviewString(const OUString& rFormatStr, OUStrin
if (nExistingFormat == NUMBERFORMAT_ENTRY_NOT_FOUND)
{
// real preview - not implemented in NumberFormatter for text formats
- pFormatter->GetPreviewString(rFormatStr, nValNum, rPreviewStr, &rpFontColor, eCurLanguage, bUseStarFormat);
+ pFormatter->GetPreviewString(rFormatStr, nValNum, rPreviewStr, &rpFontColor, eCurLanguage,
+ bUseStarFormat);
}
else
{
@@ -387,7 +392,8 @@ void SvxNumberFormatShell::MakePreviewString(const OUString& rFormatStr, OUStrin
// #50441# if a string was set in addition to the value, use it for text formats
bool bUseText = (eValType == SvxNumberValueType::String
- || (!aValStr.isEmpty() && (pFormatter->GetType(nExistingFormat) & SvNumFormatType::TEXT)));
+ || (!aValStr.isEmpty()
+ && (pFormatter->GetType(nExistingFormat) & SvNumFormatType::TEXT)));
if (bUseText)
{
@@ -397,7 +403,8 @@ void SvxNumberFormatShell::MakePreviewString(const OUString& rFormatStr, OUStrin
{
if (bIsDefaultValNum)
nValNum = GetDefaultValNum(pFormatter->GetType(nExistingFormat));
- pFormatter->GetOutputString(nValNum, nExistingFormat, rPreviewStr, &rpFontColor, bUseStarFormat);
+ pFormatter->GetOutputString(nValNum, nExistingFormat, rPreviewStr, &rpFontColor,
+ bUseStarFormat);
}
}
}
@@ -568,11 +575,11 @@ void SvxNumberFormatShell::FillEListWithStd_Impl(std::vector<OUString>& rList,
case SvNumFormatType::NUMBER:
eOffsetStart = NF_NUMBER_START;
eOffsetEnd = NF_NUMBER_END;
- break;
+ break;
case SvNumFormatType::PERCENT:
eOffsetStart = NF_PERCENT_START;
eOffsetEnd = NF_PERCENT_END;
- break;
+ break;
case SvNumFormatType::CURRENCY:
// Currency entries are generated and assembled, ignore
// bSuppressDuplicates.
@@ -581,36 +588,38 @@ void SvxNumberFormatShell::FillEListWithStd_Impl(std::vector<OUString>& rList,
case SvNumFormatType::DATE:
eOffsetStart = NF_DATE_START;
eOffsetEnd = NF_DATE_END;
- break;
+ break;
case SvNumFormatType::TIME:
eOffsetStart = NF_TIME_START;
eOffsetEnd = NF_TIME_END;
- break;
+ break;
case SvNumFormatType::SCIENTIFIC:
eOffsetStart = NF_SCIENTIFIC_START;
eOffsetEnd = NF_SCIENTIFIC_END;
- break;
+ break;
case SvNumFormatType::FRACTION:
eOffsetStart = NF_FRACTION_START;
eOffsetEnd = NF_FRACTION_END;
// Fraction formats are internally generated by the number
// formatter and are not supposed to contain duplicates anyway.
nSelPos = FillEListWithFormats_Impl(rList, nSelPos, eOffsetStart, eOffsetEnd, false);
- nSelPos = FillEListWithFormats_Impl(rList, nSelPos, NF_FRACTION_3D, NF_FRACTION_100, false);
+ nSelPos
+ = FillEListWithFormats_Impl(rList, nSelPos, NF_FRACTION_3D, NF_FRACTION_100, false);
return;
case SvNumFormatType::LOGICAL:
eOffsetStart = NF_BOOLEAN;
eOffsetEnd = NF_BOOLEAN;
- break;
+ break;
case SvNumFormatType::TEXT:
eOffsetStart = NF_TEXT;
eOffsetEnd = NF_TEXT;
- break;
+ break;
default:
return;
}
- nSelPos = FillEListWithFormats_Impl(rList, nSelPos, eOffsetStart, eOffsetEnd, bSuppressDuplicates);
+ nSelPos
+ = FillEListWithFormats_Impl(rList, nSelPos, eOffsetStart, eOffsetEnd, bSuppressDuplicates);
}
short SvxNumberFormatShell::FillEListWithFormats_Impl(std::vector<OUString>& rList, short nSelPos,
@@ -624,7 +633,8 @@ short SvxNumberFormatShell::FillEListWithFormats_Impl(std::vector<OUString>& rLi
*/
for (tools::Long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex)
{
- FillEListWithOneFormat_Impl( rList, nSelPos, bSuppressDuplicates, static_cast<NfIndexTableOffset>(nIndex), false);
+ FillEListWithOneFormat_Impl(rList, nSelPos, bSuppressDuplicates,
+ static_cast<NfIndexTableOffset>(nIndex), false);
}
return nSelPos;
@@ -638,11 +648,13 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl(std::vector<OUString>& rL
// Add first, so a NF_DATETIME_SYSTEM_SHORT_HHMM may be suppressed in
// locales that do not use 2-digit years there and this here is the
// default.
- FillEListWithOneFormat_Impl( rList, nSelPos, bSuppressDuplicates, NF_DATETIME_SYS_DDMMYYYY_HHMM, true);
+ FillEListWithOneFormat_Impl(rList, nSelPos, bSuppressDuplicates, NF_DATETIME_SYS_DDMMYYYY_HHMM,
+ true);
for (tools::Long nIndex = NF_DATETIME_START; nIndex <= NF_DATETIME_END; ++nIndex)
{
- FillEListWithOneFormat_Impl( rList, nSelPos, bSuppressDuplicates, static_cast<NfIndexTableOffset>(nIndex), true);
+ FillEListWithOneFormat_Impl(rList, nSelPos, bSuppressDuplicates,
+ static_cast<NfIndexTableOffset>(nIndex), true);
}
// Always add the internally generated ISO formats.
@@ -652,8 +664,9 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl(std::vector<OUString>& rL
return nSelPos;
}
-void SvxNumberFormatShell::FillEListWithOneFormat_Impl(std::vector<OUString>& rList, short & nSelPos,
- bool bSuppressDuplicates, NfIndexTableOffset nOffset,
+void SvxNumberFormatShell::FillEListWithOneFormat_Impl(std::vector<OUString>& rList, short& nSelPos,
+ bool bSuppressDuplicates,
+ NfIndexTableOffset nOffset,
bool bSuppressIsoDateTime)
{
sal_uInt32 nNFEntry = pFormatter->GetFormatIndex(nOffset, eCurLanguage);
@@ -675,11 +688,13 @@ void SvxNumberFormatShell::FillEListWithOneFormat_Impl(std::vector<OUString>& rL
// Ugly hack to suppress an ISO date+time format that is the default
// date+time format of the locale and identical to the internally generated
// one always to be added after/below.
- const bool bSupIso = bSuppressIsoDateTime && bSuppressDuplicates &&
- (aNewFormNInfo == "YYYY-MM-DD HH:MM:SS" || aNewFormNInfo == "YYYY-MM-DD\"T\"HH:MM:SS");
+ const bool bSupIso
+ = bSuppressIsoDateTime && bSuppressDuplicates
+ && (aNewFormNInfo == "YYYY-MM-DD HH:MM:SS" || aNewFormNInfo == "YYYY-MM-DD\"T\"HH:MM:SS");
- if (!bSupIso && (!bSuppressDuplicates || IsEssentialFormat_Impl(nMyCat, nNFEntry)
- || std::find(rList.begin(), rList.end(), aNewFormNInfo) == rList.end()))
+ if (!bSupIso
+ && (!bSuppressDuplicates || IsEssentialFormat_Impl(nMyCat, nNFEntry)
+ || std::find(rList.begin(), rList.end(), aNewFormNInfo) == rList.end()))
{
rList.push_back(aNewFormNInfo);
aCurEntryList.push_back(nNFEntry);
@@ -706,7 +721,7 @@ bool SvxNumberFormatShell::IsEssentialFormat_Impl(SvNumFormatType eType, sal_uIn
case NF_DATETIME_ISO_YYYYMMDDTHHMMSS:
return true;
default:
- break;
+ break;
}
return nKey == pFormatter->GetStandardFormat(eType, eCurLanguage);
@@ -724,11 +739,12 @@ short SvxNumberFormatShell::FillEListWithCurrency_Impl(std::vector<OUString>& rL
bool bTmpBanking;
OUString rSymbol;
- bool bFlag = pFormatter->GetNewCurrencySymbolString(nCurFormatKey, rSymbol, &pTmpCurrencyEntry, &bTmpBanking);
+ bool bFlag = pFormatter->GetNewCurrencySymbolString(nCurFormatKey, rSymbol, &pTmpCurrencyEntry,
+ &bTmpBanking);
if ((!bFlag && pCurCurrencyEntry == nullptr)
- || (bFlag && pTmpCurrencyEntry == nullptr && rSymbol.isEmpty())
- || (nCurCategory == SvNumFormatType::ALL))
+ || (bFlag && pTmpCurrencyEntry == nullptr && rSymbol.isEmpty())
+ || (nCurCategory == SvNumFormatType::ALL))
{
if (nCurCategory == SvNumFormatType::ALL)
FillEListWithUserCurrencys(rList, nSelPos);
@@ -759,7 +775,8 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys(std::vector<OUString>& rLi
for (tools::Long nIndex = NF_CURRENCY_START; nIndex <= NF_CURRENCY_END; nIndex++)
{
- nNFEntry = pFormatter->GetFormatIndex(static_cast<NfIndexTableOffset>(nIndex), eCurLanguage);
+ nNFEntry
+ = pFormatter->GetFormatIndex(static_cast<NfIndexTableOffset>(nIndex), eCurLanguage);
if (nCurCategory == SvNumFormatType::ALL && nNFEntry != nCurFormatKey)
// Deprecated old currency entries, for ALL add only if used as
@@ -800,7 +817,8 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys(std::vector<OUString>& rLi
bool bTmpBanking;
OUString rSymbol;
- pFormatter->GetNewCurrencySymbolString(nKey, rSymbol, &pTmpCurrencyEntry, &bTmpBanking);
+ pFormatter->GetNewCurrencySymbolString(nKey, rSymbol, &pTmpCurrencyEntry,
+ &bTmpBanking);
bUserNewCurrency = (pTmpCurrencyEntry != nullptr);
}
@@ -842,7 +860,8 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys(std::vector<OUString>& rL
std::vector<OUString> aList;
std::vector<sal_uInt32> aKeyList;
- pFormatter->GetNewCurrencySymbolString(nCurFormatKey, rSymbol, &pTmpCurrencyEntry, &bTmpBanking);
+ pFormatter->GetNewCurrencySymbolString(nCurFormatKey, rSymbol, &pTmpCurrencyEntry,
+ &bTmpBanking);
OUString rShortSymbol;
@@ -895,7 +914,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys(std::vector<OUString>& rL
bInsFlag = true; // merge locale formats into currency selection
}
else if ((!bTmpBanking && aNewFormNInfo.indexOf(rSymbol) >= 0)
- || (bTmpBanking && aNewFormNInfo.indexOf(rBankSymbol) >= 0))
+ || (bTmpBanking && aNewFormNInfo.indexOf(rBankSymbol) >= 0))
{
bInsFlag = true;
}
@@ -905,7 +924,8 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys(std::vector<OUString>& rL
const NfCurrencyEntry* pTstCurrencyEntry;
bool bTstBanking;
- pFormatter->GetNewCurrencySymbolString(nKey, rTstSymbol, &pTstCurrencyEntry, &bTstBanking);
+ pFormatter->GetNewCurrencySymbolString(nKey, rTstSymbol, &pTstCurrencyEntry,
+ &bTstBanking);
if (pTmpCurrencyEntry == pTstCurrencyEntry && bTstBanking == bTmpBanking)
{
@@ -926,7 +946,8 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys(std::vector<OUString>& rL
sal_uInt16 nDefault;
if (pTmpCurrencyEntry && nCurCategory != SvNumFormatType::ALL)
{
- nDefault = pFormatter->GetCurrencyFormatStrings(aWSStringsDtor, *pTmpCurrencyEntry, bTmpBanking);
+ nDefault
+ = pFormatter->GetCurrencyFormatStrings(aWSStringsDtor, *pTmpCurrencyEntry, bTmpBanking);
if (!bTmpBanking)
pFormatter->GetCurrencyFormatStrings(aWSStringsDtor, *pTmpCurrencyEntry, true);
}
@@ -1058,8 +1079,9 @@ void SvxNumberFormatShell::GetPreviewString_Impl(OUString& rString, const Color*
rpColor = nullptr;
// #50441# if a string was set in addition to the value, use it for text formats
- bool bUseText = (eValType == SvxNumberValueType::String
- || (!aValStr.isEmpty() && (pFormatter->GetType(nCurFormatKey) & SvNumFormatType::TEXT)));
+ bool bUseText
+ = (eValType == SvxNumberValueType::String
+ || (!aValStr.isEmpty() && (pFormatter->GetType(nCurFormatKey) & SvNumFormatType::TEXT)));
if (bUseText)
{
@@ -1094,38 +1116,38 @@ void SvxNumberFormatShell::PosToCategory_Impl(sal_uInt16 nPos, SvNumFormatType&
{
case CAT_USERDEFINED:
rCategory = SvNumFormatType::DEFINED;
- break;
+ break;
case CAT_NUMBER:
rCategory = SvNumFormatType::NUMBER;
- break;
+ break;
case CAT_PERCENT:
rCategory = SvNumFormatType::PERCENT;
- break;
+ break;
case CAT_CURRENCY:
rCategory = SvNumFormatType::CURRENCY;
- break;
+ break;
case CAT_DATE:
rCategory = SvNumFormatType::DATE;
- break;
+ break;
case CAT_TIME:
rCategory = SvNumFormatType::TIME;
- break;
+ break;
case CAT_SCIENTIFIC:
rCategory = SvNumFormatType::SCIENTIFIC;
- break;
+ break;
case CAT_FRACTION:
rCategory = SvNumFormatType::FRACTION;
- break;
+ break;
case CAT_BOOLEAN:
rCategory = SvNumFormatType::LOGICAL;
- break;
+ break;
case CAT_TEXT:
rCategory = SvNumFormatType::TEXT;
- break;
+ break;
case CAT_ALL:
default:
rCategory = SvNumFormatType::ALL;
- break;
+ break;
}
}
@@ -1136,35 +1158,35 @@ void SvxNumberFormatShell::CategoryToPos_Impl(SvNumFormatType nCategory, sal_uIn
{
case SvNumFormatType::DEFINED:
rPos = CAT_USERDEFINED;
- break;
+ break;
case SvNumFormatType::NUMBER:
rPos = CAT_NUMBER;
- break;
+ break;
case SvNumFormatType::PERCENT:
rPos = CAT_PERCENT;
- break;
+ break;
case SvNumFormatType::CURRENCY:
rPos = CAT_CURRENCY;
- break;
+ break;
case SvNumFormatType::DATETIME:
case SvNumFormatType::DATE:
rPos = CAT_DATE;
- break;
+ break;
case SvNumFormatType::TIME:
rPos = CAT_TIME;
- break;
+ break;
case SvNumFormatType::SCIENTIFIC:
rPos = CAT_SCIENTIFIC;
- break;
+ break;
case SvNumFormatType::FRACTION:
rPos = CAT_FRACTION;
- break;
+ break;
case SvNumFormatType::LOGICAL:
rPos = CAT_BOOLEAN;
- break;
+ break;
case SvNumFormatType::TEXT:
rPos = CAT_TEXT;
- break;
+ break;
case SvNumFormatType::ALL:
default:
rPos = CAT_ALL;
@@ -1311,7 +1333,7 @@ OUString SvxNumberFormatShell::GetFormat4Entry(short nEntry)
* Input: Number of the entry
* Output: Category number
*/
-short SvxNumberFormatShell::GetListPos4Entry( sal_uInt32 nIdx, const OUString& rFmtString )
+short SvxNumberFormatShell::GetListPos4Entry(sal_uInt32 nIdx, const OUString& rFmtString)
{
short nSelP = SELPOS_NONE;
if (nIdx != NUMBERFORMAT_ENTRY_NEW_CURRENCY)
@@ -1463,8 +1485,8 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyTableEntry(const OUString& rFmtStri
OUString aSymbol, aExtension;
sal_uInt32 nFound = pFormatter->TestNewString(rFmtString, eCurLanguage);
if (nFound != NUMBERFORMAT_ENTRY_NOT_FOUND
- && ((pFormat = pFormatter->GetEntry(nFound)) != nullptr)
- && pFormat->GetNewCurrencySymbol(aSymbol, aExtension))
+ && ((pFormat = pFormatter->GetEntry(nFound)) != nullptr)
+ && pFormat->GetNewCurrencySymbol(aSymbol, aExtension))
{
// eventually match with format locale
const NfCurrencyEntry* pTmpCurrencyEntry = SvNumberFormatter::GetCurrencyEntry(
diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx
index 0d19add7fd06..8e8d35db4406 100644
--- a/svx/source/sdr/contact/viewcontact.cxx
+++ b/svx/source/sdr/contact/viewcontact.cxx
@@ -26,8 +26,8 @@
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <tools/debug.hxx>
-namespace sdr::contact {
-
+namespace sdr::contact
+{
// Create an Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something. Default is to create
// a standard ViewObjectContact containing the given ObjectContact and *this
@@ -37,15 +37,12 @@ ViewObjectContact& ViewContact::CreateObjectSpecificViewObjectContact(ObjectCont
}
ViewContact::ViewContact()
-: maViewObjectContactVector(),
- mxViewIndependentPrimitive2DSequence()
+ : maViewObjectContactVector()
+ , mxViewIndependentPrimitive2DSequence()
{
}
-ViewContact::~ViewContact()
-{
- deleteAllVOCs();
-}
+ViewContact::~ViewContact() { deleteAllVOCs(); }
void ViewContact::deleteAllVOCs()
{
@@ -53,10 +50,10 @@ void ViewContact::deleteAllVOCs()
// #i84257# To avoid that each 'delete pCandidate' again uses
// the local RemoveViewObjectContact with a search and removal in the
// vector, simply copy and clear local vector.
- std::vector< ViewObjectContact* > aLocalVOCList;
+ std::vector<ViewObjectContact*> aLocalVOCList;
aLocalVOCList.swap(maViewObjectContactVector);
- for (const auto & pCandidate : aLocalVOCList)
+ for (const auto& pCandidate : aLocalVOCList)
// ViewObjectContacts only make sense with View and Object contacts.
// When the contact to the SdrObject is deleted like in this case,
// all ViewObjectContacts can be deleted, too.
@@ -74,18 +71,18 @@ ViewObjectContact& ViewContact::GetViewObjectContact(ObjectContact& rObjectConta
const sal_uInt32 nCount(maViewObjectContactVector.size());
// first search if there exists a VOC for the given OC
- for(sal_uInt32 a(0); !pRetval && a < nCount; a++)
+ for (sal_uInt32 a(0); !pRetval && a < nCount; a++)
{
ViewObjectContact* pCandidate = maViewObjectContactVector[a];
DBG_ASSERT(pCandidate, "Corrupted ViewObjectContactList (!)");
- if(&(pCandidate->GetObjectContact()) == &rObjectContact)
+ if (&(pCandidate->GetObjectContact()) == &rObjectContact)
{
pRetval = pCandidate;
}
}
- if(!pRetval)
+ if (!pRetval)
{
// create a new one. It's inserted to the local list from the
// ViewObjectContact constructor via AddViewObjectContact()
@@ -104,9 +101,10 @@ void ViewContact::AddViewObjectContact(ViewObjectContact& rVOContact)
// A ViewObjectContact was deleted and shall be forgotten.
void ViewContact::RemoveViewObjectContact(ViewObjectContact& rVOContact)
{
- std::vector< ViewObjectContact* >::iterator aFindResult = std::find(maViewObjectContactVector.begin(), maViewObjectContactVector.end(), &rVOContact);
+ std::vector<ViewObjectContact*>::iterator aFindResult = std::find(
+ maViewObjectContactVector.begin(), maViewObjectContactVector.end(), &rVOContact);
- if(aFindResult != maViewObjectContactVector.end())
+ if (aFindResult != maViewObjectContactVector.end())
{
maViewObjectContactVector.erase(aFindResult);
}
@@ -118,9 +116,9 @@ bool ViewContact::HasViewObjectContacts() const
{
const sal_uInt32 nCount(maViewObjectContactVector.size());
- for(sal_uInt32 a(0); a < nCount; a++)
+ for (sal_uInt32 a(0); a < nCount; a++)
{
- if(!maViewObjectContactVector[a]->GetObjectContact().IsPreviewRenderer())
+ if (!maViewObjectContactVector[a]->GetObjectContact().IsPreviewRenderer())
{
return true;
}
@@ -134,9 +132,9 @@ bool ViewContact::isAnimatedInAnyViewObjectContact() const
{
const sal_uInt32 nCount(maViewObjectContactVector.size());
- for(sal_uInt32 a(0); a < nCount; a++)
+ for (sal_uInt32 a(0); a < nCount; a++)
{
- if(maViewObjectContactVector[a]->isAnimated())
+ if (maViewObjectContactVector[a]->isAnimated())
{
return true;
}
@@ -157,7 +155,8 @@ sal_uInt32 ViewContact::GetObjectCount() const
ViewContact& ViewContact::GetViewContact(sal_uInt32 /*nIndex*/) const
{
// This is the default implementation; call would be an error
- OSL_FAIL("ViewContact::GetViewContact: This call needs to be overridden when GetObjectCount() can return results != 0 (!)");
+ OSL_FAIL("ViewContact::GetViewContact: This call needs to be overridden when GetObjectCount() "
+ "can return results != 0 (!)");
return const_cast<ViewContact&>(*this);
}
@@ -173,10 +172,11 @@ void ViewContact::ActionChildInserted(ViewContact& rChild)
// will force a VOC for the new child and invalidate its range
const sal_uInt32 nCount(maViewObjectContactVector.size());
- for(sal_uInt32 a(0); a < nCount; a++)
+ for (sal_uInt32 a(0); a < nCount; a++)
{
ViewObjectContact* pCandidate = maViewObjectContactVector[a];
- DBG_ASSERT(pCandidate, "ViewContact::GetViewObjectContact() invalid ViewObjectContactList (!)");
+ DBG_ASSERT(pCandidate,
+ "ViewContact::GetViewObjectContact() invalid ViewObjectContactList (!)");
// take action at all VOCs. At the VOCs ObjectContact the initial
// rectangle will be invalidated at the associated OutputDevice.
@@ -191,10 +191,11 @@ void ViewContact::ActionChanged()
// all drawn visualisations in all known views
const sal_uInt32 nCount(maViewObjectContactVector.size());
- for(sal_uInt32 a(0); a < nCount; a++)
+ for (sal_uInt32 a(0); a < nCount; a++)
{
ViewObjectContact* pCandidate = maViewObjectContactVector[a];
- DBG_ASSERT(pCandidate, "ViewContact::GetViewObjectContact() invalid ViewObjectContactList (!)");
+ DBG_ASSERT(pCandidate,
+ "ViewContact::GetViewObjectContact() invalid ViewObjectContactList (!)");
pCandidate->ActionChanged();
}
@@ -202,44 +203,46 @@ void ViewContact::ActionChanged()
// access to SdrObject and/or SdrPage. May return 0L like the default
// implementations do. Override as needed.
-SdrObject* ViewContact::TryToGetSdrObject() const
-{
- return nullptr;
-}
+SdrObject* ViewContact::TryToGetSdrObject() const { return nullptr; }
// primitive stuff
-drawinglayer::primitive2d::Primitive2DContainer ViewContact::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer
+ViewContact::createViewIndependentPrimitive2DSequence() const
{
// This is the default implementation and should never be called (see header). If this is called,
// someone implemented a ViewContact (VC) visualisation object without defining the visualisation by
// providing a sequence of primitives -> which cannot be correct.
// Since we have no access to any known model data here, the default implementation creates a yellow placeholder
// hairline polygon with a default size of (1000, 1000, 5000, 3000)
- OSL_FAIL("ViewContact::createViewIndependentPrimitive2DSequence(): Never call the fallback base implementation, this is always an error (!)");
- const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(basegfx::B2DRange(1000.0, 1000.0, 5000.0, 3000.0)));
+ OSL_FAIL("ViewContact::createViewIndependentPrimitive2DSequence(): Never call the fallback "
+ "base implementation, this is always an error (!)");
+ const basegfx::B2DPolygon aOutline(
+ basegfx::utils::createPolygonFromRect(basegfx::B2DRange(1000.0, 1000.0, 5000.0, 3000.0)));
const basegfx::BColor aYellow(1.0, 1.0, 0.0);
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
- return drawinglayer::primitive2d::Primitive2DContainer { xReference };
+ return drawinglayer::primitive2d::Primitive2DContainer{ xReference };
}
-drawinglayer::primitive2d::Primitive2DContainer const & ViewContact::getViewIndependentPrimitive2DContainer() const
+drawinglayer::primitive2d::Primitive2DContainer const&
+ViewContact::getViewIndependentPrimitive2DContainer() const
{
// local up-to-date checks. Create new list and compare.
- drawinglayer::primitive2d::Primitive2DContainer xNew(createViewIndependentPrimitive2DSequence());
+ drawinglayer::primitive2d::Primitive2DContainer xNew(
+ createViewIndependentPrimitive2DSequence());
- if(!xNew.empty())
+ if (!xNew.empty())
{
// allow evtl. embedding in object-specific infos, e.g. Name, Title, Description
xNew = embedToObjectSpecificInformation(std::move(xNew));
}
- if(mxViewIndependentPrimitive2DSequence != xNew)
+ if (mxViewIndependentPrimitive2DSequence != xNew)
{
// has changed, copy content
- const_cast< ViewContact* >(this)->mxViewIndependentPrimitive2DSequence = std::move(xNew);
+ const_cast<ViewContact*>(this)->mxViewIndependentPrimitive2DSequence = std::move(xNew);
}
// return current Primitive2DContainer
@@ -247,19 +250,22 @@ drawinglayer::primitive2d::Primitive2DContainer const & ViewContact::getViewInde
}
// add Gluepoints (if available)
-drawinglayer::primitive2d::Primitive2DContainer ViewContact::createGluePointPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer
+ViewContact::createGluePointPrimitive2DSequence() const
{
// default returns empty reference
return drawinglayer::primitive2d::Primitive2DContainer();
}
-drawinglayer::primitive2d::Primitive2DContainer ViewContact::embedToObjectSpecificInformation(drawinglayer::primitive2d::Primitive2DContainer aSource) const
+drawinglayer::primitive2d::Primitive2DContainer ViewContact::embedToObjectSpecificInformation(
+ drawinglayer::primitive2d::Primitive2DContainer aSource) const
{
// nothing to do for default
return aSource;
}
-basegfx::B2DRange ViewContact::getRange( const drawinglayer::geometry::ViewInformation2D& /*rViewInfo2D*/ ) const
+basegfx::B2DRange
+ViewContact::getRange(const drawinglayer::geometry::ViewInformation2D& /*rViewInfo2D*/) const
{
// Return empty range.
return basegfx::B2DRange();
@@ -267,12 +273,12 @@ basegfx::B2DRange ViewContact::getRange( const drawinglayer::geometry::ViewInfor
void ViewContact::flushViewObjectContacts(bool bWithHierarchy)
{
- if(bWithHierarchy)
+ if (bWithHierarchy)
{
// flush DrawingLayer hierarchy
const sal_uInt32 nCount(GetObjectCount());
- for(sal_uInt32 a(0); a < nCount; a++)
+ for (sal_uInt32 a(0); a < nCount; a++)
{
ViewContact& rChild = GetViewContact(a);
rChild.flushViewObjectContacts(bWithHierarchy);
@@ -282,7 +288,6 @@ void ViewContact::flushViewObjectContacts(bool bWithHierarchy)
// delete local VOCs
deleteAllVOCs();
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sdr/contact/viewcontactofpageobj.cxx b/svx/source/sdr/contact/viewcontactofpageobj.cxx
index 83da800b2780..bc2fb7c1e836 100644
--- a/svx/source/sdr/contact/viewcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofpageobj.cxx
@@ -25,29 +25,28 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-namespace sdr::contact {
-
-ViewObjectContact& ViewContactOfPageObj::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
+namespace sdr::contact
+{
+ViewObjectContact&
+ViewContactOfPageObj::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
{
ViewObjectContact* pRetval = new ViewObjectContactOfPageObj(rObjectContact, *this);
return *pRetval;
}
ViewContactOfPageObj::ViewContactOfPageObj(SdrPageObj& rPageObj)
-: ViewContactOfSdrObj(rPageObj)
+ : ViewContactOfSdrObj(rPageObj)
{
}
-ViewContactOfPageObj::~ViewContactOfPageObj()
-{
-}
+ViewContactOfPageObj::~ViewContactOfPageObj() {}
// #i35972# React on changes of the object of this ViewContact
void ViewContactOfPageObj::ActionChanged()
{
static bool bIsInActionChange(false);
- if(!bIsInActionChange)
+ if (!bIsInActionChange)
{
// set recursion flag, see description in *.hxx
bIsInActionChange = true;
@@ -60,7 +59,8 @@ void ViewContactOfPageObj::ActionChanged()
}
}
-drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageObj::createViewIndependentPrimitive2DSequence() const
+drawinglayer::primitive2d::Primitive2DContainer
+ViewContactOfPageObj::createViewIndependentPrimitive2DSequence() const
{
// create graphical visualisation data. Since this is the view-independent version which should not be used,
// create a replacement graphic visualisation here. Use GetLastBoundRect to access the model data directly
@@ -69,11 +69,11 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageObj::createView
const basegfx::B2DRange aModelRange = vcl::unotools::b2DRectangleFromRectangle(aModelRectangle);
const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aModelRange));
const basegfx::BColor aYellow(1.0, 1.0, 0.0);
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
- return drawinglayer::primitive2d::Primitive2DContainer { xReference };
+ return drawinglayer::primitive2d::Primitive2DContainer{ xReference };
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sdr/contact/viewcontactoftextobj.cxx b/svx/source/sdr/contact/viewcontactoftextobj.cxx
index 4f4cd9e408ef..9e10d0130d9c 100644
--- a/svx/source/sdr/contact/viewcontactoftextobj.cxx
+++ b/svx/source/sdr/contact/viewcontactoftextobj.cxx
@@ -20,17 +20,14 @@
#include <sdr/contact/viewcontactoftextobj.hxx>
#include <svx/svdotext.hxx>
-namespace sdr::contact {
-
-ViewContactOfTextObj::ViewContactOfTextObj(SdrTextObj& rTextObj)
-: ViewContactOfSdrObj(rTextObj)
+namespace sdr::contact
{
-}
-
-ViewContactOfTextObj::~ViewContactOfTextObj()
+ViewContactOfTextObj::ViewContactOfTextObj(SdrTextObj& rTextObj)
+ : ViewContactOfSdrObj(rTextObj)
{
}
+ViewContactOfTextObj::~ViewContactOfTextObj() {}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sdr/contact/viewobjectcontactredirector.cxx b/svx/source/sdr/contact/viewobjectcontactredirector.cxx
index 59817d926d3b..fa3b52933f68 100644
--- a/svx/source/sdr/contact/viewobjectcontactredirector.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactredirector.cxx
@@ -20,25 +20,20 @@
#include <svx/sdr/contact/viewobjectcontactredirector.hxx>
#include <svx/sdr/contact/viewobjectcontact.hxx>
-namespace sdr::contact {
-
-// basic constructor.
-ViewObjectContactRedirector::ViewObjectContactRedirector()
+namespace sdr::contact
{
-}
+// basic constructor.
+ViewObjectContactRedirector::ViewObjectContactRedirector() {}
// The destructor.
-ViewObjectContactRedirector::~ViewObjectContactRedirector()
-{
-}
+ViewObjectContactRedirector::~ViewObjectContactRedirector() {}
-drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
- const sdr::contact::ViewObjectContact& rOriginal,
- const sdr::contact::DisplayInfo& rDisplayInfo)
+drawinglayer::primitive2d::Primitive2DContainer
+ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
+ const sdr::contact::ViewObjectContact& rOriginal, const sdr::contact::DisplayInfo& rDisplayInfo)
{
return rOriginal.createPrimitive2DSequence(rDisplayInfo);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/EmptyPanel.cxx b/svx/source/sidebar/EmptyPanel.cxx
index 116b1c3e8071..f3640a4e91cc 100644
--- a/svx/source/sidebar/EmptyPanel.cxx
+++ b/svx/source/sidebar/EmptyPanel.cxx
@@ -19,18 +19,15 @@
#include "EmptyPanel.hxx"
-namespace svx::sidebar {
-
-EmptyPanel::EmptyPanel (vcl::Window* pParent)
+namespace svx::sidebar
+{
+EmptyPanel::EmptyPanel(vcl::Window* pParent)
: PanelLayout(pParent, "EmptyPanel", "svx/ui/sidebarempty.ui", nullptr)
, mxMessageControl(m_xBuilder->weld_label("message"))
{
}
-EmptyPanel::~EmptyPanel()
-{
- disposeOnce();
-}
+EmptyPanel::~EmptyPanel() { disposeOnce(); }
void EmptyPanel::dispose()
{
diff --git a/svx/source/sidebar/EmptyPanel.hxx b/svx/source/sidebar/EmptyPanel.hxx
index a2465fc9a7cc..8abd46d509c5 100644
--- a/svx/source/sidebar/EmptyPanel.hxx
+++ b/svx/source/sidebar/EmptyPanel.hxx
@@ -21,16 +21,15 @@
#include <sfx2/sidebar/PanelLayout.hxx>
-namespace svx::sidebar {
-
-
+namespace svx::sidebar
+{
/** Display a panel that tells the user that the current deck is
intentionally empty.
*/
class EmptyPanel final : public PanelLayout
{
public:
- explicit EmptyPanel (vcl::Window* pParent);
+ explicit EmptyPanel(vcl::Window* pParent);
virtual ~EmptyPanel() override;
virtual void dispose() override;
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx b/svx/source/sidebar/SelectionAnalyzer.cxx
index 14134980f390..baeaffc20858 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -25,10 +25,9 @@
using vcl::EnumContext;
-
-namespace svx::sidebar {
-
-EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMarkList& rMarkList)
+namespace svx::sidebar
+{
+EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC(const SdrMarkList& rMarkList)
{
EnumContext::Context eContext = EnumContext::Context::Unknown;
@@ -42,14 +41,15 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
case 1:
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- if ( dynamic_cast<const SdrTextObj*>( pObj) != nullptr && static_cast<SdrTextObj*>(pObj)->IsInEditMode() )
+ if (dynamic_cast<const SdrTextObj*>(pObj) != nullptr
+ && static_cast<SdrTextObj*>(pObj)->IsInEditMode())
{
eContext = EnumContext::Context::DrawText;
}
else
{
- const SdrInventor nInv = pObj->GetObjInventor();
- const sal_uInt16 nObjId = pObj->GetObjIdentifier();
+ const SdrInventor nInv = pObj->GetObjInventor();
+ const sal_uInt16 nObjId = pObj->GetObjIdentifier();
if (nInv == SdrInventor::Default)
eContext = GetContextForObjectId_SC(nObjId);
else if (nInv == SdrInventor::FmForm)
@@ -65,7 +65,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
{
case SdrInventor::Default:
{
- const sal_uInt16 nObjId (GetObjectTypeFromMark(rMarkList));
+ const sal_uInt16 nObjId(GetObjectTypeFromMark(rMarkList));
if (nObjId == 0)
eContext = EnumContext::Context::MultiObject;
else
@@ -81,7 +81,8 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
eContext = EnumContext::Context::MultiObject;
break;
- default: break;
+ default:
+ break;
}
}
}
@@ -89,10 +90,8 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
return eContext;
}
-
-EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
- const SdrMarkList& rMarkList,
- const ViewType eViewType)
+EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD(const SdrMarkList& rMarkList,
+ const ViewType eViewType)
{
EnumContext::Context eContext = EnumContext::Context::Unknown;
@@ -101,7 +100,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
switch (rMarkList.GetMarkCount())
{
case 0:
- switch(eViewType)
+ switch (eViewType)
{
case ViewType::Standard:
eContext = EnumContext::Context::DrawPage;
@@ -121,7 +120,8 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
case 1:
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- if (dynamic_cast<const SdrTextObj*>( pObj) != nullptr && static_cast<SdrTextObj*>(pObj)->IsInEditMode())
+ if (dynamic_cast<const SdrTextObj*>(pObj) != nullptr
+ && static_cast<SdrTextObj*>(pObj)->IsInEditMode())
{
if (pObj->GetObjIdentifier() == OBJ_TABLE)
{
@@ -135,8 +135,8 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
}
else
{
- const SdrInventor nInv = pObj->GetObjInventor();
- sal_uInt16 nObjId = pObj->GetObjIdentifier();
+ const SdrInventor nInv = pObj->GetObjInventor();
+ sal_uInt16 nObjId = pObj->GetObjIdentifier();
if (nInv == SdrInventor::Default)
{
if (nObjId == OBJ_GRUP)
@@ -185,7 +185,8 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
eContext = EnumContext::Context::MultiObject;
break;
- default: break;
+ default:
+ break;
}
break;
}
@@ -194,8 +195,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
return eContext;
}
-
-EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SC (const sal_uInt16 nObjectId)
+EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SC(const sal_uInt16 nObjectId)
{
switch (nObjectId)
{
@@ -238,10 +238,8 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SC (const sal_uInt
}
}
-
-EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
- const sal_uInt16 nObjectId,
- const ViewType eViewType)
+EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD(const sal_uInt16 nObjectId,
+ const ViewType eViewType)
{
switch (nObjectId)
{
@@ -299,10 +297,9 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
}
}
-
-SdrInventor SelectionAnalyzer::GetInventorTypeFromMark (const SdrMarkList& rMarkList)
+SdrInventor SelectionAnalyzer::GetInventorTypeFromMark(const SdrMarkList& rMarkList)
{
- const size_t nMarkCount (rMarkList.GetMarkCount());
+ const size_t nMarkCount(rMarkList.GetMarkCount());
if (nMarkCount < 1)
return SdrInventor::Unknown;
@@ -311,11 +308,11 @@ SdrInventor SelectionAnalyzer::GetInventorTypeFromMark (const SdrMarkList& rMark
SdrObject* pObj = pMark->GetMarkedSdrObj();
const SdrInventor nFirstInv = pObj->GetObjInventor();
- for (size_t nIndex=1; nIndex<nMarkCount; ++nIndex)
+ for (size_t nIndex = 1; nIndex < nMarkCount; ++nIndex)
{
pMark = rMarkList.GetMark(nIndex);
pObj = pMark->GetMarkedSdrObj();
- const SdrInventor nInv (pObj->GetObjInventor());
+ const SdrInventor nInv(pObj->GetObjInventor());
if (nInv != nFirstInv)
return SdrInventor::Unknown;
@@ -324,15 +321,14 @@ SdrInventor SelectionAnalyzer::GetInventorTypeFromMark (const SdrMarkList& rMark
return nFirstInv;
}
-
-sal_uInt16 SelectionAnalyzer::GetObjectTypeFromGroup (const SdrObject* pObj)
+sal_uInt16 SelectionAnalyzer::GetObjectTypeFromGroup(const SdrObject* pObj)
{
SdrObjList* pObjList = pObj->GetSubList();
if (pObjList)
{
- const size_t nSubObjCount (pObjList->GetObjCount());
+ const size_t nSubObjCount(pObjList->GetObjCount());
- if (nSubObjCount>0)
+ if (nSubObjCount > 0)
{
SdrObject* pSubObj = pObjList->GetObj(0);
sal_uInt16 nResultType = pSubObj->GetObjIdentifier();
@@ -346,12 +342,12 @@ sal_uInt16 SelectionAnalyzer::GetObjectTypeFromGroup (const SdrObject* pObj)
if (IsTextObjType(nResultType))
nResultType = OBJ_TEXT;
- for (size_t nIndex=1; nIndex<nSubObjCount; ++nIndex)
+ for (size_t nIndex = 1; nIndex < nSubObjCount; ++nIndex)
{
pSubObj = pObjList->GetObj(nIndex);
- sal_uInt16 nType (pSubObj->GetObjIdentifier());
+ sal_uInt16 nType(pSubObj->GetObjIdentifier());
- if(nType == OBJ_GRUP)
+ if (nType == OBJ_GRUP)
nType = GetObjectTypeFromGroup(pSubObj);
if (IsShapeType(nType))
@@ -377,10 +373,9 @@ sal_uInt16 SelectionAnalyzer::GetObjectTypeFromGroup (const SdrObject* pObj)
return 0;
}
-
-sal_uInt16 SelectionAnalyzer::GetObjectTypeFromMark (const SdrMarkList& rMarkList)
+sal_uInt16 SelectionAnalyzer::GetObjectTypeFromMark(const SdrMarkList& rMarkList)
{
- const size_t nMarkCount (rMarkList.GetMarkCount());
+ const size_t nMarkCount(rMarkList.GetMarkCount());
if (nMarkCount < 1)
return 0;
@@ -389,7 +384,7 @@ sal_uInt16 SelectionAnalyzer::GetObjectTypeFromMark (const SdrMarkList& rMarkLi
SdrObject* pObj = pMark->GetMarkedSdrObj();
sal_uInt16 nResultType = pObj->GetObjIdentifier();
- if(nResultType == OBJ_GRUP)
+ if (nResultType == OBJ_GRUP)
nResultType = GetObjectTypeFromGroup(pObj);
if (IsShapeType(nResultType))
@@ -398,13 +393,13 @@ sal_uInt16 SelectionAnalyzer::GetObjectTypeFromMark (const SdrMarkList& rMarkLi
if (IsTextObjType(nResultType))
nResultType = OBJ_TEXT;
- for (size_t nIndex=1; nIndex<nMarkCount; ++nIndex)
+ for (size_t nIndex = 1; nIndex < nMarkCount; ++nIndex)
{
pMark = rMarkList.GetMark(nIndex);
pObj = pMark->GetMarkedSdrObj();
sal_uInt16 nType = pObj->GetObjIdentifier();
- if(nType == OBJ_GRUP)
+ if (nType == OBJ_GRUP)
nType = GetObjectTypeFromGroup(pObj);
if (IsShapeType(nType))
@@ -426,8 +421,7 @@ sal_uInt16 SelectionAnalyzer::GetObjectTypeFromMark (const SdrMarkList& rMarkLi
return nResultType;
}
-
-bool SelectionAnalyzer::IsShapeType (const sal_uInt16 nType)
+bool SelectionAnalyzer::IsShapeType(const sal_uInt16 nType)
{
switch (nType)
{
@@ -458,10 +452,9 @@ bool SelectionAnalyzer::IsShapeType (const sal_uInt16 nType)
}
}
-
-bool SelectionAnalyzer::IsTextObjType (const sal_uInt16 nType)
+bool SelectionAnalyzer::IsTextObjType(const sal_uInt16 nType)
{
- switch(nType)
+ switch (nType)
{
case OBJ_TEXT:
case OBJ_TITLETEXT:
@@ -473,7 +466,6 @@ bool SelectionAnalyzer::IsTextObjType (const sal_uInt16 nType)
}
}
-
} // end of namespace svx::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx
index 13e4f1c2a88d..6cd19ce7305c 100644
--- a/svx/source/sidebar/line/LineWidthPopup.cxx
+++ b/svx/source/sidebar/line/LineWidthPopup.cxx
@@ -29,8 +29,8 @@
#include "LineWidthValueSet.hxx"
#include <bitmaps.hlst>
-namespace svx::sidebar {
-
+namespace svx::sidebar
+{
LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rParent)
: m_rParent(rParent)
, m_sPt(SvxResId(RID_SVXSTR_PT))
@@ -48,7 +48,7 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa
{
m_xTopLevel->connect_focus_in(LINK(this, LineWidthPopup, FocusHdl));
- m_xVSWidth->SetStyle(m_xVSWidth->GetStyle() | WB_3DLOOK | WB_NO_DIRECTSELECT);
+ m_xVSWidth->SetStyle(m_xVSWidth->GetStyle() | WB_3DLOOK | WB_NO_DIRECTSELECT);
maStrUnits[0] = "0.5";
maStrUnits[1] = "0.8";
@@ -60,20 +60,20 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa
maStrUnits[7] = "6.0";
maStrUnits[8] = SvxResId(RID_SVXSTR_WIDTH_LAST_CUSTOM);
- const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+ const LocaleDataWrapper& rLocaleWrapper(Application::GetSettings().GetLocaleDataWrapper());
const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
- for(int i = 0; i <= 7 ; i++)
+ for (int i = 0; i <= 7; i++)
{
- maStrUnits[i] = maStrUnits[i].replace('.', cSep);//Modify
+ maStrUnits[i] = maStrUnits[i].replace('.', cSep); //Modify
maStrUnits[i] += " ";
maStrUnits[i] += m_sPt;
}
- for (sal_uInt16 i = 1 ; i <= 9; ++i)
+ for (sal_uInt16 i = 1; i <= 9; ++i)
{
m_xVSWidth->InsertItem(i);
- m_xVSWidth->SetItemText(i, maStrUnits[i-1]);
+ m_xVSWidth->SetItemText(i, maStrUnits[i - 1]);
}
m_xVSWidth->SetUnit(maStrUnits);
@@ -93,36 +93,37 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa
m_xMFWidth->connect_value_changed(LINK(this, LineWidthPopup, MFModifyHdl));
}
-LineWidthPopup::~LineWidthPopup()
-{
-}
+LineWidthPopup::~LineWidthPopup() {}
IMPL_LINK_NOARG(LineWidthPopup, VSSelectHdl, ValueSet*, void)
{
sal_uInt16 iPos = m_xVSWidth->GetSelectedItemId();
if (iPos >= 1 && iPos <= 8)
{
- sal_IntPtr nVal = OutputDevice::LogicToLogic(reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData( iPos )), MapUnit::MapPoint, m_eMapUnit);
+ sal_IntPtr nVal = OutputDevice::LogicToLogic(
+ reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData(iPos)), MapUnit::MapPoint,
+ m_eMapUnit);
nVal = m_xMFWidth->denormalize(nVal);
- XLineWidthItem aWidthItem( nVal );
+ XLineWidthItem aWidthItem(nVal);
m_rParent.setLineWidth(aWidthItem);
m_rParent.SetWidthIcon(iPos);
m_rParent.SetWidth(nVal);
}
else if (iPos == 9)
- {//last custom
+ { //last custom
//modified
if (m_bCustom)
{
- tools::Long nVal = OutputDevice::LogicToLogic(m_nCustomWidth , MapUnit::MapPoint, m_eMapUnit);
+ tools::Long nVal
+ = OutputDevice::LogicToLogic(m_nCustomWidth, MapUnit::MapPoint, m_eMapUnit);
nVal = m_xMFWidth->denormalize(nVal);
- XLineWidthItem aWidthItem( nVal );
+ XLineWidthItem aWidthItem(nVal);
m_rParent.setLineWidth(aWidthItem);
m_rParent.SetWidth(nVal);
}
else
{
- m_xVSWidth->SetNoSelection(); //add , set no selection and keep the last select item
+ m_xVSWidth->SetNoSelection(); //add , set no selection and keep the last select item
m_xVSWidth->SetFormat();
m_xVSWidth->Invalidate();
}
@@ -144,8 +145,8 @@ IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void)
m_xVSWidth->Invalidate();
}
tools::Long nTmp = static_cast<tools::Long>(m_xMFWidth->get_value(FieldUnit::NONE));
- tools::Long nVal = OutputDevice::LogicToLogic( nTmp, MapUnit::MapPoint, m_eMapUnit );
- sal_Int32 nNewWidth = static_cast<short>(m_xMFWidth->denormalize( nVal ));
+ tools::Long nVal = OutputDevice::LogicToLogic(nTmp, MapUnit::MapPoint, m_eMapUnit);
+ sal_Int32 nNewWidth = static_cast<short>(m_xMFWidth->denormalize(nVal));
XLineWidthItem aWidthItem(nNewWidth);
m_rParent.setLineWidth(aWidthItem);
}
@@ -155,22 +156,21 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit
m_bVSFocus = true;
m_xVSWidth->SetSelItem(0);
m_eMapUnit = eMapUnit;
- SvtViewOptions aWinOpt( EViewType::Window, "PopupPanel_LineWidth" );
+ SvtViewOptions aWinOpt(EViewType::Window, "PopupPanel_LineWidth");
if (aWinOpt.Exists())
{
- css::uno::Sequence <css::beans::NamedValue> aSeq = aWinOpt.GetUserData();
+ css::uno::Sequence<css::beans::NamedValue> aSeq = aWinOpt.GetUserData();
OUString aTmp;
- if ( aSeq.hasElements())
+ if (aSeq.hasElements())
aSeq[0].Value >>= aTmp;
- OUString aWinData( aTmp );
+ OUString aWinData(aTmp);
m_nCustomWidth = aWinData.toInt32();
m_bCustom = true;
m_xVSWidth->SetImage(m_aIMGCus);
m_xVSWidth->SetCusEnable(true);
- OUString aStrTip = OUString::number( static_cast<double>(m_nCustomWidth) / 10) +
- m_sPt;
+ OUString aStrTip = OUString::number(static_cast<double>(m_nCustomWidth) / 10) + m_sPt;
m_xVSWidth->SetItemText(9, aStrTip);
}
else
@@ -183,27 +183,27 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit
if (bValuable)
{
- sal_Int64 nVal = OutputDevice::LogicToLogic(lValue, eMapUnit, MapUnit::Map100thMM );
+ sal_Int64 nVal = OutputDevice::LogicToLogic(lValue, eMapUnit, MapUnit::Map100thMM);
nVal = m_xMFWidth->normalize(nVal);
- m_xMFWidth->set_value( nVal, FieldUnit::MM_100TH );
+ m_xMFWidth->set_value(nVal, FieldUnit::MM_100TH);
}
else
{
- m_xMFWidth->set_text( "" );
+ m_xMFWidth->set_text("");
}
OUString strCurrValue = m_xMFWidth->get_text();
sal_uInt16 i = 0;
- for(; i < 8; i++)
+ for (; i < 8; i++)
{
if (strCurrValue == maStrUnits[i])
{
- m_xVSWidth->SetSelItem(i+1);
+ m_xVSWidth->SetSelItem(i + 1);
break;
}
}
- if (i>=8)
+ if (i >= 8)
{
m_bVSFocus = false;
m_xVSWidth->SetSelItem(0);
diff --git a/svx/source/sidebar/nbdtmgfact.cxx b/svx/source/sidebar/nbdtmgfact.cxx
index b5263c7619dc..14dcd64c434b 100644
--- a/svx/source/sidebar/nbdtmgfact.cxx
+++ b/svx/source/sidebar/nbdtmgfact.cxx
@@ -19,25 +19,24 @@
#include <svx/nbdtmgfact.hxx>
-namespace svx::sidebar::NBOutlineTypeMgrFact {
-
+namespace svx::sidebar::NBOutlineTypeMgrFact
+{
NBOTypeMgrBase* CreateInstance(const NBOType aType)
{
- if ( aType == NBOType::Bullets )
+ if (aType == NBOType::Bullets)
{
return &BulletsTypeMgr::GetInstance();
}
- else if ( aType == NBOType::Numbering )
+ else if (aType == NBOType::Numbering)
{
return &NumberingTypeMgr::GetInstance();
}
- else if ( aType == NBOType::Outline )
+ else if (aType == NBOType::Outline)
{
return &OutlineTypeMgr::GetInstance();
}
return nullptr;
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx
index 2d2e59f79f78..2f5714aeaba3 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx
@@ -24,14 +24,15 @@
using namespace svx;
-SvxLineSpacingToolBoxControl::SvxLineSpacingToolBoxControl(const css::uno::Reference<css::uno::XComponentContext>& rContext)
+SvxLineSpacingToolBoxControl::SvxLineSpacingToolBoxControl(
+ const css::uno::Reference<css::uno::XComponentContext>& rContext)
: PopupWindowController(rContext, nullptr, OUString())
{
}
SvxLineSpacingToolBoxControl::~SvxLineSpacingToolBoxControl() {}
-void SvxLineSpacingToolBoxControl::initialize( const css::uno::Sequence< css::uno::Any >& rArguments )
+void SvxLineSpacingToolBoxControl::initialize(const css::uno::Sequence<css::uno::Any>& rArguments)
{
PopupWindowController::initialize(rArguments);
@@ -67,9 +68,10 @@ std::unique_ptr<WeldToolbarPopup> SvxLineSpacingToolBoxControl::weldPopupWindow(
return std::make_unique<ParaLineSpacingControl>(this, m_pToolbar);
}
-VclPtr<vcl::Window> SvxLineSpacingToolBoxControl::createVclPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> SvxLineSpacingToolBoxControl::createVclPopupWindow(vcl::Window* pParent)
{
- mxInterimPopover = VclPtr<InterimToolbarPopup>::Create(getFrameInterface(), pParent,
+ mxInterimPopover = VclPtr<InterimToolbarPopup>::Create(
+ getFrameInterface(), pParent,
std::make_unique<ParaLineSpacingControl>(this, pParent->GetFrameWeld()));
mxInterimPopover->Show();
@@ -87,12 +89,11 @@ css::uno::Sequence<OUString> SvxLineSpacingToolBoxControl::getSupportedServiceNa
return { "com.sun.star.frame.ToolbarController" };
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_LineSpacingToolBoxControl_get_implementation(
- css::uno::XComponentContext* rContext,
- css::uno::Sequence<css::uno::Any> const & )
+ css::uno::XComponentContext* rContext, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire( new SvxLineSpacingToolBoxControl( rContext ) );
+ return cppu::acquire(new SvxLineSpacingToolBoxControl(rContext));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx
index 7957b1794e46..7b10c3a30b02 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx
@@ -22,12 +22,13 @@
using namespace svx;
-TextCharacterSpacingPopup::TextCharacterSpacingPopup(const css::uno::Reference<css::uno::XComponentContext>& rContext)
+TextCharacterSpacingPopup::TextCharacterSpacingPopup(
+ const css::uno::Reference<css::uno::XComponentContext>& rContext)
: PopupWindowController(rContext, nullptr, OUString())
{
}
-void TextCharacterSpacingPopup::initialize( const css::uno::Sequence< css::uno::Any >& rArguments )
+void TextCharacterSpacingPopup::initialize(const css::uno::Sequence<css::uno::Any>& rArguments)
{
PopupWindowController::initialize(rArguments);
@@ -43,18 +44,17 @@ void TextCharacterSpacingPopup::initialize( const css::uno::Sequence< css::uno::
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
-TextCharacterSpacingPopup::~TextCharacterSpacingPopup()
-{
-}
+TextCharacterSpacingPopup::~TextCharacterSpacingPopup() {}
std::unique_ptr<WeldToolbarPopup> TextCharacterSpacingPopup::weldPopupWindow()
{
return std::make_unique<TextCharacterSpacingControl>(this, m_pToolbar);
}
-VclPtr<vcl::Window> TextCharacterSpacingPopup::createVclPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> TextCharacterSpacingPopup::createVclPopupWindow(vcl::Window* pParent)
{
- mxInterimPopover = VclPtr<InterimToolbarPopup>::Create(getFrameInterface(), pParent,
+ mxInterimPopover = VclPtr<InterimToolbarPopup>::Create(
+ getFrameInterface(), pParent,
std::make_unique<TextCharacterSpacingControl>(this, pParent->GetFrameWeld()));
mxInterimPopover->Show();
@@ -72,10 +72,9 @@ css::uno::Sequence<OUString> TextCharacterSpacingPopup::getSupportedServiceNames
return { "com.sun.star.frame.ToolbarController" };
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_CharacterSpacingToolBoxControl_get_implementation(
- css::uno::XComponentContext* rContext,
- css::uno::Sequence<css::uno::Any> const & )
+ css::uno::XComponentContext* rContext, css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new TextCharacterSpacingPopup(rContext));
}
diff --git a/svx/source/sidebar/text/TextUnderlinePopup.cxx b/svx/source/sidebar/text/TextUnderlinePopup.cxx
index 1da5bfe7f7ea..dc35892871b0 100644
--- a/svx/source/sidebar/text/TextUnderlinePopup.cxx
+++ b/svx/source/sidebar/text/TextUnderlinePopup.cxx
@@ -22,16 +22,15 @@
using namespace svx;
-TextUnderlinePopup::TextUnderlinePopup(const css::uno::Reference<css::uno::XComponentContext>& rContext)
+TextUnderlinePopup::TextUnderlinePopup(
+ const css::uno::Reference<css::uno::XComponentContext>& rContext)
: PopupWindowController(rContext, nullptr, OUString())
{
}
-TextUnderlinePopup::~TextUnderlinePopup()
-{
-}
+TextUnderlinePopup::~TextUnderlinePopup() {}
-void TextUnderlinePopup::initialize( const css::uno::Sequence< css::uno::Any >& rArguments )
+void TextUnderlinePopup::initialize(const css::uno::Sequence<css::uno::Any>& rArguments)
{
PopupWindowController::initialize(rArguments);
@@ -52,9 +51,10 @@ std::unique_ptr<WeldToolbarPopup> TextUnderlinePopup::weldPopupWindow()
return std::make_unique<TextUnderlineControl>(this, m_pToolbar);
}
-VclPtr<vcl::Window> TextUnderlinePopup::createVclPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> TextUnderlinePopup::createVclPopupWindow(vcl::Window* pParent)
{
- mxInterimPopover = VclPtr<InterimToolbarPopup>::Create(getFrameInterface(), pParent,
+ mxInterimPopover = VclPtr<InterimToolbarPopup>::Create(
+ getFrameInterface(), pParent,
std::make_unique<TextUnderlineControl>(this, pParent->GetFrameWeld()));
mxInterimPopover->Show();
@@ -72,10 +72,9 @@ css::uno::Sequence<OUString> TextUnderlinePopup::getSupportedServiceNames()
return { "com.sun.star.frame.ToolbarController" };
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_UnderlineToolBoxControl_get_implementation(
- css::uno::XComponentContext* rContext,
- css::uno::Sequence<css::uno::Any> const & )
+ css::uno::XComponentContext* rContext, css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new TextUnderlinePopup(rContext));
}
diff --git a/svx/source/svdraw/sdrundomanager.cxx b/svx/source/svdraw/sdrundomanager.cxx
index 78e72e76196a..1e64a1a89482 100644
--- a/svx/source/svdraw/sdrundomanager.cxx
+++ b/svx/source/svdraw/sdrundomanager.cxx
@@ -22,7 +22,7 @@
#include <svl/hint.hxx>
SdrUndoManager::SdrUndoManager()
- : EditUndoManager(20/*nMaxUndoActionCount*/)
+ : EditUndoManager(20 /*nMaxUndoActionCount*/)
, maEndTextEditHdl()
, mpLastUndoActionBeforeTextEdit(nullptr)
, mbEndTextEditTriggeredFromUndo(false)
@@ -30,18 +30,16 @@ SdrUndoManager::SdrUndoManager()
{
}
-SdrUndoManager::~SdrUndoManager()
-{
-}
+SdrUndoManager::~SdrUndoManager() {}
bool SdrUndoManager::Undo()
{
- if(isTextEditActive())
+ if (isTextEditActive())
{
bool bRetval(false);
// we are in text edit mode
- if(GetUndoActionCount() && mpLastUndoActionBeforeTextEdit != GetUndoAction())
+ if (GetUndoActionCount() && mpLastUndoActionBeforeTextEdit != GetUndoAction())
{
// there is an undo action for text edit, trigger it
bRetval = EditUndoManager::Undo();
@@ -67,13 +65,13 @@ bool SdrUndoManager::Redo()
{
bool bRetval(false);
- if(isTextEditActive())
+ if (isTextEditActive())
{
// we are in text edit mode
bRetval = EditUndoManager::Redo();
}
- if(!bRetval)
+ if (!bRetval)
{
// no redo triggered up to now, trigger local one
bRetval = SfxUndoManager::Redo();
@@ -84,9 +82,9 @@ bool SdrUndoManager::Redo()
void SdrUndoManager::Clear()
{
- if(isTextEditActive())
+ if (isTextEditActive())
{
- while(GetUndoActionCount() && mpLastUndoActionBeforeTextEdit != GetUndoAction())
+ while (GetUndoActionCount() && mpLastUndoActionBeforeTextEdit != GetUndoAction())
{
RemoveLastUndoAction();
}
@@ -101,11 +99,11 @@ void SdrUndoManager::Clear()
}
}
-void SdrUndoManager::SetEndTextEditHdl(const Link<SdrUndoManager*,void>& rLink)
+void SdrUndoManager::SetEndTextEditHdl(const Link<SdrUndoManager*, void>& rLink)
{
maEndTextEditHdl = rLink;
- if(isTextEditActive())
+ if (isTextEditActive())
{
// text edit start, remember last non-textedit action for later cleanup
mpLastUndoActionBeforeTextEdit = GetUndoActionCount() ? GetUndoAction() : nullptr;
@@ -115,7 +113,7 @@ void SdrUndoManager::SetEndTextEditHdl(const Link<SdrUndoManager*,void>& rLink)
// text edit ends, pop all textedit actions up to the remembered non-textedit action from the start
// to set back the UndoManager to the state before text edit started. If that action is already gone
// (due to being removed from the undo stack in the meantime), all need to be removed anyways
- while(GetUndoActionCount() && mpLastUndoActionBeforeTextEdit != GetUndoAction())
+ while (GetUndoActionCount() && mpLastUndoActionBeforeTextEdit != GetUndoAction())
{
RemoveLastUndoAction();
}
@@ -128,15 +126,9 @@ void SdrUndoManager::SetEndTextEditHdl(const Link<SdrUndoManager*,void>& rLink)
}
}
-bool SdrUndoManager::isTextEditActive() const
-{
- return maEndTextEditHdl.IsSet();
-}
+bool SdrUndoManager::isTextEditActive() const { return maEndTextEditHdl.IsSet(); }
-void SdrUndoManager::SetDocShell(SfxObjectShell* pDocShell)
-{
- m_pDocSh = pDocShell;
-}
+void SdrUndoManager::SetDocShell(SfxObjectShell* pDocShell) { m_pDocSh = pDocShell; }
void SdrUndoManager::EmptyActionsChanged()
{
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index 2c7223fa563a..3fc45abff2f4 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <svx/svdoattr.hxx>
#include <svx/svdmodel.hxx>
#include <svl/hint.hxx>
@@ -35,19 +34,16 @@ std::unique_ptr<sdr::properties::BaseProperties> SdrAttrObj::CreateObjectSpecifi
return std::make_unique<sdr::properties::AttributeProperties>(*this);
}
-
SdrAttrObj::SdrAttrObj(SdrModel& rSdrModel)
-: SdrObject(rSdrModel)
+ : SdrObject(rSdrModel)
{
}
-SdrAttrObj::~SdrAttrObj()
-{
-}
+SdrAttrObj::~SdrAttrObj() {}
const tools::Rectangle& SdrAttrObj::GetSnapRect() const
{
- if(bSnapRectDirty)
+ if (bSnapRectDirty)
{
const_cast<SdrAttrObj*>(this)->RecalcSnapRect();
const_cast<SdrAttrObj*>(this)->bSnapRectDirty = false;
@@ -61,7 +57,7 @@ void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
bool bDataChg(SfxHintId::DataChanged == rHint.GetId());
- if(bDataChg)
+ if (bDataChg)
{
tools::Rectangle aBoundRect = GetLastBoundRect();
SetBoundRectDirty();
@@ -78,7 +74,7 @@ sal_Int32 SdrAttrObj::ImpGetLineWdt() const
{
sal_Int32 nRetval(0);
- if(drawing::LineStyle_NONE != GetObjectItem(XATTR_LINESTYLE).GetValue())
+ if (drawing::LineStyle_NONE != GetObjectItem(XATTR_LINESTYLE).GetValue())
{
nRetval = GetObjectItem(XATTR_LINEWIDTH).GetValue();
}
@@ -88,12 +84,15 @@ sal_Int32 SdrAttrObj::ImpGetLineWdt() const
bool SdrAttrObj::HasFill() const
{
- return bClosedObj && GetProperties().GetObjectItemSet().Get(XATTR_FILLSTYLE).GetValue() != drawing::FillStyle_NONE;
+ return bClosedObj
+ && GetProperties().GetObjectItemSet().Get(XATTR_FILLSTYLE).GetValue()
+ != drawing::FillStyle_NONE;
}
bool SdrAttrObj::HasLine() const
{
- return GetProperties().GetObjectItemSet().Get(XATTR_LINESTYLE).GetValue() != drawing::LineStyle_NONE;
+ return GetProperties().GetObjectItemSet().Get(XATTR_LINESTYLE).GetValue()
+ != drawing::LineStyle_NONE;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdviter.cxx b/svx/source/svdraw/svdviter.cxx
index 8c4c2c970607..ff2d6da5f7a3 100644
--- a/svx/source/svdraw/svdviter.cxx
+++ b/svx/source/svdraw/svdviter.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <svx/svdviter.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdpage.hxx>
@@ -26,14 +25,12 @@
#include <svx/svdpagv.hxx>
#include <svx/svdsob.hxx>
-
void SdrViewIter::ImpInitVars()
{
mnListenerNum = 0;
mpCurrentView = nullptr;
}
-
SdrViewIter::SdrViewIter(const SdrPage* pPage)
{
mpPage = pPage;
@@ -42,14 +39,13 @@ SdrViewIter::SdrViewIter(const SdrPage* pPage)
ImpInitVars();
}
-
SdrViewIter::SdrViewIter(const SdrObject* pObject)
{
mpObject = pObject;
mpModel = pObject ? &pObject->getSdrModelFromSdrObject() : nullptr;
mpPage = pObject ? pObject->getSdrPageFromSdrObject() : nullptr;
- if(!mpModel || !mpPage)
+ if (!mpModel || !mpPage)
{
mpModel = nullptr;
mpPage = nullptr;
@@ -58,18 +54,17 @@ SdrViewIter::SdrViewIter(const SdrObject* pObject)
ImpInitVars();
}
-
-bool SdrViewIter::ImpCheckPageView(SdrPageView const * pPV) const
+bool SdrViewIter::ImpCheckPageView(SdrPageView const* pPV) const
{
- if(!mpPage)
+ if (!mpPage)
return true;
bool bMaster(mpPage->IsMasterPage());
SdrPage* pPg = pPV->GetPage();
- if(pPg == mpPage)
+ if (pPg == mpPage)
{
- if(mpObject)
+ if (mpObject)
{
// Looking for an object? First, determine if it visible in
// this PageView.
@@ -83,16 +78,16 @@ bool SdrViewIter::ImpCheckPageView(SdrPageView const * pPV) const
return true;
}
}
- else if(bMaster && (!mpObject || !mpObject->IsNotVisibleAsMaster()))
+ else if (bMaster && (!mpObject || !mpObject->IsNotVisibleAsMaster()))
{
- if(pPg->TRG_HasMasterPage())
+ if (pPg->TRG_HasMasterPage())
{
SdrPage& rMasterPage = pPg->TRG_GetMasterPage();
- if(&rMasterPage == mpPage)
+ if (&rMasterPage == mpPage)
{
// the page we're looking for is a master page in this PageView
- if(mpObject)
+ if (mpObject)
{
// Looking for an object? First, determine if it visible in
// this PageView.
@@ -101,7 +96,7 @@ bool SdrViewIter::ImpCheckPageView(SdrPageView const * pPV) const
aObjLay &= pPV->GetVisibleLayers();
aObjLay &= pPg->TRG_GetMasterPageVisibleLayers();
- if(!aObjLay.IsEmpty())
+ if (!aObjLay.IsEmpty())
{
return true;
} // else, look at the next master page of this page...
@@ -120,22 +115,22 @@ bool SdrViewIter::ImpCheckPageView(SdrPageView const * pPV) const
SdrView* SdrViewIter::ImpFindView()
{
- if(mpModel)
+ if (mpModel)
{
const size_t nLsCnt(mpModel->GetSizeOfVector());
- while(mnListenerNum < nLsCnt)
+ while (mnListenerNum < nLsCnt)
{
SfxListener* pLs = mpModel->GetListener(mnListenerNum);
- mpCurrentView = dynamic_cast<SdrView*>( pLs );
+ mpCurrentView = dynamic_cast<SdrView*>(pLs);
- if(mpCurrentView)
+ if (mpCurrentView)
{
- if(mpPage)
+ if (mpPage)
{
SdrPageView* pPV = mpCurrentView->GetSdrPageView();
- if(pPV && ImpCheckPageView(pPV))
+ if (pPV && ImpCheckPageView(pPV))
{
return mpCurrentView;
}
@@ -154,14 +149,12 @@ SdrView* SdrViewIter::ImpFindView()
return mpCurrentView;
}
-
SdrView* SdrViewIter::FirstView()
{
ImpInitVars();
return ImpFindView();
}
-
SdrView* SdrViewIter::NextView()
{
mnListenerNum++;
diff --git a/svx/source/table/tablerows.hxx b/svx/source/table/tablerows.hxx
index 154cbeb87dab..3b25d3d9e5f2 100644
--- a/svx/source/table/tablerows.hxx
+++ b/svx/source/table/tablerows.hxx
@@ -25,13 +25,12 @@
#include <celltypes.hxx>
-
-namespace sdr::table {
-
-class TableRows : public ::cppu::WeakAggImplHelper1< css::table::XTableRows >
+namespace sdr::table
+{
+class TableRows : public ::cppu::WeakAggImplHelper1<css::table::XTableRows>
{
public:
- explicit TableRows( const TableModelRef& xTableModel );
+ explicit TableRows(const TableModelRef& xTableModel);
virtual ~TableRows() override;
void dispose();
@@ -39,21 +38,20 @@ public:
void throwIfDisposed() const;
// XTableRows
- virtual void SAL_CALL insertByIndex( sal_Int32 nIndex, sal_Int32 nCount ) override;
- virtual void SAL_CALL removeByIndex( sal_Int32 nIndex, sal_Int32 nCount ) override;
+ virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) override;
+ virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) override;
// XIndexAccess
- virtual sal_Int32 SAL_CALL getCount( ) override;
- virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
+ virtual sal_Int32 SAL_CALL getCount() override;
+ virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override;
// Methods
virtual css::uno::Type SAL_CALL getElementType() override;
virtual sal_Bool SAL_CALL hasElements() override;
private:
- TableModelRef mxTableModel;
+ TableModelRef mxTableModel;
};
-
}
#endif
diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx b/svx/source/tbxctrls/SvxPresetListBox.cxx
index bc8b93ec3464..9cfe5894b8e9 100644
--- a/svx/source/tbxctrls/SvxPresetListBox.cxx
+++ b/svx/source/tbxctrls/SvxPresetListBox.cxx
@@ -50,11 +50,13 @@ bool SvxPresetListBox::Command(const CommandEvent& rEvent)
if (rEvent.GetCommand() != CommandEventId::ContextMenu)
return CustomWidgetController::Command(rEvent);
const sal_uInt16 nIndex = GetSelectedItemId();
- if(nIndex > 0)
+ if (nIndex > 0)
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), "svx/ui/presetmenu.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(
+ Application::CreateBuilder(GetDrawingArea(), "svx/ui/presetmenu.ui"));
std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu"));
- OnMenuItemSelected(xMenu->popup_at_rect(GetDrawingArea(), tools::Rectangle(rEvent.GetMousePosPixel(), Size(1,1))));
+ OnMenuItemSelected(xMenu->popup_at_rect(
+ GetDrawingArea(), tools::Rectangle(rEvent.GetMousePosPixel(), Size(1, 1))));
return true;
}
return false;
@@ -66,37 +68,37 @@ void SvxPresetListBox::DrawLayout()
SetLineCount(5);
}
-template< typename ListType, typename EntryType >
-void SvxPresetListBox::FillPresetListBoxImpl(ListType & pList, sal_uInt32 nStartIndex)
+template <typename ListType, typename EntryType>
+void SvxPresetListBox::FillPresetListBoxImpl(ListType& pList, sal_uInt32 nStartIndex)
{
- const Size aSize( GetIconSize() );
+ const Size aSize(GetIconSize());
BitmapEx aBitmap;
- for(tools::Long nIndex = 0; nIndex < pList.Count(); nIndex++, nStartIndex++)
+ for (tools::Long nIndex = 0; nIndex < pList.Count(); nIndex++, nStartIndex++)
{
aBitmap = pList.GetBitmapForPreview(nIndex, aSize);
- EntryType* pItem = static_cast<EntryType*>( pList.Get(nIndex) );
+ EntryType* pItem = static_cast<EntryType*>(pList.Get(nIndex));
InsertItem(nStartIndex, Image(aBitmap), pItem->GetName());
}
}
void SvxPresetListBox::FillPresetListBox(XGradientList& pList, sal_uInt32 nStartIndex)
{
- FillPresetListBoxImpl< XGradientList, XGradientEntry>( pList, nStartIndex );
+ FillPresetListBoxImpl<XGradientList, XGradientEntry>(pList, nStartIndex);
}
void SvxPresetListBox::FillPresetListBox(XHatchList& pList, sal_uInt32 nStartIndex)
{
- FillPresetListBoxImpl< XHatchList, XHatchEntry>( pList, nStartIndex );
+ FillPresetListBoxImpl<XHatchList, XHatchEntry>(pList, nStartIndex);
}
void SvxPresetListBox::FillPresetListBox(XBitmapList& pList, sal_uInt32 nStartIndex)
{
- FillPresetListBoxImpl< XBitmapList, XBitmapEntry >( pList, nStartIndex );
+ FillPresetListBoxImpl<XBitmapList, XBitmapEntry>(pList, nStartIndex);
}
void SvxPresetListBox::FillPresetListBox(XPatternList& pList, sal_uInt32 nStartIndex)
{
- FillPresetListBoxImpl< XPatternList, XBitmapEntry >( pList, nStartIndex );
+ FillPresetListBoxImpl<XPatternList, XBitmapEntry>(pList, nStartIndex);
}
void SvxPresetListBox::OnMenuItemSelected(const OString& rIdent)
diff --git a/svx/source/tbxctrls/verttexttbxctrl.cxx b/svx/source/tbxctrls/verttexttbxctrl.cxx
index 431af7ee6a45..40db5fef5c31 100644
--- a/svx/source/tbxctrls/verttexttbxctrl.cxx
+++ b/svx/source/tbxctrls/verttexttbxctrl.cxx
@@ -24,7 +24,8 @@
#include <vcl/weld.hxx>
#include <rtl/ustring.hxx>
-SvxCTLTextTbxCtrl::SvxCTLTextTbxCtrl(const css::uno::Reference<css::uno::XComponentContext>& rContext)
+SvxCTLTextTbxCtrl::SvxCTLTextTbxCtrl(
+ const css::uno::Reference<css::uno::XComponentContext>& rContext)
: SvxVertCTLTextTbxCtrl(rContext)
{
addStatusListener(".uno:CTLFontState");
@@ -35,15 +36,15 @@ OUString SvxCTLTextTbxCtrl::getImplementationName()
return "com.sun.star.comp.svx.CTLToolBoxControl";
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
-com_sun_star_comp_svx_CTLToolBoxControl_get_implementation(
- css::uno::XComponentContext* rContext,
- css::uno::Sequence<css::uno::Any> const & )
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+com_sun_star_comp_svx_CTLToolBoxControl_get_implementation(css::uno::XComponentContext* rContext,
+ css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new SvxCTLTextTbxCtrl(rContext));
}
-SvxVertTextTbxCtrl::SvxVertTextTbxCtrl(const css::uno::Reference<css::uno::XComponentContext>& rContext)
+SvxVertTextTbxCtrl::SvxVertTextTbxCtrl(
+ const css::uno::Reference<css::uno::XComponentContext>& rContext)
: SvxVertCTLTextTbxCtrl(rContext)
{
addStatusListener(".uno:VerticalTextState");
@@ -54,23 +55,21 @@ OUString SvxVertTextTbxCtrl::getImplementationName()
return "com.sun.star.comp.svx.VertTextToolBoxControl";
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_VertTextToolBoxControl_get_implementation(
- css::uno::XComponentContext* rContext,
- css::uno::Sequence<css::uno::Any> const & )
+ css::uno::XComponentContext* rContext, css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new SvxVertTextTbxCtrl(rContext));
}
-SvxVertCTLTextTbxCtrl::SvxVertCTLTextTbxCtrl(const css::uno::Reference<css::uno::XComponentContext>& rContext)
+SvxVertCTLTextTbxCtrl::SvxVertCTLTextTbxCtrl(
+ const css::uno::Reference<css::uno::XComponentContext>& rContext)
: SvxVertCTLTextTbxCtrl_Base(rContext, nullptr, OUString())
, m_bVisible(false)
{
}
-SvxVertCTLTextTbxCtrl::~SvxVertCTLTextTbxCtrl( )
-{
-}
+SvxVertCTLTextTbxCtrl::~SvxVertCTLTextTbxCtrl() {}
void SAL_CALL SvxVertCTLTextTbxCtrl::initialize(const css::uno::Sequence<css::uno::Any>& rArguments)
{
@@ -143,19 +142,19 @@ void SAL_CALL SvxVertCTLTextTbxCtrl::statusChanged(const css::frame::FeatureStat
if (WindowType::FLOATINGWINDOW == pParent->GetType())
{
Size aSize(pToolBox->CalcWindowSizePixel());
- pToolBox->SetPosSizePixel( Point(), aSize );
- pParent->SetOutputSizePixel( aSize );
+ pToolBox->SetPosSizePixel(Point(), aSize);
+ pParent->SetOutputSizePixel(aSize);
}
}
}
// XServiceInfo
-sal_Bool SAL_CALL SvxVertCTLTextTbxCtrl::supportsService( const OUString& ServiceName )
+sal_Bool SAL_CALL SvxVertCTLTextTbxCtrl::supportsService(const OUString& ServiceName)
{
return cppu::supportsService(this, ServiceName);
}
-css::uno::Sequence< OUString > SvxVertCTLTextTbxCtrl::getSupportedServiceNames()
+css::uno::Sequence<OUString> SvxVertCTLTextTbxCtrl::getSupportedServiceNames()
{
return { "com.sun.star.frame.ToolbarController" };
}
diff --git a/svx/source/uitest/sdrobject.cxx b/svx/source/uitest/sdrobject.cxx
index d58ecc36e76c..0892556791d2 100644
--- a/svx/source/uitest/sdrobject.cxx
+++ b/svx/source/uitest/sdrobject.cxx
@@ -16,9 +16,7 @@
#include <memory>
#include <svx/SvxColorValueSet.hxx>
-SdrUIObject::~SdrUIObject()
-{
-}
+SdrUIObject::~SdrUIObject() {}
StringMap SdrUIObject::get_state()
{
@@ -51,8 +49,7 @@ StringMap SdrUIObject::get_state()
return aMap;
}
-void SdrUIObject::execute(const OUString& rAction,
- const StringMap& rParameters)
+void SdrUIObject::execute(const OUString& rAction, const StringMap& rParameters)
{
SdrObject* pObj = get_object();
if (!pObj)
@@ -98,7 +95,7 @@ void SdrUIObject::execute(const OUString& rAction,
throw css::uno::RuntimeException("missing parameter FRAC_Y");
double nFracY = itrFracY->second.toDouble();
Fraction aFracY(nFracY);
- pObj->Resize(aPos, aFracX, aFracY, true/*bRelative*/);
+ pObj->Resize(aPos, aFracX, aFracY, true /*bRelative*/);
}
else if (rAction == "CROP")
{
@@ -143,7 +140,7 @@ void SdrUIObject::execute(const OUString& rAction,
Point aPos(nX, nY);
auto itrAngle = rParameters.find("ANGLE");
- if (itrAngle == rParameters.end())
+ if (itrAngle == rParameters.end())
throw css::uno::RuntimeException("missing parameter ANGLE");
double nAngle = itrAngle->second.toDouble();
@@ -155,15 +152,11 @@ void SdrUIObject::execute(const OUString& rAction,
}
else if (rAction == "SHEAR")
{
- pObj->Shear(Point(), 0.0/*nAngle*/, 0, false);
+ pObj->Shear(Point(), 0.0 /*nAngle*/, 0, false);
}
}
-OUString SdrUIObject::get_type() const
-{
- return "SdrUIObject";
-}
-
+OUString SdrUIObject::get_type() const { return "SdrUIObject"; }
SvxColorValueSetUIObject::SvxColorValueSetUIObject(vcl::Window* pColorSetWin)
: DrawingAreaUIObject(pColorSetWin)
@@ -171,8 +164,7 @@ SvxColorValueSetUIObject::SvxColorValueSetUIObject(vcl::Window* pColorSetWin)
{
}
-void SvxColorValueSetUIObject::execute(const OUString& rAction,
- const StringMap& rParameters)
+void SvxColorValueSetUIObject::execute(const OUString& rAction, const StringMap& rParameters)
{
if (rAction == "CHOOSE")
{
@@ -185,7 +177,7 @@ void SvxColorValueSetUIObject::execute(const OUString& rAction,
}
}
else
- DrawingAreaUIObject::execute(rAction, rParameters);
+ DrawingAreaUIObject::execute(rAction, rParameters);
}
std::unique_ptr<UIObject> SvxColorValueSetUIObject::create(vcl::Window* pWindow)
@@ -193,16 +185,13 @@ std::unique_ptr<UIObject> SvxColorValueSetUIObject::create(vcl::Window* pWindow)
return std::unique_ptr<UIObject>(new SvxColorValueSetUIObject(pWindow));
}
-OUString SvxColorValueSetUIObject::get_name() const
-{
- return "SvxColorValueSetUIObject";
-}
+OUString SvxColorValueSetUIObject::get_name() const { return "SvxColorValueSetUIObject"; }
StringMap SvxColorValueSetUIObject::get_state()
{
StringMap aMap = DrawingAreaUIObject::get_state();
- aMap["CurrColorId"] = OUString::number( mpColorSet->GetSelectedItemId() );
- aMap["CurrColorPos"] = OUString::number( mpColorSet->GetSelectItemPos() );
+ aMap["CurrColorId"] = OUString::number(mpColorSet->GetSelectedItemId());
+ aMap["CurrColorPos"] = OUString::number(mpColorSet->GetSelectItemPos());
aMap["ColorsCount"] = OUString::number(mpColorSet->GetItemCount());
aMap["ColCount"] = OUString::number(mpColorSet->GetColCount());
aMap["ColorText"] = mpColorSet->GetItemText(mpColorSet->GetSelectedItemId());
@@ -210,7 +199,9 @@ StringMap SvxColorValueSetUIObject::get_state()
aMap["R"] = OUString::number(currColor.GetRed());
aMap["G"] = OUString::number(currColor.GetGreen());
aMap["B"] = OUString::number(currColor.GetBlue());
- aMap["RGB"] = "("+OUString::number(currColor.GetRed())+","+OUString::number(currColor.GetGreen())+","+OUString::number(currColor.GetBlue())+")";
+ aMap["RGB"] = "(" + OUString::number(currColor.GetRed()) + ","
+ + OUString::number(currColor.GetGreen()) + ","
+ + OUString::number(currColor.GetBlue()) + ")";
return aMap;
}
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
index dad4b551305c..d6a9c312d6bd 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
@@ -23,7 +23,6 @@
namespace textconversiondlgs
{
-
class ChineseDictionaryDialog;
class ChineseTranslationDialog : public weld::GenericDialogController
@@ -32,12 +31,11 @@ public:
explicit ChineseTranslationDialog(weld::Window* pParent);
virtual ~ChineseTranslationDialog() override;
- void getSettings( bool& rbDirectionToSimplified
- , bool& rbTranslateCommonTerms ) const;
+ void getSettings(bool& rbDirectionToSimplified, bool& rbTranslateCommonTerms) const;
private:
- DECL_LINK( DictionaryHdl, weld::Button&, void );
- DECL_LINK( OkHdl, weld::Button&, void );
+ DECL_LINK(DictionaryHdl, weld::Button&, void);
+ DECL_LINK(OkHdl, weld::Button&, void);
private:
std::unique_ptr<weld::Button> m_xBP_OK;
diff --git a/svx/source/unodraw/gluepts.hxx b/svx/source/unodraw/gluepts.hxx
index 9747a454fea2..303f7213e00d 100644
--- a/svx/source/unodraw/gluepts.hxx
+++ b/svx/source/unodraw/gluepts.hxx
@@ -24,11 +24,13 @@
#include <com/sun/star/uno/Reference.hxx>
-namespace com::sun::star::uno { class XInterface; }
+namespace com::sun::star::uno
+{
+class XInterface;
+}
class SdrObject;
-css::uno::Reference<css::uno::XInterface>
-SvxUnoGluePointAccess_createInstance(SdrObject * pObject);
+css::uno::Reference<css::uno::XInterface> SvxUnoGluePointAccess_createInstance(SdrObject* pObject);
#endif
diff --git a/svx/source/unodraw/unodtabl.cxx b/svx/source/unodraw/unodtabl.cxx
index ae2465900d51..7809f5889bd0 100644
--- a/svx/source/unodraw/unodtabl.cxx
+++ b/svx/source/unodraw/unodtabl.cxx
@@ -29,36 +29,32 @@
using namespace ::com::sun::star;
using namespace ::cppu;
-namespace {
-
+namespace
+{
class SvxUnoDashTable : public SvxUnoNameItemTable
{
public:
- explicit SvxUnoDashTable( SdrModel* pModel ) throw();
+ explicit SvxUnoDashTable(SdrModel* pModel) throw();
virtual NameOrIndex* createItem() const override;
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( ) override;
- virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
// XElementAccess
- virtual uno::Type SAL_CALL getElementType( ) override;
+ virtual uno::Type SAL_CALL getElementType() override;
};
-
}
-SvxUnoDashTable::SvxUnoDashTable( SdrModel* pModel ) throw()
-: SvxUnoNameItemTable( pModel, XATTR_LINEDASH, MID_LINEDASH )
+SvxUnoDashTable::SvxUnoDashTable(SdrModel* pModel) throw()
+ : SvxUnoNameItemTable(pModel, XATTR_LINEDASH, MID_LINEDASH)
{
}
-OUString SAL_CALL SvxUnoDashTable::getImplementationName()
-{
- return "SvxUnoDashTable";
-}
+OUString SAL_CALL SvxUnoDashTable::getImplementationName() { return "SvxUnoDashTable"; }
-uno::Sequence< OUString > SAL_CALL SvxUnoDashTable::getSupportedServiceNames( )
+uno::Sequence<OUString> SAL_CALL SvxUnoDashTable::getSupportedServiceNames()
{
return { "com.sun.star.drawing.DashTable" };
}
@@ -66,12 +62,12 @@ uno::Sequence< OUString > SAL_CALL SvxUnoDashTable::getSupportedServiceNames( )
NameOrIndex* SvxUnoDashTable::createItem() const
{
XLineDashItem* pNewItem = new XLineDashItem();
- pNewItem->SetWhich( XATTR_LINEDASH ); // set which id for pooling
+ pNewItem->SetWhich(XATTR_LINEDASH); // set which id for pooling
return pNewItem;
}
// XElementAccess
-uno::Type SAL_CALL SvxUnoDashTable::getElementType( )
+uno::Type SAL_CALL SvxUnoDashTable::getElementType()
{
return cppu::UnoType<drawing::LineDash>::get();
}
@@ -79,10 +75,9 @@ uno::Type SAL_CALL SvxUnoDashTable::getElementType( )
/**
* Create a gradienttable
*/
-uno::Reference< uno::XInterface > SvxUnoDashTable_createInstance( SdrModel* pModel )
+uno::Reference<uno::XInterface> SvxUnoDashTable_createInstance(SdrModel* pModel)
{
return *new SvxUnoDashTable(pModel);
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unogtabl.cxx b/svx/source/unodraw/unogtabl.cxx
index fa46aee4e28a..2826105b42a4 100644
--- a/svx/source/unodraw/unogtabl.cxx
+++ b/svx/source/unodraw/unogtabl.cxx
@@ -29,49 +29,41 @@
using namespace ::com::sun::star;
using namespace ::cppu;
-namespace {
-
+namespace
+{
class SvxUnoGradientTable : public SvxUnoNameItemTable
{
public:
- explicit SvxUnoGradientTable( SdrModel* pModel ) throw();
+ explicit SvxUnoGradientTable(SdrModel* pModel) throw();
virtual NameOrIndex* createItem() const override;
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( ) override;
- virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
// XElementAccess
- virtual uno::Type SAL_CALL getElementType( ) override;
+ virtual uno::Type SAL_CALL getElementType() override;
};
-
}
-SvxUnoGradientTable::SvxUnoGradientTable( SdrModel* pModel ) throw()
- : SvxUnoNameItemTable( pModel, XATTR_FILLGRADIENT, MID_FILLGRADIENT )
+SvxUnoGradientTable::SvxUnoGradientTable(SdrModel* pModel) throw()
+ : SvxUnoNameItemTable(pModel, XATTR_FILLGRADIENT, MID_FILLGRADIENT)
{
}
-OUString SAL_CALL SvxUnoGradientTable::getImplementationName()
-{
- return "SvxUnoGradientTable";
-}
+OUString SAL_CALL SvxUnoGradientTable::getImplementationName() { return "SvxUnoGradientTable"; }
-uno::Sequence< OUString > SAL_CALL SvxUnoGradientTable::getSupportedServiceNames( )
+uno::Sequence<OUString> SAL_CALL SvxUnoGradientTable::getSupportedServiceNames()
{
return { "com.sun.star.drawing.GradientTable" };
}
-
// XNameContainer
-NameOrIndex* SvxUnoGradientTable::createItem() const
-{
- return new XFillGradientItem();
-}
+NameOrIndex* SvxUnoGradientTable::createItem() const { return new XFillGradientItem(); }
// XElementAccess
-uno::Type SAL_CALL SvxUnoGradientTable::getElementType( )
+uno::Type SAL_CALL SvxUnoGradientTable::getElementType()
{
return cppu::UnoType<awt::Gradient>::get();
}
@@ -79,10 +71,9 @@ uno::Type SAL_CALL SvxUnoGradientTable::getElementType( )
/**
* Create a gradienttable
*/
-uno::Reference< uno::XInterface > SvxUnoGradientTable_createInstance( SdrModel* pModel )
+uno::Reference<uno::XInterface> SvxUnoGradientTable_createInstance(SdrModel* pModel)
{
return *new SvxUnoGradientTable(pModel);
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unottabl.cxx b/svx/source/unodraw/unottabl.cxx
index 63ffa7ebe851..45ce44f96c20 100644
--- a/svx/source/unodraw/unottabl.cxx
+++ b/svx/source/unodraw/unottabl.cxx
@@ -28,27 +28,26 @@
using namespace ::com::sun::star;
using namespace ::cppu;
-namespace {
-
+namespace
+{
class SvxUnoTransGradientTable : public SvxUnoNameItemTable
{
public:
- explicit SvxUnoTransGradientTable( SdrModel* pModel ) throw();
+ explicit SvxUnoTransGradientTable(SdrModel* pModel) throw();
virtual NameOrIndex* createItem() const override;
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( ) override;
- virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
// XElementAccess
- virtual uno::Type SAL_CALL getElementType( ) override;
+ virtual uno::Type SAL_CALL getElementType() override;
};
-
}
-SvxUnoTransGradientTable::SvxUnoTransGradientTable( SdrModel* pModel ) throw()
-: SvxUnoNameItemTable( pModel, XATTR_FILLFLOATTRANSPARENCE, MID_FILLGRADIENT )
+SvxUnoTransGradientTable::SvxUnoTransGradientTable(SdrModel* pModel) throw()
+ : SvxUnoNameItemTable(pModel, XATTR_FILLFLOATTRANSPARENCE, MID_FILLGRADIENT)
{
}
@@ -57,7 +56,7 @@ OUString SAL_CALL SvxUnoTransGradientTable::getImplementationName()
return "SvxUnoTransGradientTable";
}
-uno::Sequence< OUString > SAL_CALL SvxUnoTransGradientTable::getSupportedServiceNames( )
+uno::Sequence<OUString> SAL_CALL SvxUnoTransGradientTable::getSupportedServiceNames()
{
return { "com.sun.star.drawing.TransparencyGradientTable" };
}
@@ -65,12 +64,12 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTransGradientTable::getSupportedService
NameOrIndex* SvxUnoTransGradientTable::createItem() const
{
XFillFloatTransparenceItem* pNewItem = new XFillFloatTransparenceItem();
- pNewItem->SetEnabled( true );
+ pNewItem->SetEnabled(true);
return pNewItem;
}
// XElementAccess
-uno::Type SAL_CALL SvxUnoTransGradientTable::getElementType( )
+uno::Type SAL_CALL SvxUnoTransGradientTable::getElementType()
{
return cppu::UnoType<awt::Gradient>::get();
}
@@ -78,10 +77,9 @@ uno::Type SAL_CALL SvxUnoTransGradientTable::getElementType( )
/**
* Create a hatchtable
*/
-uno::Reference< uno::XInterface > SvxUnoTransGradientTable_createInstance( SdrModel* pModel )
+uno::Reference<uno::XInterface> SvxUnoTransGradientTable_createInstance(SdrModel* pModel)
{
return *new SvxUnoTransGradientTable(pModel);
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/xoutdev/XPropertyEntry.cxx b/svx/source/xoutdev/XPropertyEntry.cxx
index 974a5bb20c91..d7b8ad266674 100644
--- a/svx/source/xoutdev/XPropertyEntry.cxx
+++ b/svx/source/xoutdev/XPropertyEntry.cxx
@@ -20,13 +20,11 @@
#include <svx/XPropertyEntry.hxx>
XPropertyEntry::XPropertyEntry(const OUString& rPropEntryName)
-: maPropEntryName(rPropEntryName),
- maUiBitmap()
+ : maPropEntryName(rPropEntryName)
+ , maUiBitmap()
{
}
-XPropertyEntry::~XPropertyEntry()
-{
-}
+XPropertyEntry::~XPropertyEntry() {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */