[Libreoffice-commits] core.git: sw/source
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 28 21:31:39 UTC 2021
sw/source/core/text/EnhancedPDFExportHelper.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 99ef46fdb2a975e074c66a02328b86edfc05307f
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Mon Jun 28 17:10:21 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Mon Jun 28 23:31:06 2021 +0200
tdf#143105 Don't export empty URLs to PDF
They also won't be saved to the ODT if empty.
Change-Id: I7a8480bfc12261b4904981abb75b59752e354b4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118032
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 778f23046826..639171e1dd37 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1738,7 +1738,9 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() );
OUString aURL( static_cast<const SwFormatURL*>(pItem)->GetURL() );
- const bool bIntern = !aURL.isEmpty() && '#' == aURL[0];
+ if (aURL.isEmpty())
+ continue;
+ const bool bIntern = '#' == aURL[0];
// Create the destination for internal links:
sal_Int32 nDestId = -1;
More information about the Libreoffice-commits
mailing list