diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2018-07-17 10:06:27 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-08-10 01:20:43 -0700 |
commit | 3ffca217ac7f66eddf3f88444d33241a635e60f3 (patch) | |
tree | 6795cfdc16183bb91656399db787c5aeafa41729 /oox/source | |
parent | 0e94d8392fa18d7e99224c17d3b0186187cdfe3c (diff) |
tdf#118651 OOXML ActiveX textbox: fix multiline support
of textfield component in DOCX/PPTX by handling properties
AX_FLAGS_MULTILINE and AX_FLAGS_WORDWRAP during the import
and export. Both of them need to be enabled to get multiline
textfield in MSO, but LibreOffice has got only one multiline
property. With this fix, LibreOffice imports only really
multiline textfields as multiline, and it doesn't export
multiline textfields as single line anymore.
Change-Id: I9b567c3fcdc5d01a5838a3ec2517579f8d788954
Reviewed-on: https://gerrit.libreoffice.org/57552
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-on: https://gerrit.libreoffice.org/57619
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit 076cb54472d5bba8916df9ee50074ac74433d694)
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/ole/axcontrol.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index a697fddfe33c..1e1b249e1bc7 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -1768,7 +1768,10 @@ ApiControlType AxTextBoxModel::getControlType() const void AxTextBoxModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const { - rPropMap.setProperty( PROP_MultiLine, getFlag( mnFlags, AX_FLAGS_MULTILINE ) ); + if (getFlag( mnFlags, AX_FLAGS_MULTILINE ) && getFlag( mnFlags, AX_FLAGS_WORDWRAP )) + rPropMap.setProperty( PROP_MultiLine, true ); + else + rPropMap.setProperty( PROP_MultiLine, false ); rPropMap.setProperty( PROP_HideInactiveSelection, getFlag( mnFlags, AX_FLAGS_HIDESELECTION ) ); rPropMap.setProperty( mbAwtModel ? PROP_Text : PROP_DefaultText, maValue ); rPropMap.setProperty( PROP_MaxTextLen, getLimitedValue< sal_Int16, sal_Int32 >( mnMaxLength, 0, SAL_MAX_INT16 ) ); @@ -1784,8 +1787,10 @@ void AxTextBoxModel::convertProperties( PropertyMap& rPropMap, const ControlConv void AxTextBoxModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) { bool bRes = false; - if ( rPropSet.getProperty( bRes, PROP_MultiLine ) ) + if ( rPropSet.getProperty( bRes, PROP_MultiLine ) ) { setFlag( mnFlags, AX_FLAGS_WORDWRAP, bRes ); + setFlag( mnFlags, AX_FLAGS_MULTILINE, bRes ); + } if ( rPropSet.getProperty( bRes, PROP_HideInactiveSelection ) ) setFlag( mnFlags, AX_FLAGS_HIDESELECTION, bRes ); rPropSet.getProperty( maValue, ( mbAwtModel ? PROP_Text : PROP_DefaultText ) ); |