[Libreoffice-commits] core.git: svx/source

Stephan Bergmann sbergman at redhat.com
Fri Jun 29 21:17:38 UTC 2018


 svx/source/table/cell.cxx                 |    4 ++--
 svx/source/tbxctrls/extrusioncontrols.cxx |    2 +-
 svx/source/unodraw/unoshape.cxx           |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 4da29bcc4fd5fb764413055bf240963811e2d01e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jun 29 15:55:42 2018 +0200

    Improved loplugin:redundantcast (const-qualified typedefs): svx
    
    Change-Id: Id5a26a8b8c23d76f4d26480bb7f37c447902371c
    Reviewed-on: https://gerrit.libreoffice.org/56703
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 807db65c994a..ecd8666a4222 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -1409,7 +1409,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName )
                 case XATTR_FILLHATCH:
                 case XATTR_LINEDASH:
                     {
-                        const NameOrIndex* pItem = rSet.GetItem<NameOrIndex>(static_cast<sal_uInt16>(pMap->nWID));
+                        const NameOrIndex* pItem = rSet.GetItem<NameOrIndex>(pMap->nWID);
                         if( ( pItem == nullptr ) || pItem->GetName().isEmpty() )
                             eState = PropertyState_DEFAULT_VALUE;
                     }
@@ -1424,7 +1424,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName )
                 case XATTR_LINESTART:
                 case XATTR_FILLFLOATTRANSPARENCE:
                     {
-                        const NameOrIndex* pItem = rSet.GetItem<NameOrIndex>(static_cast<sal_uInt16>(pMap->nWID));
+                        const NameOrIndex* pItem = rSet.GetItem<NameOrIndex>(pMap->nWID);
                         if( pItem == nullptr )
                             eState = PropertyState_DEFAULT_VALUE;
                     }
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 93cea5a897ab..7a70ecb8ccb2 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -271,7 +271,7 @@ void ExtrusionDirectionWindow::SelectHdl(void const * pControl)
     {
         Sequence< PropertyValue > aArgs( 1 );
         aArgs[0].Name = OUString(g_sExtrusionDirection).copy(5);
-        aArgs[0].Value <<= static_cast<sal_Int32>(gSkewList[mpDirectionSet->GetSelectedItemId()-1]);
+        aArgs[0].Value <<= gSkewList[mpDirectionSet->GetSelectedItemId()-1];
 
         mrController.dispatchCommand( g_sExtrusionDirection, aArgs );
     }
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 49d40324d252..dfffb6c9babe 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2054,7 +2054,7 @@ beans::PropertyState SvxShape::_getPropertyState( const OUString& PropertyName )
             case XATTR_FILLHATCH:
             case XATTR_LINEDASH:
                 {
-                    const NameOrIndex* pItem = rSet.GetItem<NameOrIndex>(static_cast<sal_uInt16>(pMap->nWID));
+                    const NameOrIndex* pItem = rSet.GetItem<NameOrIndex>(pMap->nWID);
                     if( ( pItem == nullptr ) || pItem->GetName().isEmpty() )
                         eState = beans::PropertyState_DEFAULT_VALUE;
                 }
@@ -2069,7 +2069,7 @@ beans::PropertyState SvxShape::_getPropertyState( const OUString& PropertyName )
             case XATTR_LINESTART:
             case XATTR_FILLFLOATTRANSPARENCE:
                 {
-                    const NameOrIndex* pItem = rSet.GetItem<NameOrIndex>(static_cast<sal_uInt16>(pMap->nWID));
+                    const NameOrIndex* pItem = rSet.GetItem<NameOrIndex>(pMap->nWID);
                     if ( pItem == nullptr )
                         eState = beans::PropertyState_DEFAULT_VALUE;
                 }


More information about the Libreoffice-commits mailing list