diff options
author | Baole Fang <baole.fang@gmail.com> | 2023-03-28 22:50:30 -0400 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2023-04-11 15:24:43 +0200 |
commit | 487010ef62405a1a728ae9b3d838e934015b1719 (patch) | |
tree | 8e120c12090087d3604b779c19243f69f165e850 /sd | |
parent | fa0d09541d451c14afa3de6e6173664827593f58 (diff) |
tdf#150477: Change "Slide" to "Page" in Draw status bar
Originally, Draw displays "Slide x of y".
Now, a new string is added, so that it displays "Page x of y".
Change-Id: I5857626b5a18decda4bf235b67a3c7d877556e94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149671
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/strings.hrc | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsa.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 5 |
4 files changed, 16 insertions, 3 deletions
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 81c54ccb8e86..187a411dc38e 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -94,6 +94,8 @@ #define STR_SVX_FILE NC_("STR_SVX_FILE", "Amiga SVX Audio") #define STR_SD_PAGE_COUNT NC_("STR_SD_PAGE_COUNT", "Slide %1 of %2") #define STR_SD_PAGE_COUNT_CUSTOM NC_("STR_SD_PAGE_COUNT_CUSTOM", "Slide %1 of %2 (%3)") +#define STR_SD_PAGE_COUNT_DRAW NC_("STR_SD_PAGE_COUNT_DRAW", "Page %1 of %2") +#define STR_SD_PAGE_COUNT_CUSTOM_DRAW NC_("STR_SD_PAGE_COUNT_CUSTOM_DRAW", "Page %1 of %2 (%3)") #define STR_ALL_SUPPORTED_FORMATS NC_("STR_ALL_SUPPORTED_FORMATS", "All supported formats") #define STR_ALL_FILES NC_("STR_ALL_FILES", "All files") #define STR_UNDO_INSERT_TEXTFRAME NC_("STR_UNDO_INSERT_TEXTFRAME", "Insert text frame") diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 2bd908fe93d0..d1c130ae3a8f 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -820,6 +820,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet) // page view and layout SdPage* pPage = nullptr; sal_uInt16 nSelectedPages = mrSlideSorter.GetController().GetPageSelector().GetSelectedPageCount(); + View* pDrView = &mrSlideSorter.GetView(); //Set number of slides if (nSelectedPages > 0) @@ -836,7 +837,10 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet) sal_Int32 nPageCount = mrSlideSorter.GetModel().GetPageCount(); sal_Int32 nActivePageCount = static_cast<sal_Int32>(mrSlideSorter.GetModel().GetDocument()->GetActiveSdPageCount()); - aPageStr = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); + if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw) + aPageStr = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT_DRAW) : SdResId(STR_SD_PAGE_COUNT_CUSTOM_DRAW); + else + aPageStr = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); aPageStr = aPageStr.replaceFirst("%1", OUString::number(nFirstPage)); aPageStr = aPageStr.replaceFirst("%2", OUString::number(nPageCount)); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index b09944043c24..34324d3aa93f 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -656,7 +656,11 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) sal_Int32 nPageCount = sal_Int32(GetDoc()->GetSdPageCount(mePageKind)); sal_Int32 nActivePageCount = sal_Int32(GetDoc()->GetActiveSdPageCount()); // Always show the slide/page number. - OUString aOUString = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); + OUString aOUString; + if (GetDoc()->GetDocumentType() == DocumentType::Draw) + aOUString = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT_DRAW) : SdResId(STR_SD_PAGE_COUNT_CUSTOM_DRAW); + else + aOUString = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); aOUString = aOUString.replaceFirst("%1", OUString::number(maTabControl->GetCurPagePos() + 1)); aOUString = aOUString.replaceFirst("%2", OUString::number(nPageCount)); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 1d3bd9500841..8add43b4ad4b 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1320,7 +1320,10 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) SdrPage* pPage = GetDoc()->GetSdPage( static_cast<sal_uInt16>(nPos), PageKind::Standard ); - aPageStr = SdResId(STR_SD_PAGE_COUNT); + if (GetDoc()->GetDocumentType() == DocumentType::Draw) + aPageStr = SdResId(STR_SD_PAGE_COUNT_DRAW); + else + aPageStr = SdResId(STR_SD_PAGE_COUNT); aPageStr = aPageStr.replaceFirst("%1", OUString::number(static_cast<sal_Int32>(nPos + 1))); aPageStr = aPageStr.replaceFirst("%2", OUString::number(nPageCount)); |