diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:04 +0000 |
commit | eb358d77291eba677141bab113dc27d7aabb0f3e (patch) | |
tree | 2e96f3b5d0c79beaeb536bbf05c3b8564846e65f /sw/source/uibase/uiview/view2.cxx | |
parent | Adding debian version 4:24.2.1-4. (diff) | |
download | libreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.tar.xz libreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.zip |
Merging upstream version 4:24.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/source/uibase/uiview/view2.cxx')
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index cc6faf78a3..f7a10a49f7 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -286,14 +286,21 @@ OUString SwView::GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUStr ? SwResId(STR_PAGE_COUNT_PRINTED) : (extra.isEmpty() ? SwResId(STR_PAGE_COUNT) : SwResId(STR_PAGE_COUNT_CUSTOM))); aStr = aStr.replaceFirst("%1", OUString::number(nPhyNum)); - aStr = aStr.replaceFirst("%2", OUString::number(nPageCount)); if (nPageCount != nPrintedPageCount) { + aStr = aStr.replaceFirst("%2", OUString::number(nPageCount)); aStr = aStr.replaceFirst("%3", OUString::number(nPrintedPhyNum)); aStr = aStr.replaceFirst("%4", OUString::number(nPrintedPageCount)); } - else - aStr = aStr.replaceFirst("%3", extra); + else { + if (extra.isEmpty()) + aStr = aStr.replaceFirst("%2", OUString::number(nPageCount)); + else + { + aStr = aStr.replaceFirst("%2", extra); + aStr = aStr.replaceFirst("%3", OUString::number(nPageCount)); + } + } return aStr; } |