[PATCH] String to OUString (SfxStringItem and related)
Matteo Casalin (via Code Review)
gerrit at gerrit.libreoffice.org
Thu Jun 13 13:34:17 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4280
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/80/4280/1
String to OUString (SfxStringItem and related)
Change-Id: I390413e9ff3efee720a6423fb8695b4c655d7efa
---
M cui/source/inc/page.hxx
M cui/source/tabpages/backgrnd.cxx
M cui/source/tabpages/numpages.cxx
M cui/source/tabpages/page.cxx
M editeng/source/items/frmitems.cxx
M editeng/source/items/justifyitem.cxx
M editeng/source/items/numitem.cxx
M editeng/source/items/paraitem.cxx
M include/editeng/brushitem.hxx
M include/editeng/justifyitem.hxx
M include/editeng/tstpitem.hxx
M include/sfx2/frame.hxx
M include/sfx2/itemwrapper.hxx
M include/sfx2/objsh.hxx
M include/sfx2/viewfrm.hxx
M include/svl/poolitem.hxx
M include/svl/slstitm.hxx
M include/svx/algitem.hxx
M include/svx/chrtitem.hxx
M include/svx/postattr.hxx
M include/svx/rotmodit.hxx
M include/svx/rulritem.hxx
M sc/inc/attrib.hxx
M sc/inc/defaultsoptions.hxx
M sc/inc/docoptio.hxx
M sc/inc/formulaopt.hxx
M sc/inc/printopt.hxx
M sc/inc/viewopti.hxx
M sc/source/core/data/attrib.cxx
M sc/source/core/tool/defaultsoptions.cxx
M sc/source/core/tool/docoptio.cxx
M sc/source/core/tool/formulaopt.cxx
M sc/source/core/tool/printopt.cxx
M sc/source/core/tool/viewopti.cxx
M sc/source/filter/html/htmlexp.cxx
M sc/source/ui/app/uiitems.cxx
M sc/source/ui/inc/navipi.hxx
M sc/source/ui/inc/uiitems.hxx
M sc/source/ui/navipi/scenwnd.cxx
M sc/source/ui/view/cellsh.cxx
M sc/source/ui/view/tabvwshb.cxx
M sd/inc/sdattr.hxx
M sd/source/ui/view/viewshel.cxx
M sfx2/inc/sorgitm.hxx
M sfx2/source/appl/appcfg.cxx
M sfx2/source/control/sorgitm.cxx
M sfx2/source/doc/objitem.cxx
M sfx2/source/view/frame.cxx
M sfx2/source/view/viewfrm.cxx
M starmath/source/document.cxx
M svl/source/items/imageitm.cxx
M svl/source/items/slstitm.cxx
M svx/source/dialog/rulritem.cxx
M svx/source/dialog/srchdlg.cxx
M svx/source/gallery2/galbrws2.cxx
M svx/source/items/algitem.cxx
M svx/source/items/chrtitem.cxx
M svx/source/items/postattr.cxx
M svx/source/items/rotmodit.cxx
M svx/source/sidebar/nbdtmg.cxx
M svx/source/tbxctrls/lboxctrl.cxx
M sw/inc/txtftn.hxx
M sw/source/filter/html/css1atr.cxx
M sw/source/filter/html/htmlfly.cxx
M sw/source/filter/html/wrthtml.cxx
M sw/source/filter/xml/xmlexpit.cxx
M sw/source/ui/fmtui/tmpdlg.cxx
M sw/source/ui/misc/num.cxx
M sw/source/ui/shells/annotsh.cxx
M sw/source/ui/shells/basesh.cxx
M sw/source/ui/shells/drwtxtsh.cxx
M sw/source/ui/shells/txtnum.cxx
72 files changed, 299 insertions(+), 308 deletions(-)
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index b61c47a..d07a6b9 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -118,7 +118,7 @@
FixedText* m_pRegisterFT;
ListBox* m_pRegisterLB;
- String sStandardRegister;
+ OUString sStandardRegister;
FixedText* m_pInsideLbl;
FixedText* m_pOutsideLbl;
@@ -193,7 +193,7 @@
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/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index a8ce0a7..56b6422 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1826,8 +1826,8 @@
}
else
{
- const String* pStrLink = rBgdAttr.GetGraphicLink();
- const String* pStrFilter = rBgdAttr.GetGraphicFilter();
+ const OUString* pStrLink = rBgdAttr.GetGraphicLink();
+ const OUString* pStrFilter = rBgdAttr.GetGraphicFilter();
lcl_setFillStyle(m_pLbSelect, XFILL_BITMAP);
ShowBitmapUI_Impl();
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index bf3ba14..d0b3ffe 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -3524,7 +3524,7 @@
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 da2ac1c..2ca7a95 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1562,7 +1562,7 @@
// -----------------------------------------------------------------------
-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/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 566a375..81b92c4 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3387,15 +3387,15 @@
// -----------------------------------------------------------------------
SvxBrushItem::SvxBrushItem(
- const String& rLink, const String& rFilter,
+ const OUString& rLink, const OUString& rFilter,
SvxGraphicPosition ePos, sal_uInt16 _nWhich ) :
SfxPoolItem( _nWhich ),
aColor ( COL_TRANSPARENT ),
pImpl ( new SvxBrushItem_Impl( NULL ) ),
- pStrLink ( new String( rLink ) ),
- pStrFilter ( new String( rFilter ) ),
+ pStrLink ( new OUString( rLink ) ),
+ pStrFilter ( new OUString( rFilter ) ),
eGraphicPos ( ( GPOS_NONE != ePos ) ? ePos : GPOS_MM ),
bLoadAgain ( sal_True )
@@ -3498,18 +3498,18 @@
if ( nDoLoad & LOAD_LINK )
{
// UNICODE: rStream >> aRel;
- String aRel = rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
+ OUString aRel = rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
// TODO/MBA: how can we get a BaseURL here?!
OSL_FAIL("No BaseURL!");
- String aAbs = INetURLObject::GetAbsURL( String(), aRel );
- DBG_ASSERT( aAbs.Len(), "Invalid URL!" );
- pStrLink = new String( aAbs );
+ OUString aAbs = INetURLObject::GetAbsURL( OUString(), aRel );
+ DBG_ASSERT( !aAbs.isEmpty(), "Invalid URL!" );
+ pStrLink = new OUString( aAbs );
}
if ( nDoLoad & LOAD_FILTER )
{
- pStrFilter = new String;
+ pStrFilter = new OUString;
// UNICODE: rStream >> *pStrFilter;
*pStrFilter = rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
}
@@ -3792,9 +3792,9 @@
if ( GPOS_NONE != eGraphicPos )
{
if ( rItem.pStrLink )
- pStrLink = new String( *rItem.pStrLink );
+ pStrLink = new OUString( *rItem.pStrLink );
if ( rItem.pStrFilter )
- pStrFilter = new String( *rItem.pStrFilter );
+ pStrFilter = new OUString( *rItem.pStrFilter );
if ( rItem.pImpl->pGraphicObject )
{
pImpl->pGraphicObject = new GraphicObject( *rItem.pImpl->pGraphicObject );
@@ -3884,7 +3884,7 @@
{
OSL_FAIL("No BaseURL!");
// TODO/MBA: how to get a BaseURL?!
- String aRel = INetURLObject::GetRelURL( String(), *pStrLink );
+ OUString aRel = INetURLObject::GetRelURL( OUString(), *pStrLink );
// UNICODE: rStream << aRel;
rStream.WriteUniOrByteString(aRel, rStream.GetStreamCharSet());
}
@@ -3911,7 +3911,7 @@
// when graphics already loaded, use as a cache
{
// only with "valid" names - empty names now allowed
- if( pStrLink->Len() )
+ if( !pStrLink->isEmpty() )
{
pImpl->pStream = utl::UcbStreamHelper::CreateStream( *pStrLink, STREAM_STD_READ );
if( pImpl->pStream && !pImpl->pStream->GetError() )
@@ -4019,16 +4019,16 @@
// -----------------------------------------------------------------------
-void SvxBrushItem::SetGraphicLink( const String& rNew )
+void SvxBrushItem::SetGraphicLink( const OUString& rNew )
{
- if ( !rNew.Len() )
+ if ( rNew.isEmpty() )
DELETEZ( pStrLink );
else
{
if ( pStrLink )
*pStrLink = rNew;
else
- pStrLink = new String( rNew );
+ pStrLink = new OUString( rNew );
DELETEZ( pImpl->pGraphicObject );
}
@@ -4036,16 +4036,16 @@
// -----------------------------------------------------------------------
-void SvxBrushItem::SetGraphicFilter( const String& rNew )
+void SvxBrushItem::SetGraphicFilter( const OUString& rNew )
{
- if ( !rNew.Len() )
+ if ( rNew.isEmpty() )
DELETEZ( pStrFilter );
else
{
if ( pStrFilter )
*pStrFilter = rNew;
else
- pStrFilter = new String( rNew );
+ pStrFilter = new OUString( rNew );
}
}
@@ -4107,7 +4107,7 @@
if (!rItem.GetBitmapURL().isEmpty())
{
- pStrLink = new String( rItem.GetBitmapURL() );
+ pStrLink = new OUString( rItem.GetBitmapURL() );
SetGraphicPos( WallpaperStyle2GraphicPos((WallpaperStyle)rItem.GetStyle() ) );
}
}
diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx
index e938426..038beff 100644
--- a/editeng/source/items/justifyitem.cxx
+++ b/editeng/source/items/justifyitem.cxx
@@ -168,7 +168,7 @@
}
-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 @@
}
-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 @@
}
-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/numitem.cxx b/editeng/source/items/numitem.cxx
index 973dd63..f492676 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -422,15 +422,14 @@
void SvxNumberFormat::SetGraphic( const String& rName )
{
- const String* pName;
+ const OUString* pName;
if( pGraphicBrush &&
0 != (pName = pGraphicBrush->GetGraphicLink())
&& *pName == rName )
return ;
delete pGraphicBrush;
- String sTmp;
- pGraphicBrush = new SvxBrushItem( rName, sTmp, GPOS_AREA, 0 );
+ pGraphicBrush = new SvxBrushItem( rName, OUString(), GPOS_AREA, 0 );
pGraphicBrush->SetDoneLink( STATIC_LINK( this, SvxNumberFormat, GraphicArrived) );
if( eVertOrient == text::VertOrientation::NONE )
eVertOrient = text::VertOrientation::TOP;
@@ -916,13 +915,13 @@
{
SvxNumberFormat aFmt(GetLevel(i));
const SvxBrushItem* pBrush = aFmt.GetBrush();
- const String* pLinkStr;
+ const OUString* pLinkStr;
const Graphic* pGraphic;
if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
{
if(pBrush &&
0 != (pLinkStr = pBrush->GetGraphicLink()) &&
- pLinkStr->Len() &&
+ !pLinkStr->isEmpty() &&
0 !=(pGraphic = pBrush->GetGraphic()))
{
SvxBrushItem aTempItem(*pBrush);
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 8210fbb..a78912b 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -859,27 +859,19 @@
}
// -----------------------------------------------------------------------
-XubString SvxTabStop::GetValueString() const
+OUString 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 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 069a3b7..09649be 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -49,8 +49,8 @@
{
Color aColor;
SvxBrushItem_Impl* pImpl;
- String* pStrLink;
- String* pStrFilter;
+ OUString* pStrLink;
+ OUString* pStrFilter;
SvxGraphicPosition eGraphicPos;
sal_Bool bLoadAgain;
@@ -70,7 +70,7 @@
SvxGraphicPosition ePos, sal_uInt16 nWhich );
SvxBrushItem( const GraphicObject& rGraphicObj,
SvxGraphicPosition ePos, sal_uInt16 nWhich );
- SvxBrushItem( const String& rLink, const String& rFilter,
+ SvxBrushItem( const OUString& rLink, const OUString& rFilter,
SvxGraphicPosition ePos, sal_uInt16 nWhich );
SvxBrushItem( const SvxBrushItem& );
SvxBrushItem( const CntWallpaperItem&, sal_uInt16 nWhich );
@@ -105,14 +105,14 @@
const Graphic* GetGraphic() const;
const GraphicObject* GetGraphicObject() const;
- const String* GetGraphicLink() const { return pStrLink; }
- const String* GetGraphicFilter() const { return pStrFilter; }
+ const OUString* GetGraphicLink() const { return pStrLink; }
+ const OUString* GetGraphicFilter() const { return pStrFilter; }
void SetGraphicPos( SvxGraphicPosition eNew );
void SetGraphic( const Graphic& rNew );
void SetGraphicObject( const GraphicObject& rNewObj );
- void SetGraphicLink( const String& rNew );
- void SetGraphicFilter( const String& rNew );
+ void SetGraphicLink( const OUString& rNew );
+ void SetGraphicFilter( const OUString& rNew );
SvxBrushItem& operator=( const SvxBrushItem& rItem);
diff --git a/include/editeng/justifyitem.hxx b/include/editeng/justifyitem.hxx
index cfbdcff..6784a86 100644
--- a/include/editeng/justifyitem.hxx
+++ b/include/editeng/justifyitem.hxx
@@ -45,7 +45,7 @@
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 @@
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 @@
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 f8eca76..2541057 100644
--- a/include/editeng/tstpitem.hxx
+++ b/include/editeng/tstpitem.hxx
@@ -64,7 +64,7 @@
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 63220ca..5d5554e 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -239,7 +239,7 @@
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 7143fad..072da9e 100644
--- a/include/sfx2/itemwrapper.hxx
+++ b/include/sfx2/itemwrapper.hxx
@@ -154,7 +154,7 @@
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 4ace180..d3aa202 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -813,7 +813,7 @@
{}
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 c31681b..a81c20c 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -307,7 +307,7 @@
{}
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 5e04182..1a7765c 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 @@
@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 90c8731..f42686e 100644
--- a/include/svl/slstitm.hxx
+++ b/include/svl/slstitm.hxx
@@ -37,18 +37,18 @@
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 00a554d..f936dbf 100644
--- a/include/svx/algitem.hxx
+++ b/include/svx/algitem.hxx
@@ -51,7 +51,7 @@
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 92045aa..579e176 100644
--- a/include/svx/chrtitem.hxx
+++ b/include/svx/chrtitem.hxx
@@ -309,7 +309,7 @@
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 9bdd269..de11b54 100644
--- a/include/svx/postattr.hxx
+++ b/include/svx/postattr.hxx
@@ -37,7 +37,7 @@
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 @@
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 @@
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 f945280..38e6e62 100644
--- a/include/svx/rotmodit.hxx
+++ b/include/svx/rotmodit.hxx
@@ -44,7 +44,7 @@
~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 545edb4..ea901a7 100644
--- a/include/svx/rulritem.hxx
+++ b/include/svx/rulritem.hxx
@@ -35,7 +35,7 @@
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 @@
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 @@
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 @@
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 @@
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 562505d..4a84e29 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -61,7 +61,7 @@
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 @@
ScProtectionAttr( const ScProtectionAttr& );
~ScProtectionAttr();
- virtual String GetValueText() const;
+ virtual OUString GetValueText() const;
virtual SfxItemPresentation GetPresentation(
SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -265,7 +265,7 @@
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 @@
~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 @@
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 ff3ea44..4153a5f 100644
--- a/sc/inc/defaultsoptions.hxx
+++ b/sc/inc/defaultsoptions.hxx
@@ -54,7 +54,7 @@
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 abfbe7e..4c70786 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -153,7 +153,7 @@
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 7584197..caa45ea 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -88,7 +88,7 @@
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 d84539d..c7726fc 100644
--- a/sc/inc/printopt.hxx
+++ b/sc/inc/printopt.hxx
@@ -60,7 +60,7 @@
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 10af8e7..ebf4783 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -120,7 +120,7 @@
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 c1aec8e..529331d 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -125,15 +125,14 @@
//------------------------------------------------------------------------
-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,17 @@
//------------------------------------------------------------------------
-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 = ',';
-
- aValue = '(';
- aValue += (bProtection ? aStrYes : aStrNo); aValue += cDelim;
- aValue += (bHideFormula ? aStrYes : aStrNo); aValue += cDelim;
- aValue += (bHideCell ? aStrYes : aStrNo); aValue += cDelim;
- aValue += (bHidePrint ? aStrYes : aStrNo);
- aValue += ')';
+ OUString aValue = "("
+ + ScGlobal::GetRscString(bProtection ? STR_YES : STR_NO)
+ + ","
+ + ScGlobal::GetRscString(bHideFormula ? STR_YES : STR_NO)
+ + ","
+ + ScGlobal::GetRscString(bHideCell ? STR_YES : STR_NO)
+ + ","
+ + ScGlobal::GetRscString(bHidePrint ? STR_YES : STR_NO)
+ + ")";
return aValue;
}
@@ -336,11 +333,6 @@
const IntlWrapper* /* pIntl */
) const
{
- OUString aStrYes ( ScGlobal::GetRscString(STR_YES) );
- OUString aStrNo ( ScGlobal::GetRscString(STR_NO) );
- OUString aStrSep(": ");
- OUString aStrDelim( ", ");
-
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -352,14 +344,21 @@
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)
+ + ": "
+ + ScGlobal::GetRscString(bProtection ? STR_YES : STR_NO)
+ + ", "
+ + ScGlobal::GetRscString(STR_FORMULAS)
+ + ": "
+ + ScGlobal::GetRscString(!bHideFormula ? STR_YES : STR_NO)
+ + ", "
+ + ScGlobal::GetRscString(STR_HIDE)
+ + ": "
+ + ScGlobal::GetRscString(bHideCell ? STR_YES : STR_NO)
+ + ", "
+ + ScGlobal::GetRscString(STR_PRINT)
+ + ": "
+ + ScGlobal::GetRscString(!bHidePrint ? STR_YES : STR_NO);
break;
default:
@@ -714,7 +713,7 @@
//------------------------------------------------------------------------
-String ScPageHFItem::GetValueText() const
+OUString ScPageHFItem::GetValueText() const
{
return OUString("ScPageHFItem");
}
@@ -994,7 +993,7 @@
//------------------------------------------------------------------------
-String ScViewObjectModeItem::GetValueText( sal_uInt16 nVal ) const
+OUString ScViewObjectModeItem::GetValueText( sal_uInt16 nVal ) const
{
OSL_ENSURE( nVal <= VOBJ_MODE_HIDE, "enum overflow!" );
@@ -1065,7 +1064,7 @@
//------------------------------------------------------------------------
-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 095e325..a109698 100644
--- a/sc/source/core/tool/defaultsoptions.cxx
+++ b/sc/source/core/tool/defaultsoptions.cxx
@@ -83,7 +83,7 @@
{
}
-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 849cf78..d06225c 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -140,7 +140,7 @@
//------------------------------------------------------------------------
-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 8e5caea..df9e69a 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -173,7 +173,7 @@
{
}
-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 1ec3ea3..e6a2c49 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -91,7 +91,7 @@
{
}
-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 488b597..964b623 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -247,7 +247,7 @@
//------------------------------------------------------------------------
-String ScTpViewItem::GetValueText() const
+OUString ScTpViewItem::GetValueText() const
{
return OUString("ScTpViewItem");
}
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 603dfee..9266d8a 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -566,8 +566,11 @@
if ( bAll && GPOS_NONE != pBrushItem->GetGraphicPos() )
{
- const String* pLink = pBrushItem->GetGraphicLink();
+ const OUString* pLink = pBrushItem->GetGraphicLink();
String aGrfNm;
+
+ // Temporary for String to OUString conversion
+ OUString aGrfNm_;
// embeddete Grafik -> via WriteGraphic schreiben
if( !pLink )
@@ -586,7 +589,8 @@
aGrfNm, URIHelper::GetMaybeFileHdl(), true, false);
if ( HasCId() )
MakeCIdURL( aGrfNm );
- pLink = &aGrfNm;
+ aGrfNm_ = aGrfNm;
+ pLink = &aGrfNm_;
}
}
}
@@ -603,7 +607,8 @@
aGrfNm = URIHelper::SmartRel2Abs(
INetURLObject(aBaseURL),
aGrfNm, URIHelper::GetMaybeFileHdl(), true, false);
- pLink = &aGrfNm;
+ aGrfNm_ = aGrfNm;
+ pLink = &aGrfNm_;
}
if( pLink )
{
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index 724ceec..d26337d 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -49,7 +49,7 @@
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 @@
delete pEditData;
}
-String ScInputStatusItem::GetValueText() const
+OUString ScInputStatusItem::GetValueText() const
{
return OUString("InputStatus");
}
@@ -183,7 +183,7 @@
//------------------------------------------------------------------------
-String ScSortItem::GetValueText() const
+OUString ScSortItem::GetValueText() const
{
return OUString("SortItem");
}
@@ -290,7 +290,7 @@
//------------------------------------------------------------------------
-String ScQueryItem::GetValueText() const
+OUString ScQueryItem::GetValueText() const
{
return OUString("QueryItem");
}
@@ -354,7 +354,7 @@
//------------------------------------------------------------------------
-String ScSubTotalItem::GetValueText() const
+OUString ScSubTotalItem::GetValueText() const
{
return OUString("SubTotalItem");
}
@@ -415,7 +415,7 @@
//------------------------------------------------------------------------
-String ScUserListItem::GetValueText() const
+OUString ScUserListItem::GetValueText() const
{
return OUString("ScUserListItem");
}
@@ -481,7 +481,7 @@
//------------------------------------------------------------------------
-String ScConsolidateItem::GetValueText() const
+OUString ScConsolidateItem::GetValueText() const
{
return OUString("ScConsolidateItem");
}
@@ -542,7 +542,7 @@
//------------------------------------------------------------------------
-String ScPivotItem::GetValueText() const
+OUString ScPivotItem::GetValueText() const
{
return OUString("ScPivotItem");
}
@@ -595,7 +595,7 @@
//------------------------------------------------------------------------
-String ScSolveItem::GetValueText() const
+OUString ScSolveItem::GetValueText() const
{
return OUString("ScSolveItem");
}
@@ -645,7 +645,7 @@
//------------------------------------------------------------------------
-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 c62f534..8e8f8ac 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -63,7 +63,7 @@
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 b539fd9..d475289 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -44,7 +44,7 @@
ScAddress aCursorPos;
ScAddress aStartPos;
ScAddress aEndPos;
- String aString;
+ OUString aString;
EditTextObject* pEditData;
public:
@@ -54,12 +54,12 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 4ecce70..fda1789 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -48,7 +48,7 @@
{
}
-void ScScenarioListBox::UpdateEntries( const std::vector<String> &aNewEntryList )
+void ScScenarioListBox::UpdateEntries( const std::vector<OUString> &aNewEntryList )
{
Clear();
maEntries.clear();
@@ -71,7 +71,7 @@
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 @@
// 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 0685677..9431b90 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -762,7 +762,7 @@
case SID_SELECT_SCENARIO:
{
- std::vector<String> aList;
+ std::vector<OUString> aList;
Color aDummyCol;
if ( !pDoc->IsScenario(nTab) )
@@ -770,7 +770,6 @@
OUString aStr;
sal_uInt16 nFlags;
SCTAB nScTab = nTab + 1;
- String aProtect;
bool bSheetProtected = pDoc->IsTabProtected(nTab);
while ( pDoc->IsScenario(nScTab) )
@@ -780,8 +779,7 @@
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 2b31d63..3845a73 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -560,13 +560,13 @@
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 6bcbcf2..a73a4cb 100644
--- a/sd/inc/sdattr.hxx
+++ b/sd/inc/sdattr.hxx
@@ -42,8 +42,8 @@
{
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 @@
{
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 @@
{
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 b60d6ff..0da2ef2 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1097,12 +1097,12 @@
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 @@
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 b87e400..5c4c5a3 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 @@
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 8b0022a..f424310 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -366,10 +366,9 @@
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 @@
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 836becb..fefc887 100644
--- a/sfx2/source/control/sorgitm.cxx
+++ b/sfx2/source/control/sorgitm.cxx
@@ -69,7 +69,7 @@
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 @@
return false;
}
- rVal <<= OUString( aValue );
+ rVal <<= aValue;
return true;
}
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx
index b4b74b2..981afde 100644
--- a/sfx2/source/doc/objitem.cxx
+++ b/sfx2/source/doc/objitem.cxx
@@ -36,9 +36,9 @@
//--------------------------------------------------------------------
-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 071312a..8476a92 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -541,9 +541,9 @@
//--------------------------------------------------------------------
-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 6aee3b0..3e60a2f 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1623,9 +1623,9 @@
}
//--------------------------------------------------------------------
-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 52e6319..e0504c2 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -1302,10 +1302,9 @@
}
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 9a12775..bc96af4 100644
--- a/svl/source/items/imageitm.cxx
+++ b/svl/source/items/imageitm.cxx
@@ -25,7 +25,7 @@
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 88abad2..1aab690 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -36,7 +36,7 @@
{
public:
sal_uInt16 nRefCount;
- std::vector<String> aList;
+ std::vector<OUString> aList;
SfxImpStringList() { nRefCount = 1; }
~SfxImpStringList();
@@ -59,7 +59,7 @@
//------------------------------------------------------------------------
-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 @@
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 @@
//------------------------------------------------------------------------
-std::vector<String>& SfxStringListItem::GetList()
+std::vector<OUString>& SfxStringListItem::GetList()
{
if( !pImp )
pImp = new SfxImpStringList;
@@ -136,7 +133,7 @@
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 @@
//------------------------------------------------------------------------
-void SfxStringListItem::SetString( const XubString& rStr )
+void SfxStringListItem::SetString( const OUString& rStr )
{
DBG_ASSERT(GetRefCount()==0,"SetString:RefCount!=0");
@@ -222,48 +219,47 @@
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;
+ 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;
+ }
- // String gehoert der Liste
- pImp->aList.push_back(aStr.Copy(nStart, nLen));
+ pImp->aList.push_back(aStr.copy(nStart, nDelimPos-nStart));
- nStart += nLen + 1 ; // delimiter ueberspringen
- } while( nDelimPos != STRING_NOTFOUND );
-
- // 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 @@
{
// 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 ff1bf2a..0f01432 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 @@
//------------------------------------------------------------------------
-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 @@
//------------------------------------------------------------------------
-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 @@
//------------------------------------------------------------------------
-String SvxPagePosSizeItem::GetValueText() const
+OUString SvxPagePosSizeItem::GetValueText() const
{
- return String();
+ return OUString();
}
//------------------------------------------------------------------------
@@ -440,9 +438,9 @@
//------------------------------------------------------------------------
-String SvxColumnItem::GetValueText() const
+OUString SvxColumnItem::GetValueText() const
{
- return String();
+ return OUString();
}
//------------------------------------------------------------------------
@@ -595,9 +593,9 @@
//------------------------------------------------------------------------
-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 157af30..7b37136 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -137,7 +137,7 @@
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 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 baba409..7ca1a74 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -96,7 +96,7 @@
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 e0b0aa0..e5f9a98 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -130,7 +130,7 @@
//------------------------------------------------------------------------
-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 33fff14..2242b50 100644
--- a/svx/source/items/chrtitem.cxx
+++ b/svx/source/items/chrtitem.cxx
@@ -242,10 +242,9 @@
// -----------------------------------------------------------------------
-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 21fcfee..794a55c 100644
--- a/svx/source/items/postattr.cxx
+++ b/svx/source/items/postattr.cxx
@@ -37,7 +37,7 @@
// -----------------------------------------------------------------------
-SvxPostItAuthorItem::SvxPostItAuthorItem( const XubString& rAuthor,
+SvxPostItAuthorItem::SvxPostItAuthorItem( const OUString& rAuthor,
sal_uInt16 _nWhich ) :
SfxStringItem( _nWhich, rAuthor )
{
@@ -85,7 +85,7 @@
// -----------------------------------------------------------------------
-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( 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 dcf0a2d..f02739a 100644
--- a/svx/source/items/rotmodit.cxx
+++ b/svx/source/items/rotmodit.cxx
@@ -88,9 +88,9 @@
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 @@
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/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 288a85a..4c31a20 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -681,7 +681,7 @@
if ( pGrf )
{
- const String* pGrfName = pBrsh->GetGraphicLink();
+ const OUString* pGrfName = pBrsh->GetGraphicLink();
//String* pGrfName = (String*)(pBrsh->GetGraphicLink());
GrfBulDataRelation* pEntry = aGrfDataLst[nIndex];
if ( pGrfName )
@@ -1083,7 +1083,7 @@
String sEmpty;
if ( pGrf )
{
- const String* pGrfName = pBrsh->GetGraphicLink();
+ const OUString* pGrfName = pBrsh->GetGraphicLink();
GrfBulDataRelation* pEntry = (GrfBulDataRelation*) (pActualBullets[nIndex]->pBullets);
if ( pGrfName )
pEntry->sGrfName = *pGrfName;
@@ -1158,7 +1158,7 @@
else
return sal_False;
- const String* pGrfName = 0;
+ const OUString* pGrfName = 0;
if ( pGrf )
{
pGrfName = pBrsh->GetGraphicLink();
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index ab150fa..758c9bb 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -282,9 +282,9 @@
{
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 ef66367..471acd1 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/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 5a348e4..981aaa0 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3310,7 +3310,7 @@
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
- sal_uInt16 nMode, const String *pGrfName )
+ sal_uInt16 nMode, const String *pGrfName_ )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3323,7 +3323,17 @@
// Erstmal ein par Werte holen
// const Brush &rBrush = ((const SvxBrushItem &)rHt).GetBrush();
const Color & rColor = ((const SvxBrushItem &)rHt).GetColor();
- const String *pLink = pGrfName ? pGrfName
+
+ // Temporary, for String to OUString conversion
+ OUString GrfName;
+ OUString *pGrfName = 0;
+ if (pGrfName_)
+ {
+ GrfName = *pGrfName_;
+ pGrfName = &GrfName;
+ }
+
+ const OUString *pLink = pGrfName ? pGrfName
: ((const SvxBrushItem &)rHt).GetGraphicLink();
SvxGraphicPosition ePos = ((const SvxBrushItem &)rHt).GetGraphicPos();
@@ -3332,7 +3342,7 @@
// Fuer Seitenvorlagen wurde der Grafik-Name uebergeben. Es wird
// nur ein Attribut ausgegeben, wenn die Grafik nicht gekachelt ist.
OSL_ENSURE( pLink, "Wo ist der Grafik-Name der Seitenvorlage?" );
- if( !pLink || !pLink->Len() || GPOS_TILED==ePos )
+ if( !pLink || pLink->isEmpty() || GPOS_TILED==ePos )
return rWrt;
}
@@ -3349,6 +3359,8 @@
// und jetzt eine Grafik
String sGrfNm;
+ // Temporary for String to OUString conversion
+ OUString sGrfNm_;
if( !pLink )
{
@@ -3365,10 +3377,10 @@
XOUTBMP_USE_NATIVE_IF_POSSIBLE );
if( !nErr ) // fehlerhaft, da ist nichts auszugeben
{
- sGrfNm = URIHelper::SmartRel2Abs(
+ sGrfNm_ = URIHelper::SmartRel2Abs(
INetURLObject(rWrt.GetBaseURL()), sGrfNm,
URIHelper::GetMaybeFileHdl() );
- pLink = &sGrfNm;
+ pLink = &sGrfNm_;
}
else
{
@@ -3380,7 +3392,8 @@
{
sGrfNm = *pLink;
rWrt.CopyLocalFileToINet( sGrfNm );
- pLink = &sGrfNm;
+ sGrfNm_ = sGrfNm;
+ pLink = &sGrfNm_;
}
// In Tabellen wird nur dann etwas exportiert, wenn eine Grafik
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index b7fdd6f..ccbf48f 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -1205,7 +1205,10 @@
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
// Wenn es ein BrushItem gibt, muss die Grafiknoch exportiert werden
- const String *pLink = 0;
+ const OUString *pLink = 0;
+ // Temporary for String to OUString conversion
+ OUString rGrfName_;
+
if( pBrush )
{
pLink = pBrush->GetGraphicLink();
@@ -1225,10 +1228,10 @@
XOUTBMP_USE_NATIVE_IF_POSSIBLE));
if( !nErr )
{
- rGrfName = URIHelper::SmartRel2Abs(
+ rGrfName_ = URIHelper::SmartRel2Abs(
INetURLObject( rWrt.GetBaseURL() ), rGrfName,
URIHelper::GetMaybeFileHdl() );
- pLink = &rGrfName;
+ pLink = &rGrfName_;
}
else
{
@@ -1242,13 +1245,14 @@
if( rHTMLWrt.bCfgCpyLinkedGrfs )
{
rHTMLWrt.CopyLocalFileToINet( rGrfName );
- pLink = &rGrfName;
+ rGrfName_ = rGrfName;
+ pLink = &rGrfName_;
}
}
}
else
{
- pLink = &rGrfName;
+ pLink = &rGrfName_;
}
OStringBuffer sOut;
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 58b7478..ba23f04 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1131,7 +1131,9 @@
if( !bGraphic )
return;
- const String *pLink = pBrushItem->GetGraphicLink();
+ const OUString *pLink = pBrushItem->GetGraphicLink();
+ // Temporary for String to OUString conversion
+ OUString rEmbGrfNm_;
// embeddete Grafik -> WriteEmbedded schreiben
if( !pLink )
@@ -1148,10 +1150,10 @@
XOUTBMP_USE_NATIVE_IF_POSSIBLE );
if( !nErr ) // fehlerhaft, da ist nichts auszugeben
{
- rEmbGrfNm = URIHelper::SmartRel2Abs(
+ rEmbGrfNm_ = URIHelper::SmartRel2Abs(
INetURLObject( GetBaseURL() ), rEmbGrfNm,
URIHelper::GetMaybeFileHdl() );
- pLink = &rEmbGrfNm;
+ pLink = &rEmbGrfNm_;
}
else
{
@@ -1165,7 +1167,8 @@
if( bCfgCpyLinkedGrfs )
{
CopyLocalFileToINet( rEmbGrfNm );
- pLink = &rEmbGrfNm;
+ rEmbGrfNm_ = rEmbGrfNm;
+ pLink = &rEmbGrfNm_;
}
}
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 9cf92e0..f92c675 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -989,7 +989,7 @@
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 8944b2a3..a6277f9 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -476,7 +476,7 @@
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 @@
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 02335fd..b7eb336 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -967,9 +967,9 @@
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 1fd0bf9..6df8108 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -1567,12 +1567,11 @@
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 05ce67d..dc54ec3 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -2652,7 +2652,7 @@
{
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 505d787..704c5dc 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -600,10 +600,9 @@
}
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 );
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index f55e3f2..0d83086 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -126,10 +126,10 @@
if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
{
const SvxBrushItem* pBrush = aFmt.GetBrush();
- const String* pLinkStr;
+ const OUString* pLinkStr;
if(pBrush &&
0 != (pLinkStr = pBrush->GetGraphicLink()) &&
- pLinkStr->Len())
+ !pLinkStr->isEmpty())
aFmt.SetNumberingType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN));
aRule.SetLevel(i, aFmt, aRule.Get(i) != 0);
}
@@ -289,10 +289,10 @@
if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
{
const SvxBrushItem* pBrush = aFmt.GetBrush();
- const String* pLinkStr;
+ const OUString* pLinkStr;
if(pBrush &&
0 != (pLinkStr = pBrush->GetGraphicLink()) &&
- pLinkStr->Len())
+ !pLinkStr->isEmpty())
aFmt.SetNumberingType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN));
aSvxRule.SetLevel(i, aFmt, aSvxRule.Get(i) != 0);
}
--
To view, visit https://gerrit.libreoffice.org/4280
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I390413e9ff3efee720a6423fb8695b4c655d7efa
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Matteo Casalin <matteo.casalin at yahoo.com>
More information about the LibreOffice
mailing list