bump product version to 5.0.4.1
[LibreOffice.git] / reportdesign / source / core / inc / ReportControlModel.hxx
blobab4a60f32365d30806fb19c1536b7592b4eb464c
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 <comphelper/uno3.hxx>
31 #include <cppuhelper/interfacecontainer.h>
34 namespace reportdesign
36 bool operator==( const ::com::sun::star::awt::FontDescriptor& _lhs, const ::com::sun::star::awt::FontDescriptor& _rhs );
38 inline bool operator!=( const ::com::sun::star::awt::FontDescriptor& _lhs, const ::com::sun::star::awt::FontDescriptor& _rhs )
40 return !( _lhs == _rhs );
43 struct OFormatProperties
45 ::sal_Int16 nAlign;
46 ::com::sun::star::awt::FontDescriptor aFontDescriptor;
47 ::com::sun::star::awt::FontDescriptor aAsianFontDescriptor;
48 ::com::sun::star::awt::FontDescriptor aComplexFontDescriptor;
49 ::com::sun::star::lang::Locale aCharLocale;
50 ::com::sun::star::lang::Locale aCharLocaleAsian;
51 ::com::sun::star::lang::Locale aCharLocaleComplex;
52 ::sal_Int16 nFontEmphasisMark;
53 ::sal_Int16 nFontRelief;
54 ::sal_Int32 nTextColor;
55 ::sal_Int32 nTextLineColor;
56 ::sal_Int32 nCharUnderlineColor;
57 ::sal_Int32 nBackgroundColor;
58 OUString sCharCombinePrefix;
59 OUString sCharCombineSuffix;
60 OUString sHyperLinkURL;
61 OUString sHyperLinkTarget;
62 OUString sHyperLinkName;
63 OUString sVisitedCharStyleName;
64 OUString sUnvisitedCharStyleName;
65 com::sun::star::style::VerticalAlignment aVerticalAlignment;
66 ::sal_Int16 nCharEscapement;
67 ::sal_Int16 nCharCaseMap;
68 ::sal_Int16 nCharKerning;
69 ::sal_Int8 nCharEscapementHeight;
70 bool m_bBackgroundTransparent;
71 bool bCharFlash;
72 bool bCharAutoKerning;
73 bool bCharCombineIsOn;
74 bool bCharHidden;
75 bool bCharShadowed;
76 bool bCharContoured;
77 OFormatProperties();
79 class OReportControlModel
81 void checkIndex(sal_Int32 _nIndex);
82 OReportControlModel(OReportControlModel&) SAL_DELETED_FUNCTION;
83 void operator =(OReportControlModel&) SAL_DELETED_FUNCTION;
84 public:
85 ::cppu::OInterfaceContainerHelper aContainerListeners;
86 OReportComponentProperties aComponent;
87 OFormatProperties aFormatProperties;
88 ::com::sun::star::container::XContainer* m_pOwner;
89 ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::report::XFormatCondition> >
90 m_aFormatConditions;
91 osl::Mutex& m_rMutex;
92 OUString aDataField;
93 OUString aConditionalPrintExpression;
94 bool bPrintWhenGroupChange;
96 OReportControlModel(osl::Mutex& _rMutex
97 ,::com::sun::star::container::XContainer* _pOwner
98 ,::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext)
99 :aContainerListeners(_rMutex)
100 ,aComponent(_xContext)
101 ,m_pOwner(_pOwner)
102 ,m_rMutex(_rMutex)
103 ,bPrintWhenGroupChange(true)
106 // XContainer
107 void addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
108 void removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
110 // XElementAccess
111 bool hasElements( ) throw (::com::sun::star::uno::RuntimeException);
113 // XIndexReplace
114 void replaceByIndex( ::sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
116 // XIndexContainer
117 void insertByIndex( ::sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
118 void removeByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
120 // XIndexAccess
121 ::sal_Int32 getCount( ) throw (::com::sun::star::uno::RuntimeException);
122 ::com::sun::star::uno::Any getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
124 static bool isInterfaceForbidden(const ::com::sun::star::uno::Type& _rType);
127 #endif // INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_REPORTCONTROLMODEL_HXX
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */