XubString -> OUString question
Jean-Noël Rouvignac
jn.rouvignac at gmail.com
Mon Mar 18 01:45:06 PDT 2013
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" <ChrRossmanith at web.de>
> 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
> LibreOffice at lists.freedesktop.**org <LibreOffice at lists.freedesktop.org>
> http://lists.freedesktop.org/**mailman/listinfo/libreoffice<http://lists.freedesktop.org/mailman/listinfo/libreoffice>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130318/506ae1cd/attachment.html>
More information about the LibreOffice
mailing list