From 01c4588fdad04c45d239afb3136b82f72fdd1c80 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 20 Nov 2014 09:54:15 +0100 Subject: sw: move IsIgnoredCharFmtForNumbering() to SwTxtNode I need this in SwTxtFormatter. (cherry picked from commit 96664bf0152ecf8ee64aa6b22ed399c1866117f1) Signed-off-by: Michael Stahl Conflicts: sw/inc/ndtxt.hxx Change-Id: Ib1586299f468a88e92fdb367fbab69a683791dc9 --- sw/inc/ndtxt.hxx | 3 +++ 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(); -- cgit v1.2.3