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

2022-12-02 Thread Tomaž Vajngerl
Hi Regina,

On Fri, Dec 2, 2022 at 8:06 PM Regina Henschel 
wrote:

> Hi Tomaž,
>
> isn't /core/include/oox/drawingml/shape.hxx a too wide scope? Would a
> new file in /core/oox/inc/drawingml/ work as well?
>

I wouldn't worry about one function (there are already many classes and
functions in "include" dir, which are only used in oox), but it's up to
you. If you create a new file for the header file, then please also add it
for the source file and move the implementation there.


> Kind regards,
> Regina
>
>
Tomaž


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

2022-12-02 Thread Regina Henschel

Hi Tomaž,

isn't /core/include/oox/drawingml/shape.hxx a too wide scope? Would a 
new file in /core/oox/inc/drawingml/ work as well?


Kind regards,
Regina


Tomaž Vajngerl schrieb am 02.12.2022 um 01:03:

Hi Regina,

On Fri, Dec 2, 2022 at 8:39 AM Regina Henschel > 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& 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ž




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

2022-12-01 Thread Tomaž Vajngerl
Hi Regina,

On Fri, Dec 2, 2022 at 8:39 AM Regina Henschel 
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& 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ž


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

2022-12-01 Thread Regina Henschel

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& 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?

Kind regards,
Regina