Where to put a static method for common use in oox?

Tomaž Vajngerl quikee at gmail.com
Fri Dec 2 00:03:59 UTC 2022


Hi Regina,

On Fri, Dec 2, 2022 at 8:39 AM Regina Henschel <rb.henschel at t-online.de>
wrote:

> Hi all,
>
> I'm going to implement generating Fontwork shapes in import of docx (bug
> 125884). Thereby I have noticed, that the method
>
> static void
> lcl_putCustomShapeIntoTextPathMode(const
> uno::Reference<drawing::XShape>& xShape,
>                                     const CustomShapePropertiesPtr&
> pCustomShapePropertiesPtr,
>                                     const TextBodyPtr& pTextBody)
>
> from oox/source/drawingml/shape.cxx
> is usable in /oox/source/shape/WpsContext.cxx too, where the import of
> docx happens.
>
> Where can/should I put the method, so that it is usable in both files?
>

You can just rename it to "putCustomShapeIntoTextPathMode" and add it to
shape.hxx (stand alone function not part of any class). WpsContext.cxx
already includes oox/drawingml/shape.hxx so you can just use it.


> Kind regards,
> Regina
>

Tomaž
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20221202/e1a4c3fb/attachment.htm>


More information about the LibreOffice mailing list