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