sw/source/core/text/EnhancedPDFExportHelper.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 644047f46c997ca2cacb00405a4110664eeab5b7
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Mon Jun 28 17:10:21 2021 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Tue Jun 29 10:32:17 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 <glo...@fbihome.de>
    (cherry picked from commit 99ef46fdb2a975e074c66a02328b86edfc05307f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118058
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 94014ae13c9a..2cec852cc0f9 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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to