ooo-build r12135 - in trunk: . patches/dev300 patches/vba
- From: jiaojh svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12135 - in trunk: . patches/dev300 patches/vba
- Date: Wed, 9 Apr 2008 05:35:04 +0100 (BST)
Author: jiaojh
Date: Wed Apr 9 05:35:04 2008
New Revision: 12135
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12135&view=rev
Log:
* patches/dev300/vba-window-service.diff,
patches/dev300/apply: add window service for
vba workbook_window* events.
Added:
trunk/patches/vba/vba-window-service.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Wed Apr 9 05:35:04 2008
@@ -1269,6 +1269,7 @@
SectionOwner => noelpwer
vbaevents-services-sources.diff, i#68893
+vba-window-service.diff, jianhua
#FIXME: changed by kendy: Noel, please have a look
sc-hacky-handle-boolean.diff
Added: trunk/patches/vba/vba-window-service.diff
==============================================================================
--- (empty file)
+++ trunk/patches/vba/vba-window-service.diff Wed Apr 9 05:35:04 2008
@@ -0,0 +1,167 @@
+--- sc/source/ui/vba/vbawindow.hxx.bak 2008-04-08 17:22:03.000000000 +0800
++++ sc/source/ui/vba/vbawindow.hxx 2008-04-08 18:10:01.000000000 +0800
+@@ -58,12 +58,14 @@ private:
+ css::uno::Reference< css::sheet::XViewSplitable > m_xViewSplitable;
+ css::uno::Reference< oo::excel::XPane > m_xPane;
+ css::uno::Reference< css::awt::XDevice > m_xDevice;
++ void init();
+ protected:
+ void SplitAtDefinedPosition(sal_Bool _bUnFreezePane);
+ public:
+ void Scroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft, bool bLargeScroll = false ) throw (css::uno::RuntimeException);
+ public:
+ ScVbaWindow( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel );
++ ScVbaWindow( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext );
+
+ // XWindow
+ virtual css::uno::Reference< oo::excel::XRange > SAL_CALL ActiveCell( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+--- sc/source/ui/vba/vbawindow.cxx.bak 2008-04-08 17:22:03.000000000 +0800
++++ sc/source/ui/vba/vbawindow.cxx 2008-04-09 12:21:38.000000000 +0800
+@@ -32,6 +32,7 @@
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
++#include "helperdecl.hxx"
+ #include "vbawindow.hxx"
+ #include "vbaworksheets.hxx"
+ #include "vbaworksheet.hxx"
+@@ -208,15 +209,25 @@ public:
+
+ ScVbaWindow::ScVbaWindow( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : WindowImpl_BASE( xParent, xContext ), m_xModel( xModel )
+ {
+- uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
++ init();
++}
++
++ScVbaWindow::ScVbaWindow( uno::Sequence< uno::Any > const & args, uno::Reference< uno::XComponentContext > const & xContext )
++ : WindowImpl_BASE( getXSomethingFromArgs< vba::XHelperInterface >( args, 0 ), xContext ),
++ m_xModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
++{
++ init();
++}
++void
++ScVbaWindow::init()
++{
++ uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ m_xViewPane.set( xController, uno::UNO_QUERY_THROW );
+ m_xViewFreezable.set( xController, uno::UNO_QUERY_THROW );
+ m_xViewSplitable.set( xController, uno::UNO_QUERY_THROW );
+ m_xPane.set( ActivePane(), uno::UNO_QUERY_THROW );
+ m_xDevice.set( xController->getFrame()->getComponentWindow(), uno::UNO_QUERY_THROW );
+ }
+-
+-
+ void
+ ScVbaWindow::Scroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft, bool bLargeScroll ) throw (uno::RuntimeException)
+ {
+@@ -943,3 +954,12 @@ ScVbaWindow::getServiceNames()
+ }
+ return aServiceNames;
+ }
++namespace window
++{
++namespace sdecl = comphelper::service_decl;
++sdecl::vba_service_class_<ScVbaWindow, sdecl::with_args<true> > serviceImpl;
++extern sdecl::ServiceDecl const serviceDecl(
++ serviceImpl,
++ "ScVbaWindow",
++ "org.openoffice.excel.Window" );
++}
+--- sc/source/ui/vba/service.cxx.bak 2008-04-09 12:08:49.000000000 +0800
++++ sc/source/ui/vba/service.cxx 2008-04-09 12:34:53.000000000 +0800
+@@ -58,6 +58,10 @@ namespace worksheet
+ {
+ extern sdecl::ServiceDecl const serviceDecl;
+ }
++namespace window
++{
++extern sdecl::ServiceDecl const serviceDecl;
++}
+ namespace globals
+ {
+ extern sdecl::ServiceDecl const serviceDecl;
+@@ -81,7 +85,7 @@ extern "C"
+
+ // Component registration
+ if ( component_writeInfoHelper( pServiceManager, pRegistryKey,
+- range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl ) )
++ range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl ) )
+ {
+ // Singleton registration
+ try
+@@ -109,7 +113,7 @@ extern "C"
+ {
+ OSL_TRACE("In component_getFactory for %s", pImplName );
+ void* pRet = component_getFactoryHelper(
+- pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl );
++ pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl );
+ OSL_TRACE("Ret is 0x%x", pRet);
+ return pRet;
+ }
+--- oovbaapi/org/openoffice/excel/makefile.mk.bak 2008-04-09 10:47:12.000000000 +0800
++++ oovbaapi/org/openoffice/excel/makefile.mk 2008-04-09 10:55:26.000000000 +0800
+@@ -95,6 +95,7 @@ IDLFILES= XApplication.idl\
+ XNames.idl \
+ Workbook.idl \
+ Worksheet.idl \
++ Window.idl \
+
+
+ # ------------------------------------------------------------------
+--- /dev/null 2007-05-04 18:54:36.000000000 +0800
++++ oovbaapi/org/openoffice/excel/Window.idl 2008-04-09 10:55:13.000000000 +0800
+@@ -0,0 +1,54 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: Window.idl,v $
++ *
++ * $Revision: 1.2 $
++ *
++ * last change: $Author: vg $ $Date: 2008/04/09 11:20:51 $
++ *
++ * 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_excel_Window_idl__
++#define __org_openoffice_excel_Window_idl__
++
++#ifndef __org_openoffice_excel_XWindow_idl__
++#include <org/openoffice/excel/XWindow.idl>
++#endif
++
++#include <com/sun/star/uno/XComponentContext.idl>
++#include <com/sun/star/frame/XModel.idl>
++
++module org { module openoffice { module excel {
++service Window : XWindow
++{
++ createWindow( [in] ::org::openoffice::vba::XHelperInterface Parent, [in] ::com::sun::star::frame::XModel xModel );
++};
++
++}; }; };
++
++#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]