summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-19 10:49:42 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-02-08 08:03:57 -0500
commit075eba336935a580a8ccc45f113b628980507c76 (patch)
tree5164a78264545d98fdf0b4486e8d8ff178298d79
parent1da8622057cebfba9afbbf108fca849e4b799d86 (diff)
Consistently represent bullet char as OUString
(One difference is that for an XFListLevelBullet for which SetBulletChar has not been called, ToXml will use an empty string now instead of a string containing a single NUL character. But given that initializing m_chBullet to zero in the XFListLevelBullet ctor was only added recently with 72069675955aaf0b72a7842453347e3e7293f56d "coverity#738770: Unitialized scalar field," assume that ToXml is supposed to be only called after SetBulletChar has been called.) (cherry picked from commit 153ea761e32238d1dd882823cf27da1b11c4d66a) Change-Id: I7a5d7496b038cd094ab11ef8cbc1823ffc5bc130 (cherry picked from commit 735b9ebbef5ca9018c8eef5bbe8e0dab55775972)
-rw-r--r--lotuswordpro/source/filter/lwpbulletstylemgr.cxx2
-rw-r--r--lotuswordpro/source/filter/lwpsilverbullet.cxx8
-rw-r--r--lotuswordpro/source/filter/lwpsilverbullet.hxx2
-rw-r--r--lotuswordpro/source/filter/xfilter/xfliststyle.cxx5
-rw-r--r--lotuswordpro/source/filter/xfilter/xfliststyle.hxx7
5 files changed, 10 insertions, 14 deletions
diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
index 933f239bd5fa..0af56ef2782f 100644
--- a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
+++ b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
@@ -236,7 +236,7 @@ OUString LwpBulletStyleMgr::RegisterBulletStyle(LwpPara* pPara, LwpBulletOverrid
aSuffix = aParaNumbering.pSuffix->GetText();
}
- pListStyle->SetListBullet(nPos, LwpSilverBullet::GetNumCharByStyleID(pParaNumber).toChar(),
+ pListStyle->SetListBullet(nPos, LwpSilverBullet::GetNumCharByStyleID(pParaNumber),
"Times New Roman", aPrefix, aSuffix);
}
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx
index 5694275d6112..8d3bd08e52e9 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.cxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx
@@ -174,7 +174,7 @@ void LwpSilverBullet::RegisterStyle()
aSuffix = aParaNumbering.pSuffix->GetText();
}
- pListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber).toChar(),
+ pListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber),
"Times New Roman", aPrefix, aSuffix);
}
@@ -224,11 +224,9 @@ OUString LwpSilverBullet::GetBulletFontName()
* @descr:
* @return: An UChar32 bulle character.
*/
-UChar32 LwpSilverBullet::GetBulletChar()
+OUString LwpSilverBullet::GetBulletChar()
{
- OUString aBulletChar = m_pBulletPara->GetBulletChar();
-
- return aBulletChar.toChar();
+ return m_pBulletPara->GetBulletChar();
}
/**
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.hxx b/lotuswordpro/source/filter/lwpsilverbullet.hxx
index c56f35e1c25a..41b2a38f7218 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.hxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.hxx
@@ -107,7 +107,7 @@ public:
inline OUString GetBulletStyleName() const;
- UChar32 GetBulletChar();
+ OUString GetBulletChar();
static OUString GetPrefix() { return OUString(); }
diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
index 6e75c9422226..4cfc34e523f7 100644
--- a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
@@ -118,8 +118,7 @@ void XFListLevelBullet::ToXml(IXFStream *pStrm)
//text:style-name,ignore now.
m_aNumFmt.ToXml(pStrm);
//bullet-char
- OUString bullet(m_chBullet);
- pAttrList->AddAttribute( "text:bullet-char", bullet );
+ pAttrList->AddAttribute( "text:bullet-char", m_chBullet );
pStrm->StartElement( "text:list-level-style-bullet" );
@@ -267,7 +266,7 @@ void XFListStyle::SetListPosition(sal_Int32 level,
}
void XFListStyle::SetListBullet(sal_Int32 level,
- UChar32 bullet,
+ OUString const & bullet,
const OUString& fontname,
const OUString& prefix,
const OUString& suffix
diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.hxx b/lotuswordpro/source/filter/xfilter/xfliststyle.hxx
index 422d16c03506..a280c4445201 100644
--- a/lotuswordpro/source/filter/xfilter/xfliststyle.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfliststyle.hxx
@@ -141,12 +141,11 @@ class XFListLevelBullet : public XFListLevel
{
public:
XFListLevelBullet()
- : m_chBullet(0)
{
m_eListType = enumXFListLevelBullet;
}
- void SetBulletChar(UChar32 ch)
+ void SetBulletChar(OUString const & ch)
{
m_chBullet = ch;
}
@@ -166,7 +165,7 @@ public:
virtual void ToXml(IXFStream *pStrm) SAL_OVERRIDE;
private:
XFNumFmt m_aNumFmt;
- int32_t m_chBullet;
+ OUString m_chBullet;
OUString m_strFontName;
};
@@ -203,7 +202,7 @@ public:
);
void SetListBullet(sal_Int32 level,
- UChar32 bullet_char,
+ OUString const & bullet_char,
const OUString& fontname = "",
const OUString& prefix = "",
const OUString& suffix = ""