summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2014-04-06 17:05:12 +0200
committerThomas Arnhold <thomas@arnhold.org>2014-04-14 12:31:54 +0200
commit18c7992d7ff66e796f18eeeb44b62a78f74f820a (patch)
tree887ac017cdd3863db56384a2beb470a974a5b224 /vbahelper
parent532b69fbc4e4a5fe7aac57bf997aecb2ec65889e (diff)
no need for those static strings
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/msforms/vbabutton.cxx6
-rw-r--r--vbahelper/source/msforms/vbacheckbox.cxx13
-rw-r--r--vbahelper/source/msforms/vbacombobox.cxx12
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx3
-rw-r--r--vbahelper/source/msforms/vbaframe.cxx7
-rw-r--r--vbahelper/source/msforms/vbalabel.cxx6
-rw-r--r--vbahelper/source/msforms/vbalistbox.cxx25
-rw-r--r--vbahelper/source/msforms/vbalistcontrolhelper.cxx18
-rw-r--r--vbahelper/source/msforms/vbaradiobutton.cxx13
-rw-r--r--vbahelper/source/msforms/vbascrollbar.cxx28
-rw-r--r--vbahelper/source/msforms/vbaspinbutton.cxx18
-rw-r--r--vbahelper/source/msforms/vbatogglebutton.cxx14
12 files changed, 62 insertions, 101 deletions
diff --git a/vbahelper/source/msforms/vbabutton.cxx b/vbahelper/source/msforms/vbabutton.cxx
index 9eeb943407ef..522082280d63 100644
--- a/vbahelper/source/msforms/vbabutton.cxx
+++ b/vbahelper/source/msforms/vbabutton.cxx
@@ -23,8 +23,6 @@
using namespace com::sun::star;
using namespace ooo::vba;
-
-const static OUString LABEL( "Label" );
VbaButton::VbaButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
}
@@ -34,14 +32,14 @@ OUString SAL_CALL
VbaButton::getCaption() throw (css::uno::RuntimeException, std::exception)
{
OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
+ m_xProps->getPropertyValue( "Label" ) >>= Label;
return Label;
}
void SAL_CALL
VbaButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ m_xProps->setPropertyValue( "Label", uno::makeAny( _caption ) );
}
sal_Bool SAL_CALL VbaButton::getAutoSize() throw (uno::RuntimeException, std::exception)
diff --git a/vbahelper/source/msforms/vbacheckbox.cxx b/vbahelper/source/msforms/vbacheckbox.cxx
index 577ad0322654..37c57d0881d4 100644
--- a/vbahelper/source/msforms/vbacheckbox.cxx
+++ b/vbahelper/source/msforms/vbacheckbox.cxx
@@ -24,9 +24,6 @@
using namespace com::sun::star;
using namespace ooo::vba;
-
-const static OUString LABEL( "Label" );
-const static OUString STATE( "State" );
ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : CheckBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
}
@@ -36,21 +33,21 @@ OUString SAL_CALL
ScVbaCheckbox::getCaption() throw (css::uno::RuntimeException, std::exception)
{
OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
+ m_xProps->getPropertyValue( "Label" ) >>= Label;
return Label;
}
void SAL_CALL
ScVbaCheckbox::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ m_xProps->setPropertyValue( "Label", uno::makeAny( _caption ) );
}
uno::Any SAL_CALL
ScVbaCheckbox::getValue() throw (css::uno::RuntimeException, std::exception)
{
sal_Int16 nValue = -1;
- m_xProps->getPropertyValue( STATE ) >>= nValue;
+ m_xProps->getPropertyValue( "State" ) >>= nValue;
if( nValue != 0 )
nValue = -1;
// return uno::makeAny( nValue );
@@ -64,7 +61,7 @@ ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeExcept
{
sal_Int16 nValue = 0;
sal_Int16 nOldValue = 0;
- m_xProps->getPropertyValue( STATE ) >>= nOldValue;
+ m_xProps->getPropertyValue( "State" ) >>= nOldValue;
if( !( _value >>= nValue ) )
{
sal_Bool bValue = false;
@@ -75,7 +72,7 @@ ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeExcept
if( nValue == -1)
nValue = 1;
- m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
+ m_xProps->setPropertyValue( "State", uno::makeAny( nValue ) );
if ( nValue != nOldValue )
fireClickEvent();
}
diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx
index 695f3fe9a1f2..8ac4affd6c17 100644
--- a/vbahelper/source/msforms/vbacombobox.cxx
+++ b/vbahelper/source/msforms/vbacombobox.cxx
@@ -37,17 +37,13 @@ using namespace ooo::vba;
//SelectedItems list of integer indexes
//StringItemList list of items
-const static OUString TEXT( "Text" );
-const static OUString ITEMS( "StringItemList" );
-const static OUString CONTROLSOURCEPROP( "DataFieldProperty" );
-
ScVbaComboBox::ScVbaComboBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ComboBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
mpListHelper.reset( new ListControlHelper( m_xProps ) );
try
{
// grab the default value property name
- m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
+ m_xProps->getPropertyValue( "DataFieldProperty" ) >>= sSourceName;
}
catch( uno::Exception& )
{
@@ -76,11 +72,11 @@ ScVbaComboBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeExcepti
sal_Int32 nOldIndex = -1;
getListIndex() >>= nOldIndex;
uno::Sequence< OUString > sItems;
- m_xProps->getPropertyValue( ITEMS ) >>= sItems;
+ m_xProps->getPropertyValue( "StringItemList" ) >>= sItems;
if( ( nIndex >= 0 ) && ( sItems.getLength() > nIndex ) )
{
OUString sText = sItems[ nIndex ];
- m_xProps->setPropertyValue( TEXT, uno::makeAny( sText ) );
+ m_xProps->setPropertyValue( "Text", uno::makeAny( sText ) );
// fire the _Change event
if( nOldIndex != nIndex )
@@ -93,7 +89,7 @@ uno::Any SAL_CALL
ScVbaComboBox::getListIndex() throw (uno::RuntimeException, std::exception)
{
uno::Sequence< OUString > sItems;
- m_xProps->getPropertyValue( ITEMS ) >>= sItems;
+ m_xProps->getPropertyValue( "StringItemList" ) >>= sItems;
// should really return the item that has focus regardless of
// it been selected
if ( sItems.getLength() > 0 )
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index fdcfedcc14b8..6b8ac3a84d21 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -608,8 +608,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
{
uno::Reference< beans::XPropertySet > xProps( xControlShape->getControl(), uno::UNO_QUERY_THROW );
sal_Int32 nClassId = -1;
- const static OUString sClassId( "ClassId" );
- xProps->getPropertyValue( sClassId ) >>= nClassId;
+ xProps->getPropertyValue( "ClassId" ) >>= nClassId;
uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
uno::Reference< drawing::XShape > xShape( xControlShape, uno::UNO_QUERY_THROW );
::std::auto_ptr< ConcreteXShapeGeometryAttributes > xGeoHelper( new ConcreteXShapeGeometryAttributes( xContext, xShape ) );
diff --git a/vbahelper/source/msforms/vbaframe.cxx b/vbahelper/source/msforms/vbaframe.cxx
index 012ffb88b627..0047fdd9cd05 100644
--- a/vbahelper/source/msforms/vbaframe.cxx
+++ b/vbahelper/source/msforms/vbaframe.cxx
@@ -26,9 +26,6 @@
using namespace com::sun::star;
using namespace ooo::vba;
-
-const static OUString LABEL( "Label" );
-
ScVbaFrame::ScVbaFrame(
const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext,
@@ -46,13 +43,13 @@ ScVbaFrame::ScVbaFrame(
OUString SAL_CALL ScVbaFrame::getCaption() throw (css::uno::RuntimeException, std::exception)
{
OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
+ m_xProps->getPropertyValue( "Label" ) >>= Label;
return Label;
}
void SAL_CALL ScVbaFrame::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ m_xProps->setPropertyValue( "Label", uno::makeAny( _caption ) );
}
sal_Int32 SAL_CALL ScVbaFrame::getSpecialEffect() throw (uno::RuntimeException, std::exception)
diff --git a/vbahelper/source/msforms/vbalabel.cxx b/vbahelper/source/msforms/vbalabel.cxx
index 71c1bb2bff26..ce943e7b60ff 100644
--- a/vbahelper/source/msforms/vbalabel.cxx
+++ b/vbahelper/source/msforms/vbalabel.cxx
@@ -23,8 +23,6 @@
using namespace com::sun::star;
using namespace ooo::vba;
-
-const static OUString LABEL( "Label" );
ScVbaLabel::ScVbaLabel( const css::uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
}
@@ -34,14 +32,14 @@ OUString SAL_CALL
ScVbaLabel::getCaption() throw (css::uno::RuntimeException, std::exception)
{
OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
+ m_xProps->getPropertyValue( "Label" ) >>= Label;
return Label;
}
void SAL_CALL
ScVbaLabel::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ m_xProps->setPropertyValue( "Label", uno::makeAny( _caption ) );
}
uno::Any SAL_CALL
ScVbaLabel::getValue() throw (css::uno::RuntimeException, std::exception)
diff --git a/vbahelper/source/msforms/vbalistbox.cxx b/vbahelper/source/msforms/vbalistbox.cxx
index aaa0fbac20d3..5f9f2cef1169 100644
--- a/vbahelper/source/msforms/vbalistbox.cxx
+++ b/vbahelper/source/msforms/vbalistbox.cxx
@@ -27,11 +27,6 @@
using namespace com::sun::star;
using namespace ooo::vba;
-const static OUString TEXT( "Text" );
-const static OUString SELECTEDITEMS( "SelectedItems" );
-const static OUString ITEMS( "StringItemList" );
-
-
ScVbaListBox::ScVbaListBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper )
: ListBoxImpl_BASE(xParent, xContext, xControl, xModel, pGeomHelper)
, m_nIndex(0)
@@ -53,7 +48,7 @@ uno::Any SAL_CALL
ScVbaListBox::getListIndex() throw (uno::RuntimeException, std::exception)
{
uno::Sequence< sal_Int16 > sSelection;
- m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
+ m_xProps->getPropertyValue( "SelectedItems" ) >>= sSelection;
if ( sSelection.getLength() == 0 )
return uno::Any( sal_Int32( -1 ) );
return uno::Any( sSelection[ 0 ] );
@@ -64,8 +59,8 @@ ScVbaListBox::getValue() throw (uno::RuntimeException, std::exception)
{
uno::Sequence< sal_Int16 > sSelection;
uno::Sequence< OUString > sItems;
- m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
- m_xProps->getPropertyValue( ITEMS ) >>= sItems;
+ m_xProps->getPropertyValue( "SelectedItems" ) >>= sSelection;
+ m_xProps->getPropertyValue( "StringItemList" ) >>= sItems;
if( getMultiSelect() )
throw uno::RuntimeException( "Attribute use invalid." , uno::Reference< uno::XInterface >() );
uno::Any aRet;
@@ -83,7 +78,7 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException, s
}
OUString sValue = getAnyAsString( _value );
uno::Sequence< OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
+ m_xProps->getPropertyValue( "StringItemList" ) >>= sList;
sal_Int16 nLength = static_cast<sal_Int16>( sList.getLength() );
sal_Int16 nValue = -1;
sal_Int16 i = 0;
@@ -100,9 +95,9 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException, s
uno::Sequence< sal_Int16 > nSelectedIndices(1);
uno::Sequence< sal_Int16 > nOldSelectedIndices;
- m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nOldSelectedIndices;
+ m_xProps->getPropertyValue( "SelectedItems" ) >>= nOldSelectedIndices;
nSelectedIndices[ 0 ] = nValue;
- m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nSelectedIndices ) );
+ m_xProps->setPropertyValue( "SelectedItems", uno::makeAny( nSelectedIndices ) );
if ( nSelectedIndices != nOldSelectedIndices )
fireClickEvent();
}
@@ -155,7 +150,7 @@ css::uno::Any SAL_CALL
ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException, std::exception)
{
uno::Sequence< OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
+ m_xProps->getPropertyValue( "StringItemList" ) >>= sList;
sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() );
// no choice but to do a horror cast as internally
// the indices are but sal_Int16
@@ -196,7 +191,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
if( !(value >>= bValue) )
throw uno::RuntimeException( "Invalid type\n. need boolean." , uno::Reference< uno::XInterface >() );
uno::Sequence< sal_Int16 > nList;
- m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nList;
+ m_xProps->getPropertyValue( "SelectedItems" ) >>= nList;
sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() );
sal_Int16 nIndex = m_nIndex;
for( sal_Int16 i = 0; i < nLength; i++ )
@@ -214,7 +209,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
nList.realloc( nLength - 1 );
//m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
fireClickEvent();
- m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nList ) );
+ m_xProps->setPropertyValue( "SelectedItems", uno::makeAny( nList ) );
return;
}
}
@@ -233,7 +228,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
}
//m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
fireClickEvent();
- m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nList ) );
+ m_xProps->setPropertyValue( "SelectedItems", uno::makeAny( nList ) );
}
}
diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.cxx b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
index 5df03ad76f04..c00cd6b6e11c 100644
--- a/vbahelper/source/msforms/vbalistcontrolhelper.cxx
+++ b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
@@ -24,8 +24,6 @@
using namespace com::sun::star;
using namespace ooo::vba;
-const static OUString ITEMS( "StringItemList" );
-
class ListPropListener : public PropListener
{
private:
@@ -49,13 +47,13 @@ void ListPropListener::setValueEvent( const uno::Any& value )
if( m_pvargIndex.hasValue() || m_pvarColumn.hasValue() )
throw uno::RuntimeException( "Bad argument" , uno::Reference< uno::XInterface >() );
- m_xProps->setPropertyValue( ITEMS, value );
+ m_xProps->setPropertyValue( "StringItemList", value );
}
uno::Any ListPropListener::getValueEvent()
{
uno::Sequence< OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
+ m_xProps->getPropertyValue( "StringItemList" ) >>= sList;
sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() );
uno::Any aRet;
if ( m_pvargIndex.hasValue() )
@@ -87,7 +85,7 @@ ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargInde
if ( pvargItem.hasValue() )
{
uno::Sequence< OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
+ m_xProps->getPropertyValue( "StringItemList" ) >>= sList;
sal_Int32 nIndex = sList.getLength();
@@ -131,7 +129,7 @@ ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargInde
}
- m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
+ m_xProps->setPropertyValue( "StringItemList", uno::makeAny( sList ) );
}
}
@@ -144,7 +142,7 @@ ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeExcept
if ( index >>= nIndex )
{
uno::Sequence< OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
+ m_xProps->getPropertyValue( "StringItemList" ) >>= sList;
if( nIndex < 0 || nIndex > ( sList.getLength() - 1 ) )
throw uno::RuntimeException( "Invalid index" , uno::Reference< uno::XInterface > () );
if( sList.hasElements() )
@@ -161,7 +159,7 @@ ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeExcept
sList.realloc( sList.getLength() - 1 );
}
- m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
+ m_xProps->setPropertyValue( "StringItemList", uno::makeAny( sList ) );
}
}
@@ -170,7 +168,7 @@ ListControlHelper::Clear( ) throw (uno::RuntimeException)
{
// urk, setValue doesn't seem to work !!
//setValue( uno::makeAny( sal_Int16() ) );
- m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< OUString >() ) );
+ m_xProps->setPropertyValue( "StringItemList", uno::makeAny( uno::Sequence< OUString >() ) );
}
void SAL_CALL
@@ -184,7 +182,7 @@ sal_Int32 SAL_CALL
ListControlHelper::getListCount() throw (uno::RuntimeException)
{
uno::Sequence< OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
+ m_xProps->getPropertyValue( "StringItemList" ) >>= sList;
return sList.getLength();
}
diff --git a/vbahelper/source/msforms/vbaradiobutton.cxx b/vbahelper/source/msforms/vbaradiobutton.cxx
index 6c10827d8b4c..a55c55e3dc6a 100644
--- a/vbahelper/source/msforms/vbaradiobutton.cxx
+++ b/vbahelper/source/msforms/vbaradiobutton.cxx
@@ -23,9 +23,6 @@
using namespace com::sun::star;
using namespace ooo::vba;
-
-const static OUString LABEL( "Label" );
-const static OUString STATE( "State" );
ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : RadioButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
}
@@ -35,21 +32,21 @@ OUString SAL_CALL
ScVbaRadioButton::getCaption() throw (css::uno::RuntimeException, std::exception)
{
OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
+ m_xProps->getPropertyValue( "Label" ) >>= Label;
return Label;
}
void SAL_CALL
ScVbaRadioButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ m_xProps->setPropertyValue( "Label", uno::makeAny( _caption ) );
}
uno::Any SAL_CALL
ScVbaRadioButton::getValue() throw (css::uno::RuntimeException, std::exception)
{
sal_Int16 nValue = -1;
- m_xProps->getPropertyValue( STATE ) >>= nValue;
+ m_xProps->getPropertyValue( "State" ) >>= nValue;
if( nValue != 0 )
nValue = -1;
// return uno::makeAny( nValue );
@@ -64,7 +61,7 @@ ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExceptio
{
sal_Int16 nValue = 0;
sal_Int16 nOldValue = 0;
- m_xProps->getPropertyValue( STATE ) >>= nOldValue;
+ m_xProps->getPropertyValue( "State" ) >>= nOldValue;
if( !( _value >>= nValue ) )
{
@@ -76,7 +73,7 @@ ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExceptio
if( nValue == -1)
nValue = 1;
- m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
+ m_xProps->setPropertyValue( "State", uno::makeAny( nValue ) );
if ( nValue != nOldValue )
{
fireChangeEvent();
diff --git a/vbahelper/source/msforms/vbascrollbar.cxx b/vbahelper/source/msforms/vbascrollbar.cxx
index 43d7a3a83a48..6379cefa2eef 100644
--- a/vbahelper/source/msforms/vbascrollbar.cxx
+++ b/vbahelper/source/msforms/vbascrollbar.cxx
@@ -16,19 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
#include "vbascrollbar.hxx"
#include <vector>
using namespace com::sun::star;
using namespace ooo::vba;
-
-const static OUString LARGECHANGE( "BlockIncrement");
-const static OUString SMALLCHANGE( "LineIncrement");
-const static OUString SCROLLVALUE( "ScrollValue");
-const static OUString SCROLLMAX( "ScrollValueMax");
-const static OUString SCROLLMIN( "ScrollValueMin");
-
ScVbaScrollBar::ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ScrollBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
}
@@ -37,54 +31,54 @@ ScVbaScrollBar::ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface
uno::Any SAL_CALL
ScVbaScrollBar::getValue() throw (css::uno::RuntimeException, std::exception)
{
- return m_xProps->getPropertyValue( SCROLLVALUE );
+ return m_xProps->getPropertyValue( "ScrollValue" );
}
void SAL_CALL
ScVbaScrollBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( SCROLLVALUE, _value );
+ m_xProps->setPropertyValue( "ScrollValue", _value );
}
::sal_Int32 SAL_CALL
ScVbaScrollBar::getMax() throw (uno::RuntimeException, std::exception)
{
sal_Int32 nMax = 0;
- m_xProps->getPropertyValue( SCROLLMAX ) >>= nMax;
+ m_xProps->getPropertyValue( "ScrollValueMax" ) >>= nMax;
return nMax;
}
void SAL_CALL
ScVbaScrollBar::setMax( sal_Int32 nVal ) throw (uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( SCROLLMAX, uno::makeAny( nVal ) );
+ m_xProps->setPropertyValue( "ScrollValueMax", uno::makeAny( nVal ) );
}
::sal_Int32 SAL_CALL
ScVbaScrollBar::getMin() throw (uno::RuntimeException, std::exception)
{
sal_Int32 nVal = 0;
- m_xProps->getPropertyValue( SCROLLMIN ) >>= nVal;
+ m_xProps->getPropertyValue( "ScrollValueMin" ) >>= nVal;
return nVal;
}
void SAL_CALL
ScVbaScrollBar::setMin( sal_Int32 nVal ) throw (uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( SCROLLMIN, uno::makeAny( nVal ) );
+ m_xProps->setPropertyValue( "ScrollValueMin", uno::makeAny( nVal ) );
}
void SAL_CALL
ScVbaScrollBar::setLargeChange( ::sal_Int32 _largechange ) throw (uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( LARGECHANGE, uno::makeAny( _largechange ) );
+ m_xProps->setPropertyValue( "BlockIncrement", uno::makeAny( _largechange ) );
}
::sal_Int32 SAL_CALL
ScVbaScrollBar::getLargeChange() throw (uno::RuntimeException, std::exception)
{
sal_Int32 nVal = 0;
- m_xProps->getPropertyValue( LARGECHANGE ) >>= nVal;
+ m_xProps->getPropertyValue( "BlockIncrement" ) >>= nVal;
return nVal;
}
@@ -92,14 +86,14 @@ ScVbaScrollBar::getLargeChange() throw (uno::RuntimeException, std::exception)
ScVbaScrollBar::getSmallChange() throw (uno::RuntimeException, std::exception)
{
sal_Int32 nSmallChange = 0;
- m_xProps->getPropertyValue( SMALLCHANGE ) >>= nSmallChange;
+ m_xProps->getPropertyValue( "LineIncrement" ) >>= nSmallChange;
return nSmallChange;
}
void SAL_CALL
ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange ) throw (uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( SMALLCHANGE, uno::makeAny( _smallchange ) );
+ m_xProps->setPropertyValue( "LineIncrement", uno::makeAny( _smallchange ) );
}
OUString
diff --git a/vbahelper/source/msforms/vbaspinbutton.cxx b/vbahelper/source/msforms/vbaspinbutton.cxx
index 648e320d2141..9a61ec15db38 100644
--- a/vbahelper/source/msforms/vbaspinbutton.cxx
+++ b/vbahelper/source/msforms/vbaspinbutton.cxx
@@ -16,17 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
#include "vbaspinbutton.hxx"
#include <vector>
using namespace com::sun::star;
using namespace ooo::vba;
-
-const static OUString SPINVALUE( "SpinValue" );
-const static OUString SPINMAX( "SpinValueMax" );
-const static OUString SPINMIN( "SpinValueMin" );
-
ScVbaSpinButton::ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : SpinButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
}
@@ -35,41 +31,41 @@ ScVbaSpinButton::ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterfa
uno::Any SAL_CALL
ScVbaSpinButton::getValue() throw (css::uno::RuntimeException, std::exception)
{
- return m_xProps->getPropertyValue( SPINVALUE );
+ return m_xProps->getPropertyValue( "SpinValue" );
}
void SAL_CALL
ScVbaSpinButton::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( SPINVALUE, _value );
+ m_xProps->setPropertyValue( "SpinValue", _value );
}
::sal_Int32 SAL_CALL
ScVbaSpinButton::getMax() throw (uno::RuntimeException, std::exception)
{
sal_Int32 nMax = 0;
- m_xProps->getPropertyValue( SPINMAX ) >>= nMax;
+ m_xProps->getPropertyValue( "SpinValueMax" ) >>= nMax;
return nMax;
}
void SAL_CALL
ScVbaSpinButton::setMax( sal_Int32 nVal ) throw (uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( SPINMAX, uno::makeAny( nVal ) );
+ m_xProps->setPropertyValue( "SpinValueMax", uno::makeAny( nVal ) );
}
::sal_Int32 SAL_CALL
ScVbaSpinButton::getMin() throw (uno::RuntimeException, std::exception)
{
sal_Int32 nVal = 0;
- m_xProps->getPropertyValue( SPINMIN ) >>= nVal;
+ m_xProps->getPropertyValue( "SpinValueMin" ) >>= nVal;
return nVal;
}
void SAL_CALL
ScVbaSpinButton::setMin( sal_Int32 nVal ) throw (uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( SPINMIN, uno::makeAny( nVal ) );
+ m_xProps->setPropertyValue( "SpinValueMin", uno::makeAny( nVal ) );
}
OUString
diff --git a/vbahelper/source/msforms/vbatogglebutton.cxx b/vbahelper/source/msforms/vbatogglebutton.cxx
index b974b20e43b5..f3c7e80c58b9 100644
--- a/vbahelper/source/msforms/vbatogglebutton.cxx
+++ b/vbahelper/source/msforms/vbatogglebutton.cxx
@@ -23,14 +23,10 @@
using namespace com::sun::star;
using namespace ooo::vba;
-
-const static OUString LABEL( "Label" );
-const static OUString TOGGLE( "Toggle" );
-const static OUString STATE( "State" );
ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
SAL_INFO("vbahelper", "ScVbaToggleButton(ctor)");
- m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
+ m_xProps->setPropertyValue( "Toggle", uno::makeAny( sal_True ) );
}
ScVbaToggleButton::~ScVbaToggleButton()
@@ -43,21 +39,21 @@ OUString SAL_CALL
ScVbaToggleButton::getCaption() throw (css::uno::RuntimeException, std::exception)
{
OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
+ m_xProps->getPropertyValue( "Label" ) >>= Label;
return Label;
}
void SAL_CALL
ScVbaToggleButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
+ m_xProps->setPropertyValue( "Label", uno::makeAny( _caption ) );
}
uno::Any SAL_CALL
ScVbaToggleButton::getValue() throw (uno::RuntimeException, std::exception)
{
sal_Int16 nState = 0;
- m_xProps->getPropertyValue( STATE ) >>= nState;
+ m_xProps->getPropertyValue( "State" ) >>= nState;
return uno::makeAny( nState ? sal_Int16( -1 ) : sal_Int16( 0 ) );
}
@@ -76,7 +72,7 @@ ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExcepti
SAL_INFO("vbahelper", "nState - " << nState );
nState = ( nState == -1 ) ? 1 : 0;
SAL_INFO("vbahelper", "nState - " << nState );
- m_xProps->setPropertyValue( STATE, uno::makeAny( nState ) );
+ m_xProps->setPropertyValue( "State", uno::makeAny( nState ) );
}
sal_Bool SAL_CALL ScVbaToggleButton::getAutoSize() throw (uno::RuntimeException, std::exception)