summaryrefslogtreecommitdiff
path: root/vbahelper/source/msforms
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-23 17:27:25 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-23 17:27:25 +0200
commita79c69155ec42ce6817980b6c875f9b39041d2d4 (patch)
tree7f6b3e5061a7784f8486b4abad3eb0d274f74f93 /vbahelper/source/msforms
parent5d2a5e51c932005713f08a7614faeec7730731ea (diff)
vbahelper builds after the m106 merge.
Diffstat (limited to 'vbahelper/source/msforms')
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx33
-rw-r--r--vbahelper/source/msforms/vbaframe.cxx8
-rw-r--r--vbahelper/source/msforms/vbalabel.cxx2
3 files changed, 20 insertions, 23 deletions
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 445fc88713e8..7c19b117b158 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -411,6 +411,18 @@ void SAL_CALL ScVbaControl::setTag( const ::rtl::OUString& aTag )
m_aControlTag = aTag;
}
+::sal_Int32 SAL_CALL ScVbaControl::getForeColor() throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 nForeColor = -1;
+ m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextColor" ) ) ) >>= nForeColor;
+ return OORGBToXLRGB( nForeColor );
+}
+
+void SAL_CALL ScVbaControl::setForeColor( ::sal_Int32 _forecolor ) throw (::com::sun::star::uno::RuntimeException)
+{
+ m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextColor" ) ), uno::makeAny( XLRGBToOORGB( _forecolor ) ) );
+}
+
void ScVbaControl::fireEvent( script::ScriptEvent& evt )
{
uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
@@ -500,7 +512,8 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
xProps->getPropertyValue( sClassId ) >>= nClassId;
uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
- sal_Bool bToggle = sal_False;
+ uno::Reference< drawing::XShape > xShape( xControlShape, uno::UNO_QUERY_THROW );
+ ::std::auto_ptr< ConcreteXShapeGeometryAttributes > xGeoHelper( new ConcreteXShapeGeometryAttributes( xContext, xShape ) );
switch( nClassId )
{
case form::FormComponentType::COMBOBOX:
@@ -512,7 +525,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
case form::FormComponentType::TEXTFIELD:
return new ScVbaTextBox( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
case form::FormComponentType::CHECKBOX:
- return new ScVbaCheckbox( xVbaParent, m_xContext, xControlShape, m_xModel, xGeoHelper.release() );
+ return new ScVbaCheckbox( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
case form::FormComponentType::RADIOBUTTON:
return new ScVbaRadioButton( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
case form::FormComponentType::LISTBOX:
@@ -575,13 +588,13 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
xVBAControl.set( new VbaSystemAXControl( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
// #FIXME implement a page control
else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoPageModel") ) ) )
- xVBAControl.set( new ScVbaControl( xVbaParent, m_xContext, xControl, m_xModel, xGeoHelper.release() ) );
+ xVBAControl.set( new ScVbaControl( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoFrameModel") ) ) )
- xVBAControl.set( new ScVbaFrame( xVbaParent, m_xContext, xControl, m_xModel, xGeoHelper.release() ) );
+ xVBAControl.set( new ScVbaFrame( xVbaParent, xContext, xControl, xModel, xGeoHelper.release(), xDialog ) );
else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlSpinButtonModel") ) ) )
- xVBAControl.set( new ScVbaSpinButton( xVbaParent, m_xContext, xControl, m_xModel, xGeoHelper.release() ) );
+ xVBAControl.set( new ScVbaSpinButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.custom.awt.UnoControlSystemAXContainerModel") ) ) )
- xVBAControl.set( new VbaSystemAXControl( xVbaParent, m_xContext, xControl, m_xModel, xGeoHelper.release() ) );
+ xVBAControl.set( new VbaSystemAXControl( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
if( xVBAControl.is() )
return xVBAControl;
throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control." ), uno::Reference< uno::XInterface >() );
@@ -624,14 +637,6 @@ ControlProviderImpl::createControl( const uno::Reference< drawing::XControlShape
return xControlToReturn;
}
-uno::Reference< msforms::XControl > SAL_CALL
-ControlProviderImpl::createUserformControl( const uno::Reference< awt::XControl >& xControl, const uno::Reference< awt::XControl >& xDialog, const uno::Reference< frame::XModel >& xDocOwner ) throw (uno::RuntimeException)
-{
- uno::Reference< msforms::XControl > xControlToReturn;
- if ( xControl.is() && xDialog.is() )
- xControlToReturn = ScVbaControlFactory::createUserformControl( m_xCtx, xControl, xDialog, xDocOwner, 0.0, 0.0 );
- return xControlToReturn;
-}
namespace controlprovider
{
diff --git a/vbahelper/source/msforms/vbaframe.cxx b/vbahelper/source/msforms/vbaframe.cxx
index f108807a1bfb..7c5f102603e5 100644
--- a/vbahelper/source/msforms/vbaframe.cxx
+++ b/vbahelper/source/msforms/vbaframe.cxx
@@ -69,14 +69,6 @@ sal_Int32 SAL_CALL ScVbaFrame::getSpecialEffect() throw (uno::RuntimeException)
return msforms::fmSpecialEffect::fmSpecialEffectEtched;
}
-void SAL_CALL
-ScVbaFrame::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-{
- rtl::OUString sCaption;
- _value >>= sCaption;
- setCaption( sCaption );
-}
-
::sal_Int32 SAL_CALL ScVbaFrame::getForeColor() throw (::com::sun::star::uno::RuntimeException)
{
return 0;
diff --git a/vbahelper/source/msforms/vbalabel.cxx b/vbahelper/source/msforms/vbalabel.cxx
index a12aa65295cc..4795a25be78c 100644
--- a/vbahelper/source/msforms/vbalabel.cxx
+++ b/vbahelper/source/msforms/vbalabel.cxx
@@ -84,7 +84,7 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaLabel::getFont() throw (uno::R
return new VbaNewFont( this, mxContext, m_xProps );
}
-ScVbaLabel::getServiceImplName()
+rtl::OUString& ScVbaLabel::getServiceImplName()
{
static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaLabel") );
return sImplName;