animations/source/animcore/animcore.cxx                           |    8 +-
 connectivity/source/drivers/postgresql/pq_statement.cxx           |    2 
 connectivity/source/drivers/postgresql/pq_updateableresultset.cxx |    4 -
 connectivity/source/drivers/postgresql/pq_updateableresultset.hxx |    2 
 drawinglayer/source/tools/wmfemfhelper.cxx                        |   28 
++++------
 filter/source/config/fragments/types/writer_T602_Document.xcu     |    2 
 include/svx/srchdlg.hxx                                           |    1 
 libreofficekit/source/gtk/lokdocview.cxx                          |    4 -
 starmath/inc/dialog.hxx                                           |    2 
 starmath/source/dialog.cxx                                        |    8 +-
 svx/source/dialog/srchdlg.cxx                                     |    8 ++
 11 files changed, 38 insertions(+), 31 deletions(-)

New commits:
commit 224953d896a3dba5d85992394525ab8b54d8c314
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Oct 12 08:32:55 2021 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Oct 12 09:50:31 2021 +0200

    loplugin:moveparam in various
    
    Change-Id: Ifa7c8ff2b21f63d234c29c28303d0bacd376c1e5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123434
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

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)
 {
commit d602c433a08c6df28198ceb61b95f5c6d85d1a87
Author:     Jan Holesovsky <[email protected]>
AuthorDate: Thu Oct 7 15:12:18 2021 +0200
Commit:     Jan Holesovsky <[email protected]>
CommitDate: Tue Oct 12 09:49:56 2021 +0200

    T602 is an obsolete format, don't assume .txt files are T602
    
    Without this, when the user tries to open a 0-bytes .txt file, they are
    asked for a Save As operation after they hit the Save button.
    
    When we remove the 'txt' from the T602 detection, it rather asks if the
    user wants to use ODT or Plain text (and lose formatting).
    
    Change-Id: Ic48fa61064a9ed78c64d56bc8864f0e12528e072
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123216
    Tested-by: Jenkins
    Reviewed-by: Jan Holesovsky <[email protected]>

diff --git a/filter/source/config/fragments/types/writer_T602_Document.xcu 
b/filter/source/config/fragments/types/writer_T602_Document.xcu
index c34f823da4ca..e9b3df39cf33 100644
--- a/filter/source/config/fragments/types/writer_T602_Document.xcu
+++ b/filter/source/config/fragments/types/writer_T602_Document.xcu
@@ -18,7 +18,7 @@
     <node oor:name="writer_T602_Document" oor:op="replace" >
         <prop 
oor:name="DetectService"><value>com.sun.star.comp.Writer.T602ImportFilter</value></prop>
         <prop oor:name="URLPattern"/>
-        <prop oor:name="Extensions"><value>602 txt</value></prop>
+        <prop oor:name="Extensions"><value>602</value></prop>
         <prop oor:name="MediaType"><value>application/x-t602</value></prop>
         <prop oor:name="Preferred"><value>true</value></prop>
         <prop oor:name="PreferredFilter"><value>T602Document</value></prop>

Reply via email to