Using a real parser generator to parse numbers (and dates)

Stephan Bergmann sbergman at
Thu Mar 1 03:14:28 PST 2012

On 02/29/2012 06:41 PM, Lionel Elie Mamane wrote:
> On Wed, Feb 29, 2012 at 02:57:09PM +0100, Stephan Bergmann wrote:
>> Note that the stable sal interface historically stays clear of
>> boost, because of differences in the various boost versions
>> available in the various environments.
> OK, two prongs:
> 1) Use of boost in rtl/ustring.hxx
>     But this is completely header-only code, so no ABI probl...^W Ah
>     no, you are right; if the size or memory layout of a
>     boost::u16_to_u32_iterator changes, there will be problems when
>     passing a const_iterator between old binaries and new binaries.

Even if it were header-only, it would not work with the current setup 
(where the SDK does not include any boost headers).

>     So here's the patch for a boost-free OUString, with manually
>     implemented const_iterator.

Which is a bit of a pain, for sure.  Would it be an option to extract 
const_iterator and begin/end from OUString to outside the URE interface 
(see below) and use some sort of adapter around OUString in those places 
that expect it to support begin/end?

Another option would be to allow boost in the URE interface (hence the 
"historically" above), but that would require some thought/work.

> 2) So, OK if we don't put the LibO<->spirit integration in sal/,
>     what's the right place? In tools? I didn't envision it becoming
>     part of our "external" ABI, only for internal use in LibO's source
>     code.

comphelper or unotools come to mind.


More information about the LibreOffice mailing list