summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--animations/source/animcore/animcore.cxx8
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.hxx2
-rw-r--r--drawinglayer/source/tools/wmfemfhelper.cxx28
-rw-r--r--include/svx/srchdlg.hxx1
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx4
-rw-r--r--starmath/inc/dialog.hxx2
-rw-r--r--starmath/source/dialog.cxx8
-rw-r--r--svx/source/dialog/srchdlg.cxx8
10 files changed, 37 insertions, 30 deletions
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index b664b683347a..d5652fbc4ccf 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -370,7 +370,7 @@ private:
class TimeContainerEnumeration : public ::cppu::WeakImplHelper< XEnumeration >
{
public:
- explicit TimeContainerEnumeration( const std::vector< Reference< XAnimationNode > > &rChildren );
+ explicit TimeContainerEnumeration( std::vector< Reference< XAnimationNode > >&& rChildren );
// Methods
virtual sal_Bool SAL_CALL hasMoreElements() override;
@@ -389,8 +389,8 @@ private:
}
-TimeContainerEnumeration::TimeContainerEnumeration( const std::vector< Reference< XAnimationNode > > &rChildren )
-: maChildren( rChildren )
+TimeContainerEnumeration::TimeContainerEnumeration( std::vector< Reference< XAnimationNode > >&& rChildren )
+: maChildren( std::move(rChildren) )
{
maIter = maChildren.begin();
}
@@ -1902,7 +1902,7 @@ Reference< XEnumeration > SAL_CALL AnimationNode::createEnumeration()
{
Guard< Mutex > aGuard( maMutex );
- return new TimeContainerEnumeration( maChildren);
+ return new TimeContainerEnumeration(std::vector(maChildren));
}
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 792fca0f1380..7db4b20536e2 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -446,7 +446,7 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
*(data->pLastResultset) =
UpdateableResultSet::createFromPGResultSet(
data->refMutex, data->owner, data->ppSettings, result,
- schema, table,sourceTableKeys );
+ schema, table, std::move(sourceTableKeys) );
}
else if( ! table.getLength() )
{
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index e0373d265adf..5c1b23e82175 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -89,7 +89,7 @@ css::uno::Reference< css::sdbc::XCloseable > UpdateableResultSet::createFromPGRe
PGresult *result,
const OUString &schema,
const OUString &table,
- const std::vector< OUString > &primaryKey )
+ std::vector< OUString > && primaryKey )
{
sal_Int32 columnCount = PQnfields( result );
sal_Int32 rowCount = PQntuples( result );
@@ -120,7 +120,7 @@ css::uno::Reference< css::sdbc::XCloseable > UpdateableResultSet::createFromPGRe
}
rtl::Reference<UpdateableResultSet> pRS = new UpdateableResultSet(
- mutex, owner, std::move(columnNames), std::move(data), ppSettings, schema, table, std::vector(primaryKey) );
+ mutex, owner, std::move(columnNames), std::move(data), ppSettings, schema, table, std::move(primaryKey) );
pRS->m_meta = new ResultSetMetaData( mutex, pRS,nullptr, ppSettings, result, schema, table );
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
index afe385a15ec0..1beeadc31e98 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
@@ -118,7 +118,7 @@ public:
PGresult *result,
const OUString &schema,
const OUString &table,
- const std::vector< OUString > &primaryKey );
+ std::vector< OUString > && primaryKey );
public: // XInterface
virtual void SAL_CALL acquire() noexcept override { SequenceResultSet::acquire(); }
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index 0bfe1276eb26..042bd8a77037 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -435,7 +435,7 @@ namespace wmfemfhelper
{
/** helper to create a PointArrayPrimitive2D based on current context */
static void createPointArrayPrimitive(
- const std::vector< basegfx::B2DPoint >& rPositions,
+ std::vector< basegfx::B2DPoint >&& rPositions,
TargetHolder& rTarget,
PropertyHolder const & rProperties,
const basegfx::BColor& rBColor)
@@ -447,21 +447,19 @@ namespace wmfemfhelper
{
rTarget.append(
new drawinglayer::primitive2d::PointArrayPrimitive2D(
- std::vector(rPositions),
+ std::move(rPositions),
rBColor));
}
else
{
- std::vector< basegfx::B2DPoint > aPositions(rPositions);
-
- for(basegfx::B2DPoint & aPosition : aPositions)
+ for(basegfx::B2DPoint & aPosition : rPositions)
{
aPosition = rProperties.getTransformation() * aPosition;
}
rTarget.append(
new drawinglayer::primitive2d::PointArrayPrimitive2D(
- std::move(aPositions),
+ std::move(rPositions),
rBColor));
}
}
@@ -1100,7 +1098,7 @@ namespace wmfemfhelper
const OUString& rText,
sal_uInt16 nTextStart,
sal_uInt16 nTextLength,
- const std::vector< double >& rDXArray,
+ std::vector< double >&& rDXArray,
TargetHolder& rTarget,
PropertyHolder const & rProperty)
{
@@ -1184,7 +1182,7 @@ namespace wmfemfhelper
rText,
nTextStart,
nTextLength,
- std::vector(rDXArray),
+ std::move(rDXArray),
aFontAttribute,
aLocale,
aFontColor,
@@ -1494,7 +1492,7 @@ namespace wmfemfhelper
{
if(!aPositions.empty())
{
- createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor());
+ createPointArrayPrimitive(std::move(aPositions), rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor());
aPositions.clear();
}
@@ -1510,7 +1508,7 @@ namespace wmfemfhelper
if(!aPositions.empty())
{
- createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor());
+ createPointArrayPrimitive(std::move(aPositions), rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor());
}
break;
@@ -1534,7 +1532,7 @@ namespace wmfemfhelper
if(!aPositions.empty())
{
- createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), rPropertyHolders.Current().getLineColor());
+ createPointArrayPrimitive(std::move(aPositions), rTargetHolders.Current(), rPropertyHolders.Current(), rPropertyHolders.Current().getLineColor());
}
}
@@ -1800,13 +1798,13 @@ namespace wmfemfhelper
if(nTextLength && rPropertyHolders.Current().getTextColorActive())
{
- const std::vector< double > aDXArray{};
+ std::vector< double > aDXArray{};
processMetaTextAction(
pA->GetPoint(),
pA->GetText(),
nTextIndex,
nTextLength,
- aDXArray,
+ std::move(aDXArray),
rTargetHolders.Current(),
rPropertyHolders.Current());
}
@@ -1847,7 +1845,7 @@ namespace wmfemfhelper
pA->GetText(),
nTextIndex,
nTextLength,
- aDXArray,
+ std::move(aDXArray),
rTargetHolders.Current(),
rPropertyHolders.Current());
}
@@ -1910,7 +1908,7 @@ namespace wmfemfhelper
pA->GetText(),
nTextIndex,
nTextLength,
- aTextArray,
+ std::move(aTextArray),
rTargetHolders.Current(),
rPropertyHolders.Current());
}
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 71c956dcd69a..2b975e435083 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -51,6 +51,7 @@ class SVX_DLLPUBLIC SearchAttrItemList : private SrchAttrItemList
public:
SearchAttrItemList() {}
SearchAttrItemList( const SearchAttrItemList& rList );
+ SearchAttrItemList( SearchAttrItemList&& rList );
~SearchAttrItemList();
void Put( const SfxItemSet& rSet );
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 68c23ffa4e55..330361209ba0 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -67,9 +67,9 @@ struct ViewRectangles
int m_nPart;
std::vector<GdkRectangle> m_aRectangles;
- ViewRectangles(int nPart = 0, const std::vector<GdkRectangle>& rRectangles = std::vector<GdkRectangle>())
+ ViewRectangles(int nPart = 0, std::vector<GdkRectangle>&& rRectangles = std::vector<GdkRectangle>())
: m_nPart(nPart),
- m_aRectangles(rRectangles)
+ m_aRectangles(std::move(rRectangles))
{
}
};
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 016d13ea7e10..6fbaaff7b819 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -279,7 +279,7 @@ public:
void calccols(const vcl::RenderContext& rRenderContext);
void SelectSymbol(sal_uInt16 nSymbol);
sal_uInt16 GetSelectSymbol() const { return nSelectSymbol; }
- void SetSymbolSet(const SymbolPtrVec_t& rSymbolSet);
+ void SetSymbolSet(SymbolPtrVec_t && rSymbolSet);
void SetSelectHdl(const Link<SmShowSymbolSet&,void>& rLink) { aSelectHdlLink = rLink; }
void SetDblClickHdl(const Link<SmShowSymbolSet&,void>& rLink) { aDblClickHdlLink = rLink; }
};
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 06c1ab66f3a3..0857f2456db6 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1103,9 +1103,9 @@ void SmShowSymbolSet::calccols(const vcl::RenderContext& rRenderContext)
SetScrollBarRange();
}
-void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
+void SmShowSymbolSet::SetSymbolSet(SymbolPtrVec_t && rSymbolSet)
{
- aSymbolSet = rSymbolSet;
+ aSymbolSet = std::move(rSymbolSet);
SetScrollBarRange();
Invalidate();
}
@@ -1257,7 +1257,7 @@ IMPL_LINK_NOARG(SmSymbolDialog, EditClickHdl, weld::Button&, void)
// just update display of current symbol set
assert(aSymSetName == aSymSetName); //unexpected change in symbol set name
aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName );
- m_xSymbolSetDisplay->SetSymbolSet( aSymbolSet );
+ m_xSymbolSetDisplay->SetSymbolSet( std::vector(aSymbolSet) );
}
if (nSymPos >= aSymbolSet.size())
@@ -1349,7 +1349,7 @@ bool SmSymbolDialog::SelectSymbolSet(const OUString &rSymbolSetName)
return pSym1->GetCharacter() < pSym2->GetCharacter();
} );
- m_xSymbolSetDisplay->SetSymbolSet( aSymbolSet );
+ m_xSymbolSetDisplay->SetSymbolSet( std::move(aSymbolSet) );
if (!aSymbolSet.empty())
SelectSymbol(0);
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index f28c5bdfc3b8..ba5def14777e 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -174,6 +174,14 @@ static void StrArrToList_Impl( sal_uInt16 nId, const std::vector<OUString>& rStr
SfxGetpApp()->PutItem( SfxStringListItem( nId, &rStrLst ) );
}
+SearchAttrItemList::SearchAttrItemList( SearchAttrItemList&& rList ) :
+ SrchAttrItemList(std::move(rList))
+{
+ for ( size_t i = 0; i < size(); ++i )
+ if ( !IsInvalidItem( (*this)[i].pItem ) )
+ (*this)[i].pItem = (*this)[i].pItem->Clone();
+}
+
SearchAttrItemList::SearchAttrItemList( const SearchAttrItemList& rList ) :
SrchAttrItemList(rList)
{