[Libreoffice-commits] core.git: 2 commits - comphelper/source cppcanvas/qa cppcanvas/source cui/source desktop/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 12 13:45:25 UTC 2019


 comphelper/source/processfactory/processfactory.cxx |    3 +--
 cppcanvas/qa/unit/test.cxx                          |    3 +--
 cppcanvas/source/mtfrenderer/textaction.cxx         |    4 +---
 cui/source/customize/eventdlg.cxx                   |    4 +---
 cui/source/dialogs/hldocntp.cxx                     |    3 +--
 cui/source/dialogs/scriptdlg.cxx                    |    9 +++------
 cui/source/options/optaboutconfig.cxx               |   15 +++++----------
 cui/source/options/optlingu.cxx                     |    6 ++----
 cui/source/options/optsave.cxx                      |    3 +--
 desktop/source/lib/init.cxx                         |    3 ++-
 10 files changed, 18 insertions(+), 35 deletions(-)

New commits:
commit 725a1f514cd9fde0bb837457ed186fd6a7b4a239
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Apr 11 14:38:58 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Apr 12 15:33:02 2019 +0200

    loplugin:sequentialassign in comphelper..cui
    
    Change-Id: I1a08f3684b785e31535adcfb4220ded267a77c3b
    Reviewed-on: https://gerrit.libreoffice.org/70643
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx
index 1f51fe619016..720ec6e0fb67 100644
--- a/comphelper/source/processfactory/processfactory.cxx
+++ b/comphelper/source/processfactory/processfactory.cxx
@@ -58,8 +58,7 @@ void setProcessServiceFactory(const Reference< XMultiServiceFactory >& xSMgr)
 
 Reference< XMultiServiceFactory > getProcessServiceFactory()
 {
-    Reference< XMultiServiceFactory> xReturn;
-    xReturn = localProcessFactory( xReturn, false );
+    Reference< XMultiServiceFactory> xReturn = localProcessFactory( xReturn, false );
     if ( !xReturn.is() )
     {
         throw DeploymentException( "null process service factory" );
diff --git a/cppcanvas/qa/unit/test.cxx b/cppcanvas/qa/unit/test.cxx
index 5da7a0d85201..de7d3ef94b91 100644
--- a/cppcanvas/qa/unit/test.cxx
+++ b/cppcanvas/qa/unit/test.cxx
@@ -49,8 +49,7 @@ void CanvasTest::testComposite()
 
     // a huge canvas ...
     Size aSize (1, 1);
-    uno::Reference<rendering::XBitmap> xBitmap;
-    xBitmap = xCanvas->getDevice ()->createCompatibleAlphaBitmap(
+    uno::Reference<rendering::XBitmap> xBitmap = xCanvas->getDevice ()->createCompatibleAlphaBitmap(
                         vcl::unotools::integerSize2DFromSize( aSize ) );
     CPPUNIT_ASSERT( xBitmap.is() );
 
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 93c0d617a22b..cca610102430 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -2027,9 +2027,7 @@ namespace cppcanvas
 
                 for( const auto& rVCLPolyPolygon : aVCLPolyPolyVector )
                 {
-                    ::basegfx::B2DPolyPolygon aPolyPolygon;
-
-                    aPolyPolygon = rVCLPolyPolygon.getB2DPolyPolygon();
+                    ::basegfx::B2DPolyPolygon aPolyPolygon = rVCLPolyPolygon.getB2DPolyPolygon();
                     aPolyPolygon.transform( aMapModeTransform );
 
                     // append result to collecting polypoly
diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx
index 7c5a5a9576a2..b0f01933d509 100644
--- a/cui/source/customize/eventdlg.cxx
+++ b/cui/source/customize/eventdlg.cxx
@@ -67,9 +67,7 @@ SvxEventConfigPage::SvxEventConfigPage(TabPageParent pParent, const SfxItemSet&
     m_xSaveInListBox->connect_changed( LINK( this, SvxEventConfigPage,
                 SelectHdl_Impl ) );
 
-    uno::Reference< frame::XGlobalEventBroadcaster > xSupplier;
-
-    xSupplier =
+    uno::Reference< frame::XGlobalEventBroadcaster > xSupplier =
         frame::theGlobalEventBroadcaster::get(::comphelper::getProcessComponentContext());
 
     m_xAppEvents = xSupplier->getEvents();
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 39adc1b3d46b..063b7ede1b8a 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -204,8 +204,7 @@ void SvxHyperlinkNewDocTp::FillDocumentList ()
             if ( pFilter )
             {
                 // insert doc-name and image
-                OUString aTitleName( aTitle );
-                aTitleName = aTitleName.replaceFirst( "~", "" );
+                OUString aTitleName = aTitle.replaceFirst( "~", "" );
 
                 sal_Int16 nPos = m_pLbDocTypes->InsertEntry ( aTitleName );
                 OUString aStrDefExt( pFilter->GetDefaultExtension () );
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 569d09f71046..d34b27a9b806 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -822,8 +822,7 @@ void SvxScriptOrgDialog::createEntry(weld::TreeIter& rEntry)
         Sequence< sal_Int16 > outIndex;
         try
         {
-            Any aResult;
-            aResult = xInv->invoke( "Creatable", args, outIndex, outArgs );
+            Any aResult = xInv->invoke( "Creatable", args, outIndex, outArgs );
             Reference< browse::XBrowseNode > newNode( aResult, UNO_QUERY );
             aChildNode = newNode;
 
@@ -907,8 +906,7 @@ void SvxScriptOrgDialog::renameEntry(weld::TreeIter& rEntry)
         Sequence< sal_Int16 > outIndex;
         try
         {
-            Any aResult;
-            aResult = xInv->invoke( "Renamable", args, outIndex, outArgs );
+            Any aResult = xInv->invoke( "Renamable", args, outIndex, outArgs );
             Reference< browse::XBrowseNode > newNode( aResult, UNO_QUERY );
             aChildNode = newNode;
 
@@ -959,8 +957,7 @@ void SvxScriptOrgDialog::deleteEntry(weld::TreeIter& rEntry)
         Sequence< sal_Int16 > outIndex;
         try
         {
-            Any aResult;
-            aResult = xInv->invoke( "Deletable", args, outIndex, outArgs );
+            Any aResult = xInv->invoke( "Deletable", args, outIndex, outArgs );
             aResult >>= result; // or do we just assume true if no exception ?
         }
         catch( Exception const & )
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 4bc61e9ac8a5..0bd5f7210559 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -678,8 +678,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
                     {
                         //create string sequence from comma separated string
                         //uno::Sequence< OUString > seqStr;
-                        std::vector< OUString > seqStr;
-                        seqStr = commaStringToSequence( sNewValue );
+                        std::vector< OUString > seqStr = commaStringToSequence( sNewValue );
 
                         //create appropriate sequence with same size as string sequence
                         uno::Sequence< sal_Int16 > seqShort( seqStr.size() );
@@ -692,8 +691,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
                     }
                     else if( sPropertyType == "[]long" )
                     {
-                        std::vector< OUString > seqStrLong;
-                        seqStrLong = commaStringToSequence( sNewValue );
+                        std::vector< OUString > seqStrLong = commaStringToSequence( sNewValue );
 
                         uno::Sequence< sal_Int32 > seqLong( seqStrLong.size() );
                         for( size_t i = 0; i < seqStrLong.size(); ++i )
@@ -704,8 +702,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
                     }
                     else if( sPropertyType == "[]hyper" )
                     {
-                        std::vector< OUString > seqStrHyper;
-                        seqStrHyper = commaStringToSequence( sNewValue );
+                        std::vector< OUString > seqStrHyper = commaStringToSequence( sNewValue );
                         uno::Sequence< sal_Int64 > seqHyper( seqStrHyper.size() );
                         for( size_t i = 0; i < seqStrHyper.size(); ++i )
                         {
@@ -715,8 +712,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
                     }
                     else if( sPropertyType == "[]double" )
                     {
-                        std::vector< OUString > seqStrDoub;
-                        seqStrDoub = commaStringToSequence( sNewValue );
+                        std::vector< OUString > seqStrDoub = commaStringToSequence( sNewValue );
                         uno::Sequence< double > seqDoub( seqStrDoub.size() );
                         for( size_t i = 0; i < seqStrDoub.size(); ++i )
                         {
@@ -726,8 +722,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
                     }
                     else if( sPropertyType == "[]float" )
                     {
-                        std::vector< OUString > seqStrFloat;
-                        seqStrFloat = commaStringToSequence( sNewValue );
+                        std::vector< OUString > seqStrFloat = commaStringToSequence( sNewValue );
                         uno::Sequence< sal_Int16 > seqFloat( seqStrFloat.size() );
                         for( size_t i = 0; i < seqStrFloat.size(); ++i )
                         {
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 9199ccd9a31d..d146b997d4c4 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1462,8 +1462,7 @@ IMPL_LINK(SvxLinguTabPage, ClickHdl_Impl, weld::Button&, rBtn, void)
             sal_Int32 nDics = aDics.getLength();
             if (nDicPos < nDics)
             {
-                uno::Reference< XDictionary > xDic;
-                xDic = aDics.getConstArray()[ nDicPos ];
+                uno::Reference< XDictionary > xDic = aDics.getConstArray()[ nDicPos ];
                 if (xDic.is())
                 {
                     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -1488,8 +1487,7 @@ IMPL_LINK(SvxLinguTabPage, ClickHdl_Impl, weld::Button&, rBtn, void)
             sal_Int32 nDics = aDics.getLength();
             if (nDicPos < nDics)
             {
-                uno::Reference< XDictionary > xDic;
-                xDic = aDics.getConstArray()[ nDicPos ];
+                uno::Reference< XDictionary > xDic = aDics.getConstArray()[ nDicPos ];
                 if (xDic.is())
                 {
                     if (LinguMgr::GetIgnoreAllList() == xDic)
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 9aabe400d7f8..eb86ee50a908 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -408,8 +408,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
                 for(sal_Int32 n = 0; n < aDocTypeLB->GetEntryCount(); n++)
                 {
                     sal_IntPtr nData = reinterpret_cast<sal_IntPtr>(aDocTypeLB->GetEntryData(n));
-                    OUString sCommand;
-                    sCommand = "getSortedFilterList():module=%1:iflags=" +
+                    OUString sCommand = "getSortedFilterList():module=%1:iflags=" +
                                OUString::number(static_cast<int>(SfxFilterFlags::IMPORT|SfxFilterFlags::EXPORT)) +
                                ":eflags=" +
                                OUString::number(static_cast<int>(SfxFilterFlags::NOTINFILEDLG));
commit c36e7f44c2e1b97d9073560a1734d3f6628ac85a
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Apr 11 14:22:15 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Fri Apr 12 15:26:56 2019 +0200

    lok: add missing parameter to PostExtTextInputEvent function
    
    Change-Id: I91fbfd97da0c4ad1ad90710ab781c71ca99367e5
    Reviewed-on: https://gerrit.libreoffice.org/70609
    Tested-by: Jenkins
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7de8d605745f..6830aa698e79 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2760,7 +2760,8 @@ static void doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsig
                                        OUString::fromUtf8(OString(pText, strlen(pText))));
         break;
     case LOK_EXT_TEXTINPUT_END:
-        pWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+        pWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput,
+                                       OUString::fromUtf8(OString(pText, strlen(pText))));
         break;
     default:
         assert(false && "Unhandled External Text input event!");


More information about the Libreoffice-commits mailing list