https://bugs.documentfoundation.org/show_bug.cgi?id=114854
--- Comment #3 from Justin L <[email protected]> ---
(In reply to Justin L from comment #0)
> The same code is used for setting the URL property in regular
> text and works fine there.
Normal text uses SwTextCursor, while the draw-based cursor uses
SvxUnoTextRangeBase.
Since .doc format worked, I found that it uses Draw to ImportAsOutliner
m_pDrawEditEngine->QuickInsertField(SvxFieldItem(aURL, EE_FEATURE_FIELD),
aSel);
That suggests doing something like this
#include <editeng/flditem.hxx>
#include <editeng/unotext.hxx>
SvxUnoTextRangeBase* pDrawText =
dynamic_cast<SvxUnoTextRangeBase*>(xCrsr.get());
if ( pDrawText )
pDrawText->attachField(
std::make_unique<SvxURLField>(pContext->GetHyperlinkURL(), "the displayed
text", SvxURLFormat::AppDefault) );
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs