bump product version to 6.3.0.0.beta1
[LibreOffice.git] / reportdesign / source / core / inc / ReportControlModel.hxx
blob53dcee115d44f645eea83c08ee78b3b43c374003
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 #ifndef INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_REPORTCONTROLMODEL_HXX
21 #define INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_REPORTCONTROLMODEL_HXX
23 #include "ReportComponent.hxx"
24 #include <com/sun/star/style/VerticalAlignment.hpp>
25 #include <com/sun/star/awt/FontDescriptor.hpp>
26 #include <com/sun/star/report/XFormatCondition.hpp>
27 #include <com/sun/star/container/XContainer.hpp>
28 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
29 #include <com/sun/star/lang/Locale.hpp>
30 #include <com/sun/star/style/ParagraphAdjust.hpp>
31 #include <comphelper/interfacecontainer2.hxx>
34 namespace reportdesign
36 struct OFormatProperties
38 css::style::ParagraphAdjust nAlign;
39 css::awt::FontDescriptor aFontDescriptor;
40 css::awt::FontDescriptor aAsianFontDescriptor;
41 css::awt::FontDescriptor aComplexFontDescriptor;
42 css::lang::Locale aCharLocale;
43 css::lang::Locale aCharLocaleAsian;
44 css::lang::Locale aCharLocaleComplex;
45 ::sal_Int16 nFontEmphasisMark;
46 ::sal_Int16 nFontRelief;
47 ::sal_Int32 nTextColor;
48 ::sal_Int32 nTextLineColor;
49 ::sal_Int32 nBackgroundColor;
50 OUString sCharCombinePrefix;
51 OUString sCharCombineSuffix;
52 OUString sHyperLinkURL;
53 OUString sHyperLinkTarget;
54 OUString sHyperLinkName;
55 OUString sVisitedCharStyleName;
56 OUString sUnvisitedCharStyleName;
57 css::style::VerticalAlignment aVerticalAlignment;
58 ::sal_Int16 nCharEscapement;
59 ::sal_Int16 nCharCaseMap;
60 ::sal_Int16 nCharKerning;
61 ::sal_Int8 nCharEscapementHeight;
62 bool m_bBackgroundTransparent;
63 bool bCharFlash;
64 bool bCharAutoKerning;
65 bool bCharCombineIsOn;
66 bool bCharHidden;
67 bool bCharShadowed;
68 bool bCharContoured;
69 OFormatProperties();
71 class OReportControlModel
73 void checkIndex(sal_Int32 _nIndex);
74 OReportControlModel(OReportControlModel const &) = delete;
75 void operator =(OReportControlModel const &) = delete;
76 public:
77 ::comphelper::OInterfaceContainerHelper2 aContainerListeners;
78 OReportComponentProperties aComponent;
79 OFormatProperties aFormatProperties;
80 css::container::XContainer* const m_pOwner;
81 ::std::vector< css::uno::Reference< css::report::XFormatCondition> >
82 m_aFormatConditions;
83 osl::Mutex& m_rMutex;
84 OUString aDataField;
85 OUString aConditionalPrintExpression;
86 bool bPrintWhenGroupChange;
88 OReportControlModel(osl::Mutex& _rMutex
89 ,css::container::XContainer* _pOwner
90 ,css::uno::Reference< css::uno::XComponentContext > const & _xContext)
91 :aContainerListeners(_rMutex)
92 ,aComponent(_xContext)
93 ,m_pOwner(_pOwner)
94 ,m_rMutex(_rMutex)
95 ,bPrintWhenGroupChange(true)
98 // XContainer
99 /// @throws css::uno::RuntimeException
100 void addContainerListener( const css::uno::Reference< css::container::XContainerListener >& xListener );
101 /// @throws css::uno::RuntimeException
102 void removeContainerListener( const css::uno::Reference< css::container::XContainerListener >& xListener );
104 // XElementAccess
105 /// @throws css::uno::RuntimeException
106 bool hasElements( );
108 // XIndexReplace
109 /// @throws css::lang::IllegalArgumentException
110 /// @throws css::lang::IndexOutOfBoundsException
111 /// @throws css::lang::WrappedTargetException
112 /// @throws css::uno::RuntimeException
113 void replaceByIndex( ::sal_Int32 Index, const css::uno::Any& Element );
115 // XIndexContainer
116 /// @throws css::lang::IllegalArgumentException
117 /// @throws css::lang::IndexOutOfBoundsException
118 /// @throws css::lang::WrappedTargetException
119 /// @throws css::uno::RuntimeException
120 void insertByIndex( ::sal_Int32 Index, const css::uno::Any& Element );
121 /// @throws css::lang::IndexOutOfBoundsException
122 /// @throws css::lang::WrappedTargetException
123 /// @throws css::uno::RuntimeException
124 void removeByIndex( ::sal_Int32 Index );
126 // XIndexAccess
127 /// @throws css::uno::RuntimeException
128 ::sal_Int32 getCount( );
129 /// @throws css::lang::IndexOutOfBoundsException
130 /// @throws css::lang::WrappedTargetException
131 /// @throws css::uno::RuntimeException
132 css::uno::Any getByIndex( ::sal_Int32 Index );
134 static bool isInterfaceForbidden(const css::uno::Type& _rType);
137 #endif // INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_REPORTCONTROLMODEL_HXX
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */