merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0328-vba-control-api-vis-fix.diff
blobd2867254c3a7eb568351592f0cb1f7e1fd5d0651
1 diff --git vbahelper/source/msforms/vbacontrol.cxx vbahelper/source/msforms/vbacontrol.cxx
2 index 0989548..f51cf56 100644
3 --- vbahelper/source/msforms/vbacontrol.cxx
4 +++ vbahelper/source/msforms/vbacontrol.cxx
5 @@ -189,14 +189,17 @@ void SAL_CALL ScVbaControl::setEnabled( sal_Bool bVisible ) throw (uno::RuntimeE
7 sal_Bool SAL_CALL ScVbaControl::getVisible() throw (uno::RuntimeException)
9 - uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer(), uno::UNO_QUERY_THROW );
10 - return xWindow2->isVisible();
11 + sal_Bool bVisible( sal_True );
12 + m_xProps->getPropertyValue
13 + (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableVisible" ) )) >>= bVisible;
14 + return bVisible;
17 void SAL_CALL ScVbaControl::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
19 - uno::Reference< awt::XWindow2 > xWindow2( getWindowPeer(), uno::UNO_QUERY_THROW );
20 - xWindow2->setVisible( bVisible );
21 + uno::Any aValue( bVisible );
22 + m_xProps->setPropertyValue
23 + (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableVisible" ) ), aValue);
25 double SAL_CALL ScVbaControl::getHeight() throw (uno::RuntimeException)