1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: vbaformatcondition.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_VBA_FORMATCONDITION_HXX
31 #define SC_VBA_FORMATCONDITION_HXX
32 #include <ooo/vba/excel/XFormatCondition.hpp>
33 #include <ooo/vba/excel/XFormatConditions.hpp>
34 #include <ooo/vba/excel/XStyle.hpp>
35 #include <com/sun/star/frame/XModel.hpp>
36 #include <com/sun/star/sheet/XSheetConditionalEntries.hpp>
37 #include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
38 #include <com/sun/star/sheet/XSheetCondition.hpp>
39 #include <com/sun/star/beans/XPropertySet.hpp>
40 #include "vbacondition.hxx"
42 typedef ScVbaCondition
< ov::excel::XFormatCondition
> ScVbaFormatCondition_BASE
;
43 class ScVbaFormatCondition
: public ScVbaFormatCondition_BASE
46 rtl::OUString msStyleName
;
47 css::uno::Reference
< css::sheet::XSheetConditionalEntry
> mxSheetConditionalEntry
;
48 css::uno::Reference
< css::sheet::XSheetConditionalEntries
> mxSheetConditionalEntries
;
49 css::uno::Reference
< ov::excel::XFormatConditions
> moFormatConditions
;
50 css::uno::Reference
< ov::excel::XStyle
> mxStyle
;
51 css::uno::Reference
< css::beans::XPropertySet
> mxParentRangePropertySet
;
53 ScVbaFormatCondition( const css::uno::Reference
< ov::XHelperInterface
>& xParent
, const css::uno::Reference
< css::uno::XComponentContext
> & xContext
, const css::uno::Reference
< css::sheet::XSheetConditionalEntry
>& _xSheetConditionalEntry
, const css::uno::Reference
< ov::excel::XStyle
>&, const css::uno::Reference
< ov::excel::XFormatConditions
>& _xFormatConditions
, const css::uno::Reference
< css::beans::XPropertySet
>& _xPropertySet
) throw ( css::uno::RuntimeException
);
55 void notifyRange() throw ( css::script::BasicErrorException
);
56 static css::sheet::ConditionOperator
retrieveAPIType(sal_Int32 _nVBAType
, const css::uno::Reference
< css::sheet::XSheetCondition
>& _xSheetCondition
) throw( css::script::BasicErrorException
);
59 virtual void SAL_CALL
Delete( ) throw (css::script::BasicErrorException
, css::uno::RuntimeException
);
60 virtual void SAL_CALL
Modify( ::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 ::sal_Int32 SAL_CALL
Type( ) throw (css::script::BasicErrorException
, css::uno::RuntimeException
);
62 virtual ::sal_Int32
Operator( sal_Bool
) throw (css::script::BasicErrorException
);
63 virtual ::sal_Int32 SAL_CALL
Operator( ) throw (css::script::BasicErrorException
, css::uno::RuntimeException
);
64 virtual void setFormula1( const css::uno::Any
& _aFormula1
) throw ( css::script::BasicErrorException
);
65 virtual void setFormula2( const css::uno::Any
& _aFormula2
) throw ( css::script::BasicErrorException
);
66 virtual css::uno::Reference
< ::ooo::vba::excel::XInterior
> SAL_CALL
Interior( ) throw (css::script::BasicErrorException
, css::uno::RuntimeException
);
67 virtual css::uno::Any SAL_CALL
Borders( const css::uno::Any
& Index
) throw (css::script::BasicErrorException
, css::uno::RuntimeException
);
68 virtual css::uno::Reference
< ::ooo::vba::excel::XFont
> SAL_CALL
Font( ) throw (css::script::BasicErrorException
, css::uno::RuntimeException
);
70 virtual rtl::OUString
& getServiceImplName();
71 virtual css::uno::Sequence
<rtl::OUString
> getServiceNames();