ooo-build r12136 - in trunk: . patches/dev300
- From: jiaojh svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12136 - in trunk: . patches/dev300
- Date: Wed, 9 Apr 2008 09:57:24 +0100 (BST)
Author: jiaojh
Date: Wed Apr 9 09:57:23 2008
New Revision: 12136
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12136&view=rev
Log:
* patches/dev300/vba-workbook-worksheet-events2.diff:
Add workbook_window[activate|deactivate] events.
Modified:
trunk/ChangeLog
trunk/patches/dev300/vba-workbook-worksheet-events2.diff
Modified: trunk/patches/dev300/vba-workbook-worksheet-events2.diff
==============================================================================
--- trunk/patches/dev300/vba-workbook-worksheet-events2.diff (original)
+++ trunk/patches/dev300/vba-workbook-worksheet-events2.diff Wed Apr 9 09:57:23 2008
@@ -9,7 +9,7 @@
virtual void Activate();
virtual void Deactivate();
--- sc/source/ui/docshell/docsh.cxx.bak 2008-04-07 16:25:30.000000000 +0800
-+++ sc/source/ui/docshell/docsh.cxx 2008-04-07 16:48:52.000000000 +0800
++++ sc/source/ui/docshell/docsh.cxx 2008-04-09 16:35:49.000000000 +0800
@@ -32,7 +32,8 @@
* MA 02111-1307 USA
*
@@ -20,7 +20,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
// System - Includes -----------------------------------------------------
-@@ -146,22 +147,24 @@
+@@ -146,22 +147,25 @@
#include "docsh.hxx"
#include "docshimp.hxx"
@@ -47,10 +47,11 @@
+bool processDocBeforeSaveMacro( ScDocShell* pShell, bool bSaveAsUI );
+bool processDocBeforePrintMacro( ScDocShell* pShell );
+void processScTablesHint( ScDocShell* pShell, const ScTablesHint& rHint );
++void processSfxEventHint( ScDocShell* pShell, const SfxEventHint& rHint );
const sal_Char __FAR_DATA ScDocShell::pStarCalcDoc[] = STRING_SCSTREAM; // "StarCalcDocument"
const sal_Char __FAR_DATA ScDocShell::pStyleName[] = "SfxStyleSheets";
-@@ -199,205 +202,6 @@ static const sal_Char __FAR_DATA pFilter
+@@ -199,205 +203,6 @@ static const sal_Char __FAR_DATA pFilter
#define ScDocShell
#include "scslots.hxx"
@@ -256,7 +257,7 @@
SFX_IMPL_INTERFACE(ScDocShell,SfxObjectShell, ScResId(SCSTR_DOCSHELL))
{
-@@ -940,12 +744,41 @@ BOOL __EXPORT ScDocShell::Load( SfxMediu
+@@ -940,12 +745,41 @@ BOOL __EXPORT ScDocShell::Load( SfxMediu
bIsEmpty = FALSE;
// Handler for open workbook event
@@ -299,7 +300,7 @@
void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
-@@ -981,6 +814,10 @@ void __EXPORT ScDocShell::Notify( SfxBro
+@@ -981,6 +815,10 @@ void __EXPORT ScDocShell::Notify( SfxBro
pAutoStyleList = new ScAutoStyleList(this);
pAutoStyleList->AddInitial( aRange, aName1, nTimeout, aName2 );
}
@@ -310,7 +311,20 @@
else if ( rHint.ISA( SfxEventHint ) )
{
ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
-@@ -1648,7 +1485,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( S
+@@ -1152,6 +990,12 @@ void __EXPORT ScDocShell::Notify( SfxBro
+ }
+ }
+ break;
++ case SFX_EVENT_ACTIVATEDOC:
++ case SFX_EVENT_DEACTIVATEDOC:
++ case SFX_EVENT_CLOSEDOC :
++ case SFX_EVENT_CLOSEVIEW :
++ processSfxEventHint( this, (SfxEventHint&)rHint );
++ break;
+ default:
+ {
+ }
+@@ -1648,7 +1492,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( S
}
// Handler for open workbook event
@@ -447,29 +461,6 @@
}
}
---- sc/source/ui/docshell/makefile.mk.bak 2008-04-07 17:10:11.000000000 +0800
-+++ sc/source/ui/docshell/makefile.mk 2008-04-07 17:14:08.000000000 +0800
-@@ -97,10 +97,12 @@ SLOFILES = \
- $(SLO)$/hiranges.obj \
- $(SLO)$/pntlock.obj \
- $(SLO)$/sizedev.obj \
-+ $(SLO)$/vbaevents.obj \
- $(SLO)$/editable.obj
-
-
- EXCEPTIONSFILES= \
-+ $(SLO)$/vbaevents.obj \
- $(SLO)$/docsh.obj \
- $(SLO)$/docsh3.obj \
- $(SLO)$/docsh4.obj \
-@@ -134,6 +136,7 @@ LIB1OBJFILES = \
- $(SLO)$/hiranges.obj \
- $(SLO)$/pntlock.obj \
- $(SLO)$/sizedev.obj \
-+ $(SLO)$/vbaevents.obj \
- $(SLO)$/editable.obj
-
- # --- Tagets -------------------------------------------------------
--- sfx2/inc/sfx2/objsh.hxx.bak 2008-04-07 16:25:30.000000000 +0800
+++ sfx2/inc/sfx2/objsh.hxx 2008-04-07 16:27:16.000000000 +0800
@@ -315,6 +315,9 @@ public:
@@ -545,9 +536,32 @@
bool bDetectHidden = ( !bSilent && pDoc );
if ( bDetectHidden && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
return;
+--- sc/source/ui/docshell/makefile.mk.bak 2008-04-07 17:10:11.000000000 +0800
++++ sc/source/ui/docshell/makefile.mk 2008-04-07 17:14:08.000000000 +0800
+@@ -97,10 +97,12 @@ SLOFILES = \
+ $(SLO)$/hiranges.obj \
+ $(SLO)$/pntlock.obj \
+ $(SLO)$/sizedev.obj \
++ $(SLO)$/vbaevents.obj \
+ $(SLO)$/editable.obj
+
+
+ EXCEPTIONSFILES= \
++ $(SLO)$/vbaevents.obj \
+ $(SLO)$/docsh.obj \
+ $(SLO)$/docsh3.obj \
+ $(SLO)$/docsh4.obj \
+@@ -134,6 +136,7 @@ LIB1OBJFILES = \
+ $(SLO)$/hiranges.obj \
+ $(SLO)$/pntlock.obj \
+ $(SLO)$/sizedev.obj \
++ $(SLO)$/vbaevents.obj \
+ $(SLO)$/editable.obj
+
+ # --- Tagets -------------------------------------------------------
--- /dev/null 2007-05-04 18:54:36.000000000 +0800
-+++ sc/source/ui/docshell/vbaevents.cxx 2008-04-07 17:26:49.000000000 +0800
-@@ -0,0 +1,586 @@
++++ sc/source/ui/docshell/vbaevents.cxx 2008-04-09 16:38:46.000000000 +0800
+@@ -0,0 +1,602 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -587,6 +601,9 @@
+#include <basic/sbmod.hxx>
+#include <basic/sbmeth.hxx>
+#include <basic/sbx.hxx>
++#include <sfx2/evntconf.hxx>
++#include <sfx2/event.hxx>
++#include <sfx2/sfx.hrc>
+#include "scextopt.hxx"
+#include <comphelper/processfactory.hxx>
+#ifndef _COM_SUN_STAR_SHEET_XSHEETCELLRANGECONTAINER_HPP_
@@ -757,6 +774,39 @@
+ }
+}
+
++uno::Any createWorkSheet( ScDocShell* pShell, SCTAB nTab )
++{
++ uno::Any aRet;
++ try
++ {
++ uno::Reference< lang::XMultiComponentFactory > xSMgr( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
++ uno::Reference< beans::XPropertySet > xProps( xSMgr, uno::UNO_QUERY_THROW );
++ uno::Reference<uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW );
++ // Eventually we will be able to pull the Workbook/Worksheet objects
++ // directly from basic and register them as listeners
++
++ // create Workbook
++ uno::Sequence< uno::Any > aArgs(2);
++ aArgs[0] = uno::Any( uno::Reference< uno::XInterface >() );
++ aArgs[1] = uno::Any( pShell->GetModel() );
++ uno::Reference< uno::XInterface > xWorkbook( xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Workbook") ), aArgs, xCtx ), uno::UNO_QUERY );
++
++ // create WorkSheet
++ String sSheetName;
++ pShell->GetDocument()->GetName( nTab, sSheetName );
++ aArgs = uno::Sequence< uno::Any >(3);
++ aArgs[ 0 ] <<= xWorkbook;
++ aArgs[ 1 ] <<= pShell->GetModel();
++ aArgs[ 2 ] = uno::makeAny( rtl::OUString( sSheetName ) );
++ aRet <<= xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheet") ), aArgs, xCtx );
++ }
++ catch( uno::Exception& e )
++ {
++ }
++ return aRet;
++}
++
++
+void processScTablesHint( ScDocShell* pShell, const ScTablesHint& rHint )
+{
+ if( pShell )
@@ -765,53 +815,44 @@
+ SCTAB nTab = rHint.GetTab1();
+ if( nId == SC_TAB_INSERTED )
+ {
-+ uno::Reference< lang::XMultiServiceFactory > xSF( comphelper::getProcessServiceFactory() );
-+ uno::Reference< frame::XModel > xModel( pShell->GetModel() );
-+ uno::Reference< sheet::XSpreadsheetDocument > xSpreadDoc( xModel , uno::UNO_QUERY_THROW );
-+ uno::Reference< sheet::XSpreadsheets > xSheets( xSpreadDoc->getSheets(), uno::UNO_QUERY_THROW );
-+ uno::Reference< container::XIndexAccess > xIndexAccess( xSheets, uno::UNO_QUERY_THROW );
-+ uno::Reference< sheet::XSpreadsheet > xSheet( xIndexAccess->getByIndex( nTab ), uno::UNO_QUERY_THROW );
-+ uno::Reference< container::XNamed > xNamed( xSheet, uno::UNO_QUERY_THROW );
-+
-+ uno::Sequence< uno::Any > aWorkbookArgs(2);
-+ aWorkbookArgs[0] = uno::Any( uno::Reference< uno::XInterface > () );
-+ aWorkbookArgs[1] = uno::Any( xModel );
-+ uno::Reference< uno::XInterface > xWorkbook( xSF->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.WorkBook" ) ), aWorkbookArgs ), uno::UNO_QUERY );
-+
-+ String sSheetName = xNamed->getName();
-+ if( sSheetName.Len() > 0 )
-+ {
-+ uno::Sequence< uno::Any > aWorksheetArgs(3);
-+ aWorksheetArgs[0] = uno::Any( xWorkbook );
-+ aWorksheetArgs[1] = uno::Any( xModel );
-+ aWorksheetArgs[2] = uno::Any( rtl::OUString( sSheetName ) );
-+ uno::Reference< uno::XInterface > xWorksheet( xSF->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheet" ) ), aWorksheetArgs ), uno::UNO_QUERY );
-+ processDocNewSheetMacro( pShell, uno::makeAny( xWorksheet ) );
-+ }
-+ //processDocNewSheetMacro( pShell, uno::makeAny( xSheet ) );
++ processDocNewSheetMacro( pShell, createWorkSheet( pShell, nTab ) );
+ }
+ }
+}
+
-+bool processDocBeforeSaveMacro( ScDocShell* pShell, bool bSaveAsUI )
++void processWindowMacro( ScDocShell* pShell, uno::Any aElement, String sFuncName )
+{
-+
-+ uno::Any aRet;
-+ uno::Sequence< uno::Any > aArgs( 2 );
-+ bool bCancel = sal_False;
-+ aArgs[ 0 ] <<= bSaveAsUI;
-+ aArgs[ 1 ] <<= bCancel;
-+ const static String sBeforeClose( RTL_CONSTASCII_USTRINGPARAM("Workbook_BeforeSave") );
-+ String sFullClose = docMacroExists( pShell, String(), sBeforeClose );
-+ if ( sFullClose.Len() > 0 )
-+ {
-+ if ( !executeWorkBookMacro( pShell, sFullClose, aArgs, aRet ) )
-+ return false;
++ uno::Any aRet;
++ if( aElement.hasValue() && ( sFuncName.Len() > 0 ) )
++ {
++ uno::Sequence< uno::Any > aArgs(1);
++ aArgs[0] = aElement;
++ String sMacro = docMacroExists( pShell, String(), sFuncName );
++ if ( sMacro.Len() > 0 )
++ {
++ executeWorkBookMacro( pShell, sMacro, aArgs, aRet );
++ }
++ }
++}
++uno::Any getVbaWindow( ScDocShell* pShell )
++{
++ try
++ {
++ uno::Reference< lang::XMultiServiceFactory > xSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
++ uno::Reference< frame::XModel > xModel( pShell->GetModel(), uno::UNO_QUERY );
++ uno::Sequence< uno::Any > aWindowArgs(2);
++ aWindowArgs[0] = uno::Any( uno::Reference< uno::XInterface > () );
++ aWindowArgs[1] = uno::Any( xModel );
++ uno::Reference< uno::XInterface > xWindow( xSF->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Window" ) ), aWindowArgs ), uno::UNO_QUERY );
++ if( xWindow.is() )
++ return uno::makeAny( xWindow );
++ }
++ catch( uno::Exception& e )
++ {
+ }
-+ aArgs[ 1 ] >>= bCancel;
-+ return bCancel;
++ return uno::Any();
+}
-+//bool addDocEvent( const uno::Reference< container::XNameReplace >& xEvts, const rtl::OUString& sEvt, const rtl::OUString& sOpenMacro )
++
+bool addDocEvent( ScDocShell* pShell, const rtl::OUString& sEvt, const rtl::OUString& sOpenMacro )
+{
+ bool result = false;
@@ -845,45 +886,96 @@
+ return result;
+}
+
-+/*
-+bool addOpenDocEvent( const uno::Reference< container::XNameReplace >& xEvts, const rtl::OUString& sOpenMacro )
++
++bool processDocActivateMacro( ScDocShell* pShell )
+{
-+ bool result = false;
-+ const rtl::OUString sUrl = sUrlPart0.concat( sOpenMacro ).concat( sUrlPart2 );
-+ const static rtl::OUString sEvtType( RTL_CONSTASCII_USTRINGPARAM("EventType") );
-+ const static rtl::OUString sScript( RTL_CONSTASCII_USTRINGPARAM("Script") );
-+ const static rtl::OUString sEvt( RTL_CONSTASCII_USTRINGPARAM("OnLoad") );
-+ if ( xEvts.is() )
-+ {
-+ uno::Sequence< beans::PropertyValue > aEvents;
-+ xEvts->getByName( sEvt ) >>= aEvents;
-+ uno::Sequence< beans::PropertyValue > aOpenEvt( 2 );
-+ aOpenEvt[ 0 ].Name = sEvtType;
-+ aOpenEvt[ 0 ].Value = uno::makeAny(sScript);
-+ aOpenEvt[ 1 ].Name = sScript;
-+ aOpenEvt[ 1 ].Value = uno::makeAny(sUrl);
-+ sal_Int32 nPos = aEvents.getLength();
-+
-+ sal_Int32 nNewSize = aEvents.getLength() + aOpenEvt.getLength();
-+ if ( nNewSize > aEvents.getLength() )
-+ aEvents.realloc( nNewSize );
-+
-+ for ( sal_Int32 nIndex = nPos, nCpyIndex = 0; nIndex<nNewSize; nIndex++, nCpyIndex++ )
-+ aEvents[ nIndex ] = aOpenEvt[ nCpyIndex ];
-+
-+ uno::Any aParam = uno::makeAny( aEvents );
++ bool result = true;
++ const static rtl::OUString sAtctivateMacro( RTL_CONSTASCII_USTRINGPARAM("Workbook_Activate") );
++ const static rtl::OUString sOnFocusEvt( RTL_CONSTASCII_USTRINGPARAM("OnFocus") );
++ rtl::OUString sWorkbookModule;
++ String sFullOnFocus = docMacroExists( pShell, sWorkbookModule, sAtctivateMacro );
++ if( sFullOnFocus.Len() > 0 )
++ {
++ if( !addDocEvent( pShell, sOnFocusEvt, sFullOnFocus ) )
++ return false;
++ }
++ return result;
++}
+
-+ if( xEvts->hasByName( sEvt ) )
-+ {
-+ if( !xEvts->getByName( sEvt ).hasValue() )
-+ xEvts->replaceByName( sEvt, aParam );
-+ }
-+
-+ result = true;
++bool processDocDeactivateMacro( ScDocShell* pShell )
++{
++ bool result = true;
++ const static rtl::OUString sDeatctivateMacro( RTL_CONSTASCII_USTRINGPARAM("Workbook_Deactivate") );
++ const static rtl::OUString sOnFocusEvt( RTL_CONSTASCII_USTRINGPARAM("OnUnfocus") );
++ rtl::OUString sWorkbookModule;
++ String sFullUnOnfocus = docMacroExists( pShell, sWorkbookModule, sDeatctivateMacro );
++ if( sFullUnOnfocus.Len() > 0 )
++ {
++ if( !addDocEvent( pShell, sOnFocusEvt, sFullUnOnfocus ) )
++ return false;
++ }
++ return result;
++}
++
++void processDocDeactivateMacroRun( ScDocShell* pShell )
++{
++ uno::Any aRet;
++ uno::Sequence< uno::Any > aArgs;
++ const static String sDeactivate( RTL_CONSTASCII_USTRINGPARAM("Workbook_Deactivate") );
++ String sDeactivateMacro = docMacroExists( pShell, String(), sDeactivate );
++ if ( sDeactivateMacro.Len() > 0 )
++ {
++ executeWorkBookMacro( pShell, sDeactivateMacro, aArgs, aRet );
++ }
++}
++
++void processSfxEventHint( ScDocShell* pShell, const SfxEventHint& rHint )
++{
++ ULONG nEventId = rHint.GetEventId();
++ const static String sWindowActivate( RTL_CONSTASCII_USTRINGPARAM("Workbook_WindowActivate") );
++ const static String sWindowDeactivate( RTL_CONSTASCII_USTRINGPARAM("Workbook_WindowDeactivate") );
++ switch( nEventId )
++ {
++ case SFX_EVENT_ACTIVATEDOC:
++ processWindowMacro( pShell, getVbaWindow( pShell ), sWindowActivate );
++ break;
++ case SFX_EVENT_DEACTIVATEDOC:
++ // it will be called when close the doc. but will not launch the macro.
++ processWindowMacro( pShell, getVbaWindow( pShell ), sWindowDeactivate );
++ break;
++ case SFX_EVENT_CLOSEDOC :
++ // the macro will not be called at this time, because of the doc has died.
++ //processDocDeactivateMacroRun( pShell );
++ break;
++ case SFX_EVENT_CLOSEVIEW :
++ processWindowMacro( pShell, getVbaWindow( pShell ), sWindowDeactivate );
++ // does Doc be closed surely?
++ processDocDeactivateMacroRun( pShell );
++ break;
++ default:
++ break;
++ }
++}
++
++bool processDocBeforeSaveMacro( ScDocShell* pShell, bool bSaveAsUI )
++{
++
++ uno::Any aRet;
++ uno::Sequence< uno::Any > aArgs( 2 );
++ bool bCancel = sal_False;
++ aArgs[ 0 ] <<= bSaveAsUI;
++ aArgs[ 1 ] <<= bCancel;
++ const static String sBeforeClose( RTL_CONSTASCII_USTRINGPARAM("Workbook_BeforeSave") );
++ String sFullClose = docMacroExists( pShell, String(), sBeforeClose );
++ if ( sFullClose.Len() > 0 )
++ {
++ if ( !executeWorkBookMacro( pShell, sFullClose, aArgs, aRet ) )
++ return false;
+ }
-+ return result;
++ aArgs[ 1 ] >>= bCancel;
++ return bCancel;
+}
-+*/
++
+bool processDocOpenMacro( ScDocShell* pShell )
+{
+ bool result = true;
@@ -921,36 +1013,6 @@
+
+ return result;
+}
-+bool processDocActivateMacro( ScDocShell* pShell )
-+{
-+ bool result = true;
-+ const static rtl::OUString sAtctivateMacro( RTL_CONSTASCII_USTRINGPARAM("Workbook_Activate") );
-+ const static rtl::OUString sOnFocusEvt( RTL_CONSTASCII_USTRINGPARAM("OnFocus") );
-+ rtl::OUString sWorkbookModule;
-+ String sFullOnFocus = docMacroExists( pShell, sWorkbookModule, sAtctivateMacro );
-+ if( sFullOnFocus.Len() > 0 )
-+ {
-+ if( !addDocEvent( pShell, sOnFocusEvt, sFullOnFocus ) )
-+ return false;
-+ }
-+ return result;
-+}
-+
-+bool processDocDeactivateMacro( ScDocShell* pShell )
-+{
-+ bool result = true;
-+ const static rtl::OUString sDeatctivateMacro( RTL_CONSTASCII_USTRINGPARAM("Workbook_Deactivate") );
-+ const static rtl::OUString sOnFocusEvt( RTL_CONSTASCII_USTRINGPARAM("OnUnfocus") );
-+ rtl::OUString sWorkbookModule;
-+ String sFullUnOnfocus = docMacroExists( pShell, sWorkbookModule, sDeatctivateMacro );
-+ if( sFullUnOnfocus.Len() > 0 )
-+ {
-+ if( !addDocEvent( pShell, sOnFocusEvt, sFullUnOnfocus ) )
-+ return false;
-+ }
-+ return result;
-+}
-+
+bool processDocMacro( ScDocShell* pShell )
+{
+ bool result = true;
@@ -964,38 +1026,6 @@
+ return result;
+}
+
-+uno::Any createWorkSheet( ScDocShell* pShell, SCTAB nTab )
-+{
-+ uno::Any aRet;
-+ try
-+ {
-+ uno::Reference< lang::XMultiComponentFactory > xSMgr( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
-+ uno::Reference< beans::XPropertySet > xProps( xSMgr, uno::UNO_QUERY_THROW );
-+ uno::Reference<uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW );
-+ // Eventually we will be able to pull the Workbook/Worksheet objects
-+ // directly from basic and register them as listeners
-+
-+ // create Workbook
-+ uno::Sequence< uno::Any > aArgs(2);
-+ aArgs[0] = uno::Any( uno::Reference< uno::XInterface >() );
-+ aArgs[1] = uno::Any( pShell->GetModel() );
-+ uno::Reference< uno::XInterface > xWorkbook( xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Workbook") ), aArgs, xCtx ), uno::UNO_QUERY );
-+
-+ // create WorkSheet
-+ String sSheetName;
-+ pShell->GetDocument()->GetName( nTab, sSheetName );
-+ aArgs = uno::Sequence< uno::Any >(3);
-+ aArgs[ 0 ] <<= xWorkbook;
-+ aArgs[ 1 ] <<= pShell->GetModel();
-+ aArgs[ 2 ] = uno::makeAny( rtl::OUString( sSheetName ) );
-+ aRet <<= xSMgr->createInstanceWithArgumentsAndContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Worksheet") ), aArgs, xCtx );
-+ }
-+ catch( uno::Exception& e )
-+ {
-+ }
-+ return aRet;
-+}
-+
+uno::Any createRange( const uno::Any& aRange )
+{
+ uno::Any aRet;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]