diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-03-19 15:08:54 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-03-19 15:08:54 +0000 |
commit | 34f79ccda1c9f1beb1a3bea612e459bad0d38e6e (patch) | |
tree | f7c853fc02f767730730199dadd7479d7f345a63 /sc/source/filter/excel/xepage.cxx | |
parent | d0cd39254b0ba76f171de97fa85e73e7efb6de57 (diff) |
INTEGRATION: CWS sab008 (1.2.68); FILE MERGED
2004/03/08 18:18:27 dr 1.2.68.2: RESYNC: (1.2-1.3); FILE MERGED
2004/03/08 16:47:50 dr 1.2.68.1: #115852# imp/exp of 'scale to width/height'
Diffstat (limited to 'sc/source/filter/excel/xepage.cxx')
-rw-r--r-- | sc/source/filter/excel/xepage.cxx | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx index e67c0b2f1646..d924bd89588c 100644 --- a/sc/source/filter/excel/xepage.cxx +++ b/sc/source/filter/excel/xepage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xepage.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: rt $ $Date: 2004-03-02 09:36:48 $ + * last change: $Author: obo $ $Date: 2004-03-19 16:08:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -295,11 +295,28 @@ XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) : const SvxSizeItem& rSizeItem = GETITEM( rItemSet, SvxSizeItem, ATTR_PAGE_SIZE ); maData.SetScPaperSize( rSizeItem.GetSize(), !rPageItem.IsLandscape() ); - maData.mbFitToPages = ScfTools::CheckItem( rItemSet, ATTR_PAGE_SCALETOPAGES, false ); - if( maData.mbFitToPages ) - maData.mnFitToHeight = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_SCALETOPAGES, sal_uInt16 ); - else - maData.mnScaling = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_SCALE, sal_uInt16 ); + const ScPageScaleToItem& rScaleToItem = GETITEM( rItemSet, ScPageScaleToItem, ATTR_PAGE_SCALETO ); + sal_uInt16 nPages = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_SCALETOPAGES, sal_uInt16 ); + sal_uInt16 nScale = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_SCALE, sal_uInt16 ); + + if( ScfTools::CheckItem( rItemSet, ATTR_PAGE_SCALETO, false ) && rScaleToItem.IsValid() ) + { + maData.mnFitToWidth = rScaleToItem.GetWidth(); + maData.mnFitToHeight = rScaleToItem.GetHeight(); + maData.mbFitToPages = true; + + } + else if( ScfTools::CheckItem( rItemSet, ATTR_PAGE_SCALETOPAGES, false ) && nPages ) + { + maData.mnFitToWidth = 1; + maData.mnFitToHeight = nPages; + maData.mbFitToPages = true; + } + else if( nScale ) + { + maData.mnScaling = nScale; + maData.mbFitToPages = false; + } maData.mpBrushItem.reset( new SvxBrushItem( GETITEM( rItemSet, SvxBrushItem, ATTR_BACKGROUND ) ) ); |