tdf#154437: Check "Page" instead of "Slide" in Draw rename

Change-Id: Iec1ee88f12895007240408c8411cc1638c2f0559
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149672
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index c9a48bf..81c54cc 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -92,7 +92,6 @@
#define STR_VOC_FILE                                    NC_("STR_VOC_FILE", "Creative Labs Audio")
#define STR_AIFF_FILE                                   NC_("STR_AIFF_FILE", "Apple/SGI Audio")
#define STR_SVX_FILE                                    NC_("STR_SVX_FILE", "Amiga SVX Audio")
#define STR_SD_PAGE                                     NC_("STR_SD_PAGE", "Slide")
#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_ALL_SUPPORTED_FORMATS                       NC_("STR_ALL_SUPPORTED_FORMATS", "All supported formats")
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index caf0fc8..582afec 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -305,12 +305,17 @@ bool DrawDocShell::IsNewPageNameValid( OUString & rInOutPageName, bool bResetStr
{
    bool bCanUseNewName = false;

    // check if name is something like 'Slide n'
    OUString aStrPage(SdResId(STR_SD_PAGE) + " ");
    // check if name is something like 'Slide/Page n'
    OUString aStrPage;
    if (GetDoc()->GetDocumentType() == DocumentType::Draw)
        aStrPage = SdResId(STR_PAGE_NAME) + " ";
    else
        // using the same strings as SdPage::GetName
        aStrPage = SdResId(STR_PAGE) + " ";

    bool bIsStandardName = false;

    // prevent also _future_ slide names of the form "'STR_SD_PAGE' + ' ' + '[0-9]+|[a-z]|[A-Z]|[CDILMVX]+|[cdilmvx]+'"
    // prevent also _future_ slide names of the form "'STR_PAGE' + ' ' + '[0-9]+|[a-z]|[A-Z]|[CDILMVX]+|[cdilmvx]+'"
    // (arabic, lower- and upper case single letter, lower- and upper case roman numbers)
    if (rInOutPageName.startsWith(aStrPage) &&
        rInOutPageName.getLength() > aStrPage.getLength())