[Libreoffice-commits] core.git: sw/source writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Feb 15 11:35:18 UTC 2017
sw/source/filter/ww8/rtfexportfilter.cxx | 4 +-
sw/source/filter/ww8/rtfexportfilter.hxx | 2 -
writerfilter/source/dmapper/SmartTagHandler.cxx | 4 +-
writerfilter/source/dmapper/SmartTagHandler.hxx | 2 -
writerfilter/source/filter/RtfFilter.cxx | 6 ++--
writerfilter/source/filter/WriterFilter.cxx | 4 +-
writerfilter/source/rtftok/rtfreferencetable.cxx | 4 +-
writerfilter/source/rtftok/rtfreferencetable.hxx | 2 -
writerfilter/source/rtftok/rtfvalue.cxx | 32 +++++++++++------------
writerfilter/source/rtftok/rtfvalue.hxx | 16 +++++------
10 files changed, 38 insertions(+), 38 deletions(-)
New commits:
commit 31f4400ea5d41ed11b3aef114950d7b424df6a26
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Feb 15 10:08:50 2017 +0100
writerfilter: can use std::move() here
Change-Id: I48980ae44cd68b9526d915f877a37f6a559910e5
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 5da1c73..a88b179 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -31,8 +31,8 @@
using namespace ::com::sun::star;
-RtfExportFilter::RtfExportFilter(const uno::Reference< uno::XComponentContext >& xCtx)
- : m_xCtx(xCtx)
+RtfExportFilter::RtfExportFilter(uno::Reference<uno::XComponentContext> xCtx)
+ : m_xCtx(std::move(xCtx))
{
}
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index 842ac77..473c9b2 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -47,7 +47,7 @@ protected:
css::uno::Reference<css::uno::XComponentContext> m_xCtx;
css::uno::Reference<css::lang::XComponent> m_xSrcDoc;
public:
- explicit RtfExportFilter(const css::uno::Reference<css::uno::XComponentContext>& xCtx);
+ explicit RtfExportFilter(css::uno::Reference<css::uno::XComponentContext> xCtx);
virtual ~RtfExportFilter() override;
// XFilter
diff --git a/writerfilter/source/dmapper/SmartTagHandler.cxx b/writerfilter/source/dmapper/SmartTagHandler.cxx
index 4b1b308..1d8c8a3 100644
--- a/writerfilter/source/dmapper/SmartTagHandler.cxx
+++ b/writerfilter/source/dmapper/SmartTagHandler.cxx
@@ -35,9 +35,9 @@ namespace dmapper
using namespace ::com::sun::star;
-SmartTagHandler::SmartTagHandler(const uno::Reference<uno::XComponentContext>& xComponentContext, const uno::Reference<text::XTextDocument>& xTextDocument)
+SmartTagHandler::SmartTagHandler(uno::Reference<uno::XComponentContext> xComponentContext, const uno::Reference<text::XTextDocument>& xTextDocument)
: LoggedProperties("SmartTagHandler"),
- m_xComponentContext(xComponentContext),
+ m_xComponentContext(std::move(xComponentContext)),
m_xDocumentMetadataAccess(xTextDocument, uno::UNO_QUERY)
{
}
diff --git a/writerfilter/source/dmapper/SmartTagHandler.hxx b/writerfilter/source/dmapper/SmartTagHandler.hxx
index a8365a6..6a877cf 100644
--- a/writerfilter/source/dmapper/SmartTagHandler.hxx
+++ b/writerfilter/source/dmapper/SmartTagHandler.hxx
@@ -34,7 +34,7 @@ class SmartTagHandler
std::vector< std::pair<OUString, OUString> > m_aAttributes;
public:
- SmartTagHandler(const css::uno::Reference<css::uno::XComponentContext>& xComponentContext, const css::uno::Reference<css::text::XTextDocument>& xTextDocument);
+ SmartTagHandler(css::uno::Reference<css::uno::XComponentContext> xComponentContext, const css::uno::Reference<css::text::XTextDocument>& xTextDocument);
virtual ~SmartTagHandler() override;
virtual void lcl_attribute(Id Name, Value& val) override;
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx
index a148a2f..34e6e4a 100644
--- a/writerfilter/source/filter/RtfFilter.cxx
+++ b/writerfilter/source/filter/RtfFilter.cxx
@@ -52,7 +52,7 @@ class RtfFilter : public cppu::WeakImplHelper
uno::Reference<lang::XComponent> m_xSrcDoc, m_xDstDoc;
public:
- explicit RtfFilter(const uno::Reference<uno::XComponentContext>& xContext);
+ explicit RtfFilter(uno::Reference<uno::XComponentContext> xContext);
// XFilter
sal_Bool SAL_CALL filter(const uno::Sequence<beans::PropertyValue>& rDescriptor) override;
@@ -74,8 +74,8 @@ public:
};
-RtfFilter::RtfFilter(const uno::Reference< uno::XComponentContext >& rxContext)
- : m_xContext(rxContext)
+RtfFilter::RtfFilter(uno::Reference<uno::XComponentContext> xContext)
+ : m_xContext(std::move(xContext))
{
}
diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx
index cb9b4cf..82c96f4 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -96,8 +96,8 @@ protected:
uno::Reference<lang::XComponent> m_xSrcDoc, m_xDstDoc;
public:
- explicit WriterFilter(const uno::Reference<uno::XComponentContext>& rxContext)
- : m_xContext(rxContext)
+ explicit WriterFilter(uno::Reference<uno::XComponentContext> xContext)
+ : m_xContext(std::move(xContext))
{}
// XFilter
diff --git a/writerfilter/source/rtftok/rtfreferencetable.cxx b/writerfilter/source/rtftok/rtfreferencetable.cxx
index 769321e..a32ceb1 100644
--- a/writerfilter/source/rtftok/rtfreferencetable.cxx
+++ b/writerfilter/source/rtftok/rtfreferencetable.cxx
@@ -14,8 +14,8 @@ namespace writerfilter
namespace rtftok
{
-RTFReferenceTable::RTFReferenceTable(Entries_t const& rEntries)
- : m_aEntries(rEntries)
+RTFReferenceTable::RTFReferenceTable(Entries_t aEntries)
+ : m_aEntries(std::move(aEntries))
{
}
diff --git a/writerfilter/source/rtftok/rtfreferencetable.hxx b/writerfilter/source/rtftok/rtfreferencetable.hxx
index b633a99..64706e2 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;
- explicit RTFReferenceTable(Entries_t const& rEntries);
+ explicit RTFReferenceTable(Entries_t aEntries);
virtual ~RTFReferenceTable();
virtual void resolve(Table& rHandler) override;
private:
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 0e540cb..9a2f79d 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -18,20 +18,20 @@ namespace rtftok
{
-RTFValue::RTFValue(int nValue, const OUString& sValue,
+RTFValue::RTFValue(int nValue, OUString sValue,
RTFSprms rAttributes, RTFSprms rSprms,
- uno::Reference<drawing::XShape> const& xShape,
- uno::Reference<io::XInputStream> const& xStream,
- uno::Reference<embed::XEmbeddedObject> const& xObject,
+ uno::Reference<drawing::XShape> xShape,
+ uno::Reference<io::XInputStream> xStream,
+ uno::Reference<embed::XEmbeddedObject> xObject,
bool bForceString,
const RTFShape& aShape)
: m_nValue(nValue),
- m_sValue(sValue),
+ m_sValue(std::move(sValue)),
m_pAttributes(std::make_shared<RTFSprms>(rAttributes)),
m_pSprms(std::make_shared<RTFSprms>(rSprms)),
- m_xShape(xShape),
- m_xStream(xStream),
- m_xObject(xObject),
+ m_xShape(std::move(xShape)),
+ m_xStream(std::move(xStream)),
+ m_xObject(std::move(xObject)),
m_bForceString(bForceString),
m_pShape(std::make_shared<RTFShape>(aShape))
{
@@ -55,9 +55,9 @@ RTFValue::RTFValue(int nValue)
m_pShape.reset(new RTFShape());
}
-RTFValue::RTFValue(const OUString& sValue, bool bForce)
+RTFValue::RTFValue(OUString sValue, bool bForce)
: m_nValue(),
- m_sValue(sValue),
+ m_sValue(std::move(sValue)),
m_pAttributes(std::make_shared<RTFSprms>()),
m_pSprms(std::make_shared<RTFSprms>()),
m_bForceString(bForce),
@@ -83,31 +83,31 @@ RTFValue::RTFValue(RTFSprms rAttributes, RTFSprms rSprms)
{
}
-RTFValue::RTFValue(uno::Reference<drawing::XShape> const& xShape)
+RTFValue::RTFValue(uno::Reference<drawing::XShape> xShape)
: m_nValue(),
m_pAttributes(std::make_shared<RTFSprms>()),
m_pSprms(std::make_shared<RTFSprms>()),
- m_xShape(xShape),
+ m_xShape(std::move(xShape)),
m_bForceString(false),
m_pShape(std::make_shared<RTFShape>())
{
}
-RTFValue::RTFValue(uno::Reference<io::XInputStream> const& xStream)
+RTFValue::RTFValue(uno::Reference<io::XInputStream> xStream)
: m_nValue(),
m_pAttributes(std::make_shared<RTFSprms>()),
m_pSprms(std::make_shared<RTFSprms>()),
- m_xStream(xStream),
+ m_xStream(std::move(xStream)),
m_bForceString(false),
m_pShape(std::make_shared<RTFShape>())
{
}
-RTFValue::RTFValue(uno::Reference<embed::XEmbeddedObject> const& xObject)
+RTFValue::RTFValue(uno::Reference<embed::XEmbeddedObject> xObject)
: m_nValue(),
m_pAttributes(std::make_shared<RTFSprms>()),
m_pSprms(std::make_shared<RTFSprms>()),
- m_xObject(xObject),
+ m_xObject(std::move(xObject)),
m_bForceString(false),
m_pShape(std::make_shared<RTFShape>())
{
diff --git a/writerfilter/source/rtftok/rtfvalue.hxx b/writerfilter/source/rtftok/rtfvalue.hxx
index d113fbf..37febd2 100644
--- a/writerfilter/source/rtftok/rtfvalue.hxx
+++ b/writerfilter/source/rtftok/rtfvalue.hxx
@@ -26,19 +26,19 @@ class RTFValue
{
public:
typedef std::shared_ptr<RTFValue> Pointer_t;
- RTFValue(int nValue, const OUString& sValue, RTFSprms rAttributes, RTFSprms rSprms,
- css::uno::Reference<css::drawing::XShape> const& xShape,
- css::uno::Reference<css::io::XInputStream> const& xStream,
- css::uno::Reference<css::embed::XEmbeddedObject> const& xObject,
+ RTFValue(int nValue, OUString sValue, RTFSprms rAttributes, RTFSprms rSprms,
+ css::uno::Reference<css::drawing::XShape> xShape,
+ css::uno::Reference<css::io::XInputStream> xStream,
+ css::uno::Reference<css::embed::XEmbeddedObject> xObject,
bool bForceString, const RTFShape& aShape);
RTFValue();
explicit RTFValue(int nValue);
- RTFValue(const OUString& sValue, bool bForce = false);
+ RTFValue(OUString sValue, bool bForce = false);
explicit RTFValue(RTFSprms rAttributes);
RTFValue(RTFSprms rAttributes, RTFSprms rSprms);
- 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(css::uno::Reference<css::drawing::XShape> xShape);
+ explicit RTFValue(css::uno::Reference<css::io::XInputStream> xStream);
+ explicit RTFValue(css::uno::Reference<css::embed::XEmbeddedObject> xObject);
explicit RTFValue(const RTFShape& aShape);
virtual ~RTFValue() override;
void setString(const OUString& sValue);
More information about the Libreoffice-commits
mailing list