summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorSkyler Grey <skyler.grey@collabora.com>2023-10-24 16:22:30 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-30 20:10:27 +0100
commit2ddd1378fc232fbc1d5162f2c44ecf71c6725732 (patch)
tree4f3fa37877ff0e9edbd24821fb0f171627dc98dd /sw/inc
parent15972993ff6e106a02954125269612179e1f33aa (diff)
Improve HIDE_NON_NUMERICAL compatibility with Word
The previous implementation of REFFLDFLAG_STYLE_HIDE_NON_NUMERICAL had some major incompatibilites with Word. In particular, it stripped letters even if they were included in the "numbering" system. This commit fixes a lot of the flaws in the previous implementation, so it's now a lot closer to Word. Change-Id: Ifaa67fbc2d53b0d4fb85e7305b2dbdf78cf0a1ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158451 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/numrule.hxx4
-rw-r--r--sw/inc/reffld.hxx5
2 files changed, 3 insertions, 6 deletions
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index f642e21e746c..b21cc5259656 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -169,11 +169,13 @@ public:
OUString MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
const bool bInclStrings = true,
const unsigned int _nRestrictToThisLevel = MAXLEVEL,
+ const bool bHideNonNumerical = false,
Extremities* pExtremities = nullptr,
LanguageType nLang = LANGUAGE_SYSTEM) const;
OUString MakeRefNumString( const SwNodeNum& rNodeNum,
const bool bInclSuperiorNumLabels,
- const int nRestrictInclToThisLevel ) const;
+ const int nRestrictInclToThisLevel,
+ const bool bHideNonNumerical ) const;
OUString MakeParagraphStyleListString() const;
/** @return list of associated text nodes */
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 3c1e3c63b5e6..b65e8c209633 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -117,11 +117,6 @@ private:
virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
virtual std::unique_ptr<SwField> Copy() const override;
-
- /// Strip out text that is not either a number or a delimiter. Used in STYLEREF for when you
- /// have chapters labelled "Chapter X.Y" and want to just keep the "X.Y". Distinct from
- /// GetExpandedTextOfReferencedTextNode so you can run it after any other processing
- void StylerefStripNonnumerical(OUString& rText) const;
public:
SwGetRefField( SwGetRefFieldType*, OUString aSetRef, OUString aReferenceLanguage,
sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uInt16 nFlags, sal_uLong nFormat );