ooo-build r12167 - trunk/patches/test/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12167 - trunk/patches/test/vba
- Date: Tue, 15 Apr 2008 15:43:03 +0100 (BST)
Author: noelpwer
Date: Tue Apr 15 15:43:02 2008
New Revision: 12167
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12167&view=rev
Log:
latest ( needs to be updated to latest ooh680-m12 / dev300
Modified:
trunk/patches/test/vba/UserFormObjectModuleEventsSuperBigPatch.diff
Modified: trunk/patches/test/vba/UserFormObjectModuleEventsSuperBigPatch.diff
==============================================================================
--- trunk/patches/test/vba/UserFormObjectModuleEventsSuperBigPatch.diff (original)
+++ trunk/patches/test/vba/UserFormObjectModuleEventsSuperBigPatch.diff Tue Apr 15 15:43:02 2008
@@ -482,6 +482,68 @@
// Position of controls is relative to the container
pControl->mnTop = rec.nTop + mnTop;
pControl->mnLeft = rec.nLeft + mnLeft;
+@@ -3750,7 +3750,8 @@ OCX_MultiPage::OCX_MultiPage( SotStorage
+ nScrollWidth(0), nScrollHeight(0), nIconLen(0), pIcon(0), nPictureLen(0),
+ pPicture(0)
+ {
+- msDialogType = C2U("NotSupported");
++ //msDialogType = C2U("NotSupported");
++ msDialogType = C2U("com.sun.star.awt.UnoMultiPageModel");
+ mnForeColor = 0x80000012L,
+ mnBackColor = 0x8000000FL;
+ bSetInDialog = true;// UserForm control only
+@@ -3814,7 +3815,6 @@ sal_Bool OCX_MultiPage::Read(SvStorageSt
+ sal_Bool OCX_MultiPage::Import(com::sun::star::uno::Reference<
+ com::sun::star::beans::XPropertySet> &rPropSet)
+ {
+- // Calls import on contained controls
+ OCX_ContainerControl::Import( rPropSet );
+ return sal_True;
+ }
+@@ -3835,6 +3835,43 @@ sal_Bool OCX_MultiPage::Import(com::sun:
+
+ if ( xPropSet.is() )
+ {
++ uno::Reference<lang::XMultiServiceFactory>
++ xFactory(rDialog, uno::UNO_QUERY);
++ OSL_TRACE("** MultiPage creating control %s", rtl::OUStringToOString( msDialogType, RTL_TEXTENCODING_UTF8 ).getStr() );
++ uno::Reference<uno::XInterface> xCreate = xFactory->createInstance(msDialogType);
++ if (!xCreate.is())
++ return sal_False;
++
++ uno::Reference<awt::XControlModel> xModel(xCreate, uno::UNO_QUERY);
++ if (!xModel.is())
++ return sal_False;
++
++ try
++ {
++ // we should just call MultiPage::Import( XPropertySet )
++ OSL_TRACE("********* MULTIPAGE cName %s", rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() );
++ uno::Any aTmp(&sName,getCppuType((OUString *)0));
++ uno::Reference<beans::XPropertySet> xPrps(xModel, uno::UNO_QUERY);
++ xPrps->setPropertyValue( WW8_ASCII2STR("Name"), aTmp );
++ aTmp = uno::makeAny( mnCurrentPageStep );
++ xPrps->setPropertyValue( WW8_ASCII2STR("ProgressValueMax"), aTmp );
++ // default current page to 0 ( #FIXME, we need to read this value )
++ aTmp = uno::makeAny( sal_Int32(0) );
++ xPrps->setPropertyValue( WW8_ASCII2STR("ProgressValue"), aTmp );
++ OSL_TRACE("********* MULTIPAGE vomitted out properties");
++
++ // Calls import on contained controls
++ rDialog->insertByName(sName, uno::makeAny(xModel));
++ OSL_TRACE("*** inserted ***");
++ }
++ catch( uno::Exception& )
++ {
++ DBG_ERRORFILE(
++ ByteString( "OCX_Control::Import - cannot insert control \"" ).
++ Append( ByteString( sName, RTL_TEXTENCODING_UTF8 ) ).
++ Append( '"' ).GetBuffer() );
++ }
++
+ // Calls import on contained pages
+ return OCX_ContainerControl::Import( xPropSet );
+ }
diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/inc/document.hxx sc/inc/document.hxx
--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/inc/document.hxx 2008-03-29 23:08:24.000000000 +0000
+++ sc/inc/document.hxx 2008-03-28 10:30:33.000000000 +0000
@@ -1108,36 +1170,6 @@
rDocShell.Broadcast( ScTablesHint( SC_TAB_DELETED, nTab ) );
if (bWasLinked)
-diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/docshell/vbaevents.cxx sc/source/ui/docshell/vbaevents.cxx
---- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/docshell/vbaevents.cxx 2008-03-29 23:08:18.000000000 +0000
-+++ sc/source/ui/docshell/vbaevents.cxx 2008-03-28 10:30:34.000000000 +0000
-@@ -60,11 +60,7 @@ const static rtl::OUString sUrlPart2 = r
- rtl::OUString sCodeName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWorkbook") );
- if ( pShell )
- {
-- if ( ScExtDocOptions* pExtDocOpts = pShell->GetDocument()->GetExtDocOptions() )
-- {
-- if ( pExtDocOpts->GetDocSettings().maGlobCodeName.Len() > 0 )
-- sCodeName = pExtDocOpts->GetDocSettings().maGlobCodeName;
-- }
-+ pShell->GetDocument()->GetCodeName();
- }
- return sCodeName;
- }
-@@ -316,12 +312,8 @@ uno::Any createRange( const uno::Any& aR
-
- String getSheetModuleName( ScDocShell* pShell, SCTAB nTab )
- {
-- ScExtDocOptions* pExtOptions = pShell->GetDocument()->GetExtDocOptions();
- String aCodeName;
-- pShell->GetDocument()->GetName( nTab, aCodeName);
-- // Use code name if that exists
-- if ( pExtOptions )
-- aCodeName = pExtOptions->GetCodeName( nTab );
-+ pShell->GetDocument()->GetCodeName( nTab, aCodeName);
- return aCodeName;
- }
-
diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/makefile.mk sc/source/ui/unoobj/makefile.mk
--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/unoobj/makefile.mk 2008-03-29 23:08:20.000000000 +0000
+++ sc/source/ui/unoobj/makefile.mk 2008-03-28 10:30:33.000000000 +0000
@@ -1149,9 +1181,9 @@
# --- Files --------------------------------------------------------
SLO1FILES = \
$(SLO)$/docuno.obj \
---- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/makefile.mk 2008-04-03 11:33:30.000000000 +0100
-+++ sc/source/ui/vba/makefile.mk 2008-04-02 21:34:14.000000000 +0100
-@@ -121,6 +121,11 @@ SLOFILES= \
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/makefile.mk 2008-04-08 12:28:10.000000000 +0100
++++ sc/source/ui/vba/makefile.mk 2008-04-06 16:10:39.000000000 +0100
+@@ -121,6 +121,14 @@ SLOFILES= \
$(SLO)$/vbacommandbarcontrols.obj \
$(SLO)$/vbacommandbar.obj \
$(SLO)$/vbacommandbars.obj \
@@ -1160,6 +1192,9 @@
+ $(SLO)$/vbatogglebutton.obj \
+ $(SLO)$/vbaframe.obj \
+ $(SLO)$/vbascrollbar.obj \
++ $(SLO)$/vbaprogressbar.obj \
++ $(SLO)$/vbamultipage.obj \
++ $(SLO)$/vbapages.obj \
$(SLO)$/service.obj \
@@ -1416,9 +1451,9 @@
};
#endif //
---- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.cxx 2008-04-03 11:33:30.000000000 +0100
-+++ sc/source/ui/vba/vbacontrol.cxx 2008-04-02 22:32:04.000000000 +0100
-@@ -49,17 +49,23 @@
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.cxx 2007-12-07 10:49:52.000000000 +0000
++++ sc/source/ui/vba/vbacontrol.cxx 2008-04-11 16:04:13.000000000 +0100
+@@ -49,17 +49,25 @@
#include "vbatextbox.hxx"
#include "vbaradiobutton.hxx"
#include "vbalistbox.hxx"
@@ -1426,6 +1461,8 @@
+#include "vbacheckbox.hxx"
+#include "vbaframe.hxx"
+#include "vbascrollbar.hxx"
++#include "vbaprogressbar.hxx"
++#include "vbamultipage.hxx"
using namespace com::sun::star;
@@ -1446,7 +1483,7 @@
uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
//init m_xWindowPeer
uno::Reference< container::XChild > xChild( xControlModel, uno::UNO_QUERY_THROW );
-@@ -67,17 +73,18 @@ ScVbaControl::getWindowPeer( const uno::
+@@ -67,17 +75,18 @@ ScVbaControl::getWindowPeer( const uno::
xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW );
uno::Reference< frame::XModel > xModel( xChild->getParent(), uno::UNO_QUERY_THROW );
uno::Reference< view::XControlAccess > xControlAccess( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
@@ -1468,12 +1505,12 @@
}
//ScVbaControlListener
-@@ -111,67 +118,49 @@ ScVbaControlListener::disposing( const l
+@@ -111,67 +120,49 @@ ScVbaControlListener::disposing( const l
//ScVbaControl
-ScVbaControl::ScVbaControl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::drawing::XControlShape >& xControlShape ) : m_xContext( xContext ), m_xControlShape( xControlShape )
-+ScVbaControl::ScVbaControl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::uno::XInterface >& xControl ) : ControlImpl_BASE( uno::Reference< vba::XHelperInterface >(), xContext ), m_xContext( xContext ), m_xControl( xControl )
++ScVbaControl::ScVbaControl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::uno::XInterface >& xControl ) : ControlImpl_BASE( uno::Reference< vba::XHelperInterface >(), xContext ), m_xControl( xControl )
{
- //init m_xProps
- uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
@@ -1512,16 +1549,13 @@
}
-void ScVbaControl::removeResouce() throw( uno::RuntimeException )
-+void
-+ScVbaControl::setGeometryHelper( AbstractGeometryAttributes* pHelper )
- {
+-{
- uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
- xComponent->removeEventListener( m_xEventListener );
- m_xControlShape = NULL;
- m_xProps = NULL;
-+ mpGeometryHelper.reset( pHelper );
- }
-
+-}
+-
-
-ScVbaControl::ScVbaControl( const uno::Reference< uno::XComponentContext >& xContext,
- const uno::Reference< beans::XPropertySet >& xProps,
@@ -1534,7 +1568,9 @@
-}
-
-void ScVbaControl::SetControl( const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< ::drawing::XControlShape > xControlShape )
--{
++void
++ScVbaControl::setGeometryHelper( AbstractGeometryAttributes* pHelper )
+ {
- m_xEventListener.set( new ScVbaControlListener( this ) );
- uno::Reference< lang::XComponent > xComponent( m_xControlShape, uno::UNO_QUERY_THROW );
- m_xContext.set( xContext, uno::UNO_QUERY_THROW );
@@ -1543,8 +1579,9 @@
- uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl(), uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xProps( xControlModel, uno::UNO_QUERY_THROW );
- m_xProps = xProps;
--}
--
++ mpGeometryHelper.reset( pHelper );
+ }
+
-void ScVbaControl::SetControl( const uno::Reference< uno::XComponentContext > xContext,
- const uno::Reference< beans::XPropertySet > xProps,
- const uno::Reference< drawing::XControlShape > xControlShape )
@@ -1562,7 +1599,7 @@
}
//In design model has different behavior
-@@ -194,132 +183,168 @@ void SAL_CALL ScVbaControl::setEnabled(
+@@ -194,132 +185,169 @@ void SAL_CALL ScVbaControl::setEnabled(
sal_Bool SAL_CALL ScVbaControl::getVisible() throw (uno::RuntimeException)
{
@@ -1663,20 +1700,20 @@
}
-ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, const uno::Reference< drawing::XControlShape > xControlShape ): m_xContext( xContext ), m_xProps( xProps ), m_xControlShape( xControlShape )
-+ScVbaControl* ScVbaControlFactory::createControl() throw (uno::RuntimeException)
++ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< uno::XInterface >& xParent ) throw (uno::RuntimeException)
{
+ uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
+ if ( xControlShape.is() ) // form controls
-+ return createControl( xControlShape );
++ return createControl( xControlShape, xParent );
+ uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY );
+ if ( !xControl.is() )
+ throw uno::RuntimeException(); // really we should be more informative
-+ return createControl( xControl );
++ return createControl( xControl, xParent );
+
}
-ScVbaControl* ScVbaControlFactory::createControl( const sal_Int16 nClassId ) throw (uno::RuntimeException)
-+ScVbaControl* ScVbaControlFactory::createControl(uno::Reference< drawing::XControlShape >& xControlShape ) throw (uno::RuntimeException)
++ScVbaControl* ScVbaControlFactory::createControl(const uno::Reference< drawing::XControlShape >& xControlShape, const uno::Reference< uno::XInterface >& /*xParent*/ ) throw (uno::RuntimeException)
{
+ uno::Reference< beans::XPropertySet > xProps( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+ sal_Int32 nClassId = -1;
@@ -1709,7 +1746,7 @@
}
-ScVbaControl* ScVbaControlFactory::createControl() throw (uno::RuntimeException)
-+ScVbaControl* ScVbaControlFactory::createControl(uno::Reference< awt::XControl >& xControl ) throw (uno::RuntimeException)
++ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< awt::XControl >& xControl, const uno::Reference< uno::XInterface >& xParent ) throw (uno::RuntimeException)
{
- sal_Int32 nClassId = -1;
- const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
@@ -1760,12 +1797,13 @@
+ //pControl = new ScVbaImage( m_xContext, xControl );
+ throw uno::RuntimeException();
+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ) ) )
-+ //pControl = new ScVbaProgressBar( m_xContext, xControl );
-+ throw uno::RuntimeException();
++ pControl = new ScVbaProgressBar( m_xContext, xControl );
+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ) ) )
+ pControl = new ScVbaFrame( m_xContext, xControl );
+ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlScrollBarModel") ) ) )
+ pControl = new ScVbaScrollBar( m_xContext, xControl );
++ else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ) )
++ pControl = new ScVbaMultiPage( m_xContext, xControl, xParent );
+ else
+ throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
+ return pControl;
@@ -1791,9 +1829,9 @@
}
+
+
---- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.hxx 2008-04-03 11:33:30.000000000 +0100
-+++ sc/source/ui/vba/vbacontrol.hxx 2008-04-02 18:49:02.000000000 +0100
-@@ -40,40 +40,34 @@
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbacontrol.hxx 2007-12-07 10:50:07.000000000 +0000
++++ sc/source/ui/vba/vbacontrol.hxx 2008-04-11 16:03:53.000000000 +0100
+@@ -40,40 +40,33 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/script/XDefaultProperty.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
@@ -1818,8 +1856,8 @@
- css::uno::Reference< css::awt::XWindowPeer > getWindowPeer( const css::uno::Reference< css::drawing::XControlShape >& xControlShape ) throw (css::uno::RuntimeException);
com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > m_xEventListener;
protected:
+- css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ std::auto_ptr< oo::AbstractGeometryAttributes > mpGeometryHelper;
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::beans::XPropertySet > m_xProps;
- css::uno::Reference< css::drawing::XControlShape > m_xControlShape;
-protected:
@@ -1846,7 +1884,7 @@
// XControl
virtual sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException);
virtual void SAL_CALL setEnabled( sal_Bool _enabled ) throw (css::uno::RuntimeException);
-@@ -87,9 +81,14 @@ public:
+@@ -87,9 +80,14 @@ public:
virtual void SAL_CALL setLeft( double _left ) throw (css::uno::RuntimeException);
virtual double SAL_CALL getTop() throw (css::uno::RuntimeException);
virtual void SAL_CALL setTop( double _top ) throw (css::uno::RuntimeException);
@@ -1861,7 +1899,7 @@
};
-@@ -97,16 +96,13 @@ class ScVbaControlFactory
+@@ -97,16 +95,13 @@ class ScVbaControlFactory
{
public:
ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext,
@@ -1870,11 +1908,12 @@
- const css::uno::Reference< css::beans::XPropertySet >& xProps,
- const css::uno::Reference< css::drawing::XControlShape > xControlShape );
- ScVbaControl* createControl( const sal_Int16 nClassID ) throw ( css::uno::RuntimeException );
+- ScVbaControl* createControl() throw ( css::uno::RuntimeException );
+ const css::uno::Reference< css::uno::XInterface >& xControl );
- ScVbaControl* createControl() throw ( css::uno::RuntimeException );
++ ScVbaControl* createControl( const css::uno::Reference< css::uno::XInterface >& xParent ) throw ( css::uno::RuntimeException );
private:
-+ ScVbaControl* createControl( css::uno::Reference< css::awt::XControl >& ) throw ( css::uno::RuntimeException );
-+ ScVbaControl* createControl( css::uno::Reference< css::drawing::XControlShape >& ) throw ( css::uno::RuntimeException );
++ ScVbaControl* createControl( const css::uno::Reference< css::awt::XControl >&, const css::uno::Reference< css::uno::XInterface >& ) throw ( css::uno::RuntimeException );
++ ScVbaControl* createControl( const css::uno::Reference< css::drawing::XControlShape >&, const css::uno::Reference< css::uno::XInterface >& ) throw ( css::uno::RuntimeException );
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- css::uno::Reference< css::beans::XPropertySet > m_xProps;
- css::uno::Reference< css::drawing::XControlShape > m_xControlShape;
@@ -2691,9 +2730,8 @@
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif //SC_VBA_LABEL_HXX
-diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.cxx sc/source/ui/vba/vbaworksheet.cxx
---- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.cxx 2008-03-29 23:07:54.000000000 +0000
-+++ sc/source/ui/vba/vbaworksheet.cxx 2008-03-28 10:30:34.000000000 +0000
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/vba/vbaworksheet.cxx 2008-04-14 17:28:42.000000000 +0100
++++ sc/source/ui/vba/vbaworksheet.cxx 2008-04-11 16:17:37.000000000 +0100
@@ -61,6 +61,7 @@
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
@@ -2734,7 +2772,8 @@
-*/
uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW );
ScVbaControlFactory controlFactory( mxContext, xControlShape );
- uno::Reference< msforms::XControl > xControl( controlFactory.createControl() );
+- uno::Reference< msforms::XControl > xControl( controlFactory.createControl() );
++ uno::Reference< msforms::XControl > xControl( controlFactory.createControl( getModel() ) );
return uno::makeAny( xControl );
-// return aProp;
}
@@ -2960,7 +2999,7 @@
pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
--- /dev/null 2007-05-04 11:54:36.000000000 +0100
-+++ sc/source/ui/vba/vbauserform.hxx 2008-04-01 23:45:59.000000000 +0100
++++ sc/source/ui/vba/vbauserform.hxx 2008-04-03 13:28:01.000000000 +0100
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
@@ -3040,8 +3079,8 @@
+};
+#endif
--- /dev/null 2007-05-04 11:54:36.000000000 +0100
-+++ sc/source/ui/vba/vbauserform.cxx 2008-04-01 23:42:05.000000000 +0100
-@@ -0,0 +1,265 @@
++++ sc/source/ui/vba/vbauserform.cxx 2008-04-11 16:20:05.000000000 +0100
+@@ -0,0 +1,266 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -3267,10 +3306,11 @@
+ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
+{
+ //OSL_TRACE("ScVbaUserForm getProperty( %s )", rtl::OUStringToOString( aPropertyName, RTL_TEXTENCODING_UTF8 ).getStr() );
++ uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
+ uno::Reference< awt::XControlContainer > xContainer( m_xDialog, uno::UNO_QUERY_THROW );
+ uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName );
+ ScVbaControlFactory aFac( mxContext, xControl );
-+ uno::Reference< msforms::XControl > xVBAControl( aFac.createControl() );
++ uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( xDialogControl->getModel() ) );
+ ScVbaControl* pControl = dynamic_cast< ScVbaControl* >( xVBAControl.get() );
+ pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) );
+ return uno::makeAny( xVBAControl );
@@ -3867,8 +3907,8 @@
// Sonst testen, ob das Element vorhanden ist
// GBLSEARCH-Flag rausnehmen (wg. Rekursion)
USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
---- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/classes/sbxmod.cxx 2008-04-03 11:33:30.000000000 +0100
-+++ basic/source/classes/sbxmod.cxx 2008-04-02 17:57:44.000000000 +0100
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/basic/source/classes/sbxmod.cxx 2008-04-08 12:03:51.000000000 +0100
++++ basic/source/classes/sbxmod.cxx 2008-04-06 21:34:40.000000000 +0100
@@ -62,6 +62,9 @@
#include "sbunoobj.hxx"
#include <basic/hilight.hxx>
@@ -3879,7 +3919,7 @@
#ifndef _VOS_MUTEX_HXX_
#include <vos/mutex.hxx>
-@@ -80,7 +83,18 @@
+@@ -80,7 +83,20 @@
#include <stdio.h>
@@ -3887,6 +3927,8 @@
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/awt/XDialogProvider.hpp>
++#include <com/sun/star/awt/XTopWindow.hpp>
++#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <comphelper/anytostring.hxx>
@@ -3898,7 +3940,7 @@
TYPEINIT1(SbModule,SbxObject)
TYPEINIT1(SbMethod,SbxMethod)
-@@ -88,6 +102,8 @@ TYPEINIT1(SbProperty,SbxProperty)
+@@ -88,6 +104,8 @@ TYPEINIT1(SbProperty,SbxProperty)
TYPEINIT1(SbProcedureProperty,SbxProperty)
TYPEINIT1(SbJScriptModule,SbModule)
TYPEINIT1(SbJScriptMethod,SbMethod)
@@ -3907,7 +3949,7 @@
SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4)
SV_IMPL_VARARR(SbiBreakpoints,USHORT)
-@@ -1903,6 +1919,270 @@ void SyntaxHighlighter::getHighlightPort
+@@ -1903,6 +1921,307 @@ void SyntaxHighlighter::getHighlightPort
m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions );
}
@@ -3936,26 +3978,30 @@
+SbxVariable*
+SbObjModule::Find( const XubString& rName, SbxClassType t )
+{
-+ OSL_TRACE("SbObjectModule find for %s", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr() );
++ //OSL_TRACE("SbObjectModule find for %s", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ if ( !pDocObject )
+ InitObject();
-+ OSL_TRACE("!!!!try to find in derived module " );
++ //OSL_TRACE("!!!!try to find in derived module " );
+ SbxVariable* pVar = NULL;
+ if ( !pVar && pDocObject)
+ {
+ pVar = pDocObject->Find( rName, t );
+ if ( pVar )
+ {
-+ OSL_TRACE("found in uno (psuedo-base) object" );
++ //OSL_TRACE("found in uno (psuedo-base) object" );
+ }
+ else
-+ OSL_TRACE("NOT found in uno (psuedo-base) object" );
++ {
++ //OSL_TRACE("NOT found in uno (psuedo-base) object" );
++ }
+ }
+ if ( !pVar )
+ {
+ pVar = SbModule::Find( rName, t );
+ if ( pVar )
-+ OSL_TRACE("! found in (normal) module " );
++ {
++ //OSL_TRACE("! found in (normal) module " );
++ }
+ }
+
+ return pVar;
@@ -3964,7 +4010,7 @@
+void
+SbObjModule::InitObject()
+{
-+ OSL_TRACE("Initialize pDocObject");
++ // OSL_TRACE("Initialize pDocObject");
+ try
+ {
+ com::sun::star::uno::Reference< com::sun::star::script::XObjectProvider > xObjectProvider( m_mInfo.ModuleObjectProvider, com::sun::star::uno::UNO_QUERY_THROW );
@@ -3981,15 +4027,40 @@
+ }
+ }catch( com::sun::star::uno::RuntimeException e )
+ {
-+ OSL_TRACE("Object is not exist." );
++ //OSL_TRACE("Object is not exist." );
+ }
+}
+
-+typedef ::cppu::WeakImplHelper1< awt::XFocusListener > EventListener_BASE;
-+//typedef ::cppu::WeakImplHelper1< lang::XEventListener > EventListener_BASE;
++typedef ::cppu::WeakImplHelper1< awt::XTopWindowListener > EventListener_BASE;
+
+class FormObjEventListenerImpl : public EventListener_BASE
+{
++ class ActivateGuard
++ {
++ public:
++ ActivateGuard() { ++getCounter(); }
++ virtual ~ActivateGuard() { --getCounter(); }
++ virtual int& getCounter()
++ {
++ static int activateCount = 0;
++ return activateCount;
++ }
++ bool alreadyProcessing() { return ( getCounter() > 1 ); }
++ };
++
++ class DeActivateGuard
++ {
++ public:
++ DeActivateGuard() { ++getCounter(); }
++ virtual ~DeActivateGuard() { --getCounter(); }
++ virtual int& getCounter()
++ {
++ static int deactivateCount = 0;
++ return deactivateCount;
++ }
++ bool alreadyProcessing() { return ( getCounter() > 1 ); }
++ };
++
+ SbUserFormModule* mpUserForm;
+ uno::Reference< lang::XComponent > mxComponent;
+ bool mbDisposed;
@@ -4000,9 +4071,10 @@
+ {
+ if ( mxComponent.is() );
+ {
-+ uno::Reference< awt::XWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
++ uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
++ //uno::Reference< awt::XWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
+ OSL_TRACE("*********** Registering the listener");
-+ xList->addFocusListener( this );
++ xList->addTopWindowListener( this );
+ }
+ }
+
@@ -4016,27 +4088,36 @@
+ {
+ if ( mxComponent.is() && !mbDisposed )
+ {
-+ uno::Reference< awt::XWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
++ uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
+ OSL_TRACE("*********** Removing the listener");
-+ xList->removeFocusListener( this );
++ xList->removeTopWindowListener( this );
+ mxComponent = NULL;
+ }
+ }
+ catch( uno::Exception& ) {}
+ }
-+
-+ virtual void SAL_CALL focusGained( const awt::FocusEvent& e ) throw (::uno::RuntimeException)
-+ {
-+ if ( mpUserForm )
++ virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
++ virtual void SAL_CALL windowClosing( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
++ virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
++ virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
++ virtual void SAL_CALL windowNormalized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException){}
++ virtual void SAL_CALL windowActivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
++ {
++// ActivateGuard aGuard;
++// if ( mpUserForm && !aGuard.alreadyProcessing() )
++ if ( mpUserForm )
+ mpUserForm->triggerActivateEvent();
+ }
-+
-+ virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException)
++
++ virtual void SAL_CALL windowDeactivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
+ {
-+ if ( mpUserForm )
++// DeActivateGuard aGuard;
++// if ( mpUserForm && !aGuard.alreadyProcessing() )
++ if ( mpUserForm )
+ mpUserForm->triggerDeActivateEvent();
+ }
+
++
+ virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException)
+ {
+ OSL_TRACE("** Userform/Dialog disposing");
@@ -4049,7 +4130,6 @@
+ }
+};
+
-+
+SbUserFormModule::SbUserFormModule( const rtl::OUString& rName, const com::sun::star::script::ModuleInfo& mInfo )
+ :SbObjModule( rName, mInfo ), m_bUnloaded( true )
+{
@@ -4065,11 +4145,11 @@
+ m_xDialog = NULL;
+}
+
-+void SbUserFormModule::triggerMethod( const String& aMethod )
++void SbUserFormModule::triggerMethod( const String& aMethodToRun )
+{
-+ OSL_TRACE("*** trigger %s ***", rtl::OUStringToOString( aMethod, RTL_TEXTENCODING_UTF8 ).getStr() );
++ OSL_TRACE("*** trigger %s ***", rtl::OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8 ).getStr() );
+ // Search method
-+ SbxVariable* pMeth = SbObjModule::Find( aMethod, SbxCLASS_METHOD );
++ SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxCLASS_METHOD );
+ if( pMeth )
+ {
+ SbxValues aVals;
@@ -4079,16 +4159,15 @@
+
+void SbUserFormModule::triggerActivateEvent( void )
+{
-+ OSL_TRACE("**** SbUserFormModule::triggerActivate");
-+ static String aMethodName( RTL_CONSTASCII_USTRINGPARAM("UserForm_activate") );
-+ triggerMethod( aMethodName );
++ OSL_TRACE("**** entering SbUserFormModule::triggerActivate");
++ triggerMethod( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserForm_activate") ) );
++ OSL_TRACE("**** leaving SbUserFormModule::triggerActivate");
+}
+
+void SbUserFormModule::triggerDeActivateEvent( void )
+{
+ OSL_TRACE("**** SbUserFormModule::triggerDeActivate");
-+ static String aMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_DeActivate") );
-+ triggerMethod( aMethodName );
++ triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_DeActivate") ) );
+}
+
+void SbUserFormModule::triggerInitializeEvent( void )
@@ -4507,9 +4586,9 @@
}
}
}
---- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/msforms/makefile.mk 2008-04-03 11:33:30.000000000 +0100
-+++ oovbaapi/org/openoffice/msforms/makefile.mk 2008-04-02 21:34:52.000000000 +0100
-@@ -60,7 +60,10 @@ IDLFILES=\
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/msforms/makefile.mk 2008-04-08 12:03:51.000000000 +0100
++++ oovbaapi/org/openoffice/msforms/makefile.mk 2008-04-06 15:59:26.000000000 +0100
+@@ -60,7 +60,13 @@ IDLFILES=\
XPictureFormat.idl \
XShapeRange.idl \
XTextBoxShape.idl \
@@ -4518,6 +4597,9 @@
+ XListBox.idl \
+ XToggleButton.idl \
+ XScrollBar.idl \
++ XProgressBar.idl \
++ XMultiPage.idl \
++ XPages.idl \
# ------------------------------------------------------------------
@@ -4659,6 +4741,66 @@
+#endif
+
+
+--- /dev/null 2007-05-04 11:54:36.000000000 +0100
++++ oovbaapi/org/openoffice/msforms/XProgressBar.idl 2008-04-06 16:17:01.000000000 +0100
+@@ -0,0 +1,57 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: XLabel.idl,v $
++ *
++ * $Revision: 1.2 $
++ *
++ * last change: $Author: vg $ $Date: 2007/12/07 12:15:04 $
++ *
++ * 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_XProgressBar_idl__
++#define __org_openoffice_msforms_XProgressBar_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
++
++module org { module openoffice { module msforms {
++
++//=============================================================================
++interface XProgressBar: com::sun::star::uno::XInterface
++{
++ [attribute] any Value;
++};
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
diff -rup /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl
--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl 2007-04-27 08:32:41.000000000 +0100
+++ oovbaapi/org/openoffice/vba/XVBAToOOEventDescGen.idl 2008-03-28 10:30:34.000000000 +0000
@@ -5023,8 +5165,8 @@
//.........................................................................
namespace dlgprov
{
---- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/scripting/source/vbaevents/eventhelper.cxx 2008-03-31 15:23:06.000000000 +0100
-+++ scripting/source/vbaevents/eventhelper.cxx 2008-03-31 12:20:04.000000000 +0100
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/scripting/source/vbaevents/eventhelper.cxx 2008-04-08 14:28:35.000000000 +0100
++++ scripting/source/vbaevents/eventhelper.cxx 2008-04-03 13:28:01.000000000 +0100
@@ -23,6 +23,7 @@
#include <com/sun/star/drawing/XControlShape.hpp>
@@ -5219,18 +5361,87 @@
}
catch ( uno::Exception& e )
{
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/sc/source/ui/docshell/vbaevents.cxx 2008-04-08 14:28:35.000000000 +0100
++++ sc/source/ui/docshell/vbaevents.cxx 2008-04-06 18:32:45.000000000 +0100
+@@ -60,11 +60,7 @@ const static rtl::OUString sUrlPart2 = r
+ rtl::OUString sCodeName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWorkbook") );
+ if ( pShell )
+ {
+- if ( ScExtDocOptions* pExtDocOpts = pShell->GetDocument()->GetExtDocOptions() )
+- {
+- if ( pExtDocOpts->GetDocSettings().maGlobCodeName.Len() > 0 )
+- sCodeName = pExtDocOpts->GetDocSettings().maGlobCodeName;
+- }
++ pShell->GetDocument()->GetCodeName();
+ }
+ return sCodeName;
+ }
+@@ -103,6 +99,8 @@ bool executeWorkBookMacro( ScDocShell* p
+ String docMacroExists( ScDocShell* pShell,
+ const String& sMod, const String& sMacro )
+ {
++OSL_TRACE( "*** docMacroExists for macro %s, module ->%s<-",
++ rtl::OUStringToOString( sMacro, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( sMacro, RTL_TEXTENCODING_UTF8 ).getStr() );
+ String sFullName;
+ // would use the script provider to see if the macro exists but
+ // called at this stage tdoc content handler stuff is not set up
+@@ -137,7 +135,8 @@ const String& sMod, const String& sMacro
+ }
+ }
+ }
+- else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxCLASS_METHOD ) ) )
++ //else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxCLASS_METHOD ) ) )
++ else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxCLASS_DONTCARE ) ) )
+ {
+ if( SbModule* pModule = pMethod->GetModule() )
+ {
+@@ -159,7 +158,8 @@ bool processDocBeforeCloseMacro( ScDocSh
+ bool bCancel = sal_False;
+ aArgs[ 0 ] <<= bCancel;
+ const static String sBeforeClose( RTL_CONSTASCII_USTRINGPARAM("Workbook_BeforeClose") );
+- String sFullClose = docMacroExists( pShell, String(), sBeforeClose );
++ rtl::OUString workbookModule = getWorkbookModuleName( pShell );
++ String sFullClose = docMacroExists( pShell, workbookModule, sBeforeClose );
+ if ( sFullClose.Len() > 0 )
+ {
+ if ( !executeWorkBookMacro( pShell, sFullClose, aArgs, aRet ) )
+@@ -224,8 +224,8 @@ bool processDocOpenMacro( ScDocShell* pS
+ // until ObjectModules ( and persisting of codename ) are supported if this is a
+ // document saved from XL then we won't be able to determine the codename for the Workbook
+ // Module, so... we have no choice but to search all modules for the moment
+- //rtl::OUString workbookModule = getWorkbookModuleName( pShell );
+- rtl::OUString workbookModule; // no name means all modules will be searched
++ rtl::OUString workbookModule = getWorkbookModuleName( pShell );
++ //rtl::OUString workbookModule; // no name means all modules will be searched
+ String sFullOpen = docMacroExists( pShell, workbookModule, sOpenMacro );
+ if ( sFullOpen.Len() > 0 )
+ {
+@@ -316,12 +316,8 @@ uno::Any createRange( const uno::Any& aR
+
+ String getSheetModuleName( ScDocShell* pShell, SCTAB nTab )
+ {
+- ScExtDocOptions* pExtOptions = pShell->GetDocument()->GetExtDocOptions();
+ String aCodeName;
+- pShell->GetDocument()->GetName( nTab, aCodeName);
+- // Use code name if that exists
+- if ( pExtOptions )
+- aCodeName = pExtOptions->GetCodeName( nTab );
++ pShell->GetDocument()->GetCodeName( nTab, aCodeName);
+ return aCodeName;
+ }
+
--- /dev/null 2007-05-04 11:54:36.000000000 +0100
-+++ oovbaapi/org/openoffice/msforms/XToggleButton.idl 2008-03-28 18:06:47.000000000 +0000
-@@ -0,0 +1,60 @@
++++ oovbaapi/org/openoffice/msforms/XMultiPage.idl 2008-04-11 11:36:12.000000000 +0100
+@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
-+ * $RCSfile: XButton.idl,v $
++ * $RCSfile: XLabel.idl,v $
+ *
+ * $Revision: 1.2 $
+ *
-+ * last change: $Author: vg $ $Date: 2007/12/07 12:14:23 $
++ * last change: $Author: vg $ $Date: 2007/12/07 12:15:04 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
@@ -5256,23 +5467,21 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#ifndef __org_openoffice_msforms_XToggleButton_idl__
-+#define __org_openoffice_msforms_XToggleButton_idl__
++#ifndef __org_openoffice_msforms_XMultiPage_idl__
++#define __org_openoffice_msforms_XMultiPage_idl__
+
-+#ifndef __org_openoffice_msforms_XButton_idl__
-+#include <org/openoffice/msforms/XButton.idl>
-+#endif
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+//=============================================================================
+
+module org { module openoffice { module msforms {
++
+//=============================================================================
-+interface XToggleButton
++interface XMultiPage: com::sun::star::uno::XInterface
+{
-+ interface XButton;
-+ [attribute] any Value;
++ [attribute] long Value;
++ any Pages( [in] any index );
+};
+
+//=============================================================================
@@ -5283,17 +5492,17 @@
+
+
--- /dev/null 2007-05-04 11:54:36.000000000 +0100
-+++ sc/source/ui/vba/vbatogglebutton.hxx 2008-03-28 22:48:49.000000000 +0000
-@@ -0,0 +1,64 @@
++++ oovbaapi/org/openoffice/msforms/XPages.idl 2008-04-11 11:43:23.000000000 +0100
+@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
-+ * $RCSfile: vbabutton.hxx,v $
++ * $RCSfile: XLabel.idl,v $
+ *
+ * $Revision: 1.2 $
+ *
-+ * last change: $Author: vg $ $Date: 2007/12/07 10:45:09 $
++ * last change: $Author: vg $ $Date: 2007/12/07 12:15:04 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
@@ -5319,48 +5528,45 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#ifndef SC_VBA_TOGGLEBUTTON_HXX
-+#define SC_VBA_TOGGLEBUTTON_HXX
-+#include <cppuhelper/implbase2.hxx>
-+#include <org/openoffice/msforms/XToggleButton.hpp>
++#ifndef __org_openoffice_msforms_XPage_idl__
++#define __org_openoffice_msforms_XPage_idl__
+
-+#include "vbacontrol.hxx"
-+#include "vbahelper.hxx"
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++#ifndef __org_openoffice_vba_XCollection_idl__
++#include <org/openoffice/vba/XCollection.idl>
++#endif
+
-+typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XToggleButton, css::script::XDefaultProperty > ToggleButtonImpl_BASE;
++//=============================================================================
+
-+class ScVbaToggleButton : public ToggleButtonImpl_BASE
-+{
-+ rtl::OUString msDftPropName;
-+public:
-+ ScVbaToggleButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
-+ const css::uno::Reference< css::uno::XInterface >& xControl );
-+ ~ScVbaToggleButton();
-+ // 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);
++module org { module openoffice { module msforms {
+
-+ virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
-+ virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
-+ //XHelperInterface
-+ virtual rtl::OUString& getServiceImplName();
-+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-+ // XDefaultProperty
-+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++//=============================================================================
++interface XPages
++{
++ interface org::openoffice::vba::XCollection;
+};
-+#endif //SC_VBA_TOGGLEBUTTON_HXX
++
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
--- /dev/null 2007-05-04 11:54:36.000000000 +0100
-+++ sc/source/ui/vba/vbatogglebutton.cxx 2008-03-28 22:49:45.000000000 +0000
-@@ -0,0 +1,108 @@
++++ oovbaapi/org/openoffice/msforms/XToggleButton.idl 2008-03-28 18:06:47.000000000 +0000
+@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
-+ * $RCSfile: vbabutton.cxx,v $
++ * $RCSfile: XButton.idl,v $
+ *
+ * $Revision: 1.2 $
+ *
-+ * last change: $Author: vg $ $Date: 2007/12/07 10:44:58 $
++ * last change: $Author: vg $ $Date: 2007/12/07 12:14:23 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
@@ -5386,23 +5592,508 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
-+#include "vbatogglebutton.hxx"
-+#include <vector>
-+
-+using namespace com::sun::star;
-+using namespace org::openoffice;
++#ifndef __org_openoffice_msforms_XToggleButton_idl__
++#define __org_openoffice_msforms_XToggleButton_idl__
+
++#ifndef __org_openoffice_msforms_XButton_idl__
++#include <org/openoffice/msforms/XButton.idl>
++#endif
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++//=============================================================================
+
-+const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-+const static rtl::OUString TOGGLE( RTL_CONSTASCII_USTRINGPARAM("Toggle") );
-+const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
-+ScVbaToggleButton::ScVbaToggleButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ) : ToggleButtonImpl_BASE( xContext, xControl )
++module org { module openoffice { module msforms {
++//=============================================================================
++interface XToggleButton
+{
-+ OSL_TRACE("ScVbaToggleButton(ctor)");
-+ m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
-+}
++ interface XButton;
++ [attribute] any Value;
++};
+
-+ScVbaToggleButton::~ScVbaToggleButton()
++//=============================================================================
++
++}; }; };
++
++#endif
++
++
+--- /dev/null 2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbamultipage.hxx 2008-04-11 16:13:20.000000000 +0100
+@@ -0,0 +1,66 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: vbalabel.hxx,v $
++ *
++ * $Revision: 1.2 $
++ *
++ * last change: $Author: vg $ $Date: 2007/12/07 10:54:46 $
++ *
++ * 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_MULTIPAGE_HXX
++#define SC_VBA_MULTIPAGE_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <org/openoffice/msforms/XMultiPage.hpp>
++#include <com/sun/star/container/XIndexAccess.hpp>
++
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++//#include <cppuhelper/implbase2.hxx>
++#include <cppuhelper/implbase1.hxx>
++
++typedef cppu::ImplInheritanceHelper1< ScVbaControl, oo::msforms::XMultiPage > MultiPageImpl_BASE;
++
++class ScVbaMultiPage : public MultiPageImpl_BASE
++{
++ css::uno::Reference< css::container::XIndexAccess > getPages( sal_Int32 nPages );
++ css::uno::Reference< css::beans::XPropertySet > mxDialogProps;
++public:
++ ScVbaMultiPage( const css::uno::Reference< css::uno::XComponentContext >& xContext,
++ const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::uno::XInterface >& xDialog );
++ // Attributes
++ virtual sal_Int32 SAL_CALL getValue() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setValue( const sal_Int32 _value ) throw (css::uno::RuntimeException);
++ virtual css::uno::Any SAL_CALL Pages( const css::uno::Any& index ) throw (css::uno::RuntimeException);
++
++ //XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++ // XDefaultProperty
++ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++};
++#endif //SC_VBA_LABEL_HXX
+--- /dev/null 2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbamultipage.cxx 2008-04-11 17:31:01.000000000 +0100
+@@ -0,0 +1,132 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: vbalabel.cxx,v $
++ *
++ * $Revision: 1.2 $
++ *
++ * last change: $Author: vg $ $Date: 2007/12/07 10:54:35 $
++ *
++ * 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 "vbamultipage.hxx"
++#include <org/openoffice/vba/XCollection.hpp>
++#include "vbapages.hxx"
++#include <vector>
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++// uno servicename com.sun.star.awt.UnoControlProgressBarMode
++const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
++const rtl::OUString SVALUEMAX( RTL_CONSTASCII_USTRINGPARAM("ProgressValueMax") );
++const rtl::OUString SSTEP( RTL_CONSTASCII_USTRINGPARAM("Step") );
++
++typedef cppu::WeakImplHelper1< container::XIndexAccess > PagesImpl_Base;
++class PagesImpl : public PagesImpl_Base
++{
++ sal_Int32 mnPages;
++public:
++ PagesImpl( sal_Int32 nPages ) : mnPages( nPages ) {}
++ virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException) { return mnPages; }
++ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, ::uno::RuntimeException)
++ {
++ if ( Index < 0 || Index > mnPages )
++ throw lang::IndexOutOfBoundsException();
++ return uno::makeAny( uno::Reference< uno::XInterface >() );
++ }
++ // XElementAccess
++ virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException)
++ {
++ // no Pages object yet #FIXME
++ //return msforms::XPage::static_type(0);
++ return uno::XInterface::static_type(0);
++ }
++ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
++ {
++ return ( mnPages > 0 );
++ }
++};
++uno::Reference< container::XIndexAccess >
++ScVbaMultiPage::getPages( sal_Int32 nPages )
++{
++ return new PagesImpl( nPages );
++}
++
++ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< uno::XInterface >& xDialog ) : MultiPageImpl_BASE( xContext, xControl )
++{
++ mxDialogProps.set( xDialog, uno::UNO_QUERY_THROW );
++ // set dialog step to value of multipage pseudo model
++ setValue(getValue());
++}
++
++// Attributes
++sal_Int32 SAL_CALL
++ScVbaMultiPage::getValue() throw (css::uno::RuntimeException)
++{
++ sal_Int32 nValue = 0;
++ m_xProps->getPropertyValue( SVALUE ) >>= nValue;
++ return nValue;
++}
++
++void SAL_CALL
++ScVbaMultiPage::setValue( const sal_Int32 _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++ // track change in dialog ( dialog value is 1 based, 0 is a special value )
++ m_xProps->setPropertyValue( SVALUE, uno::makeAny( _value ) );
++ mxDialogProps->setPropertyValue( SSTEP, uno::makeAny( _value + 1) );
++}
++
++
++rtl::OUString&
++ScVbaMultiPage::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMultiPage") );
++ return sImplName;
++}
++
++uno::Any SAL_CALL
++ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException)
++{
++ sal_Int32 nValue = 0;
++ m_xProps->getPropertyValue( SVALUEMAX ) >>= nValue;
++ uno::Reference< vba::XCollection > xColl( new ScVbaPages( this, mxContext, getPages( nValue ) ) );
++ if ( !index.hasValue() )
++ return uno::makeAny( xColl );
++ return xColl->Item( uno::makeAny( index ), uno::Any() );
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaMultiPage::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.MultiPage" ) );
++ }
++ return aServiceNames;
++}
+--- /dev/null 2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbapages.hxx 2008-04-11 15:15:32.000000000 +0100
+@@ -0,0 +1,64 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: vbashape.hxx,v $
++ *
++ * $Revision: 1.2 $
++ *
++ * last change: $Author: vg $ $Date: 2007/12/07 11:02:09 $
++ *
++ * 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_PAGES_HXX
++#define SC_VBA_PAGES_HXX
++
++#include <org/openoffice/office/MsoShapeType.hpp>
++#include <com/sun/star/lang/XEventListener.hpp>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include <org/openoffice/msforms/XPages.hpp>
++#include <cppuhelper/implbase2.hxx>
++#include <cppuhelper/implbase1.hxx>
++
++#include "vbacollectionimpl.hxx"
++typedef CollTestImplHelper<
++oo::msforms::XPages > ScVbaPages_BASE;
++
++class ScVbaPages : public ScVbaPages_BASE
++{
++protected:
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++public:
++ ScVbaPages( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xPages ) throw ( css::lang::IllegalArgumentException );
++ virtual ~ScVbaPages() {}
++ // XEnumerationAccess
++ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
++ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
++ // ScVbaPages_BASE
++ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
++
++};
++#endif//SC_VBA_SHAPE_HXX
+--- /dev/null 2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbapages.cxx 2008-04-11 15:17:33.000000000 +0100
+@@ -0,0 +1,81 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: vbashape.cxx,v $
++ *
++ * $Revision: 1.3 $
++ *
++ * last change: $Author: kz $ $Date: 2007/12/14 12:41:26 $
++ *
++ * 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 "vbapages.hxx"
++
++using namespace ::org::openoffice;
++using namespace ::com::sun::star;
++using namespace ::vos;
++
++ScVbaPages::ScVbaPages( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xPages ) throw( lang::IllegalArgumentException ) : ScVbaPages_BASE( xParent, xContext, xPages )
++{
++}
++
++uno::Type SAL_CALL
++ScVbaPages::getElementType() throw (uno::RuntimeException)
++{
++ // return msforms::XPage::static_type(0);
++ return uno::XInterface::static_type(0);
++}
++
++uno::Any
++ScVbaPages::createCollectionObject( const css::uno::Any& aSource )
++{
++ return aSource;
++}
++
++rtl::OUString&
++ScVbaPages::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPages") );
++ return sImplName;
++}
++
++uno::Reference< container::XEnumeration > SAL_CALL
++ScVbaPages::createEnumeration() throw (uno::RuntimeException)
++{
++ return uno::Reference< container::XEnumeration >();
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaPages::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msform.Pages" ) );
++ }
++ return aServiceNames;
++}
+--- /dev/null 2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbatogglebutton.hxx 2008-03-28 22:48:49.000000000 +0000
+@@ -0,0 +1,64 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: vbabutton.hxx,v $
++ *
++ * $Revision: 1.2 $
++ *
++ * last change: $Author: vg $ $Date: 2007/12/07 10:45:09 $
++ *
++ * 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_TOGGLEBUTTON_HXX
++#define SC_VBA_TOGGLEBUTTON_HXX
++#include <cppuhelper/implbase2.hxx>
++#include <org/openoffice/msforms/XToggleButton.hpp>
++
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XToggleButton, css::script::XDefaultProperty > ToggleButtonImpl_BASE;
++
++class ScVbaToggleButton : public ToggleButtonImpl_BASE
++{
++ rtl::OUString msDftPropName;
++public:
++ ScVbaToggleButton( const css::uno::Reference< css::uno::XComponentContext >& xContext,
++ const css::uno::Reference< css::uno::XInterface >& xControl );
++ ~ScVbaToggleButton();
++ // 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 rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
++ virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
++ //XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++ // XDefaultProperty
++ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++};
++#endif //SC_VBA_TOGGLEBUTTON_HXX
+--- /dev/null 2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbatogglebutton.cxx 2008-03-28 22:49:45.000000000 +0000
+@@ -0,0 +1,108 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: vbabutton.cxx,v $
++ *
++ * $Revision: 1.2 $
++ *
++ * last change: $Author: vg $ $Date: 2007/12/07 10:44:58 $
++ *
++ * 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 "vbatogglebutton.hxx"
++#include <vector>
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++
++const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
++const static rtl::OUString TOGGLE( RTL_CONSTASCII_USTRINGPARAM("Toggle") );
++const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
++ScVbaToggleButton::ScVbaToggleButton( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ) : ToggleButtonImpl_BASE( xContext, xControl )
++{
++ OSL_TRACE("ScVbaToggleButton(ctor)");
++ m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
++}
++
++ScVbaToggleButton::~ScVbaToggleButton()
+{
+ OSL_TRACE("~ScVbaToggleButton(dtor)");
+}
@@ -5793,3 +6484,527 @@
+ }
+ return aServiceNames;
+}
+--- /dev/null 2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbaprogressbar.hxx 2008-04-06 16:14:29.000000000 +0100
+@@ -0,0 +1,60 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: vbalabel.hxx,v $
++ *
++ * $Revision: 1.2 $
++ *
++ * last change: $Author: vg $ $Date: 2007/12/07 10:54:46 $
++ *
++ * 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_PROGRESSBAR_HXX
++#define SC_VBA_PROGRESSBAR_HXX
++#include <cppuhelper/implbase1.hxx>
++#include <org/openoffice/msforms/XProgressBar.hpp>
++
++#include "vbacontrol.hxx"
++#include "vbahelper.hxx"
++#include <cppuhelper/implbase2.hxx>
++
++typedef cppu::ImplInheritanceHelper2< ScVbaControl, oo::msforms::XProgressBar, css::script::XDefaultProperty > ProgressBarImpl_BASE;
++
++class ScVbaProgressBar : public ProgressBarImpl_BASE
++{
++public:
++ ScVbaProgressBar( const css::uno::Reference< css::uno::XComponentContext >& xContext,
++ const css::uno::Reference< css::uno::XInterface >& xControl );
++ // 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);
++ //XHelperInterface
++ virtual rtl::OUString& getServiceImplName();
++ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++ // XDefaultProperty
++ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
++};
++#endif //SC_VBA_LABEL_HXX
+--- /dev/null 2007-05-04 11:54:36.000000000 +0100
++++ sc/source/ui/vba/vbaprogressbar.cxx 2008-04-06 16:26:30.000000000 +0100
+@@ -0,0 +1,78 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: vbalabel.cxx,v $
++ *
++ * $Revision: 1.2 $
++ *
++ * last change: $Author: vg $ $Date: 2007/12/07 10:54:35 $
++ *
++ * 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 "vbaprogressbar.hxx"
++#include <vector>
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++// uno servicename com.sun.star.awt.UnoControlProgressBarMode
++const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
++
++ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl ) : ProgressBarImpl_BASE( xContext, xControl )
++{
++}
++
++// Attributes
++uno::Any SAL_CALL
++ScVbaProgressBar::getValue() throw (css::uno::RuntimeException)
++{
++ return m_xProps->getPropertyValue( SVALUE );
++}
++
++void SAL_CALL
++ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
++{
++ m_xProps->setPropertyValue( SVALUE, _value );
++}
++
++rtl::OUString&
++ScVbaProgressBar::getServiceImplName()
++{
++ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar") );
++ return sImplName;
++}
++
++uno::Sequence< rtl::OUString >
++ScVbaProgressBar::getServiceNames()
++{
++ static uno::Sequence< rtl::OUString > aServiceNames;
++ if ( aServiceNames.getLength() == 0 )
++ {
++ aServiceNames.realloc( 1 );
++ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.msforms.Label" ) );
++ }
++ return aServiceNames;
++}
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/toolkit/inc/toolkit/controls/unocontrols.hxx 2008-01-24 15:27:45.000000000 +0000
++++ toolkit/inc/toolkit/controls/unocontrols.hxx 2008-04-11 07:03:51.000000000 +0100
+@@ -734,6 +734,44 @@ public:
+
+ };
+
++class UnoMultiPageModel : public UnoControlModel
++{
++protected:
++ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
++ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
++
++public:
++ UnoMultiPageModel();
++ UnoMultiPageModel( const UnoMultiPageModel& rModel ) : UnoControlModel( rModel ) {;}
++
++ UnoControlModel* Clone() const { return new UnoMultiPageModel( *this ); }
++
++ // ::com::sun::star::io::XPersistObject
++ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
++
++ // ::com::sun::star::beans::XMultiPropertySet
++ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
++
++ // ::com::sun::star::lang::XServiceInfo
++ DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageModel, UnoControlModel, szServiceName_UnoMultiPageModel )
++
++};
++// ----------------------------------------------------
++// class UnoGroupBoxControl
++// ----------------------------------------------------
++class UnoMultiPageControl : public UnoControlBase
++{
++public:
++ UnoMultiPageControl();
++ ::rtl::OUString GetComponentServiceName();
++
++ sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
++
++ // ::com::sun::star::lang::XServiceInfo
++ DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageControl, UnoControlBase, szServiceName_UnoMultiPageControl )
++
++};
++
+ // ----------------------------------------------------
+ // class UnoFixedTextControl
+ // ----------------------------------------------------
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/toolkit/source/controls/unocontrols.cxx 2008-01-24 15:30:00.000000000 +0000
++++ toolkit/source/controls/unocontrols.cxx 2008-04-11 11:07:03.000000000 +0100
+@@ -1887,6 +1887,77 @@ sal_Bool UnoGroupBoxControl::isTranspare
+ return sal_True;
+ }
+
++// MultiPage
++
++UnoMultiPageModel::UnoMultiPageModel()
++{
++ ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
++ ImplRegisterProperty( BASEPROPERTY_ENABLED );
++ ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR );
++ ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
++ ImplRegisterProperty( BASEPROPERTY_HELPURL );
++ ImplRegisterProperty( BASEPROPERTY_LABEL );
++ ImplRegisterProperty( BASEPROPERTY_PRINTABLE );
++ ImplRegisterProperty( BASEPROPERTY_PROGRESSVALUE );
++ ImplRegisterProperty( BASEPROPERTY_PROGRESSVALUE_MAX );
++}
++
++::rtl::OUString UnoMultiPageModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
++{
++ return ::rtl::OUString::createFromAscii( szServiceName_UnoMultiPageModel );
++}
++
++uno::Any UnoMultiPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
++{
++ if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
++ {
++ uno::Any aAny;
++ aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoControlGroupBox );
++ //aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoMultiPageControl );
++ return aAny;
++ }
++ return UnoControlModel::ImplGetDefaultValue( nPropId );
++}
++
++::cppu::IPropertyArrayHelper& UnoMultiPageModel::getInfoHelper()
++{
++ static UnoPropertyArrayHelper* pHelper = NULL;
++ if ( !pHelper )
++ {
++ uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
++ pHelper = new UnoPropertyArrayHelper( aIDs );
++ }
++ return *pHelper;
++}
++
++// beans::XMultiPropertySet
++uno::Reference< beans::XPropertySetInfo > UnoMultiPageModel::getPropertySetInfo( ) throw(uno::RuntimeException)
++{
++ static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
++ return xInfo;
++}
++
++// ----------------------------------------------------
++// class MultiPageControl
++// ----------------------------------------------------
++UnoMultiPageControl::UnoMultiPageControl()
++{
++ maComponentInfos.nWidth = 100;
++ maComponentInfos.nHeight = 100;
++}
++
++::rtl::OUString UnoMultiPageControl::GetComponentServiceName()
++{
++ return ::rtl::OUString::createFromAscii( "multipage" );
++}
++
++sal_Bool UnoMultiPageControl::isTransparent() throw(uno::RuntimeException)
++{
++ return sal_True;
++}
++
++
++
+ // ----------------------------------------------------
+ // class UnoControlListBoxModel
+ // ----------------------------------------------------
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/toolkit/inc/toolkit/helper/servicenames.hxx 2008-01-24 15:28:36.000000000 +0000
++++ toolkit/inc/toolkit/helper/servicenames.hxx 2008-04-09 14:22:19.000000000 +0100
+@@ -50,6 +50,8 @@ extern const sal_Char __FAR_DATA szServi
+ extern const sal_Char __FAR_DATA szServiceName_MenuBar[], szServiceName2_MenuBar[];
+ extern const sal_Char __FAR_DATA szServiceName_Pointer[], szServiceName2_Pointer[];
+ extern const sal_Char __FAR_DATA szServiceName_UnoControlContainer[], szServiceName2_UnoControlContainer[];
++extern const sal_Char __FAR_DATA szServiceName_UnoMultiPageControl[], szServiceName2_UnoMultiPageControl[];
++extern const sal_Char __FAR_DATA szServiceName_UnoMultiPageModel[], szServiceName2_UnoMultiPageModel[];
+ extern const sal_Char __FAR_DATA szServiceName_UnoControlContainerModel[], szServiceName2_UnoControlContainerModel[];
+ extern const sal_Char __FAR_DATA szServiceName_TabController[], szServiceName2_TabController[];
+ extern const sal_Char __FAR_DATA szServiceName_TabControllerModel[], szServiceName2_TabControllerModel[];
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/toolkit/source/helper/servicenames.cxx 2008-01-24 15:31:21.000000000 +0000
++++ toolkit/source/helper/servicenames.cxx 2008-04-09 15:26:36.000000000 +0100
+@@ -51,6 +51,8 @@ const sal_Char __FAR_DATA szServiceName_
+ const sal_Char __FAR_DATA szServiceName_MenuBar[] = "stardiv.vcl.MenuBar", szServiceName2_MenuBar[] = "com.sun.star.awt.MenuBar";
+ const sal_Char __FAR_DATA szServiceName_Pointer[] = "stardiv.vcl.Pointer", szServiceName2_Pointer[] = "com.sun.star.awt.Pointer";
+ const sal_Char __FAR_DATA szServiceName_UnoControlContainer[] = "stardiv.vcl.control.ControlContainer", szServiceName2_UnoControlContainer[] = "com.sun.star.awt.UnoControlContainer";
++
++
+ const sal_Char __FAR_DATA szServiceName_UnoControlContainerModel[] = "stardiv.vcl.controlmodel.ControlContainer", szServiceName2_UnoControlContainerModel[] = "com.sun.star.awt.UnoControlContainerModel";
+ const sal_Char __FAR_DATA szServiceName_TabController[] = "stardiv.vcl.control.TabController", szServiceName2_TabController[] = "com.sun.star.awt.TabController";
+ const sal_Char __FAR_DATA szServiceName_TabControllerModel[] = "stardiv.vcl.controlmodel.TabController", szServiceName2_TabControllerModel[] = "com.sun.star.awt.TabControllerModel";
+@@ -103,6 +105,8 @@ const sal_Char __FAR_DATA szServiceName_
+ const sal_Char __FAR_DATA szServiceName_UnoControlRoadmapModel[] = "stardiv.vcl.controlmodel.Roadmap", szServiceName2_UnoControlRoadmapModel[] = "com.sun.star.awt.UnoControlRoadmapModel";
+ const sal_Char __FAR_DATA szServiceName_UnoSpinButtonControl[] = "com.sun.star.awt.UnoControlSpinButton";
+ const sal_Char __FAR_DATA szServiceName_UnoSpinButtonModel[] = "com.sun.star.awt.UnoControlSpinButtonModel";
++const sal_Char __FAR_DATA szServiceName_UnoMultiPageControl[] = "com.sun.star.awt.UnoControlMultiPage";
++const sal_Char __FAR_DATA szServiceName_UnoMultiPageModel[] = "com.sun.star.awt.UnoMultiPageModel";
+ const sal_Char __FAR_DATA szServiceName_TreeControl[] = "com.sun.star.awt.tree.TreeControl";
+ const sal_Char __FAR_DATA szServiceName_TreeControlModel[] = "com.sun.star.awt.tree.TreeControlModel";
+ const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[] = "com.sun.star.awt.tree.MutableTreeDataModel";
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/toolkit/source/helper/registerservices.cxx 2008-01-24 15:31:06.000000000 +0000
++++ toolkit/source/helper/registerservices.cxx 2008-04-11 06:39:56.000000000 +0100
+@@ -230,6 +230,7 @@ IMPL_CREATEINSTANCE( UnoControlTimeField
+ IMPL_CREATEINSTANCE( UnoControlProgressBarModel )
+ IMPL_CREATEINSTANCE( UnoControlScrollBarModel )
+ IMPL_CREATEINSTANCE( UnoSpinButtonModel )
++IMPL_CREATEINSTANCE( UnoMultiPageModel )
+ IMPL_CREATEINSTANCE( UnoControlFixedLineModel )
+ IMPL_CREATEINSTANCE( UnoCurrencyFieldControl )
+ IMPL_CREATEINSTANCE( UnoDateFieldControl )
+@@ -249,6 +250,7 @@ IMPL_CREATEINSTANCE( UnoTimeFieldControl
+ IMPL_CREATEINSTANCE( UnoProgressBarControl )
+ IMPL_CREATEINSTANCE( UnoScrollBarControl )
+ IMPL_CREATEINSTANCE( UnoSpinButtonControl )
++IMPL_CREATEINSTANCE( UnoMultiPageControl )
+ IMPL_CREATEINSTANCE( UnoFixedLineControl )
+ IMPL_CREATEINSTANCE( VCLXMenuBar )
+ IMPL_CREATEINSTANCE( VCLXPointer )
+@@ -333,6 +335,8 @@ TOOLKIT_DLLPUBLIC sal_Bool SAL_CALL comp
+ registerServices( xRegistryKey, "UnoControlScrollBarModel", szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel );
+ registerServices( xRegistryKey, "UnoSpinButtonModel", szServiceName_UnoSpinButtonModel );
+ registerServices( xRegistryKey, "UnoSpinButtonControl", szServiceName_UnoSpinButtonControl );
++ registerServices( xRegistryKey, "UnoMultiPageModel", szServiceName_UnoMultiPageModel );
++ registerServices( xRegistryKey, "UnoMultiPageControl", szServiceName_UnoMultiPageControl );
+ registerServices( xRegistryKey, "UnoFixedLineControl", szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine );
+ registerServices( xRegistryKey, "UnoControlFixedLineModel", szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel );
+ registerServices( xRegistryKey, "VCLXPrinterServer", szServiceName_PrinterServer, szServiceName2_PrinterServer );
+@@ -416,6 +420,8 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL compone
+ CHECKANDCREATEFACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer )
+ CHECKANDCREATEFACTORY( UnoRoadmapControl, szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap )
+ CHECKANDCREATEFACTORY( UnoControlRoadmapModel, szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel )
++ CHECKANDCREATEFACTORY( UnoMultiPageModel, szServiceName_UnoMultiPageModel, NULL )
++ CHECKANDCREATEFACTORY( UnoMultiPageControl, szServiceName_UnoMultiPageControl, NULL )
+ CHECKANDCREATEFACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL )
+ CHECKANDCREATEFACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL )
+ CHECKANDCREATEFACTORY( TreeControl, szServiceName_TreeControl, NULL )
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/xmlscript/source/xmldlg_imexp/exp_share.hxx 2008-01-24 15:37:13.000000000 +0000
++++ xmlscript/source/xmldlg_imexp/exp_share.hxx 2008-04-10 23:00:27.000000000 +0100
+@@ -179,6 +179,8 @@ public:
+ //
+ void readDialogModel( StyleBag * all_styles )
+ SAL_THROW( (css::uno::Exception) );
++ void readMultiPageModel( StyleBag * all_styles )
++ SAL_THROW( (css::uno::Exception) );
+ void readButtonModel( StyleBag * all_styles )
+ SAL_THROW( (css::uno::Exception) );
+ void readEditModel( StyleBag * all_styles )
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/xmlscript/source/xmldlg_imexp/imp_share.hxx 2008-01-24 15:37:27.000000000 +0000
++++ xmlscript/source/xmldlg_imexp/imp_share.hxx 2008-04-10 17:10:24.000000000 +0100
+@@ -1004,6 +1004,27 @@ public:
+ };
+
+ //==============================================================================
++class MultiPage
++ : public ControlElement
++{
++public:
++ virtual css::uno::Reference< css::xml::input::XElement >
++ SAL_CALL startChildElement(
++ sal_Int32 nUid, ::rtl::OUString const & rLocalName,
++ css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
++ throw (css::xml::sax::SAXException, css::uno::RuntimeException);
++ virtual void SAL_CALL endElement()
++ throw (css::xml::sax::SAXException, css::uno::RuntimeException);
++
++ inline MultiPage(
++ ::rtl::OUString const & rLocalName,
++ css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
++ ElementBase * pParent, DialogImport * pImport )
++ SAL_THROW( () )
++ : ControlElement( rLocalName, xAttributes, pParent, pImport )
++ {}
++};
++
+ class ProgressBarElement
+ : public ControlElement
+ {
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx 2008-01-24 15:37:42.000000000 +0000
++++ xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx 2008-04-11 10:55:48.000000000 +0100
+@@ -73,6 +73,42 @@ static inline bool readFontProps( Elemen
+ }
+
+ //__________________________________________________________________________________________________
++void ElementDescriptor::readMultiPageModel( StyleBag * all_styles )
++{
++ // collect styles
++ Style aStyle( 0x2 | 0x8 | 0x20 );
++ if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
++ aStyle._set |= 0x2;
++ if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
++ aStyle._set |= 0x20;
++ if (readFontProps( this, aStyle ))
++ aStyle._set |= 0x8;
++ if (aStyle._set)
++ {
++ addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
++ all_styles->getStyleId( aStyle ) );
++ }
++
++ // collect elements
++ readDefaults();
++ readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") ),
++ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
++ readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ProgressValueMax") ),
++ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-max") ) );
++
++ OUString aTitle;
++ if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ) ) >>= aTitle)
++ {
++ ElementDescriptor * title = new ElementDescriptor(
++ _xProps, _xPropState,
++ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":title") ) );
++ title->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ),
++ aTitle );
++ addSubElement( title );
++ }
++
++ readEvents();
++}
+ void ElementDescriptor::readButtonModel( StyleBag * all_styles )
+ SAL_THROW( (Exception) )
+ {
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx 2008-01-24 15:37:58.000000000 +0000
++++ xmlscript/source/xmldlg_imexp/xmldlg_export.cxx 2008-04-14 16:29:10.000000000 +0100
+@@ -1409,6 +1409,14 @@ void SAL_CALL exportDialogModel(
+ xElem = static_cast< xml::sax::XAttributeList * >( pElem );
+ pElem->readGroupBoxModel( &all_styles );
+ }
++ else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ) )
++ {
++ pElem = new ElementDescriptor(
++ xProps, xPropState,
++ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multipage") ) );
++ xElem = static_cast< xml::sax::XAttributeList * >( pElem );
++ pElem->readMultiPageModel( &all_styles );
++ }
+ else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedTextModel") ) ) )
+ {
+ pElem = new ElementDescriptor(
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx 2008-01-24 15:38:13.000000000 +0000
++++ xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx 2008-04-11 10:53:21.000000000 +0100
+@@ -47,6 +47,69 @@ using ::rtl::OUString;
+
+ namespace xmlscript
+ {
++Reference< xml::input::XElement > MultiPage::startChildElement(
++ sal_Int32 nUid, OUString const & rLocalName,
++ Reference< xml::input::XAttributes > const & xAttributes )
++ throw (xml::sax::SAXException, RuntimeException)
++{
++ // event
++rtl::OUString _label = rtl::OUString::createFromAscii("foo");
++ if (_pImport->isEventElement( nUid, rLocalName ))
++ {
++ return new EventElement(
++ nUid, rLocalName, xAttributes, this, _pImport );
++ }
++ else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("title") ))
++ {
++ getStringAttr( &_label,
++ OUString( RTL_CONSTASCII_USTRINGPARAM("value") ),
++ xAttributes,
++ _pImport->XMLNS_DIALOGS_UID );
++
++ return new ElementBase(
++ _pImport->XMLNS_DIALOGS_UID,
++ rLocalName, xAttributes, this, _pImport );
++ }
++ else
++ {
++
++ throw xml::sax::SAXException(
++ OUString( RTL_CONSTASCII_USTRINGPARAM("expected event element!") ),
++ Reference< XInterface >(), Any() );
++ }
++}
++//__________________________________________________________________________________________________
++
++void MultiPage::endElement()
++ throw (xml::sax::SAXException, RuntimeException)
++{
++ ControlImportContext ctx(
++ _pImport, getControlId( _xAttributes ),
++ OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) );
++// OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ) );
++ Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
++
++ Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
++ if (xStyle.is())
++ {
++ StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
++ pStyle->importTextColorStyle( xControlModel );
++ pStyle->importTextLineColorStyle( xControlModel );
++ pStyle->importFontStyle( xControlModel );
++ }
++
++ ctx.importDefaults( 0, 0, _xAttributes ); // inherited from BulletinBoardElement
++ ctx.importLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") ),
++ OUString( RTL_CONSTASCII_USTRINGPARAM("value") ),
++ _xAttributes );
++ ctx.importLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ProgressValueMax") ),
++ OUString( RTL_CONSTASCII_USTRINGPARAM("value-max") ),
++ _xAttributes );
++ ctx.importEvents( _events );
++ // avoid ring-reference:
++ // vector< event elements > holding event elements holding this (via _pParent)
++ _events.clear();
++}
+
+ // progessmeter
+ //__________________________________________________________________________________________________
+@@ -2106,6 +2169,10 @@ Reference< xml::input::XElement > Bullet
+ {
+ return new ProgressBarElement( rLocalName, xAttributes, this, _pImport );
+ }
++ else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("multipage") ))
++ {
++ return new MultiPage( rLocalName, xAttributes, this, _pImport );
++ }
+ // bulletinboard
+ else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bulletinboard") ))
+ {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]