ooo-build r11279 - in trunk/scratch: offapi-vba sc-vba



Author: jiaojh
Date: Wed Jan 16 07:44:30 2008
New Revision: 11279
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11279&view=rev

Log:
Add XAssistant and implementation to scratch.
Add Assistant to XApplication


Added:
   trunk/scratch/offapi-vba/oovbaapi-org-openoffice-vba-makefile-mk.diff
   trunk/scratch/offapi-vba/oovbaapi-org-openoffice-vba-xassistant-idl.diff
   trunk/scratch/sc-vba/sc-source-ui-vba-makefile-mk.diff
   trunk/scratch/sc-vba/sc-source-ui-vba-vbaassistant-cxx.diff
   trunk/scratch/sc-vba/sc-source-ui-vba-vbaassistant-hxx.diff
Modified:
   trunk/scratch/offapi-vba/oovbaapi-org-openoffice-excel-xapplication-idl.diff
   trunk/scratch/sc-vba/sc-source-ui-vba-vbaapplication-cxx.diff
   trunk/scratch/sc-vba/sc-source-ui-vba-vbaapplication-hxx.diff

Modified: trunk/scratch/offapi-vba/oovbaapi-org-openoffice-excel-xapplication-idl.diff
==============================================================================
--- trunk/scratch/offapi-vba/oovbaapi-org-openoffice-excel-xapplication-idl.diff	(original)
+++ trunk/scratch/offapi-vba/oovbaapi-org-openoffice-excel-xapplication-idl.diff	Wed Jan 16 07:44:30 2008
@@ -1,6 +1,25 @@
---- oovbaapi/org/openoffice//excel/XApplication.idl	
-+++ oovbaapi/org/openoffice//excel/XApplication.idl
-@@ -93,7 +93,7 @@ interface XApplication
+--- oovbaapi/org/openoffice/excel/XApplication.idl.orig	2008-01-16 14:13:52.000000000 +0800
++++ oovbaapi/org/openoffice/excel/XApplication.idl	2008-01-16 15:28:46.000000000 +0800
+@@ -43,6 +43,10 @@
+ #include <org/openoffice/vba/XHelperInterface.idl>
+ #endif
+ 
++#ifndef __org_openoffice_vba_XAssistant_idl__
++#include <org/openoffice/vba/XAssistant.idl>
++#endif
++
+ module org {  module openoffice {  module excel { 
+ 
+ interface XRange;
+@@ -63,6 +67,7 @@ interface XApplication
+ 	[attribute, readonly] XRange ActiveCell;
+ 	[attribute, readonly] XWindow ActiveWindow;
+ 	[attribute, readonly] XWorksheet ActiveSheet;
++    [attribute, readonly] org::openoffice::vba::XAssistant Assistant;
+ 	[attribute] long Calculation;
+ 	//#TODO #FIXME this is more of a placeholder, will return
+ 	// the value of activeworkbook, in xl 'ThisWorkbook' should return the
+@@ -93,7 +98,7 @@ interface XApplication
  	any Evaluate( [in] string Name );
  	any Dialogs( [in] any DialogIndex );
  	any Range( [in] any Cell1, [in] any Cell2 );

Added: trunk/scratch/offapi-vba/oovbaapi-org-openoffice-vba-makefile-mk.diff
==============================================================================
--- (empty file)
+++ trunk/scratch/offapi-vba/oovbaapi-org-openoffice-vba-makefile-mk.diff	Wed Jan 16 07:44:30 2008
@@ -0,0 +1,10 @@
+--- oovbaapi/org/openoffice/vba/makefile.mk.orig	2008-01-16 14:57:24.000000000 +0800
++++ oovbaapi/org/openoffice/vba/makefile.mk	2008-01-16 14:58:48.000000000 +0800
+@@ -51,6 +51,7 @@ IDLFILES=\
+ 	XVBAToOOEventDescGen.idl\
+ 	XPropValue.idl\
+ 	XHelperInterface.idl\
++    XAssistant.idl\
+ 	Globals.idl\
+ 
+ # ------------------------------------------------------------------

Added: trunk/scratch/offapi-vba/oovbaapi-org-openoffice-vba-xassistant-idl.diff
==============================================================================
--- (empty file)
+++ trunk/scratch/offapi-vba/oovbaapi-org-openoffice-vba-xassistant-idl.diff	Wed Jan 16 07:44:30 2008
@@ -0,0 +1,68 @@
+--- /dev/null	2007-05-04 18:54:36.000000000 +0800
++++ oovbaapi/org/openoffice/vba/XAssistant.idl	2008-01-16 15:09:41.000000000 +0800
+@@ -0,0 +1,65 @@
++/*************************************************************************
++ *
++ *  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_vba_XAssistant_idl__
++#define __org_openoffice_vba_XAssistant_idl__
++
++#ifndef __com_sun_star_uno_XInterface_idl__
++#include <com/sun/star/uno/XInterface.idl>
++#endif
++
++#ifndef __org_openoffice_vba_XHelperInterface_idl__
++#include <org/openoffice/vba/XHelperInterface.idl>
++#endif
++//=============================================================================
++
++module org {  module openoffice {  module vba { 
++//=============================================================================
++
++interface XAssistant
++{
++	interface ::org::openoffice::vba::XHelperInterface;
++
++    [attribute] boolean On;
++    [attribute] boolean Visible;
++    [attribute] long Top;
++    [attribute] long Left;
++    [attribute] long Animation;
++    
++    string Name() raises ( com::sun::star::script::BasicErrorException );
++};
++
++}; }; };
++
++#endif

Added: trunk/scratch/sc-vba/sc-source-ui-vba-makefile-mk.diff
==============================================================================
--- (empty file)
+++ trunk/scratch/sc-vba/sc-source-ui-vba-makefile-mk.diff	Wed Jan 16 07:44:30 2008
@@ -0,0 +1,10 @@
+--- sc/source/ui/vba/makefile.mk.orig	2008-01-16 15:17:05.000000000 +0800
++++ sc/source/ui/vba/makefile.mk	2008-01-16 15:17:31.000000000 +0800
+@@ -115,6 +115,7 @@ SLOFILES= \
+                 $(SLO)$/vbaformatconditions.obj \
+                 $(SLO)$/vbastyle.obj \
+                 $(SLO)$/vbastyles.obj \
++                $(SLO)$/vbaassistant.obj \
+ 		$(SLO)$/service.obj \
+  
+ 

Modified: trunk/scratch/sc-vba/sc-source-ui-vba-vbaapplication-cxx.diff
==============================================================================
--- trunk/scratch/sc-vba/sc-source-ui-vba-vbaapplication-cxx.diff	(original)
+++ trunk/scratch/sc-vba/sc-source-ui-vba-vbaapplication-cxx.diff	Wed Jan 16 07:44:30 2008
@@ -1,6 +1,27 @@
---- sc/source/ui/vba/vbaapplication.cxx	
-+++ sc/source/ui/vba/vbaapplication.cxx
-@@ -431,12 +429,17 @@ ScVbaApplication::Range( const uno::Any&
+--- sc/source/ui/vba/vbaapplication.cxx.orig	2008-01-16 14:14:06.000000000 +0800
++++ sc/source/ui/vba/vbaapplication.cxx	2008-01-16 15:33:53.000000000 +0800
+@@ -62,6 +62,7 @@
+ #include "gridwin.hxx"
+ #include "vbanames.hxx"
+ #include "vbashape.hxx"
++#include "vbaassistant.hxx"
+ #include "sc.hrc"
+ 
+ #include <osl/file.hxx>
+@@ -129,6 +130,12 @@ ScVbaApplication::getThisWorkbook() thro
+ 	return getActiveWorkbook();
+ }
+ 
++uno::Reference< vba::XAssistant > SAL_CALL
++ScVbaApplication::getAssistant() throw (css::uno::RuntimeException)
++{
++    return uno::Reference< vba::XAssistant >( new ScVbaAssistant( mxContext ) );
++}
++
+ uno::Any SAL_CALL
+ ScVbaApplication::getSelection() throw (uno::RuntimeException)
+ {
+@@ -433,12 +440,17 @@ ScVbaApplication::Range( const uno::Any&
  }
  
  uno::Any SAL_CALL

Modified: trunk/scratch/sc-vba/sc-source-ui-vba-vbaapplication-hxx.diff
==============================================================================
--- trunk/scratch/sc-vba/sc-source-ui-vba-vbaapplication-hxx.diff	(original)
+++ trunk/scratch/sc-vba/sc-source-ui-vba-vbaapplication-hxx.diff	Wed Jan 16 07:44:30 2008
@@ -1,6 +1,14 @@
---- sc/source/ui/vba/vbaapplication.hxx	
-+++ sc/source/ui/vba/vbaapplication.hxx
-@@ -99,7 +99,7 @@ public:
+--- sc/source/ui/vba/vbaapplication.hxx.orig	2008-01-16 14:14:02.000000000 +0800
++++ sc/source/ui/vba/vbaapplication.hxx	2008-01-16 15:20:38.000000000 +0800
+@@ -80,6 +80,7 @@ public:
+ 	virtual ::sal_Bool SAL_CALL getDisplayFormulaBar() throw ( css::uno::RuntimeException );
+ 	virtual void SAL_CALL setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException );
+ 
++    virtual css::uno::Reference< oo::vba::XAssistant > SAL_CALL getAssistant() throw (css::uno::RuntimeException);
+ 	virtual css::uno::Reference< oo::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL Workbooks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ 	virtual css::uno::Any SAL_CALL Worksheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+@@ -99,7 +100,7 @@ public:
  	virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
  	virtual void SAL_CALL wait( double time ) throw (css::uno::RuntimeException);
  	virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);

Added: trunk/scratch/sc-vba/sc-source-ui-vba-vbaassistant-cxx.diff
==============================================================================
--- (empty file)
+++ trunk/scratch/sc-vba/sc-source-ui-vba-vbaassistant-cxx.diff	Wed Jan 16 07:44:30 2008
@@ -0,0 +1,143 @@
+--- /dev/null	2007-05-04 18:54:36.000000000 +0800
++++ sc/source/ui/vba/vbaassistant.cxx	2008-01-16 15:12:12.000000000 +0800
+@@ -0,0 +1,140 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision: 9391 $
++ *
++ *  last change: $Author: noelpwer $ $Date: 2007-05-13 16:15:59 +0800 (æ, 13  5æ 2007) $
++ *
++ *  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 <sfx2/app.hxx>
++#include <svtools/helpopt.hxx>
++
++#include <org/openoffice/office/MsoAnimationType.hpp>
++
++#include"vbaassistant.hxx"
++
++
++using namespace com::sun::star;
++using namespace org::openoffice;
++
++using namespace org::openoffice::office::MsoAnimationType;
++
++ScVbaAssistant::ScVbaAssistant( uno::Reference< uno::XComponentContext > xContext ): m_xContext( xContext )
++{
++    m_bIsVisible = sal_False;
++    m_nPointsLeft = 795;
++    m_nPointsTop = 248;
++    m_sName = rtl::OUString::createFromAscii( "Clippit" );
++    m_nAnimation = msoAnimationIdle;
++}
++
++ScVbaAssistant::~ScVbaAssistant()
++{
++}
++
++sal_Bool SAL_CALL ScVbaAssistant::getVisible() throw (uno::RuntimeException)
++{
++    return m_bIsVisible;
++}
++
++void SAL_CALL ScVbaAssistant::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
++{
++    m_bIsVisible = bVisible;
++}
++
++sal_Bool SAL_CALL ScVbaAssistant::getOn() throw (uno::RuntimeException)
++{
++    if( SvtHelpOptions().IsHelpAgentAutoStartMode() )
++        return sal_True;
++    else
++        return sal_False;
++}
++
++void SAL_CALL ScVbaAssistant::setOn( sal_Bool bOn ) throw (uno::RuntimeException)
++{
++    SvtHelpOptions().SetHelpAgentAutoStartMode( bOn );
++    setVisible( bOn );
++}
++
++
++::sal_Int32 SAL_CALL 
++ScVbaAssistant::getTop() throw (css::uno::RuntimeException)
++{
++    return m_nPointsTop;
++}
++void SAL_CALL 
++ScVbaAssistant::setTop( ::sal_Int32 _top ) throw (css::uno::RuntimeException)
++{
++    m_nPointsTop = _top;
++}
++::sal_Int32 SAL_CALL 
++ScVbaAssistant::getLeft() throw (css::uno::RuntimeException)
++{
++    return m_nPointsLeft;
++}
++void SAL_CALL 
++ScVbaAssistant::setLeft( ::sal_Int32 _left ) throw (css::uno::RuntimeException)
++{
++    m_nPointsLeft = _left;
++}
++::sal_Int32 SAL_CALL 
++ScVbaAssistant::getAnimation() throw (css::uno::RuntimeException)
++{
++    return m_nAnimation;
++}
++void SAL_CALL 
++ScVbaAssistant::setAnimation( ::sal_Int32 _animation ) throw (css::uno::RuntimeException)
++{
++    m_nAnimation = _animation;
++}
++
++::rtl::OUString SAL_CALL 
++ScVbaAssistant::Name(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
++{
++    return m_sName;
++}
++
++rtl::OUString& 
++ScVbaAssistant::getServiceImplName()
++{
++	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAssistant") );
++	return sImplName;
++}
++
++uno::Sequence< rtl::OUString > 
++ScVbaAssistant::getServiceNames()
++{
++	static uno::Sequence< rtl::OUString > aServiceNames;
++	if ( aServiceNames.getLength() == 0 )
++	{
++		aServiceNames.realloc( 1 );
++		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.vba.Assistant" ) );
++	}
++	return aServiceNames;
++}

Added: trunk/scratch/sc-vba/sc-source-ui-vba-vbaassistant-hxx.diff
==============================================================================
--- (empty file)
+++ trunk/scratch/sc-vba/sc-source-ui-vba-vbaassistant-hxx.diff	Wed Jan 16 07:44:30 2008
@@ -0,0 +1,82 @@
+--- /dev/null	2007-05-04 18:54:36.000000000 +0800
++++ sc/source/ui/vba/vbaassistant.hxx	2008-01-16 15:12:12.000000000 +0800
+@@ -0,0 +1,79 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision: 9391 $
++ *
++ *  last change: $Author: noelpwer $ $Date: 2007-05-13 16:15:59 +0800 (æ, 13  5æ 2007) $
++ *
++ *  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_ASSISTANT_HXX
++#define SC_VBA_ASSISTANT_HXX
++
++#include <cppuhelper/implbase1.hxx>
++#include <org/openoffice/vba/XAssistant.hpp>
++
++#include <sfx2/sfxhelp.hxx>
++
++#include "vbahelper.hxx"
++#include "vbahelperinterface.hxx"
++
++typedef ::cppu::WeakImplHelper1< oo::vba::XAssistant > Assistant;
++typedef InheritedHelperInterfaceImpl< Assistant > AssistantImpl_BASE;
++
++class ScVbaAssistant : public AssistantImpl_BASE
++{
++private:
++    css::uno::Reference< css::uno::XComponentContext > m_xContext;
++    sal_Bool        m_bIsVisible;
++    sal_Int32       m_nPointsLeft;
++    sal_Int32       m_nPointsTop;
++    rtl::OUString   m_sName;
++    sal_Int32       m_nAnimation;
++public:
++    ScVbaAssistant( const css::uno::Reference< css::uno::XComponentContext > xContext );
++    virtual ~ScVbaAssistant();
++    // XAssistant 
++    virtual sal_Bool SAL_CALL getOn() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setOn( sal_Bool _on ) throw (css::uno::RuntimeException);
++    virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getTop() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setTop( ::sal_Int32 _top ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getLeft() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setLeft( ::sal_Int32 _left ) throw (css::uno::RuntimeException);
++    virtual ::sal_Int32 SAL_CALL getAnimation() throw (css::uno::RuntimeException);
++    virtual void SAL_CALL setAnimation( ::sal_Int32 _animation ) throw (css::uno::RuntimeException);
++
++    virtual ::rtl::OUString SAL_CALL Name(  ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
++	// XHelperInterface
++	virtual rtl::OUString& getServiceImplName();
++	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
++};
++
++#endif//SC_VBA_ASSISTANT_HXX



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]