Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef SC_VBA_WORKBOOK_HXX
29 : : #define SC_VBA_WORKBOOK_HXX
30 : :
31 : : #include <com/sun/star/frame/XModel.hpp>
32 : : #include <ooo/vba/excel/XWorkbook.hpp>
33 : : #include <vbahelper/vbahelperinterface.hxx>
34 : : #include <vbahelper/vbadocumentbase.hxx>
35 : :
36 : : typedef cppu::ImplInheritanceHelper1< VbaDocumentBase, ov::excel::XWorkbook > ScVbaWorkbook_BASE;
37 : :
38 : : class ScVbaWorkbook : public ScVbaWorkbook_BASE
39 : : {
40 : : static css::uno::Sequence< sal_Int32 > ColorData;
41 : : void initColorData( const css::uno::Sequence< sal_Int32 >& sColors );
42 : : void init();
43 : :
44 : : ::rtl::OUString convertFileFormat(sal_Int32 aFileFormat);
45 : : protected:
46 : :
47 : : ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
48 : : public:
49 : : ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
50 : : css::uno::Reference< css::frame::XModel > xModel );
51 : : ScVbaWorkbook( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
52 [ # # ]: 0 : virtual ~ScVbaWorkbook() {}
53 : :
54 : : static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
55 : :
56 : : // Attributes
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);
61 : :
62 : : // Methods
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);
67 : : virtual void SAL_CALL Protect( const css::uno::Any & aPassword ) throw (css::uno::RuntimeException);
68 : : virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
69 : :
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 getFileFormat( ) throw (css::uno::RuntimeException);
74 : : virtual void SAL_CALL SaveCopyAs( const rtl::OUString& Filename ) throw ( css::uno::RuntimeException);
75 : : virtual void SAL_CALL SaveAs( const rtl::OUString& FileName, const css::uno::Any& FileFormat, const css::uno::Any& CreateBackup ) throw (css::uno::RuntimeException);
76 : :
77 : : // code name
78 : : virtual ::rtl::OUString SAL_CALL getCodeName() throw ( css::uno::RuntimeException);
79 : :
80 : : // XHelperInterface
81 : : virtual rtl::OUString getServiceImplName();
82 : : virtual css::uno::Sequence<rtl::OUString> getServiceNames();
83 : :
84 : 0 : virtual css::uno::Reference< css::frame::XModel > getDocModel() { return mxModel; }
85 : : // XUnoTunnel
86 : : virtual ::sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8 >& rId ) throw(css::uno::RuntimeException);
87 : : };
88 : :
89 : : #endif /* SC_VBA_WORKBOOK_HXX */
90 : :
91 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|