--- sc/source/ui/vba//vbaworkbook.cxx	
+++ sc/source/ui/vba//vbaworkbook.cxx
@@ -47,7 +47,7 @@
 #include "vbaworkbook.hxx"
 #include "vbawindows.hxx"
 #include "vbahelper.hxx"
-
+#include <osl/file.hxx>
 #include <stdio.h>
 
 // Much of the impl. for the equivalend UNO module is
@@ -77,7 +77,7 @@ protected:
 		return xSheet;
 	}
 public:
-	ActiveSheet( uno::Reference< uno::XComponentContext >& xContext ) : ScVbaWorksheet( xContext ) {}
+	ActiveSheet( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : ScVbaWorksheet( xParent, xContext ) {}
 		
 };
 
@@ -90,7 +90,7 @@ ScVbaWorkbook::getName() throw (uno::Run
 	{
 
 		INetURLObject aURL( getModel()->getURL() );
-		sName = aURL.GetLastName();
+		::osl::File::getSystemPathFromFileURL( aURL.GetLastName(), sName );
 	}
 	else
 	{
@@ -121,7 +121,7 @@ ScVbaWorkbook::getFullName() throw (uno:
 uno::Reference< excel::XWorksheet >
 ScVbaWorkbook::getActiveSheet() throw (uno::RuntimeException)
 {
-	return new ActiveSheet( m_xContext );
+	return new ActiveSheet( this, mxContext );
 }
 uno::Any SAL_CALL
 ScVbaWorkbook::Sheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
@@ -134,20 +134,20 @@ ScVbaWorkbook::Worksheets( const uno::An
 	uno::Reference< frame::XModel > xModel( getModel() );	
 	uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( xModel, uno::UNO_QUERY_THROW );
 	uno::Reference<sheet::XSpreadsheets > xSheets( xSpreadDoc->getSheets(), uno::UNO_QUERY_THROW );
-	uno::Reference< vba::XCollection > xWorkSheets( uno::Reference< excel::XWorksheets >( new ScVbaWorksheets(m_xContext, xSheets, xModel ) ), uno::UNO_QUERY_THROW );
+	uno::Reference< vba::XCollection > xWorkSheets(  new ScVbaWorksheets( this, mxContext, xSheets, xModel ) );
 	if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
 	{
 		return uno::Any( xWorkSheets );	
 	}
-	return uno::Any( xWorkSheets->Item( aIndex ) );
+	return uno::Any( xWorkSheets->Item( aIndex, uno::Any() ) );
 }
 uno::Any SAL_CALL
 ScVbaWorkbook::Windows( const uno::Any& aIndex ) throw (uno::RuntimeException)
 {
-	uno::Reference< vba::XCollection >  xWindows = ScVbaWindows::Windows( m_xContext );
+	uno::Reference< vba::XCollection >  xWindows = ScVbaWindows::Windows( mxContext );
 	if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
 		return uno::Any( xWindows );
-	return uno::Any( xWindows->Item( aIndex ) );
+	return uno::Any( xWindows->Item( aIndex, uno::Any() ) );
 }
 void
 ScVbaWorkbook::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg,
@@ -265,3 +265,21 @@ ScVbaWorkbook::Activate() throw (uno::Ru
 	xFrame->activate();
 }	
 
+rtl::OUString& 
+ScVbaWorkbook::getServiceImplName()
+{
+	static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaWorkbook") );
+	return sImplName;
+}
+
+uno::Sequence< rtl::OUString > 
+ScVbaWorkbook::getServiceNames()
+{
+	static uno::Sequence< rtl::OUString > aServiceNames;
+	if ( aServiceNames.getLength() == 0 )
+	{
+		aServiceNames.realloc( 1 );
+		aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Workbook" ) );
+	}
+	return aServiceNames;
+}
