[Libreoffice-commits] core.git: xmloff/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 19 05:33:37 UTC 2021


 xmloff/source/text/XMLTextFrameContext.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit da006fbe2d4c5891933390d72f6e6026b28d39fc
Author:     Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
AuthorDate: Wed Aug 18 16:48:43 2021 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
CommitDate: Thu Aug 19 07:27:36 2021 +0200

    tdf#143736 Fix loading hyperlink from textbox
    
    Change-Id: I56f5aec153d9544a6c345e0cbb5857cf5d0074b3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120673
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>

diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index a4f8cb636ca1..fbe537dd424b 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1375,6 +1375,17 @@ void XMLTextFrameContext::endFastElement(sal_Int32 )
         (pMultiContext.is()) ? pMultiContext.get() : m_xImplContext.get();
     XMLTextFrameContext_Impl *pImpl = const_cast<XMLTextFrameContext_Impl*>(dynamic_cast< const XMLTextFrameContext_Impl*>( pContext ));
     assert(!pMultiContext.is() || pImpl);
+
+    // When we are dealing with a textbox, pImpl will be null;
+    // we need to set the hyperlink to the shape instead
+    Reference<XShape> xShape = GetShape();
+    if (xShape.is() && m_pHyperlink)
+    {
+        Reference<XPropertySet> xProps(xShape, UNO_QUERY);
+        if (xProps.is())
+            xProps->setPropertyValue("Hyperlink", Any(m_pHyperlink->GetHRef()));
+    }
+
     if( !pImpl )
         return;
 


More information about the Libreoffice-commits mailing list