Issue 123961

Summary: won't link because of inconsistence in declaration of ColorControl::SetCurColorSelect
Product: General Reporter: Petr Sumbera <petr.sumbera>
Component: uiAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Normal    
Priority: P3 CC: hdu, issues
Version: 4.0.1   
Target Milestone: ---   
Hardware: Other   
OS: Solaris   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
possible fix none

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 "".