From 14d05c9b852a0f94c6cbace7cd7887523a89d7d1 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Wed, 28 Dec 2016 22:04:43 +0300 Subject: tdf#64588 - prevent loss of non-uniquely-named slide Although the UI prevents someone from renaming slides so that two have the same name, it is still possible to have such non-uniquely named pages apparently. Since drag/drop uses the name to add a slide to the clipboard, it resulted in duplicates of the first found instance of the slidename, and loss of the similarly-named slides when they were dragged to a new location. Change-Id: I2986a7c6c3360162adf9430f645d0dfc73f1d4e2 Reviewed-on: https://gerrit.libreoffice.org/32481 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Thorsten Behrens --- sd/source/ui/inc/DrawDocShell.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sd/source/ui/inc/DrawDocShell.hxx') diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 8d1ad05b001b..ccb139532641 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -183,6 +183,14 @@ public: */ bool IsNewPageNameValid( OUString & rInOutPageName, bool bResetStringIfStandardName = false ); + /** checks, if the given name is a *unique* name for an *existing* slide + + @param rPageName the name of an existing slide + + @return true, if the name is unique and the slide exists + */ + bool IsPageNameUnique(const OUString& rPagName) const; + /** Return the reference device for the current document. When the inherited implementation returns a device then this is passed to the caller. Otherwise the returned value depends on the printer -- cgit