2010-10-12 15:59:00 +02:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2007-04-25 15:12:49 +00:00
/*************************************************************************
*
2008-04-11 00:22:11 +00:00
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER .
2007-04-25 15:12:49 +00:00
*
2010-02-12 15:01:35 +01:00
* Copyright 2000 , 2010 Oracle and / or its affiliates .
2007-04-25 15:12:49 +00:00
*
2008-04-11 00:22:11 +00:00
* OpenOffice . org - a multi - platform office productivity suite
2007-04-25 15:12:49 +00:00
*
2008-04-11 00:22:11 +00:00
* This file is part of OpenOffice . org .
2007-04-25 15:12:49 +00:00
*
2008-04-11 00:22:11 +00:00
* 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 .
2007-04-25 15:12:49 +00:00
*
2008-04-11 00:22:11 +00:00
* 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 ) .
2007-04-25 15:12:49 +00:00
*
2008-04-11 00:22:11 +00:00
* 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 .
2007-04-25 15:12:49 +00:00
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2009-09-18 15:24:22 +00:00
# include <vbahelper/helperdecl.hxx>
2007-04-25 15:12:49 +00:00
# include <tools/urlobj.hxx>
2007-12-07 10:06:05 +00:00
# include <comphelper/unwrapargs.hxx>
2007-04-25 15:12:49 +00:00
# include <com/sun/star/util/XModifiable.hpp>
# include <com/sun/star/util/XProtectable.hpp>
# include <com/sun/star/sheet/XSpreadsheetView.hpp>
# include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
# include <com/sun/star/frame/XStorable.hpp>
# include <com/sun/star/frame/XFrame.hpp>
# include <com/sun/star/beans/XPropertySet.hpp>
2009-02-13 13:03:24 +00:00
# include <ooo/vba/excel/XlFileFormat.hpp>
2010-10-06 10:15:43 +01:00
# include <ooo/vba/excel/XApplication.hpp> //liuchen 2009-12-16
2007-04-25 15:12:49 +00:00
2007-12-07 10:06:05 +00:00
# include "scextopt.hxx"
2007-04-25 15:12:49 +00:00
# include "vbaworksheet.hxx"
# include "vbaworksheets.hxx"
# include "vbaworkbook.hxx"
# include "vbawindows.hxx"
2007-12-07 10:06:05 +00:00
# include "vbastyles.hxx"
2009-09-18 15:24:22 +00:00
# include "excelvbahelper.hxx"
2007-12-07 10:06:05 +00:00
# include "vbapalette.hxx"
# include <osl/file.hxx>
2007-04-25 15:12:49 +00:00
# include <stdio.h>
2007-12-07 10:06:05 +00:00
# include "vbanames.hxx" // Amelia Wang
# include "nameuno.hxx"
2009-09-18 15:24:22 +00:00
# include "docoptio.hxx"
2010-08-05 15:43:06 +02:00
# include "unonames.hxx"
2007-04-25 15:12:49 +00:00
// Much of the impl. for the equivalend UNO module is
// sc/source/ui/unoobj/docuno.cxx, viewuno.cxx
2009-02-13 13:03:24 +00:00
using namespace : : ooo : : vba ;
2007-04-25 15:12:49 +00:00
using namespace : : com : : sun : : star ;
class ActiveSheet : public ScVbaWorksheet
{
protected :
virtual uno : : Reference < frame : : XModel > getModel ( )
{
2009-09-18 15:24:22 +00:00
return getCurrentExcelDoc ( mxContext ) ;
2007-04-25 15:12:49 +00:00
}
virtual uno : : Reference < sheet : : XSpreadsheet > getSheet ( )
{
uno : : Reference < frame : : XModel > xModel = getModel ( ) ;
uno : : Reference < sheet : : XSpreadsheet > xSheet ;
if ( xModel . is ( ) )
{
uno : : Reference < sheet : : XSpreadsheetView > xSpreadsheet (
xModel - > getCurrentController ( ) , uno : : UNO_QUERY ) ;
if ( xSpreadsheet . is ( ) )
xSheet = xSpreadsheet - > getActiveSheet ( ) ;
}
return xSheet ;
}
public :
2009-02-13 13:03:24 +00:00
ActiveSheet ( const uno : : Reference < XHelperInterface > & xParent , const uno : : Reference < uno : : XComponentContext > & xContext ) : ScVbaWorksheet ( xParent , xContext ) { }
2007-04-25 15:12:49 +00:00
} ;
2007-12-07 10:06:05 +00:00
uno : : Sequence < sal_Int32 > ScVbaWorkbook : : ColorData ;
void ScVbaWorkbook : : initColorData ( const uno : : Sequence < sal_Int32 > & sColors )
{
const sal_Int32 * pSource = sColors . getConstArray ( ) ;
sal_Int32 * pDest = ColorData . getArray ( ) ;
const sal_Int32 * pEnd = pSource + sColors . getLength ( ) ;
for ( ; pSource ! = pEnd ; + + pSource , + + pDest )
* pDest = * pSource ;
}
void SAL_CALL
ScVbaWorkbook : : ResetColors ( ) throw ( : : script : : BasicErrorException , : : uno : : RuntimeException )
{
uno : : Reference < container : : XIndexAccess > xIndexAccess ( ScVbaPalette : : getDefaultPalette ( ) , uno : : UNO_QUERY_THROW ) ;
sal_Int32 nLen = xIndexAccess - > getCount ( ) ;
ColorData . realloc ( nLen ) ;
uno : : Sequence < sal_Int32 > dDefaultColors ( nLen ) ;
sal_Int32 * pDest = dDefaultColors . getArray ( ) ;
for ( sal_Int32 index = 0 ; index < nLen ; + + pDest , + + index )
xIndexAccess - > getByIndex ( index ) > > = ( * pDest ) ;
initColorData ( dDefaultColors ) ;
}
: : uno : : Any SAL_CALL
ScVbaWorkbook : : Colors ( const : : uno : : Any & Index ) throw ( : : script : : BasicErrorException , : : uno : : RuntimeException )
{
uno : : Any aRet ;
if ( Index . getValue ( ) )
{
sal_Int32 nIndex = 0 ;
Index > > = nIndex ;
aRet = uno : : makeAny ( XLRGBToOORGB ( ColorData [ - - nIndex ] ) ) ;
}
else
aRet = uno : : makeAny ( ColorData ) ;
return aRet ;
}
: : sal_Int32 SAL_CALL
2010-10-06 10:15:43 +01:00
ScVbaWorkbook : : getFileFormat ( ) throw ( : : uno : : RuntimeException )
2007-12-07 10:06:05 +00:00
{
sal_Int32 aFileFormat = 0 ;
rtl : : OUString aFilterName ;
uno : : Sequence < beans : : PropertyValue > aArgs = getModel ( ) - > getArgs ( ) ;
// #FIXME - seems suspect should we not walk through the properties
// to find the FilterName
if ( aArgs [ 0 ] . Name . equalsAscii ( " FilterName " ) ) {
aArgs [ 0 ] . Value > > = aFilterName ;
} else {
aArgs [ 1 ] . Value > > = aFilterName ;
}
if ( aFilterName . equalsAscii ( " Text - txt - csv (StarCalc) " ) ) {
aFileFormat = excel : : XlFileFormat : : xlCSV ; //xlFileFormat.
}
if ( aFilterName . equalsAscii ( " DBF " ) ) {
aFileFormat = excel : : XlFileFormat : : xlDBF4 ;
}
if ( aFilterName . equalsAscii ( " DIF " ) ) {
aFileFormat = excel : : XlFileFormat : : xlDIF ;
}
if ( aFilterName . equalsAscii ( " Lotus " ) ) {
aFileFormat = excel : : XlFileFormat : : xlWK3 ;
}
if ( aFilterName . equalsAscii ( " MS Excel 4.0 " ) ) {
aFileFormat = excel : : XlFileFormat : : xlExcel4Workbook ;
}
if ( aFilterName . equalsAscii ( " MS Excel 5.0/95 " ) ) {
aFileFormat = excel : : XlFileFormat : : xlExcel5 ;
}
if ( aFilterName . equalsAscii ( " MS Excel 97 " ) ) {
aFileFormat = excel : : XlFileFormat : : xlExcel9795 ;
}
if ( aFilterName . equalsAscii ( " HTML (StarCalc) " ) ) {
aFileFormat = excel : : XlFileFormat : : xlHtml ;
}
if ( aFilterName . equalsAscii ( " calc_StarOffice_XML_Calc_Template " ) ) {
aFileFormat = excel : : XlFileFormat : : xlTemplate ;
}
if ( aFilterName . equalsAscii ( " StarOffice XML (Calc) " ) ) {
aFileFormat = excel : : XlFileFormat : : xlWorkbookNormal ;
}
if ( aFilterName . equalsAscii ( " calc8 " ) ) {
aFileFormat = excel : : XlFileFormat : : xlWorkbookNormal ;
}
return aFileFormat ;
}
2010-10-06 10:15:43 +01:00
//VBA by minz@cn.ibm.com. Convert Excel fileformat to OO file filter
: : rtl : : OUString ScVbaWorkbook : : convertFileFormat ( sal_Int32 aFileFormat )
{
rtl : : OUString aFilterName ;
switch ( aFileFormat )
{
case excel : : XlFileFormat : : xlCSV :
aFilterName = rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " Text - txt - csv (StarCalc) " ) ) ;
break ;
case excel : : XlFileFormat : : xlExcel9795 :
aFilterName = rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " MS Excel 97 " ) ) ;
break ;
}
return aFilterName ;
}
2007-12-07 10:06:05 +00:00
void
ScVbaWorkbook : : init ( )
{
if ( ! ColorData . getLength ( ) )
ResetColors ( ) ;
}
2009-09-18 15:24:22 +00:00
ScVbaWorkbook : : ScVbaWorkbook ( const css : : uno : : Reference < ov : : XHelperInterface > & xParent , const css : : uno : : Reference < css : : uno : : XComponentContext > & xContext ) : ScVbaWorkbook_BASE ( xParent , xContext )
2007-12-07 10:06:05 +00:00
{
//#FIXME this persists the color data per office instance and
// not per workbook instance, need to hook the data into XModel
// ( e.g. we already store the imported palette in there )
// so we should,
// a) make the class that does that a service
// b) make that service implement XIndexContainer
init ( ) ;
}
2009-09-18 15:24:22 +00:00
ScVbaWorkbook : : ScVbaWorkbook ( const css : : uno : : Reference < ov : : XHelperInterface > & xParent , const css : : uno : : Reference < css : : uno : : XComponentContext > & xContext , css : : uno : : Reference < css : : frame : : XModel > xModel ) : ScVbaWorkbook_BASE ( xParent , xContext , xModel )
2007-12-07 10:06:05 +00:00
{
init ( ) ;
}
ScVbaWorkbook : : ScVbaWorkbook ( uno : : Sequence < uno : : Any > const & args ,
2009-09-18 15:24:22 +00:00
uno : : Reference < uno : : XComponentContext > const & xContext ) : ScVbaWorkbook_BASE ( args , xContext )
2007-12-07 10:06:05 +00:00
{
init ( ) ;
}
2007-04-25 15:12:49 +00:00
uno : : Reference < excel : : XWorksheet >
ScVbaWorkbook : : getActiveSheet ( ) throw ( uno : : RuntimeException )
{
2010-08-05 15:43:06 +02:00
uno : : Reference < frame : : XModel > xModel ( getCurrentExcelDoc ( mxContext ) , uno : : UNO_SET_THROW ) ;
2009-09-18 15:24:22 +00:00
uno : : Reference < sheet : : XSpreadsheetView > xView ( xModel - > getCurrentController ( ) , uno : : UNO_QUERY_THROW ) ;
2010-08-05 15:43:06 +02:00
uno : : Reference < beans : : XPropertySet > xSheetProps ( xView - > getActiveSheet ( ) , uno : : UNO_QUERY_THROW ) ;
// #162503# return the original document module wrapper object, instead of a new instance
: : rtl : : OUString aCodeName ;
xSheetProps - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( SC_UNO_CODENAME ) ) ) > > = aCodeName ;
ScDocShell * pShell = excel : : getDocShell ( xModel ) ;
if ( ! pShell )
throw uno : : RuntimeException ( ) ;
return uno : : Reference < excel : : XWorksheet > ( getUnoDocModule ( aCodeName , pShell ) , uno : : UNO_QUERY_THROW ) ;
2007-04-25 15:12:49 +00:00
}
2010-08-05 15:43:06 +02:00
2007-04-25 15:12:49 +00:00
uno : : Any SAL_CALL
ScVbaWorkbook : : Sheets ( const uno : : Any & aIndex ) throw ( uno : : RuntimeException )
{
return Worksheets ( aIndex ) ;
}
2007-12-07 10:06:05 +00:00
2007-04-25 15:12:49 +00:00
uno : : Any SAL_CALL
ScVbaWorkbook : : Worksheets ( const uno : : Any & aIndex ) throw ( uno : : RuntimeException )
{
uno : : Reference < frame : : XModel > xModel ( getModel ( ) ) ;
uno : : Reference < sheet : : XSpreadsheetDocument > xSpreadDoc ( xModel , uno : : UNO_QUERY_THROW ) ;
2007-12-07 10:06:05 +00:00
uno : : Reference < container : : XIndexAccess > xSheets ( xSpreadDoc - > getSheets ( ) , uno : : UNO_QUERY_THROW ) ;
2009-02-13 13:03:24 +00:00
uno : : Reference < XCollection > xWorkSheets ( new ScVbaWorksheets ( this , mxContext , xSheets , xModel ) ) ;
2007-04-25 15:12:49 +00:00
if ( aIndex . getValueTypeClass ( ) = = uno : : TypeClass_VOID )
{
return uno : : Any ( xWorkSheets ) ;
}
2007-12-07 10:06:05 +00:00
// pass on to collection
return uno : : Any ( xWorkSheets - > Item ( aIndex , uno : : Any ( ) ) ) ;
2007-04-25 15:12:49 +00:00
}
uno : : Any SAL_CALL
ScVbaWorkbook : : Windows ( const uno : : Any & aIndex ) throw ( uno : : RuntimeException )
{
2009-09-18 15:24:22 +00:00
uno : : Reference < excel : : XWindows > xWindows ( new ScVbaWindows ( getParent ( ) , mxContext ) ) ;
2007-04-25 15:12:49 +00:00
if ( aIndex . getValueTypeClass ( ) = = uno : : TypeClass_VOID )
return uno : : Any ( xWindows ) ;
2007-12-07 10:06:05 +00:00
return uno : : Any ( xWindows - > Item ( aIndex , uno : : Any ( ) ) ) ;
2007-04-25 15:12:49 +00:00
}
2009-09-18 15:24:22 +00:00
void SAL_CALL
ScVbaWorkbook : : Activate ( ) throw ( uno : : RuntimeException )
2007-04-25 15:12:49 +00:00
{
2009-09-18 15:24:22 +00:00
VbaDocumentBase : : Activate ( ) ;
2007-04-25 15:12:49 +00:00
}
2010-10-06 10:15:43 +01:00
void
ScVbaWorkbook : : Protect ( const uno : : Any & aPassword ) throw ( uno : : RuntimeException )
{
VbaDocumentBase : : Protect ( aPassword ) ;
}
2007-04-25 15:12:49 +00:00
: : sal_Bool
ScVbaWorkbook : : getProtectStructure ( ) throw ( uno : : RuntimeException )
{
uno : : Reference < util : : XProtectable > xProt ( getModel ( ) , uno : : UNO_QUERY_THROW ) ;
return xProt - > isProtected ( ) ;
}
2009-09-18 15:24:22 +00:00
: : sal_Bool SAL_CALL ScVbaWorkbook : : getPrecisionAsDisplayed ( ) throw ( uno : : RuntimeException )
2007-04-25 15:12:49 +00:00
{
2009-09-18 15:24:22 +00:00
uno : : Reference < frame : : XModel > xModel ( getModel ( ) , uno : : UNO_QUERY_THROW ) ;
ScDocument * pDoc = excel : : getDocShell ( xModel ) - > GetDocument ( ) ;
return pDoc - > GetDocOptions ( ) . IsCalcAsShown ( ) ;
2007-04-25 15:12:49 +00:00
}
2009-09-18 15:24:22 +00:00
void SAL_CALL ScVbaWorkbook : : setPrecisionAsDisplayed ( sal_Bool _precisionAsDisplayed ) throw ( uno : : RuntimeException )
2007-04-25 15:12:49 +00:00
{
2009-09-18 15:24:22 +00:00
uno : : Reference < frame : : XModel > xModel ( getModel ( ) , uno : : UNO_QUERY_THROW ) ;
ScDocument * pDoc = excel : : getDocShell ( xModel ) - > GetDocument ( ) ;
ScDocOptions aOpt = pDoc - > GetDocOptions ( ) ;
aOpt . SetCalcAsShown ( _precisionAsDisplayed ) ;
pDoc - > SetDocOptions ( aOpt ) ;
2007-04-25 15:12:49 +00:00
}
2007-12-07 10:06:05 +00:00
void
ScVbaWorkbook : : SaveCopyAs ( const rtl : : OUString & sFileName ) throw ( uno : : RuntimeException )
{
rtl : : OUString aURL ;
osl : : FileBase : : getFileURLFromSystemPath ( sFileName , aURL ) ;
uno : : Reference < frame : : XStorable > xStor ( getModel ( ) , uno : : UNO_QUERY_THROW ) ;
uno : : Sequence < beans : : PropertyValue > storeProps ( 1 ) ;
storeProps [ 0 ] . Name = rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " FilterName " ) ) ;
storeProps [ 0 ] . Value < < = rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " MS Excel 97 " ) ) ;
xStor - > storeToURL ( aURL , storeProps ) ;
}
2010-10-06 10:15:43 +01:00
//VBA by minz@cn.ibm.com. Add Workbook.SaveAs.
void
ScVbaWorkbook : : SaveAs ( const rtl : : OUString & FileName , const uno : : Any & FileFormat , const uno : : Any & /*CreateBackup*/ ) throw ( uno : : RuntimeException )
{
rtl : : OUString aURL ;
osl : : FileBase : : getFileURLFromSystemPath ( FileName , aURL ) ;
//liuchen 2009-12-16 if the input parameter "FileName" takes the form as "MyFile", we need to get the current directory and combine the current directory and the file name
INetURLObject aFileNameURL ( aURL ) ;
aURL = aFileNameURL . GetMainURL ( INetURLObject : : NO_DECODE ) ;
if ( aURL . getLength ( ) = = 0 )
{
uno : : Reference < excel : : XApplication > xApplication ( Application ( ) , uno : : UNO_QUERY_THROW ) ;
rtl : : OUString aPathStr = xApplication - > getDefaultFilePath ( ) ;
rtl : : OUString aPathURLStr ;
osl : : FileBase : : getFileURLFromSystemPath ( aPathStr , aPathURLStr ) ;
INetURLObject aPathURL ( aPathURLStr ) ;
aPathURL . Append ( FileName ) ;
aURL = aPathURL . GetMainURL ( INetURLObject : : NO_DECODE ) ;
}
//liuchen 2009-12-16
uno : : Reference < frame : : XStorable > xStor ( getModel ( ) , uno : : UNO_QUERY_THROW ) ;
sal_Int32 aFileFormat = excel : : XlFileFormat : : xlExcel9795 ;
FileFormat > > = aFileFormat ;
if ( FileName . indexOf ( ' . ' ) = = - 1 )
{
if ( aFileFormat = = excel : : XlFileFormat : : xlExcel9795 )
{
aURL = aURL + rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " .xls " ) ) ;
}
else if ( aFileFormat = = excel : : XlFileFormat : : xlCSV )
{
aURL = aURL + rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " .csv " ) ) ;
}
}
uno : : Sequence < beans : : PropertyValue > storeProps ( 1 ) ;
storeProps [ 0 ] . Name = rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " FilterName " ) ) ;
storeProps [ 0 ] . Value < < = convertFileFormat ( aFileFormat ) ;
xStor - > storeAsURL ( aURL , storeProps ) ;
}
2007-12-07 10:06:05 +00:00
css : : uno : : Any SAL_CALL
ScVbaWorkbook : : Styles ( const : : uno : : Any & Item ) throw ( uno : : RuntimeException )
{
// quick look and Styles object doesn't seem to have a valid parent
// or a least the object browser just shows an object that has no
// variables ( therefore... leave as NULL for now )
2009-02-13 13:03:24 +00:00
uno : : Reference < XCollection > dStyles = new ScVbaStyles ( uno : : Reference < XHelperInterface > ( ) , mxContext , getModel ( ) ) ;
2007-12-07 10:06:05 +00:00
if ( Item . hasValue ( ) )
return dStyles - > Item ( Item , uno : : Any ( ) ) ;
return uno : : makeAny ( dStyles ) ;
}
// Amelia Wang
uno : : Any SAL_CALL
2009-02-13 13:03:24 +00:00
ScVbaWorkbook : : Names ( const css : : uno : : Any & aIndex ) throw ( uno : : RuntimeException )
2007-12-07 10:06:05 +00:00
{
uno : : Reference < frame : : XModel > xModel ( getModel ( ) ) ;
uno : : Reference < beans : : XPropertySet > xProps ( xModel , uno : : UNO_QUERY_THROW ) ;
uno : : Reference < sheet : : XNamedRanges > xNamedRanges ( xProps - > getPropertyValue ( rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " NamedRanges " ) ) ) , uno : : UNO_QUERY_THROW ) ;
2009-02-13 13:03:24 +00:00
uno : : Reference < XCollection > xNames ( new ScVbaNames ( this , mxContext , xNamedRanges , xModel ) ) ;
if ( aIndex . getValueTypeClass ( ) = = uno : : TypeClass_VOID )
{
2007-12-07 10:06:05 +00:00
return uno : : Any ( xNames ) ;
}
2009-02-13 13:03:24 +00:00
return uno : : Any ( xNames - > Item ( aIndex , uno : : Any ( ) ) ) ;
}
2007-12-07 10:06:05 +00:00
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 ) ;
2009-02-13 13:03:24 +00:00
aServiceNames [ 0 ] = rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " ooo.vba.excel.Workbook " ) ) ;
2007-12-07 10:06:05 +00:00
}
return aServiceNames ;
}
: : rtl : : OUString SAL_CALL
ScVbaWorkbook : : getCodeName ( ) throw ( css : : uno : : RuntimeException )
{
2010-06-15 20:02:53 +02:00
uno : : Reference < beans : : XPropertySet > xModelProp ( getModel ( ) , uno : : UNO_QUERY_THROW ) ;
return xModelProp - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " CodeName " ) ) ) . get < : : rtl : : OUString > ( ) ;
2007-12-07 10:06:05 +00:00
}
namespace workbook
{
namespace sdecl = comphelper : : service_decl ;
sdecl : : vba_service_class_ < ScVbaWorkbook , sdecl : : with_args < true > > serviceImpl ;
extern sdecl : : ServiceDecl const serviceDecl (
serviceImpl ,
" ScVbaWorkbook " ,
2009-02-13 13:03:24 +00:00
" ooo.vba.excel.Workbook " ) ;
2007-12-07 10:06:05 +00:00
}
2010-10-12 15:59:00 +02:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */