1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: vbaworkbook.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_VBA_WORKBOOK_HXX
31 #define SC_VBA_WORKBOOK_HXX
33 #include <com/sun/star/frame/XModel.hpp>
34 #include <ooo/vba/excel/XWorkbook.hpp>
35 #include <vbahelper/vbahelperinterface.hxx>
36 #include <vbahelper/vbadocumentbase.hxx>
40 typedef cppu::ImplInheritanceHelper1
< VbaDocumentBase
, ov::excel::XWorkbook
> ScVbaWorkbook_BASE
;
42 class ScVbaWorkbook
: public ScVbaWorkbook_BASE
44 static css::uno::Sequence
< sal_Int32
> ColorData
;
45 void initColorData( const css::uno::Sequence
< sal_Int32
>& sColors
);
49 ScVbaWorkbook( const css::uno::Reference
< ov::XHelperInterface
>& xParent
, const css::uno::Reference
< css::uno::XComponentContext
>& xContext
);
51 ScVbaWorkbook( const css::uno::Reference
< ov::XHelperInterface
>& xParent
, const css::uno::Reference
< css::uno::XComponentContext
>& xContext
,
52 css::uno::Reference
< css::frame::XModel
> xModel
);
53 ScVbaWorkbook( css::uno::Sequence
< css::uno::Any
> const& aArgs
, css::uno::Reference
< css::uno::XComponentContext
>const& xContext
);
54 virtual ~ScVbaWorkbook() {}
57 virtual ::sal_Bool SAL_CALL
getProtectStructure() throw (css::uno::RuntimeException
);
58 virtual css::uno::Reference
< ov::excel::XWorksheet
> SAL_CALL
getActiveSheet() throw (css::uno::RuntimeException
);
59 virtual ::sal_Bool SAL_CALL
getPrecisionAsDisplayed() throw (css::uno::RuntimeException
);
60 virtual void SAL_CALL
setPrecisionAsDisplayed( sal_Bool _precisionAsDisplayed
) throw (css::uno::RuntimeException
);
63 virtual css::uno::Any SAL_CALL
Worksheets( const css::uno::Any
& aIndex
) throw (css::uno::RuntimeException
);
64 virtual css::uno::Any SAL_CALL
Sheets( const css::uno::Any
& aIndex
) throw (css::uno::RuntimeException
);
65 virtual css::uno::Any SAL_CALL
Windows( const css::uno::Any
& aIndex
) throw (css::uno::RuntimeException
);
66 virtual void SAL_CALL
Activate() throw (css::uno::RuntimeException
);
68 virtual css::uno::Any SAL_CALL
Names( const css::uno::Any
& aIndex
) throw (css::uno::RuntimeException
);
70 virtual css::uno::Any SAL_CALL
Styles( const css::uno::Any
& Item
) throw (css::uno::RuntimeException
);
71 virtual void SAL_CALL
ResetColors( ) throw (css::script::BasicErrorException
, css::uno::RuntimeException
);
72 virtual css::uno::Any SAL_CALL
Colors( const css::uno::Any
& Index
) throw (css::script::BasicErrorException
, css::uno::RuntimeException
);
73 virtual ::sal_Int32 SAL_CALL
FileFormat( ) throw (css::script::BasicErrorException
, css::uno::RuntimeException
);
74 virtual void SAL_CALL
SaveCopyAs( const rtl::OUString
& Filename
) throw ( css::uno::RuntimeException
);
76 virtual ::rtl::OUString SAL_CALL
getCodeName() throw ( css::uno::RuntimeException
);
77 virtual void SAL_CALL
setCodeName( const ::rtl::OUString
& sGlobCodeName
) throw (css::uno::RuntimeException
);
80 virtual rtl::OUString
& getServiceImplName();
81 virtual css::uno::Sequence
<rtl::OUString
> getServiceNames();
84 #endif /* SC_VBA_WORKBOOK_HXX */