Issue 123961 - won't link because of inconsistence in declaration of ColorControl::SetCurColorSelect
Summary: won't link because of inconsistence in declaration of ColorControl:...
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: 4.0.1
Hardware: Other Solaris
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2014-01-03 09:29 UTC by Petr Sumbera
Modified: 2017-05-20 10:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

possible fix (444 bytes, patch)
2014-01-03 09:29 UTC, Petr Sumbera
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Petr Sumbera 2014-01-03 09:29:26 UTC
Created attachment 82209 [details]
possible fix

When building using Solaris Studio compiler 12.3. I get following error:

[ build LNK ] Library/
Undefined                       first referenced
 symbol                             in file
void svx::sidebar::ColorControl::SetCurColorSelect(const Color,const bool) /builds/psumbera/aoo/components/openoffice/build/i86/main/solver/401/
ld: fatal: symbol referencing errors


This is because of following inconsistence.

Header file declares:

void ColorControl::SetCurColorSelect (const Color aCol, const bool bAvailable)

while ColorControl.cxx has:

void ColorControl::SetCurColorSelect (Color aCol, bool bAvailable)
Comment 1 2014-01-03 11:20:11 UTC
Thanks for the patch! Actually I'd prefer if the declaration was adjusted not to use const for non-reference/non-pointer types, because that is an implementation detail of the function which is irrelevant its users. Some compilers even warn about this.

Does your compiler work when you remove the const from the non-reference/non-pointer types in the *hxx file? If the constness aspect is important it should go where it actually belongs: into the function definition (in the *cxx file). Does your compiler allow, that the declaration uses the non-const variant in the declaration and the const variant in the definition?
Comment 2 Marcus 2017-05-20 10:45:23 UTC
Reset the assignee to the default "".