summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/unitconverter.cxx
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-10-04 15:45:36 +0100
committerNoel Power <noel.power@suse.com>2012-10-04 16:58:58 +0100
commit8e753f8446554822d97969b0c18eba6cb9d79e26 (patch)
tree0fbdd98f02421aab601ea144af79e7e0e1e4ee84 /sc/source/filter/oox/unitconverter.cxx
parent4a42f84a70f38ee848b01baeaa6da5219dfe9b53 (diff)
xlsx fix import/export of column widths fdo#55623
column widths were never imported or exported correctly in xlsx. Change-Id: I92d469ce52495fe77281cb22341e9c5127e6b506
Diffstat (limited to 'sc/source/filter/oox/unitconverter.cxx')
-rw-r--r--sc/source/filter/oox/unitconverter.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/filter/oox/unitconverter.cxx b/sc/source/filter/oox/unitconverter.cxx
index e2feb875882e..2d0431b21be1 100644
--- a/sc/source/filter/oox/unitconverter.cxx
+++ b/sc/source/filter/oox/unitconverter.cxx
@@ -149,18 +149,17 @@ void UnitConverter::finalizeImport()
{
// XDevice expects pixels in font descriptor, but font contains twips
FontDescriptor aDesc = pDefFont->getFontDescriptor();
- aDesc.Height = static_cast< sal_Int16 >( scaleValue( aDesc.Height, UNIT_TWIP, UNIT_REFDEVX ) + 0.5 );
Reference< XFont > xFont = xDevice->getFont( aDesc );
if( xFont.is() )
{
// get maximum width of all digits
sal_Int32 nDigitWidth = 0;
for( sal_Unicode cChar = '0'; cChar <= '9'; ++cChar )
- nDigitWidth = ::std::max( nDigitWidth, scaleToMm100( xFont->getCharWidth( cChar ), UNIT_REFDEVX ) );
+ nDigitWidth = ::std::max( nDigitWidth, scaleToMm100( xFont->getCharWidth( cChar ), UNIT_TWIP ) );
if( nDigitWidth > 0 )
maCoeffs[ UNIT_DIGIT ] = nDigitWidth;
// get width of space character
- sal_Int32 nSpaceWidth = scaleToMm100( xFont->getCharWidth( ' ' ), UNIT_REFDEVX );
+ sal_Int32 nSpaceWidth = scaleToMm100( xFont->getCharWidth( ' ' ), UNIT_TWIP );
if( nSpaceWidth > 0 )
maCoeffs[ UNIT_SPACE ] = nSpaceWidth;
}