diff options
author | Noel Power <noel.power@suse.com> | 2013-04-05 09:04:42 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-04-05 09:06:29 +0100 |
commit | c2ac410fe6b709b1e75a5a7165e3233a8fb4f98b (patch) | |
tree | fb14ee2477febff359e92f27285b49e5d7437bbd /vbahelper | |
parent | 975192e72eacbc2ab53c94a394eca11bb3a60728 (diff) |
Revert "Added and fixed various vba API"
This reverts commit 57b8dcc4323f736f51f9ed8334affeb042efbca4.
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/Library_msforms.mk | 1 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbacombobox.cxx | 10 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbacombobox.hxx | 2 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbacontrol.cxx | 56 |
4 files changed, 5 insertions, 64 deletions
diff --git a/vbahelper/Library_msforms.mk b/vbahelper/Library_msforms.mk index ac9c7bd7cb38..63d0f67aeb5c 100644 --- a/vbahelper/Library_msforms.mk +++ b/vbahelper/Library_msforms.mk @@ -58,7 +58,6 @@ $(eval $(call gb_Library_use_libraries,msforms,\ svl \ svt \ svx \ - svxcore \ tk \ tl \ vbahelper \ diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx index dbdabc2d471d..b78dea3111f8 100644 --- a/vbahelper/source/msforms/vbacombobox.cxx +++ b/vbahelper/source/msforms/vbacombobox.cxx @@ -277,16 +277,6 @@ void SAL_CALL ScVbaComboBox::setLocked( sal_Bool bLocked ) throw (uno::RuntimeEx ScVbaControl::setLocked( bLocked ); } -rtl::OUString SAL_CALL ScVbaComboBox::getLinkedCell() throw (uno::RuntimeException) -{ - return ScVbaControl::getControlSource(); -} - -void SAL_CALL ScVbaComboBox::setLinkedCell( const ::rtl::OUString& _linkedcell ) throw (uno::RuntimeException) -{ - ScVbaControl::setControlSource( _linkedcell ); -} - uno::Sequence< OUString > ScVbaComboBox::getServiceNames() { diff --git a/vbahelper/source/msforms/vbacombobox.hxx b/vbahelper/source/msforms/vbacombobox.hxx index 06adc9df929a..f71f9c169953 100644 --- a/vbahelper/source/msforms/vbacombobox.hxx +++ b/vbahelper/source/msforms/vbacombobox.hxx @@ -69,8 +69,6 @@ public: 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); - virtual ::rtl::OUString SAL_CALL getLinkedCell() throw (css::uno::RuntimeException); - virtual void SAL_CALL setLinkedCell( const ::rtl::OUString& _linkedcell ) 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 b788368b8df4..075c26c8ab23 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -56,10 +56,6 @@ #include <vbahelper/helperdecl.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/window.hxx> -#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> -#include <com/sun/star/form/XFormsSupplier.hpp> -#include <svx/svdobj.hxx> - using namespace com::sun::star; using namespace ooo::vba; @@ -306,7 +302,7 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException) table::CellAddress aAddress; xProps->getPropertyValue( "BoundCell" ) >>= aAddress; xConvertor->setPropertyValue( "Address" , uno::makeAny( aAddress ) ); - xConvertor->getPropertyValue( "XLA1Representation" ) >>= sControlSource; + xConvertor->getPropertyValue( "XL_A1_Representation" ) >>= sControlSource; } catch(const uno::Exception&) { @@ -319,40 +315,7 @@ void SAL_CALL ScVbaControl::setControlSource( const OUString& _controlsource ) throw (uno::RuntimeException) { OUString sEmpty; - // afaik this is only relevant for Excel documents ( and we need to set up a - // reference tab in case no Sheet is specified in "_controlsource" - // Can't use the active sheet either, code may of course access - uno::Reference< drawing::XDrawPagesSupplier > xSupplier( m_xModel, uno::UNO_QUERY_THROW ); - uno::Reference< container::XIndexAccess > xIndex( xSupplier->getDrawPages(), uno::UNO_QUERY_THROW ); - sal_Int32 nLen = xIndex->getCount(); - bool bMatched = false; - sal_Int16 nRefTab = 0; - for ( sal_Int32 index = 0; index < nLen; ++index ) - { - try - { - uno::Reference< form::XFormsSupplier > xFormSupplier( xIndex->getByIndex( index ), uno::UNO_QUERY_THROW ); - uno::Reference< container::XIndexAccess > xFormIndex( xFormSupplier->getForms(), uno::UNO_QUERY_THROW ); - // get the www-standard container - uno::Reference< container::XIndexAccess > xFormControls( xFormIndex->getByIndex(0), uno::UNO_QUERY_THROW ); - sal_Int32 nCntrls = xFormControls->getCount(); - for( sal_Int32 cIndex = 0; cIndex < nCntrls; ++cIndex ) - { - uno::Reference< uno::XInterface > xControl( xFormControls->getByIndex( cIndex ), uno::UNO_QUERY_THROW ); - bMatched = ( m_xProps == xControl ); - if ( bMatched ) - { - nRefTab = index; - break; - } - } - } - catch( uno::Exception& ) {} - if ( bMatched ) - break; - } - - svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, _controlsource, sEmpty, sal_uInt16( nRefTab ) ); + svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, _controlsource, sEmpty ); } OUString SAL_CALL @@ -371,7 +334,7 @@ ScVbaControl::getRowSource() throw (uno::RuntimeException) table::CellRangeAddress aAddress; xProps->getPropertyValue( "CellRange" ) >>= aAddress; xConvertor->setPropertyValue( "Address" , uno::makeAny( aAddress ) ); - xConvertor->getPropertyValue( "XLA1Representation" ) >>= sRowSource; + xConvertor->getPropertyValue( "XL_A1_Representation" ) >>= sRowSource; } catch(const uno::Exception&) { @@ -736,21 +699,12 @@ void ScVbaControl::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeExcep sal_Bool ScVbaControl::getAutoSize() throw (uno::RuntimeException) { - bool bIsResizeEnabled = false; - uno::Reference< uno::XInterface > xIf( m_xControl, uno::UNO_QUERY_THROW ); - SdrObject* pObj = SdrObject::getSdrObjectFromXShape( xIf ); - if ( pObj ) - bIsResizeEnabled = !pObj->IsResizeProtect(); - return bIsResizeEnabled; + return sal_False; } // currently no implementation for this -void ScVbaControl::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException) +void ScVbaControl::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException) { - uno::Reference< uno::XInterface > xIf( m_xControl, uno::UNO_QUERY_THROW ); - SdrObject* pObj = SdrObject::getSdrObjectFromXShape( xIf ); - if ( pObj ) - pObj->SetResizeProtect( !bAutoSize ); } sal_Bool ScVbaControl::getLocked() throw (uno::RuntimeException) |