summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-08-17 18:41:03 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2013-08-17 21:10:39 +0000
commit8aee44c1814ae7c1af14e942cf0513e1612a82d9 (patch)
treeae9cfa6bc005c875176691c8c216f7421800847b
parent04314cc1244a5c681c2a0ea743e3675665ed7b7c (diff)
String to OUString
Change-Id: I41b73e0af6841247a0403974b1c66e5a66123420 Reviewed-on: https://gerrit.libreoffice.org/5483 Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com> Tested-by: Matteo Casalin <matteo.casalin@yahoo.com>
-rw-r--r--editeng/source/items/numitem.cxx13
-rw-r--r--include/editeng/numitem.hxx4
-rw-r--r--sw/inc/lineinfo.hxx6
-rw-r--r--sw/source/core/text/frmpaint.cxx2
-rw-r--r--sw/source/core/unocore/unosett.cxx2
5 files changed, 13 insertions, 14 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 9698c9084c7e..1a9e800c7d26 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -97,18 +97,17 @@ SvxNumberType::~SvxNumberType()
xFormatter = 0;
}
-String SvxNumberType::GetNumStr( sal_uLong nNo ) const
+OUString SvxNumberType::GetNumStr( sal_uLong nNo ) const
{
const LanguageTag& rLang = Application::GetSettings().GetLanguageTag();
return GetNumStr( nNo, rLang.getLocale() );
}
-String SvxNumberType::GetNumStr( sal_uLong nNo, const Locale& rLocale ) const
+OUString SvxNumberType::GetNumStr( sal_uLong nNo, const Locale& rLocale ) const
{
lcl_getFormatter(xFormatter);
- String aTmpStr;
if(!xFormatter.is())
- return aTmpStr;
+ return OUString();
if(bShowSymbol)
{
@@ -121,7 +120,7 @@ String SvxNumberType::GetNumStr( sal_uLong nNo, const Locale& rLocale ) const
{
// '0' allowed for ARABIC numberings
if(NumberingType::ARABIC == nNumType && 0 == nNo )
- aTmpStr = '0';
+ return OUString('0');
else
{
Sequence< PropertyValue > aProperties(2);
@@ -133,7 +132,7 @@ String SvxNumberType::GetNumStr( sal_uLong nNo, const Locale& rLocale ) const
try
{
- aTmpStr = xFormatter->makeNumberingString( aProperties, rLocale );
+ return xFormatter->makeNumberingString( aProperties, rLocale );
}
catch(const Exception&)
{
@@ -142,7 +141,7 @@ String SvxNumberType::GetNumStr( sal_uLong nNo, const Locale& rLocale ) const
}
}
}
- return aTmpStr;
+ return OUString();
}
SvxNumberFormat::SvxNumberFormat( sal_Int16 eType,
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index fbe59e651c65..3df4a96fe870 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -72,8 +72,8 @@ public:
SvxNumberType(const SvxNumberType& rType);
~SvxNumberType();
- String GetNumStr( sal_uLong nNo ) const;
- String GetNumStr( sal_uLong nNo, const com::sun::star::lang::Locale& rLocale ) const;
+ OUString GetNumStr( sal_uLong nNo ) const;
+ OUString GetNumStr( sal_uLong nNo, const com::sun::star::lang::Locale& rLocale ) const;
void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;}
sal_Int16 GetNumberingType() const {return nNumType;}
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
index 22bb1a9167a8..2557ada92aa8 100644
--- a/sw/inc/lineinfo.hxx
+++ b/sw/inc/lineinfo.hxx
@@ -38,7 +38,7 @@ class SW_DLLPUBLIC SwLineNumberInfo : public SwClient /**< purpose of derivation
character style for displaying the numbers. */
{
SvxNumberType aType; ///< e.g. roman linenumbers
- String aDivider; ///< String for aditional interval (vert. lines user defined)
+ OUString aDivider; ///< String for aditional interval (vert. lines user defined)
sal_uInt16 nPosFromLeft; ///< Position for paint
sal_uInt16 nCountBy; ///< Paint only for every n line
sal_uInt16 nDividerCountBy; /**< Interval for display of an user defined
@@ -65,8 +65,8 @@ public:
const SvxNumberType &GetNumType() const { return aType; }
void SetNumType( SvxNumberType aNew ){ aType = aNew; }
- const String &GetDivider() const { return aDivider; }
- void SetDivider( const String &r ) { aDivider = r; }
+ OUString GetDivider() const { return aDivider; }
+ void SetDivider( const OUString &r ) { aDivider = r; }
sal_uInt16 GetDividerCountBy() const { return nDividerCountBy; }
void SetDividerCountBy( sal_uInt16 n ) { nDividerCountBy = n; }
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index f3a0da997631..4296822c9871 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -124,7 +124,7 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, ViewShell *pVwSh,
nLineNr, the first line number
bLineNum is set back to sal_False if the numbering is completely
outside of the paint rect */
- nDivider = rLineInf.GetDivider().Len() ? rLineInf.GetDividerCountBy() : 0;
+ nDivider = !rLineInf.GetDivider().isEmpty() ? rLineInf.GetDividerCountBy() : 0;
nX = pFrm->Frm().Left();
SwCharFmt* pFmt = rLineInf.GetCharFmt( const_cast<IDocumentStylePoolAccess&>(*pFrm->GetNode()->getIDocumentStylePoolAccess()) );
OSL_ENSURE( pFmt, "PaintExtraData without CharFmt" );
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 891eae189142..8b06232cb9a1 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1052,7 +1052,7 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
aRet <<= (sal_Int16)rInfo.GetCountBy();
break;
case WID_SEPARATOR_TEXT :
- aRet <<= OUString(rInfo.GetDivider());
+ aRet <<= rInfo.GetDivider();
break;
case WID_SEPARATOR_INTERVAL:
aRet <<= (sal_Int16)rInfo.GetDividerCountBy();