Hi Miklos,
Miklos Vajna schrieb am 28.11.2022 um 09:13:
Hi Regina,
On Sat, Nov 26, 2022 at 10:01:56PM +0100, Regina Henschel <rb.henschel@xxxxxxxxxxx> wrote:
The fact, that the shape should be a text warp (WordArt, Fontwork) is
detected in WpsContext in case prstTxWarp exists. At that time a frame
already exists in the shape.
But with a frame it is impossible to put the custom shape into text path
mode.
How can I remove the frame when in WpsContext?
Can you do the same on the UI?
In the UI it is the command .uno:RemoveTextBox. That is internally
FN_REMOVE_TEXT_BOX. That does
SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
if (pFrameFormat)
SwTextBoxHelper::destroy(pFrameFormat, pObj);
That is in /sw/source/uibase/shells/drawsh.cxx
Problem is that all of SwFrameFormat is local in sw, defined e.g. in
sw/inc/textboxhelper.hxx, sw/inc/frmfmt.hxx, sw/inc/frameformats.hxx and
sw/inc/docary.hxx.
If so, we can research if there is UNO
API to do the same.
WpsContext has css::uno::Reference<css::drawing::XShape> mxShape member.
When I debug in VS, I see mxShape [SwXShape] which has m_pFormat
[SwDrawFrameFormat] and therein m_pOtherTextBoxFormats. If no textbox is
generated, then VS shows m_pOtherTextBoxFormats as 'empty'. How to
achieve that state?
Kind regards,
Regina