[Libreoffice-commits] core.git: sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Sat Mar 9 07:21:14 PST 2013
sc/source/filter/oox/worksheethelper.cxx | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
New commits:
commit 6a7ab93ad08fb000bbc5898929e89fd0532894a9
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat Mar 9 15:17:21 2013 +0100
use direct calls for column width import from ooxml
Change-Id: Ibaeaee66c5fc763320a75a638b221a7c0a30456b
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index b744f07..3f93056 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -1169,19 +1169,30 @@ void WorksheetGlobals::convertColumns()
void WorksheetGlobals::convertColumns( OutlineLevelVec& orColLevels,
const ValueRange& rColRange, const ColumnModel& rModel )
{
- PropertySet aPropSet( getColumns( rColRange ) );
-
// column width: convert 'number of characters' to column width in 1/100 mm
sal_Int32 nWidth = getUnitConverter().scaleToMm100( rModel.mfWidth, UNIT_DIGIT );
// macro sheets have double width
if( meSheetType == SHEETTYPE_MACROSHEET )
nWidth *= 2;
+
+ SCTAB nTab = getSheetIndex();
+ ScDocument& rDoc = getScDocument();
+ SCCOL nStartCol = rColRange.mnFirst;
+ SCCOL nEndCol = rColRange.mnLast;
+
if( nWidth > 0 )
- aPropSet.setProperty( PROP_Width, nWidth );
+ {
+ for( SCCOL nCol = nStartCol; nCol <= nEndCol; ++nCol )
+ {
+ rDoc.SetColWidthOnly( nStartCol, nTab, (sal_uInt16)sc::HMMToTwips( nWidth ) );
+ }
+ }
// hidden columns: TODO: #108683# hide columns later?
if( rModel.mbHidden )
- aPropSet.setProperty( PROP_IsVisible, false );
+ {
+ rDoc.SetColHidden( nStartCol, nEndCol, nTab, true );
+ }
// outline settings for this column range
convertOutlines( orColLevels, rColRange.mnFirst, rModel.mnLevel, rModel.mbCollapsed, false );
More information about the Libreoffice-commits
mailing list