summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-03-20 15:35:30 +0000
committerNoel Power <noel.power@novell.com>2012-03-20 17:29:19 +0000
commit092d6d9d6f9e6d79dd99d5f502ff39398622c2e1 (patch)
tree5a8959507b19b52681fa146787ada69038fe8ce9 /vbahelper
parentf626ff59b229ce7aec2f2313936133c53d70781f (diff)
add vba support for BackColor, AutoSize, Locked attributes bnc#749960
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/msforms/vbabutton.cxx21
-rw-r--r--vbahelper/source/msforms/vbabutton.hxx2
-rw-r--r--vbahelper/source/msforms/vbacheckbox.cxx29
-rw-r--r--vbahelper/source/msforms/vbacheckbox.hxx6
-rw-r--r--vbahelper/source/msforms/vbacombobox.cxx29
-rw-r--r--vbahelper/source/msforms/vbacombobox.hxx6
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx42
-rw-r--r--vbahelper/source/msforms/vbacontrol.hxx8
-rw-r--r--vbahelper/source/msforms/vbaimage.cxx10
-rw-r--r--vbahelper/source/msforms/vbaimage.hxx2
-rw-r--r--vbahelper/source/msforms/vbalabel.cxx20
-rw-r--r--vbahelper/source/msforms/vbalabel.hxx4
-rw-r--r--vbahelper/source/msforms/vbatextbox.cxx30
-rw-r--r--vbahelper/source/msforms/vbatextbox.hxx7
-rw-r--r--vbahelper/source/msforms/vbatogglebutton.cxx20
-rw-r--r--vbahelper/source/msforms/vbatogglebutton.hxx2
16 files changed, 229 insertions, 9 deletions
diff --git a/vbahelper/source/msforms/vbabutton.cxx b/vbahelper/source/msforms/vbabutton.cxx
index f0763330c8e2..8912b6d0ff9d 100644
--- a/vbahelper/source/msforms/vbabutton.cxx
+++ b/vbahelper/source/msforms/vbabutton.cxx
@@ -55,11 +55,22 @@ ScVbaButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star
sal_Bool SAL_CALL ScVbaButton::getAutoSize() throw (uno::RuntimeException)
{
- return sal_False;
+ return ScVbaControl::getAutoSize();
+}
+
+void SAL_CALL ScVbaButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setAutoSize( bAutoSize );
+}
+
+sal_Bool SAL_CALL ScVbaButton::getLocked() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getLocked();
}
-void SAL_CALL ScVbaButton::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException)
+void SAL_CALL ScVbaButton::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
{
+ ScVbaControl::setLocked( bLocked );
}
sal_Bool SAL_CALL ScVbaButton::getCancel() throw (uno::RuntimeException)
@@ -82,16 +93,16 @@ void SAL_CALL ScVbaButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno::Runti
sal_Int32 SAL_CALL ScVbaButton::getBackColor() throw (uno::RuntimeException)
{
- return 0;
+ return ScVbaControl::getBackColor();
}
-void SAL_CALL ScVbaButton::setBackColor( sal_Int32 /*nBackColor*/ ) throw (uno::RuntimeException)
+void SAL_CALL ScVbaButton::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
{
+ ScVbaControl::setBackColor( nBackColor );
}
sal_Int32 SAL_CALL ScVbaButton::getForeColor() throw (uno::RuntimeException)
{
- return 0;
}
void SAL_CALL ScVbaButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::RuntimeException)
diff --git a/vbahelper/source/msforms/vbabutton.hxx b/vbahelper/source/msforms/vbabutton.hxx
index e999acf26ed4..48bd0994c6d2 100644
--- a/vbahelper/source/msforms/vbabutton.hxx
+++ b/vbahelper/source/msforms/vbabutton.hxx
@@ -52,6 +52,8 @@ public:
virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getForeColor() throw (css::uno::RuntimeException);
virtual void SAL_CALL setForeColor( sal_Int32 nForeColor ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
//XHelperInterface
virtual rtl::OUString& getServiceImplName();
diff --git a/vbahelper/source/msforms/vbacheckbox.cxx b/vbahelper/source/msforms/vbacheckbox.cxx
index 290cdd1a7e33..3d9194360235 100644
--- a/vbahelper/source/msforms/vbacheckbox.cxx
+++ b/vbahelper/source/msforms/vbacheckbox.cxx
@@ -114,4 +114,33 @@ ScVbaCheckbox::getServiceNames()
return aServiceNames;
}
+sal_Int32 SAL_CALL ScVbaCheckbox::getBackColor() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getBackColor();
+}
+
+void SAL_CALL ScVbaCheckbox::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setBackColor( nBackColor );
+}
+
+sal_Bool SAL_CALL ScVbaCheckbox::getAutoSize() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getAutoSize();
+}
+
+void SAL_CALL ScVbaCheckbox::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setAutoSize( bAutoSize );
+}
+
+sal_Bool SAL_CALL ScVbaCheckbox::getLocked() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getLocked();
+}
+
+void SAL_CALL ScVbaCheckbox::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setLocked( bLocked );
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vbahelper/source/msforms/vbacheckbox.hxx b/vbahelper/source/msforms/vbacheckbox.hxx
index e6cc4fe47453..acddeb340ce9 100644
--- a/vbahelper/source/msforms/vbacheckbox.hxx
+++ b/vbahelper/source/msforms/vbacheckbox.hxx
@@ -45,6 +45,12 @@ public:
virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+ virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
// XDefaultProperty
rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
//XHelperInterface
diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx
index d9e95277f278..083b2d34d427 100644
--- a/vbahelper/source/msforms/vbacombobox.cxx
+++ b/vbahelper/source/msforms/vbacombobox.cxx
@@ -278,6 +278,35 @@ ScVbaComboBox::getServiceImplName()
static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaComboBox") );
return sImplName;
}
+sal_Int32 SAL_CALL ScVbaComboBox::getBackColor() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getBackColor();
+}
+
+void SAL_CALL ScVbaComboBox::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setBackColor( nBackColor );
+}
+
+sal_Bool SAL_CALL ScVbaComboBox::getAutoSize() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getAutoSize();
+}
+
+void SAL_CALL ScVbaComboBox::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setAutoSize( bAutoSize );
+}
+
+sal_Bool SAL_CALL ScVbaComboBox::getLocked() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getLocked();
+}
+
+void SAL_CALL ScVbaComboBox::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setLocked( bLocked );
+}
uno::Sequence< rtl::OUString >
ScVbaComboBox::getServiceNames()
diff --git a/vbahelper/source/msforms/vbacombobox.hxx b/vbahelper/source/msforms/vbacombobox.hxx
index e2b1716e4685..ca5c170975cf 100644
--- a/vbahelper/source/msforms/vbacombobox.hxx
+++ b/vbahelper/source/msforms/vbacombobox.hxx
@@ -73,6 +73,12 @@ public:
virtual void SAL_CALL setTextAlign( sal_Int32 nTextAlign ) throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getTextLength() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+ virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
// Methods
virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 195e34e21a05..4a0fdf5c6ad8 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -534,6 +534,8 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
return new ScVbaSpinButton( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
case form::FormComponentType::IMAGECONTROL:
return new ScVbaImage( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
+ case form::FormComponentType::SCROLLBAR:
+ return new ScVbaScrollBar( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
}
throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported control.")), uno::Reference< uno::XInterface >() );
}
@@ -619,6 +621,46 @@ ScVbaControl::getServiceNames()
return aServiceNames;
}
+sal_Int32 nSysCols[] = { 0xC8D0D4, 0x0, 0x6A240A, 0x808080, 0xE4E4E4, 0xFFFFFF, 0x0, 0x0, 0x0, 0xFFFFFF, 0xE4E4E4, 0xE4E4E4, 0x808080, 0x6A240A, 0xFFFFFF, 0xE4E4E4, 0x808080, 0x808080, 0x0, 0xC8D0D4, 0xFFFFFF, 0x404040, 0xE4E4E4, 0x0, 0xE1FFFF };
+
+sal_Int32 ScVbaControl::getBackColor() throw (uno::RuntimeException)
+{
+ sal_Int32 nBackColor = 0;
+ m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= nBackColor;
+ return nBackColor;
+}
+
+void ScVbaControl::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
+{
+ if ( ( nBackColor >= (sal_Int32)0x80000000 ) && ( nBackColor <= (sal_Int32)0x80000018 ) )
+ {
+ nBackColor = nSysCols[ nBackColor - 0x80000000 ];
+ }
+ m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ), uno::makeAny( XLRGBToOORGB( nBackColor ) ) );
+}
+
+sal_Bool ScVbaControl::getAutoSize() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+// currently no implementation for this
+void ScVbaControl::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException)
+{
+}
+
+sal_Bool ScVbaControl::getLocked() throw (uno::RuntimeException)
+{
+ sal_Bool bRes( sal_False );
+ m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ) ) >>= bRes;
+ return bRes;
+}
+
+void ScVbaControl::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
+{
+ m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ), uno::makeAny( bLocked ) );
+}
+
typedef cppu::WeakImplHelper1< XControlProvider > ControlProvider_BASE;
class ControlProviderImpl : public ControlProvider_BASE
{
diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx
index 9076a3e38071..06d61c518b0e 100644
--- a/vbahelper/source/msforms/vbacontrol.hxx
+++ b/vbahelper/source/msforms/vbacontrol.hxx
@@ -114,6 +114,14 @@ public:
//XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ //General helper methods for properties ( may or maynot be relevant for all
+ //controls
+ sal_Int32 getBackColor() throw (css::uno::RuntimeException);
+ void setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException);
+ sal_Bool getAutoSize() throw (css::uno::RuntimeException);
+ void setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
+ sal_Bool getLocked() throw (css::uno::RuntimeException);
+ void setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
};
diff --git a/vbahelper/source/msforms/vbaimage.cxx b/vbahelper/source/msforms/vbaimage.cxx
index 08a3007d5714..7dfc64f1ef44 100644
--- a/vbahelper/source/msforms/vbaimage.cxx
+++ b/vbahelper/source/msforms/vbaimage.cxx
@@ -56,4 +56,14 @@ ScVbaImage::getServiceNames()
return aServiceNames;
}
+sal_Int32 SAL_CALL ScVbaImage::getBackColor() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getBackColor();
+}
+
+void SAL_CALL ScVbaImage::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setBackColor( nBackColor );
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vbahelper/source/msforms/vbaimage.hxx b/vbahelper/source/msforms/vbaimage.hxx
index e360fe4f67b1..cd5e1bb8b9c4 100644
--- a/vbahelper/source/msforms/vbaimage.hxx
+++ b/vbahelper/source/msforms/vbaimage.hxx
@@ -39,6 +39,8 @@ class ScVbaImage : public ImageImpl_BASE
{
public:
ScVbaImage( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
+ virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException);
//XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
diff --git a/vbahelper/source/msforms/vbalabel.cxx b/vbahelper/source/msforms/vbalabel.cxx
index 4795a25be78c..860c09092a83 100644
--- a/vbahelper/source/msforms/vbalabel.cxx
+++ b/vbahelper/source/msforms/vbalabel.cxx
@@ -90,6 +90,26 @@ rtl::OUString& ScVbaLabel::getServiceImplName()
return sImplName;
}
+sal_Int32 SAL_CALL ScVbaLabel::getBackColor() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getBackColor();
+}
+
+void SAL_CALL ScVbaLabel::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setBackColor( nBackColor );
+}
+
+sal_Bool SAL_CALL ScVbaLabel::getAutoSize() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getAutoSize();
+}
+
+void SAL_CALL ScVbaLabel::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setAutoSize( bAutoSize );
+}
+
uno::Sequence< rtl::OUString >
ScVbaLabel::getServiceNames()
{
diff --git a/vbahelper/source/msforms/vbalabel.hxx b/vbahelper/source/msforms/vbalabel.hxx
index 1166f045e6ac..611ae0eb6273 100644
--- a/vbahelper/source/msforms/vbalabel.hxx
+++ b/vbahelper/source/msforms/vbalabel.hxx
@@ -48,6 +48,10 @@ public:
virtual rtl::OUString SAL_CALL getAccelerator() throw (css::uno::RuntimeException);
virtual void SAL_CALL setAccelerator( const rtl::OUString& _accelerator ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+ virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
//XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
diff --git a/vbahelper/source/msforms/vbatextbox.cxx b/vbahelper/source/msforms/vbatextbox.cxx
index 39861b9a75b6..8ba140719f88 100644
--- a/vbahelper/source/msforms/vbatextbox.cxx
+++ b/vbahelper/source/msforms/vbatextbox.cxx
@@ -152,6 +152,36 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaTextBox::getFont() throw (uno:
return new VbaNewFont( this, mxContext, m_xProps );
}
+sal_Int32 SAL_CALL ScVbaTextBox::getBackColor() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getBackColor();
+}
+
+void SAL_CALL ScVbaTextBox::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setBackColor( nBackColor );
+}
+
+sal_Bool SAL_CALL ScVbaTextBox::getAutoSize() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getAutoSize();
+}
+
+void SAL_CALL ScVbaTextBox::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setAutoSize( bAutoSize );
+}
+
+sal_Bool SAL_CALL ScVbaTextBox::getLocked() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getLocked();
+}
+
+void SAL_CALL ScVbaTextBox::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setLocked( bLocked );
+}
+
rtl::OUString&
ScVbaTextBox::getServiceImplName()
{
diff --git a/vbahelper/source/msforms/vbatextbox.hxx b/vbahelper/source/msforms/vbatextbox.hxx
index bdbff16439ea..25b3a047c0ac 100644
--- a/vbahelper/source/msforms/vbatextbox.hxx
+++ b/vbahelper/source/msforms/vbatextbox.hxx
@@ -54,6 +54,13 @@ public:
virtual void SAL_CALL setBorderStyle( sal_Int32 nBorderStyle ) throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getTextLength() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+ virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
+
// XDefaultProperty
rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
//XHelperInterface
diff --git a/vbahelper/source/msforms/vbatogglebutton.cxx b/vbahelper/source/msforms/vbatogglebutton.cxx
index b989616a8574..0e2b056259b9 100644
--- a/vbahelper/source/msforms/vbatogglebutton.cxx
+++ b/vbahelper/source/msforms/vbatogglebutton.cxx
@@ -99,11 +99,12 @@ ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExcepti
sal_Bool SAL_CALL ScVbaToggleButton::getAutoSize() throw (uno::RuntimeException)
{
- return sal_False;
+ return ScVbaControl::getAutoSize();
}
-void SAL_CALL ScVbaToggleButton::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException)
+void SAL_CALL ScVbaToggleButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
{
+ ScVbaControl::setAutoSize( bAutoSize );
}
sal_Bool SAL_CALL ScVbaToggleButton::getCancel() throw (uno::RuntimeException)
@@ -126,11 +127,12 @@ void SAL_CALL ScVbaToggleButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno:
sal_Int32 SAL_CALL ScVbaToggleButton::getBackColor() throw (uno::RuntimeException)
{
- return 0;
+ return ScVbaControl::getBackColor();
}
-void SAL_CALL ScVbaToggleButton::setBackColor( sal_Int32 /*nBackColor*/ ) throw (uno::RuntimeException)
+void SAL_CALL ScVbaToggleButton::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
{
+ ScVbaControl::setBackColor( nBackColor );
}
sal_Int32 SAL_CALL ScVbaToggleButton::getForeColor() throw (uno::RuntimeException)
@@ -147,6 +149,16 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaToggleButton::getFont() throw
return new VbaNewFont( this, mxContext, m_xProps );
}
+sal_Bool SAL_CALL ScVbaToggleButton::getLocked() throw (uno::RuntimeException)
+{
+ return ScVbaControl::getLocked();
+}
+
+void SAL_CALL ScVbaToggleButton::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
+{
+ ScVbaControl::setLocked( bLocked );
+}
+
rtl::OUString&
ScVbaToggleButton::getServiceImplName()
{
diff --git a/vbahelper/source/msforms/vbatogglebutton.hxx b/vbahelper/source/msforms/vbatogglebutton.hxx
index 6e8a0cb28e18..7394bea6fa25 100644
--- a/vbahelper/source/msforms/vbatogglebutton.hxx
+++ b/vbahelper/source/msforms/vbatogglebutton.hxx
@@ -56,6 +56,8 @@ public:
virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getForeColor() throw (css::uno::RuntimeException);
virtual void SAL_CALL setForeColor( sal_Int32 nForeColor ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
//XHelperInterface
virtual rtl::OUString& getServiceImplName();