diff options
author | Noel Power <noel.power@suse.com> | 2012-09-06 18:36:00 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2012-09-11 16:04:11 +0100 |
commit | 27a19817c6271b76013aa6bda5c3353c8a9dd35b (patch) | |
tree | 75c939b2695447a0915706a508a979f73865f1d2 /oox/source | |
parent | 5dc19680cd27d4eaea5f2f7fdc48969f704e696a (diff) |
some more tweaking to import scrollbar data for mso Frame & Userform
also removed printf(s)
Change-Id: If83565dcd97b276e1f6a8488a9f1d23066c2a9ff
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/ole/axcontrol.cxx | 16 | ||||
-rw-r--r-- | oox/source/token/properties.txt | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index d776893e5842..89570b933a0e 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -316,6 +316,20 @@ void ControlConverter::convertVerticalAlign( PropertyMap& rPropMap, sal_Int32 nV rPropMap.setProperty( PROP_VerticalAlign, eAlign ); } +void ControlConverter::convertScrollabilitySettings( PropertyMap& rPropMap, + const AxPairData& rScrollPos, const AxPairData& rScrollArea, + sal_Int32 nScrollBars ) const +{ + Size tmpSize = mrGraphicHelper.convertHmmToAppFont( Size( rScrollArea.first, rScrollArea.second ) ); + Point tmpPos = mrGraphicHelper.convertHmmToAppFont( Point( rScrollPos.first, rScrollPos.second ) ); + rPropMap.setProperty( PROP_ScrollHeight, tmpSize.Height ); + rPropMap.setProperty( PROP_ScrollWidth, tmpSize.Width ); + rPropMap.setProperty( PROP_ScrollTop, tmpPos.Y ); + rPropMap.setProperty( PROP_ScrollLeft, tmpPos.X ); + rPropMap.setProperty( PROP_HScroll, ( nScrollBars & 0x1 ) == 0x1 ); + rPropMap.setProperty( PROP_VScroll, ( nScrollBars & 0x2 ) == 0x2 ); +} + void ControlConverter::convertScrollBar( PropertyMap& rPropMap, sal_Int32 nMin, sal_Int32 nMax, sal_Int32 nPosition, sal_Int32 nSmallChange, sal_Int32 nLargeChange, bool bAwtModel ) const @@ -2431,6 +2445,7 @@ void AxFrameModel::convertProperties( PropertyMap& rPropMap, const ControlConver { rPropMap.setProperty( PROP_Label, maCaption ); rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_CONTAINER_ENABLED ) ); + rConv.convertScrollabilitySettings( rPropMap, maScrollPos, maLogicalSize, mnScrollBars ); AxContainerModelBase::convertProperties( rPropMap, rConv ); } @@ -2493,6 +2508,7 @@ void AxUserFormModel::convertProperties( PropertyMap& rPropMap, const ControlCon rPropMap.setProperty( PROP_Title, maCaption ); rConv.convertColor( rPropMap, PROP_BackgroundColor, mnBackColor ); rConv.convertAxPicture( rPropMap, maPictureData, AX_PICPOS_CENTER ); + rConv.convertScrollabilitySettings( rPropMap, maScrollPos, maLogicalSize, mnScrollBars ); AxContainerModelBase::convertProperties( rPropMap, rConv ); } diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 596bf826bba3..5c917e9d7f29 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -394,9 +394,13 @@ ScaleMode ScaleToPages ScaleToPagesX ScaleToPagesY +ScrollHeight +ScrollLeft +ScrollTop ScrollValue ScrollValueMax ScrollValueMin +ScrollWidth Segments SelectedItems SelectedPage |