summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-06-13 22:07:41 +0200
committerNoel Power <noel.power@suse.com>2013-06-18 08:11:58 +0000
commit8956854d8e7294b41e65d5aacbc43e11d1795711 (patch)
treed9d87ffd48d048ddc46fbb34181c3c2c50243981
parent66a0713dc9c676182fcd7aa1e21f8dc25c05be5e (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>
-rw-r--r--cui/source/inc/page.hxx4
-rw-r--r--cui/source/tabpages/numpages.cxx2
-rw-r--r--cui/source/tabpages/page.cxx2
-rw-r--r--editeng/source/items/justifyitem.cxx6
-rw-r--r--editeng/source/items/paraitem.cxx34
-rw-r--r--include/editeng/brushitem.hxx1
-rw-r--r--include/editeng/justifyitem.hxx6
-rw-r--r--include/editeng/tstpitem.hxx2
-rw-r--r--include/sfx2/frame.hxx2
-rw-r--r--include/sfx2/itemwrapper.hxx2
-rw-r--r--include/sfx2/objsh.hxx2
-rw-r--r--include/sfx2/viewfrm.hxx2
-rw-r--r--include/svl/poolitem.hxx5
-rw-r--r--include/svl/slstitm.hxx10
-rw-r--r--include/svx/algitem.hxx2
-rw-r--r--include/svx/chrtitem.hxx2
-rw-r--r--include/svx/postattr.hxx6
-rw-r--r--include/svx/rotmodit.hxx2
-rw-r--r--include/svx/rulritem.hxx10
-rw-r--r--sc/inc/attrib.hxx10
-rw-r--r--sc/inc/defaultsoptions.hxx2
-rw-r--r--sc/inc/docoptio.hxx2
-rw-r--r--sc/inc/formulaopt.hxx2
-rw-r--r--sc/inc/printopt.hxx2
-rw-r--r--sc/inc/viewopti.hxx2
-rw-r--r--sc/source/core/data/attrib.cxx73
-rw-r--r--sc/source/core/tool/defaultsoptions.cxx2
-rw-r--r--sc/source/core/tool/docoptio.cxx2
-rw-r--r--sc/source/core/tool/formulaopt.cxx2
-rw-r--r--sc/source/core/tool/printopt.cxx2
-rw-r--r--sc/source/core/tool/viewopti.cxx2
-rw-r--r--sc/source/ui/app/uiitems.cxx20
-rw-r--r--sc/source/ui/inc/navipi.hxx2
-rw-r--r--sc/source/ui/inc/uiitems.hxx24
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx6
-rw-r--r--sc/source/ui/view/cellsh.cxx6
-rw-r--r--sc/source/ui/view/tabvwshb.cxx6
-rw-r--r--sd/inc/sdattr.hxx8
-rw-r--r--sd/source/ui/view/viewshel.cxx8
-rw-r--r--sfx2/inc/sorgitm.hxx4
-rw-r--r--sfx2/source/appl/appcfg.cxx13
-rw-r--r--sfx2/source/control/sorgitm.cxx4
-rw-r--r--sfx2/source/doc/objitem.cxx4
-rw-r--r--sfx2/source/view/frame.cxx4
-rw-r--r--sfx2/source/view/viewfrm.cxx4
-rw-r--r--starmath/source/document.cxx5
-rw-r--r--svl/source/items/imageitm.cxx2
-rw-r--r--svl/source/items/slstitm.cxx68
-rw-r--r--svx/source/dialog/rulritem.cxx22
-rw-r--r--svx/source/dialog/srchdlg.cxx9
-rw-r--r--svx/source/gallery2/galbrws2.cxx2
-rw-r--r--svx/source/items/algitem.cxx2
-rw-r--r--svx/source/items/chrtitem.cxx5
-rw-r--r--svx/source/items/postattr.cxx6
-rw-r--r--svx/source/items/rotmodit.cxx6
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx4
-rw-r--r--sw/inc/txtftn.hxx1
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx2
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx4
-rw-r--r--sw/source/ui/misc/num.cxx4
-rw-r--r--sw/source/ui/shells/annotsh.cxx5
-rw-r--r--sw/source/ui/shells/basesh.cxx2
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx5
63 files changed, 223 insertions, 249 deletions
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index b61c47ae5311..d07a6b9de974 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -118,7 +118,7 @@ class SvxPageDescPage : public SfxTabPage
FixedText* m_pRegisterFT;
ListBox* m_pRegisterLB;
- String sStandardRegister;
+ OUString sStandardRegister;
FixedText* m_pInsideLbl;
FixedText* m_pOutsideLbl;
@@ -193,7 +193,7 @@ public:
void SetPaperFormatRanges( Paper eStart, Paper eEnd )
{ ePaperStart = eStart, ePaperEnd = eEnd; }
- void SetCollectionList(const std::vector<String> &aList);
+ void SetCollectionList(const std::vector<OUString> &aList);
virtual void PageCreated (SfxAllItemSet aSet);
};
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index bf3ba14c258d..d0b3ffe22079 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -3524,7 +3524,7 @@ void SvxNumOptionsTabPage::PageCreated(SfxAllItemSet aSet)
if (pListItem)
{
ListBox& myCharFmtLB = GetCharFmtListBox();
- const std::vector<String> &aList = (pListItem)->GetList();
+ const std::vector<OUString> &aList = pListItem->GetList();
sal_uInt32 nCount = aList.size();;
for(sal_uInt32 i = 0; i < nCount; i++)
myCharFmtLB.InsertEntry(aList[i]);
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index da2ac1c37dbe..2ca7a95ea493 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1562,7 +1562,7 @@ IMPL_LINK_NOARG_INLINE_END(SvxPageDescPage, CenterHdl_Impl)
// -----------------------------------------------------------------------
-void SvxPageDescPage::SetCollectionList(const std::vector<String> &aList)
+void SvxPageDescPage::SetCollectionList(const std::vector<OUString> &aList)
{
OSL_ENSURE(!aList.empty(), "Empty string list");
diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx
index e938426dbcde..038beffea56a 100644
--- a/editeng/source/items/justifyitem.cxx
+++ b/editeng/source/items/justifyitem.cxx
@@ -168,7 +168,7 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
}
-XubString SvxHorJustifyItem::GetValueText( sal_uInt16 nVal ) const
+OUString SvxHorJustifyItem::GetValueText( sal_uInt16 nVal ) const
{
DBG_ASSERT( nVal <= SVX_HOR_JUSTIFY_REPEAT, "enum overflow!" );
return EE_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal);
@@ -314,7 +314,7 @@ bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
}
-XubString SvxVerJustifyItem::GetValueText( sal_uInt16 nVal ) const
+OUString SvxVerJustifyItem::GetValueText( sal_uInt16 nVal ) const
{
DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
return EE_RESSTR(RID_SVXITEMS_VERJUST_STANDARD + nVal);
@@ -406,7 +406,7 @@ bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId
}
-XubString SvxJustifyMethodItem::GetValueText( sal_uInt16 nVal ) const
+OUString SvxJustifyMethodItem::GetValueText( sal_uInt16 nVal ) const
{
DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
return EE_RESSTR(RID_SVXITEMS_JUSTMETHOD_AUTO + nVal);
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 8210fbbe72b5..a78912b579c4 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -859,27 +859,19 @@ void SvxTabStop::fillDecimal() const
}
// -----------------------------------------------------------------------
-XubString SvxTabStop::GetValueString() const
-{
- XubString aStr;
-
- aStr += sal_Unicode( '(' );
- aStr += OUString::number(nTabPos);
- aStr += cpDelim;
- aStr += EE_RESSTR(RID_SVXITEMS_TAB_ADJUST_BEGIN + (sal_uInt16)eAdjustment);
-
- aStr += cpDelim;
- aStr += sal_Unicode('[');
- aStr += EE_RESSTR(RID_SVXITEMS_TAB_DECIMAL_CHAR);
- aStr += GetDecimal();
- aStr += sal_Unicode(']');
- aStr += cpDelim;
- aStr += cpDelim;
- aStr += sal_Unicode('[');
- aStr += EE_RESSTR(RID_SVXITEMS_TAB_FILL_CHAR);
- aStr += cFill;
- aStr += sal_Unicode(']');
- aStr += sal_Unicode(')');
+OUString SvxTabStop::GetValueString() const
+{
+ OUString aStr = "("
+ + OUString::number(nTabPos)
+ + ", "
+ + EE_RESSTR(RID_SVXITEMS_TAB_ADJUST_BEGIN + (sal_uInt16)eAdjustment)
+ + ", ["
+ + EE_RESSTR(RID_SVXITEMS_TAB_DECIMAL_CHAR)
+ + OUString(GetDecimal())
+ + "], , ["
+ + EE_RESSTR(RID_SVXITEMS_TAB_FILL_CHAR)
+ + OUString(cFill)
+ + "])";
return aStr;
}
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index 069a3b7f636a..c7130bd2ffa6 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -29,6 +29,7 @@
class Graphic;
class GraphicObject;
class CntWallpaperItem;
+class String;
#define BRUSH_GRAPHIC_VERSION ((sal_uInt16)0x0001)
diff --git a/include/editeng/justifyitem.hxx b/include/editeng/justifyitem.hxx
index cfbdcff00a65..6784a86422a2 100644
--- a/include/editeng/justifyitem.hxx
+++ b/include/editeng/justifyitem.hxx
@@ -45,7 +45,7 @@ public:
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual sal_uInt16 GetValueCount() const;
- virtual String GetValueText( sal_uInt16 nVal ) const;
+ virtual OUString GetValueText( sal_uInt16 nVal ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const;
@@ -78,7 +78,7 @@ public:
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual sal_uInt16 GetValueCount() const;
- virtual String GetValueText( sal_uInt16 nVal ) const;
+ virtual OUString GetValueText( sal_uInt16 nVal ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const;
@@ -107,7 +107,7 @@ public:
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual sal_uInt16 GetValueCount() const;
- virtual String GetValueText( sal_uInt16 nVal ) const;
+ virtual OUString GetValueText( sal_uInt16 nVal ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const;
diff --git a/include/editeng/tstpitem.hxx b/include/editeng/tstpitem.hxx
index f8eca761395b..254105737573 100644
--- a/include/editeng/tstpitem.hxx
+++ b/include/editeng/tstpitem.hxx
@@ -64,7 +64,7 @@ public:
sal_Unicode& GetFill() { return cFill; }
sal_Unicode GetFill() const { return cFill; }
- String GetValueString() const;
+ OUString GetValueString() const;
// the "old" operator==()
sal_Bool IsEqual( const SvxTabStop& rTS ) const
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index 63220cae1325..5d5554e52174 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -239,7 +239,7 @@ public:
SfxFrameItem( sal_uInt16 nWhich, SfxFrame *p );
virtual int operator==( const SfxPoolItem& ) const;
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
diff --git a/include/sfx2/itemwrapper.hxx b/include/sfx2/itemwrapper.hxx
index 7143fadf092f..072da9eed4cf 100644
--- a/include/sfx2/itemwrapper.hxx
+++ b/include/sfx2/itemwrapper.hxx
@@ -154,7 +154,7 @@ typedef ValueItemWrapper< SfxInt16Item, sal_Int16 > Int16ItemWrapper;
typedef ValueItemWrapper< SfxUInt16Item, sal_uInt16 > UInt16ItemWrapper;
typedef ValueItemWrapper< SfxInt32Item, sal_Int32 > Int32ItemWrapper;
typedef ValueItemWrapper< SfxUInt32Item, sal_uInt32 > UInt32ItemWrapper;
-typedef ValueItemWrapper< SfxStringItem, const String& > StringItemWrapper;
+typedef ValueItemWrapper< SfxStringItem, const OUString& > StringItemWrapper;
// ============================================================================
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 4ace1801ddc0..d3aa202c96f1 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -813,7 +813,7 @@ public:
{}
virtual int operator==( const SfxPoolItem& ) const;
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index c31681b2fd01..a81c20c83041 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -307,7 +307,7 @@ public:
{}
virtual int operator==( const SfxPoolItem& ) const;
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
SfxViewFrame* GetFrame() const
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 5e041825186a..1a7765c9995e 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -27,7 +27,6 @@
#include <limits.h>
#include <tools/solar.h>
#include <tools/debug.hxx>
-#include <tools/string.hxx>
#include <svl/hint.hxx>
typedef long SfxArgumentError;
@@ -226,9 +225,7 @@ public:
@param rStream Some (input) stream. Its Stream/TargetCharSets must
be set to correct values!
- @param rString On success, returns the reconstructed Unicode string.
-
- @return True if the string was successfully read and reconstructed.
+ @return On success, returns the reconstructed Unicode string.
*/
static OUString readByteString(SvStream & rStream);
diff --git a/include/svl/slstitm.hxx b/include/svl/slstitm.hxx
index 90c873119b80..f42686e81f9a 100644
--- a/include/svl/slstitm.hxx
+++ b/include/svl/slstitm.hxx
@@ -37,18 +37,18 @@ public:
TYPEINFO();
SfxStringListItem();
- SfxStringListItem( sal_uInt16 nWhich, const std::vector<String> *pList=NULL );
+ SfxStringListItem( sal_uInt16 nWhich, const std::vector<OUString> *pList=NULL );
SfxStringListItem( sal_uInt16 nWhich, SvStream& rStream );
SfxStringListItem( const SfxStringListItem& rItem );
~SfxStringListItem();
- std::vector<String>& GetList();
+ std::vector<OUString>& GetList();
- const std::vector<String>& GetList() const;
+ const std::vector<OUString>& GetList() const;
// String-Separator: \n
- virtual void SetString( const XubString& );
- virtual XubString GetString();
+ virtual void SetString( const OUString& );
+ virtual OUString GetString();
void SetStringList( const com::sun::star::uno::Sequence< OUString >& rList );
void GetStringList( com::sun::star::uno::Sequence< OUString >& rList ) const;
diff --git a/include/svx/algitem.hxx b/include/svx/algitem.hxx
index 00a554d6e5f9..f936dbfc2d6e 100644
--- a/include/svx/algitem.hxx
+++ b/include/svx/algitem.hxx
@@ -51,7 +51,7 @@ public:
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual sal_uInt16 GetValueCount() const;
- virtual String GetValueText( sal_uInt16 nVal ) const;
+ virtual OUString GetValueText( sal_uInt16 nVal ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const;
diff --git a/include/svx/chrtitem.hxx b/include/svx/chrtitem.hxx
index 92045aa37c77..579e176042f9 100644
--- a/include/svx/chrtitem.hxx
+++ b/include/svx/chrtitem.hxx
@@ -309,7 +309,7 @@ public:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
diff --git a/include/svx/postattr.hxx b/include/svx/postattr.hxx
index 9bdd2698551e..de11b545d505 100644
--- a/include/svx/postattr.hxx
+++ b/include/svx/postattr.hxx
@@ -37,7 +37,7 @@ public:
SvxPostItAuthorItem( sal_uInt16 nWhich );
- SvxPostItAuthorItem( const String& rAuthor, sal_uInt16 nWhich );
+ SvxPostItAuthorItem( const OUString& rAuthor, sal_uInt16 nWhich );
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
@@ -68,7 +68,7 @@ public:
SvxPostItDateItem( sal_uInt16 nWhich );
- SvxPostItDateItem( const String& rDate, sal_uInt16 nWhich );
+ SvxPostItDateItem( const OUString& rDate, sal_uInt16 nWhich );
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
@@ -99,7 +99,7 @@ public:
SvxPostItTextItem( sal_uInt16 nWhich );
- SvxPostItTextItem( const String& rText, sal_uInt16 nWhich );
+ SvxPostItTextItem( const OUString& rText, sal_uInt16 nWhich );
// "pure virtual methods" from SfxPoolItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/include/svx/rotmodit.hxx b/include/svx/rotmodit.hxx
index f945280fc2b2..38e6e62a7a45 100644
--- a/include/svx/rotmodit.hxx
+++ b/include/svx/rotmodit.hxx
@@ -44,7 +44,7 @@ public:
~SvxRotateModeItem();
virtual sal_uInt16 GetValueCount() const;
- virtual String GetValueText( sal_uInt16 nVal ) const;
+ virtual OUString GetValueText( sal_uInt16 nVal ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
diff --git a/include/svx/rulritem.hxx b/include/svx/rulritem.hxx
index 545edb4cda85..ea901a79e57a 100644
--- a/include/svx/rulritem.hxx
+++ b/include/svx/rulritem.hxx
@@ -35,7 +35,7 @@ class SVX_DLLPUBLIC SvxLongLRSpaceItem : public SfxPoolItem
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
@@ -69,7 +69,7 @@ class SVX_DLLPUBLIC SvxLongULSpaceItem : public SfxPoolItem
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
@@ -102,7 +102,7 @@ protected:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
@@ -179,7 +179,7 @@ class SVX_DLLPUBLIC SvxColumnItem : public SfxPoolItem
protected:
virtual int operator==( const SfxPoolItem& ) const;
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
@@ -241,7 +241,7 @@ private:
protected:
virtual int operator==( const SfxPoolItem& ) const;
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 562505de141a..4a84e29321fb 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -61,7 +61,7 @@ public:
ScMergeAttr( const ScMergeAttr& );
~ScMergeAttr();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -118,7 +118,7 @@ public:
ScProtectionAttr( const ScProtectionAttr& );
~ScProtectionAttr();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxItemPresentation GetPresentation(
SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -265,7 +265,7 @@ public:
ScPageHFItem( const ScPageHFItem& rItem );
~ScPageHFItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -300,7 +300,7 @@ public:
~ScViewObjectModeItem();
virtual sal_uInt16 GetValueCount() const;
- virtual String GetValueText( sal_uInt16 nVal ) const;
+ virtual OUString GetValueText( sal_uInt16 nVal ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
@@ -322,7 +322,7 @@ public:
ScDoubleItem( const ScDoubleItem& rItem );
~ScDoubleItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx
index ff3ea448784e..4153a5ff507b 100644
--- a/sc/inc/defaultsoptions.hxx
+++ b/sc/inc/defaultsoptions.hxx
@@ -54,7 +54,7 @@ public:
ScTpDefaultsItem( const ScTpDefaultsItem& rItem );
~ScTpDefaultsItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index abfbe7e9a7a9..4c70786cdec3 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -153,7 +153,7 @@ public:
ScTpCalcItem( const ScTpCalcItem& rItem );
~ScTpCalcItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index 75841978000a..caa45ea5c5dd 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -88,7 +88,7 @@ public:
ScTpFormulaItem( const ScTpFormulaItem& rItem );
~ScTpFormulaItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx
index d84539d4649e..c7726fc477da 100644
--- a/sc/inc/printopt.hxx
+++ b/sc/inc/printopt.hxx
@@ -60,7 +60,7 @@ public:
ScTpPrintItem( const ScTpPrintItem& rItem );
~ScTpPrintItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 10af8e7d7d35..ebf47833d71f 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -120,7 +120,7 @@ public:
ScTpViewItem( const ScTpViewItem& rItem );
~ScTpViewItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index c1aec8ed40de..80bc01a66c97 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -125,15 +125,14 @@ ScMergeAttr::~ScMergeAttr()
//------------------------------------------------------------------------
-String ScMergeAttr::GetValueText() const
+OUString ScMergeAttr::GetValueText() const
{
- OUStringBuffer aString;
- aString.append('(');
- aString.append(static_cast<sal_Int32>(nColMerge));
- aString.append(',');
- aString.append(static_cast<sal_Int32>(nRowMerge));
- aString.append(')');
- return aString.makeStringAndClear();
+ OUString aRet = "("
+ + OUString::number(static_cast<sal_Int32>(nColMerge))
+ + ","
+ + OUString::number(static_cast<sal_Int32>(nRowMerge))
+ + ")";
+ return aRet;
}
//------------------------------------------------------------------------
@@ -308,19 +307,20 @@ bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
//------------------------------------------------------------------------
-String ScProtectionAttr::GetValueText() const
+OUString ScProtectionAttr::GetValueText() const
{
- String aValue;
- String aStrYes ( ScGlobal::GetRscString(STR_YES) );
- String aStrNo ( ScGlobal::GetRscString(STR_NO) );
- sal_Unicode cDelim = ',';
+ const OUString aStrYes ( ScGlobal::GetRscString(STR_YES) );
+ const OUString aStrNo ( ScGlobal::GetRscString(STR_NO) );
- aValue = '(';
- aValue += (bProtection ? aStrYes : aStrNo); aValue += cDelim;
- aValue += (bHideFormula ? aStrYes : aStrNo); aValue += cDelim;
- aValue += (bHideCell ? aStrYes : aStrNo); aValue += cDelim;
- aValue += (bHidePrint ? aStrYes : aStrNo);
- aValue += ')';
+ const OUString aValue = "("
+ + (bProtection ? aStrYes : aStrNo)
+ + ","
+ + (bHideFormula ? aStrYes : aStrNo)
+ + ","
+ + (bHideCell ? aStrYes : aStrNo)
+ + ","
+ + (bHidePrint ? aStrYes : aStrNo)
+ + ")";
return aValue;
}
@@ -336,10 +336,8 @@ SfxItemPresentation ScProtectionAttr::GetPresentation
const IntlWrapper* /* pIntl */
) const
{
- OUString aStrYes ( ScGlobal::GetRscString(STR_YES) );
- OUString aStrNo ( ScGlobal::GetRscString(STR_NO) );
- OUString aStrSep(": ");
- OUString aStrDelim( ", ");
+ const OUString aStrYes ( ScGlobal::GetRscString(STR_YES) );
+ const OUString aStrNo ( ScGlobal::GetRscString(STR_NO) );
switch ( ePres )
{
@@ -352,14 +350,21 @@ SfxItemPresentation ScProtectionAttr::GetPresentation
break;
case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = ScGlobal::GetRscString(STR_PROTECTION) + aStrSep +
- (bProtection ? aStrYes : aStrNo) + aStrDelim +
- ScGlobal::GetRscString(STR_FORMULAS) + aStrSep +
- (!bHideFormula ? aStrYes : aStrNo) + aStrDelim +
- ScGlobal::GetRscString(STR_HIDE) + aStrSep +
- (bHideCell ? aStrYes : aStrNo) + aStrDelim +
- ScGlobal::GetRscString(STR_PRINT) + aStrSep +
- (!bHidePrint ? aStrYes : aStrNo);
+ rText = ScGlobal::GetRscString(STR_PROTECTION)
+ + ": "
+ + (bProtection ? aStrYes : aStrNo)
+ + ", "
+ + ScGlobal::GetRscString(STR_FORMULAS)
+ + ": "
+ + (!bHideFormula ? aStrYes : aStrNo)
+ + ", "
+ + ScGlobal::GetRscString(STR_HIDE)
+ + ": "
+ + (bHideCell ? aStrYes : aStrNo)
+ + ", "
+ + ScGlobal::GetRscString(STR_PRINT)
+ + ": "
+ + (!bHidePrint ? aStrYes : aStrNo);
break;
default:
@@ -714,7 +719,7 @@ bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ )
//------------------------------------------------------------------------
-String ScPageHFItem::GetValueText() const
+OUString ScPageHFItem::GetValueText() const
{
return OUString("ScPageHFItem");
}
@@ -994,7 +999,7 @@ SfxItemPresentation ScViewObjectModeItem::GetPresentation
//------------------------------------------------------------------------
-String ScViewObjectModeItem::GetValueText( sal_uInt16 nVal ) const
+OUString ScViewObjectModeItem::GetValueText( sal_uInt16 nVal ) const
{
OSL_ENSURE( nVal <= VOBJ_MODE_HIDE, "enum overflow!" );
@@ -1065,7 +1070,7 @@ ScDoubleItem::ScDoubleItem( const ScDoubleItem& rItem )
//------------------------------------------------------------------------
-String ScDoubleItem::GetValueText() const
+OUString ScDoubleItem::GetValueText() const
{
return OUString("ScDoubleItem");
}
diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx
index 095e32586c1a..a10969804e53 100644
--- a/sc/source/core/tool/defaultsoptions.cxx
+++ b/sc/source/core/tool/defaultsoptions.cxx
@@ -83,7 +83,7 @@ ScTpDefaultsItem::~ScTpDefaultsItem()
{
}
-String ScTpDefaultsItem::GetValueText() const
+OUString ScTpDefaultsItem::GetValueText() const
{
return OUString("ScTpDefaultsItem");
}
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 849cf7853acb..d06225cbc4fa 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -140,7 +140,7 @@ ScTpCalcItem::~ScTpCalcItem()
//------------------------------------------------------------------------
-String ScTpCalcItem::GetValueText() const
+OUString ScTpCalcItem::GetValueText() const
{
return OUString("ScTpCalcItem");
}
diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx
index 8e5caeaea128..df9e69a44488 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -173,7 +173,7 @@ ScTpFormulaItem::~ScTpFormulaItem()
{
}
-String ScTpFormulaItem::GetValueText() const
+OUString ScTpFormulaItem::GetValueText() const
{
return OUString("ScTpFormulaItem");
}
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index 1ec3ea36d73d..e6a2c49e9f89 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -91,7 +91,7 @@ ScTpPrintItem::~ScTpPrintItem()
{
}
-String ScTpPrintItem::GetValueText() const
+OUString ScTpPrintItem::GetValueText() const
{
return OUString("ScTpPrintItem");
}
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 488b59782f58..964b623f2ff2 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -247,7 +247,7 @@ ScTpViewItem::~ScTpViewItem()
//------------------------------------------------------------------------
-String ScTpViewItem::GetValueText() const
+OUString ScTpViewItem::GetValueText() const
{
return OUString("ScTpViewItem");
}
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index 724ceec86d8a..d26337d221bb 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -49,7 +49,7 @@ ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP,
const ScAddress& rCurPos,
const ScAddress& rStartPos,
const ScAddress& rEndPos,
- const String& rString,
+ const OUString& rString,
const EditTextObject* pData )
: SfxPoolItem ( nWhichP ),
aCursorPos ( rCurPos ),
@@ -75,7 +75,7 @@ ScInputStatusItem::~ScInputStatusItem()
delete pEditData;
}
-String ScInputStatusItem::GetValueText() const
+OUString ScInputStatusItem::GetValueText() const
{
return OUString("InputStatus");
}
@@ -183,7 +183,7 @@ ScSortItem::~ScSortItem()
//------------------------------------------------------------------------
-String ScSortItem::GetValueText() const
+OUString ScSortItem::GetValueText() const
{
return OUString("SortItem");
}
@@ -290,7 +290,7 @@ bool ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const
//------------------------------------------------------------------------
-String ScQueryItem::GetValueText() const
+OUString ScQueryItem::GetValueText() const
{
return OUString("QueryItem");
}
@@ -354,7 +354,7 @@ ScSubTotalItem::~ScSubTotalItem()
//------------------------------------------------------------------------
-String ScSubTotalItem::GetValueText() const
+OUString ScSubTotalItem::GetValueText() const
{
return OUString("SubTotalItem");
}
@@ -415,7 +415,7 @@ ScUserListItem::~ScUserListItem()
//------------------------------------------------------------------------
-String ScUserListItem::GetValueText() const
+OUString ScUserListItem::GetValueText() const
{
return OUString("ScUserListItem");
}
@@ -481,7 +481,7 @@ ScConsolidateItem::~ScConsolidateItem()
//------------------------------------------------------------------------
-String ScConsolidateItem::GetValueText() const
+OUString ScConsolidateItem::GetValueText() const
{
return OUString("ScConsolidateItem");
}
@@ -542,7 +542,7 @@ ScPivotItem::~ScPivotItem()
//------------------------------------------------------------------------
-String ScPivotItem::GetValueText() const
+OUString ScPivotItem::GetValueText() const
{
return OUString("ScPivotItem");
}
@@ -595,7 +595,7 @@ ScSolveItem::~ScSolveItem()
//------------------------------------------------------------------------
-String ScSolveItem::GetValueText() const
+OUString ScSolveItem::GetValueText() const
{
return OUString("ScSolveItem");
}
@@ -645,7 +645,7 @@ ScTabOpItem::~ScTabOpItem()
//------------------------------------------------------------------------
-String ScTabOpItem::GetValueText() const
+OUString ScTabOpItem::GetValueText() const
{
return OUString("ScTabOpItem");
}
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index c62f534c62a9..8e8f8ac5912c 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -63,7 +63,7 @@ public:
explicit ScScenarioListBox( ScScenarioWindow& rParent );
virtual ~ScScenarioListBox();
- void UpdateEntries( const std::vector<String> &aNewEntryList );
+ void UpdateEntries( const std::vector<OUString> &aNewEntryList );
protected:
virtual void Select();
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index b539fd936d0a..d47528968915 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -44,7 +44,7 @@ class ScInputStatusItem : public SfxPoolItem
ScAddress aCursorPos;
ScAddress aStartPos;
ScAddress aEndPos;
- String aString;
+ OUString aString;
EditTextObject* pEditData;
public:
@@ -54,12 +54,12 @@ public:
const ScAddress& rCurPos,
const ScAddress& rStartPos,
const ScAddress& rEndPos,
- const String& rString,
+ const OUString& rString,
const EditTextObject* pData );
ScInputStatusItem( const ScInputStatusItem& rItem );
~ScInputStatusItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -75,7 +75,7 @@ public:
SCCOL GetEndCol() const { return aEndPos.Col(); }
SCROW GetEndRow() const { return aEndPos.Row(); }
- const String& GetString() const { return aString; }
+ const OUString& GetString() const { return aString; }
const EditTextObject* GetEditData() const { return pEditData; }
};
@@ -152,7 +152,7 @@ public:
ScSortItem( const ScSortItem& rItem );
~ScSortItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const;
@@ -179,7 +179,7 @@ public:
ScQueryItem( const ScQueryItem& rItem );
~ScQueryItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -210,7 +210,7 @@ public:
ScSubTotalItem( const ScSubTotalItem& rItem );
~ScSubTotalItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const;
@@ -233,7 +233,7 @@ public:
ScUserListItem( const ScUserListItem& rItem );
~ScUserListItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -255,7 +255,7 @@ public:
ScConsolidateItem( const ScConsolidateItem& rItem );
~ScConsolidateItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -276,7 +276,7 @@ public:
ScPivotItem( const ScPivotItem& rItem );
~ScPivotItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -301,7 +301,7 @@ public:
ScSolveItem( const ScSolveItem& rItem );
~ScSolveItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -322,7 +322,7 @@ public:
ScTabOpItem( const ScTabOpItem& rItem );
~ScTabOpItem();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index 4ecce70c33cd..fda1789d32d0 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -48,7 +48,7 @@ ScScenarioListBox::~ScScenarioListBox()
{
}
-void ScScenarioListBox::UpdateEntries( const std::vector<String> &aNewEntryList )
+void ScScenarioListBox::UpdateEntries( const std::vector<OUString> &aNewEntryList )
{
Clear();
maEntries.clear();
@@ -71,7 +71,7 @@ void ScScenarioListBox::UpdateEntries( const std::vector<String> &aNewEntryList
OSL_ENSURE( aNewEntryList.size() % 3 == 0, "ScScenarioListBox::UpdateEntries - wrong list size" );
SetUpdateMode( false );
- std::vector<String>::const_iterator iter;
+ std::vector<OUString>::const_iterator iter;
for (iter = aNewEntryList.begin(); iter != aNewEntryList.end(); ++iter)
{
ScenarioEntry aEntry;
@@ -85,7 +85,7 @@ void ScScenarioListBox::UpdateEntries( const std::vector<String> &aNewEntryList
// third entry of a triple is the protection ("0" = not protected, "1" = protected)
++iter;
- aEntry.mbProtected = (iter->Len() > 0) && (iter->GetChar( 0 ) != '0');
+ aEntry.mbProtected = !(*iter).isEmpty() && (*iter)[0] != '0';
maEntries.push_back( aEntry );
InsertEntry( aEntry.maName, LISTBOX_APPEND );
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 06856778bbf9..9431b90729ed 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -762,7 +762,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_SELECT_SCENARIO:
{
- std::vector<String> aList;
+ std::vector<OUString> aList;
Color aDummyCol;
if ( !pDoc->IsScenario(nTab) )
@@ -770,7 +770,6 @@ void ScCellShell::GetState(SfxItemSet &rSet)
OUString aStr;
sal_uInt16 nFlags;
SCTAB nScTab = nTab + 1;
- String aProtect;
bool bSheetProtected = pDoc->IsTabProtected(nTab);
while ( pDoc->IsScenario(nScTab) )
@@ -780,8 +779,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
pDoc->GetScenarioData( nScTab, aStr, aDummyCol, nFlags );
aList.push_back(aStr);
// Protection is sal_True if both Sheet and Scenario are protected
- aProtect = (bSheetProtected && (nFlags & SC_SCENARIO_PROTECT)) ? '1' : '0';
- aList.push_back(aProtect);
+ aList.push_back((bSheetProtected && (nFlags & SC_SCENARIO_PROTECT)) ? OUString("1") : OUString("0"));
++nScTab;
}
}
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 2b31d63f95d4..3845a73ecaa5 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -560,13 +560,13 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
SfxStringListItem aStrLst( nWhich );
if ( pUndoManager )
{
- std::vector<String> &aList = aStrLst.GetList();
+ std::vector<OUString> &aList = aStrLst.GetList();
sal_Bool bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
size_t nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
for (size_t i=0; i<nCount; ++i)
{
- aList.push_back( OUString( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
- pUndoManager->GetRedoActionComment(i) ) );
+ aList.push_back( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
+ pUndoManager->GetRedoActionComment(i) );
}
}
rSet.Put( aStrLst );
diff --git a/sd/inc/sdattr.hxx b/sd/inc/sdattr.hxx
index 6bcbcf20e2b0..a73a4cb1cdd7 100644
--- a/sd/inc/sdattr.hxx
+++ b/sd/inc/sdattr.hxx
@@ -42,8 +42,8 @@ class SdAttrLayerName : public SfxStringItem
{
public:
SdAttrLayerName() :
- SfxStringItem( ATTR_LAYER_NAME, String( RTL_CONSTASCII_USTRINGPARAM( "neue Ebene" ))) {}
- SdAttrLayerName( const String& aStr ) :
+ SfxStringItem( ATTR_LAYER_NAME, OUString("neue Ebene") ) {}
+ SdAttrLayerName( const OUString& aStr ) :
SfxStringItem( ATTR_LAYER_NAME, aStr ) {}
};
@@ -53,7 +53,7 @@ class SdAttrLayerTitle : public SfxStringItem
{
public:
SdAttrLayerTitle() : SfxStringItem( ATTR_LAYER_TITLE, OUString()) {}
- SdAttrLayerTitle( const String& aStr ) : SfxStringItem( ATTR_LAYER_TITLE, aStr ) {}
+ SdAttrLayerTitle( const OUString& aStr ) : SfxStringItem( ATTR_LAYER_TITLE, aStr ) {}
};
//------------------------------------------------------------------
@@ -62,7 +62,7 @@ class SdAttrLayerDesc : public SfxStringItem
{
public:
SdAttrLayerDesc() : SfxStringItem( ATTR_LAYER_DESC, OUString()) {}
- SdAttrLayerDesc( const String& aStr ) : SfxStringItem( ATTR_LAYER_DESC, aStr ) {}
+ SdAttrLayerDesc( const OUString& aStr ) : SfxStringItem( ATTR_LAYER_DESC, aStr ) {}
};
//------------------------------------------------------------------
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index b60d6ffa7c2b..0da2ef2c6d7d 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1097,12 +1097,12 @@ void ViewShell::ImpGetUndoStrings(SfxItemSet &rSet) const
if(nCount)
{
// prepare list
- ::std::vector< String > aStringList;
+ std::vector<OUString> aStringList;
for (sal_uInt16 a = 0; a < nCount; ++a)
{
// generate one String in list per undo step
- aStringList.push_back( String(pUndoManager->GetUndoActionComment(a)) );
+ aStringList.push_back( pUndoManager->GetUndoActionComment(a) );
}
// set item
@@ -1126,13 +1126,13 @@ void ViewShell::ImpGetRedoStrings(SfxItemSet &rSet) const
if(nCount)
{
// prepare list
- ::std::vector< String > aStringList;
+ ::std::vector< OUString > aStringList;
sal_uInt16 a;
for( a = 0; a < nCount; a++)
{
// generate one String in list per undo step
- aStringList.push_back( String(pUndoManager->GetRedoActionComment(a)) );
+ aStringList.push_back( pUndoManager->GetRedoActionComment(a) );
}
// set item
diff --git a/sfx2/inc/sorgitm.hxx b/sfx2/inc/sorgitm.hxx
index b87e4008d2bf..5c4c5a39118d 100644
--- a/sfx2/inc/sorgitm.hxx
+++ b/sfx2/inc/sorgitm.hxx
@@ -26,7 +26,7 @@
class SfxScriptOrganizerItem : public SfxStringItem
{
private:
- String aLanguage;
+ OUString aLanguage;
public:
TYPEINFO();
@@ -38,7 +38,7 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- String getLanguage() { return aLanguage; };
+ OUString getLanguage() { return aLanguage; };
};
#endif
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 8b0022aec34c..f424310cb188 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -366,10 +366,9 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_SECUREURLS))
{
::com::sun::star::uno::Sequence< OUString > seqURLs = aSecurityOptions.GetSecureURLs();
- std::vector<String> aList;
+ std::vector<OUString> aList;
sal_uInt32 nCount = seqURLs.getLength();
- sal_uInt32 nURL;
- for( nURL=0; nURL<nCount; ++nURL )
+ for( sal_uInt32 nURL=0; nURL<nCount; ++nURL )
aList.push_back(seqURLs[nURL]);
if( !rSet.Put( SfxStringListItem( rPool.GetWhich(SID_SECURE_URL), &aList ) ) )
@@ -757,12 +756,8 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
if ( SFX_ITEM_SET == rSet.GetItemState(SID_SECURE_URL, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxStringListItem), "StringListItem expected");
- const std::vector<String> &aList = ((SfxStringListItem*)pItem)->GetList();
- sal_uInt32 nCount = aList.size();
- ::com::sun::star::uno::Sequence< OUString > seqURLs(nCount);
- for( sal_uInt32 nPosition=0;nPosition<nCount;++nPosition)
- seqURLs[nPosition] = aList[nPosition];
-
+ ::com::sun::star::uno::Sequence< OUString > seqURLs;
+ ((SfxStringListItem*)pItem)->GetStringList(seqURLs);
aSecurityOptions.SetSecureURLs( seqURLs );
}
diff --git a/sfx2/source/control/sorgitm.cxx b/sfx2/source/control/sorgitm.cxx
index 836becb6b171..fefc88794c27 100644
--- a/sfx2/source/control/sorgitm.cxx
+++ b/sfx2/source/control/sorgitm.cxx
@@ -69,7 +69,7 @@ int SfxScriptOrganizerItem::operator==( const SfxPoolItem& rItem) const
bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
- String aValue;
+ OUString aValue;
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
{
@@ -82,7 +82,7 @@ bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uIn
return false;
}
- rVal <<= OUString( aValue );
+ rVal <<= aValue;
return true;
}
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx
index b4b74b2bde57..981afdea5b04 100644
--- a/sfx2/source/doc/objitem.cxx
+++ b/sfx2/source/doc/objitem.cxx
@@ -36,9 +36,9 @@ int SfxObjectShellItem::operator==( const SfxPoolItem &rItem ) const
//--------------------------------------------------------------------
-String SfxObjectShellItem::GetValueText() const
+OUString SfxObjectShellItem::GetValueText() const
{
- return String();
+ return OUString();
}
//--------------------------------------------------------------------
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 071312aefaad..8476a92e8c31 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -541,9 +541,9 @@ int SfxFrameItem::operator==( const SfxPoolItem &rItem ) const
//--------------------------------------------------------------------
-String SfxFrameItem::GetValueText() const
+OUString SfxFrameItem::GetValueText() const
{
- return String();
+ return OUString();
}
SfxPoolItem* SfxFrameItem::Clone( SfxItemPool *) const
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 6aee3b0917d1..3e60a2f69c75 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1623,9 +1623,9 @@ int SfxViewFrameItem::operator==( const SfxPoolItem &rItem ) const
}
//--------------------------------------------------------------------
-String SfxViewFrameItem::GetValueText() const
+OUString SfxViewFrameItem::GetValueText() const
{
- return String();
+ return OUString();
}
//--------------------------------------------------------------------
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 52e6319e13a6..e0504c264974 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -1302,10 +1302,9 @@ void SmDocShell::GetState(SfxItemSet &rSet)
}
if( nCount )
{
- String sList;
+ OUString sList;
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pTmpUndoMgr->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
- += '\n';
+ sList += (pTmpUndoMgr->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) + "\n";
SfxStringListItem aItem( nWh );
aItem.SetString( sList );
diff --git a/svl/source/items/imageitm.cxx b/svl/source/items/imageitm.cxx
index 9a127754ed16..bc96af4ad8c0 100644
--- a/svl/source/items/imageitm.cxx
+++ b/svl/source/items/imageitm.cxx
@@ -25,7 +25,7 @@ TYPEINIT1( SfxImageItem, SfxInt16Item );
struct SfxImageItem_Impl
{
- String aURL;
+ OUString aURL;
long nAngle;
bool bMirrored;
int operator == ( const SfxImageItem_Impl& rOther ) const
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index 88abad2c3c84..1aab6904a87e 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -36,7 +36,7 @@ class SfxImpStringList
{
public:
sal_uInt16 nRefCount;
- std::vector<String> aList;
+ std::vector<OUString> aList;
SfxImpStringList() { nRefCount = 1; }
~SfxImpStringList();
@@ -59,7 +59,7 @@ SfxStringListItem::SfxStringListItem() :
//------------------------------------------------------------------------
-SfxStringListItem::SfxStringListItem( sal_uInt16 which, const std::vector<String>* pList ) :
+SfxStringListItem::SfxStringListItem( sal_uInt16 which, const std::vector<OUString>* pList ) :
SfxPoolItem( which ),
pImp(NULL)
{
@@ -89,12 +89,9 @@ SfxStringListItem::SfxStringListItem( sal_uInt16 which, SvStream& rStream ) :
if (pImp)
{
- long i;
- String aStr;
- for( i=0; i < nEntryCount; i++ )
+ for( sal_Int32 i=0; i < nEntryCount; i++ )
{
- aStr = readByteString(rStream);
- pImp->aList.push_back(aStr);
+ pImp->aList.push_back( readByteString(rStream) );
}
}
}
@@ -128,7 +125,7 @@ SfxStringListItem::~SfxStringListItem()
//------------------------------------------------------------------------
-std::vector<String>& SfxStringListItem::GetList()
+std::vector<OUString>& SfxStringListItem::GetList()
{
if( !pImp )
pImp = new SfxImpStringList;
@@ -136,7 +133,7 @@ std::vector<String>& SfxStringListItem::GetList()
return pImp->aList;
}
-const std::vector<String>& SfxStringListItem::GetList () const
+const std::vector<OUString>& SfxStringListItem::GetList () const
{
return (const_cast< SfxStringListItem * >(this))->GetList();
}
@@ -212,7 +209,7 @@ SvStream& SfxStringListItem::Store( SvStream & rStream, sal_uInt16 ) const
//------------------------------------------------------------------------
-void SfxStringListItem::SetString( const XubString& rStr )
+void SfxStringListItem::SetString( const OUString& rStr )
{
DBG_ASSERT(GetRefCount()==0,"SetString:RefCount!=0");
@@ -222,48 +219,47 @@ void SfxStringListItem::SetString( const XubString& rStr )
pImp->nRefCount--;
pImp = new SfxImpStringList;
- xub_StrLen nStart = 0;
- xub_StrLen nDelimPos;
- XubString aStr(convertLineEnd(rStr, LINEEND_CR));
- do
+ sal_Int32 nStart = 0;
+ OUString aStr(convertLineEnd(rStr, LINEEND_CR));
+ for (;;)
{
- nDelimPos = aStr.Search( '\r', nStart );
- xub_StrLen nLen;
- if ( nDelimPos == STRING_NOTFOUND )
- nLen = 0xffff;
- else
- nLen = nDelimPos - nStart;
-
- // String gehoert der Liste
- pImp->aList.push_back(aStr.Copy(nStart, nLen));
+ const sal_Int32 nDelimPos = aStr.indexOf( '\r', nStart );
+ if ( nDelimPos < 0 )
+ {
+ if (nStart<aStr.getLength())
+ {
+ // put last string only if not empty
+ pImp->aList.push_back(aStr.copy(nStart));
+ }
+ break;
+ }
- nStart += nLen + 1 ; // delimiter ueberspringen
- } while( nDelimPos != STRING_NOTFOUND );
+ pImp->aList.push_back(aStr.copy(nStart, nDelimPos-nStart));
- // Kein Leerstring am Ende
- if (!pImp->aList.empty() && !(pImp->aList.rbegin())->Len())
- pImp->aList.pop_back();
+ // skip both inserted string and delimiter
+ nStart = nDelimPos + 1 ;
+ }
}
//------------------------------------------------------------------------
-XubString SfxStringListItem::GetString()
+OUString SfxStringListItem::GetString()
{
- XubString aStr;
+ OUString aStr;
if ( pImp )
{
DBG_ASSERT(pImp->nRefCount!=0xffff,"ImpList not valid");
- std::vector<String>::iterator iter;
- for (iter = pImp->aList.begin();;)
+ std::vector<OUString>::iterator iter = pImp->aList.begin();
+ for (;;)
{
aStr += *iter;
++iter;
- if (iter != pImp->aList.end())
- aStr += '\r';
- else
+ if (iter == pImp->aList.end())
break;
+
+ aStr += "\r";
}
}
return convertLineEnd(aStr, GetSystemLineEnd());
@@ -285,7 +281,7 @@ void SfxStringListItem::SetStringList( const com::sun::star::uno::Sequence< OUSt
{
// String gehoert der Liste
for ( sal_Int32 n = 0; n < rList.getLength(); n++ )
- pImp->aList.push_back(XubString(rList[n]));
+ pImp->aList.push_back(rList[n]);
}
}
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] );
}
}
}
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index ef6636794351..471acd112998 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -20,6 +20,7 @@
#define _TXTFTN_HXX
#include <txatbase.hxx>
+#include <tools/string.hxx>
class SwNodeIndex;
class SwTxtNode;
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 9cf92e038205..f92c675e33f3 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -989,7 +989,7 @@ bool SvXMLExportItemMapper::QueryXMLValue(
if( pBrush->GetGraphicPos() != GPOS_NONE &&
pBrush->GetGraphicFilter() )
{
- aOut.append( pBrush->GetGraphicFilter()->GetBuffer() );
+ aOut.append( *pBrush->GetGraphicFilter() );
bOk = true;
}
break;
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 8944b2a34af6..a6277f98ced6 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -476,7 +476,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
case TP_PAGE_STD:
if(0 == (nHtmlMode & HTMLMODE_ON ))
{
- std::vector<String> aList;
+ std::vector<OUString> aList;
String aNew;
SwStyleNameMapper::FillUIName( RES_POOLCOLL_TEXT, aNew );
aList.push_back( aNew );
@@ -526,7 +526,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
::FillCharStyleListBox(rCharFmtLB, pDocShell);
- std::vector<String> aList;
+ std::vector<OUString> aList;
for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
aList.push_back( rCharFmtLB.GetEntry(j) );
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 02335fd19f53..b7eb336788c9 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -967,9 +967,9 @@ void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
::FillCharStyleListBox(rCharFmtLB, pDocShell);
- std::vector<String> aList;
+ std::vector<OUString> aList;
for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
- aList.push_back( String(rCharFmtLB.GetEntry(j)));
+ aList.push_back( rCharFmtLB.GetEntry(j) );
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 1fd0bf98a3d2..6df810809cd6 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -1567,12 +1567,11 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
fnGetComment = &::svl::IUndoManager::GetRedoActionComment;
}
- String sList;
+ OUString sList;
if( nCount )
{
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
- += '\n';
+ sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) + "\n";
}
SfxStringListItem aItem( nWhich );
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 05ce67dd1543..dc54ec35ffaf 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -2652,7 +2652,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
{
int nSel = rSh.GetSelectionType();
SfxStringListItem aLst( nWhich );
- std::vector<String> &rLst = aLst.GetList();
+ std::vector<OUString> &rLst = aLst.GetList();
nParagraphPos = nGraphicPos = nOlePos = nFramePos = nTablePos =
nTableRowPos = nTableCellPos = nPagePos =
nHeaderPos = nFooterPos = 0;
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index cda38033ae93..935011b6fe25 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -587,10 +587,9 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
}
if( nCount )
{
- String sList;
+ OUString sList;
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
- += '\n';
+ sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) + "\n";
SfxStringListItem aItem( nWhich );
aItem.SetString( sList );