LibreOffice Module reportdesign (master) 1
FixedLine.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#ifndef INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FIXEDLINE_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FIXEDLINE_HXX
21
23#include <com/sun/star/report/XFixedLine.hpp>
25#include <comphelper/uno3.hxx>
28#include <com/sun/star/lang/XServiceInfo.hpp>
30
31
32namespace reportdesign
33{
34 typedef ::cppu::PropertySetMixin< css::report::XFixedLine > FixedLinePropertySet;
35 typedef ::cppu::WeakComponentImplHelper< css::report::XFixedLine
36 ,css::lang::XServiceInfo > FixedLineBase;
37
42 class OFixedLine final : public cppu::BaseMutex,
43 public FixedLineBase,
45 {
46 friend class OShapeHelper;
48 css::drawing::LineStyle m_LineStyle;
49 css::drawing::LineDash m_LineDash;
50 sal_Int32 m_nOrientation;
51 ::sal_Int32 m_LineColor;
52 ::sal_Int16 m_LineTransparence;
53 ::sal_Int32 m_LineWidth;
54
55 private:
56 OFixedLine(const OFixedLine&) = delete;
57 OFixedLine& operator=(const OFixedLine&) = delete;
58
59 template <typename T> void set( const OUString& _sProperty
60 ,const T& Value
61 ,T& _member)
62 {
63 BoundListeners l;
64 {
65 ::osl::MutexGuard aGuard(m_aMutex);
66 prepareSet(_sProperty, css::uno::Any(_member), css::uno::Any(Value), &l);
67 _member = Value;
68 }
69 l.notify();
70 }
71 virtual ~OFixedLine() override;
72 public:
73 explicit OFixedLine(css::uno::Reference< css::uno::XComponentContext > const & _xContext);
74 explicit OFixedLine(css::uno::Reference< css::uno::XComponentContext > const & _xContext
75 ,const css::uno::Reference< css::lang::XMultiServiceFactory > & _xFactory
76 ,css::uno::Reference< css::drawing::XShape >& _xShape
77 ,sal_Int32 _nOrientation);
78
80 // css::lang::XServiceInfo
81 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
82 virtual OUString SAL_CALL getImplementationName( ) override;
83 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
84
86 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
88 static OUString getImplementationName_Static();
89 static css::uno::Reference< css::uno::XInterface >
90 create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
91 // css::beans::XPropertySet
92 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
93 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
94 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
95 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
96 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
97 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
98 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
99
100 // XReportComponent
102
103 // XShape
105
106 // XShapeDescriptor
107 virtual OUString SAL_CALL getShapeType( ) override;
108
109 // XReportControlModel
111
112 // XFixedLine
113 virtual ::sal_Int32 SAL_CALL getOrientation() override;
114 virtual void SAL_CALL setOrientation( ::sal_Int32 _orientation ) override;
115 virtual css::drawing::LineStyle SAL_CALL getLineStyle() override;
116 virtual void SAL_CALL setLineStyle( css::drawing::LineStyle _linestyle ) override;
117 virtual css::drawing::LineDash SAL_CALL getLineDash() override;
118 virtual void SAL_CALL setLineDash( const css::drawing::LineDash& _linedash ) override;
119 virtual ::sal_Int32 SAL_CALL getLineColor() override;
120 virtual void SAL_CALL setLineColor( ::sal_Int32 _linecolor ) override;
121 virtual ::sal_Int16 SAL_CALL getLineTransparence() override;
122 virtual void SAL_CALL setLineTransparence( ::sal_Int16 _linetransparence ) override;
123 virtual ::sal_Int32 SAL_CALL getLineWidth() override;
124 virtual void SAL_CALL setLineWidth( ::sal_Int32 _linewidth ) override;
125
126 // css::report::XReportControlFormat
128
129 // XCloneable
130 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
131
132 // XComponent
133 virtual void SAL_CALL dispose() override;
134 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override
135 {
136 cppu::WeakComponentImplHelperBase::addEventListener(aListener);
137 }
138 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override
139 {
140 cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
141 }
142
143 // XChild
144 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
145 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
146
147 // XContainer
148 virtual void SAL_CALL addContainerListener( const css::uno::Reference< css::container::XContainerListener >& xListener ) override;
149 virtual void SAL_CALL removeContainerListener( const css::uno::Reference< css::container::XContainerListener >& xListener ) override;
150
151 // XElementAccess
152 virtual css::uno::Type SAL_CALL getElementType( ) override;
153 virtual sal_Bool SAL_CALL hasElements( ) override;
154
155 // XIndexReplace
156 virtual void SAL_CALL replaceByIndex( ::sal_Int32 Index, const css::uno::Any& Element ) override;
157
158 // XIndexContainer
159 virtual void SAL_CALL insertByIndex( ::sal_Int32 Index, const css::uno::Any& Element ) override;
160 virtual void SAL_CALL removeByIndex( ::sal_Int32 Index ) override;
161
162 // XIndexAccess
163 virtual ::sal_Int32 SAL_CALL getCount( ) override;
164 virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override;
165 };
166}
167#endif // INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FIXEDLINE_HXX
168
169/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
#define REPORTCONTROLMODEL_HEADER()
#define SHAPE_HEADER()
#define REPORTCONTROLFORMAT_HEADER()
#define REPORTCOMPONENT_HEADER()
mutable::osl::Mutex m_aMutex
void prepareSet(rtl::OUString const &propertyName, css::uno::Any const &oldValue, css::uno::Any const &newValue, BoundListeners *boundListeners)
implementation of a
Definition: FixedLine.hxx:45
virtual void SAL_CALL setLineColor(::sal_Int32 _linecolor) override
Definition: FixedLine.cxx:397
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: FixedLine.cxx:261
virtual void SAL_CALL removeByIndex(::sal_Int32 Index) override
Definition: FixedLine.cxx:469
static OUString getImplementationName_Static()
Definition: FixedLine.cxx:203
virtual void SAL_CALL setLineStyle(css::drawing::LineStyle _linestyle) override
Definition: FixedLine.cxx:375
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override
Definition: FixedLine.cxx:426
OFixedLine(css::uno::Reference< css::uno::XComponentContext > const &_xContext, const css::uno::Reference< css::lang::XMultiServiceFactory > &_xFactory, css::uno::Reference< css::drawing::XShape > &_xShape, sal_Int32 _nOrientation)
void set(const OUString &_sProperty, const T &Value, T &_member)
Definition: FixedLine.hxx:59
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: FixedLine.cxx:271
virtual void SAL_CALL setOrientation(::sal_Int32 _orientation) override
Definition: FixedLine.cxx:364
OFixedLine(const OFixedLine &)=delete
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: FixedLine.cxx:291
css::drawing::LineStyle m_LineStyle
Definition: FixedLine.hxx:48
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &Parent) override
Definition: FixedLine.cxx:431
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: FixedLine.cxx:232
virtual ::sal_Int32 SAL_CALL getLineColor() override
Definition: FixedLine.cxx:391
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: FixedLine.cxx:227
virtual ::sal_Int32 SAL_CALL getLineWidth() override
Definition: FixedLine.cxx:413
virtual ::sal_Int16 SAL_CALL getLineTransparence() override
Definition: FixedLine.cxx:402
virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
Definition: FixedLine.cxx:442
virtual OUString SAL_CALL getImplementationName() override
Definition: FixedLine.cxx:209
OFixedLine & operator=(const OFixedLine &)=delete
virtual void SAL_CALL dispose() override
Definition: FixedLine.cxx:197
static css::uno::Sequence< OUString > getSupportedServiceNames_Static()
Definition: FixedLine.cxx:214
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: FixedLine.hxx:138
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: FixedLine.hxx:134
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: FixedLine.cxx:281
OReportControlModel m_aProps
Definition: FixedLine.hxx:47
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: FixedLine.cxx:276
static css::uno::Reference< css::uno::XInterface > create(css::uno::Reference< css::uno::XComponentContext > const &xContext)
Definition: FixedLine.cxx:221
virtual void SAL_CALL setLineTransparence(::sal_Int16 _linetransparence) override
Definition: FixedLine.cxx:408
virtual OUString SAL_CALL getShapeType() override
Definition: FixedLine.cxx:517
virtual css::uno::Any SAL_CALL getByIndex(::sal_Int32 Index) override
Definition: FixedLine.cxx:486
OFixedLine(css::uno::Reference< css::uno::XComponentContext > const &_xContext)
virtual css::uno::Type SAL_CALL getElementType() override
Definition: FixedLine.cxx:453
virtual void SAL_CALL insertByIndex(::sal_Int32 Index, const css::uno::Any &Element) override
Definition: FixedLine.cxx:464
virtual ::sal_Int32 SAL_CALL getOrientation() override
Definition: FixedLine.cxx:358
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: FixedLine.cxx:266
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: FixedLine.cxx:286
virtual ~OFixedLine() override
Definition: FixedLine.cxx:180
::sal_Int16 m_LineTransparence
Definition: FixedLine.hxx:52
virtual void SAL_CALL setLineDash(const css::drawing::LineDash &_linedash) override
Definition: FixedLine.cxx:386
virtual void SAL_CALL replaceByIndex(::sal_Int32 Index, const css::uno::Any &Element) override
Definition: FixedLine.cxx:475
virtual css::drawing::LineDash SAL_CALL getLineDash() override
Definition: FixedLine.cxx:380
virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
Definition: FixedLine.cxx:447
virtual sal_Bool SAL_CALL hasElements() override
Definition: FixedLine.cxx:458
css::drawing::LineDash m_LineDash
Definition: FixedLine.hxx:49
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
Definition: FixedLine.cxx:348
virtual ::sal_Int32 SAL_CALL getCount() override
Definition: FixedLine.cxx:481
virtual void SAL_CALL setLineWidth(::sal_Int32 _linewidth) override
Definition: FixedLine.cxx:419
virtual css::drawing::LineStyle SAL_CALL getLineStyle() override
Definition: FixedLine.cxx:369
Value
::cppu::PropertySetMixin< css::report::XFixedLine > FixedLinePropertySet
Definition: FixedLine.hxx:34
::cppu::WeakComponentImplHelper< css::report::XFixedLine,css::lang::XServiceInfo > FixedLineBase
Definition: FixedLine.hxx:36
unsigned char sal_Bool
#define DECLARE_XINTERFACE()
LineStyle