[Libreoffice] Easy Hack String replacement: OUString to String

Michael Stahl mst at openoffice.org
Tue Sep 27 15:43:38 PDT 2011


On 28.09.2011 00:02, Neil Leathers wrote:
> I need to know how the correct way to convert from OUString to String.
> I know this is a not desired but in order to roll in the changes
> gradually it is necessary to do conversion back to deal with areas that
> haven't been move to the new string classes.
> 
> Neil Leathers

hi Neil,

this is very easy: if you #include <tools/string.hxx> (which you already
have if there's a String somewhere), then the OUString can be implicitly
converted to String via a constructor, and also in the other direction via
a conversion operator; so you don't need to do anything really :)

regards,
 michael



More information about the LibreOffice mailing list