• Dennis Francis's avatar
    tdf#123421 : xlsx export : Don't write data field entry... · 97af5809
    Dennis Francis yazdı
    under colFields tag if there is only one data-field.
    
    <colFields count=[*]>
        <field x="-2"/>  <--- -2 indicates data field.
    </colFields>
    
    Excel 2013/2016 seems to crash at the presence of '<field x="-2"/>'
    in colFields when there is only one data-field.
    
    Additionally, call GetOutputRangeByType(sheet::DataPilotOutputRangeType::TABLE)
    on all ScDPObject's in non-const mode, so that the internal
    pOuput member of ScDPObject is populated. Otherwise the
    const GetOutputRangeByType(sheet::DataPilotOutputRangeType::TABLE)
    call always return an invalid range.
    
    This also adds 2 unit tests :-
    1. To check the presence of <field x="-2"/> in colFields tag
       if there are more than one data-fields.
    2. To ensure the absence of <field x="-2"/> in colFields tag
       if there is only one data-field.
    
    Change-Id: I8f470bd1ab883f73586f04a3fcc30e3fbf948c4a
    Reviewed-on: https://gerrit.libreoffice.org/70316
    Tested-by: Jenkins
    Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
    97af5809
dpsave.hxx 13.2 KB