LibreOffice Module extensions (master) 1
submissionhandler.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <memory>
23#include "propertyhandler.hxx"
24#include "eformshelper.hxx"
25
27#include <rtl/ref.hxx>
28
29namespace comphelper
30{
31 class OPropertyChangeMultiplexer;
32}
33
34
35namespace pcr
36{
37
38
39 //= SubmissionHelper
40
42 {
43 public:
45 osl::Mutex& _rMutex,
46 const css::uno::Reference< css::beans::XPropertySet >& _rxIntrospectee,
47 const css::uno::Reference< css::frame::XModel >& _rxContextDocument
48 );
49
55 static bool canTriggerSubmissions(
56 const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel,
57 const css::uno::Reference< css::frame::XModel >& _rxContextDocument
58 );
59 };
60
61
62 //= SubmissionPropertyHandler
63
67 {
68 private:
69 std::unique_ptr< SubmissionHelper > m_pHelper;
71
72 public:
74 const css::uno::Reference< css::uno::XComponentContext >& _rxContext
75 );
76
77 virtual ~SubmissionPropertyHandler() override;
78 protected:
79 // XServiceInfo
80 virtual OUString SAL_CALL getImplementationName() override;
81 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override;
82
83 // XPropertyHandler overriables
84 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& _rPropertyName ) override;
85 virtual void SAL_CALL setPropertyValue( const OUString& _rPropertyName, const css::uno::Any& _rValue ) override;
86 virtual css::uno::Sequence< OUString >
87 SAL_CALL getActuatingProperties( ) override;
88 virtual css::uno::Sequence< OUString >
89 SAL_CALL getSupersededProperties( ) override;
90 virtual css::inspection::LineDescriptor
91 SAL_CALL describePropertyLine( const OUString& _rPropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory ) override;
92 virtual void SAL_CALL actuatingPropertyChanged( const OUString& _rActuatingPropertyName, const css::uno::Any& _rNewValue, const css::uno::Any& _rOldValue, const css::uno::Reference< css::inspection::XObjectInspectorUI >& _rxInspectorUI, sal_Bool ) override;
93 virtual css::uno::Any SAL_CALL convertToPropertyValue( const OUString& _rPropertyName, const css::uno::Any& _rControlValue ) override;
94 virtual css::uno::Any SAL_CALL convertToControlValue( const OUString& _rPropertyName, const css::uno::Any& _rPropertyValue, const css::uno::Type& _rControlValueType ) override;
95
96 // PropertyHandler overridables
97 virtual css::uno::Sequence< css::beans::Property >
98 doDescribeSupportedProperties() const override;
99 virtual void onNewComponent() override;
100
101 private:
102 // OPropertyChangeListener
103 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& _rEvent) override;
104 };
105
106
107} // namespace pcr
108
109
110/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
PropertyHandler implementation which additionally supports XServiceInfo.
SubmissionHelper(osl::Mutex &_rMutex, const css::uno::Reference< css::beans::XPropertySet > &_rxIntrospectee, const css::uno::Reference< css::frame::XModel > &_rxContextDocument)
static bool canTriggerSubmissions(const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const css::uno::Reference< css::frame::XModel > &_rxContextDocument)
determines whether the given control model is able to trigger submissions
a property handler for any virtual string properties
virtual css::uno::Sequence< css::beans::Property > doDescribeSupportedProperties() const override
virtual css::uno::Any SAL_CALL convertToControlValue(const OUString &_rPropertyName, const css::uno::Any &_rPropertyValue, const css::uno::Type &_rControlValueType) override
virtual css::uno::Any SAL_CALL convertToPropertyValue(const OUString &_rPropertyName, const css::uno::Any &_rControlValue) override
SubmissionPropertyHandler(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > m_xPropChangeMultiplexer
virtual void SAL_CALL setPropertyValue(const OUString &_rPropertyName, const css::uno::Any &_rValue) override
std::unique_ptr< SubmissionHelper > m_pHelper
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &_rPropertyName) override
virtual void SAL_CALL actuatingPropertyChanged(const OUString &_rActuatingPropertyName, const css::uno::Any &_rNewValue, const css::uno::Any &_rOldValue, const css::uno::Reference< css::inspection::XObjectInspectorUI > &_rxInspectorUI, sal_Bool) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual ~SubmissionPropertyHandler() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupersededProperties() override
virtual css::uno::Sequence< OUString > SAL_CALL getActuatingProperties() override
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &_rEvent) override
virtual void onNewComponent() override
called when XPropertyHandler::inspect has been called, and we thus have a new component to inspect
virtual css::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString &_rPropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory) override
a property handler for any virtual string properties
Definition: browserline.cxx:39
unsigned char sal_Bool