diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2021-07-21 12:21:07 +0300 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-07-26 15:18:16 +0200 |
commit | d44730148a95933f4a45a70241cb6d1d0546f626 (patch) | |
tree | 3bddf56a5f3a578e6852005e95a5d054fec390b8 /editeng | |
parent | da9bba7cc3c243e936daea689fea64ecaf110f35 (diff) |
tdf#143424: support for "Chapter number without separator"
If LO is using list format strings (this is default behavior since
aa5c6d12) it was not able to show just numbering without all formatting,
as it used in some fields.
Change-Id: Ib4695b8e1c2d7a451522c7e04af2216d16aceefe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119309
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/numitem.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 41ee6e4cf952..2f30242b911a 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -608,6 +608,16 @@ void SvxNumberFormat::SetListFormat(std::optional<OUString> oSet) sSuffix = sListFormat->copy(nLastReplacement); } +OUString SvxNumberFormat::GetListFormat(bool bIncludePrefixSuffix /*= true*/) const +{ + assert(sListFormat.has_value()); + + if (bIncludePrefixSuffix) + return *sListFormat; + + // Strip prefix & suffix from string + return sListFormat->copy(sPrefix.getLength(), sListFormat->getLength() - sPrefix.getLength() - sSuffix.getLength()); +} OUString SvxNumberFormat::GetCharFormatName()const { |