Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef SC_VBA_WORKBOOK_HXX
20 : #define SC_VBA_WORKBOOK_HXX
21 :
22 : #include <com/sun/star/frame/XModel.hpp>
23 : #include <ooo/vba/excel/XWorkbook.hpp>
24 : #include <vbahelper/vbahelperinterface.hxx>
25 : #include <vbahelper/vbadocumentbase.hxx>
26 :
27 : typedef cppu::ImplInheritanceHelper1< VbaDocumentBase, ov::excel::XWorkbook > ScVbaWorkbook_BASE;
28 :
29 : class ScVbaWorkbook : public ScVbaWorkbook_BASE
30 : {
31 : static css::uno::Sequence< sal_Int32 > ColorData;
32 : void initColorData( const css::uno::Sequence< sal_Int32 >& sColors );
33 : void init();
34 :
35 : public:
36 : ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
37 : css::uno::Reference< css::frame::XModel > xModel );
38 : ScVbaWorkbook( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
39 0 : virtual ~ScVbaWorkbook() {}
40 :
41 : // Attributes
42 : virtual ::sal_Bool SAL_CALL getProtectStructure() throw (css::uno::RuntimeException);
43 : virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
44 : virtual ::sal_Bool SAL_CALL getPrecisionAsDisplayed() throw (css::uno::RuntimeException);
45 : virtual void SAL_CALL setPrecisionAsDisplayed( sal_Bool _precisionAsDisplayed ) throw (css::uno::RuntimeException);
46 :
47 : // Methods
48 : virtual css::uno::Any SAL_CALL Worksheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
49 : virtual css::uno::Any SAL_CALL Sheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
50 : virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
51 : virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
52 : virtual void SAL_CALL Protect( const css::uno::Any & aPassword ) throw (css::uno::RuntimeException);
53 : virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
54 :
55 : virtual css::uno::Any SAL_CALL Styles( const css::uno::Any& Item ) throw (css::uno::RuntimeException);
56 : virtual void SAL_CALL ResetColors( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
57 : virtual css::uno::Any SAL_CALL Colors( const css::uno::Any& Index ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
58 : virtual ::sal_Int32 SAL_CALL getFileFormat( ) throw (css::uno::RuntimeException);
59 : virtual void SAL_CALL SaveCopyAs( const rtl::OUString& Filename ) throw ( css::uno::RuntimeException);
60 :
61 : // code name
62 : virtual ::rtl::OUString SAL_CALL getCodeName() throw ( css::uno::RuntimeException);
63 :
64 : // XHelperInterface
65 : virtual rtl::OUString getServiceImplName();
66 : virtual css::uno::Sequence<rtl::OUString> getServiceNames();
67 :
68 : // XUnoTunnel
69 : virtual ::sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8 >& rId ) throw(css::uno::RuntimeException);
70 : };
71 :
72 : #endif /* SC_VBA_WORKBOOK_HXX */
73 :
74 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|