[Libreoffice-commits] core.git: sw/source writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Jul 5 08:58:59 UTC 2017
sw/source/filter/ww8/rtfsdrexport.cxx | 4 ++--
writerfilter/source/dmapper/LatentStyleHandler.hxx | 6 +++---
writerfilter/source/dmapper/SmartTagHandler.hxx | 6 +++---
writerfilter/source/dmapper/TablePositionHandler.cxx | 8 +-------
writerfilter/source/dmapper/TablePositionHandler.hxx | 18 +++++++++---------
5 files changed, 18 insertions(+), 24 deletions(-)
New commits:
commit df044af5b1a33108f8e5c8c1281f82f5aaa98c95
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Jul 5 09:23:14 2017 +0200
writerfilter: remove redundant virtual keywords in dmapper
Also use default member initializers where possible.
Change-Id: I641ea8e81506d826d4d81e9be21a1a0c8d6160e9
Reviewed-on: https://gerrit.libreoffice.org/39555
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 007606f89d5e..81ada8000c5b 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -570,14 +570,14 @@ sal_Int32 RtfSdrExport::StartShape()
lcl_AppendSP(m_rAttrOutput.RunText(), "gtextUNICODE",
msfilter::rtfutil::OutString(rEditObj.GetText(0), m_rExport.m_eCurrentEncoding));
- const SvxFontItem* pFontFamily = static_cast<const SvxFontItem*>(rItemSet.GetItem(SID_ATTR_CHAR_FONT));
+ auto pFontFamily = static_cast<const SvxFontItem*>(rItemSet.GetItem(SID_ATTR_CHAR_FONT));
if (pFontFamily)
{
lcl_AppendSP(m_rAttrOutput.RunText(), "gtextFont",
msfilter::rtfutil::OutString(pFontFamily->GetFamilyName(), m_rExport.m_eCurrentEncoding));
}
- const SvxFontHeightItem* pFontHeight = static_cast<const SvxFontHeightItem*>(rItemSet.GetItem(SID_ATTR_CHAR_FONTHEIGHT));
+ auto pFontHeight = static_cast<const SvxFontHeightItem*>(rItemSet.GetItem(SID_ATTR_CHAR_FONTHEIGHT));
if (pFontHeight)
{
long nFontHeight = TransformMetric(pFontHeight->GetHeight(), FUNIT_TWIP, FUNIT_POINT);
diff --git a/writerfilter/source/dmapper/LatentStyleHandler.hxx b/writerfilter/source/dmapper/LatentStyleHandler.hxx
index ec1b8dd6d176..778c108d9a88 100644
--- a/writerfilter/source/dmapper/LatentStyleHandler.hxx
+++ b/writerfilter/source/dmapper/LatentStyleHandler.hxx
@@ -26,12 +26,12 @@ class LatentStyleHandler
std::vector<css::beans::PropertyValue> m_aAttributes;
// Properties
- virtual void lcl_attribute(Id Name, Value& val) override;
- virtual void lcl_sprm(Sprm& sprm) override;
+ void lcl_attribute(Id Name, Value& val) override;
+ void lcl_sprm(Sprm& sprm) override;
public:
LatentStyleHandler();
- virtual ~LatentStyleHandler() override;
+ ~LatentStyleHandler() override;
const std::vector<css::beans::PropertyValue>& getAttributes() const;
};
diff --git a/writerfilter/source/dmapper/SmartTagHandler.hxx b/writerfilter/source/dmapper/SmartTagHandler.hxx
index 6a877cf67d6b..f758b67318e3 100644
--- a/writerfilter/source/dmapper/SmartTagHandler.hxx
+++ b/writerfilter/source/dmapper/SmartTagHandler.hxx
@@ -35,10 +35,10 @@ class SmartTagHandler
public:
SmartTagHandler(css::uno::Reference<css::uno::XComponentContext> xComponentContext, const css::uno::Reference<css::text::XTextDocument>& xTextDocument);
- virtual ~SmartTagHandler() override;
+ ~SmartTagHandler() override;
- virtual void lcl_attribute(Id Name, Value& val) override;
- virtual void lcl_sprm(Sprm& sprm) override;
+ void lcl_attribute(Id Name, Value& val) override;
+ void lcl_sprm(Sprm& sprm) override;
void setURI(const OUString& rURI);
void setElement(const OUString& rElement);
diff --git a/writerfilter/source/dmapper/TablePositionHandler.cxx b/writerfilter/source/dmapper/TablePositionHandler.cxx
index 4536ac612526..9707eaa584d7 100644
--- a/writerfilter/source/dmapper/TablePositionHandler.cxx
+++ b/writerfilter/source/dmapper/TablePositionHandler.cxx
@@ -24,13 +24,7 @@ using namespace ::com::sun::star;
TablePositionHandler::TablePositionHandler() :
LoggedProperties("TablePositionHandler"),
m_aVertAnchor("margin"),
- m_aHorzAnchor("text"),
- m_nY(0),
- m_nX(0),
- m_nLeftFromText(0),
- m_nRightFromText(0),
- m_nTopFromText(0),
- m_nBottomFromText(0)
+ m_aHorzAnchor("text")
{
}
diff --git a/writerfilter/source/dmapper/TablePositionHandler.hxx b/writerfilter/source/dmapper/TablePositionHandler.hxx
index 3e95ce2e72d7..50806a9eac3d 100644
--- a/writerfilter/source/dmapper/TablePositionHandler.hxx
+++ b/writerfilter/source/dmapper/TablePositionHandler.hxx
@@ -26,16 +26,16 @@ class TablePositionHandler
OUString m_aYSpec;
OUString m_aHorzAnchor;
OUString m_aXSpec;
- sal_Int32 m_nY;
- sal_Int32 m_nX;
- sal_Int32 m_nLeftFromText;
- sal_Int32 m_nRightFromText;
- sal_Int32 m_nTopFromText;
- sal_Int32 m_nBottomFromText;
+ sal_Int32 m_nY = 0;
+ sal_Int32 m_nX = 0;
+ sal_Int32 m_nLeftFromText = 0;
+ sal_Int32 m_nRightFromText = 0;
+ sal_Int32 m_nTopFromText = 0;
+ sal_Int32 m_nBottomFromText = 0;
// Properties
- virtual void lcl_attribute(Id Name, Value& val) override;
- virtual void lcl_sprm(Sprm& sprm) override;
+ void lcl_attribute(Id Name, Value& val) override;
+ void lcl_sprm(Sprm& sprm) override;
public:
sal_Int32 getY()
@@ -81,7 +81,7 @@ public:
}
TablePositionHandler();
- virtual ~TablePositionHandler() override;
+ ~TablePositionHandler() override;
/** Compute the UNO properties for the frame containing the table based
on the received tokens.
More information about the Libreoffice-commits
mailing list