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_FORMATCONDITIONS_HXX
20 : #define SC_VBA_FORMATCONDITIONS_HXX
21 : #include <ooo/vba/excel/XFormatConditions.hpp>
22 : #include <ooo/vba/excel/XStyles.hpp>
23 : #include <ooo/vba/excel/XRange.hpp>
24 : #include <com/sun/star/beans/XPropertySet.hpp>
25 : #include <com/sun/star/table/CellAddress.hpp>
26 : #include <com/sun/star/sheet/XSheetConditionalEntries.hpp>
27 : #include <vbahelper/vbacollectionimpl.hxx>
28 :
29 : typedef CollTestImplHelper< ov::excel::XFormatConditions > ScVbaFormatConditions_BASE;
30 :
31 : // This class is used only as a target for casting, it seems,
32 : // and no objects of this type are created as such, I think.
33 : // So avoid MSVC warnings:
34 : // warning C4510: 'ScVbaFormatConditions' : default constructor could not be generated
35 : // warning C4610: class 'ScVbaFormatConditions' can never be instantiated - user defined constructor required
36 :
37 : #ifdef _MSC_VER
38 : #pragma warning(push)
39 : #pragma warning(disable: 4510)
40 : #pragma warning(disable: 4610)
41 : #endif
42 :
43 0 : class ScVbaFormatConditions: public ScVbaFormatConditions_BASE
44 : {
45 : css::table::CellAddress maCellAddress;
46 : css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries;
47 : css::uno::Reference< ov::excel::XStyles > mxStyles;
48 : css::uno::Reference< ov::excel::XRange > mxRangeParent;
49 : css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet;
50 : public:
51 : void notifyRange() throw ( css::script::BasicErrorException );
52 : virtual css::uno::Reference< ov::excel::XFormatCondition > Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2, const css::uno::Reference< ov::excel::XStyle >& _xCalcStyle ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
53 : rtl::OUString getA1Formula(const css::uno::Any& _aFormula) throw ( css::script::BasicErrorException );
54 : rtl::OUString getStyleName();
55 : void removeFormatCondition( const rtl::OUString& _sStyleName, sal_Bool _bRemoveStyle) throw ( css::script::BasicErrorException );
56 0 : css::uno::Reference< css::sheet::XSheetConditionalEntries > getSheetConditionalEntries() const { return mxSheetConditionalEntries; }
57 : // XFormatConditions
58 : virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
59 : virtual css::uno::Reference< ov::excel::XFormatCondition > SAL_CALL Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
60 : // XEnumerationAccess
61 : virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
62 : virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
63 : virtual css::uno::Any createCollectionObject(const css::uno::Any&);
64 : // XHelperInterface
65 : virtual rtl::OUString getServiceImplName();
66 : virtual css::uno::Sequence<rtl::OUString> getServiceNames();
67 : };
68 :
69 : #ifdef _MSC_VER
70 : #pragma warning(pop)
71 : #endif
72 :
73 : #endif //SC_VBA_AXES_HXX
74 :
75 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|