summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-11-20 09:54:15 +0100
committerMichael Stahl <mstahl@redhat.com>2015-01-09 22:02:56 +0100
commit01c4588fdad04c45d239afb3136b82f72fdd1c80 (patch)
tree302afc2e81583e0d410e67d3926fe2192621f4a9
parentasan: global-buffer-overflow on ooo12093-1.doc (diff)
downloadcore-01c4588fdad04c45d239afb3136b82f72fdd1c80.tar.gz
core-01c4588fdad04c45d239afb3136b82f72fdd1c80.zip
sw: move IsIgnoredCharFmtForNumbering() to SwTxtNode
I need this in SwTxtFormatter. (cherry picked from commit 96664bf0152ecf8ee64aa6b22ed399c1866117f1) Signed-off-by: Michael Stahl <mstahl@redhat.com> Conflicts: sw/inc/ndtxt.hxx Change-Id: Ib1586299f468a88e92fdb367fbab69a683791dc9
-rw-r--r--sw/inc/ndtxt.hxx3
-rw-r--r--sw/source/core/txtnode/thints.cxx5
2 files changed, 5 insertions, 3 deletions
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index b7af846bbf88..72a1a3dafdc7 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -797,6 +797,9 @@ public:
bool CompareParRsid( const SwTxtNode &rTxtNode ) const;
DECL_FIXEDMEMPOOL_NEWDEL(SwTxtNode)
+
+ /// In MS Word, the font underline setting of the paragraph end position wont affect the formatting of numbering, so we ignore it
+ static bool IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich);
};
inline SwpHints & SwTxtNode::GetSwpHints()
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 4932195057eb..f68028279cc2 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1761,8 +1761,7 @@ void SwTxtNode::DelSoftHyph( const sal_Int32 nStt, const sal_Int32 nEnd )
}
}
-//In MS Word, the font underline setting of the paragraph end position wont affect the formatting of numbering, so we ignore it
-bool lcl_IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich)
+bool SwTxtNode::IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich)
{
return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_BACKGROUND || nWhich == RES_CHRATR_ESCAPEMENT);
}
@@ -1812,7 +1811,7 @@ bool SwTxtNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet)
{
if (pCurrNumFmt->IsItemize() && lcl_IsIgnoredCharFmtForBullets(nWhich))
return bRet;
- if (pCurrNumFmt->IsEnumeration() && lcl_IsIgnoredCharFmtForNumbering(nWhich))
+ if (pCurrNumFmt->IsEnumeration() && SwTxtNode::IsIgnoredCharFmtForNumbering(nWhich))
return bRet;
SwCharFmt* pCurrCharFmt =pCurrNumFmt->GetCharFmt();