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