diff options
author | Noel Power <noel.power@novell.com> | 2012-06-04 18:00:36 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-06-04 18:04:58 +0100 |
commit | 764752f5d85cb7c86ad21340dfdda4b62754790c (patch) | |
tree | abfa9cdcb1c5e9be6db9ecbd4afb6912e651d843 /sc | |
parent | d59a707f6e9308c2b89ebf4e71693175c37b7ed6 (diff) |
better import xlsx heights
don't call UpdateAllRowHeights when IsAdjustHeightEnabled property is set and additionally set manual heights for *all* imported row heights ( same afaics xls import does ) - certainly this improves import ( also see documents attached in i#94028, i#93609 )
Change-Id: Id8aff727587ed4fa19fd0897aaf25b2202737084
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/oox/sheetdatabuffer.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/worksheethelper.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 4 |
3 files changed, 1 insertions, 23 deletions
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index 6d4e305dcf25..2a04f8a5d259 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -793,8 +793,6 @@ void SheetDataBuffer::applyCellMerging( const CellRangeAddress& rRange ) { if( const EditTextObject* pEditObj = static_cast< const ScEditCell* >( rDoc.GetCell( rStart ) )->GetData() ) bTextWrap = pEditObj->GetParagraphCount() > 1; - if( bTextWrap ) - setManualRowHeight( rStart.Row() ); } } } diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 43c1b33f2860..48dc7d6c19d8 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -342,8 +342,6 @@ public: @descr Row default formatting is converted directly, other settings are cached and converted in the finalizeImport() call. */ void setRowModel( const RowModel& rModel ); - /** Specifies that the passed row needs to set its height manually. */ - void setManualRowHeight( sal_Int32 nRow ); /** Initial conversion before importing the worksheet. */ void initializeWorksheetImport(); @@ -401,7 +399,6 @@ private: RowModelRangeMap maRowModels; /// Ranges of rows sorted by first row index. HyperlinkModelList maHyperlinks; /// Cell ranges containing hyperlinks. ValidationModelList maValidations; /// Cell ranges containing data validation settings. - ValueRangeSet maManualRowHeights; /// Rows that need manual height independent from own settings. SheetDataBuffer maSheetData; /// Buffer for cell contents and cell formatting. CondFormatBuffer maCondFormats; /// Buffer for conditional formatting. CommentsBuffer maComments; /// Buffer for all cell comments in this sheet. @@ -938,11 +935,6 @@ void WorksheetGlobals::setRowModel( const RowModel& rModel ) lclUpdateProgressBar( mxRowProgress, maUsedArea, nRow ); } -void WorksheetGlobals::setManualRowHeight( sal_Int32 nRow ) -{ - maManualRowHeights.insert( nRow ); -} - void WorksheetGlobals::initializeWorksheetImport() { // set default cell style for unused cells @@ -1236,10 +1228,7 @@ void WorksheetGlobals::convertRows( OutlineLevelVec& orRowLevels, custom height, otherwise get all rows specified in the class member maManualRowHeights that are inside the passed row model. */ ValueRangeVector aManualRows; - if( rModel.mbCustomHeight ) - aManualRows.push_back( rRowRange ); - else - aManualRows = maManualRowHeights.getIntersection( rRowRange ); + aManualRows.push_back( rRowRange ); for( ValueRangeVector::const_iterator aIt = aManualRows.begin(), aEnd = aManualRows.end(); aIt != aEnd; ++aIt ) { PropertySet aPropSet( getRows( *aIt ) ); @@ -1551,11 +1540,6 @@ void WorksheetHelper::setRowModel( const RowModel& rModel ) mrSheetGlob.setRowModel( rModel ); } -void WorksheetHelper::setManualRowHeight( sal_Int32 nRow ) -{ - mrSheetGlob.setManualRowHeight( nRow ); -} - void WorksheetHelper::putValue( const CellAddress& rAddress, double fValue ) const { ScAddress aAddress; diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index a7589d807089..2220e2d050f4 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1683,11 +1683,7 @@ void SAL_CALL ScModelObj::setPropertyValue( bool bOldAdjustHeightEnabled = pDoc->IsAdjustHeightEnabled(); bool bAdjustHeightEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if( bOldAdjustHeightEnabled != bAdjustHeightEnabled ) - { pDoc->EnableAdjustHeight( bAdjustHeightEnabled ); - if( bAdjustHeightEnabled ) - pDocShell->UpdateAllRowHeights(); - } } else if ( aString.EqualsAscii( SC_UNO_ISEXECUTELINKENABLED ) ) { |