[Libreoffice-commits] .: basic/source extensions/source forms/source offapi/UnoApi_offapi.mk oovbaapi/genconstidl oovbaapi/ooo oovbaapi/UnoApi_oovbaapi.mk sc/inc sc/Library_vbaobj.mk scripting/source sc/source sfx2/inc sfx2/source toolkit/inc toolkit/source vbahelper/inc vbahelper/source vcl/inc vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Sep 12 05:49:21 PDT 2012
basic/source/classes/sbunoobj.cxx | 26
basic/source/classes/sbxmod.cxx | 11
basic/source/runtime/methods.cxx | 42
extensions/source/ole/oleobjw.cxx | 17
forms/source/misc/InterfaceContainer.cxx | 9
offapi/UnoApi_offapi.mk | 1
oovbaapi/UnoApi_oovbaapi.mk | 13
oovbaapi/genconstidl/api-to-idl.pl | 3
oovbaapi/ooo/vba/XDialogBase.idl | 2
oovbaapi/ooo/vba/XFileDialog.idl | 50
oovbaapi/ooo/vba/XFileDialogSelectedItems.idl | 47
oovbaapi/ooo/vba/XFileSearch.idl | 56 -
oovbaapi/ooo/vba/excel/XApplication.idl | 17
oovbaapi/ooo/vba/excel/XName.idl | 2
oovbaapi/ooo/vba/excel/XPageSetup.idl | 2
oovbaapi/ooo/vba/excel/XPivotCache.idl | 1
oovbaapi/ooo/vba/excel/XQueryTable.idl | 50
oovbaapi/ooo/vba/excel/XRange.idl | 9
oovbaapi/ooo/vba/excel/XWorkbook.idl | 1
oovbaapi/ooo/vba/excel/XWorksheet.idl | 10
oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl | 39
oovbaapi/ooo/vba/msforms/ReturnBoolean.idl | 24
oovbaapi/ooo/vba/msforms/ReturnEffect.idl | 25
oovbaapi/ooo/vba/msforms/ReturnInteger.idl | 24
oovbaapi/ooo/vba/msforms/ReturnSingle.idl | 24
oovbaapi/ooo/vba/msforms/XListBox.idl | 2
oovbaapi/ooo/vba/msforms/XReturnBoolean.idl | 53 -
oovbaapi/ooo/vba/msforms/XReturnInteger.idl | 53 -
oovbaapi/ooo/vba/msforms/XShape.idl | 1
sc/Library_vbaobj.mk | 4
sc/inc/document.hxx | 6
sc/inc/scmod.hxx | 4
sc/inc/viewuno.hxx | 5
sc/source/core/data/document.cxx | 34
sc/source/ui/inc/asciiopt.hxx | 2
sc/source/ui/inc/impex.hxx | 2
sc/source/ui/inc/tabvwsh.hxx | 2
sc/source/ui/unoobj/viewuno.cxx | 116 --
sc/source/ui/vba/excelvbahelper.cxx | 125 --
sc/source/ui/vba/excelvbahelper.hxx | 9
sc/source/ui/vba/vbaapplication.cxx | 559 ----------
sc/source/ui/vba/vbaapplication.hxx | 19
sc/source/ui/vba/vbacomment.cxx | 10
sc/source/ui/vba/vbadialog.cxx | 77 -
sc/source/ui/vba/vbadialog.hxx | 1
sc/source/ui/vba/vbadialogs.cxx | 9
sc/source/ui/vba/vbadialogs.hxx | 1
sc/source/ui/vba/vbafiledialog.cxx | 174 ---
sc/source/ui/vba/vbafiledialog.hxx | 63 -
sc/source/ui/vba/vbafiledialogselecteditems.cxx | 156 ---
sc/source/ui/vba/vbafiledialogselecteditems.hxx | 90 -
sc/source/ui/vba/vbafilesearch.cxx | 244 ----
sc/source/ui/vba/vbafilesearch.hxx | 80 -
sc/source/ui/vba/vbaname.cxx | 87 +
sc/source/ui/vba/vbaname.hxx | 4
sc/source/ui/vba/vbanames.cxx | 85 -
sc/source/ui/vba/vbaoleobject.cxx | 2
sc/source/ui/vba/vbapagebreaks.cxx | 26
sc/source/ui/vba/vbapagesetup.cxx | 101 -
sc/source/ui/vba/vbapagesetup.hxx | 2
sc/source/ui/vba/vbapivotcache.cxx | 11
sc/source/ui/vba/vbapivotcache.hxx | 3
sc/source/ui/vba/vbaquerytable.cxx | 90 -
sc/source/ui/vba/vbaquerytable.hxx | 62 -
sc/source/ui/vba/vbarange.cxx | 1030 +++-----------------
sc/source/ui/vba/vbarange.hxx | 16
sc/source/ui/vba/vbaworkbook.cxx | 63 -
sc/source/ui/vba/vbaworkbook.hxx | 3
sc/source/ui/vba/vbaworksheet.cxx | 69 -
sc/source/ui/vba/vbaworksheet.hxx | 6
sc/source/ui/view/viewfun3.cxx | 10
scripting/source/vbaevents/eventhelper.cxx | 79 -
scripting/source/vbaevents/vbamsformreturntypes.hxx | 76 -
sfx2/inc/sfx2/sfxsids.hrc | 1
sfx2/source/control/unoctitm.cxx | 13
sfx2/source/doc/docmacromode.cxx | 53 -
sfx2/source/view/viewprn.cxx | 6
toolkit/inc/toolkit/awt/vclxwindows.hxx | 6
toolkit/source/awt/vclxwindows.cxx | 32
vbahelper/inc/vbahelper/vbadialogbase.hxx | 2
vbahelper/inc/vbahelper/vbahelper.hxx | 1
vbahelper/inc/vbahelper/vbashape.hxx | 1
vbahelper/source/msforms/vbacombobox.cxx | 23
vbahelper/source/msforms/vbaframe.cxx | 12
vbahelper/source/msforms/vbaframe.hxx | 2
vbahelper/source/msforms/vbalistbox.cxx | 11
vbahelper/source/msforms/vbalistbox.hxx | 4
vbahelper/source/msforms/vbatextbox.cxx | 10
vbahelper/source/msforms/vbatogglebutton.cxx | 23
vbahelper/source/msforms/vbauserform.cxx | 15
vbahelper/source/msforms/vbauserform.hxx | 2
vbahelper/source/vbahelper/vbadialogbase.cxx | 4
vbahelper/source/vbahelper/vbadocumentbase.cxx | 49
vbahelper/source/vbahelper/vbadocumentsbase.cxx | 10
vbahelper/source/vbahelper/vbahelper.cxx | 17
vbahelper/source/vbahelper/vbapictureformat.cxx | 8
vbahelper/source/vbahelper/vbashape.cxx | 11
vcl/inc/vcl/dialog.hxx | 4
vcl/source/control/combobox.cxx | 5
vcl/source/window/dialog.cxx | 11
100 files changed, 515 insertions(+), 4052 deletions(-)
New commits:
commit 4597483e00bffcc4e30d379dcf6fad42bc565e56
Author: Noel Power <noel.power at suse.com>
Date: Tue Sep 11 08:48:02 2012 +0100
targetted VBA re-work.
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index c4f5fd8..c792634 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -437,32 +437,6 @@ void implHandleWrappedTargetException( const Any& _rWrappedTargetException )
SbError nError( ERRCODE_BASIC_EXCEPTION );
::rtl::OUStringBuffer aMessageBuf;
- // Add for VBA, to get the correct error code and message.
- if ( SbiRuntime::isVBAEnabled() )
- {
- if ( aExamine >>= aBasicError )
- {
- if ( aBasicError.ErrorCode != 0 )
- {
- nError = StarBASIC::GetSfxFromVBError( (sal_uInt16) aBasicError.ErrorCode );
- if ( nError == 0 )
- {
- nError = (SbError) aBasicError.ErrorCode;
- }
- aMessageBuf.append( aBasicError.ErrorMessageArgument );
- aExamine.clear();
- }
- }
-
- IndexOutOfBoundsException aIdxOutBndsExp;
- if ( aExamine >>= aIdxOutBndsExp )
- {
- nError = SbERR_OUT_OF_RANGE;
- aExamine.clear();
- }
- }
- // End add
-
// strip any other WrappedTargetException instances, but this time preserve the error messages.
WrappedTargetException aWrapped;
sal_Int32 nLevel = 0;
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index a70a7ea..f47e352 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2351,15 +2351,6 @@ public:
mpUserForm->triggerMethod( rtl::OUString("Userform_QueryClose" ),
aParams);
- xVbaMethodParameter->setVbaMethodParameter( rtl::OUString( "Cancel"), aParams[0]);
- // If we don't cancel then we want to make sure the dialog
- // really is gone to make sure when we attempt to raise it again
- // it will actually generate an initialise event
- if ( !nCancel )
- {
- removeListener(); // presumably we need to do this
- mpUserForm->ResetApiObj();
- }
return;
}
@@ -2687,7 +2678,7 @@ void SbUserFormModule::InitObject()
aArgs[ 0 ] = uno::Any();
aArgs[ 1 ] <<= m_xDialog;
aArgs[ 2 ] <<= m_xModel;
- aArgs[ 3 ] <<= sProjectName;
+ aArgs[ 3 ] <<= rtl::OUString( GetParent()->GetName() );
pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( rtl::OUString( "ooo.vba.msforms.UserForm"), aArgs ) ) );
uno::Reference< lang::XComponent > xComponent( m_xDialog, uno::UNO_QUERY_THROW );
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index e5e094a..1d2835b 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -631,36 +631,6 @@ RTLFUNC(MkDir)
{
try
{
- if ( SbiRuntime::isVBAEnabled() )
- {
- // If aPath is the folder name, not a path, then create the folder under current directory.
- INetURLObject aTryPathURL( aPath );
- ::rtl::OUString sPathURL = aTryPathURL.GetMainURL( INetURLObject::NO_DECODE );
- if ( sPathURL.isEmpty() )
- {
- File::getFileURLFromSystemPath( aPath, sPathURL );
- }
- INetURLObject aPathURL( sPathURL );
- if ( aPathURL.GetPath().isEmpty() )
- {
- ::rtl::OUString sCurDirURL;
- SbxArrayRef pPar = new SbxArray;
- SbxVariableRef pVar = new SbxVariable();
- pPar->Put( pVar, 0 );
- SbRtl_CurDir( pBasic, *pPar, sal_False );
- String aCurPath = pPar->Get(0)->GetString();
-
- File::getFileURLFromSystemPath( aCurPath, sCurDirURL );
- INetURLObject aDirURL( sCurDirURL );
- aDirURL.Append( aPath );
- ::rtl::OUString aTmpPath = aDirURL.GetMainURL( INetURLObject::NO_DECODE );
- if ( !aTmpPath.isEmpty() )
- {
- aPath = aTmpPath;
- }
- }
- }
-
xSFI->createFolder( getFullPath( aPath ) );
}
catch(const Exception & )
@@ -3287,20 +3257,10 @@ RTLFUNC(Shell)
pParamList[j] = NULL;
}
- long nResult = 0;
- // We should return the identifier of the executing process when is running VBA, because method Shell(...) returns it in Excel.
- if ( bSucc && SbiRuntime::isVBAEnabled())
- {
- oslProcessInfo aInfo;
- aInfo.Size = sizeof(oslProcessInfo);
- osl_getProcessInfo( pApp, osl_Process_IDENTIFIER, &aInfo );
- nResult = aInfo.Ident;
- }
-
if( !bSucc )
StarBASIC::Error( SbERR_FILE_NOT_FOUND );
else
- rPar.Get(0)->PutLong( nResult );
+ rPar.Get(0)->PutLong( 0 );
}
}
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index d89ae85..5228390 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -48,7 +48,6 @@
#include <com/sun/star/script/XEngine.hpp>
#include <com/sun/star/script/InterruptEngineEvent.hpp>
#include <com/sun/star/script/XLibraryAccess.hpp>
-#include <com/sun/star/script/BasicErrorException.hpp>
#include <com/sun/star/bridge/ModelDependent.hpp>
#include "com/sun/star/bridge/oleautomation/NamedArgument.hpp"
@@ -277,10 +276,6 @@ Any SAL_CALL IUnknownWrapper_Impl::invoke( const OUString& aFunctionName,
{
throw;
}
- catch (const InvocationTargetException &)
- {
- throw;
- }
catch (const BridgeRuntimeError & e)
{
throw RuntimeException(e.message, Reference<XInterface>());
@@ -2156,21 +2151,11 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
"DISP_E_BADVARTYPE."), 0);
break;
case DISP_E_EXCEPTION:
- {
message = OUSTR("[automation bridge]: ");
message += OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription),
::SysStringLen(excepinfo.bstrDescription));
- // Add for VBA, to throw an exception with the correct error code and message.
- sal_Int32 nErrorCode = excepinfo.wCode;
- if ( nErrorCode == 0 )
- {
- // The low 16-bit of scode describing the error or warning.
- nErrorCode = ( excepinfo.scode & 0xFFFF );
- }
- BasicErrorException aBasicErrExp(message, Reference<XInterface>(), nErrorCode, message);
- throw InvocationTargetException(message, Reference<XInterface>(), makeAny(aBasicErrExp));
- // End add
+ throw InvocationTargetException(message, Reference<XInterface>(), Any());
}
case DISP_E_MEMBERNOTFOUND:
message = OUSTR("[automation bridge]: A function with the name \"")
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index f07649f..0965b2b 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -158,16 +158,9 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn
xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultControl") ) ) >>= sServiceName;
Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( m_xServiceFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.VBAToOOEventDesc") ) ), UNO_QUERY_THROW );
- Reference< XInterface > xInterface = m_xServiceFactory->createInstance( sServiceName );
- Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( xInterface, sCodeName );
+ Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( m_xServiceFactory->createInstance( sServiceName ), sCodeName );
// register the vba script events
m_xEventAttacher->registerScriptEvents( i_nIndex, vbaEvents );
-
- Reference< XComponent > xComponent( xInterface, UNO_QUERY );
- if ( xComponent.is() )
- {
- xComponent->dispose();
- }
}
while ( false );
}
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 17b3711..2179afc 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -2172,7 +2172,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/document,\
XUndoManager \
XUndoManagerListener \
XUndoManagerSupplier \
- XVbaMethodParameter \
XViewDataSupplier \
))
$(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/drawing,\
diff --git a/oovbaapi/UnoApi_oovbaapi.mk b/oovbaapi/UnoApi_oovbaapi.mk
index ec8d8f4..c360af6 100644
--- a/oovbaapi/UnoApi_oovbaapi.mk
+++ b/oovbaapi/UnoApi_oovbaapi.mk
@@ -52,9 +52,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,oovbaapi,oovbaapi/ooo/vba/excel,\
$(eval $(call gb_UnoApi_add_idlfiles_noheader,oovbaapi,oovbaapi/ooo/vba,\
ControlProvider \
))
-$(eval $(call gb_UnoApi_add_idlfiles_noheader,oovbaapi,oovbaapi/ooo/vba/msforms,\
- MSFormReturnTypes \
-))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,oovbaapi,oovbaapi/ooo/vba/excel,\
Button \
SheetObjects \
@@ -97,9 +94,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,oovbaapi,oovbaapi/ooo/vba,\
XDocumentsBase \
XErrObject \
XExecutableDialog \
- XFileDialog \
- XFileDialogSelectedItems \
- XFileSearch \
XFontBase \
XFoundFiles \
XGlobalsBase \
@@ -473,7 +467,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,oovbaapi,oovbaapi/ooo/vba/excel,\
XPivotCache \
XPivotTable \
XPivotTables \
- XQueryTable \
XRange \
XSeries \
XSeriesCollection \
@@ -533,6 +526,10 @@ $(eval $(call gb_UnoApi_add_idlfiles,oovbaapi,oovbaapi/ooo/vba/msforms,\
fmTransitionEffect \
fmVerticalScrollBarSide \
fmZOrder \
+ ReturnBoolean \
+ ReturnEffect \
+ ReturnInteger \
+ ReturnSingle \
XButton \
XCheckBox \
XColorFormat \
@@ -553,8 +550,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,oovbaapi,oovbaapi/ooo/vba/msforms,\
XPictureFormat \
XProgressBar \
XRadioButton \
- XReturnBoolean \
- XReturnInteger \
XScrollBar \
XShape \
XShapeRange \
diff --git a/oovbaapi/genconstidl/api-to-idl.pl b/oovbaapi/genconstidl/api-to-idl.pl
index d04cca7..4959e97 100755
--- a/oovbaapi/genconstidl/api-to-idl.pl
+++ b/oovbaapi/genconstidl/api-to-idl.pl
@@ -125,9 +125,6 @@ sub generate_idls($) {
foreach $module ( keys %result ) {
foreach $type ( keys %{$result{$module}} ) {
my $fname = $path . "/" . $type . ".idl";
- if ( uc($module) eq "ADODB" || uc($module) eq "DAO" ) {
- $fname = $path . "/" . uc($module) . "_" . $type . ".idl";
- }
open( IDL, ">$fname" ) || die "Cannot write $fname.";
if( $module eq "vba" ) {
diff --git a/oovbaapi/ooo/vba/XDialogBase.idl b/oovbaapi/ooo/vba/XDialogBase.idl
index 1aa7db0..7fd0467 100644
--- a/oovbaapi/ooo/vba/XDialogBase.idl
+++ b/oovbaapi/ooo/vba/XDialogBase.idl
@@ -41,7 +41,7 @@ interface XDialogBase
{
interface ::ooo::vba::XHelperInterface;
- boolean Show();
+ void Show();
};
}; };
diff --git a/oovbaapi/ooo/vba/XFileDialog.idl b/oovbaapi/ooo/vba/XFileDialog.idl
deleted file mode 100644
index 6471ae4..0000000
--- a/oovbaapi/ooo/vba/XFileDialog.idl
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2009, 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __ooo_vba_excel_XFileDialog_idl__
-#define __ooo_vba_excel_XFileDialog_idl__
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <ooo/vba/XFileDialogSelectedItems.idl>
-
-//=============================================================================
-
-module ooo { module vba {
-
-//=============================================================================
-
-interface XFileDialog : com::sun::star::uno::XInterface
-{
- [attribute, readonly] ooo::vba::XFileDialogSelectedItems SelectedItems;
-
- long Show();
-};
-
-}; };
-
-#endif
diff --git a/oovbaapi/ooo/vba/XFileDialogSelectedItems.idl b/oovbaapi/ooo/vba/XFileDialogSelectedItems.idl
deleted file mode 100644
index 787e4f4..0000000
--- a/oovbaapi/ooo/vba/XFileDialogSelectedItems.idl
+++ /dev/null
@@ -1,47 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2009, 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#ifndef __ooo_vba_excel_XFileDialogSelectedItems_idl__
-#define __ooo_vba_excel_XFileDialogSelectedItems_idl__
-
-#include <ooo/vba/XCollection.idl>
-//=============================================================================
-
-module ooo { module vba {
-
-//=============================================================================
-
-interface XFileDialogSelectedItems
-{
- interface ooo::vba::XCollection;
-};
-
-}; };
-
-#endif
diff --git a/oovbaapi/ooo/vba/XFileSearch.idl b/oovbaapi/ooo/vba/XFileSearch.idl
deleted file mode 100644
index c60284a..0000000
--- a/oovbaapi/ooo/vba/XFileSearch.idl
+++ /dev/null
@@ -1,56 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2009, 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __ooo_vba_XFileSearch_idl__
-#define __ooo_vba_XFileSearch_idl__
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <ooo/vba/XFoundFiles.idl>
-
-//=============================================================================
-
-module ooo { module vba {
-//=============================================================================
-
-interface XFileSearch
-{
- interface ::com::sun::star::uno::XInterface;
-
- [attribute] string FileName;
- [attribute] string LookIn;
- [attribute] boolean SearchSubFolders;
- [attribute] boolean MatchTextExactly;
- [attribute, readonly] XFoundFiles FoundFiles;
-
- long Execute();
- void NewSearch();
-};
-
-}; };
-
-#endif
diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl b/oovbaapi/ooo/vba/excel/XApplication.idl
index baf6468..f2d7ff4 100644
--- a/oovbaapi/ooo/vba/excel/XApplication.idl
+++ b/oovbaapi/ooo/vba/excel/XApplication.idl
@@ -31,8 +31,6 @@
#include <com/sun/star/script/XInvocation.idl>
#include <ooo/vba/XHelperInterface.idl>
#include <ooo/vba/XAssistant.idl>
-#include <ooo/vba/XFileDialog.idl>
-#include <ooo/vba/XFileSearch.idl>
module ooo { module vba { module excel {
@@ -43,8 +41,6 @@ interface XWorksheets;
interface XWorksheetFunction;
interface XWindow;
interface XWorksheet;
-interface XFileDialog;
-interface XFileSearch;
interface XApplication
{
@@ -60,10 +56,8 @@ interface XApplication
[attribute, readonly] XWindow ActiveWindow;
[attribute, readonly] XWorksheet ActiveSheet;
[attribute, readonly] ooo::vba::XAssistant Assistant;
- [attribute, readonly] ooo::vba::XFileSearch FileSearch;
[attribute] long Calculation;
[attribute, readonly] XWorkbook ThisWorkbook;
- [attribute, readonly] ooo::vba::XFileDialog FileDialog;
[attribute, readonly] string Name;
[attribute] boolean DisplayAlerts;
[attribute] boolean DisplayFormulaBar;
@@ -71,9 +65,6 @@ interface XApplication
[attribute] any StatusBar;
[attribute] long Cursor;
[attribute] boolean EnableEvents;
- [attribute] boolean Visible;
- [attribute] boolean Iteration;
- [attribute] long EnableCancelKey;
[attribute] boolean DisplayFullScreen;
[attribute] boolean DisplayScrollBars;
[attribute] boolean DisplayExcel4Menus;
@@ -84,8 +75,6 @@ interface XApplication
string getDefaultFilePath() raises(com::sun::star::script::BasicErrorException);
- any GetOpenFilename([in] /*Optional*/ any FileFilter, [in] /*Optional*/ any FilterIndex, [in] /*Optional*/ any Title, [in] /*Optional*/ any ButtonText, [in] /*Optional*/ any MultiSelect); //minz, 2009-07-08
-
string LibraryPath() raises(com::sun::star::script::BasicErrorException);
string TemplatesPath() raises(com::sun::star::script::BasicErrorException);
string PathSeparator() raises(com::sun::star::script::BasicErrorException);
@@ -109,12 +98,6 @@ interface XApplication
void Volatile([in] any Volatile);
any Caller( [in] any Index );
any MenuBars( [in] any aIndex );
- any International([in] long Index);
- any GetSaveAsFilename( [in] any InitialFilename, [in] any FileFilter, [in] any FilterIndex, [in] any Title,[in] any ButtonText);
- void Undo(); //2009-10-11 limingl
- double InchesToPoints([in] double Inches);
- void setSheetsInNewWorkbook( [in] long SheetsInNewWorkbook ) raises(com::sun::star::script::BasicErrorException);
- long getSheetsInNewWorkbook();
};
}; }; };
diff --git a/oovbaapi/ooo/vba/excel/XName.idl b/oovbaapi/ooo/vba/excel/XName.idl
index 09a69ab..b5d6259 100644
--- a/oovbaapi/ooo/vba/excel/XName.idl
+++ b/oovbaapi/ooo/vba/excel/XName.idl
@@ -45,7 +45,7 @@ interface XName
[attribute] string Name;
[attribute] string NameLocal;
[attribute] boolean Visible;
- [attribute] string Value;
+ [attribute, readonly] string Value;
[attribute, readonly] string RefersTo;
[attribute, readonly] string RefersToLocal;
[attribute, readonly] string RefersToR1C1;
diff --git a/oovbaapi/ooo/vba/excel/XPageSetup.idl b/oovbaapi/ooo/vba/excel/XPageSetup.idl
index 8b12f55..e47771e 100644
--- a/oovbaapi/ooo/vba/excel/XPageSetup.idl
+++ b/oovbaapi/ooo/vba/excel/XPageSetup.idl
@@ -39,7 +39,6 @@ module ooo { module vba { module excel {
interface XPageSetup : com::sun::star::uno::XInterface
{
-
// interface ::ooo::vba::XHelperInterface;
//Attributes
@@ -60,7 +59,6 @@ interface XPageSetup : com::sun::star::uno::XInterface
[attribute] boolean CenterVertically;
[attribute] boolean CenterHorizontally;
[attribute] boolean PrintHeadings;
- [attribute] long PaperSize;
};
diff --git a/oovbaapi/ooo/vba/excel/XPivotCache.idl b/oovbaapi/ooo/vba/excel/XPivotCache.idl
index 00a4e28..f96aafe 100644
--- a/oovbaapi/ooo/vba/excel/XPivotCache.idl
+++ b/oovbaapi/ooo/vba/excel/XPivotCache.idl
@@ -40,7 +40,6 @@ interface XPivotCache
{
interface ::ooo::vba::XHelperInterface;
- [attribute] long MissingItemsLimit;
void Refresh();
};
diff --git a/oovbaapi/ooo/vba/excel/XQueryTable.idl b/oovbaapi/ooo/vba/excel/XQueryTable.idl
deleted file mode 100644
index ca284c4..0000000
--- a/oovbaapi/ooo/vba/excel/XQueryTable.idl
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2009, 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __ooo_vba_excel_XQueryTable_idl__
-#define __ooo_vba_excel_XQueryTable_idl__
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <ooo/vba/XHelperInterface.idl>
-
-//=============================================================================
-
-module ooo { module vba { module excel {
-
-//=============================================================================
-
-interface XQueryTable
-{
- interface com::sun::star::uno::XInterface;
- //interface ooo::vba::XHelperInterface;
- boolean Refresh([in] any aBackgroundQuery);
-};
-
-}; }; };
-
-#endif
diff --git a/oovbaapi/ooo/vba/excel/XRange.idl b/oovbaapi/ooo/vba/excel/XRange.idl
index 015c68c..c7c1f46 100644
--- a/oovbaapi/ooo/vba/excel/XRange.idl
+++ b/oovbaapi/ooo/vba/excel/XRange.idl
@@ -53,8 +53,6 @@ interface XBorders;
interface XValidation;
interface XWorksheet;
-interface XPivotTable;
-interface XQueryTable;
interface XRange
{
interface com::sun::star::container::XEnumerationAccess;
@@ -64,7 +62,6 @@ interface XRange
interface ::ooo::vba::excel::XFormat;
//interface ::ooo::vba::XHelperInterface;
- [attribute] any Name;
[attribute] any Value;
[attribute] any Formula;
[attribute] any FormulaArray;
@@ -90,7 +87,6 @@ interface XRange
[attribute] any Style;
[attribute] any AddIndent;
[attribute] any ShowDetail;
- [attribute, readonly] XQueryTable QueryTable;
XComment AddComment( [in] any Text );
void Clear();
@@ -155,11 +151,6 @@ interface XRange
void Subtotal( [in] long GroupBy, [in] long Function, [in] /*Optional*/ sequence<long> TotalList, [in] /*Optional*/ any Replace, [in] /*Optional*/ any PageBreaks, [in] any SummaryBelowData ) raises ( com::sun::star::script::BasicErrorException );
XRange MergeArea( ) raises ( com::sun::star::script::BasicErrorException );
any Hyperlinks( [in] any Index );
- long CopyFromRecordset([in] any Data, [in] any MaxRows , [in] any MaxColumns) raises ( com::sun::star::script::BasicErrorException );
- XPivotTable PivotTable();
- void TextToColumns([in] any Destination, [in] any DataType, [in] any TextQualifier, [in] any ConsecutiveDelimiter, [in] any Tab, [in] any Semicolon, [in] any Comma,
- [in] any Space, [in] any Other, [in] any OtherChar, [in] any FieldInfo, [in] any DecimalSeparator, [in] any ThousandsSeparator, [in] any TrailingMinusNumbers );
- any AdvancedFilter([in] long Action, [in] any CriteriaRange, [in] any CopyToRange, [in] any Unique) raises ( com::sun::star::script::BasicErrorException );
};
//=============================================================================
diff --git a/oovbaapi/ooo/vba/excel/XWorkbook.idl b/oovbaapi/ooo/vba/excel/XWorkbook.idl
index 7d4a70f..1d99f43 100644
--- a/oovbaapi/ooo/vba/excel/XWorkbook.idl
+++ b/oovbaapi/ooo/vba/excel/XWorkbook.idl
@@ -61,7 +61,6 @@ interface XWorkbook
any Colors( [in] any Index ) raises (com::sun::star::script::BasicErrorException);
void SaveCopyAs( [in] string Filename );
void Protect( [in] any Password );
- void SaveAs([in] string FileName, [in]any FileFormat, [in]any CreateBackup);
};
}; }; };
diff --git a/oovbaapi/ooo/vba/excel/XWorksheet.idl b/oovbaapi/ooo/vba/excel/XWorksheet.idl
index e312818..7975984 100644
--- a/oovbaapi/ooo/vba/excel/XWorksheet.idl
+++ b/oovbaapi/ooo/vba/excel/XWorksheet.idl
@@ -62,17 +62,17 @@ interface XWorksheet
[attribute, readonly] XWorksheet Next;
[attribute, readonly] XWorksheet Previous;
[attribute, readonly] string CodeName;
- [attribute, readonly] short Index;
- [attribute] long EnableSelection;
+ [attribute, readonly] short Index;
+ [attribute] long EnableSelection;
[attribute] boolean AutoFilterMode;
void Activate();
- void Calculate( );
- void Select([in] any Replace);
+ void Calculate();
+ void Select();
void Move([in] any Before,[in] any After );
void Copy([in] any Before,[in] any After );
void Paste([in] any Destination,[in] any Link);
- void Delete( );
+ void Delete();
void Protect([in] any Password,[in] any DrawingObjects ,[in] any Contents,[in] any Scenarios,[in] any UserInterfaceOnly);
void Unprotect([in] any Password );
void CheckSpelling([in] any CustomDictionary,[in] any IgnoreUppercase, [in] any AlwaysSuggest,[in] any SpellingLang );
diff --git a/oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl b/oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl
deleted file mode 100644
index c2ca087..0000000
--- a/oovbaapi/ooo/vba/msforms/MSFormReturnTypes.idl
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-module msforms
-{
- struct ReturnEffect
- {
- //fmDropEffect Value;
- short Value;
- };
-
- struct ReturnSingle
- {
- float Value;
- };
-};
diff --git a/oovbaapi/ooo/vba/msforms/ReturnBoolean.idl b/oovbaapi/ooo/vba/msforms/ReturnBoolean.idl
new file mode 100644
index 0000000..cd739dd
--- /dev/null
+++ b/oovbaapi/ooo/vba/msforms/ReturnBoolean.idl
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module ooo { module vba { module msforms {
+ struct ReturnBoolean
+ {
+ boolean Value;
+ };
+}; }; };
diff --git a/oovbaapi/ooo/vba/msforms/ReturnEffect.idl b/oovbaapi/ooo/vba/msforms/ReturnEffect.idl
new file mode 100644
index 0000000..817b0cd
--- /dev/null
+++ b/oovbaapi/ooo/vba/msforms/ReturnEffect.idl
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module ooo { module vba { module msforms {
+ struct ReturnEffect
+ {
+ //fmDropEffect Value;
+ short Value;
+ };
+}; }; };
diff --git a/oovbaapi/ooo/vba/msforms/ReturnInteger.idl b/oovbaapi/ooo/vba/msforms/ReturnInteger.idl
new file mode 100644
index 0000000..3b949ad
--- /dev/null
+++ b/oovbaapi/ooo/vba/msforms/ReturnInteger.idl
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module ooo { module vba { module msforms {
+ struct ReturnInteger
+ {
+ long Value;
+ };
+}; }; };
diff --git a/oovbaapi/ooo/vba/msforms/ReturnSingle.idl b/oovbaapi/ooo/vba/msforms/ReturnSingle.idl
new file mode 100644
index 0000000..6d2e07b
--- /dev/null
+++ b/oovbaapi/ooo/vba/msforms/ReturnSingle.idl
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module ooo { module vba { module msforms {
+ struct ReturnSingle
+ {
+ float Value;
+ };
+}; }; };
diff --git a/oovbaapi/ooo/vba/msforms/XListBox.idl b/oovbaapi/ooo/vba/msforms/XListBox.idl
index 98ce26e..03f63a0 100644
--- a/oovbaapi/ooo/vba/msforms/XListBox.idl
+++ b/oovbaapi/ooo/vba/msforms/XListBox.idl
@@ -41,7 +41,7 @@ interface XListBox
{
[attribute] any Value;
[attribute] string Text;
- [attribute] long MultiSelect;
+ [attribute] boolean MultiSelect;
[attribute] any ListIndex;
[attribute, readonly] long ListCount;
[attribute, readonly] XNewFont Font;
diff --git a/oovbaapi/ooo/vba/msforms/XReturnBoolean.idl b/oovbaapi/ooo/vba/msforms/XReturnBoolean.idl
deleted file mode 100644
index c85d7f7..0000000
--- a/oovbaapi/ooo/vba/msforms/XReturnBoolean.idl
+++ /dev/null
@@ -1,53 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2009, 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __ooo_vba_msforms_XReturnInteger_idl__
-#define __ooo_vba_msforms_XReturnInteger_idl__
-
-#include <com/sun/star/script/XDefaultProperty.idl>
-//=============================================================================
-
-module ooo
-{
-module vba
-{
-module msforms
-{
-
-//=============================================================================
-interface XReturnBoolean: com::sun::star::script::XDefaultProperty
-{
- [attribute] boolean Value;
-};
-//=============================================================================
-
-};
-};
-};
-
-#endif
diff --git a/oovbaapi/ooo/vba/msforms/XReturnInteger.idl b/oovbaapi/ooo/vba/msforms/XReturnInteger.idl
deleted file mode 100644
index 4b5192e..0000000
--- a/oovbaapi/ooo/vba/msforms/XReturnInteger.idl
+++ /dev/null
@@ -1,53 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2009, 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __ooo_vba_msforms_XReturnInteger_idl__
-#define __ooo_vba_msforms_XReturnInteger_idl__
-
-#include <com/sun/star/script/XDefaultProperty.idl>
-//=============================================================================
-
-module ooo
-{
-module vba
-{
-module msforms
-{
-
-//=============================================================================
-interface XReturnInteger: com::sun::star::script::XDefaultProperty
-{
- [attribute] long Value;
-};
-//=============================================================================
-
-};
-};
-};
-
-#endif
diff --git a/oovbaapi/ooo/vba/msforms/XShape.idl b/oovbaapi/ooo/vba/msforms/XShape.idl
index 602b3fd..1b320d0 100644
--- a/oovbaapi/ooo/vba/msforms/XShape.idl
+++ b/oovbaapi/ooo/vba/msforms/XShape.idl
@@ -64,7 +64,6 @@ interface XShape : ooo::vba::XHelperInterface
void ScaleHeight( [in] double Factor, [in] boolean RelativeToOriginalSize, [in] long Scale );
void ScaleWidth( [in] double Factor, [in] boolean RelativeToOriginalSize, [in] long Scale );
any ShapeRange( [in] any index ); // only here for convience
- void Copy();
};
}; }; };
diff --git a/sc/Library_vbaobj.mk b/sc/Library_vbaobj.mk
index e8a667a..fb7e1c3 100644
--- a/sc/Library_vbaobj.mk
+++ b/sc/Library_vbaobj.mk
@@ -81,9 +81,6 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\
sc/source/ui/vba/vbadialog \
sc/source/ui/vba/vbadialogs \
sc/source/ui/vba/vbaeventshelper \
- sc/source/ui/vba/vbafiledialog \
- sc/source/ui/vba/vbafiledialogselecteditems \
- sc/source/ui/vba/vbafilesearch \
sc/source/ui/vba/vbafont \
sc/source/ui/vba/vbaformat \
sc/source/ui/vba/vbaformatcondition \
@@ -112,7 +109,6 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\
sc/source/ui/vba/vbapivotcache \
sc/source/ui/vba/vbapivottable \
sc/source/ui/vba/vbapivottables \
- sc/source/ui/vba/vbaquerytable \
sc/source/ui/vba/vbarange \
sc/source/ui/vba/vbasheetobject \
sc/source/ui/vba/vbastyle \
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index efe8814..b12ce26 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -564,7 +564,6 @@ public:
bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) const;
- bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTAB ) const;
bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
@@ -956,7 +955,7 @@ public:
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
ScDirection eDir );
- SC_DLLPUBLIC void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
+ void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY,
bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const;
@@ -1015,7 +1014,7 @@ public:
SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
void SetCutMode( bool bCut );
- SC_DLLPUBLIC bool IsCutMode();
+ bool IsCutMode();
void SetClipArea( const ScRange& rArea, bool bCut = false );
SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; }
@@ -1865,7 +1864,6 @@ private: // CLOOK-Impl-methods
const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs);
- void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, SCTAB nTab);
bool HasPartOfMerged( const ScRange& rRange );
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index bc0ebd9..521d821 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -176,14 +176,14 @@ public:
// Options:
const ScViewOptions& GetViewOptions ();
-SC_DLLPUBLIC const ScDocOptions& GetDocOptions ();
+ const ScDocOptions& GetDocOptions ();
SC_DLLPUBLIC const ScAppOptions& GetAppOptions ();
SC_DLLPUBLIC const ScDefaultsOptions& GetDefaultsOptions ();
const ScFormulaOptions& GetFormulaOptions ();
const ScInputOptions& GetInputOptions ();
SC_DLLPUBLIC const ScPrintOptions& GetPrintOptions ();
void SetViewOptions ( const ScViewOptions& rOpt );
-SC_DLLPUBLIC void SetDocOptions ( const ScDocOptions& rOpt );
+ void SetDocOptions ( const ScDocOptions& rOpt );
SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rOpt );
void SetDefaultsOptions ( const ScDefaultsOptions& rOpt );
void SetFormulaOptions ( const ScFormulaOptions& rOpt );
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index 2aeb6f5..135b540 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -317,11 +317,6 @@ public:
::com::sun::star::sheet::XSpreadsheet >& xActiveSheet )
throw(::com::sun::star::uno::RuntimeException);
- // support expand (but not replace) the active sheet
- virtual void SAL_CALL selectSheet( const ::com::sun::star::uno::Reference<
- ::com::sun::star::sheet::XSpreadsheet >& xActiveSheet,
- sal_Bool bExpand)
- throw(::com::sun::star::uno::RuntimeException);
//XEnhancedMouseClickBroadcaster
virtual void SAL_CALL addEnhancedMouseClickHandler( const ::com::sun::star::uno::Reference<
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index d660686..ade6c8e 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1926,9 +1926,9 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam,
else
pClipDoc->ResetClip(this, pMarks);
- if ( bUseRangeForVBA )
- CopyRangeNamesToClip(pClipDoc, aClipRange, nTab );
- else
+// if ( bUseRangeForVBA )
+// CopyRangeNamesToClip(pClipDoc, aClipRange, nTab );
+// else
CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks, bAllTabs);
for ( ; i < nEndTab; ++i)
@@ -2114,24 +2114,6 @@ void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClip
copyUsedNamesToClip(pClipDoc->GetRangeName(), pRangeName, aUsedNames);
}
-void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, SCTAB nTab)
-{
- if (!pRangeName || pRangeName->empty())
- return;
-
- // Indexes of named ranges that are used in the copied cells
- std::set<sal_uInt16> aUsedNames;
- if ( nTab < static_cast<SCTAB>(maTabs.size()) && nTab < static_cast<SCTAB>(pClipDoc->maTabs.size()) )
- if ( maTabs[nTab] && pClipDoc->maTabs[nTab] )
- {
- maTabs[nTab]->FindRangeNamesInUse(
- rClipRange.aStart.Col(), rClipRange.aStart.Row(),
- rClipRange.aEnd.Col(), rClipRange.aEnd.Row(), aUsedNames );
- }
-
- copyUsedNamesToClip(pClipDoc->GetRangeName(), pRangeName, aUsedNames);
-}
-
ScDocument::NumFmtMergeHandler::NumFmtMergeHandler(ScDocument* pDoc, ScDocument* pSrcDoc) :
mpDoc(pDoc)
{
@@ -4817,16 +4799,6 @@ bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRo
return !bOk;
}
-bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const
-{
- bool bOk = true;
- if ( nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->HasBlockMatrixFragment( nStartCol, nStartRow, nEndCol, nEndRow ) )
- {
- bOk = false;
- }
- return !bOk;
-}
-
bool ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix )
{
// if rCell is part of a matrix formula, return its complete range
diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx
index 45107c1..8685330 100644
--- a/sc/source/ui/inc/asciiopt.hxx
+++ b/sc/source/ui/inc/asciiopt.hxx
@@ -45,7 +45,7 @@
// ============================================================================
-class SC_DLLPUBLIC ScAsciiOptions
+class ScAsciiOptions
{
private:
sal_Bool bFixedLen;
diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
index 6bad362..84a5222 100644
--- a/sc/source/ui/inc/impex.hxx
+++ b/sc/source/ui/inc/impex.hxx
@@ -54,7 +54,7 @@ struct ScExportTextOptions
bool mbAddQuotes;
};
-class SC_DLLPUBLIC ScImportExport
+class ScImportExport
{
ScDocShell* pDocSh;
ScDocument* pDoc;
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 36bdab1..10b2b9c 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -295,7 +295,7 @@ public:
void GetSaveState( SfxItemSet& rSet );
void ExecSearch( SfxRequest& rReq );
- SC_DLLPUBLIC void ExecuteUndo(SfxRequest& rReq);
+ void ExecuteUndo(SfxRequest& rReq);
void GetUndoState(SfxItemSet &rSet);
void ExecuteSbx( SfxRequest& rReq );
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 4d7a927..4ecc009 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -461,91 +461,6 @@ void SAL_CALL ScViewPaneObj::release() throw()
OWeakObject::release();
}
-// To process sheet compatibile event
-typedef ::cppu::WeakImplHelper2< awt::XEnhancedMouseClickHandler, view::XSelectionChangeListener > TabViewEventListener_BASE;
-class ScTabViewEventListener: public TabViewEventListener_BASE
-{
-private:
- ScTabViewObj* pViewObj;
- uno::Reference< script::vba::XVBAEventProcessor > xVbaEventsHelper;
- sal_Bool bDelaySelectionEvent;
- sal_Bool bSelectionChangeOccurred;
-
- void fireSelectionChangeEvent();
-
-public:
- ScTabViewEventListener( ScTabViewObj* pObj, uno::Reference< script::vba::XVBAEventProcessor >& rVbaEventsHelper);
- ~ScTabViewEventListener();
- // XEnhancedMouseClickHandler
- virtual sal_Bool SAL_CALL mousePressed( const awt::EnhancedMouseEvent& e ) throw (uno::RuntimeException);
- virtual sal_Bool SAL_CALL mouseReleased( const awt::EnhancedMouseEvent& e ) throw (uno::RuntimeException);
-
- // XSelectionChangeListener
- virtual void SAL_CALL selectionChanged( const lang::EventObject& aEvent ) throw ( uno::RuntimeException );
- // XEventListener
- virtual void SAL_CALL disposing( const lang::EventObject& aEvent ) throw ( uno::RuntimeException );
-};
-
-ScTabViewEventListener::ScTabViewEventListener(ScTabViewObj* pObj, uno::Reference< script::vba::XVBAEventProcessor >& rVbaEventsHelper):
- pViewObj( pObj ),xVbaEventsHelper( rVbaEventsHelper ), bDelaySelectionEvent( false ), bSelectionChangeOccurred( false )
-{
-}
-
-ScTabViewEventListener::~ScTabViewEventListener()
-{
-}
-
-void SAL_CALL ScTabViewEventListener::disposing( const lang::EventObject& /*aEvent*/ ) throw ( uno::RuntimeException )
-{
-}
-
-void ScTabViewEventListener::fireSelectionChangeEvent()
-{
- if ( xVbaEventsHelper.is() && pViewObj )
- {
- uno::Sequence< uno::Any > aArgs(1);
- aArgs[0] = pViewObj->getSelection();
- try
- {
- xVbaEventsHelper->processVbaEvent( script::vba::VBAEventId::WORKSHEET_SELECTIONCHANGE, aArgs );
- }
- catch( uno::Exception& )
- {
- }
- }
- bDelaySelectionEvent = false;
- bSelectionChangeOccurred = false;
-}
-
-sal_Bool SAL_CALL ScTabViewEventListener::mousePressed( const awt::EnhancedMouseEvent& e ) throw (uno::RuntimeException)
-{
- // Delay to fire the selection change event if clicking the left mouse button to do selection.
- bDelaySelectionEvent = ( e.Buttons == ::com::sun::star::awt::MouseButton::RIGHT ) ? false : sal_True;
- bSelectionChangeOccurred = false;
-
- // ScTabViewObj::MousePressed should handle process BeforeDoubleClick and BeforeRightClick events
- return sal_True;
-}
-
-sal_Bool SAL_CALL ScTabViewEventListener::mouseReleased( const awt::EnhancedMouseEvent&/*e*/) throw (uno::RuntimeException)
-{
- if ( bSelectionChangeOccurred )
- fireSelectionChangeEvent();
- return sal_True;
-}
-
-void SAL_CALL ScTabViewEventListener::selectionChanged( const lang::EventObject& /*aEvent*/ ) throw ( uno::RuntimeException )
-{
- if ( !bDelaySelectionEvent )
- {
- fireSelectionChangeEvent();
- }
- else
- {
- bSelectionChangeOccurred = sal_True;
- }
-}
-
//------------------------------------------------------------------------
// Default-ctor wird fuer SMART_REFLECTION_IMPLEMENTATION gebraucht
@@ -559,24 +474,8 @@ ScTabViewObj::ScTabViewObj( ScTabViewShell* pViewSh ) :
nPreviousTab( 0 ),
bDrawSelModeSet(false)
{
- if (!pViewSh)
- return;
-
- nPreviousTab = pViewSh->GetViewData()->GetTabNo();
- ScViewData* pViewData = pViewSh->GetViewData();
- if (!pViewData)
- return;
-
- uno::Reference< script::vba::XVBAEventProcessor > xVbaEventsHelper(
- pViewData->GetDocument()->GetVbaEventProcessor(), uno::UNO_QUERY );
- if (!xVbaEventsHelper.is())
- return;
-
- ScTabViewEventListener* pEventListener = new ScTabViewEventListener( this, xVbaEventsHelper );
- uno::Reference< awt::XEnhancedMouseClickHandler > aMouseClickHandler( *pEventListener, uno::UNO_QUERY );
- addEnhancedMouseClickHandler( aMouseClickHandler );
- uno::Reference< view::XSelectionChangeListener > aSelectionChangeListener( *pEventListener, uno::UNO_QUERY );
- addSelectionChangeListener( aSelectionChangeListener );
+ if (pViewSh)
+ nPreviousTab = pViewSh->GetViewData()->GetTabNo();
}
ScTabViewObj::~ScTabViewObj()
@@ -1208,16 +1107,7 @@ uno::Reference<sheet::XSpreadsheet> SAL_CALL ScTabViewObj::getActiveSheet()
void SAL_CALL ScTabViewObj::setActiveSheet( const uno::Reference<sheet::XSpreadsheet>& xActiveSheet )
throw(uno::RuntimeException)
{
- selectSheet(xActiveSheet, false);
-}
-
-void SAL_CALL
-ScTabViewObj::selectSheet( const uno::Reference<sheet::XSpreadsheet>& xActiveSheet,
- sal_Bool bExpand)
- throw(uno::RuntimeException)
-{
SolarMutexGuard aGuard;
- sal_Bool bNew = bExpand;
ScTabViewShell* pViewSh = GetViewShell();
if ( pViewSh && xActiveSheet.is() )
@@ -1232,7 +1122,7 @@ ScTabViewObj::selectSheet( const uno::Reference<sheet::XSpreadsheet>& xActiveShe
{
SCTAB nNewTab = rRanges[ 0 ]->aStart.Tab();
if ( pViewSh->GetViewData()->GetDocument()->HasTable(nNewTab) )
- pViewSh->SetTabNo( nNewTab, bNew, bExpand );
+ pViewSh->SetTabNo( nNewTab );
}
}
}
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 90848f4..2da0df5 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -35,9 +35,6 @@
#include "transobj.hxx"
#include "scmod.hxx"
#include "cellsuno.hxx"
-#include "compiler.hxx"
-#include "token.hxx"
-#include "tokenarray.hxx"
#include <com/sun/star/script/vba/VBAEventId.hpp>
#include <com/sun/star/script/vba/XVBACompatibility.hpp>
@@ -122,16 +119,6 @@ ScDocument* GetDocumentFromRange( const uno::Reference< uno::XInterface >& xRang
return pDocShell->GetDocument();
}
-uno::Reference< frame::XModel > GetModelFromRange( const uno::Reference< uno::XInterface >& xRange ) throw ( uno::RuntimeException )
-{
- ScDocShell* pDocShell = GetDocShellFromRange( xRange );
- if ( !pDocShell )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying model uno range object" ) ), uno::Reference< uno::XInterface >() );
- }
- return pDocShell->GetModel();
-}
-
void implSetZoom( const uno::Reference< frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs )
{
ScTabViewShell* pViewSh = excel::getBestViewShell( xModel );
@@ -262,24 +249,6 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, sal_uInt16
}
-bool implnCopyRanges( const uno::Reference< frame::XModel>& xModel, ScRangeList& rRangeList )
-{
- bool bResult = false;
- ScTabViewShell* pViewShell = getBestViewShell( xModel );
- if ( pViewShell )
- {
- bResult = pViewShell->CopyToClip( NULL, rRangeList, false, true, true );
- }
- return bResult;
-}
-
-bool implnCopyRange( const uno::Reference< frame::XModel>& xModel, const ScRange& rRange )
-{
- ScRangeList aRanges;
- aRanges.Append( rRange );
- return implnCopyRanges( xModel, aRanges );
-}
-
ScDocShell*
getDocShell( const css::uno::Reference< css::frame::XModel>& xModel )
{
@@ -308,17 +277,13 @@ getCurrentBestViewShell( const uno::Reference< uno::XComponentContext >& xConte
return getBestViewShell( xModel );
}
-sal_Bool IsR1C1ReferFormat( ScDocument* pDoc, const rtl::OUString& sRangeStr )
+SfxViewFrame*
+getViewFrame( const uno::Reference< frame::XModel >& xModel )
{
- ScRangeList aCellRanges;
- String sAddress( sRangeStr );
- sal_uInt16 nMask = SCA_VALID;
- sal_uInt16 rResFlags = aCellRanges.Parse( sAddress, pDoc, nMask, formula::FormulaGrammar::CONV_XL_R1C1 );
- if ( rResFlags & SCA_VALID )
- {
- return sal_True;
- }
- return false;
+ ScTabViewShell* pViewShell = getBestViewShell( xModel );
+ if ( pViewShell )
+ return pViewShell->GetViewFrame();
+ return NULL;
}
uno::Reference< vba::XHelperInterface >
@@ -336,84 +301,6 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSpreadsheet >& xSheet ) thro
return xParent;
}
-formula::FormulaGrammar::Grammar GetFormulaGrammar( ScDocument* pDoc, const ScAddress& sAddress, const css::uno::Any& aFormula )
-{
- formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_NATIVE_XL_A1;
- if ( pDoc && aFormula.hasValue() && aFormula.getValueTypeClass() == uno::TypeClass_STRING )
- {
- rtl::OUString sFormula;
- aFormula >>= sFormula;
-
- ScCompiler aCompiler( pDoc, sAddress );
- aCompiler.SetGrammar( formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 );
- ScTokenArray* pCode = aCompiler.CompileString( sFormula );
- if ( pCode )
- {
- sal_uInt16 nLen = pCode->GetLen();
- formula::FormulaToken** pTokens = pCode->GetArray();
- for ( sal_uInt16 nPos = 0; nPos < nLen; nPos++ )
- {
- const formula::FormulaToken& rToken = *pTokens[nPos];
- switch ( rToken.GetType() )
- {
- case formula::svSingleRef:
- case formula::svDoubleRef:
- {
- return formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1;
- }
- break;
- default: break;
- }
- }
- }
- }
- return eGrammar;
-}
-
-void CompileExcelFormulaToODF( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula )
-{
- if ( !pDoc )
- {
- return;
- }
- ScCompiler aCompiler( pDoc, ScAddress() );
- aCompiler.SetGrammar( excel::GetFormulaGrammar( pDoc, ScAddress(), uno::Any( rtl::OUString( rOldFormula ) ) ) );
- aCompiler.CompileString( rOldFormula );
- aCompiler.SetGrammar( formula::FormulaGrammar::GRAM_PODF_A1 );
- aCompiler.CreateStringFromTokenArray( rNewFormula );
-}
-
-void CompileODFFormulaToExcel( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula, const formula::FormulaGrammar::Grammar eGrammar )
-{
- // eGrammar can be formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 and formula::FormulaGrammar::GRAM_NATIVE_XL_A1
- if ( !pDoc )
- {
- return;
- }
- ScCompiler aCompiler( pDoc, ScAddress() );
- aCompiler.SetGrammar( formula::FormulaGrammar::GRAM_PODF_A1 );
- ScTokenArray* pCode = aCompiler.CompileString( rOldFormula );
- aCompiler.SetGrammar( eGrammar );
- if ( !pCode )
- {
- return;
- }
- sal_uInt16 nLen = pCode->GetLen();
- formula::FormulaToken** pTokens = pCode->GetArray();
- for ( sal_uInt16 nPos = 0; nPos < nLen && pTokens[nPos]; nPos++ )
- {
- String rFormula;
- formula::FormulaToken* pToken = pTokens[nPos];
- aCompiler.CreateStringFromToken( rFormula, pToken, true );
- if ( pToken->GetOpCode() == ocSep )
- {
- // Excel formula separator is ",".
- rFormula = rtl::OUString(",");
- }
- rNewFormula += rFormula;
- }
-}
-
uno::Reference< XHelperInterface >
getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException )
{
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index 53f44c9..2009cc3 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -38,7 +38,6 @@
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <ooo/vba/XHelperInterface.hpp>
-#include <formula/grammar.hxx>
class ScCellRangesBase;
@@ -54,16 +53,11 @@ void implnCopy( const css::uno::Reference< css::frame::XModel>& xModel );
void implnPaste ( const css::uno::Reference< css::frame::XModel>& xModel );
void implnCut( const css::uno::Reference< css::frame::XModel>& xModel );
void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose);
-bool implnCopyRanges( const css::uno::Reference< css::frame::XModel>& xModel, ScRangeList& rRange );
-bool implnCopyRange( const css::uno::Reference< css::frame::XModel>& xModel, const ScRange& rRange );
ScTabViewShell* getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+SfxViewFrame* getViewFrame( const css::uno::Reference< css::frame::XModel >& xModel );
-sal_Bool IsR1C1ReferFormat( ScDocument* pDoc, const ::rtl::OUString& sRangeStr );
-formula::FormulaGrammar::Grammar GetFormulaGrammar( ScDocument* pDoc, const ScAddress& sAddress, const css::uno::Any& aFormula );
-void CompileExcelFormulaToODF( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula );
-void CompileODFFormulaToExcel( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula, const formula::FormulaGrammar::Grammar eGrammar );
css::uno::Reference< css::sheet::XUnnamedDatabaseRanges > GetUnnamedDataBaseRanges( ScDocShell* pShell ) throw ( css::uno::RuntimeException );
css::uno::Reference< css::sheet::XDatabaseRange > GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet ) throw ( css::uno::RuntimeException );
@@ -76,7 +70,6 @@ css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const cs
ScDocShell* GetDocShellFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
ScDocShell* GetDocShellFromRanges( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException );
ScDocument* GetDocumentFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
-css::uno::Reference< css::frame::XModel > GetModelFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
void setUpDocumentModules( const css::uno::Reference< css::sheet::XSpreadsheetDocument >& xDoc );
// ============================================================================
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index d962395..b7b53f9 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -28,14 +28,11 @@
#include <stdio.h>
-#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
-#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
#include <com/sun/star/sheet/XSpreadsheets.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <ooo/vba/excel/XlCalculation.hpp>
-#include <ooo/vba/excel/XlCutCopyMode.hpp>
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include <com/sun/star/sheet/XCalculatable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -44,17 +41,10 @@
#include <ooo/vba/excel/XlMousePointer.hpp>
#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
-#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
+#include <ooo/vba/XExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
-#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include<ooo/vba/XCommandBars.hpp>
-#include <ooo/vba/excel/XlEnableCancelKey.hpp>
-#include <ooo/vba/excel/XlApplicationInternational.hpp>
-#include <unotools/localedatawrapper.hxx>
#include "vbaapplication.hxx"
#include "vbaworkbooks.hxx"
@@ -73,19 +63,13 @@
#include <vbahelper/vbashape.hxx>
#include "vbatextboxshape.hxx"
#include "vbaassistant.hxx"
-#include "vbafilesearch.hxx" // add the support of VBA Application.FileSearch
#include "sc.hrc"
#include "macromgr.hxx"
-#include "global.hxx"
-#include "scmod.hxx"
-#include "docoptio.hxx"
#include "defaultsoptions.hxx"
#include <osl/file.hxx>
#include <rtl/instance.hxx>
-#include <map>
-
#include <sfx2/request.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewfrm.hxx>
@@ -106,7 +90,6 @@
#include <basic/sbuno.hxx>
#include <basic/sbmeth.hxx>
-#include "transobj.hxx"
#include "convuno.hxx"
#include "cellsuno.hxx"
#include "miscuno.hxx"
@@ -118,7 +101,6 @@
#include <basic/sbmod.hxx>
#include <basic/sbxobj.hxx>
-#include "vbafiledialog.hxx"
#include "viewutil.hxx"
using namespace ::ooo::vba;
@@ -306,18 +288,6 @@ ScVbaApplication::getAssistant() throw (uno::RuntimeException)
return uno::Reference< XAssistant >( new ScVbaAssistant( this, mxContext ) );
}
-// add support of VBA Application.FileSearch
-uno::Reference< XFileSearch > SAL_CALL
-ScVbaApplication::getFileSearch() throw (uno::RuntimeException)
-{
- if (! m_xFileSearch.get() )
- {
- m_xFileSearch = uno::Reference< XFileSearch >( new ScVbaFileSearch( this, uno::Reference< XHelperInterface >( this ), mxContext ) );
- }
-
- return m_xFileSearch;
-}
-
uno::Any SAL_CALL
ScVbaApplication::getSelection() throw (uno::RuntimeException)
{
@@ -469,67 +439,16 @@ ScVbaApplication::getActiveWindow() throw (uno::RuntimeException)
uno::Any SAL_CALL
ScVbaApplication::getCutCopyMode() throw (uno::RuntimeException)
{
+ //# FIXME TODO, implementation
uno::Any result;
- ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( NULL );
- ScDocument* pDoc = pOwnClip ? pOwnClip->GetDocument() : NULL;
- if ( pDoc )
- {
- if ( pDoc->IsCutMode() )
- {
- result <<= excel::XlCutCopyMode::xlCut;
- }
- else
- {
- result <<= excel::XlCutCopyMode::xlCopy;
- }
- }
- else
- {
- result <<= false;
- }
+ result <<= sal_False;
return result;
}
void SAL_CALL
-ScVbaApplication::setCutCopyMode( const uno::Any& _cutcopymode ) throw (uno::RuntimeException)
+ScVbaApplication::setCutCopyMode( const uno::Any& /* _cutcopymode */ ) throw (uno::RuntimeException)
{
- // According to Excel's behavior, no matter what is the value of _cutcopymode, always releases the clip object.
- sal_Bool bCutCopyMode = false;
- if ( ( _cutcopymode >>= bCutCopyMode ) )
- {
- ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( NULL );
- if ( pOwnClip )
- {
- pOwnClip->ObjectReleased();
- ScTabViewShell* pTabViewShell = excel::getBestViewShell( getCurrentDocument() );
- if ( pTabViewShell )
- {
- ScViewData* pView = pTabViewShell->GetViewData();
- Window* pWindow = pView ? pView->GetActiveWin() : NULL;
- if ( pWindow )
- {
- Reference< datatransfer::clipboard::XClipboard > xClipboard = pWindow->GetClipboard();
- Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY );
- if ( xClipboard.is() )
- {
- xClipboard->setContents( NULL, NULL );
- if ( xFlushableClipboard.is() )
- {
- const sal_uInt32 nRef = Application::ReleaseSolarMutex();
- try
- {
- xFlushableClipboard->flushClipboard();
- }
- catch (const uno::Exception&)
- {
- }
- Application::AcquireSolarMutex( nRef );
- }
- }
- }
- }
- }
- }
+ //# FIXME TODO, implementation
}
uno::Any SAL_CALL
@@ -956,90 +875,6 @@ ScVbaApplication::setShowWindowsInTaskbar( sal_Bool bSet ) throw (css::uno::Runt
mrAppSettings.mbShowWindowsInTaskbar = bSet;
}
-sal_Bool SAL_CALL
-ScVbaApplication::getVisible() throw (uno::RuntimeException)
-{
- sal_Bool bVisible = sal_True;
- return bVisible;
-}
-
-void SAL_CALL
-ScVbaApplication::setVisible(sal_Bool /*bVisible*/) throw (uno::RuntimeException)
-{
-}
-
-//add the support of Excel VBA Application.Iteration
-//The Excel Iteration option is global and unique, but in Symphony there is an Iteration property in ScModule and one in every ScDocument,
-//so the set method will set all the Iteration properties
-sal_Bool SAL_CALL
-ScVbaApplication::getIteration() throw (uno::RuntimeException)
-{
- ScModule* pScMod = SC_MOD();
- ScDocOptions aDocOpt = pScMod->GetDocOptions();
-
- return aDocOpt.IsIter();
-}
-
-void SAL_CALL
-ScVbaApplication::setIteration(sal_Bool bIteration) throw (uno::RuntimeException)
-{
- ScModule* pScMod = SC_MOD();
- ScDocOptions& aDocOpt = const_cast< ScDocOptions& > (pScMod->GetDocOptions());
- aDocOpt.SetIter( bIteration );
-
- uno::Any aIteration;
- aIteration <<= bIteration;
-
- OUString aPropName(RTL_CONSTASCII_USTRINGPARAM( "IsIterationEnabled" ));
-
- uno::Reference< XCollection > xWorkbooks( new ScVbaWorkbooks( this, mxContext ) );
- sal_Int32 nCount = xWorkbooks->getCount();
-
- for (sal_Int32 i = 1; i <= nCount; i++)
- {
- uno::Reference< ooo::vba::excel::XWorkbook > xWorkbook;
- uno::Any aWorkbook = xWorkbooks->Item(uno::makeAny(i), uno::Any());
- aWorkbook >>= xWorkbook;
- ScVbaWorkbook* pWorkbook = excel::getImplFromDocModuleWrapper<ScVbaWorkbook>( xWorkbook );
- uno::Reference< frame::XModel > xModel( pWorkbook->getDocModel(), uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( aPropName, aIteration );
- }
-}
-
-//add the support of Excel VBA Application.EnableCancelKey
-sal_Int32 SAL_CALL
-ScVbaApplication::getEnableCancelKey() throw (uno::RuntimeException)
-{
- return ooo::vba::excel::XlEnableCancelKey::xlDisabled;
-}
-
-void SAL_CALL
-ScVbaApplication::setEnableCancelKey(sal_Int32 /*lEnableCancelKey*/) throw (uno::RuntimeException)
-{
-}
-
-sal_Int32 SAL_CALL ScVbaApplication::getSheetsInNewWorkbook() throw (uno::RuntimeException)
-{
- const ScDefaultsOptions& rOpt = SC_MOD()->GetDefaultsOptions();
- return rOpt.GetInitTabCount();
-}
-
-void SAL_CALL ScVbaApplication::setSheetsInNewWorkbook( sal_Int32 SheetsInNewWorkbook ) throw (script::BasicErrorException, uno::RuntimeException)
-{
- if ( SheetsInNewWorkbook < MININITTAB
- || SheetsInNewWorkbook > MAXINITTAB )
- {
- DebugHelper::exception( OUString(RTL_CONSTASCII_USTRINGPARAM("The number must be between 1 and 1024")),
- uno::Exception(), SbERR_METHOD_FAILED, OUString() );
- }
- else
- {
- ScDefaultsOptions& rOpt = const_cast< ScDefaultsOptions& >(SC_MOD()->GetDefaultsOptions());
- rOpt.SetInitTabCount( SheetsInNewWorkbook );
- }
-}
-
void SAL_CALL
ScVbaApplication::Calculate() throw( script::BasicErrorException , uno::RuntimeException )
{
@@ -1467,310 +1302,6 @@ ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeExcep
return aRet;
}
-uno::Any SAL_CALL
-ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& FilterIndex, const uno::Any& Title, const uno::Any& ButtonText, const uno::Any& MultiSelect) throw (uno::RuntimeException)
-{
- uno::Any aRet = uno::makeAny( false );
- try
- {
- const rtl::OUString sServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ));
- uno::Reference< lang::XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
- // Set the type of File Picker Dialog: TemplateDescription::FILEOPEN_SIMPLE.
- uno::Sequence< uno::Any > aDialogType( 1 );
- aDialogType[0] <<= ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
- uno::Reference< ui::dialogs::XFilePicker > xFilePicker( xMSF->createInstanceWithArguments( sServiceName, aDialogType ), UNO_QUERY );
- uno::Reference< ui::dialogs::XFilePicker2 > xFilePicker2( xFilePicker, UNO_QUERY );
- uno::Reference< ui::dialogs::XFilterManager > xFilterManager( xFilePicker, UNO_QUERY );
- uno::Reference< ui::dialogs::XExecutableDialog > xExecutableDialog( xFilePicker, UNO_QUERY );
- uno::Reference< ui::dialogs::XFilePickerControlAccess > xPickerControlAccess( xFilePicker, UNO_QUERY );
-
- if ( xFilterManager.is() && FileFilter.hasValue() )
- {
- sal_Int32 nFilterIndex = 1;
- if ( FilterIndex.hasValue() )
- {
- FilterIndex >>= nFilterIndex;
- }
- ::rtl::OUString strFilter;
- FileFilter >>= strFilter;
- sal_Int32 nCommaID = 0;
- sal_Int32 nIndex = 1;
- do
- {
- ::rtl::OUString aFilterTitleToken = strFilter.getToken( 0, ',' , nCommaID );
- ::rtl::OUString aFilterToken;
- if ( nCommaID >= 0 )
- {
- aFilterToken = strFilter.getToken( 0, ',' , nCommaID );
- }
- else if ( nCommaID < 0 && nIndex == 1 )
- {
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid FileFilter format!" )),
- uno::Reference< uno::XInterface >() );
- }
- xFilterManager->appendFilter( aFilterTitleToken, aFilterToken );
- if ( nFilterIndex == nIndex )
- {
- xFilterManager->setCurrentFilter( aFilterTitleToken );
- }
- nIndex++;
- } while ( nCommaID >= 0 );
- }
- if ( xExecutableDialog.is() && Title.hasValue() )
- {
- ::rtl::OUString sTitle;
- Title >>= sTitle;
- xExecutableDialog->setTitle( sTitle );
- }
- if ( xPickerControlAccess.is() && ButtonText.hasValue() )
- {
- ::rtl::OUString sButtonText;
- ButtonText >>= sButtonText;
- xPickerControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, sButtonText );
- }
- sal_Bool bMultiSelect = false;
- if ( xFilePicker.is() && MultiSelect.hasValue() )
- {
- MultiSelect >>= bMultiSelect;
- xFilePicker->setMultiSelectionMode( bMultiSelect );
- }
-
- if ( xFilePicker.is() && xFilePicker->execute() )
- {
- uno::Sequence< rtl::OUString > aSelectedFiles;
- if ( xFilePicker2.is() )
- {
- // On Linux, XFilePicker->getFiles() always return one selected file although we select more than one file, also on Vista
- // XFilePicker->getFiles() does not work well too, so we call XFilePicker2->getSelectedFiles() to get selected files.
- aSelectedFiles = xFilePicker2->getSelectedFiles();
- }
- else
- {
- // If only one file is selected, the first entry of the sequence contains the complete path/filename in URL format. If multiple files are selected,
- // the first entry of the sequence contains the path in URL format, and the other entries contains the names of the selected files without path information.
- uno::Sequence< rtl::OUString > aTmpFiles = xFilePicker->getFiles();
- aSelectedFiles = aTmpFiles;
- sal_Int32 iFileCount = aTmpFiles.getLength();
- if ( iFileCount > 1 )
- {
- aSelectedFiles.realloc( iFileCount - 1 );
- INetURLObject aPath( aTmpFiles[0] );
- aPath.setFinalSlash();
- for ( sal_Int32 i = 1; i < iFileCount; i++ )
- {
- if ( aTmpFiles[i].indexOf ('/') > 0 || aTmpFiles[i].indexOf ('\\') > 0 )
- {
- aSelectedFiles[i - 1] = aTmpFiles[i];
- }
- else
- {
- if ( i == 1 )
- aPath.Append( aTmpFiles[i] );
- else
- aPath.setName( aTmpFiles[i] );
- aSelectedFiles[i - 1] = aPath.GetMainURL( INetURLObject::NO_DECODE );
- }
- }
- }
- }
-
- sal_Int32 iFileCount = aSelectedFiles.getLength();
- for ( sal_Int32 i = 0; i < iFileCount; i++ )
- {
- INetURLObject aObj( aSelectedFiles[i] );
- if ( aObj.GetProtocol() == INET_PROT_FILE )
- {
- rtl::OUString aTemp = aObj.PathToFileName();
- aSelectedFiles[i] = aTemp.isEmpty() ? aSelectedFiles[i] : aTemp ;
- }
- }
- if ( bMultiSelect )
- {
- aRet = uno::makeAny( aSelectedFiles );
- }
- else if ( aSelectedFiles.getLength() > 0 && !bMultiSelect )
- {
- aRet = uno::makeAny( aSelectedFiles[0] );
- }
- }
- }
- catch (const uno::Exception&)
- {
- DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
- }
-
- return aRet;
-}
-
-::com::sun::star::uno::Reference< ::ooo::vba::XFileDialog > SAL_CALL
-ScVbaApplication::getFileDialog() throw (::com::sun::star::uno::RuntimeException)
-{
- uno::Reference< XFileDialog > xFileDialogs( new ScVbaFileDialog( uno::Reference< XHelperInterface >( this ), mxContext, getCurrentDocument() ) );
- return xFileDialogs;
-}
-
-typedef std::map< ::rtl::OUString, ::rtl::OUString > FileFilterMap;
-
-uno::Any SAL_CALL
-ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFilename, const ::com::sun::star::uno::Any& FileFilter, const ::com::sun::star::uno::Any& FilterIndex, const ::com::sun::star::uno::Any& Title, const ::com::sun::star::uno::Any& ButtonText ) throw (::com::sun::star::uno::RuntimeException)
-{
- uno::Any strRet;
- try
- {
- const rtl::OUString sServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ));
- uno::Reference< lang::XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
-
- uno::Sequence< uno::Any > aDialogType( 1 );
- aDialogType[0] <<= ui::dialogs::TemplateDescription::FILESAVE_SIMPLE;
- uno::Reference< ui::dialogs::XFilePicker > xFilePicker( xMSF->createInstanceWithArguments( sServiceName, aDialogType ), UNO_QUERY );
-
- if (InitialFilename.hasValue())
- {
- ::rtl::OUString strInitFileName;
- InitialFilename >>= strInitFileName;
- xFilePicker->setDefaultName(strInitFileName);
- }
-
- // Begin from 1.
- sal_Int32 nFilterIndex = 1;
- if (FilterIndex.hasValue())
- {
- FilterIndex >>= nFilterIndex;
- }
-
- uno::Reference< ui::dialogs::XFilterManager > xFilter( xFilePicker, UNO_QUERY );
- FileFilterMap mFilterNameMap;
- if (FileFilter.hasValue())
- {
- ::rtl::OUString strFilter;
- sal_Int32 nCommaID = 0;
- FileFilter >>= strFilter;
-
- sal_Int32 nIndex = 1;
- do
- {
- ::rtl::OUString aFilterTitleToken = strFilter.getToken( 0, ',' , nCommaID );
- ::rtl::OUString aFilterToken;
- if ( nCommaID >= 0 )
- {
- aFilterToken = strFilter.getToken( 0, ',' , nCommaID );
- }
- else if ( nCommaID < 0 && nIndex == 1 )
- {
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid FileFilter format!" )),
- uno::Reference< uno::XInterface >() );
- }
-
- FileFilterMap::const_iterator aIt = mFilterNameMap.find( aFilterTitleToken );
- if ( aIt == mFilterNameMap.end() )
- {
- xFilter->appendFilter( aFilterTitleToken, aFilterToken );
- if ( nFilterIndex == nIndex )
- {
- xFilter->setCurrentFilter( aFilterTitleToken );
- }
- nIndex++;
- mFilterNameMap[aFilterTitleToken] = aFilterToken;
- }
- } while ( nCommaID >= 0 );
- }
-
- if (Title.hasValue())
- {
- ::rtl::OUString strTitle;
- Title >>= strTitle;
- uno::Reference< ::com::sun::star::ui::dialogs::XExecutableDialog> xExcTblDlg(xFilePicker, UNO_QUERY );
- xExcTblDlg->setTitle(strTitle);
- }
-
- if (ButtonText.hasValue())
- {
- ::rtl::OUString strBttTxt;
- ButtonText >>= strBttTxt;
- }
-
-
- if ( xFilePicker.is() )
- {
- sal_Int16 nRet = xFilePicker->execute();
- if (nRet == 0)
- {
- strRet <<= false;
- }
- else
- {
- uno::Sequence < rtl::OUString > aPathSeq = xFilePicker->getFiles();
-
- if ( aPathSeq.getLength() )
- {
- ::rtl::OUString sSelectedFilters;
- if ( xFilter.is() )
- {
- ::rtl::OUString sSelectedFilterName = xFilter->getCurrentFilter();
- FileFilterMap::const_iterator aIt = mFilterNameMap.find( sSelectedFilterName );
- if ( aIt != mFilterNameMap.end() )
- {
- sSelectedFilters = aIt->second;
- }
- }
- INetURLObject aURLObj( aPathSeq[0] );
- ::rtl::OUString aPathStr = aURLObj.PathToFileName();
- if ( aURLObj.GetProtocol() == INET_PROT_FILE )
- {
- sal_Int32 nSemicolonID = 0;
- ::rtl::OUString sFirstFilter = sSelectedFilters.getToken( 0, ';' , nSemicolonID );
- ::rtl::OUString sFileExtension = aURLObj.GetExtension();
- if ( sFileExtension.isEmpty() )
- {
- sFileExtension = sFirstFilter == "*.*" ? sFileExtension : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
- aPathStr = sFileExtension.isEmpty() ? aPathStr : aPathStr + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
- }
- else
- {
- sal_Bool bValidFilter = false;
- FileFilterMap::const_iterator aIt = mFilterNameMap.begin();
- while ( aIt != mFilterNameMap.end() )
- {
- sSelectedFilters = aIt->second;
- nSemicolonID = 0;
- do
- {
- ::rtl::OUString aFilterToken = sSelectedFilters.getToken( 0, ';' , nSemicolonID );
- if ( aFilterToken.trim().equalsIgnoreAsciiCase( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*.")) + sFileExtension) )
- {
- bValidFilter = sal_True;
- break;
- }
- } while ( nSemicolonID >= 0 );
- if ( bValidFilter )
- {
- break;
- }
- ++aIt;
- }
- if ( !bValidFilter )
- {
- sFileExtension = sFirstFilter == "*.*" ? rtl::OUString()
- : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
- aPathStr = sFileExtension.isEmpty() ? aPathStr
- : aPathStr + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
- }
- }
- }
- strRet <<= aPathStr;
- }
- }
- }
- }
- catch (const uno::Exception&)
- {
- DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
- }
- return strRet;
-}
-
-//end add
-
uno::Reference< frame::XModel >
ScVbaApplication::getCurrentDocument() throw (css::uno::RuntimeException)
{
@@ -1790,86 +1321,6 @@ ScVbaApplication::MenuBars( const uno::Any& aIndex ) throw (uno::RuntimeExceptio
return uno::Any( xMenuBars );
}
-//add the support of Application.International
-sal_Int32 SAL_CALL
-ConvertCountryCode(const OUString& language)
-{
- sal_Int32 nCode = 0;
-
- if( language == "ar" ) nCode = 966; // Arabic
- else if ( language == "cs" ) nCode = 42; // Czech
- else if ( language == "da" ) nCode = 45; // Danish
- else if ( language == "de" ) nCode = 49; // German
- else if ( language == "en" ) nCode = 1; // English
- else if ( language == "es" ) nCode = 34; // Spanish
- else if ( language == "el" ) nCode = 30; // Greek
- else if ( language == "fa" ) nCode = 98; // Persian = Farsi
- else if ( language == "fi" ) nCode = 358; // Finnish
- else if ( language == "fr" ) nCode = 33; // French
- else if ( language == "he" ) nCode = 972; // Hebrew
- else if ( language == "hi" ) nCode = 91; // Indian = Hindi
- else if ( language == "hu" ) nCode = 36; // Hungarian
- else if ( language == "it" ) nCode = 39; // Italian
- else if ( language == "ja" ) nCode = 81; // Japanese
- else if ( language == "ko" ) nCode = 82; // Korean
- else if ( language == "nl" ) nCode = 31; // Dutch
- else if ( language == "no" ) nCode = 47; // Norwegian
- else if ( language == "pl" ) nCode = 48; // Polish
- else if ( language == "pt" ) nCode = 351; // Portuguese
- else if ( language == "ru" ) nCode = 7; // Russian
- else if ( language == "sv" ) nCode = 46; // Swedish
- else if ( language == "th" ) nCode = 66; // Thai
- else if ( language == "tk" ) nCode = 90; // Turkish
- else if ( language == "ur" ) nCode = 92; // Urdu
- else if ( language == "vi" ) nCode = 84; // Vietnamese
- else if ( language == "zh" ) nCode = 86; // Simplified Chinese
-
- return nCode;
-}
-
-uno::Any SAL_CALL
-ScVbaApplication::International( sal_Int32 Index ) throw (uno::RuntimeException)
-{
- uno::Any aRet;
- OUString str;
- const LocaleDataWrapper* pLocaleData = ScGlobal::GetpLocaleData();
- switch ( Index )
- {
- case excel::XlApplicationInternational::xlCountryCode:
- aRet <<= ConvertCountryCode( pLocaleData->getLanguageCountryInfo().Language );
- break;
- case excel::XlApplicationInternational::xlDecimalSeparator:
- str = pLocaleData->getNumDecimalSep();
- aRet <<= str;
- break;
- case excel::XlApplicationInternational::xlDateSeparator:
- str = pLocaleData->getDateSep();
- aRet <<= str;
- break;
- default:
- break;
- }
- return aRet;
-}
-
-void SAL_CALL ScVbaApplication::Undo( ) throw (::com::sun::star::uno::RuntimeException)
-{
- SfxAllItemSet reqList( SFX_APP()->GetPool() );
- SfxRequest rReq(SID_UNDO, 0, reqList);
- ScTabViewShell* pViewShell = excel::getCurrentBestViewShell( mxContext );
-
- if (pViewShell != NULL)
- {
- pViewShell->ExecuteUndo(rReq);
- }
-}
-
-double SAL_CALL ScVbaApplication::InchesToPoints( double Inches ) throw (uno::RuntimeException)
-{
- // Convert a measurement from Inch to Point (1 inch = 72 points).
- return MetricField::ConvertDoubleValue( Inches, 0, 0, FUNIT_INCH, FUNIT_POINT );
-}
-
rtl::OUString
ScVbaApplication::getServiceImplName()
{
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 0f72d7b..751175c 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -48,7 +48,6 @@ private:
ScVbaAppSettings& mrAppSettings;
rtl::OUString getOfficePath( const rtl::OUString& sPath ) throw ( css::uno::RuntimeException );
- css::uno::Reference< ov::XFileSearch > m_xFileSearch;
protected:
virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException);
@@ -94,7 +93,6 @@ public:
virtual void SAL_CALL setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException );
virtual css::uno::Reference< ov::XAssistant > SAL_CALL getAssistant() throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ov::XFileSearch > SAL_CALL getFileSearch() throw (css::uno::RuntimeException); // add the support of Application.FileSearch
virtual css::uno::Reference< ov::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);
@@ -108,17 +106,6 @@ public:
virtual ::sal_Int32 SAL_CALL getCursor() throw (css::uno::RuntimeException);
virtual void SAL_CALL setCursor( ::sal_Int32 _cursor ) throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw (css::uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL getIteration() throw (css::uno::RuntimeException); // add the support of Iteration
- virtual void SAL_CALL setIteration( sal_Bool bIteration ) throw (css::uno::RuntimeException); // add the support of Iteration
- virtual sal_Int32 SAL_CALL getEnableCancelKey() throw (css::uno::RuntimeException); // add the support of EnableCancelKey
- virtual void SAL_CALL setEnableCancelKey( sal_Int32 lEnableCancelKey ) throw (css::uno::RuntimeException); // add the support of EnableCancelKey
-
- virtual sal_Int32 SAL_CALL getSheetsInNewWorkbook() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setSheetsInNewWorkbook( sal_Int32 SheetsInNewWorkbook ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-
virtual sal_Bool SAL_CALL getEnableEvents() throw (css::uno::RuntimeException);
virtual void SAL_CALL setEnableEvents( sal_Bool bEnable ) throw (css::uno::RuntimeException);
@@ -144,12 +131,6 @@ public:
virtual void SAL_CALL Volatile( const css::uno::Any& Volatile ) throw (css::uno::RuntimeException );
virtual css::uno::Any SAL_CALL Caller( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL MenuBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL GetOpenFilename( const css::uno::Any& FileFilter, const css::uno::Any& FilterIndex, const css::uno::Any& Title, const css::uno::Any& ButtonText, const css::uno::Any& MultiSelect ) throw (css::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::ooo::vba::XFileDialog > SAL_CALL getFileDialog() throw (::com::sun::star::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL International( sal_Int32 Index ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFilename, const ::com::sun::star::uno::Any& FileFilter, const ::com::sun::star::uno::Any& FilterIndex, const ::com::sun::star::uno::Any& Title, const ::com::sun::star::uno::Any& ButtonText ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL Undo( ) throw (::com::sun::star::uno::RuntimeException);
- virtual double SAL_CALL InchesToPoints( double Inches ) throw (css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString getServiceImplName();
diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx
index bce3c19..e30fd5e 100644
--- a/sc/source/ui/vba/vbacomment.cxx
+++ b/sc/source/ui/vba/vbacomment.cxx
@@ -39,14 +39,6 @@
#include <com/sun/star/table/XCell.hpp>
#include <com/sun/star/text/XText.hpp>
-#include <cellsuno.hxx>
-#include <postit.hxx>
-#include <svx/svdobj.hxx>
-#include <svx/svdocapt.hxx>
-#include <ooo/vba/msforms/XShape.hpp>
-#include <com/sun/star/drawing/XShape.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-
#include <vbahelper/vbashape.hxx>
#include "vbaglobals.hxx"
#include "vbacomments.hxx"
@@ -187,6 +179,7 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An
aText >>= sText;
uno::Reference< text::XSimpleText > xAnnoText( getAnnotation(), uno::UNO_QUERY_THROW );
+ rtl::OUString sAnnoText = xAnnoText->getString();
if ( aStart.hasValue() )
{
@@ -225,7 +218,6 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An
getAnnotations()->insertNew( aAddress, sText );
}
- rtl::OUString sAnnoText = xAnnoText->getString();
return sAnnoText;
}
diff --git a/sc/source/ui/vba/vbadialog.cxx b/sc/source/ui/vba/vbadialog.cxx
index d7cbb74..9bb4e4c 100644
--- a/sc/source/ui/vba/vbadialog.cxx
+++ b/sc/source/ui/vba/vbadialog.cxx
@@ -32,56 +32,42 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-//solve the problem that "Application.Dialogs.Item(***).Show" and "Application.Dialogs.Count" cannot get the correct result
-struct DialogMatch
+static const rtl::OUString aStringList[]=
{
- sal_Int32 nVbaDlgIndex;
- rtl::OUString aOODlgName;
+ rtl::OUString( ".uno:Open" ),
+ rtl::OUString( ".uno:FormatCellDialog" ),
+ rtl::OUString( ".uno:InsertCell" ),
+ rtl::OUString( ".uno:Print" ),
+ rtl::OUString( ".uno:PasteSpecial" ),
+ rtl::OUString( ".uno:ToolProtectionDocument" ),
+ rtl::OUString( ".uno:ColumnWidth" ),
+ rtl::OUString( ".uno:DefineName" ),
+ rtl::OUString( ".uno:ConfigureDialog" ),
+ rtl::OUString( ".uno:HyperlinkDialog" ),
+ rtl::OUString( ".uno:InsertGraphic" ),
+ rtl::OUString( ".uno:InsertObject" ),
+ rtl::OUString( ".uno:PageFormatDialog" ),
+ rtl::OUString( ".uno:DataSort" ),
+ rtl::OUString( ".uno:RowHeight" ),
+ rtl::OUString( ".uno:AutoCorrectDlg" ),
+ rtl::OUString( ".uno:ConditionalFormatDialog" ),
+ rtl::OUString( ".uno:DataConsolidate" ),
+ rtl::OUString( ".uno:CreateNames" ),
+ rtl::OUString( ".uno:FillSeries" ),
+ rtl::OUString( ".uno:Validation"),
+ rtl::OUString( ".uno:DefineLabelRange" ),
+ rtl::OUString( ".uno:DataFilterAutoFilter" ),
+ rtl::OUString( ".uno:DataFilterSpecialFilter" ),
+ rtl::OUString( ".uno:AutoFormat" )
};
-static const DialogMatch aDialogMatchList[] =
-{
- { 1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Open" ) ) }, // xlDialogOpen -> .uno:Open
- { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormatCellDialog" ) ) }, // ??? -> .uno:FormatCellDialog
- { 55, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertCell" ) ) }, // xlDialogInsert -> .uno:InsertCell
- { 8, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Print" ) ) }, // xlDialogPrint -> .uno:Print
- { 9, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrinterSetup" ) ) }, // xlDialogPrinterSetup -> .uno:PrinterSetup
- { 53, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PasteSpecial" ) ) }, // xlDialogPasteSpecial -> .uno:PasteSpecial
- { 28, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ToolProtectionDocument" ) ) }, // xlDialogProtectDocument -> uno:ToolProtectionDocument
- { 47, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColumnWidth" ) ) }, // xlDialogColumnWidth -> .uno:ColumnWidth
- { 61, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineName" ) ) }, // xlDialogDefineName -> .uno:DefineName
- { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConfigureDialog" ) ) }, // ??? -> .uno:ConfigureDialog
- { 596, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:HyperlinkDialog" ) ) }, // xlDialogInsertHyperlink -> .uno:HyperlinkDialog
- { 342, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertGraphic" ) ) }, // xlDialogInsertPicture -> .uno:InsertGraphic
- { 259, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertObject" ) ) }, // xlDialogInsertObject -> .uno:InsertObject
- { 7, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PageFormatDialog" ) ) }, // xlDialogPageSetup -> .uno:PageFormatDialog
- { 39, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataSort" ) ) }, // xlDialogSort -> .uno:DataSort
- { 127, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:RowHeight" ) ) }, // xlDialogRowHeight -> .uno:RowHeight
- { 485, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AutoCorrectDlg" ) ) }, // xlDialogAutoCorrect -> .uno:AutoCorrectDlg
- { 583, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConditionalFormatDialog" ) ) }, // xlDialogCondiationalFormatting -> .uno:ConditionalFormatDialog
- { 191, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataConsolidate" ) ) }, // xlDialogConsolidate -> .uno:DataConsolidate
- { 62, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CreateNames" ) ) }, // xlDialogCreateNames -> .uno:CreateNames
- { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FillSeries" ) ) }, // ??? -> .uno:FillSeries
- { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Validation" ) ) }, // ??? -> .uno:Validation"
- { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineLabelRange" ) ) }, // ??? -> .uno:DefineLabelRange
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list