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>
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 81c54cc..187a411 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 2bd908f..d1c130a 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 b099440..34324d3 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 1d3bd95..8add43b 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));