[Libreoffice-commits] core.git: writerfilter/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Sat Dec 3 18:10:17 UTC 2016
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 +++---
writerfilter/source/dmapper/DomainMapper_Impl.hxx | 8 ++++----
writerfilter/source/dmapper/OLEHandler.hxx | 2 +-
writerfilter/source/dmapper/SdtHelper.hxx | 2 +-
writerfilter/source/dmapper/TableData.hxx | 2 +-
writerfilter/source/dmapper/TextEffectsHandler.hxx | 2 +-
writerfilter/source/rtftok/rtfdocumentimpl.hxx | 4 ++--
writerfilter/source/rtftok/rtffly.hxx | 4 ++--
writerfilter/source/rtftok/rtfreferenceproperties.hxx | 2 +-
writerfilter/source/rtftok/rtfreferencetable.hxx | 2 +-
writerfilter/source/rtftok/rtfskipdestination.hxx | 2 +-
writerfilter/source/rtftok/rtfvalue.hxx | 12 ++++++------
12 files changed, 24 insertions(+), 24 deletions(-)
New commits:
commit 76936e787bd13fb1a747b7c716df3fba2d0d3fa9
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Sat Dec 3 13:39:44 2016 +0100
cppcheck style fix for noExplicitConstructor in writerfilter
make ctors with one parameter explicit
Change-Id: I08e753cea9f5ea17d654c889bad37ab7d0f4611e
Reviewed-on: https://gerrit.libreoffice.org/31588
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 983b27c..87d93be 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1859,14 +1859,14 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
// shapes for OLE objects.
m_aTextAppendStack.push(TextAppendContext(uno::Reference<text::XTextAppend>(xShape, uno::UNO_QUERY), uno::Reference<text::XTextCursor>()));
uno::Reference<text::XTextContent> xTxtContent(xShape, uno::UNO_QUERY);
- m_aAnchoredStack.push(xTxtContent);
+ m_aAnchoredStack.push(AnchoredContext(xTxtContent));
}
else if (xSInfo->supportsService("com.sun.star.drawing.OLE2Shape"))
{
// OLE2Shape from oox should be converted to a TextEmbeddedObject for sw.
m_aTextAppendStack.push(TextAppendContext(uno::Reference<text::XTextAppend>(xShape, uno::UNO_QUERY), uno::Reference<text::XTextCursor>()));
uno::Reference<text::XTextContent> xTextContent(xShape, uno::UNO_QUERY);
- m_aAnchoredStack.push(xTextContent);
+ m_aAnchoredStack.push(AnchoredContext(xTextContent));
uno::Reference<beans::XPropertySet> xShapePropertySet(xShape, uno::UNO_QUERY);
m_xEmbedded.set(m_xTextFactory->createInstance("com.sun.star.text.TextEmbeddedObject"), uno::UNO_QUERY_THROW);
@@ -1887,7 +1887,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
// Add the shape to the anchored objects stack
uno::Reference< text::XTextContent > xTxtContent( xShape, uno::UNO_QUERY_THROW );
- m_aAnchoredStack.push( xTxtContent );
+ m_aAnchoredStack.push( AnchoredContext(xTxtContent) );
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
#ifdef DEBUG_WRITERFILTER
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index c69e114..ae50366 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -128,7 +128,7 @@ class HeaderFooterContext
{
bool m_bTextInserted;
public:
- HeaderFooterContext(bool bTextInserted);
+ explicit HeaderFooterContext(bool bTextInserted);
bool getTextInserted();
};
@@ -156,7 +156,7 @@ class FieldContext
PropertyMapPtr m_pProperties;
public:
- FieldContext(css::uno::Reference<css::text::XTextRange> const& xStart);
+ explicit FieldContext(css::uno::Reference<css::text::XTextRange> const& xStart);
~FieldContext();
const css::uno::Reference<css::text::XTextRange>& GetStartRange() const { return m_xStartRange; }
@@ -219,7 +219,7 @@ struct AnchoredContext
css::uno::Reference<css::text::XTextContent> xTextContent;
bool bToRemove;
- AnchoredContext(const css::uno::Reference<css::text::XTextContent>& xContent)
+ explicit AnchoredContext(const css::uno::Reference<css::text::XTextContent>& xContent)
: xTextContent(xContent), bToRemove(false)
{
}
@@ -233,7 +233,7 @@ typedef std::shared_ptr<FieldContext> FieldContextPtr;
struct DeletableTabStop : public css::style::TabStop
{
bool bDeleted;
- DeletableTabStop()
+ explicit DeletableTabStop()
: bDeleted(false)
{
// same defaults as SvxXMLTabStopContext_Impl
diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx
index 2f99de5..268138d 100644
--- a/writerfilter/source/dmapper/OLEHandler.hxx
+++ b/writerfilter/source/dmapper/OLEHandler.hxx
@@ -77,7 +77,7 @@ class OLEHandler : public LoggedProperties
virtual void lcl_sprm(Sprm & sprm) override;
public:
- OLEHandler(DomainMapper& rDomainMapper);
+ explicit OLEHandler(DomainMapper& rDomainMapper);
virtual ~OLEHandler() override;
const css::uno::Reference<css::drawing::XShape>& getShape() { return m_xShape; };
diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx
index a619d50..a1fc08d 100644
--- a/writerfilter/source/dmapper/SdtHelper.hxx
+++ b/writerfilter/source/dmapper/SdtHelper.hxx
@@ -69,7 +69,7 @@ class SdtHelper final
/// Create and append the drawing::XControlShape, containing the various models.
void createControlShape(css::awt::Size aSize, css::uno::Reference<css::awt::XControlModel> const&, const css::uno::Sequence<css::beans::PropertyValue>& rGrabBag);
public:
- SdtHelper(DomainMapper_Impl& rDM_Impl);
+ explicit SdtHelper(DomainMapper_Impl& rDM_Impl);
~SdtHelper();
std::vector<OUString>& getDropDownItems()
diff --git a/writerfilter/source/dmapper/TableData.hxx b/writerfilter/source/dmapper/TableData.hxx
index 03ad499..8fd385f 100644
--- a/writerfilter/source/dmapper/TableData.hxx
+++ b/writerfilter/source/dmapper/TableData.hxx
@@ -263,7 +263,7 @@ class TableData
public:
typedef std::shared_ptr<TableData> Pointer_t;
- TableData(unsigned int nDepth) : mnDepth(nDepth) { newRow(); }
+ explicit TableData(unsigned int nDepth) : mnDepth(nDepth) { newRow(); }
~TableData() {}
/**
diff --git a/writerfilter/source/dmapper/TextEffectsHandler.hxx b/writerfilter/source/dmapper/TextEffectsHandler.hxx
index fd89b2a..31984ef 100644
--- a/writerfilter/source/dmapper/TextEffectsHandler.hxx
+++ b/writerfilter/source/dmapper/TextEffectsHandler.hxx
@@ -43,7 +43,7 @@ private:
virtual void lcl_sprm(Sprm& sprm) override;
public:
- TextEffectsHandler(sal_uInt32 aElementId);
+ explicit TextEffectsHandler(sal_uInt32 aElementId);
virtual ~TextEffectsHandler() override;
const boost::optional<PropertyIds>& getGrabBagPropertyId() { return maPropertyId;}
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 0a21bbf..559605a 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -195,7 +195,7 @@ private:
Id m_nHRule;
boost::optional<Id> m_oWrap;
public:
- RTFFrame(RTFParserState* pParserState);
+ explicit RTFFrame(RTFParserState* pParserState);
sal_Int16 m_nAnchorType;
/// Convert the stored properties to Sprms
@@ -213,7 +213,7 @@ class RTFDocumentImpl;
class RTFParserState
{
public:
- RTFParserState(RTFDocumentImpl* pDocumentImpl);
+ explicit RTFParserState(RTFDocumentImpl* pDocumentImpl);
RTFDocumentImpl* m_pDocumentImpl;
RTFInternalState nInternalState;
diff --git a/writerfilter/source/rtftok/rtffly.hxx b/writerfilter/source/rtftok/rtffly.hxx
index 14a84b5..8da0ffd 100644
--- a/writerfilter/source/rtftok/rtffly.hxx
+++ b/writerfilter/source/rtftok/rtffly.hxx
@@ -22,7 +22,7 @@ namespace rtftok
class RTFVertOrient
{
public:
- RTFVertOrient(sal_uInt16 nValue)
+ explicit RTFVertOrient(sal_uInt16 nValue)
: m_nVal(nValue)
{
}
@@ -83,7 +83,7 @@ private:
class RTFHoriOrient
{
public:
- RTFHoriOrient(sal_uInt16 nValue)
+ explicit RTFHoriOrient(sal_uInt16 nValue)
: m_nVal(nValue)
{
}
diff --git a/writerfilter/source/rtftok/rtfreferenceproperties.hxx b/writerfilter/source/rtftok/rtfreferenceproperties.hxx
index a10572f..caffc32 100644
--- a/writerfilter/source/rtftok/rtfreferenceproperties.hxx
+++ b/writerfilter/source/rtftok/rtfreferenceproperties.hxx
@@ -22,7 +22,7 @@ class RTFReferenceProperties
{
public:
RTFReferenceProperties(RTFSprms rAttributes, RTFSprms rSprms);
- RTFReferenceProperties(RTFSprms rAttributes);
+ explicit RTFReferenceProperties(RTFSprms rAttributes);
virtual ~RTFReferenceProperties();
virtual void resolve(Properties& rHandler) override;
RTFSprms& getAttributes()
diff --git a/writerfilter/source/rtftok/rtfreferencetable.hxx b/writerfilter/source/rtftok/rtfreferencetable.hxx
index 5fe3318..b633a99 100644
--- a/writerfilter/source/rtftok/rtfreferencetable.hxx
+++ b/writerfilter/source/rtftok/rtfreferencetable.hxx
@@ -24,7 +24,7 @@ class RTFReferenceTable
public:
typedef std::map<int, writerfilter::Reference<Properties>::Pointer_t> Entries_t;
typedef std::pair<int, writerfilter::Reference<Properties>::Pointer_t> Entry_t;
- RTFReferenceTable(Entries_t const& rEntries);
+ explicit RTFReferenceTable(Entries_t const& rEntries);
virtual ~RTFReferenceTable();
virtual void resolve(Table& rHandler) override;
private:
diff --git a/writerfilter/source/rtftok/rtfskipdestination.hxx b/writerfilter/source/rtftok/rtfskipdestination.hxx
index 50be754..d153459 100644
--- a/writerfilter/source/rtftok/rtfskipdestination.hxx
+++ b/writerfilter/source/rtftok/rtfskipdestination.hxx
@@ -20,7 +20,7 @@ namespace rtftok
class RTFSkipDestination final
{
public:
- RTFSkipDestination(RTFListener& rImport);
+ explicit RTFSkipDestination(RTFListener& rImport);
~RTFSkipDestination();
void setParsed(bool bParsed);
void setReset(bool bReset);
diff --git a/writerfilter/source/rtftok/rtfvalue.hxx b/writerfilter/source/rtftok/rtfvalue.hxx
index eeb9730..d113fbf 100644
--- a/writerfilter/source/rtftok/rtfvalue.hxx
+++ b/writerfilter/source/rtftok/rtfvalue.hxx
@@ -32,14 +32,14 @@ public:
css::uno::Reference<css::embed::XEmbeddedObject> const& xObject,
bool bForceString, const RTFShape& aShape);
RTFValue();
- RTFValue(int nValue);
+ explicit RTFValue(int nValue);
RTFValue(const OUString& sValue, bool bForce = false);
- RTFValue(RTFSprms rAttributes);
+ explicit RTFValue(RTFSprms rAttributes);
RTFValue(RTFSprms rAttributes, RTFSprms rSprms);
- RTFValue(css::uno::Reference<css::drawing::XShape> const& xShape);
- RTFValue(css::uno::Reference<css::io::XInputStream> const& xStream);
- RTFValue(css::uno::Reference<css::embed::XEmbeddedObject> const& xObject);
- RTFValue(const RTFShape& aShape);
+ explicit RTFValue(css::uno::Reference<css::drawing::XShape> const& xShape);
+ explicit RTFValue(css::uno::Reference<css::io::XInputStream> const& xStream);
+ explicit RTFValue(css::uno::Reference<css::embed::XEmbeddedObject> const& xObject);
+ explicit RTFValue(const RTFShape& aShape);
virtual ~RTFValue() override;
void setString(const OUString& sValue);
virtual int getInt() const override;
More information about the Libreoffice-commits
mailing list