diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-20 09:54:15 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-01-12 09:22:50 +0100 |
commit | 385698cc245aafb2f87f9181b4656db78846b6be (patch) | |
tree | 67428ecb0eae548402d503b5f0ac586d514f287e /sw | |
parent | 20abcacca02a146519539289b4435570965c61c0 (diff) |
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
(cherry picked from commit 01c4588fdad04c45d239afb3136b82f72fdd1c80)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/ndtxt.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 5 |
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(); |