summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/items/numitem.cxx31
-rw-r--r--include/editeng/numitem.hxx20
2 files changed, 25 insertions, 26 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index e4684d840e1f..b13045464c74 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -419,7 +419,7 @@ void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem,
aGraphicSize.Width() = aGraphicSize.Height() = 0;
}
-void SvxNumberFormat::SetGraphic( const String& rName )
+void SvxNumberFormat::SetGraphic( const OUString& rName )
{
const String* pName;
if( pGraphicBrush &&
@@ -551,7 +551,7 @@ Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic)
return aRetSize;
}
-String SvxNumberFormat::CreateRomanString( sal_uLong nNo, sal_Bool bUpper )
+OUString SvxNumberFormat::CreateRomanString( sal_uLong nNo, sal_Bool bUpper )
{
nNo %= 4000; // more can not be displayed
// i, ii, iii, iv, v, vi, vii, vii, viii, ix
@@ -560,7 +560,7 @@ String SvxNumberFormat::CreateRomanString( sal_uLong nNo, sal_Bool bUpper )
? "MDCLXVI--" // +2 Dummy entries!
: "mdclxvi--"; // +2 Dummy entries!
- String sRet;
+ OUString sRet;
sal_uInt16 nMask = 1000;
while( nMask )
{
@@ -571,23 +571,23 @@ String SvxNumberFormat::CreateRomanString( sal_uLong nNo, sal_Bool bUpper )
if( 5 < nZahl )
{
if( nZahl < 9 )
- sRet += sal_Unicode(*(cRomanArr-1));
+ sRet += OUString(*(cRomanArr-1));
++nDiff;
nZahl -= 5;
}
switch( nZahl )
{
- case 3: { sRet += sal_Unicode(*cRomanArr); }
- case 2: { sRet += sal_Unicode(*cRomanArr); }
- case 1: { sRet += sal_Unicode(*cRomanArr); }
+ case 3: { sRet += OUString(*cRomanArr); }
+ case 2: { sRet += OUString(*cRomanArr); }
+ case 1: { sRet += OUString(*cRomanArr); }
break;
case 4: {
- sRet += sal_Unicode(*cRomanArr);
- sRet += sal_Unicode(*(cRomanArr-nDiff));
+ sRet += OUString(*cRomanArr);
+ sRet += OUString(*(cRomanArr-nDiff));
}
break;
- case 5: { sRet += sal_Unicode(*(cRomanArr-nDiff)); }
+ case 5: { sRet += OUString(*(cRomanArr-nDiff)); }
break;
}
@@ -853,9 +853,9 @@ void SvxNumRule::SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt)
}
}
-String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool bInclStrings ) const
+OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool bInclStrings ) const
{
- String aStr;
+ OUString aStr;
if( SVX_NO_NUM > rNum.GetLevel() && !( SVX_NO_NUMLEVEL & rNum.GetLevel() ) )
{
const SvxNumberFormat& rMyNFmt = GetLevel( rNum.GetLevel() );
@@ -893,16 +893,15 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool bInclStrings
bDot = sal_False;
}
else
- aStr += sal_Unicode('0'); // all 0-levels are a 0
+ aStr += "0"; // all 0-levels are a 0
if( i != rNum.GetLevel() && bDot)
- aStr += sal_Unicode('.');
+ aStr += ".";
}
}
if( bInclStrings )
{
- aStr.Insert( rMyNFmt.GetPrefix(), 0 );
- aStr += rMyNFmt.GetSuffix();
+ aStr = rMyNFmt.GetPrefix() + aStr + rMyNFmt.GetSuffix();
}
}
return aStr;
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 3df4a96fe870..0ed0a841e1d8 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -149,7 +149,7 @@ private:
Size aGraphicSize; // Always! in 1/100 mm
Font* pBulletFont; // Pointer to the bullet font
- String sCharStyleName; // Character Style
+ OUString sCharStyleName; // Character Style
DECL_STATIC_LINK( SvxNumberFormat, GraphicArrived, void * );
virtual void NotifyGraphicArrived();
@@ -175,7 +175,7 @@ public:
void SetSuffix(const OUString& rSet) { sSuffix = rSet;}
const OUString& GetSuffix() const { return sSuffix;}
- void SetCharFmtName(const String& rSet){ sCharStyleName = rSet; }
+ void SetCharFmtName(const OUString& rSet){ sCharStyleName = rSet; }
virtual OUString GetCharFmtName()const;
void SetBulletFont(const Font* pFont);
@@ -194,7 +194,7 @@ public:
virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0);
const SvxBrushItem* GetBrush() const {return pGraphicBrush;}
- void SetGraphic( const String& rName );
+ void SetGraphic( const OUString& rName );
virtual void SetVertOrient(sal_Int16 eSet);
virtual sal_Int16 GetVertOrient() const;
void SetGraphicSize(const Size& rSet) {aGraphicSize = rSet;}
@@ -222,7 +222,7 @@ public:
long GetIndentAt() const;
static Size GetGraphicSizeMM100(const Graphic* pGraphic);
- static String CreateRomanString( sal_uLong nNo, sal_Bool bUpper );
+ static OUString CreateRomanString( sal_uLong nNo, sal_Bool bUpper );
};
enum SvxNumRuleType
@@ -269,23 +269,23 @@ public:
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat& rFmt, sal_Bool bIsValid = sal_True);
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt);
- sal_Bool IsContinuousNumbering()const
+ sal_Bool IsContinuousNumbering()const
{return bContinuousNumbering;}
void SetContinuousNumbering(sal_Bool bSet)
{bContinuousNumbering = bSet;}
- sal_uInt16 GetLevelCount() const {return nLevelCount;}
- sal_Bool IsFeatureSupported(sal_uInt32 nFeature) const
+ sal_uInt16 GetLevelCount() const {return nLevelCount;}
+ sal_Bool IsFeatureSupported(sal_uInt32 nFeature) const
{return 0 != (nFeatureFlags & nFeature);}
- sal_uInt32 GetFeatureFlags() const {return nFeatureFlags;}
+ sal_uInt32 GetFeatureFlags() const {return nFeatureFlags;}
void SetFeatureFlag( sal_uInt32 nFlag, sal_Bool bSet = sal_True ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; }
- String MakeNumString( const SvxNodeNum&, sal_Bool bInclStrings = sal_True ) const;
+ OUString MakeNumString( const SvxNodeNum&, sal_Bool bInclStrings = sal_True ) const;
SvxNumRuleType GetNumRuleType() const { return eNumberingType; }
void SetNumRuleType( const SvxNumRuleType& rType ) { eNumberingType = rType; }
- sal_Bool UnLinkGraphics();
+ sal_Bool UnLinkGraphics();
};
class EDITENG_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem