summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2010-11-02 15:36:45 +0000
committerNoel Power <noel.power@novell.com>2010-11-02 19:36:00 +0000
commit74d2cd13984ddc4b46497cd696fbeb617010ea50 (patch)
treeab0b495c38ef69d98c6266812d4e6858c149b40c /sc/source/ui/docshell/docsh5.cxx
parent020e345334e25ca71cd91105bbee73ad20d0b6f1 (diff)
initial import of latest cws container_controls
Diffstat (limited to 'sc/source/ui/docshell/docsh5.cxx')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index e852ca29a948..8a2c3e528fb0 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -43,6 +43,7 @@
#include <svl/smplhint.hxx>
#include <com/sun/star/sdbc/XResultSet.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
// INCLUDE ---------------------------------------------------------------
@@ -71,6 +72,12 @@
// defined in docfunc.cxx
void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sModuleSource );
+using com::sun::star::script::XLibraryContainer;
+using com::sun::star::script::vba::XVBACompatibility;
+using com::sun::star::container::XNameContainer;
+using com::sun::star::uno::Reference;
+using com::sun::star::uno::UNO_QUERY;
+
// ---------------------------------------------------------------------------
//
@@ -940,18 +947,21 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
{
StarBASIC* pStarBASIC = GetBasic();
String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
- if ( GetBasicManager()->GetName().Len() > 0 )
+ Reference< XLibraryContainer > xLibContainer = GetBasicContainer();
+ Reference< XVBACompatibility > xVBACompat( xLibContainer, UNO_QUERY );
+
+ if ( xVBACompat.is() )
{
- aLibName = GetBasicManager()->GetName();
+ aLibName = xVBACompat->getProjectName();
pStarBASIC = GetBasicManager()->GetLib( aLibName );
}
+
SCTAB nTabToUse = nDestTab;
if ( nDestTab == SC_TAB_APPEND )
nTabToUse = aDocument.GetMaxTableNumber() - 1;
String sCodeName;
String sSource;
- com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer > xLibContainer = GetBasicContainer();
- com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > xLib;
+ Reference< XNameContainer > xLib;
if( xLibContainer.is() )
{
com::sun::star::uno::Any aLibAny = xLibContainer->getByName( aLibName );
@@ -1018,7 +1028,7 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer )
{
ScRange aRange;
pDBData->GetArea( aRange );
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
+ Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag as parameter
// internal operations (sort, query, subtotal) only if no error
if (bContinue)