sd/source/core/drawdoc2.cxx | 6 +++++- sd/source/core/sdpage.cxx | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-)
New commits: commit 2ad14fdade187579b2abf3c76a08780b77614662 Author: Hossein <hoss...@libreoffice.org> AuthorDate: Tue Mar 12 16:32:09 2024 +0100 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Wed Mar 13 20:48:32 2024 +0100 tdf#160162 Fix hyperlink update in Draw Changing the links to keep them up-to-date was previously done only when the name "Slide" was used for the pages, just like Impress, as Draw and Impress share code. Now, the term "Page" is used instead of "Slide" since 942d1d2ea59bf4605f2c464a6b29c967fa9f8de8 in Draw. This change, fixes the above issue by also using the correct string consntant. The patch is tested for Draw and Impress to make sure both are working correctly now. Change-Id: I55b4f56bd499d05f87f475d4c6cb3423247bf8d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164716 Tested-by: Jenkins Reviewed-by: Stéphane Guillou <stephane.guil...@libreoffice.org> Reviewed-by: Hossein <hoss...@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164760 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index de82a8b95306..8f7c9f3328e6 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -324,7 +324,11 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage const * pPage, sal_uInt16 nPo if (!aURL.isEmpty() && (aURL[0] == 35)) { - OUString aHashSlide = "#" + SdResId(STR_PAGE); + OUString aHashSlide; + if (meDocType == DocumentType::Draw) + aHashSlide = "#" + SdResId(STR_PAGE_NAME); + else + aHashSlide = "#" + SdResId(STR_PAGE); if (aURL.startsWith(aHashSlide)) { diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 02609a7083fa..10b4f34b761f 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2512,9 +2512,10 @@ const OUString& SdPage::GetName() const // default name for handout pages sal_uInt16 nNum = (GetPageNum() + 1) / 2; - aCreatedPageName = SdResId(STR_PAGE) + " "; if (static_cast<SdDrawDocument&>(getSdrModelFromSdrPage()).GetDocumentType() == DocumentType::Draw ) aCreatedPageName = SdResId(STR_PAGE_NAME) + " "; + else + aCreatedPageName = SdResId(STR_PAGE) + " "; if( getSdrModelFromSdrPage().GetPageNumType() == css::style::NumberingType::NUMBER_NONE ) {