[PATCH][PUSHED] Fix windows build

Stephan Bergmann sbergman at redhat.com
Thu Feb 23 01:56:27 PST 2012


On 02/23/2012 09:04 AM, Matúš Kukan wrote:
> I got:
> c:/git/libo/fpicker/source/win32/misc/resourceprovider.cxx(125) :
> error C2666: 'SimpleResMgr::SimpleResMgr' : 2 overloads have similar
> conversions
>          C:/git/libo/solver/wntmsci12.pro/inc\tools/simplerm.hxx(76):
> could be 'SimpleResMgr::SimpleResMgr(const rtl::OUString
> &,com::sun::star::lang::Locale&)'
>          C:/git/libo/solver/wntmsci12.pro/inc\tools/simplerm.hxx(61):
> or       'SimpleResMgr::SimpleResMgr(const sal_Char *,const
> com::sun::star::lang::Locale&)'
>          while trying to match the argument list '(const char [11],
> com::sun::star::lang::Locale)'
>          note: qualification adjustment (const/volatile) may be causing
> the ambiguity
>
> The patch helped me to build on Windows but I did not push because I
> don't know what really was the problem, how my change helped to solve
> that and especially if this is the proper solution.
> Maybe it is related to the recent change in OUString class ?
> If the patch is good, you can push, I will be here in the evening.

Yes, fix should be good.  With the newly added rtl::OUString ctor, a 
string literal can now implicitly be converted to an rtl::OUString, 
which can lead to ambiguities.  In this case, SimpleResMgr has ctors 
that take either a char const * or an rtl::OUString const &.  Probably 
something that should be cleaned up, leaving SimpleResMgr with just one 
of the two ctors.  (And CREATEVERSIONRESMGR_NAME is just a glorious 
macro to turn its argument into a string literal, so can safely be dropped.)

Stephan


More information about the LibreOffice mailing list