ooo-build r13036 - in trunk: . patches/dev300 patches/vba
- From: jiaojh svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13036 - in trunk: . patches/dev300 patches/vba
- Date: Thu, 3 Jul 2008 07:18:02 +0000 (UTC)
Author: jiaojh
Date: Thu Jul 3 07:18:02 2008
New Revision: 13036
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13036&view=rev
Log:
* patches/vba/vba-spin-button.diff:
* patches/dev300/apply:
Add SpinButton.
Added:
trunk/patches/vba/vba-spin-button.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Thu Jul 3 07:18:02 2008
@@ -1511,6 +1511,8 @@
vba-listbox-removeitem.diff, n#405306, Jianhua
# Range.Find
vba-range-find.diff, n#405304, Jianhua
+# For SpinButton
+vba-spin-button.diff, n#405308, Jianhua
[ VBAUntested ]
SectionOwner => noelpwer
vba-basic-null.diff i#85349, jjiao
Added: trunk/patches/vba/vba-spin-button.diff
==============================================================================
--- (empty file)
+++ trunk/patches/vba/vba-spin-button.diff Thu Jul 3 07:18:02 2008
@@ -0,0 +1,295 @@
+--- /dev/null 2007-09-22 05:50:58.000000000 +0800
++++ oovbaapi/org/openoffice/msforms/XSpinButton.idl 2008-07-03 14:25:45.000000000 +0800
+@@ -0,0 +1,59 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#ifndef __org_openoffice_msforms_XSpinButton_idl__
++#define __org_openoffice_msforms_XSpinButton_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
++
++module org { module openoffice { module msforms {
++
++//=============================================================================
++interface XSpinButton: com::sun::star::uno::XInterface
++{
++ [attribute] long Max;
++ [attribute] long Min;
++ [attribute] any Value;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+--- oovbaapi/org/openoffice/msforms/makefile.mk.bak 2008-07-03 14:26:02.000000000 +0800
++++ oovbaapi/org/openoffice/msforms/makefile.mk 2008-07-03 14:26:21.000000000 +0800
+@@ -63,6 +63,7 @@ IDLFILES=\
+ XProgressBar.idl \
+ XMultiPage.idl \
+ XPages.idl \
++ XSpinButton.idl \
+
+ # ------------------------------------------------------------------
+
+--- /dev/null 2007-09-22 05:50:58.000000000 +0800
++++ sc/source/ui/vba/vbaspinbutton.hxx 2008-07-03 14:50:48.000000000 +0800
+@@ -0,0 +1,61 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#ifndef SC_VBA_SPINBUTTON_HXX
++#define SC_VBA_SPINBUTTON_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <org/openoffice/msforms/XSpinButton.hpp>
++
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XSpinButton > SpinButtonImpl_BASE;
++
++class ScVbaSpinButton : public SpinButtonImpl_BASE
++{
++public:
++ ScVbaSpinButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, oo::AbstractGeometryAttributes* pGeomHelper );
++ // Attributes
++ 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 ::sal_Int32 SAL_CALL getMax() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setMax( ::sal_Int32 _max ) throw (css::uno::RuntimeException);
++ virtual ::sal_Int32 SAL_CALL getMin() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setMin( ::sal_Int32 _min ) throw (css::uno::RuntimeException);
++
++ //XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++#endif //SC_VBA_SPINBUTTON_HXX
+--- /dev/null 2007-09-22 05:50:58.000000000 +0800
++++ sc/source/ui/vba/vbaspinbutton.cxx 2008-07-03 14:57:51.000000000 +0800
+@@ -0,0 +1,109 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#include "vbaspinbutton.hxx"
++#include <vector>
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++
++const static rtl::OUString ORIENTATION( RTL_CONSTASCII_USTRINGPARAM("Orientation") );
++const static rtl::OUString SPINVALUE( RTL_CONSTASCII_USTRINGPARAM("SpinValue") );
++const static rtl::OUString SPINMAX( RTL_CONSTASCII_USTRINGPARAM("SpinValueMax") );
++const static rtl::OUString SPINMIN( RTL_CONSTASCII_USTRINGPARAM("SpinValueMin") );
++
++ScVbaSpinButton::ScVbaSpinButton( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, AbstractGeometryAttributes* pGeomHelper ) : SpinButtonImpl_BASE( xParent, xContext, xControl, pGeomHelper )
++{
++}
++
++// Attributes
++uno::Any SAL_CALL
++ScVbaSpinButton::getValue() throw (css::uno::RuntimeException)
++{
++ return m_xProps->getPropertyValue( SPINVALUE );
++}
++
++void SAL_CALL
++ScVbaSpinButton::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SPINVALUE, _value );
++}
++
++::sal_Int32 SAL_CALL
++ScVbaSpinButton::getMax() throw (uno::RuntimeException)
++{
++ sal_Int32 nMax = 0;
++ m_xProps->getPropertyValue( SPINMAX ) >>= nMax;
++ return nMax;
++}
++
++void SAL_CALL
++ScVbaSpinButton::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SPINMAX, uno::makeAny( nVal ) );
++}
++
++::sal_Int32 SAL_CALL
++ScVbaSpinButton::getMin() throw (uno::RuntimeException)
++{
++ sal_Int32 nVal = 0;
++ m_xProps->getPropertyValue( SPINMIN ) >>= nVal;
++ return nVal;
++}
++
++void SAL_CALL
++ScVbaSpinButton::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SPINMIN, uno::makeAny( nVal ) );
++}
++
++rtl::OUString&
++ScVbaSpinButton::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSpinButton") );
++ return sImplName;
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaSpinButton::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Frame" ) );
++ }
++ return aServiceNames;
++}
+--- sc/source/ui/vba/makefile.mk.bak 2008-07-03 14:51:12.000000000 +0800
++++ sc/source/ui/vba/makefile.mk 2008-07-03 14:51:39.000000000 +0800
+@@ -127,6 +127,7 @@ SLOFILES= \
+ $(SLO)$/vbacommandbars.obj \
+ $(SLO)$/vbahyperlink.obj \
+ $(SLO)$/vbapagesetup.obj \
++ $(SLO)$/vbaspinbutton.obj \
+ $(SLO)$/service.obj \
+ $(SLO)$/vbaeventshelper.obj \
+
+--- sc/source/ui/vba/vbacontrol.cxx.bak 2008-07-03 14:38:45.000000000 +0800
++++ sc/source/ui/vba/vbacontrol.cxx 2008-07-03 15:14:03.000000000 +0800
+@@ -50,6 +50,7 @@
+ #include "vbascrollbar.hxx"
+ #include "vbaprogressbar.hxx"
+ #include "vbamultipage.hxx"
++#include "vbaspinbutton.hxx"
+
+
+ using namespace com::sun::star;
+@@ -272,6 +273,8 @@ ScVbaControl* ScVbaControlFactory::creat
+ return new ScVbaRadioButton( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
+ case form::FormComponentType::LISTBOX:
+ return new ScVbaListBox( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
++ case form::FormComponentType::SPINBUTTON:
++ return new ScVbaSpinButton( xVbaParent, m_xContext, xControlShape, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
+ default:
+ throw uno::RuntimeException( rtl::OUString::createFromAscii(
+ "Donot surpport this Control Type." ), uno::Reference< uno::XInterface >() );
+@@ -316,6 +319,8 @@ ScVbaControl* ScVbaControlFactory::creat
+ pControl = new ScVbaScrollBar( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ) )
+ pControl = new ScVbaMultiPage( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ), xParent );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlSpinButtonModel") ) ) )
++ pControl = new ScVbaSpinButton( xVbaParent, m_xContext, xControl, new UserFormGeometryHelper( m_xContext, xControl ) );
+ else
+ throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
+ return pControl;
+@@ -324,7 +329,7 @@ ScVbaControl* ScVbaControlFactory::creat
+ rtl::OUString&
+ ScVbaControl::getServiceImplName()
+ {
+- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaContro") );
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControl") );
+ return sImplName;
+ }
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]