How to add new attribute?

Michael Stahl mst at libreoffice.org
Mon Nov 20 11:28:56 UTC 2023


On 18/11/2023 12:19, Regina Henschel wrote:
> Hi all,
> 
> I'm going to implement a routing of curved connector shapes, that is 
> compatible with OOXML. The information, that the OOXML way has to be 
> used, will become a boolean member in class SdrEdgeInfoRec.
> 
> For testing I have added a method to class SdrEdgeObj to set the value. 
> But I think, using an attribute would be better, same as e.g. 
> "EdgeLine1Delta".
> 
> When I add the attribute to /core/include/svx/svddef.hxx
> can I add it directly after
> constexpr TypedWhichId<SdrMetricItem>             SDRATTR_EDGELINE3DELTA 
>      (SDRATTR_EDGE_FIRST +10);   // 1106
> or do I need to add it at the end, using _first and _last surround as 
> can be seen for writingmode2?

as far as i remember:

1. the pool items are no longer serialized in any document, so the 
WhichIds can be changed if needed

2. the only exception to this is the Macro Recorder, which may record 
numeric SlotIDs (those start with SID_) but not other WhichIDs... while 
this is an "experimental" feature i guess it still means "SID_*" should 
not be changed

so i think there's no reason to renumber these items in svddef.hxx.



More information about the LibreOffice mailing list