[PATCH] Bug 48140 - [EasyHack] remove uno calls from xlsx import

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Apr 17 07:25:57 PDT 2012


Hey Kohei, Daniel,

sorry that I did not respond earlier but I'm a bit busy this week.

2012/4/17 Kohei Yoshida <kohei.yoshida at gmail.com>:
> Hi Daniel,
>
> On Tue, 2012-04-17 at 08:45 -0400, Kohei Yoshida wrote:
>> I'll look through your changes to see what change might have caused
>> the shared formula import issue.
>
> This change
>
> -    Reference< XNamedRange > xNamedRange = createNamedRangeObject( aName, rTokens, 0 );
> -    OSL_ENSURE( xNamedRange.is(), "SheetDataBuffer::createSharedFormula - cannot create shared formula" );
> -    PropertySet aNameProps( xNamedRange );
> -    aNameProps.setProperty( PROP_IsSharedFormula, true );
> +    ScRangeData* pScRangeData = createNamedRangeObject( aName, rTokens, 0 );
>
> in SheetDataBuffer::createSharedFormula() may be the culprit.  I haven't
> verified it with 100% certainty, but this change certainly smells.
>
> Refer to
>
> http://opengrok.libreoffice.org/xref/core/sc/source/ui/unoobj/nameuno.cxx#392
>
> for what actually takes place when setting a boolean "IsSharedFormula"
> property to the named range UNO object.
>

The diffderence between a shared formula and a normal range name is
that a shared formula has type RT_SHARED. You can change that in
ScRangeData by setting this with SetType or AddType.

Regards,
Markus


More information about the LibreOffice mailing list