1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
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>
29 typedef CollTestImplHelper
< ov::excel::XFormatConditions
> ScVbaFormatConditions_BASE
;
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
39 #pragma warning(disable: 4510)
40 #pragma warning(disable: 4610)
43 class ScVbaFormatConditions
: public ScVbaFormatConditions_BASE
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
;
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 OUString
getA1Formula(const css::uno::Any
& _aFormula
) throw ( css::script::BasicErrorException
);
54 OUString
getStyleName();
55 void removeFormatCondition( const OUString
& _sStyleName
, sal_Bool _bRemoveStyle
) throw ( css::script::BasicErrorException
);
56 css::uno::Reference
< css::sheet::XSheetConditionalEntries
> getSheetConditionalEntries() const { return mxSheetConditionalEntries
; }
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
);
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
&);
65 virtual OUString
getServiceImplName();
66 virtual css::uno::Sequence
<OUString
> getServiceNames();
73 #endif //SC_VBA_AXES_HXX
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */