summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/ole/axcontrol.cxx3
-rw-r--r--oox/source/token/properties.txt1
-rw-r--r--sd/qa/unit/activex-controls-tests.cxx2
3 files changed, 5 insertions, 1 deletions
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);