LibreOffice Module chart2 (master) 1
WrappedAddInProperty.cxx
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
22#include <com/sun/star/util/XRefreshable.hpp>
23
24using ::com::sun::star::uno::Reference;
25using ::com::sun::star::uno::Any;
26using namespace ::com::sun::star;
27
28namespace chart::wrapper
29{
30
32 : ::chart::WrappedProperty( "AddIn", OUString() )
33 , m_rChartDocumentWrapper( rChartDocumentWrapper )
34{
35}
37{
38}
39
40void WrappedAddInProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
41{
43 if( ! (rOuterValue >>= xAddIn) )
44 throw lang::IllegalArgumentException( "AddIn properties require type XRefreshable", nullptr, 0 );
45
47}
48
50{
52}
53
55 : ::chart::WrappedProperty( "BaseDiagram" , OUString() )
56 , m_rChartDocumentWrapper( rChartDocumentWrapper )
57{
58}
60{
61}
62
63void WrappedBaseDiagramProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
64{
65 OUString aBaseDiagram;
66 if( ! (rOuterValue >>= aBaseDiagram) )
67 throw lang::IllegalArgumentException( "BaseDiagram properties require type OUString", nullptr, 0 );
68
70}
71
73{
75}
76
78 : ::chart::WrappedProperty( "AdditionalShapes" , OUString() )
79 , m_rChartDocumentWrapper( rChartDocumentWrapper )
80{
81}
83{
84}
85
86void WrappedAdditionalShapesProperty::setPropertyValue( const Any& /*rOuterValue*/, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
87{
88 throw lang::IllegalArgumentException( "AdditionalShapes is a read only property", nullptr, 0 );
89}
90
92{
94}
95
97 : ::chart::WrappedProperty( "RefreshAddInAllowed" , OUString() )
98 , m_rChartDocumentWrapper( rChartDocumentWrapper )
99{
100}
102{
103}
104
105void WrappedRefreshAddInAllowedProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& /* xInnerPropertySet */ ) const
106{
107 bool bUpdateAddIn = true;
108 if( ! (rOuterValue >>= bUpdateAddIn) )
109 throw lang::IllegalArgumentException( "The property RefreshAddInAllowed requires type boolean", nullptr, 0 );
110
112}
113
115{
117}
118
119} //namespace chart::wrapper
120
121/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void setAddIn(const css::uno::Reference< css::util::XRefreshable > &xAddIn)
void setBaseDiagram(const OUString &rBaseDiagram)
const css::uno::Reference< css::util::XRefreshable > & getAddIn() const
css::uno::Reference< css::drawing::XShapes > getAdditionalShapes() const
virtual css::uno::Any getPropertyValue(const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
WrappedAddInProperty(ChartDocumentWrapper &rChartDocumentWrapper)
virtual void setPropertyValue(const css::uno::Any &rOuterValue, const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
virtual css::uno::Any getPropertyValue(const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
WrappedAdditionalShapesProperty(ChartDocumentWrapper &rChartDocumentWrapper)
virtual void setPropertyValue(const css::uno::Any &rOuterValue, const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
virtual void setPropertyValue(const css::uno::Any &rOuterValue, const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
virtual css::uno::Any getPropertyValue(const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
WrappedBaseDiagramProperty(ChartDocumentWrapper &rChartDocumentWrapper)
virtual void setPropertyValue(const css::uno::Any &rOuterValue, const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
virtual css::uno::Any getPropertyValue(const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
WrappedRefreshAddInAllowedProperty(ChartDocumentWrapper &rChartDocumentWrapper)