summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2019-10-29 01:16:03 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2019-10-29 01:14:22 +0100
commit25506d15222e583ce5d62b016cf598a9aef65d09 (patch)
tree83304f236aede7a55b8e44126b19bf7f66b5ff03 /sd
parent7ab68018b3b6410a3896642d3c6945bddf397911 (diff)
tdf#108202: Correct Draw page naming in insert pages, and page naming dialogs
Change-Id: I2485bc29d6286cc30436fa9ecfb29e724578db41 Reviewed-on: https://gerrit.libreoffice.org/81631 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/strings.hrc2
-rw-r--r--sd/source/ui/dlg/inspagob.cxx2
-rw-r--r--sd/source/ui/docshell/docshel2.cxx7
3 files changed, 10 insertions, 1 deletions
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 26956a1fb751..10717e37f12c 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -74,6 +74,7 @@
#define STR_TITLE_NAMEGROUP NC_("STR_TITLE_NAMEGROUP", "Name Object")
#define STR_DESC_NAMEGROUP NC_("STR_DESC_NAMEGROUP", "Name")
#define STR_WARN_PAGE_EXISTS NC_("STR_WARN_PAGE_EXISTS", "The slide name already exists or is invalid. Please enter another name.")
+#define STR_WARN_PAGE_EXISTS_DRAW NC_("STR_WARN_PAGE_EXISTS_DRAW", "The page name already exists or is invalid. Please enter another name.")
#define STR_SNAPDLG_SETLINE NC_("STR_SNAPDLG_SETLINE", "Edit Snap Line")
#define STR_SNAPDLG_SETPOINT NC_("STR_SNAPDLG_SETPOINT", "Edit Snap Point")
#define STR_POPUP_EDIT_SNAPLINE NC_("STR_POPUP_EDIT_SNAPLINE", "Edit Snap Line...")
@@ -311,6 +312,7 @@
#define STR_LAYOUT_DEFAULT_TITLE_NAME NC_("STR_LAYOUT_DEFAULT_TITLE_NAME", "Title" )
#define STR_STANDARD_STYLESHEET_NAME NC_("STR_STANDARD_STYLESHEET_NAME", "Default" )
#define STR_UNDO_MOVEPAGES NC_("STR_UNDO_MOVEPAGES", "Move slides" )
+#define STR_INSERT_PAGES NC_("STR_INSERT_PAGES", "Insert Pages" )
#define STR_POOLSHEET_OBJWITHOUTFILL NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" )
#define STR_POOLSHEET_OBJNOLINENOFILL NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" )
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index bab9494acb3e..37fa11ece19c 100644
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -49,6 +49,8 @@ SdInsertPagesObjsDlg::SdInsertPagesObjsDlg(
// insert text
if (!m_pMedium)
m_xDialog->set_title(SdResId(STR_INSERT_TEXT));
+ else if (m_pDoc && m_pDoc->GetDocumentType() == DocumentType::Draw)
+ m_xDialog->set_title(SdResId(STR_INSERT_PAGES));
Reset();
}
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index 92e1024158fd..084c0d313359 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -279,9 +279,14 @@ bool DrawDocShell::CheckPageName(weld::Window* pWin, OUString& rName)
if( ! bIsNameValid )
{
- OUString aDesc( SdResId( STR_WARN_PAGE_EXISTS ) );
+ OUString aDesc;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if (GetDocumentType() == DocumentType::Draw)
+ aDesc = SdResId( STR_WARN_PAGE_EXISTS_DRAW );
+ else
+ aDesc = SdResId( STR_WARN_PAGE_EXISTS );
+
ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog(pWin, aStrForDlg, aDesc));
aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );