diff options
author | Hossein <hossein@libreoffice.org> | 2024-03-12 16:32:09 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2024-03-13 20:48:32 +0100 |
commit | 2ad14fdade187579b2abf3c76a08780b77614662 (patch) | |
tree | cccba10fe6fa422876cbb33331e1008164a38846 /sd | |
parent | 7a561440acd01949e9b7b4efef9062ce05ce5d64 (diff) |
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.guillou@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164760
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/drawdoc2.cxx | 6 | ||||
-rw-r--r-- | sd/source/core/sdpage.cxx | 3 |
2 files changed, 7 insertions, 2 deletions
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 ) { |