oox/source/ole/axcontrol.cxx | 3 +++ oox/source/token/properties.txt | 1 + sd/qa/unit/activex-controls-tests.cxx | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-)
New commits: commit 7d11a1e1f0a282c73204af47e8dfcb767295d597 Author: brian houston morrow <b...@brianmorrow.net> Date: Wed Jan 24 00:24:17 2018 -0600 tdf#111417 Import read only property on ActiveX text box Change-Id: I45d933ef308fbad31695cfc9f668eced4cd8e1f1 Reviewed-on: https://gerrit.libreoffice.org/48872 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index db456b58f01d..9d5f4c5d27f2 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -1770,6 +1770,7 @@ void AxTextBoxModel::convertProperties( PropertyMap& rPropMap, const ControlConv { rPropMap.setProperty( PROP_MultiLine, getFlag( mnFlags, AX_FLAGS_MULTILINE ) ); rPropMap.setProperty( PROP_HideInactiveSelection, getFlag( mnFlags, AX_FLAGS_HIDESELECTION ) ); + rPropMap.setProperty( PROP_ReadOnly, getFlag( mnFlags, AX_FLAGS_LOCKED ) ); rPropMap.setProperty( mbAwtModel ? PROP_Text : PROP_DefaultText, maValue ); rPropMap.setProperty( PROP_MaxTextLen, getLimitedValue< sal_Int16, sal_Int32 >( mnMaxLength, 0, SAL_MAX_INT16 ) ); if( (0 < mnPasswordChar) && (mnPasswordChar <= SAL_MAX_INT16) ) @@ -1788,6 +1789,8 @@ void AxTextBoxModel::convertFromProperties( PropertySet& rPropSet, const Control setFlag( mnFlags, AX_FLAGS_WORDWRAP, bRes ); if ( rPropSet.getProperty( bRes, PROP_HideInactiveSelection ) ) setFlag( mnFlags, AX_FLAGS_HIDESELECTION, bRes ); + if ( rPropSet.getProperty( bRes, PROP_ReadOnly ) ) + setFlag( mnFlags, AX_FLAGS_LOCKED, bRes ); rPropSet.getProperty( maValue, ( mbAwtModel ? PROP_Text : PROP_DefaultText ) ); if (maValue.isEmpty() && !mbAwtModel) // No default value? Then try exporting the current one. diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 5c79a83ed756..fabb7383a891 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -389,6 +389,7 @@ RangeXMaximum RangeXMinimum RangeYMaximum RangeYMinimum +ReadOnly RefAngle RefR RefX diff --git a/sd/qa/unit/activex-controls-tests.cxx b/sd/qa/unit/activex-controls-tests.cxx index ce6533bf95dc..c48993e9f61a 100644 --- a/sd/qa/unit/activex-controls-tests.cxx +++ b/sd/qa/unit/activex-controls-tests.cxx @@ -299,7 +299,7 @@ void SdActiveXControlsTest::testTextBoxProperties() CPPUNIT_ASSERT_EQUAL(false, bVScroll); xPropertySet->getPropertyValue("ReadOnly") >>= bReadOnly; - CPPUNIT_ASSERT_EQUAL(false, bReadOnly); //Bugous, should be true (tdf#111417) + CPPUNIT_ASSERT_EQUAL(true, bReadOnly); // Third shape has some other custom properties xControlShape.set(getShapeFromPage(2, 0, xDocShRef), uno::UNO_QUERY_THROW); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits