diff options
author | Justin Luth <justin_luth@sil.org> | 2016-12-28 22:04:43 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-01-12 12:58:38 +0000 |
commit | 14d05c9b852a0f94c6cbace7cd7887523a89d7d1 (patch) | |
tree | 55573b2b4282c775f080b2ea97d707a5fa016ffc /sd/inc | |
parent | ec6c0319a16f4163b123389775d9ff779fe5d9c2 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sd/inc')
-rw-r--r-- | sd/inc/drawdoc.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 8c491cd428d1..23a42accc349 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -355,6 +355,13 @@ public: SDRPAGE_NOTFOUND (=0xffff) when such a page does not exist. */ SAL_DLLPRIVATE sal_uInt16 GetPageByName(const OUString& rPgName, bool& rbIsMasterPage ) const; + /** 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& rPageName ) const; SdPage*GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const; sal_uInt16 GetSdPageCount(PageKind ePgKind) const; |