[Libreoffice-commits] core.git: 2 commits - canvas/source cui/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 21 18:12:52 UTC 2018


 canvas/source/directx/dx_canvashelper.cxx |   10 +++++-----
 cui/source/dialogs/iconcdlg.cxx           |   22 +++-------------------
 2 files changed, 8 insertions(+), 24 deletions(-)

New commits:
commit c4f96bdb57d7d6a1e51bebcf6c1d23e8deed5379
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 20 19:52:10 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 21 20:12:45 2018 +0200

    aUS is always empty
    
    Change-Id: I77ae732ea4bcaf0e76acb71fd8886af6b36d8284
    Reviewed-on: https://gerrit.libreoffice.org/62101
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 9147492639e6..a652ca151881 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -455,7 +455,7 @@ void IconChoiceDialog::ResetPageImpl ()
 |
 \**********************************************************************/
 
-const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool )
+const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& )
 {
     if ( pSet )
     {
@@ -465,25 +465,9 @@ const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool )
 
     if ( pRanges )
         return pRanges.get();
-    std::vector<sal_uInt16> aUS;
 
-    size_t nCount = maPageList.size();
-
-    // remove double Id's
-    {
-        nCount = aUS.size();
-        for ( size_t i = 0; i < nCount; ++i )
-            aUS[i] = rPool.GetWhich( aUS[i] );
-    }
-
-    if ( aUS.size() > 1 )
-    {
-        std::sort( aUS.begin(), aUS.end() );
-    }
-
-    pRanges.reset(new sal_uInt16[aUS.size() + 1]);
-    std::copy( aUS.begin(), aUS.end(), pRanges.get() );
-    pRanges[aUS.size()] = 0;
+    pRanges.reset(new sal_uInt16[1]);
+    pRanges[0] = 0;
 
     return pRanges.get();
 }
commit 574c437319e9f6b19b7cd83d397c6d0f06064c21
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 20 19:00:46 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 21 20:12:30 2018 +0200

    pvs-studio: reference becomes invalid when temporary object destroyed
    
    Change-Id: Ibe39738e1a607e3bca273fc03f0f3232024254bc
    Reviewed-on: https://gerrit.libreoffice.org/62093
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx
index 1a252382a773..ecba3af57952 100644
--- a/canvas/source/directx/dx_canvashelper.cxx
+++ b/canvas/source/directx/dx_canvashelper.cxx
@@ -624,15 +624,15 @@ namespace dxcanvas
 
             // Setup an ImageAttributes with an alpha-modulating
             // color matrix.
-            const rendering::ARGBColor& rARGBColor(
+            rendering::ARGBColor aARGBColor(
                 mpDevice->getDeviceColorSpace()->convertToARGB(renderState.DeviceColor)[0]);
 
             Gdiplus::ImageAttributes aImgAttr;
             tools::setModulateImageAttributes( aImgAttr,
-                                               rARGBColor.Red,
-                                               rARGBColor.Green,
-                                               rARGBColor.Blue,
-                                               rARGBColor.Alpha );
+                                               aARGBColor.Red,
+                                               aARGBColor.Green,
+                                               aARGBColor.Blue,
+                                               aARGBColor.Alpha );
 
             ENSURE_OR_THROW(
                 Gdiplus::Ok == pGraphics->DrawImage( pBitmap.get(),


More information about the Libreoffice-commits mailing list