diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-06-13 22:07:41 +0200 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-06-18 08:11:58 +0000 |
commit | 8956854d8e7294b41e65d5aacbc43e11d1795711 (patch) | |
tree | d9d87ffd48d048ddc46fbb34181c3c2c50243981 /svx | |
parent | 66a0713dc9c676182fcd7aa1e21f8dc25c05be5e (diff) |
String to OUString (SfxStringItem and related)
Change-Id: I390413e9ff3efee720a6423fb8695b4c655d7efa
Reviewed-on: https://gerrit.libreoffice.org/4280
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/rulritem.cxx | 22 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 9 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 2 | ||||
-rw-r--r-- | svx/source/items/algitem.cxx | 2 | ||||
-rw-r--r-- | svx/source/items/chrtitem.cxx | 5 | ||||
-rw-r--r-- | svx/source/items/postattr.cxx | 6 | ||||
-rw-r--r-- | svx/source/items/rotmodit.cxx | 6 | ||||
-rw-r--r-- | svx/source/tbxctrls/lboxctrl.cxx | 4 |
8 files changed, 24 insertions, 32 deletions
diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index ff1bf2a74e50..0f01432d9e6e 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <tools/string.hxx> - #include <svx/dialogs.hrc> #include "svx/rulritem.hxx" #include <com/sun/star/awt/Rectangle.hpp> @@ -45,9 +43,9 @@ int SvxLongLRSpaceItem::operator==( const SfxPoolItem& rCmp) const //------------------------------------------------------------------------ -String SvxLongLRSpaceItem::GetValueText() const +OUString SvxLongLRSpaceItem::GetValueText() const { - return String(); + return OUString(); } #define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) @@ -174,9 +172,9 @@ int SvxLongULSpaceItem::operator==( const SfxPoolItem& rCmp) const //------------------------------------------------------------------------ -String SvxLongULSpaceItem::GetValueText() const +OUString SvxLongULSpaceItem::GetValueText() const { - return String(); + return OUString(); } bool SvxLongULSpaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const @@ -366,9 +364,9 @@ bool SvxPagePosSizeItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_u //------------------------------------------------------------------------ -String SvxPagePosSizeItem::GetValueText() const +OUString SvxPagePosSizeItem::GetValueText() const { - return String(); + return OUString(); } //------------------------------------------------------------------------ @@ -440,9 +438,9 @@ int SvxColumnItem::operator==(const SfxPoolItem& rCmp) const //------------------------------------------------------------------------ -String SvxColumnItem::GetValueText() const +OUString SvxColumnItem::GetValueText() const { - return String(); + return OUString(); } //------------------------------------------------------------------------ @@ -595,9 +593,9 @@ int SvxObjectItem::operator==( const SfxPoolItem& rCmp ) const //------------------------------------------------------------------------ -String SvxObjectItem::GetValueText() const +OUString SvxObjectItem::GetValueText() const { - return String(); + return OUString(); } //------------------------------------------------------------------------ diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 157af301ffcd..7b371363fc25 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -137,7 +137,7 @@ void ListToStrArr_Impl( sal_uInt16 nId, std::vector<OUString>& rStrLst, ComboBox if (pSrchItem) { - std::vector<String> aLst = pSrchItem->GetList(); + std::vector<OUString> aLst = pSrchItem->GetList(); for ( sal_uInt16 i = 0; i < aLst.size(); ++i ) { @@ -150,12 +150,7 @@ void ListToStrArr_Impl( sal_uInt16 nId, std::vector<OUString>& rStrLst, ComboBox void StrArrToList_Impl( sal_uInt16 nId, const std::vector<OUString>& rStrLst ) { DBG_ASSERT( !rStrLst.empty(), "check in advance"); - std::vector<String> aLst; - - for (std::vector<OUString>::const_iterator i = rStrLst.begin(); i != rStrLst.end(); ++i) - aLst.push_back(String(*i)); - - SFX_APP()->PutItem( SfxStringListItem( nId, &aLst ) ); + SFX_APP()->PutItem( SfxStringListItem( nId, &rStrLst ) ); } // class SearchAttrItemList ---------------------------------------------- diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index baba4094bc11..7ca1a7498120 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -96,7 +96,7 @@ void GalleryBackgroundPopup::StateChanged( sal_uInt16 nSID, SfxItemState eState, if ( ( pStrLstItem = PTR_CAST( SfxStringListItem, pItem ) ) != NULL ) { - const std::vector<String> &aList = pStrLstItem->GetList(); + const std::vector<OUString> &aList = pStrLstItem->GetList(); for ( sal_uIntPtr i = 0, nCount = aList.size(); i < nCount; i++ ) InsertItem( (sal_uInt16) i + 1, aList[i]); diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx index e0b0aa038d9a..e5f9a9852eb2 100644 --- a/svx/source/items/algitem.cxx +++ b/svx/source/items/algitem.cxx @@ -130,7 +130,7 @@ bool SvxOrientationItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ //------------------------------------------------------------------------ -XubString SvxOrientationItem::GetValueText( sal_uInt16 nVal ) const +OUString SvxOrientationItem::GetValueText( sal_uInt16 nVal ) const { DBG_ASSERT( nVal <= SVX_ORIENTATION_STACKED, "enum overflow!" ); return SVX_RESSTR(RID_SVXITEMS_ORI_STANDARD + nVal); diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx index 33fff149cf80..2242b506396e 100644 --- a/svx/source/items/chrtitem.cxx +++ b/svx/source/items/chrtitem.cxx @@ -242,10 +242,9 @@ SvxDoubleItem::SvxDoubleItem(const SvxDoubleItem& rItem) : // ----------------------------------------------------------------------- -XubString SvxDoubleItem::GetValueText() const +OUString SvxDoubleItem::GetValueText() const { - OString aOStr( rtl::math::doubleToString( fVal, rtl_math_StringFormat_E, 4, '.', false ) ); - return String( aOStr.getStr(), (sal_uInt16)aOStr.getLength() ); + return rtl::math::doubleToUString( fVal, rtl_math_StringFormat_E, 4, '.', false ); } // ----------------------------------------------------------------------- diff --git a/svx/source/items/postattr.cxx b/svx/source/items/postattr.cxx index 21fcfeeface5..794a55ca0e40 100644 --- a/svx/source/items/postattr.cxx +++ b/svx/source/items/postattr.cxx @@ -37,7 +37,7 @@ SvxPostItAuthorItem::SvxPostItAuthorItem( sal_uInt16 _nWhich ) // ----------------------------------------------------------------------- -SvxPostItAuthorItem::SvxPostItAuthorItem( const XubString& rAuthor, +SvxPostItAuthorItem::SvxPostItAuthorItem( const OUString& rAuthor, sal_uInt16 _nWhich ) : SfxStringItem( _nWhich, rAuthor ) { @@ -85,7 +85,7 @@ SvxPostItDateItem::SvxPostItDateItem( sal_uInt16 _nWhich ) // ----------------------------------------------------------------------- -SvxPostItDateItem::SvxPostItDateItem( const XubString& rDate, sal_uInt16 _nWhich ) : +SvxPostItDateItem::SvxPostItDateItem( const OUString& rDate, sal_uInt16 _nWhich ) : SfxStringItem( _nWhich, rDate ) { @@ -133,7 +133,7 @@ SvxPostItTextItem::SvxPostItTextItem( sal_uInt16 _nWhich ) // ----------------------------------------------------------------------- -SvxPostItTextItem::SvxPostItTextItem( const XubString& rText, sal_uInt16 _nWhich ) : +SvxPostItTextItem::SvxPostItTextItem( const OUString& rText, sal_uInt16 _nWhich ) : SfxStringItem( _nWhich, rText ) { diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx index dcf0a2d03862..f02739a951c6 100644 --- a/svx/source/items/rotmodit.cxx +++ b/svx/source/items/rotmodit.cxx @@ -88,9 +88,9 @@ SfxItemPresentation SvxRotateModeItem::GetPresentation( return ePres; } -String SvxRotateModeItem::GetValueText( sal_uInt16 nVal ) const +OUString SvxRotateModeItem::GetValueText( sal_uInt16 nVal ) const { - String aText; + OUString aText; switch ( nVal ) { @@ -98,7 +98,7 @@ String SvxRotateModeItem::GetValueText( sal_uInt16 nVal ) const case SVX_ROTATE_MODE_TOP: case SVX_ROTATE_MODE_CENTER: case SVX_ROTATE_MODE_BOTTOM: - aText.AppendAscii("..."); + aText = OUString("..."); break; default: OSL_FAIL("SvxRotateModeItem: falscher enum"); diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index ab150fa45deb..758c9bb684eb 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -282,9 +282,9 @@ void SvxUndoRedoControl::StateChanged( { SfxStringListItem &rItem = *(SfxStringListItem *)pState; - const std::vector<String> &aLst = rItem.GetList(); + const std::vector<OUString> &aLst = rItem.GetList(); for( long nI = 0, nEnd = aLst.size(); nI < nEnd; ++nI ) - aUndoRedoList.push_back( OUString( aLst[nI] )); + aUndoRedoList.push_back( aLst[nI] ); } } } |