diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-12 14:53:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-18 14:23:50 +0200 |
commit | fb14be5f8f74f83ba89e15f891ddf1f753dcc62f (patch) | |
tree | beaa4af08b0c3d75bf6e40b21b96c55e0ac1c60a /svx/source/items | |
parent | b8ce52aab9459773544f1696cfe6b7b6f171a389 (diff) |
create new 'enum class' SotClipboardFormatId to unify types
of which there are several.
There are some issues here I am unsure of
- the SW and SC and CHART2 modules essentially ignore the enum values and assign their own ids
Perhaps I should change them to use the common values and create new enum values where necessary?
- the sc/qa/ and sq/qa/ and starmath/qa/ code was doing some dodgy stuff. I translated the code to pass down the stuff
numeric values to the underlying code, but perhaps further fixing is necessary?
Change-Id: Ic06d723e404481e3f1bca67c43b70321b764d923
Diffstat (limited to 'svx/source/items')
-rw-r--r-- | svx/source/items/clipfmtitem.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index f7ae1207de0c..bc9362fb6543 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -25,7 +25,7 @@ struct SvxClipboardFmtItem_Impl { boost::ptr_vector< boost::nullable<OUString> > aFmtNms; - std::vector<sal_uIntPtr> aFmtIds; + std::vector<SotClipboardFormatId> aFmtIds; SvxClipboardFmtItem_Impl() {} SvxClipboardFmtItem_Impl( const SvxClipboardFmtItem_Impl& ); @@ -84,7 +84,7 @@ bool SvxClipboardFmtItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_ pImpl->aFmtIds.clear(); pImpl->aFmtNms.clear(); for ( sal_uInt16 n=0; n < nCount; ++n ) - AddClipbrdFormat( sal_uIntPtr( aClipFormats.Identifiers[n] ), aClipFormats.Names[n], n ); + AddClipbrdFormat( static_cast<SotClipboardFormatId>(aClipFormats.Identifiers[n]), aClipFormats.Names[n], n ); return true; } @@ -118,7 +118,7 @@ SfxPoolItem* SvxClipboardFmtItem::Clone( SfxItemPool * /*pPool*/ ) const return new SvxClipboardFmtItem( *this ); } -void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, sal_uInt16 nPos ) +void SvxClipboardFmtItem::AddClipbrdFormat( SotClipboardFormatId nId, sal_uInt16 nPos ) { if( nPos > pImpl->aFmtNms.size() ) nPos = pImpl->aFmtNms.size(); @@ -127,7 +127,7 @@ void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, sal_uInt16 nPos ) pImpl->aFmtIds.insert( pImpl->aFmtIds.begin()+nPos, nId ); } -void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, const OUString& rName, +void SvxClipboardFmtItem::AddClipbrdFormat( SotClipboardFormatId nId, const OUString& rName, sal_uInt16 nPos ) { if( nPos > pImpl->aFmtNms.size() ) @@ -142,7 +142,7 @@ sal_uInt16 SvxClipboardFmtItem::Count() const return pImpl->aFmtIds.size(); } -sal_uIntPtr SvxClipboardFmtItem::GetClipbrdFormatId( sal_uInt16 nPos ) const +SotClipboardFormatId SvxClipboardFmtItem::GetClipbrdFormatId( sal_uInt16 nPos ) const { return pImpl->aFmtIds[ nPos ]; } |