Re: Make constant array accessible from different places

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Regina Henschel wrote:
Hi all,

I need some technical help.

I have a constant array
const std::pair<OUString, OUString> aApiToLabelFooPairs[] =
{
    {"LineStyle", "LabelBorderStyle"},
   etc.
}

for to map draw object fill and line property names to data-label related properties of series and points in a chart on ODF import.

I need it in SchXMLSeries2Context::setStylesToSeries and in SchXMLSeries2Context::setStylesToDataPoints.

I have not worked on export yet, so I don't know whether it will be needed on export too.

Where to put this array and how?

I can put it separately from the SchXMLSeries2Context methods into the file SchXMLSeries2Context.cxx. Would that be "static" or not?

Better place?

Kind regards
Regina

I'm still kind of new to this project, so I don't know if there is some kind of convention that applies. But for something like this, I would normally make it a private static const field of the class.
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux