summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-19 10:49:42 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-19 11:04:16 +0200
commit153ea761e32238d1dd882823cf27da1b11c4d66a (patch)
tree3c0b531049e3071b25d47bc76ece73560c246646 /lotuswordpro
parent4dd62d9cc3cb8d79694cb5c1ba09ccf730d211a5 (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.) Change-Id: I7a5d7496b038cd094ab11ef8cbc1823ffc5bc130
Diffstat (limited to 'lotuswordpro')
-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 89da8d781fad..3eaae4678f41 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.cxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx
@@ -171,7 +171,7 @@ void LwpSilverBullet::RegisterStyle()
aSuffix = aParaNumbering.pSuffix->GetText();
}
- pListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber).toChar(),
+ pListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber),
"Times New Roman", aPrefix, aSuffix);
}
@@ -221,11 +221,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 = ""