Kaydet (Commit) 8aee44c1 authored tarafından Matteo Casalin's avatar Matteo Casalin

String to OUString

Change-Id: I41b73e0af6841247a0403974b1c66e5a66123420
Reviewed-on: https://gerrit.libreoffice.org/5483Reviewed-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
Tested-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst 04314cc1
......@@ -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,
......
......@@ -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;}
......
......@@ -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; }
......
......@@ -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" );
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment