Hi Christina,<div><br></div><div>The problem you are facing is due to the return type of the method: XubString& then OUString& .</div><div>To fix this, you need to return a reference to a non locally created OUString.</div>

<div>I have successfully used a static OUString in the past for these cases.</div><div>Can you get access to the variable aEmptyOUStr in sw/inc/swtypes.hxx from your piece of code?</div><div><br></div><div>Cheers,</div><div>

Jean-Noel</div><div><br><br><div class="gmail_quote">2013/3/16 "Chr. Roßmanith" <span dir="ltr"><<a href="mailto:ChrRossmanith@web.de" target="_blank">ChrRossmanith@web.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

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