diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-19 15:05:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-20 07:09:50 +0100 |
commit | 495bb32c23be5acec3783240eb03ccfc5aca44cd (patch) | |
tree | 30306f2966c2c433c09d7a98702abd8607648b94 /svx | |
parent | 16a3594e6a3bcb5a247a526d199db899a438ad50 (diff) |
long->sal_uInt16 in SvxShape
Change-Id: I28a54497b1a4c236d9d3bdb0f44d3e46f3e55de7
Reviewed-on: https://gerrit.libreoffice.org/46810
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/DescriptionGenerator.cxx | 11 | ||||
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 16 |
3 files changed, 16 insertions, 17 deletions
diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index 460ac069be5c..72f95751b478 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -126,7 +126,7 @@ void DescriptionGenerator::AddProperty ( const OUString& sPropertyName, PropertyType aType, const char* pLocalizedNameId, - long nWhichId) + sal_uInt16 nWhichId) { OUString sLocalizedName; { @@ -138,7 +138,7 @@ void DescriptionGenerator::AddProperty ( void DescriptionGenerator::AddProperty (const OUString& sPropertyName, - PropertyType aType, const OUString& sLocalizedName, long nWhichId) + PropertyType aType, const OUString& sLocalizedName, sal_uInt16 nWhichId) { uno::Reference<beans::XPropertyState> xState (mxShape, uno::UNO_QUERY); if (xState.is() @@ -270,7 +270,7 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName, void DescriptionGenerator::AddString (const OUString& sPropertyName, - const OUString& sLocalizedName, long nWhichId) + const OUString& sLocalizedName, sal_uInt16 nWhichId) { msDescription.append(sLocalizedName); msDescription.append('='); @@ -283,12 +283,11 @@ void DescriptionGenerator::AddString (const OUString& sPropertyName, OUString sValue; aValue >>= sValue; - if (nWhichId >= 0) + if (nWhichId != 0xffff) { SolarMutexGuard aGuard; OUString sLocalizedValue = - SvxUnogetInternalNameForItem(sal::static_int_cast<sal_Int16>(nWhichId), - sValue); + SvxUnogetInternalNameForItem(nWhichId, sValue); msDescription.append (sLocalizedValue); } else diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 06464d132a88..800281121d33 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -1498,7 +1498,7 @@ static const char* RID_SVXSTR_TRASNGR[] = RID_SVXSTR_TRASNGR0 }; -bool SvxUnoGetResourceRanges( const short nWhich, const char**& pApiResIds, const char**& pIntResIds, int& nCount ) throw() +bool SvxUnoGetResourceRanges( const sal_uInt16 nWhich, const char**& pApiResIds, const char**& pIntResIds, int& nCount ) throw() { switch( nWhich ) { @@ -1785,7 +1785,7 @@ bool SvxUnoConvertResourceStringBuiltIn(const char** pSourceResIds, const char** /** if the given name is a predefined name for the current language it is replaced by the corresponding api name. */ -OUString SvxUnogetApiNameForItem(const sal_Int16 nWhich, const OUString& rInternalName) +OUString SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInternalName) { OUString aNew = rInternalName; @@ -1818,7 +1818,7 @@ OUString SvxUnogetApiNameForItem(const sal_Int16 nWhich, const OUString& rIntern /** if the given name is a predefined api name it is replaced by the predefined name for the current language. */ -OUString SvxUnogetInternalNameForItem(const sal_Int16 nWhich, const OUString& rApiName) +OUString SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& rApiName) { OUString aNew = rApiName; diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index afd8949360b1..0ecda838a695 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1400,9 +1400,9 @@ void SAL_CALL SvxShape::removeVetoableChangeListener( const OUString& , const Re } -bool SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName ) +bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName ) { - SfxItemSet aSet( mpModel->GetItemPool(), {{(sal_uInt16)nWID, (sal_uInt16)nWID}} ); + SfxItemSet aSet( mpModel->GetItemPool(), {{nWID, nWID}} ); if( SetFillAttribute( nWID, rName, aSet, mpModel ) ) { @@ -1418,7 +1418,7 @@ bool SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName ) } -bool SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemSet& rSet, SdrModel const * pModel ) +bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItemSet& rSet, SdrModel const * pModel ) { // check if an item with the given name and which id is inside the models // pool or the stylesheet pool, if found it's put in the itemset @@ -1427,7 +1427,7 @@ bool SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemS // we did not find such item in one of the pools, so we check // the property lists that are loaded for the model for items // that support such. - OUString aStrName = SvxUnogetInternalNameForItem((sal_Int16)nWID, rName); + OUString aStrName = SvxUnogetInternalNameForItem(nWID, rName); switch( nWID ) { @@ -1530,9 +1530,9 @@ bool SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemS } -bool SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemSet& rSet ) +bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItemSet& rSet ) { - OUString aName = SvxUnogetInternalNameForItem((sal_Int16)nWID, rName); + OUString aName = SvxUnogetInternalNameForItem(nWID, rName); if (aName.isEmpty()) { @@ -1563,11 +1563,11 @@ bool SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemS const SfxItemPool* pPool = rSet.GetPool(); - const sal_uInt32 nCount = pPool->GetItemCount2((sal_uInt16)nWID); + const sal_uInt32 nCount = pPool->GetItemCount2(nWID); for( sal_uInt32 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ ) { - const NameOrIndex* pItem = static_cast<const NameOrIndex*>(pPool->GetItem2((sal_uInt16)nWID, nSurrogate)); + const NameOrIndex* pItem = static_cast<const NameOrIndex*>(pPool->GetItem2(nWID, nSurrogate)); if( pItem && ( pItem->GetName() == aName ) ) { rSet.Put( *pItem ); |