tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / vba / vbaformatconditions.hxx
blob8fe7cfabb83f7f5f8bb90ee1875d6cc26d1b2544
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #pragma once
22 #include <ooo/vba/excel/XFormatConditions.hpp>
23 #include <vbahelper/vbacollectionimpl.hxx>
24 #include <rtl/ref.hxx>
26 namespace com::sun::star::beans { class XPropertySet; }
27 namespace com::sun::star::sheet { class XSheetConditionalEntries; }
28 namespace ooo::vba::excel { class XRange; }
29 namespace ooo::vba::excel { class XStyle; }
30 namespace ooo::vba::excel { class XStyles; }
31 class ScVbaStyles;
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.
36 class ScVbaFormatConditions: public CollTestImplHelper< ov::excel::XFormatConditions >
38 css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries;
39 rtl::Reference< ScVbaStyles > mxStyles;
40 css::uno::Reference< ov::excel::XRange > mxRangeParent;
41 css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet;
42 public:
43 /// @throws css::script::BasicErrorException
44 void notifyRange();
45 /// @throws css::script::BasicErrorException
46 /// @throws css::uno::RuntimeException
47 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 );
48 /// @throws css::script::BasicErrorException
49 static OUString getA1Formula(const css::uno::Any& _aFormula);
50 OUString getStyleName();
51 /// @throws css::script::BasicErrorException
52 void removeFormatCondition( const OUString& _sStyleName, bool _bRemoveStyle);
53 const css::uno::Reference< css::sheet::XSheetConditionalEntries >& getSheetConditionalEntries() const { return mxSheetConditionalEntries; }
54 // XFormatConditions
55 virtual void SAL_CALL Delete( ) override;
56 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 ) override;
57 // XEnumerationAccess
58 virtual css::uno::Type SAL_CALL getElementType() override;
59 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
60 virtual css::uno::Any createCollectionObject(const css::uno::Any&) override;
61 // XHelperInterface
62 virtual OUString getServiceImplName() override;
63 virtual css::uno::Sequence<OUString> getServiceNames() override;
65 ScVbaFormatConditions() = delete;
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */