LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / forms / source / component / File.hxx
blob194bbdfa327f3103aa53197f1c69ddc8e68505a1
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 <FormComponent.hxx>
25 namespace frm
28 class OFileControlModel
29 :public OControlModel
30 ,public css::form::XReset
32 ::comphelper::OInterfaceContainerHelper2 m_aResetListeners;
33 OUString m_sDefaultValue;
35 protected:
36 virtual css::uno::Sequence< css::uno::Type> _getTypes() override;
38 public:
39 OFileControlModel(
40 const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
42 OFileControlModel(
43 const OFileControlModel* _pOriginal,
44 const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
46 virtual ~OFileControlModel() override;
48 DECLARE_UNO3_AGG_DEFAULTS(OFileControlModel, OControlModel)
49 virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type& _rType) override;
51 // XServiceInfo
52 OUString SAL_CALL getImplementationName() override
53 { return "com.sun.star.form.OFileControlModel"; }
55 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
57 // OComponentHelper
58 virtual void SAL_CALL disposing() override;
60 // XPropertySet and friends
61 virtual void SAL_CALL getFastPropertyValue(css::uno::Any& rValue, sal_Int32 nHandle) const override;
62 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any& rValue) override;
64 virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any& rConvertedValue, css::uno::Any& rOldValue, sal_Int32 nHandle, const css::uno::Any& rValue ) override;
66 virtual css::uno::Any getPropertyDefaultByHandle( sal_Int32 _nHandle ) const override;
68 // XPersistObject
69 virtual OUString SAL_CALL getServiceName() override;
70 virtual void SAL_CALL write(const css::uno::Reference< css::io::XObjectOutputStream>& _rxOutStream) override;
71 virtual void SAL_CALL read(const css::uno::Reference< css::io::XObjectInputStream>& _rxInStream) override;
73 // XReset
74 virtual void SAL_CALL reset() override;
75 virtual void SAL_CALL addResetListener(const css::uno::Reference< css::form::XResetListener>& _rxListener) override;
76 virtual void SAL_CALL removeResetListener(const css::uno::Reference< css::form::XResetListener>& _rxListener) override;
78 // OControlModel's property handling
79 virtual void describeFixedProperties(
80 css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps
81 ) const override;
83 // prevent method hiding
84 using OControlModel::disposing;
85 using OControlModel::getFastPropertyValue;
87 protected:
88 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
92 } // namespace frm
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */