Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 12/13/2011 07:09 PM, Michael Meeks wrote:
On Tue, 2011-12-13 at 16:02 -0200, Olivier Hallot wrote:
I am stumbling on the following piece of code

             if (nodepath.getLength() != 0 || !(value>>= nodepath) || nodepath.getLength() == 0)
...
in configmgr/source/configurationprovider.cxx:204,
and nodepath is an rtl::OUString

is this TRUE always, or did I missed something?

        What you're missing is this mid-mashing operator overloading; whereby
>>= actually assigns a string to nodepath ;-) so what it says to me is:
if the length>  0 and we successfully assign it to something else from
'value' and the result is non zero - then don't fail ;-)

Yeah, what it checks is that neither is nodepath already non-empty (i.e., multiple "nodepath" arguments passed in), nor does extracting the nodepath string from the value Any fail, nor is the passed in "nodepath" argument string empty (which is necessary to test here in order to be able to (mis-)use an empty nodepath string as a flag whether a "nodepath" argument has already been processed).

Pretty dense code, I admit.

Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.