summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 13:28:09 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-19 19:24:47 +0100
commit7b49f8c7ebf40048181b56e9bfb11135bd473cab (patch)
tree6f794f7e2163bb29ceecd1c6d15e851cdfb71d77 /writerfilter/source/dmapper
parent481fdcc619dadf0a65e5af73b0c33b26df2400e5 (diff)
tdf#123936 Formatting files in module writerfilter with clang-format
Change-Id: Ia60e7c5e2d3be0baa0496a6bd99c6ae98cd4ff96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105730 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r--writerfilter/source/dmapper/FFDataHandler.hxx35
-rw-r--r--writerfilter/source/dmapper/FormControlHelper.hxx11
-rw-r--r--writerfilter/source/dmapper/GraphicHelpers.hxx34
-rw-r--r--writerfilter/source/dmapper/LoggedResources.cxx74
-rw-r--r--writerfilter/source/dmapper/LoggedResources.hxx49
-rw-r--r--writerfilter/source/dmapper/MeasureHandler.hxx9
-rw-r--r--writerfilter/source/dmapper/ModelEventListener.hxx9
-rw-r--r--writerfilter/source/dmapper/PageBordersHandler.hxx21
-rw-r--r--writerfilter/source/dmapper/PropertyMapHelper.cxx16
-rw-r--r--writerfilter/source/dmapper/PropertyMapHelper.hxx8
-rw-r--r--writerfilter/source/dmapper/SectionColumnHandler.cxx29
-rw-r--r--writerfilter/source/dmapper/SettingsTable.hxx24
-rw-r--r--writerfilter/source/dmapper/TextEffectsHandler.hxx9
-rw-r--r--writerfilter/source/dmapper/ThemeTable.hxx9
-rw-r--r--writerfilter/source/dmapper/TrackChangesHandler.hxx8
-rw-r--r--writerfilter/source/dmapper/WrapPolygonHandler.hxx22
-rw-r--r--writerfilter/source/dmapper/util.cxx13
-rw-r--r--writerfilter/source/dmapper/util.hxx5
18 files changed, 171 insertions, 214 deletions
diff --git a/writerfilter/source/dmapper/FFDataHandler.hxx b/writerfilter/source/dmapper/FFDataHandler.hxx
index f5bdb6666ea1..1603d39b0ad0 100644
--- a/writerfilter/source/dmapper/FFDataHandler.hxx
+++ b/writerfilter/source/dmapper/FFDataHandler.hxx
@@ -21,7 +21,8 @@
#include "LoggedResources.hxx"
#include <rtl/ustring.hxx>
#include <vector>
-namespace writerfilter::dmapper {
+namespace writerfilter::dmapper
+{
class FFDataHandler : public LoggedProperties
{
public:
@@ -35,41 +36,41 @@ public:
virtual ~FFDataHandler() override;
// member: name
- const OUString & getName() const { return m_sName;}
+ const OUString& getName() const { return m_sName; }
// member: helpText
- const OUString & getHelpText() const { return m_sHelpText;}
+ const OUString& getHelpText() const { return m_sHelpText; }
// member: statusText
- const OUString & getStatusText() const { return m_sStatusText;}
+ const OUString& getStatusText() const { return m_sStatusText; }
- const OUString & getEntryMacro() const { return m_sEntryMacro;}
- const OUString & getExitMacro() const { return m_sExitMacro;}
+ const OUString& getEntryMacro() const { return m_sEntryMacro; }
+ const OUString& getExitMacro() const { return m_sExitMacro; }
// member: checkboxHeight
- sal_uInt32 getCheckboxHeight() const { return m_nCheckboxHeight;}
+ sal_uInt32 getCheckboxHeight() const { return m_nCheckboxHeight; }
// member: checkboxAutoHeight
- bool getCheckboxAutoHeight() const { return m_bCheckboxAutoHeight;}
+ bool getCheckboxAutoHeight() const { return m_bCheckboxAutoHeight; }
// member: checkboxChecked or checkboxDefault (if the previous is not set)
bool getCheckboxChecked() const;
// member: dropDownResult
- const OUString & getDropDownResult() const { return m_sDropDownResult;}
+ const OUString& getDropDownResult() const { return m_sDropDownResult; }
// member: dropDownEntries
- const DropDownEntries_t & getDropDownEntries() const { return m_DropDownEntries;}
+ const DropDownEntries_t& getDropDownEntries() const { return m_DropDownEntries; }
// member: textDefault
- const OUString & getTextDefault() const { return m_sTextDefault;}
+ const OUString& getTextDefault() const { return m_sTextDefault; }
- const OUString & getTextType() const { return m_sTextType; }
- const OUString & getTextFormat() const { return m_sTextFormat; }
+ const OUString& getTextType() const { return m_sTextType; }
+ const OUString& getTextFormat() const { return m_sTextFormat; }
sal_uInt16 getTextMaxLength() const { return m_nTextMaxLength; }
// sprm
- void resolveSprm(Sprm & r_sprm);
+ void resolveSprm(Sprm& r_sprm);
private:
OUString m_sName;
@@ -89,13 +90,11 @@ private:
sal_uInt16 m_nTextMaxLength;
// sprm
- void lcl_sprm(Sprm & r_sprm) override;
+ void lcl_sprm(Sprm& r_sprm) override;
// attribute
- void lcl_attribute(Id name, Value & val) override;
+ void lcl_attribute(Id name, Value& val) override;
};
-
-
}
#endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_FFDATAHANDLER_HXX
diff --git a/writerfilter/source/dmapper/FormControlHelper.hxx b/writerfilter/source/dmapper/FormControlHelper.hxx
index da60c3fea21f..f3cb74549226 100644
--- a/writerfilter/source/dmapper/FormControlHelper.hxx
+++ b/writerfilter/source/dmapper/FormControlHelper.hxx
@@ -25,32 +25,31 @@
#include <com/sun/star/uno/Reference.hxx>
#include "FieldTypes.hxx"
-namespace writerfilter::dmapper {
-
+namespace writerfilter::dmapper
+{
class FormControlHelper : public virtual SvRefBase
{
public:
typedef tools::SvRef<FormControlHelper> Pointer_t;
FormControlHelper(FieldId eFieldId,
css::uno::Reference<css::text::XTextDocument> const& rTextDocument,
- FFDataHandler::Pointer_t const & pFFData);
+ FFDataHandler::Pointer_t const& pFFData);
~FormControlHelper() override;
void insertControl(css::uno::Reference<css::text::XTextRange> const& xTextRange);
void processField(css::uno::Reference<css::text::XFormField> const& xFormField);
bool hasFFDataHandler() const { return (m_pFFData != nullptr); }
+
private:
FFDataHandler::Pointer_t m_pFFData;
struct FormControlHelper_Impl;
tools::SvRef<FormControlHelper_Impl> m_pImpl;
bool createCheckbox(css::uno::Reference<css::text::XTextRange> const& xTextRange,
- const OUString & rControlName);
+ const OUString& rControlName);
};
-
}
-
#endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_FORMCONTROLHELPER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/GraphicHelpers.hxx b/writerfilter/source/dmapper/GraphicHelpers.hxx
index 54d5520c3717..66fd06c06281 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.hxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.hxx
@@ -27,19 +27,20 @@
namespace writerfilter::dmapper
{
-
-class PositionHandler: public LoggedProperties
+class PositionHandler : public LoggedProperties
{
public:
- PositionHandler( std::pair<OUString, OUString>& rPositionOffsets, std::pair<OUString, OUString>& rAligns );
- virtual ~PositionHandler( ) override;
+ PositionHandler(std::pair<OUString, OUString>& rPositionOffsets,
+ std::pair<OUString, OUString>& rAligns);
+ virtual ~PositionHandler() override;
sal_Int16 orientation() const;
- sal_Int16 relation() const { return m_nRelation;}
- sal_Int32 position() const { return m_nPosition;}
+ sal_Int16 relation() const { return m_nRelation; }
+ sal_Int32 position() const { return m_nPosition; }
bool GetPageToggle() const { return m_bPageToggle; }
- private:
- virtual void lcl_attribute( Id aName, Value& rVal ) override;
- virtual void lcl_sprm( Sprm& rSprm ) override;
+
+private:
+ virtual void lcl_attribute(Id aName, Value& rVal) override;
+ virtual void lcl_sprm(Sprm& rSprm) override;
sal_Int16 m_nOrient;
sal_Int16 m_nRelation;
sal_Int32 m_nPosition;
@@ -48,17 +49,17 @@ public:
bool m_bPageToggle = false;
};
-class WrapHandler: public LoggedProperties
+class WrapHandler : public LoggedProperties
{
public:
- WrapHandler( );
- virtual ~WrapHandler( ) override;
+ WrapHandler();
+ virtual ~WrapHandler() override;
- css::text::WrapTextMode getWrapMode( ) const;
+ css::text::WrapTextMode getWrapMode() const;
- private:
- virtual void lcl_attribute( Id aName, Value& rVal ) override;
- virtual void lcl_sprm( Sprm& rSprm ) override;
+private:
+ virtual void lcl_attribute(Id aName, Value& rVal) override;
+ virtual void lcl_sprm(Sprm& rSprm) override;
sal_Int32 m_nType;
sal_Int32 m_nSide;
@@ -74,7 +75,6 @@ public:
/// Name a graphic based on rTemplate.
OUString NameGraphic(const OUString& rTemplate);
};
-
}
#endif
diff --git a/writerfilter/source/dmapper/LoggedResources.cxx b/writerfilter/source/dmapper/LoggedResources.cxx
index d8857911ea1d..c604019e0e2c 100644
--- a/writerfilter/source/dmapper/LoggedResources.cxx
+++ b/writerfilter/source/dmapper/LoggedResources.cxx
@@ -25,65 +25,55 @@ using namespace ::com::sun::star;
namespace writerfilter
{
-
#ifdef DBG_UTIL
-LoggedResourcesHelper::LoggedResourcesHelper(const std::string & sPrefix)
-: msPrefix(sPrefix)
+LoggedResourcesHelper::LoggedResourcesHelper(const std::string& sPrefix)
+ : msPrefix(sPrefix)
{
}
-LoggedResourcesHelper::~LoggedResourcesHelper()
-{
-}
+LoggedResourcesHelper::~LoggedResourcesHelper() {}
-void LoggedResourcesHelper::startElement(const std::string & sElement)
+void LoggedResourcesHelper::startElement(const std::string& sElement)
{
TagLogger::getInstance().startElement(msPrefix + "." + sElement);
}
-void LoggedResourcesHelper::endElement()
-{
- TagLogger::getInstance().endElement();
-}
+void LoggedResourcesHelper::endElement() { TagLogger::getInstance().endElement(); }
-void LoggedResourcesHelper::chars(const OUString & rChars)
+void LoggedResourcesHelper::chars(const OUString& rChars)
{
TagLogger::getInstance().chars(rChars);
}
-void LoggedResourcesHelper::chars(const std::string & rChars)
+void LoggedResourcesHelper::chars(const std::string& rChars)
{
TagLogger::getInstance().chars(rChars);
}
-void LoggedResourcesHelper::attribute(const std::string & rName, const std::string & rValue)
+void LoggedResourcesHelper::attribute(const std::string& rName, const std::string& rValue)
{
TagLogger::getInstance().attribute(rName, rValue);
}
-void LoggedResourcesHelper::attribute(const std::string & rName, sal_uInt32 nValue)
+void LoggedResourcesHelper::attribute(const std::string& rName, sal_uInt32 nValue)
{
TagLogger::getInstance().attribute(rName, nValue);
}
#endif
-
LoggedStream::LoggedStream(
#ifdef DBG_UTIL
- const std::string & sPrefix
-) : mHelper(sPrefix)
+ const std::string& sPrefix)
+ : mHelper(sPrefix)
#else
- const std::string&
-)
+ const std::string&)
#endif
{
}
-LoggedStream::~LoggedStream()
-{
-}
+LoggedStream::~LoggedStream() {}
void LoggedStream::startSectionGroup()
{
@@ -121,7 +111,6 @@ void LoggedStream::endParagraphGroup()
#endif
}
-
void LoggedStream::startCharacterGroup()
{
#ifdef DBG_UTIL
@@ -158,12 +147,12 @@ void LoggedStream::endShape()
#endif
}
-void LoggedStream::text(const sal_uInt8 * data, size_t len)
+void LoggedStream::text(const sal_uInt8* data, size_t len)
{
#ifdef DBG_UTIL
mHelper.startElement("text");
- OUString sText( reinterpret_cast<const char*>(data), len, RTL_TEXTENCODING_MS_1252 );
+ OUString sText(reinterpret_cast<const char*>(data), len, RTL_TEXTENCODING_MS_1252);
mHelper.startElement("data");
LoggedResourcesHelper::chars(sText);
@@ -177,13 +166,13 @@ void LoggedStream::text(const sal_uInt8 * data, size_t len)
#endif
}
-void LoggedStream::utext(const sal_uInt8 * data, size_t len)
+void LoggedStream::utext(const sal_uInt8* data, size_t len)
{
#ifdef DBG_UTIL
mHelper.startElement("utext");
mHelper.startElement("data");
- OUString sText( reinterpret_cast<const sal_Unicode *>(data), len);
+ OUString sText(reinterpret_cast<const sal_Unicode*>(data), len);
LoggedResourcesHelper::chars(sText);
@@ -282,7 +271,7 @@ void LoggedStream::substream(Id name, writerfilter::Reference<Stream>::Pointer_t
#endif
}
-void LoggedStream::info(const std::string & _info)
+void LoggedStream::info(const std::string& _info)
{
#ifdef DBG_UTIL
mHelper.startElement("info");
@@ -324,20 +313,17 @@ void LoggedStream::endGlossaryEntry()
LoggedProperties::LoggedProperties(
#ifdef DBG_UTIL
- const std::string & sPrefix
-) : mHelper(sPrefix)
+ const std::string& sPrefix)
+ : mHelper(sPrefix)
#else
- const std::string&
-)
+ const std::string&)
#endif
{
}
-LoggedProperties::~LoggedProperties()
-{
-}
+LoggedProperties::~LoggedProperties() {}
-void LoggedProperties::attribute(Id name, Value & val)
+void LoggedProperties::attribute(Id name, Value& val)
{
#ifdef DBG_UTIL
mHelper.startElement("attribute");
@@ -349,7 +335,7 @@ void LoggedProperties::attribute(Id name, Value & val)
lcl_attribute(name, val);
}
-void LoggedProperties::sprm(Sprm & rSprm)
+void LoggedProperties::sprm(Sprm& rSprm)
{
#ifdef DBG_UTIL
mHelper.startElement("sprm");
@@ -366,18 +352,15 @@ void LoggedProperties::sprm(Sprm & rSprm)
LoggedTable::LoggedTable(
#ifdef DBG_UTIL
- const std::string & sPrefix
-) : mHelper(sPrefix)
+ const std::string& sPrefix)
+ : mHelper(sPrefix)
#else
- const std::string&
-)
+ const std::string&)
#endif
{
}
-LoggedTable::~LoggedTable()
-{
-}
+LoggedTable::~LoggedTable() {}
void LoggedTable::entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref)
{
@@ -394,7 +377,6 @@ void LoggedTable::entry(int pos, writerfilter::Reference<Properties>::Pointer_t
LoggedResourcesHelper::endElement();
#endif
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/LoggedResources.hxx b/writerfilter/source/dmapper/LoggedResources.hxx
index 0be0f2ba4f12..cb940800d949 100644
--- a/writerfilter/source/dmapper/LoggedResources.hxx
+++ b/writerfilter/source/dmapper/LoggedResources.hxx
@@ -22,23 +22,21 @@
#include <dmapper/resourcemodel.hxx>
-
namespace writerfilter
{
-
#ifdef DBG_UTIL
class LoggedResourcesHelper final
{
public:
- explicit LoggedResourcesHelper(const std::string & sPrefix);
+ explicit LoggedResourcesHelper(const std::string& sPrefix);
~LoggedResourcesHelper();
- void startElement(const std::string & sElement);
+ void startElement(const std::string& sElement);
static void endElement();
- static void chars(const OUString & rChars);
- static void chars(const std::string & rChars);
- static void attribute(const std::string & rName, const std::string & rValue);
- static void attribute(const std::string & rName, sal_uInt32 nValue);
+ static void chars(const OUString& rChars);
+ static void chars(const std::string& rChars);
+ static void attribute(const std::string& rName, const std::string& rValue);
+ static void attribute(const std::string& rName, sal_uInt32 nValue);
private:
std::string msPrefix;
@@ -48,7 +46,7 @@ private:
class LoggedStream : public Stream
{
public:
- explicit LoggedStream(const std::string & sPrefix);
+ explicit LoggedStream(const std::string& sPrefix);
virtual ~LoggedStream() override;
void startSectionGroup() override;
@@ -59,15 +57,15 @@ public:
void endCharacterGroup() override;
void startShape(css::uno::Reference<css::drawing::XShape> const& xShape) override;
void endShape() override;
- void text(const sal_uInt8 * data, size_t len) override;
- void utext(const sal_uInt8 * data, size_t len) override;
+ void text(const sal_uInt8* data, size_t len) override;
+ void utext(const sal_uInt8* data, size_t len) override;
void positionOffset(const OUString& rText, bool bVertical) override;
void align(const OUString& rText, bool bVertical) override;
void positivePercentage(const OUString& rText) override;
void props(writerfilter::Reference<Properties>::Pointer_t ref) override;
void table(Id name, writerfilter::Reference<Table>::Pointer_t ref) override;
void substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) override;
- void info(const std::string & info) override;
+ void info(const std::string& info) override;
void startGlossaryEntry() override;
void endGlossaryEntry() override;
@@ -80,17 +78,17 @@ protected:
virtual void lcl_endCharacterGroup() = 0;
virtual void lcl_startShape(css::uno::Reference<css::drawing::XShape> const& xShape) = 0;
virtual void lcl_endShape() = 0;
- virtual void lcl_text(const sal_uInt8 * data, size_t len) = 0;
- virtual void lcl_utext(const sal_uInt8 * data, size_t len) = 0;
- virtual void lcl_positionOffset(const OUString& /*rText*/, bool /*bVertical*/) { }
+ virtual void lcl_text(const sal_uInt8* data, size_t len) = 0;
+ virtual void lcl_utext(const sal_uInt8* data, size_t len) = 0;
+ virtual void lcl_positionOffset(const OUString& /*rText*/, bool /*bVertical*/) {}
virtual css::awt::Point getPositionOffset() override { return css::awt::Point(); }
- virtual void lcl_align(const OUString& /*rText*/, bool /*bVertical*/) { }
- virtual void lcl_positivePercentage(const OUString& /*rText*/) { }
+ virtual void lcl_align(const OUString& /*rText*/, bool /*bVertical*/) {}
+ virtual void lcl_positivePercentage(const OUString& /*rText*/) {}
virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref) = 0;
virtual void lcl_table(Id name, writerfilter::Reference<Table>::Pointer_t ref) = 0;
virtual void lcl_substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) = 0;
- virtual void lcl_startGlossaryEntry() { }
- virtual void lcl_endGlossaryEntry() { }
+ virtual void lcl_startGlossaryEntry() {}
+ virtual void lcl_endGlossaryEntry() {}
#ifdef DBG_UTIL
LoggedResourcesHelper mHelper;
@@ -100,15 +98,15 @@ protected:
class LoggedProperties : public Properties
{
public:
- explicit LoggedProperties(const std::string & sPrefix);
+ explicit LoggedProperties(const std::string& sPrefix);
virtual ~LoggedProperties() override;
- void attribute(Id name, Value & val) override;
- void sprm(Sprm & sprm) override;
+ void attribute(Id name, Value& val) override;
+ void sprm(Sprm& sprm) override;
protected:
- virtual void lcl_attribute(Id name, Value & val) = 0;
- virtual void lcl_sprm(Sprm & sprm) = 0;
+ virtual void lcl_attribute(Id name, Value& val) = 0;
+ virtual void lcl_sprm(Sprm& sprm) = 0;
#ifdef DBG_UTIL
LoggedResourcesHelper mHelper;
@@ -118,7 +116,7 @@ protected:
class LoggedTable : public Table
{
public:
- explicit LoggedTable(const std::string & sPrefix);
+ explicit LoggedTable(const std::string& sPrefix);
virtual ~LoggedTable() override;
void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) override;
@@ -130,7 +128,6 @@ protected:
LoggedResourcesHelper mHelper;
#endif
};
-
}
#endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_LOGGEDRESOURCES_HXX
diff --git a/writerfilter/source/dmapper/MeasureHandler.hxx b/writerfilter/source/dmapper/MeasureHandler.hxx
index b32b3840675a..3b70987d5345 100644
--- a/writerfilter/source/dmapper/MeasureHandler.hxx
+++ b/writerfilter/source/dmapper/MeasureHandler.hxx
@@ -39,8 +39,8 @@ class MeasureHandler : public LoggedProperties
std::vector<css::beans::PropertyValue> m_aInteropGrabBag;
// Properties
- virtual void lcl_attribute(Id Name, Value & val) override;
- virtual void lcl_sprm(Sprm & sprm) override;
+ virtual void lcl_attribute(Id Name, Value& val) override;
+ virtual void lcl_sprm(Sprm& sprm) override;
public:
MeasureHandler();
@@ -51,12 +51,11 @@ public:
sal_Int32 getValue() const { return m_nMeasureValue; }
sal_Int32 getUnit() const { return m_nUnit; }
- sal_Int16 GetRowHeightSizeType() const { return m_nRowHeightSizeType;}
+ sal_Int16 GetRowHeightSizeType() const { return m_nRowHeightSizeType; }
void enableInteropGrabBag(const OUString& aName);
css::beans::PropertyValue getInteropGrabBag();
};
-typedef tools::SvRef
- < MeasureHandler > MeasureHandlerPtr;
+typedef tools::SvRef<MeasureHandler> MeasureHandlerPtr;
}
#endif
diff --git a/writerfilter/source/dmapper/ModelEventListener.hxx b/writerfilter/source/dmapper/ModelEventListener.hxx
index acb69661d127..7080674ff27c 100644
--- a/writerfilter/source/dmapper/ModelEventListener.hxx
+++ b/writerfilter/source/dmapper/ModelEventListener.hxx
@@ -22,22 +22,21 @@
#include <com/sun/star/document/XEventListener.hpp>
#include <cppuhelper/implbase.hxx>
-namespace writerfilter::dmapper{
-
-
+namespace writerfilter::dmapper
+{
class ModelEventListener : public cppu::WeakImplHelper<css::document::XEventListener>
{
bool m_bIndexes;
bool m_bControls;
+
public:
ModelEventListener(bool bIndexes, bool bControls);
virtual ~ModelEventListener() override;
virtual void SAL_CALL notifyEvent(const css::document::EventObject& Event) override;
virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
-
};
-}//namespace writerfilter::dmapper
+} //namespace writerfilter::dmapper
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/PageBordersHandler.hxx b/writerfilter/source/dmapper/PageBordersHandler.hxx
index 177ac4bd9847..4b913c09af1d 100644
--- a/writerfilter/source/dmapper/PageBordersHandler.hxx
+++ b/writerfilter/source/dmapper/PageBordersHandler.hxx
@@ -27,40 +27,37 @@
#include <vector>
-
-namespace writerfilter::dmapper {
-
+namespace writerfilter::dmapper
+{
class PgBorder
{
public:
css::table::BorderLine2 m_rLine;
- sal_Int32 m_nDistance;
+ sal_Int32 m_nDistance;
BorderPosition m_ePos;
bool m_bShadow;
- PgBorder( );
+ PgBorder();
};
class PageBordersHandler : public LoggedProperties
{
private:
-
// See implementation of SectionPropertyMap::ApplyBorderToPageStyles
SectionPropertyMap::BorderApply m_eBorderApply;
SectionPropertyMap::BorderOffsetFrom m_eOffsetFrom;
std::vector<PgBorder> m_aBorders;
// Properties
- virtual void lcl_attribute( Id eName, Value& rVal ) override;
- virtual void lcl_sprm( Sprm& rSprm ) override;
+ virtual void lcl_attribute(Id eName, Value& rVal) override;
+ virtual void lcl_sprm(Sprm& rSprm) override;
public:
- PageBordersHandler( );
- virtual ~PageBordersHandler( ) override;
+ PageBordersHandler();
+ virtual ~PageBordersHandler() override;
- void SetBorders( SectionPropertyMap* pSectContext );
+ void SetBorders(SectionPropertyMap* pSectContext);
};
-
}
#endif
diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx
index 59f59b1b2372..a944dc147aa4 100644
--- a/writerfilter/source/dmapper/PropertyMapHelper.cxx
+++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx
@@ -23,10 +23,9 @@
namespace writerfilter::dmapper
{
-
using namespace ::com::sun::star;
-void lcl_DumpTableColumnSeparators(const uno::Any & rTableColumnSeparators)
+void lcl_DumpTableColumnSeparators(const uno::Any& rTableColumnSeparators)
{
#ifdef DBG_UTIL
uno::Sequence<text::TableColumnSeparator> aSeq;
@@ -47,16 +46,16 @@ void lcl_DumpTableColumnSeparators(const uno::Any & rTableColumnSeparators)
TagLogger::getInstance().endElement();
#else
- (void) rTableColumnSeparators;
+ (void)rTableColumnSeparators;
#endif // DBG_UTIL
}
#ifdef DBG_UTIL
-void lcl_DumpPropertyValues(beans::PropertyValues const & rValues)
+void lcl_DumpPropertyValues(beans::PropertyValues const& rValues)
{
TagLogger::getInstance().startElement("propertyValues");
- for (beans::PropertyValue const & propVal : rValues)
+ for (beans::PropertyValue const& propVal : rValues)
{
TagLogger::getInstance().startElement("propertyValue");
@@ -72,7 +71,7 @@ void lcl_DumpPropertyValues(beans::PropertyValues const & rValues)
{
}
- if ( propVal.Name == "TableColumnSeparators" )
+ if (propVal.Name == "TableColumnSeparators")
{
lcl_DumpTableColumnSeparators(propVal.Value);
}
@@ -82,11 +81,11 @@ void lcl_DumpPropertyValues(beans::PropertyValues const & rValues)
TagLogger::getInstance().endElement();
}
-void lcl_DumpPropertyValueSeq(css::uno::Sequence<css::beans::PropertyValues> const & rPropValSeq)
+void lcl_DumpPropertyValueSeq(css::uno::Sequence<css::beans::PropertyValues> const& rPropValSeq)
{
TagLogger::getInstance().startElement("PropertyValueSeq");
- for (auto const & propVal : rPropValSeq)
+ for (auto const& propVal : rPropValSeq)
{
lcl_DumpPropertyValues(propVal);
}
@@ -94,7 +93,6 @@ void lcl_DumpPropertyValueSeq(css::uno::Sequence<css::beans::PropertyValues> con
TagLogger::getInstance().endElement();
}
#endif // DBG_UTIL
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/PropertyMapHelper.hxx b/writerfilter/source/dmapper/PropertyMapHelper.hxx
index 09df75385e71..044ae1b92f35 100644
--- a/writerfilter/source/dmapper/PropertyMapHelper.hxx
+++ b/writerfilter/source/dmapper/PropertyMapHelper.hxx
@@ -24,16 +24,14 @@
namespace writerfilter::dmapper
{
-
-void lcl_DumpTableColumnSeparators(const css::uno::Any & rTableColumnSeparators);
+void lcl_DumpTableColumnSeparators(const css::uno::Any& rTableColumnSeparators);
#ifdef DBG_UTIL
-void lcl_DumpPropertyValues(css::beans::PropertyValues const & rValues);
+void lcl_DumpPropertyValues(css::beans::PropertyValues const& rValues);
-void lcl_DumpPropertyValueSeq(css::uno::Sequence<css::beans::PropertyValues> const & rPropValSeq);
+void lcl_DumpPropertyValueSeq(css::uno::Sequence<css::beans::PropertyValues> const& rPropValSeq);
#endif // DBG_UTIL
}
-
#endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_PROPERTYMAPHELPER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/SectionColumnHandler.cxx b/writerfilter/source/dmapper/SectionColumnHandler.cxx
index 9ce0cdc85ad6..9fed9c34a68e 100644
--- a/writerfilter/source/dmapper/SectionColumnHandler.cxx
+++ b/writerfilter/source/dmapper/SectionColumnHandler.cxx
@@ -21,11 +21,10 @@
#include <ooxml/resourceids.hxx>
#include <osl/diagnose.h>
-namespace writerfilter::dmapper {
-
+namespace writerfilter::dmapper
+{
using namespace ::com::sun::star;
-
SectionColumnHandler::SectionColumnHandler()
: LoggedProperties("SectionColumnHandler")
, m_bEqualWidth(false)
@@ -36,20 +35,18 @@ SectionColumnHandler::SectionColumnHandler()
m_aTempColumn.nWidth = m_aTempColumn.nSpace = 0;
}
-SectionColumnHandler::~SectionColumnHandler()
-{
-}
+SectionColumnHandler::~SectionColumnHandler() {}
-void SectionColumnHandler::lcl_attribute(Id rName, Value & rVal)
+void SectionColumnHandler::lcl_attribute(Id rName, Value& rVal)
{
sal_Int32 nIntValue = rVal.getInt();
- switch( rName )
+ switch (rName)
{
case NS_ooxml::LN_CT_Columns_equalWidth:
m_bEqualWidth = (nIntValue != 0);
break;
case NS_ooxml::LN_CT_Columns_space:
- m_nSpace = ConversionHelper::convertTwipToMM100( nIntValue );
+ m_nSpace = ConversionHelper::convertTwipToMM100(nIntValue);
break;
case NS_ooxml::LN_CT_Columns_num:
m_nNum = nIntValue;
@@ -59,25 +56,25 @@ void SectionColumnHandler::lcl_attribute(Id rName, Value & rVal)
break;
case NS_ooxml::LN_CT_Column_w:
- m_aTempColumn.nWidth = ConversionHelper::convertTwipToMM100( nIntValue );
+ m_aTempColumn.nWidth = ConversionHelper::convertTwipToMM100(nIntValue);
break;
case NS_ooxml::LN_CT_Column_space:
- m_aTempColumn.nSpace = ConversionHelper::convertTwipToMM100( nIntValue );
+ m_aTempColumn.nSpace = ConversionHelper::convertTwipToMM100(nIntValue);
break;
default:
- OSL_FAIL( "SectionColumnHandler: unknown attribute");
+ OSL_FAIL("SectionColumnHandler: unknown attribute");
}
}
-void SectionColumnHandler::lcl_sprm(Sprm & rSprm)
+void SectionColumnHandler::lcl_sprm(Sprm& rSprm)
{
- switch( rSprm.getId())
+ switch (rSprm.getId())
{
case NS_ooxml::LN_CT_Columns_col:
{
m_aTempColumn.nWidth = m_aTempColumn.nSpace = 0;
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
- if( pProperties )
+ if (pProperties)
{
pProperties->resolve(*this);
m_aCols.push_back(m_aTempColumn);
@@ -85,7 +82,7 @@ void SectionColumnHandler::lcl_sprm(Sprm & rSprm)
}
break;
default:
- OSL_FAIL( "SectionColumnHandler: unknown sprm");
+ OSL_FAIL("SectionColumnHandler: unknown sprm");
}
}
} //namespace writerfilter::dmapper
diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx
index f7e8eff9df02..d2d0a28ce87e 100644
--- a/writerfilter/source/dmapper/SettingsTable.hxx
+++ b/writerfilter/source/dmapper/SettingsTable.hxx
@@ -24,9 +24,10 @@
#include <com/sun/star/text/XTextDocument.hpp>
#include <memory>
-namespace com::sun::star::lang {
- class XMultiServiceFactory;
- struct Locale;
+namespace com::sun::star::lang
+{
+class XMultiServiceFactory;
+struct Locale;
}
namespace writerfilter::dmapper
@@ -39,7 +40,7 @@ class SettingsTable : public LoggedProperties, public LoggedTable
{
std::unique_ptr<SettingsTable_Impl> m_pImpl;
- public:
+public:
SettingsTable(const DomainMapper& rDomainMapper);
virtual ~SettingsTable() override;
@@ -81,7 +82,7 @@ class SettingsTable : public LoggedProperties, public LoggedTable
OUString GetDecimalSymbol() const;
OUString GetListSeparator() const;
- css::uno::Sequence<css::beans::PropertyValue> const & GetThemeFontLangProperties() const;
+ css::uno::Sequence<css::beans::PropertyValue> const& GetThemeFontLangProperties() const;
css::uno::Sequence<css::beans::PropertyValue> GetCompatSettings() const;
@@ -89,21 +90,20 @@ class SettingsTable : public LoggedProperties, public LoggedTable
void ApplyProperties(css::uno::Reference<css::text::XTextDocument> const& xDoc);
- bool GetCompatSettingValue( const OUString& sCompatName ) const;
+ bool GetCompatSettingValue(const OUString& sCompatName) const;
sal_Int32 GetWordCompatibilityMode() const;
- const OUString & GetCurrentDatabaseDataSource() const;
+ const OUString& GetCurrentDatabaseDataSource() const;
- private:
+private:
// Properties
- virtual void lcl_attribute(Id Name, Value & val) override;
- virtual void lcl_sprm(Sprm & sprm) override;
+ virtual void lcl_attribute(Id Name, Value& val) override;
+ virtual void lcl_sprm(Sprm& sprm) override;
// Table
virtual void lcl_entry(writerfilter::Reference<Properties>::Pointer_t ref) override;
-
};
-typedef tools::SvRef< SettingsTable > SettingsTablePtr;
+typedef tools::SvRef<SettingsTable> SettingsTablePtr;
}
#endif
diff --git a/writerfilter/source/dmapper/TextEffectsHandler.hxx b/writerfilter/source/dmapper/TextEffectsHandler.hxx
index dede6df2829a..d7df31d85515 100644
--- a/writerfilter/source/dmapper/TextEffectsHandler.hxx
+++ b/writerfilter/source/dmapper/TextEffectsHandler.hxx
@@ -24,13 +24,12 @@
namespace writerfilter::dmapper
{
-
/// Class to process all text effects like glow, textOutline, ...
class TextEffectsHandler : public LoggedProperties
{
private:
- std::optional<PropertyIds> maPropertyId;
- OUString maElementName;
+ std::optional<PropertyIds> maPropertyId;
+ OUString maElementName;
std::unique_ptr<oox::GrabBagStack> mpGrabBagStack;
void convertElementIdToPropertyId(sal_Int32 aElementId);
@@ -43,7 +42,7 @@ public:
explicit TextEffectsHandler(sal_uInt32 aElementId);
virtual ~TextEffectsHandler() override;
- const std::optional<PropertyIds>& getGrabBagPropertyId() const { return maPropertyId;}
+ const std::optional<PropertyIds>& getGrabBagPropertyId() const { return maPropertyId; }
css::beans::PropertyValue getInteropGrabBag();
@@ -65,9 +64,7 @@ public:
static OUString getNumSpacingString(sal_Int32 nType);
static sal_uInt8 GetTextFillSolidFillAlpha(const css::beans::PropertyValue& rValue);
-
};
-
}
#endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TEXTEFFECTSHANDLER_HXX
diff --git a/writerfilter/source/dmapper/ThemeTable.hxx b/writerfilter/source/dmapper/ThemeTable.hxx
index 5bb03a64321b..eed737020247 100644
--- a/writerfilter/source/dmapper/ThemeTable.hxx
+++ b/writerfilter/source/dmapper/ThemeTable.hxx
@@ -27,7 +27,6 @@
namespace writerfilter::dmapper
{
-
struct ThemeTable_Impl;
class ThemeTable : public LoggedProperties, public LoggedTable
@@ -42,10 +41,10 @@ public:
static OUString getStringForTheme(const Id id);
void setThemeFontLangProperties(const css::uno::Sequence<css::beans::PropertyValue>& aPropSeq);
- private:
+private:
// Properties
- virtual void lcl_attribute(Id Name, Value & val) override;
- virtual void lcl_sprm(Sprm & sprm) override;
+ virtual void lcl_attribute(Id Name, Value& val) override;
+ virtual void lcl_sprm(Sprm& sprm) override;
// Table
virtual void lcl_entry(writerfilter::Reference<Properties>::Pointer_t ref) override;
@@ -54,7 +53,7 @@ public:
static OUString fromLocaleToScriptTag(const OUString& sLocale);
static OUString fromLCIDToScriptTag(LanguageType lang);
};
-typedef tools::SvRef< ThemeTable > ThemeTablePtr;
+typedef tools::SvRef<ThemeTable> ThemeTablePtr;
}
#endif
diff --git a/writerfilter/source/dmapper/TrackChangesHandler.hxx b/writerfilter/source/dmapper/TrackChangesHandler.hxx
index 16276a2523a3..bd29fc4a20b2 100644
--- a/writerfilter/source/dmapper/TrackChangesHandler.hxx
+++ b/writerfilter/source/dmapper/TrackChangesHandler.hxx
@@ -23,14 +23,14 @@ namespace writerfilter::dmapper
*/
class TrackChangesHandler : public LoggedProperties
{
- RedlineParamsPtr m_pRedlineParams;
+ RedlineParamsPtr m_pRedlineParams;
// Properties
- virtual void lcl_attribute(Id Name, Value & val) override;
- virtual void lcl_sprm(Sprm & sprm) override;
+ virtual void lcl_attribute(Id Name, Value& val) override;
+ virtual void lcl_sprm(Sprm& sprm) override;
public:
- explicit TrackChangesHandler( sal_Int32 nToken );
+ explicit TrackChangesHandler(sal_Int32 nToken);
virtual ~TrackChangesHandler() override;
/// Compute the UNO properties for the track changes object based on the received tokens.
diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.hxx b/writerfilter/source/dmapper/WrapPolygonHandler.hxx
index f537fde2338f..2267ce8f35e8 100644
--- a/writerfilter/source/dmapper/WrapPolygonHandler.hxx
+++ b/writerfilter/source/dmapper/WrapPolygonHandler.hxx
@@ -30,8 +30,8 @@ namespace com::sun::star::text
struct GraphicCrop;
}
-namespace writerfilter::dmapper {
-
+namespace writerfilter::dmapper
+{
/// Handles <wp:wrapPolygon> from DOCX and the pWrapPolygonVertices shape property from RTF.
class WrapPolygon final : public virtual SvRefBase
{
@@ -46,15 +46,15 @@ public:
WrapPolygon();
~WrapPolygon() override;
- void addPoint(const css::awt::Point & rPoint);
+ void addPoint(const css::awt::Point& rPoint);
Points_t::const_iterator begin() const;
Points_t::const_iterator end() const;
- WrapPolygon::Pointer_t move(const css::awt::Point & rMove) const;
- WrapPolygon::Pointer_t scale(const Fraction & rFractionX, const Fraction & rFractionY) const;
- WrapPolygon::Pointer_t correctWordWrapPolygon(const css::awt::Size & rSrcSize) const;
- WrapPolygon::Pointer_t correctWordWrapPolygonPixel(const css::awt::Size & rSrcSize) const;
+ WrapPolygon::Pointer_t move(const css::awt::Point& rMove) const;
+ WrapPolygon::Pointer_t scale(const Fraction& rFractionX, const Fraction& rFractionY) const;
+ WrapPolygon::Pointer_t correctWordWrapPolygon(const css::awt::Size& rSrcSize) const;
+ WrapPolygon::Pointer_t correctWordWrapPolygonPixel(const css::awt::Size& rSrcSize) const;
WrapPolygon::Pointer_t correctCrop(const css::awt::Size& rGraphicSize,
const css::text::GraphicCrop& rGraphicCrop) const;
css::drawing::PointSequenceSequence getPointSequenceSequence() const;
@@ -66,7 +66,7 @@ public:
WrapPolygonHandler();
virtual ~WrapPolygonHandler() override;
- const WrapPolygon::Pointer_t& getPolygon() const { return mpPolygon;}
+ const WrapPolygon::Pointer_t& getPolygon() const { return mpPolygon; }
private:
WrapPolygon::Pointer_t mpPolygon;
@@ -75,11 +75,9 @@ private:
sal_Int32 mnY;
// Properties
- virtual void lcl_attribute(Id Name, Value & val) override;
- virtual void lcl_sprm(Sprm & sprm) override;
-
+ virtual void lcl_attribute(Id Name, Value& val) override;
+ virtual void lcl_sprm(Sprm& sprm) override;
};
-
}
#endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_WRAPPOLYGONHANDLER_HXX
diff --git a/writerfilter/source/dmapper/util.cxx b/writerfilter/source/dmapper/util.cxx
index d4389fce7571..d5b23a3d46bc 100644
--- a/writerfilter/source/dmapper/util.cxx
+++ b/writerfilter/source/dmapper/util.cxx
@@ -24,7 +24,7 @@ namespace writerfilter::dmapper
{
using namespace com::sun::star;
-std::string XTextRangeToString(uno::Reference< text::XTextRange > const & textRange)
+std::string XTextRangeToString(uno::Reference<text::XTextRange> const& textRange)
{
std::string result;
@@ -44,28 +44,27 @@ std::string XTextRangeToString(uno::Reference< text::XTextRange > const & textRa
result += ")";
}
- OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US );
+ OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US);
result = aOStr.getStr();
}
else
{
- result="(nil)";
+ result = "(nil)";
}
#else
- (void) textRange;
+ (void)textRange;
#endif
return result;
}
-void resolveSprmProps(Properties & rHandler, Sprm & rSprm)
+void resolveSprmProps(Properties& rHandler, Sprm& rSprm)
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
- if( pProperties)
+ if (pProperties)
pProperties->resolve(rHandler);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/util.hxx b/writerfilter/source/dmapper/util.hxx
index 13a032b5a254..5a94a5d0932d 100644
--- a/writerfilter/source/dmapper/util.hxx
+++ b/writerfilter/source/dmapper/util.hxx
@@ -26,11 +26,10 @@
namespace writerfilter::dmapper
{
- std::string XTextRangeToString(css::uno::Reference< css::text::XTextRange > const & textRange);
- void resolveSprmProps(Properties & rHandler, Sprm & rSprm);
+std::string XTextRangeToString(css::uno::Reference<css::text::XTextRange> const& textRange);
+void resolveSprmProps(Properties& rHandler, Sprm& rSprm);
}
-
#endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_UTIL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */