diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-01 22:45:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-02 14:53:49 +0100 |
commit | 39ff18d07bea2363cd6cbf1c960be103ec1376c1 (patch) | |
tree | dfb0e539cafdda3ac43c2307ec1f42292613a867 /svx | |
parent | b6ceb0a8ee690d95ca54490b98fdd3f30eba1309 (diff) |
UniString->rtl::OUString and drop globals
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/clipfmtitem.hxx | 9 | ||||
-rw-r--r-- | svx/source/items/clipfmtitem.cxx | 15 |
2 files changed, 9 insertions, 15 deletions
diff --git a/svx/inc/svx/clipfmtitem.hxx b/svx/inc/svx/clipfmtitem.hxx index acff3d8807c2..41cbc99e7d70 100644 --- a/svx/inc/svx/clipfmtitem.hxx +++ b/svx/inc/svx/clipfmtitem.hxx @@ -28,13 +28,10 @@ #ifndef _SVX_CLIPFMTITEM_HXX #define _SVX_CLIPFMTITEM_HXX -// include --------------------------------------------------------------- - -#include <tools/gen.hxx> +#include <rtl/ustring.hxx> #include <svl/poolitem.hxx> #include "svx/svxdllapi.h" -// class SvxClipboardFmtItem ---------------------------------------------- struct SvxClipboardFmtItem_Impl; class SVX_DLLPUBLIC SvxClipboardFmtItem : public SfxPoolItem @@ -55,12 +52,12 @@ public: virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ); void AddClipbrdFormat( sal_uIntPtr nId, sal_uInt16 nPos = USHRT_MAX ); - void AddClipbrdFormat( sal_uIntPtr nId, const String& rName, + void AddClipbrdFormat( sal_uIntPtr nId, const rtl::OUString& rName, sal_uInt16 nPos = USHRT_MAX ); sal_uInt16 Count() const; sal_uIntPtr GetClipbrdFormatId( sal_uInt16 nPos ) const; - const String& GetClipbrdFormatName( sal_uInt16 nPos ) const; + const rtl::OUString GetClipbrdFormatName( sal_uInt16 nPos ) const; }; diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index 77273b367dd1..bb9e858c946d 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -34,16 +34,13 @@ struct SvxClipboardFmtItem_Impl { - boost::ptr_vector< boost::nullable<String> > aFmtNms; + boost::ptr_vector< boost::nullable<rtl::OUString> > aFmtNms; std::vector<sal_uIntPtr> aFmtIds; - static String sEmptyStr; SvxClipboardFmtItem_Impl() {} SvxClipboardFmtItem_Impl( const SvxClipboardFmtItem_Impl& ); }; -String SvxClipboardFmtItem_Impl::sEmptyStr; - TYPEINIT1_FACTORY( SvxClipboardFmtItem, SfxPoolItem , new SvxClipboardFmtItem(0)); SvxClipboardFmtItem_Impl::SvxClipboardFmtItem_Impl( @@ -96,7 +93,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++ ) + for ( sal_uInt16 n=0; n < nCount; ++n ) AddClipbrdFormat( sal_uIntPtr( aClipFormats.Identifiers[n] ), aClipFormats.Names[n], n ); return true; @@ -140,13 +137,13 @@ void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, sal_uInt16 nPos ) pImpl->aFmtIds.insert( pImpl->aFmtIds.begin()+nPos, nId ); } -void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, const String& rName, +void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, const rtl::OUString& rName, sal_uInt16 nPos ) { if( nPos > pImpl->aFmtNms.size() ) nPos = pImpl->aFmtNms.size(); - pImpl->aFmtNms.insert(pImpl->aFmtNms.begin() + nPos, new String(rName)); + pImpl->aFmtNms.insert(pImpl->aFmtNms.begin() + nPos, new rtl::OUString(rName)); pImpl->aFmtIds.insert( pImpl->aFmtIds.begin()+nPos, nId ); } @@ -160,9 +157,9 @@ sal_uIntPtr SvxClipboardFmtItem::GetClipbrdFormatId( sal_uInt16 nPos ) const return pImpl->aFmtIds[ nPos ]; } -const String& SvxClipboardFmtItem::GetClipbrdFormatName( sal_uInt16 nPos ) const +const rtl::OUString SvxClipboardFmtItem::GetClipbrdFormatName( sal_uInt16 nPos ) const { - return pImpl->aFmtNms.is_null(nPos) ? SvxClipboardFmtItem_Impl::sEmptyStr : pImpl->aFmtNms[nPos]; + return pImpl->aFmtNms.is_null(nPos) ? rtl::OUString() : pImpl->aFmtNms[nPos]; } |