Hi Christina,

The problem you are facing is due to the return type of the method:
XubString& then OUString& .
To fix this, you need to return a reference to a non locally created
OUString.
I have successfully used a static OUString in the past for these cases.
Can you get access to the variable aEmptyOUStr in sw/inc/swtypes.hxx from
your piece of code?

Cheers,
Jean-Noel


2013/3/16 "Chr. Roßmanith" <[email protected]>

> Hi,
>
> during my current Xub -> OUString conversion I end up with "error:
> returning reference to temporary [-Werror]" when doing the following
> modification:
>
> -        return ImplGetSVEmptyStr();
> +       return OUString();
>
> in vcl/source/window/toolbox2.cxx
>
> What is the preferred way to solve this problem. Change return type,
> create something similar to ImplGetSVEmptyStr()?
>
> Christina
> ______________________________**_________________
> LibreOffice mailing list
> [email protected].**org <[email protected]>
> http://lists.freedesktop.org/**mailman/listinfo/libreoffice<http://lists.freedesktop.org/mailman/listinfo/libreoffice>
>
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to