diff options
Diffstat (limited to 'sc/source/filter/excel/xetable.cxx')
-rw-r--r-- | sc/source/filter/excel/xetable.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 2b9d45a48d21..105b1682cba8 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -1578,6 +1578,7 @@ XclExpColinfo::XclExpColinfo( const XclExpRoot& rRoot, mnWidth( 0 ), mnScWidth( 0 ), mnFlags( 0 ), + mnOutlineLevel( 0 ), mnFirstXclCol( static_cast< sal_uInt16 >( nScCol ) ), mnLastXclCol( static_cast< sal_uInt16 >( nScCol ) ) { @@ -1599,6 +1600,7 @@ XclExpColinfo::XclExpColinfo( const XclExpRoot& rRoot, rOutlineBfr.Update( nScCol ); ::set_flag( mnFlags, EXC_COLINFO_COLLAPSED, rOutlineBfr.IsCollapsed() ); ::insert_value( mnFlags, rOutlineBfr.GetLevel(), 8, 3 ); + mnOutlineLevel = rOutlineBfr.GetLevel(); } void XclExpColinfo::ConvertXFIndexes() @@ -1651,9 +1653,9 @@ void XclExpColinfo::SaveXml( XclExpXmlStream& rStrm ) XML_collapsed, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_COLINFO_COLLAPSED ) ), // OOXTODO: XML_customWidth, XML_hidden, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_COLINFO_HIDDEN ) ), - XML_max, OString::number( (nLastXclCol+1) ).getStr(), - XML_min, OString::number( (mnFirstXclCol+1) ).getStr(), - // OOXTODO: XML_outlineLevel, + XML_outlineLevel, OString::number( mnOutlineLevel ).getStr(), + XML_max, OString::number( (nLastXclCol + 1) ).getStr(), + XML_min, OString::number( (mnFirstXclCol + 1) ).getStr(), // OOXTODO: XML_phonetic, XML_style, lcl_GetStyleId( rStrm, maXFId.mnXFIndex ).getStr(), XML_width, OString::number( (double) (mnScWidth / (double)sc::TwipsToHMM( GetCharWidth() )) ).getStr(), @@ -1994,7 +1996,8 @@ sal_uInt16 XclExpRow::GetFirstFreeXclCol() const bool XclExpRow::IsDefaultable() const { const sal_uInt16 nFlagsAlwaysMarkedAsDefault = EXC_ROW_DEFAULTFLAGS | EXC_ROW_UNSYNCED; - return !::get_flag( mnFlags, static_cast< sal_uInt16 >( ~nFlagsAlwaysMarkedAsDefault ) ) && IsEmpty(); + return !::get_flag( mnFlags, static_cast< sal_uInt16 >( ~nFlagsAlwaysMarkedAsDefault ) ) && + IsEmpty(); } void XclExpRow::DisableIfDefault( const XclExpDefaultRowData& rDefRowData ) @@ -2324,10 +2327,13 @@ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysE itr = maRowMap.find(nFrom); if ( itr == maRowMap.end() ) { - // only create RowMap entries for rows that differ from previous, - // the row is hidden (tdf#98106) or if it is the desired row + // only create RowMap entries if it is first row in spreadsheet, + // if it is the desired row, for rows that height differ from previous, + // if row is collapsed, has outline level (tdf#100347), or row is hidden (tdf#98106). if ( !nFrom || ( nFrom == nXclRow ) || ( rDoc.GetRowHeight(nFrom, nScTab, false) != rDoc.GetRowHeight(nFrom - 1, nScTab, false) ) || + ( maOutlineBfr.IsCollapsed() ) || + ( maOutlineBfr.GetLevel() != 0 ) || ( rDoc.RowHidden(nFrom, nScTab) ) ) { RowRef p(new XclExpRow(GetRoot(), nFrom, maOutlineBfr, bRowAlwaysEmpty)); |