How to remove frame in SdrCustomShape during import from docx?

Miklos Vajna vmiklos at collabora.com
Tue Nov 29 07:18:27 UTC 2022


Hi Regina,

On Mon, Nov 28, 2022 at 08:19:26PM +0100, Regina Henschel <rb.henschel at t-online.de> wrote:
> I will try this now. It seems to remove the frame:
> 
> uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
> if (xPropertySet.is())
> {
>      uno::Reference<text::XTextFrame> xTextBoxContent(
>          xPropertySet->getPropertyValue("TextBoxContent"), uno::UNO_QUERY);
>      if (xTextBoxContent.is())
>                 xTextBoxContent->dispose();
> }
> 
> I need to implement the conversion to Fontwork too to see if it really
> works.

Can you try if set setPropertyValue("TextBox", false) works? I think
that's meant to call SwTextBoxHelper::destroy() internally, and it would
be simpler.

Regards,

Miklos


More information about the LibreOffice mailing list