Kaydet (Commit) 31f4400e authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: can use std::move() here

Change-Id: I48980ae44cd68b9526d915f877a37f6a559910e5
üst dc8ebf20
......@@ -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))
{
}
......
......@@ -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
......
......@@ -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)
{
}
......
......@@ -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;
......
......@@ -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))
{
}
......
......@@ -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
......
......@@ -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))
{
}
......
......@@ -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:
......
......@@ -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>())
{
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment