clang-tidy modernize-pass-by-value in writer*

Change-Id: Ib08c971eb3e859e7b04cdd408af7966d83c2955b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137585
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2022-07-29 09:50:52 +02:00
parent d75c5c1f61
commit 93bea3531c
35 changed files with 137 additions and 115 deletions

View file

@ -55,6 +55,7 @@
#ifdef DBG_UTIL
#include "PropertyMapHelper.hxx"
#include <rtl/ustring.hxx>
#include <utility>
#endif
namespace writerfilter::dmapper {
@ -81,9 +82,9 @@ using namespace ::std;
#define MAXTABLECELLS 63
DomainMapperTableHandler::DomainMapperTableHandler(
css::uno::Reference<css::text::XTextAppendAndConvert> const& xText,
css::uno::Reference<css::text::XTextAppendAndConvert> xText,
DomainMapper_Impl& rDMapper_Impl)
: m_xText(xText),
: m_xText(std::move(xText)),
m_rDMapper_Impl( rDMapper_Impl ),
m_bHadFootOrEndnote(false)
{

View file

@ -79,7 +79,7 @@ class DomainMapperTableHandler final : public virtual SvRefBase
public:
typedef tools::SvRef<DomainMapperTableHandler> Pointer_t;
DomainMapperTableHandler(css::uno::Reference<css::text::XTextAppendAndConvert> const& xText,
DomainMapperTableHandler(css::uno::Reference<css::text::XTextAppendAndConvert> xText,
DomainMapper_Impl& rDMapper_Impl);
~DomainMapperTableHandler() override;

View file

@ -87,6 +87,7 @@
#include <o3tl/safeint.hxx>
#include <o3tl/temporary.hxx>
#include <oox/mathml/import.hxx>
#include <utility>
#include <xmloff/odffields.hxx>
#include <rtl/uri.hxx>
#include <unotools/ucbstreamhelper.hxx>
@ -312,7 +313,7 @@ uno::Any FloatingTableInfo::getPropertyValue(std::u16string_view propertyName)
DomainMapper_Impl::DomainMapper_Impl(
DomainMapper& rDMapper,
uno::Reference<uno::XComponentContext> const& xContext,
uno::Reference<uno::XComponentContext> xContext,
uno::Reference<lang::XComponent> const& xModel,
SourceDocumentType eDocumentType,
utl::MediaDescriptor const & rMediaDesc) :
@ -321,7 +322,7 @@ DomainMapper_Impl::DomainMapper_Impl(
m_pOOXMLDocument(nullptr),
m_xTextDocument( xModel, uno::UNO_QUERY ),
m_xTextFactory( xModel, uno::UNO_QUERY ),
m_xComponentContext( xContext ),
m_xComponentContext(std::move( xContext )),
m_bForceGenericFields(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get()),
m_bSetUserFieldContent( false ),
m_bSetCitation( false ),
@ -5055,9 +5056,9 @@ bool HeaderFooterContext::getTextInserted() const
sal_Int32 HeaderFooterContext::getTableDepth() const { return m_nTableDepth; }
FieldContext::FieldContext(uno::Reference< text::XTextRange > const& xStart)
FieldContext::FieldContext(uno::Reference< text::XTextRange > xStart)
: m_bFieldCommandCompleted(false)
, m_xStartRange( xStart )
, m_xStartRange(std::move( xStart ))
, m_bFieldLocked( false )
{
m_pProperties = new PropertyMap();

View file

@ -31,6 +31,7 @@
#include <string_view>
#include <o3tl/sorted_vector.hxx>
#include <unordered_map>
#include <utility>
#include <vector>
#include <optional>
@ -198,7 +199,7 @@ class FieldContext : public virtual SvRefBase
std::vector<FieldParagraph> m_aParagraphsToFinish;
public:
explicit FieldContext(css::uno::Reference<css::text::XTextRange> const& xStart);
explicit FieldContext(css::uno::Reference<css::text::XTextRange> xStart);
~FieldContext() override;
const css::uno::Reference<css::text::XTextRange>& GetStartRange() const { return m_xStartRange; }
@ -264,7 +265,7 @@ struct TextAppendContext
*/
std::vector<AnchoredObjectInfo> m_aAnchoredObjects;
inline TextAppendContext(const css::uno::Reference<css::text::XTextAppend>& xAppend, const css::uno::Reference<css::text::XTextCursor>& xCur);
inline TextAppendContext(css::uno::Reference<css::text::XTextAppend> xAppend, const css::uno::Reference<css::text::XTextCursor>& xCur);
};
struct AnchoredContext
@ -272,8 +273,8 @@ struct AnchoredContext
css::uno::Reference<css::text::XTextContent> xTextContent;
bool bToRemove;
explicit AnchoredContext(const css::uno::Reference<css::text::XTextContent>& xContent)
: xTextContent(xContent), bToRemove(false)
explicit AnchoredContext(css::uno::Reference<css::text::XTextContent> xContent)
: xTextContent(std::move(xContent)), bToRemove(false)
{
}
};
@ -305,10 +306,10 @@ struct BookmarkInsertPosition
bool m_bIsStartOfText;
OUString m_sBookmarkName;
css::uno::Reference<css::text::XTextRange> m_xTextRange;
BookmarkInsertPosition(bool bIsStartOfText, const OUString& rName, css::uno::Reference<css::text::XTextRange> const& xTextRange):
BookmarkInsertPosition(bool bIsStartOfText, OUString rName, css::uno::Reference<css::text::XTextRange> xTextRange):
m_bIsStartOfText( bIsStartOfText ),
m_sBookmarkName( rName ),
m_xTextRange( xTextRange )
m_sBookmarkName(std::move( rName )),
m_xTextRange(std::move( xTextRange ))
{}
};
@ -321,12 +322,12 @@ struct PermInsertPosition
css::uno::Reference<css::text::XTextRange> m_xTextRange;
PermInsertPosition(bool bIsStartOfText, sal_Int32 id, const OUString& ed, const OUString& edGrp, css::uno::Reference<css::text::XTextRange> const& xTextRange)
PermInsertPosition(bool bIsStartOfText, sal_Int32 id, OUString ed, OUString edGrp, css::uno::Reference<css::text::XTextRange> xTextRange)
: m_bIsStartOfText(bIsStartOfText)
, m_Id(id)
, m_Ed(ed)
, m_EdGrp(edGrp)
, m_xTextRange(xTextRange)
, m_Ed(std::move(ed))
, m_EdGrp(std::move(edGrp))
, m_xTextRange(std::move(xTextRange))
{}
OUString createBookmarkName() const
@ -406,12 +407,12 @@ struct FloatingTableInfo
/// Tables in footnotes and endnotes are always floating
bool m_bConvertToFloatingInFootnote = false;
FloatingTableInfo(css::uno::Reference<css::text::XTextRange> const& xStart,
css::uno::Reference<css::text::XTextRange> const& xEnd,
FloatingTableInfo(css::uno::Reference<css::text::XTextRange> xStart,
css::uno::Reference<css::text::XTextRange> xEnd,
const css::uno::Sequence<css::beans::PropertyValue>& aFrameProperties,
sal_Int32 nTableWidth, sal_Int32 nTableWidthType, bool bConvertToFloatingInFootnote)
: m_xStart(xStart),
m_xEnd(xEnd),
: m_xStart(std::move(xStart)),
m_xEnd(std::move(xEnd)),
m_aFrameProperties(aFrameProperties),
m_nTableWidth(nTableWidth),
m_nTableWidthType(nTableWidthType),
@ -642,7 +643,7 @@ private:
public:
DomainMapper_Impl(
DomainMapper& rDMapper,
css::uno::Reference < css::uno::XComponentContext > const& xContext,
css::uno::Reference < css::uno::XComponentContext > xContext,
css::uno::Reference< css::lang::XComponent > const& xModel,
SourceDocumentType eDocumentType,
utl::MediaDescriptor const & rMediaDesc);
@ -1210,8 +1211,8 @@ private:
std::unordered_map<OUString, CommentProperties> m_aCommentProps;
};
TextAppendContext::TextAppendContext(const css::uno::Reference<css::text::XTextAppend>& xAppend, const css::uno::Reference<css::text::XTextCursor>& xCur)
: xTextAppend(xAppend)
TextAppendContext::TextAppendContext(css::uno::Reference<css::text::XTextAppend> xAppend, const css::uno::Reference<css::text::XTextCursor>& xCur)
: xTextAppend(std::move(xAppend))
{
xCursor.set(xCur, css::uno::UNO_QUERY);
xInsertPosition = xCursor;

View file

@ -20,6 +20,7 @@
#include "FontTable.hxx"
#include <o3tl/deleter.hxx>
#include <ooxml/resourceids.hxx>
#include <utility>
#include <vector>
#include <sal/log.hxx>
#include <rtl/tencinfo.h>
@ -233,10 +234,10 @@ void FontTable::addEmbeddedFont(const css::uno::Reference<css::io::XInputStream>
m_pImpl->xEmbeddedFontHelper->addEmbeddedFont(stream, fontName, extra, key);
}
EmbeddedFontHandler::EmbeddedFontHandler(FontTable& rFontTable, const OUString& _fontName, const char* _style )
EmbeddedFontHandler::EmbeddedFontHandler(FontTable& rFontTable, OUString _fontName, const char* _style )
: LoggedProperties("EmbeddedFontHandler")
, fontTable( rFontTable )
, fontName( _fontName )
, fontName(std::move( _fontName ))
, style( _style )
{
}

View file

@ -88,7 +88,7 @@ typedef tools::SvRef< FontTable > FontTablePtr;
class EmbeddedFontHandler : public LoggedProperties
{
public:
EmbeddedFontHandler(FontTable& rFontTable, const OUString& fontName, const char* style);
EmbeddedFontHandler(FontTable& rFontTable, OUString fontName, const char* style);
virtual ~EmbeddedFontHandler() override;
private:
virtual void lcl_attribute( Id name, Value& val ) override;

View file

@ -35,6 +35,7 @@
#include <com/sun/star/uno/Any.hxx>
#include "FormControlHelper.hxx"
#include <utility>
#include <xmloff/odffields.hxx>
#include <comphelper/sequence.hxx>
#include <tools/diagnose_ex.h>
@ -129,8 +130,8 @@ uno::Reference<container::XIndexContainer> FormControlHelper::FormControlHelper_
FormControlHelper::FormControlHelper(FieldId eFieldId,
uno::Reference<text::XTextDocument> const& xTextDocument,
FFDataHandler::Pointer_t const & pFFData)
: m_pFFData(pFFData), m_pImpl(new FormControlHelper_Impl)
FFDataHandler::Pointer_t pFFData)
: m_pFFData(std::move(pFFData)), m_pImpl(new FormControlHelper_Impl)
{
m_pImpl->m_eFieldId = eFieldId;
m_pImpl->rTextDocument = xTextDocument;

View file

@ -32,7 +32,7 @@ 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 pFFData);
~FormControlHelper() override;
void insertControl(css::uno::Reference<css::text::XTextRange> const& xTextRange);

View file

@ -82,6 +82,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <o3tl/unit_conversion.hxx>
#include <oox/export/drawingml.hxx>
#include <utility>
using namespace css;
@ -450,8 +451,8 @@ public:
}
};
GraphicImport::GraphicImport(uno::Reference<uno::XComponentContext> const& xComponentContext,
uno::Reference<lang::XMultiServiceFactory> const& xTextFactory,
GraphicImport::GraphicImport(uno::Reference<uno::XComponentContext> xComponentContext,
uno::Reference<lang::XMultiServiceFactory> xTextFactory,
DomainMapper& rDMapper,
GraphicImportType eImportType,
std::pair<OUString, OUString>& rPositionOffsets,
@ -461,8 +462,8 @@ GraphicImport::GraphicImport(uno::Reference<uno::XComponentContext> const& xComp
, LoggedTable("GraphicImport")
, LoggedStream("GraphicImport")
, m_pImpl(new GraphicImport_Impl(eImportType, rDMapper, rPositionOffsets, rAligns, rPositivePercentages))
, m_xComponentContext(xComponentContext)
, m_xTextFactory(xTextFactory)
, m_xComponentContext(std::move(xComponentContext))
, m_xTextFactory(std::move(xTextFactory))
{
}

View file

@ -81,8 +81,8 @@ class GraphicImport : public LoggedProperties, public LoggedTable
void putPropertyToFrameGrabBag( const OUString& sPropertyName, const css::uno::Any& aPropertyValue );
public:
explicit GraphicImport( css::uno::Reference<css::uno::XComponentContext> const& xComponentContext,
css::uno::Reference<css::lang::XMultiServiceFactory> const& xTextFactory,
explicit GraphicImport( css::uno::Reference<css::uno::XComponentContext> xComponentContext,
css::uno::Reference<css::lang::XMultiServiceFactory> xTextFactory,
DomainMapper& rDomainMapper,
GraphicImportType eGraphicImportType,
std::pair<OUString, OUString>& rPositionOffsets,

View file

@ -20,6 +20,7 @@
#include "LoggedResources.hxx"
#include "TagLogger.hxx"
#include <ooxml/QNameToString.hxx>
#include <utility>
using namespace ::com::sun::star;
@ -27,8 +28,8 @@ namespace writerfilter
{
#ifdef DBG_UTIL
LoggedResourcesHelper::LoggedResourcesHelper(const std::string& sPrefix)
: msPrefix(sPrefix)
LoggedResourcesHelper::LoggedResourcesHelper(std::string sPrefix)
: msPrefix(std::move(sPrefix))
{
}

View file

@ -31,7 +31,7 @@ namespace writerfilter
class LoggedResourcesHelper final
{
public:
explicit LoggedResourcesHelper(const std::string& sPrefix);
explicit LoggedResourcesHelper(std::string sPrefix);
~LoggedResourcesHelper();
void startElement(const std::string& sElement);

View file

@ -45,6 +45,7 @@
#include <comphelper/propertyvalue.hxx>
#include <comphelper/string.hxx>
#include <regex>
#include <utility>
using namespace com::sun::star;
@ -638,11 +639,11 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
ListsManager::ListsManager(DomainMapper& rDMapper,
const uno::Reference<lang::XMultiServiceFactory> & xFactory)
uno::Reference<lang::XMultiServiceFactory> xFactory)
: LoggedProperties("ListsManager")
, LoggedTable("ListsManager")
, m_rDMapper(rDMapper)
, m_xFactory(xFactory)
, m_xFactory(std::move(xFactory))
{
}

View file

@ -231,7 +231,7 @@ private:
public:
ListsManager(DomainMapper& rDMapper, const css::uno::Reference<css::lang::XMultiServiceFactory>& xFactory);
ListsManager(DomainMapper& rDMapper, css::uno::Reference<css::lang::XMultiServiceFactory> xFactory);
virtual ~ListsManager() override;
typedef tools::SvRef< ListsManager > Pointer;

View file

@ -64,6 +64,7 @@
#include "PropertyMapHelper.hxx"
#include <o3tl/sorted_vector.hxx>
#include <o3tl/unit_conversion.hxx>
#include <utility>
using namespace com::sun::star;
@ -2005,8 +2006,8 @@ private:
OUString m_aName;
public:
explicit NamedPropertyValue( const OUString& i_aStr )
: m_aName( i_aStr )
explicit NamedPropertyValue( OUString i_aStr )
: m_aName(std::move( i_aStr ))
{
}

View file

@ -31,6 +31,7 @@
#include <memory>
#include <optional>
#include <map>
#include <utility>
#include <vector>
#include <set>
@ -98,15 +99,15 @@ private:
bool m_bIsDocDefault;
public:
PropValue( const css::uno::Any& rValue, GrabBagType i_GrabBagType, bool bDocDefault )
: m_aValue( rValue )
PropValue( css::uno::Any aValue, GrabBagType i_GrabBagType, bool bDocDefault )
: m_aValue(std::move( aValue ))
, m_GrabBagType( i_GrabBagType )
, m_bIsDocDefault( bDocDefault )
{
}
PropValue( const css::uno::Any& rValue, GrabBagType i_GrabBagType )
: m_aValue( rValue )
PropValue( css::uno::Any aValue, GrabBagType i_GrabBagType )
: m_aValue(std::move( aValue ))
, m_GrabBagType( i_GrabBagType )
, m_bIsDocDefault( false )
{

View file

@ -13,6 +13,7 @@
#include <com/sun/star/text/VertOrientation.hpp>
#include <editeng/unoprnms.hxx>
#include <sal/log.hxx>
#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
#include <comphelper/string.hxx>
@ -76,9 +77,9 @@ static awt::Size lcl_getOptimalWidth(const StyleSheetTablePtr& pStyleSheet,
}
SdtHelper::SdtHelper(DomainMapper_Impl& rDM_Impl,
css::uno::Reference<css::uno::XComponentContext> const& xContext)
css::uno::Reference<css::uno::XComponentContext> xContext)
: m_rDM_Impl(rDM_Impl)
, m_xComponentContext(xContext)
, m_xComponentContext(std::move(xContext))
, m_aControlType(SdtControlType::unknown)
, m_bHasElements(false)
, m_bOutsideAParagraph(false)

View file

@ -128,7 +128,7 @@ class SdtHelper final : public virtual SvRefBase
public:
explicit SdtHelper(DomainMapper_Impl& rDM_Impl,
css::uno::Reference<css::uno::XComponentContext> const& xContext);
css::uno::Reference<css::uno::XComponentContext> xContext);
~SdtHelper() override;
std::vector<OUString>& getDropDownItems() { return m_aDropDownItems; }

View file

@ -24,6 +24,7 @@
#include "BorderHandler.hxx"
#include "LatentStyleHandler.hxx"
#include <ooxml/resourceids.hxx>
#include <utility>
#include <vector>
#include <iterator>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
@ -255,8 +256,8 @@ struct ListCharStylePropertyMap_t
OUString sCharStyleName;
PropertyValueVector_t aPropertyValues;
ListCharStylePropertyMap_t(const OUString& rCharStyleName, PropertyValueVector_t&& rPropertyValues):
sCharStyleName( rCharStyleName ),
ListCharStylePropertyMap_t(OUString _sCharStyleName, PropertyValueVector_t&& rPropertyValues):
sCharStyleName(std::move( _sCharStyleName )),
aPropertyValues( std::move(rPropertyValues) )
{}
};
@ -277,7 +278,7 @@ struct StyleSheetTable_Impl
bool m_bHasImportedDefaultParaProps;
bool m_bIsNewDoc;
StyleSheetTable_Impl(DomainMapper& rDMapper, uno::Reference< text::XTextDocument> const& xTextDocument, bool bIsNewDoc);
StyleSheetTable_Impl(DomainMapper& rDMapper, uno::Reference< text::XTextDocument> xTextDocument, bool bIsNewDoc);
OUString HasListCharStyle( const PropertyValueVector_t& rCharProperties );
@ -289,10 +290,10 @@ struct StyleSheetTable_Impl
StyleSheetTable_Impl::StyleSheetTable_Impl(DomainMapper& rDMapper,
uno::Reference< text::XTextDocument> const& xTextDocument,
uno::Reference< text::XTextDocument> xTextDocument,
bool const bIsNewDoc)
: m_rDMapper( rDMapper ),
m_xTextDocument( xTextDocument ),
m_xTextDocument(std::move( xTextDocument )),
m_pDefaultParaProps(new PropertyMap),
m_pDefaultCharProps(new PropertyMap),
m_sDefaultParaStyleName("Normal"),

View file

@ -23,6 +23,7 @@
#include "PropertyMap.hxx"
#include <utility>
#include <vector>
namespace writerfilter::dmapper
@ -56,7 +57,7 @@ public:
typedef tools::SvRef<CellData> Pointer_t;
CellData(css::uno::Reference<css::text::XTextRange> const & start, TablePropertyMapPtr pProps)
: mStart(start), mEnd(start), mpProps(pProps), mbOpen(true)
: mStart(start), mEnd(start), mpProps(std::move(pProps)), mbOpen(true)
, m_nGridSpan(1)
{
}

View file

@ -19,14 +19,16 @@
#include "OOXMLBinaryObjectReference.hxx"
#include <string.h>
#include <utility>
namespace writerfilter::ooxml
{
using namespace ::com::sun::star;
OOXMLBinaryObjectReference::OOXMLBinaryObjectReference
(OOXMLStream::Pointer_t const & pStream)
: mpStream(pStream), mbRead(false)
(OOXMLStream::Pointer_t pStream)
: mpStream(std::move(pStream)), mbRead(false)
{
}

View file

@ -33,7 +33,7 @@ class OOXMLBinaryObjectReference : public writerfilter::Reference<BinaryObj>
void read();
public:
explicit OOXMLBinaryObjectReference(OOXMLStream::Pointer_t const& pStream);
explicit OOXMLBinaryObjectReference(OOXMLStream::Pointer_t pStream);
virtual ~OOXMLBinaryObjectReference() override;
virtual void resolve(BinaryObj& rHandler) override;

View file

@ -42,6 +42,7 @@
#include <iostream>
#include <sfx2/objsh.hxx>
#include <utility>
// this extern variable is declared in OOXMLStreamImpl.hxx
OUString customTarget;
@ -50,9 +51,9 @@ using namespace ::com::sun::star;
namespace writerfilter::ooxml
{
OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t const & pStream, const uno::Reference<task::XStatusIndicator>& xStatusIndicator, bool bSkipImages, const uno::Sequence<beans::PropertyValue>& rDescriptor)
: mpStream(pStream)
, mxStatusIndicator(xStatusIndicator)
OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream, uno::Reference<task::XStatusIndicator> xStatusIndicator, bool bSkipImages, const uno::Sequence<beans::PropertyValue>& rDescriptor)
: mpStream(std::move(pStream))
, mxStatusIndicator(std::move(xStatusIndicator))
, mnXNoteId(0)
, mbIsSubstream(false)
, mbSkipImages(bSkipImages)
@ -416,8 +417,8 @@ namespace {
// Ensures that the indicator is reset after exiting OOXMLDocumentImpl::resolve
class StatusIndicatorGuard{
public:
explicit StatusIndicatorGuard(css::uno::Reference<css::task::XStatusIndicator> const & xStatusIndicator)
:mxStatusIndicator(xStatusIndicator)
explicit StatusIndicatorGuard(css::uno::Reference<css::task::XStatusIndicator> xStatusIndicator)
:mxStatusIndicator(std::move(xStatusIndicator))
{
}

View file

@ -100,7 +100,7 @@ private:
void resolveCommentsExtendedStream(Stream & rStream);
public:
OOXMLDocumentImpl(OOXMLStream::Pointer_t const & pStream, const css::uno::Reference<css::task::XStatusIndicator>& xStatusIndicator, bool bSkipImages, const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor);
OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream, css::uno::Reference<css::task::XStatusIndicator> xStatusIndicator, bool bSkipImages, const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor);
virtual ~OOXMLDocumentImpl() override;
virtual void resolve(Stream & rStream) override;

View file

@ -21,6 +21,7 @@
#include "OOXMLFastContextHandler.hxx"
#include "OOXMLFactory.hxx"
#include <sal/log.hxx>
#include <utility>
namespace writerfilter::ooxml
{
@ -29,11 +30,11 @@ using namespace ::std;
OOXMLFastDocumentHandler::OOXMLFastDocumentHandler(
uno::Reference< uno::XComponentContext > const & context,
uno::Reference< uno::XComponentContext > context,
Stream* pStream,
OOXMLDocumentImpl* pDocument,
sal_Int32 nXNoteId )
: m_xContext(context)
: m_xContext(std::move(context))
, mpStream( pStream )
, mpDocument( pDocument )
, mnXNoteId( nXNoteId )

View file

@ -35,7 +35,7 @@ class OOXMLFastDocumentHandler : public cppu::WeakImplHelper<css::xml::sax::XFas
{
public:
OOXMLFastDocumentHandler(
css::uno::Reference< css::uno::XComponentContext > const & context,
css::uno::Reference< css::uno::XComponentContext > context,
Stream* pStream,
OOXMLDocumentImpl* pDocument,
sal_Int32 nXNoteId );

View file

@ -24,15 +24,16 @@
#include <com/sun/star/drawing/XShape.hpp>
#include <sax/tools/converter.hxx>
#include <tools/color.hxx>
#include <utility>
namespace writerfilter::ooxml
{
using namespace ::std;
using namespace com::sun::star;
OOXMLProperty::OOXMLProperty(Id id, const OOXMLValue::Pointer_t& pValue,
OOXMLProperty::OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue,
OOXMLProperty::Type_t eType)
: mId(id), mpValue(pValue), meType(eType)
: mId(id), mpValue(std::move(pValue)), meType(eType)
{
}
@ -171,9 +172,8 @@ OOXMLValue * OOXMLValue::clone() const
class OOXMLBinaryValue
*/
OOXMLBinaryValue::OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t const &
pBinaryObj)
: mpBinaryObj(pBinaryObj)
OOXMLBinaryValue::OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t pBinaryObj)
: mpBinaryObj(std::move(pBinaryObj))
{
}
@ -259,8 +259,8 @@ OOXMLValue * OOXMLBooleanValue::clone() const
class OOXMLStringValue
*/
OOXMLStringValue::OOXMLStringValue(const OUString & rStr)
: mStr(rStr)
OOXMLStringValue::OOXMLStringValue(OUString sStr)
: mStr(std::move(sStr))
{
}
@ -293,8 +293,8 @@ OOXMLValue * OOXMLStringValue::clone() const
/*
class OOXMLInputStreamValue
*/
OOXMLInputStreamValue::OOXMLInputStreamValue(uno::Reference<io::XInputStream> const & xInputStream)
: mxInputStream(xInputStream)
OOXMLInputStreamValue::OOXMLInputStreamValue(uno::Reference<io::XInputStream> xInputStream)
: mxInputStream(std::move(xInputStream))
{
}
@ -430,8 +430,8 @@ string OOXMLPropertySet::toString()
class OOXMLPropertySetValue
*/
OOXMLPropertySetValue::OOXMLPropertySetValue(const OOXMLPropertySet::Pointer_t& pPropertySet)
: mpPropertySet(pPropertySet)
OOXMLPropertySetValue::OOXMLPropertySetValue(OOXMLPropertySet::Pointer_t pPropertySet)
: mpPropertySet(std::move(pPropertySet))
{
}
@ -689,8 +689,8 @@ string OOXMLMeasurementOrPercentValue::toString() const
*/
OOXMLShapeValue::OOXMLShapeValue(uno::Reference<drawing::XShape> const & rShape)
: mrShape(rShape)
OOXMLShapeValue::OOXMLShapeValue(uno::Reference<drawing::XShape> xShape)
: mrShape(std::move(xShape))
{
}
@ -720,8 +720,8 @@ OOXMLValue * OOXMLShapeValue::clone() const
*/
OOXMLStarMathValue::OOXMLStarMathValue( uno::Reference< embed::XEmbeddedObject > const & c )
: component(c)
OOXMLStarMathValue::OOXMLStarMathValue( uno::Reference< embed::XEmbeddedObject > c )
: component(std::move(c))
{
}

View file

@ -65,7 +65,7 @@ private:
Type_t meType;
public:
OOXMLProperty(Id id, const OOXMLValue::Pointer_t& pValue, Type_t eType);
OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue, Type_t eType);
OOXMLProperty(const OOXMLProperty& rSprm) = delete;
virtual ~OOXMLProperty() override;
@ -84,7 +84,7 @@ class OOXMLBinaryValue final : public OOXMLValue
mutable OOXMLBinaryObjectReference::Pointer_t mpBinaryObj;
public:
explicit OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t const& pBinaryObj);
explicit OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t pBinaryObj);
virtual ~OOXMLBinaryValue() override;
virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary() override;
@ -123,7 +123,7 @@ class OOXMLStringValue final : public OOXMLValue
OUString mStr;
public:
explicit OOXMLStringValue(const OUString& rStr);
explicit OOXMLStringValue(OUString sStr);
virtual ~OOXMLStringValue() override;
OOXMLStringValue(OOXMLStringValue const&) = default;
@ -144,7 +144,7 @@ class OOXMLInputStreamValue final : public OOXMLValue
css::uno::Reference<css::io::XInputStream> mxInputStream;
public:
explicit OOXMLInputStreamValue(css::uno::Reference<css::io::XInputStream> const& xInputStream);
explicit OOXMLInputStreamValue(css::uno::Reference<css::io::XInputStream> xInputStream);
virtual ~OOXMLInputStreamValue() override;
virtual css::uno::Any getAny() const override;
@ -216,7 +216,7 @@ class OOXMLPropertySetValue final : public OOXMLValue
OOXMLPropertySet::Pointer_t mpPropertySet;
public:
explicit OOXMLPropertySetValue(const OOXMLPropertySet::Pointer_t& pPropertySet);
explicit OOXMLPropertySetValue(OOXMLPropertySet::Pointer_t pPropertySet);
virtual ~OOXMLPropertySetValue() override;
OOXMLPropertySetValue(OOXMLPropertySetValue const&) = default;
@ -339,7 +339,7 @@ class OOXMLShapeValue final : public OOXMLValue
css::uno::Reference<css::drawing::XShape> mrShape;
public:
explicit OOXMLShapeValue(css::uno::Reference<css::drawing::XShape> const& rShape);
explicit OOXMLShapeValue(css::uno::Reference<css::drawing::XShape> xShape);
virtual ~OOXMLShapeValue() override;
virtual css::uno::Any getAny() const override;
@ -354,7 +354,7 @@ class OOXMLStarMathValue final : public OOXMLValue
css::uno::Reference<css::embed::XEmbeddedObject> component;
public:
explicit OOXMLStarMathValue(css::uno::Reference<css::embed::XEmbeddedObject> const& component);
explicit OOXMLStarMathValue(css::uno::Reference<css::embed::XEmbeddedObject> component);
virtual ~OOXMLStarMathValue() override;
virtual css::uno::Any getAny() const override;

View file

@ -23,6 +23,7 @@
#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <comphelper/storagehelper.hxx>
#include <utility>
namespace writerfilter::ooxml
{
@ -31,9 +32,9 @@ using namespace com::sun::star;
OOXMLStreamImpl::OOXMLStreamImpl
(uno::Reference<uno::XComponentContext> const & xContext,
uno::Reference<io::XInputStream> const & xStorageStream,
uno::Reference<io::XInputStream> xStorageStream,
StreamType_t nType, bool bRepairStorage)
: mxContext(xContext), mxStorageStream(xStorageStream), mnStreamType(nType)
: mxContext(xContext), mxStorageStream(std::move(xStorageStream)), mnStreamType(nType)
{
mxStorage.set
(comphelper::OStorageHelper::GetStorageOfFormatFromInputStream
@ -57,12 +58,12 @@ OOXMLStreamImpl::OOXMLStreamImpl
}
OOXMLStreamImpl::OOXMLStreamImpl
(OOXMLStreamImpl const & rOOXMLStream, const OUString & rId)
(OOXMLStreamImpl const & rOOXMLStream, OUString sId)
: mxContext(rOOXMLStream.mxContext),
mxStorageStream(rOOXMLStream.mxStorageStream),
mxStorage(rOOXMLStream.mxStorage),
mnStreamType(UNKNOWN),
msId(rId),
msId(std::move(sId)),
msPath(rOOXMLStream.msPath)
{
mxRelationshipAccess.set(rOOXMLStream.mxDocumentStream, uno::UNO_QUERY_THROW);

View file

@ -61,9 +61,9 @@ public:
(OOXMLStreamImpl const & rStream, StreamType_t nType);
OOXMLStreamImpl
(css::uno::Reference<css::uno::XComponentContext> const & xContext,
css::uno::Reference<css::io::XInputStream> const & xStorageStream,
css::uno::Reference<css::io::XInputStream> xStorageStream,
StreamType_t nType, bool bRepairStorage);
OOXMLStreamImpl(OOXMLStreamImpl const & rStream, const OUString & rId);
OOXMLStreamImpl(OOXMLStreamImpl const & rStream, OUString aId);
virtual ~OOXMLStreamImpl() override;

View file

@ -23,6 +23,7 @@
#include <cppuhelper/implbase.hxx>
#include <unotools/mediadescriptor.hxx>
#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <xmloff/xmlimp.hxx>
@ -43,8 +44,8 @@ class ImportFilterImpl
css::lang::XInitialization>
{
public:
ImportFilterImpl(const css::uno::Reference<css::uno::XComponentContext>& rxContext)
: mxContext(rxContext)
ImportFilterImpl(css::uno::Reference<css::uno::XComponentContext> xContext)
: mxContext(std::move(xContext))
{
}

View file

@ -32,6 +32,7 @@
#include <iostream>
#include <map>
#include <utility>
using namespace ::com::sun::star;
@ -71,8 +72,8 @@ class FolderStream : public librevenge::RVNGInputStream
{
public:
//! constructor
explicit FolderStream(const css::uno::Reference<css::ucb::XContent>& xContent)
: m_xContent(xContent)
explicit FolderStream(css::uno::Reference<css::ucb::XContent> xContent)
: m_xContent(std::move(xContent))
{
}

View file

@ -39,6 +39,7 @@
#include <DirectoryStream.hxx>
#include <WPXSvInputStream.hxx>
#include <utility>
namespace io = com::sun::star::io;
namespace sdbc = com::sun::star::sdbc;
@ -93,13 +94,13 @@ uno::Reference<io::XInputStream> findStream(ucbhelper::Content& rContent, std::u
struct DirectoryStream::Impl
{
explicit Impl(const uno::Reference<ucb::XContent>& rxContent);
explicit Impl(uno::Reference<ucb::XContent> xContent);
uno::Reference<ucb::XContent> xContent;
};
DirectoryStream::Impl::Impl(const uno::Reference<ucb::XContent>& rxContent)
: xContent(rxContent)
DirectoryStream::Impl::Impl(uno::Reference<ucb::XContent> _xContent)
: xContent(std::move(_xContent))
{
}

View file

@ -29,6 +29,7 @@
#include <memory>
#include <string_view>
#include <unordered_map>
#include <utility>
#include <vector>
namespace writerperfect
@ -96,7 +97,7 @@ OUString concatPath(std::u16string_view lhs, const OUString& rhs)
struct OLEStreamData
{
OLEStreamData(const OString& rName, const OString& rvngName);
OLEStreamData(OString aName, OString rvngName);
tools::SvRef<SotStorageStream> stream;
@ -155,9 +156,9 @@ public:
bool mbInitialized;
};
OLEStreamData::OLEStreamData(const OString& rName, const OString& rvngName)
: name(rName)
, RVNGname(rvngName)
OLEStreamData::OLEStreamData(OString aName, OString rvngName)
: name(std::move(aName))
, RVNGname(std::move(rvngName))
{
}
@ -265,7 +266,7 @@ namespace
{
struct ZipStreamData
{
explicit ZipStreamData(const OString& rName);
explicit ZipStreamData(OString aName);
Reference<XInputStream> xStream;
@ -309,8 +310,8 @@ public:
bool mbInitialized;
};
ZipStreamData::ZipStreamData(const OString& rName)
: aName(rName)
ZipStreamData::ZipStreamData(OString _aName)
: aName(std::move(_aName))
{
}

View file

@ -16,6 +16,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx>
#include <utility>
/* This component will be instantiated for both import or export. Whether it calls
* setSourceDocument or setTargetDocument determines which Impl function the filter
@ -32,9 +33,8 @@ class WordPerfectImportFilter
bool importImpl(const css::uno::Sequence<css::beans::PropertyValue>& aDescriptor);
public:
explicit WordPerfectImportFilter(
const css::uno::Reference<css::uno::XComponentContext>& rxContext)
: mxContext(rxContext)
explicit WordPerfectImportFilter(css::uno::Reference<css::uno::XComponentContext> xContext)
: mxContext(std::move(xContext))
{
}