diff options
author | Muthu Subramanian <sumuthu@novell.com> | 2011-06-09 19:15:17 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@novell.com> | 2011-06-10 12:39:08 +0530 |
commit | 7e152b6746055e6da29ba1067e256c3833325881 (patch) | |
tree | ab3d569a5716c5c5cb8921e43bbc8064246303a7 /oox/inc | |
parent | 403eb7e5b159466a881c2f51a308b0da62b18691 (diff) |
n#683578: Performance improvements for xlsx imports.
Specifically reduces the number of UNO calls for
importing cell attributes.
Diffstat (limited to 'oox/inc')
-rwxr-xr-x | oox/inc/oox/xls/sheetdatabuffer.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/oox/inc/oox/xls/sheetdatabuffer.hxx b/oox/inc/oox/xls/sheetdatabuffer.hxx index 6f61c8432e15..2b3c7530622d 100755 --- a/oox/inc/oox/xls/sheetdatabuffer.hxx +++ b/oox/inc/oox/xls/sheetdatabuffer.hxx @@ -274,10 +274,9 @@ private: /** Writes all cell formatting attributes to the passed row range. */ void writeXfIdRowRangeProperties( const XfIdRowRange& rXfIdRowRange ) const; - /** Writes all cell formatting attributes to the passed cell range. */ - void writeXfIdRangeProperties( const XfIdRange& rXfIdRange ) const; - /** Tries to merge the ranges last inserted in maXfIdRanges with existing ranges. */ - void mergeXfIdRanges(); + + /** Writes all cell formatting attributes to the passed cell range list. (depreciates writeXfIdRangeProperties) */ + void writeXfIdRangeListProperties( sal_Int32 nXfId, sal_Int32 nNumFmtId, const ApiCellRangeList& rRanges ) const; /** Merges the passed merged range and updates right/bottom cell borders. */ void finalizeMergedRange( const ::com::sun::star::table::CellRangeAddress& rRange ); @@ -317,7 +316,8 @@ private: bool tryExpand( const ::com::sun::star::table::CellAddress& rCellAddr, sal_Int32 nXfId, sal_Int32 nNumFmtId ); bool tryMerge( const XfIdRange& rXfIdRange ); }; - typedef ::std::map< BinAddress, XfIdRange > XfIdRangeMap; + typedef ::std::pair< sal_Int32, sal_Int32 > XfIdNumFmtKey; + typedef ::std::map< XfIdNumFmtKey, ApiCellRangeList > XfIdRangeListMap; /** Stores information about a merged cell range. */ struct MergedRange @@ -340,7 +340,7 @@ private: maSharedFmlaAddr; /// Address of a cell containing a pending shared formula. BinAddress maSharedBaseAddr; /// Base address of the pending shared formula. XfIdRowRange maXfIdRowRange; /// Cached XF identifier for a range of rows. - XfIdRangeMap maXfIdRanges; /// Collected XF identifiers for cell ranges. + XfIdRangeListMap maXfIdRangeLists; /// Collected XF identifiers for cell rangelists. MergedRangeList maMergedRanges; /// Merged cell ranges. MergedRangeList maCenterFillRanges; /// Merged cell ranges from 'center across' or 'fill' alignment. bool mbPendingSharedFmla; /// True = maSharedFmlaAddr and maSharedBaseAddr are valid. |