xref: /AOO42X/main/reportdesign/source/core/api/Group.cxx (revision b1c5455db1639c48e26c568e4fa7ee78ca5d60ee)
19e0e4191SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
39e0e4191SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
49e0e4191SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
59e0e4191SAndrew Rist  * distributed with this work for additional information
69e0e4191SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
79e0e4191SAndrew Rist  * to you under the Apache License, Version 2.0 (the
89e0e4191SAndrew Rist  * "License"); you may not use this file except in compliance
99e0e4191SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
119e0e4191SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
139e0e4191SAndrew Rist  * Unless required by applicable law or agreed to in writing,
149e0e4191SAndrew Rist  * software distributed under the License is distributed on an
159e0e4191SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
169e0e4191SAndrew Rist  * KIND, either express or implied.  See the License for the
179e0e4191SAndrew Rist  * specific language governing permissions and limitations
189e0e4191SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
209e0e4191SAndrew Rist  *************************************************************/
219e0e4191SAndrew Rist 
229e0e4191SAndrew Rist 
23*b63233d8Sdamjan #include "precompiled_reportdesign.hxx"
24cdf0e10cSrcweir #include "Group.hxx"
25cdf0e10cSrcweir #include "Section.hxx"
26cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
27cdf0e10cSrcweir #include <com/sun/star/report/GroupOn.hpp>
28cdf0e10cSrcweir #include <com/sun/star/report/KeepTogether.hpp>
29cdf0e10cSrcweir #ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
30cdf0e10cSrcweir #include "corestrings.hrc"
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
33cdf0e10cSrcweir #include "core_resource.hrc"
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir #include "core_resource.hxx"
36cdf0e10cSrcweir #include "Tools.hxx"
37cdf0e10cSrcweir #include <tools/debug.hxx>
38cdf0e10cSrcweir #include <comphelper/property.hxx>
39cdf0e10cSrcweir #include "Functions.hxx"
40cdf0e10cSrcweir 
41cdf0e10cSrcweir // =============================================================================
42cdf0e10cSrcweir namespace reportdesign
43cdf0e10cSrcweir {
44cdf0e10cSrcweir // =============================================================================
45cdf0e10cSrcweir     using namespace com::sun::star;
46cdf0e10cSrcweir     using namespace comphelper;
DBG_NAME(rpt_OGroup)47cdf0e10cSrcweir DBG_NAME( rpt_OGroup )
48cdf0e10cSrcweir // -----------------------------------------------------------------------------
49cdf0e10cSrcweir OGroup::OGroup(const uno::Reference< report::XGroups >& _xParent
50cdf0e10cSrcweir                ,const uno::Reference< uno::XComponentContext >& _xContext)
51cdf0e10cSrcweir :GroupBase(m_aMutex)
52cdf0e10cSrcweir ,GroupPropertySet(_xContext,static_cast< GroupPropertySet::Implements >(IMPLEMENTS_PROPERTY_SET),uno::Sequence< ::rtl::OUString >())
53cdf0e10cSrcweir ,m_xContext(_xContext)
54cdf0e10cSrcweir ,m_xParent(_xParent)
55cdf0e10cSrcweir {
56cdf0e10cSrcweir     DBG_CTOR( rpt_OGroup,NULL);
57cdf0e10cSrcweir     osl_incrementInterlockedCount(&m_refCount);
58cdf0e10cSrcweir     {
59cdf0e10cSrcweir         m_xFunctions = new OFunctions(this,m_xContext);
60cdf0e10cSrcweir     }
61cdf0e10cSrcweir     osl_decrementInterlockedCount( &m_refCount );
62cdf0e10cSrcweir }
63cdf0e10cSrcweir //--------------------------------------------------------------------------
64cdf0e10cSrcweir // TODO: VirtualFunctionFinder: This is virtual function!
65cdf0e10cSrcweir //
~OGroup()66cdf0e10cSrcweir OGroup::~OGroup()
67cdf0e10cSrcweir {
68cdf0e10cSrcweir     DBG_DTOR( rpt_OGroup,NULL);
69cdf0e10cSrcweir }
70cdf0e10cSrcweir //--------------------------------------------------------------------------
copyGroup(const uno::Reference<report::XGroup> & _xSource)71cdf0e10cSrcweir void OGroup::copyGroup(const uno::Reference< report::XGroup >& _xSource)
72cdf0e10cSrcweir {
73cdf0e10cSrcweir     ::comphelper::copyProperties(_xSource.get(),static_cast<GroupPropertySet*>(this));
74cdf0e10cSrcweir 
75cdf0e10cSrcweir     if ( _xSource->getHeaderOn() )
76cdf0e10cSrcweir     {
77cdf0e10cSrcweir         setHeaderOn(sal_True);
78cdf0e10cSrcweir         OSection::lcl_copySection(_xSource->getHeader(),m_xHeader);
79cdf0e10cSrcweir     } // if ( _xSource->getHeaderOn() )
80cdf0e10cSrcweir 
81cdf0e10cSrcweir     if ( _xSource->getFooterOn() )
82cdf0e10cSrcweir     {
83cdf0e10cSrcweir         setFooterOn(sal_True);
84cdf0e10cSrcweir         OSection::lcl_copySection(_xSource->getFooter(),m_xFooter);
85cdf0e10cSrcweir     } // if ( _xSource->getFooterOn() )
86cdf0e10cSrcweir }
87cdf0e10cSrcweir //--------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2(OGroup,GroupBase,GroupPropertySet)88cdf0e10cSrcweir IMPLEMENT_FORWARD_XINTERFACE2(OGroup,GroupBase,GroupPropertySet)
89cdf0e10cSrcweir //--------------------------------------------------------------------------
90cdf0e10cSrcweir ::rtl::OUString SAL_CALL OGroup::getImplementationName(  ) throw(uno::RuntimeException)
91cdf0e10cSrcweir {
92cdf0e10cSrcweir     return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.Group"));
93cdf0e10cSrcweir }
94cdf0e10cSrcweir //------------------------------------------------------------------------------
getSupportedServiceNames_Static(void)95cdf0e10cSrcweir uno::Sequence< ::rtl::OUString> OGroup::getSupportedServiceNames_Static(void) throw( uno::RuntimeException )
96cdf0e10cSrcweir {
97cdf0e10cSrcweir     uno::Sequence< ::rtl::OUString> aSupported(1);
98cdf0e10cSrcweir     aSupported.getArray()[0] = SERVICE_GROUP;
99cdf0e10cSrcweir     return aSupported;
100cdf0e10cSrcweir }
101cdf0e10cSrcweir //-------------------------------------------------------------------------
getSupportedServiceNames()102cdf0e10cSrcweir uno::Sequence< ::rtl::OUString> SAL_CALL OGroup::getSupportedServiceNames() throw(uno::RuntimeException)
103cdf0e10cSrcweir {
104cdf0e10cSrcweir     return getSupportedServiceNames_Static();
105cdf0e10cSrcweir }
106cdf0e10cSrcweir // -----------------------------------------------------------------------------
supportsService(const::rtl::OUString & _rServiceName)107cdf0e10cSrcweir sal_Bool SAL_CALL OGroup::supportsService( const ::rtl::OUString& _rServiceName ) throw(uno::RuntimeException)
108cdf0e10cSrcweir {
109cdf0e10cSrcweir     return ::comphelper::existsValue(_rServiceName,getSupportedServiceNames_Static());
110cdf0e10cSrcweir }
111cdf0e10cSrcweir // -----------------------------------------------------------------------------
dispose()112cdf0e10cSrcweir void SAL_CALL OGroup::dispose() throw(uno::RuntimeException)
113cdf0e10cSrcweir {
114cdf0e10cSrcweir     GroupPropertySet::dispose();
115cdf0e10cSrcweir     cppu::WeakComponentImplHelperBase::dispose();
116cdf0e10cSrcweir }
117cdf0e10cSrcweir // -----------------------------------------------------------------------------
118cdf0e10cSrcweir // TODO: VirtualFunctionFinder: This is virtual function!
119cdf0e10cSrcweir //
disposing()120cdf0e10cSrcweir void SAL_CALL OGroup::disposing()
121cdf0e10cSrcweir {
122cdf0e10cSrcweir     m_xHeader.clear();
123cdf0e10cSrcweir     m_xFooter.clear();
124cdf0e10cSrcweir     //::comphelper::disposeComponent(m_xHeader);
125cdf0e10cSrcweir     //::comphelper::disposeComponent(m_xFooter);
126cdf0e10cSrcweir     ::comphelper::disposeComponent(m_xFunctions);
127cdf0e10cSrcweir     m_xContext.clear();
128cdf0e10cSrcweir }
129cdf0e10cSrcweir // -----------------------------------------------------------------------------
130cdf0e10cSrcweir // XGroup
getSortAscending()131cdf0e10cSrcweir ::sal_Bool SAL_CALL OGroup::getSortAscending() throw (uno::RuntimeException)
132cdf0e10cSrcweir {
133cdf0e10cSrcweir     ::osl::MutexGuard aGuard(m_aMutex);
134cdf0e10cSrcweir     return m_aProps.m_eSortAscending;
135cdf0e10cSrcweir }
136cdf0e10cSrcweir // -----------------------------------------------------------------------------
setSortAscending(::sal_Bool _sortascending)137cdf0e10cSrcweir void SAL_CALL OGroup::setSortAscending( ::sal_Bool _sortascending ) throw (uno::RuntimeException)
138cdf0e10cSrcweir {
139cdf0e10cSrcweir     set(PROPERTY_SORTASCENDING,_sortascending,m_aProps.m_eSortAscending);
140cdf0e10cSrcweir }
141cdf0e10cSrcweir // -----------------------------------------------------------------------------
getHeaderOn()142cdf0e10cSrcweir ::sal_Bool SAL_CALL OGroup::getHeaderOn() throw (uno::RuntimeException)
143cdf0e10cSrcweir {
144cdf0e10cSrcweir     ::osl::MutexGuard aGuard(m_aMutex);
145cdf0e10cSrcweir     return m_xHeader.is();
146cdf0e10cSrcweir }
147cdf0e10cSrcweir // -----------------------------------------------------------------------------
setHeaderOn(::sal_Bool _headeron)148cdf0e10cSrcweir void SAL_CALL OGroup::setHeaderOn( ::sal_Bool _headeron ) throw (uno::RuntimeException)
149cdf0e10cSrcweir {
150cdf0e10cSrcweir     if ( _headeron != m_xHeader.is() )
151cdf0e10cSrcweir     {
152cdf0e10cSrcweir         ::rtl::OUString sName(RPT_RESSTRING(RID_STR_GROUP_HEADER,m_xContext->getServiceManager()));
153cdf0e10cSrcweir         /*const ::rtl::OUString sPlaceHolder(RTL_CONSTASCII_USTRINGPARAM("%1"));
154cdf0e10cSrcweir         sName = sName.replaceAt(sName.indexOf(sPlaceHolder),sPlaceHolder.getLength(),m_aProps.m_sExpression);*/
155cdf0e10cSrcweir         setSection(PROPERTY_HEADERON,_headeron,sName,m_xHeader);
156cdf0e10cSrcweir     }
157cdf0e10cSrcweir }
158cdf0e10cSrcweir // -----------------------------------------------------------------------------
getFooterOn()159cdf0e10cSrcweir ::sal_Bool SAL_CALL OGroup::getFooterOn() throw (uno::RuntimeException)
160cdf0e10cSrcweir {
161cdf0e10cSrcweir     ::osl::MutexGuard aGuard(m_aMutex);
162cdf0e10cSrcweir     return m_xFooter.is();
163cdf0e10cSrcweir }
164cdf0e10cSrcweir // -----------------------------------------------------------------------------
setFooterOn(::sal_Bool _footeron)165cdf0e10cSrcweir void SAL_CALL OGroup::setFooterOn( ::sal_Bool _footeron ) throw (uno::RuntimeException)
166cdf0e10cSrcweir {
167cdf0e10cSrcweir     if ( _footeron != m_xFooter.is() )
168cdf0e10cSrcweir     {
169cdf0e10cSrcweir         ::rtl::OUString sName(RPT_RESSTRING(RID_STR_GROUP_FOOTER,m_xContext->getServiceManager()));
170cdf0e10cSrcweir         /*const ::rtl::OUString sPlaceHolder(RTL_CONSTASCII_USTRINGPARAM("%1"));
171cdf0e10cSrcweir         sName = sName.replaceAt(sName.indexOf(sPlaceHolder),sPlaceHolder.getLength(),m_aProps.m_sExpression);*/
172cdf0e10cSrcweir         setSection(PROPERTY_FOOTERON,_footeron,sName,m_xFooter);
173cdf0e10cSrcweir     }
174cdf0e10cSrcweir }
175cdf0e10cSrcweir // -----------------------------------------------------------------------------
getHeader()176cdf0e10cSrcweir uno::Reference< report::XSection > SAL_CALL OGroup::getHeader() throw (container::NoSuchElementException, uno::RuntimeException)
177cdf0e10cSrcweir {
178cdf0e10cSrcweir     uno::Reference< report::XSection > xRet;
179cdf0e10cSrcweir     {
180cdf0e10cSrcweir         ::osl::MutexGuard aGuard(m_aMutex);
181cdf0e10cSrcweir         xRet = m_xHeader;
182cdf0e10cSrcweir     }
183cdf0e10cSrcweir 
184cdf0e10cSrcweir     if ( !xRet.is() )
185cdf0e10cSrcweir         throw container::NoSuchElementException();
186cdf0e10cSrcweir     return xRet;
187cdf0e10cSrcweir }
188cdf0e10cSrcweir // -----------------------------------------------------------------------------
getFooter()189cdf0e10cSrcweir uno::Reference< report::XSection > SAL_CALL OGroup::getFooter() throw (container::NoSuchElementException, uno::RuntimeException)
190cdf0e10cSrcweir {
191cdf0e10cSrcweir     uno::Reference< report::XSection > xRet;
192cdf0e10cSrcweir     {
193cdf0e10cSrcweir         ::osl::MutexGuard aGuard(m_aMutex);
194cdf0e10cSrcweir         xRet = m_xFooter;
195cdf0e10cSrcweir     }
196cdf0e10cSrcweir 
197cdf0e10cSrcweir     if ( !xRet.is() )
198cdf0e10cSrcweir         throw container::NoSuchElementException();
199cdf0e10cSrcweir     return xRet;
200cdf0e10cSrcweir }
201cdf0e10cSrcweir // -----------------------------------------------------------------------------
getGroupOn()202cdf0e10cSrcweir ::sal_Int16 SAL_CALL OGroup::getGroupOn() throw (uno::RuntimeException)
203cdf0e10cSrcweir {
204cdf0e10cSrcweir     ::osl::MutexGuard aGuard(m_aMutex);
205cdf0e10cSrcweir     return m_aProps.m_nGroupOn;
206cdf0e10cSrcweir }
207cdf0e10cSrcweir // -----------------------------------------------------------------------------
setGroupOn(::sal_Int16 _groupon)208cdf0e10cSrcweir void SAL_CALL OGroup::setGroupOn( ::sal_Int16 _groupon ) throw (lang::IllegalArgumentException, uno::RuntimeException)
209cdf0e10cSrcweir {
210cdf0e10cSrcweir     if ( _groupon < report::GroupOn::DEFAULT || _groupon > report::GroupOn::INTERVAL )
211cdf0e10cSrcweir         throwIllegallArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star::report::GroupOn"))
212cdf0e10cSrcweir                         ,*this
213cdf0e10cSrcweir                         ,1
214cdf0e10cSrcweir                         ,m_xContext);
215cdf0e10cSrcweir     set(PROPERTY_GROUPON,_groupon,m_aProps.m_nGroupOn);
216cdf0e10cSrcweir }
217cdf0e10cSrcweir // -----------------------------------------------------------------------------
getGroupInterval()218cdf0e10cSrcweir ::sal_Int32 SAL_CALL OGroup::getGroupInterval() throw (uno::RuntimeException)
219cdf0e10cSrcweir {
220cdf0e10cSrcweir     ::osl::MutexGuard aGuard(m_aMutex);
221cdf0e10cSrcweir     return m_aProps.m_nGroupInterval;
222cdf0e10cSrcweir }
223cdf0e10cSrcweir // -----------------------------------------------------------------------------
setGroupInterval(::sal_Int32 _groupinterval)224cdf0e10cSrcweir void SAL_CALL OGroup::setGroupInterval( ::sal_Int32 _groupinterval ) throw (uno::RuntimeException)
225cdf0e10cSrcweir {
226cdf0e10cSrcweir     set(PROPERTY_GROUPINTERVAL,_groupinterval,m_aProps.m_nGroupInterval);
227cdf0e10cSrcweir }
228cdf0e10cSrcweir // -----------------------------------------------------------------------------
getKeepTogether()229cdf0e10cSrcweir ::sal_Int16 SAL_CALL OGroup::getKeepTogether() throw (uno::RuntimeException)
230cdf0e10cSrcweir {
231cdf0e10cSrcweir     ::osl::MutexGuard aGuard(m_aMutex);
232cdf0e10cSrcweir     return m_aProps.m_nKeepTogether;
233cdf0e10cSrcweir }
234cdf0e10cSrcweir // -----------------------------------------------------------------------------
setKeepTogether(::sal_Int16 _keeptogether)235cdf0e10cSrcweir void SAL_CALL OGroup::setKeepTogether( ::sal_Int16 _keeptogether ) throw (lang::IllegalArgumentException, uno::RuntimeException)
236cdf0e10cSrcweir {
237cdf0e10cSrcweir     if ( _keeptogether < report::KeepTogether::NO || _keeptogether > report::KeepTogether::WITH_FIRST_DETAIL )
238cdf0e10cSrcweir         throwIllegallArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star::report::KeepTogether"))
239cdf0e10cSrcweir                         ,*this
240cdf0e10cSrcweir                         ,1
241cdf0e10cSrcweir                         ,m_xContext);
242cdf0e10cSrcweir     set(PROPERTY_KEEPTOGETHER,_keeptogether,m_aProps.m_nKeepTogether);
243cdf0e10cSrcweir }
244cdf0e10cSrcweir // -----------------------------------------------------------------------------
getGroups()245cdf0e10cSrcweir uno::Reference< report::XGroups > SAL_CALL OGroup::getGroups() throw (uno::RuntimeException)
246cdf0e10cSrcweir {
247cdf0e10cSrcweir     return m_xParent;
248cdf0e10cSrcweir }
249cdf0e10cSrcweir // -----------------------------------------------------------------------------
getExpression()250cdf0e10cSrcweir ::rtl::OUString SAL_CALL OGroup::getExpression() throw (uno::RuntimeException)
251cdf0e10cSrcweir {
252cdf0e10cSrcweir     ::osl::MutexGuard aGuard(m_aMutex);
253cdf0e10cSrcweir     return m_aProps.m_sExpression;
254cdf0e10cSrcweir }
255cdf0e10cSrcweir // -----------------------------------------------------------------------------
setExpression(const::rtl::OUString & _expression)256cdf0e10cSrcweir void SAL_CALL OGroup::setExpression( const ::rtl::OUString& _expression ) throw (uno::RuntimeException)
257cdf0e10cSrcweir {
258cdf0e10cSrcweir     set(PROPERTY_EXPRESSION,_expression,m_aProps.m_sExpression);
259cdf0e10cSrcweir }
260cdf0e10cSrcweir // -----------------------------------------------------------------------------
getStartNewColumn()261cdf0e10cSrcweir ::sal_Bool SAL_CALL OGroup::getStartNewColumn() throw (uno::RuntimeException)
262cdf0e10cSrcweir {
263cdf0e10cSrcweir     ::osl::MutexGuard aGuard(m_aMutex);
264cdf0e10cSrcweir     return m_aProps.m_bStartNewColumn;
265cdf0e10cSrcweir }
266cdf0e10cSrcweir // -----------------------------------------------------------------------------
setStartNewColumn(::sal_Bool _startnewcolumn)267cdf0e10cSrcweir void SAL_CALL OGroup::setStartNewColumn( ::sal_Bool _startnewcolumn ) throw (uno::RuntimeException)
268cdf0e10cSrcweir {
269cdf0e10cSrcweir     set(PROPERTY_STARTNEWCOLUMN,_startnewcolumn,m_aProps.m_bStartNewColumn);
270cdf0e10cSrcweir }
271cdf0e10cSrcweir // -----------------------------------------------------------------------------
272cdf0e10cSrcweir // -----------------------------------------------------------------------------
getResetPageNumber()273cdf0e10cSrcweir ::sal_Bool SAL_CALL OGroup::getResetPageNumber() throw (uno::RuntimeException)
274cdf0e10cSrcweir {
275cdf0e10cSrcweir     ::osl::MutexGuard aGuard(m_aMutex);
276cdf0e10cSrcweir     return m_aProps.m_bResetPageNumber;
277cdf0e10cSrcweir }
278cdf0e10cSrcweir // -----------------------------------------------------------------------------
setResetPageNumber(::sal_Bool _resetpagenumber)279cdf0e10cSrcweir void SAL_CALL OGroup::setResetPageNumber( ::sal_Bool _resetpagenumber ) throw (uno::RuntimeException)
280cdf0e10cSrcweir {
281cdf0e10cSrcweir     set(PROPERTY_RESETPAGENUMBER,_resetpagenumber,m_aProps.m_bResetPageNumber);
282cdf0e10cSrcweir }
283cdf0e10cSrcweir // -----------------------------------------------------------------------------
284cdf0e10cSrcweir // XChild
getParent()285cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL OGroup::getParent(  ) throw (uno::RuntimeException)
286cdf0e10cSrcweir {
287cdf0e10cSrcweir     return m_xParent;
288cdf0e10cSrcweir }
289cdf0e10cSrcweir // -----------------------------------------------------------------------------
setParent(const uno::Reference<uno::XInterface> &)290cdf0e10cSrcweir void SAL_CALL OGroup::setParent( const uno::Reference< uno::XInterface >& /*Parent*/ ) throw (lang::NoSupportException, uno::RuntimeException)
291cdf0e10cSrcweir {
292cdf0e10cSrcweir     throw lang::NoSupportException();
293cdf0e10cSrcweir }
294cdf0e10cSrcweir // -----------------------------------------------------------------------------
getPropertySetInfo()295cdf0e10cSrcweir uno::Reference< beans::XPropertySetInfo > SAL_CALL OGroup::getPropertySetInfo(  ) throw(uno::RuntimeException)
296cdf0e10cSrcweir {
297cdf0e10cSrcweir     //  return uno::Reference< beans::XPropertySetInfo >();
298cdf0e10cSrcweir     return GroupPropertySet::getPropertySetInfo();
299cdf0e10cSrcweir }
300cdf0e10cSrcweir // -----------------------------------------------------------------------------
setPropertyValue(const::rtl::OUString & aPropertyName,const uno::Any & aValue)301cdf0e10cSrcweir void SAL_CALL OGroup::setPropertyValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
302cdf0e10cSrcweir {
303cdf0e10cSrcweir     GroupPropertySet::setPropertyValue( aPropertyName, aValue );
304cdf0e10cSrcweir }
305cdf0e10cSrcweir // -----------------------------------------------------------------------------
getPropertyValue(const::rtl::OUString & PropertyName)306cdf0e10cSrcweir uno::Any SAL_CALL OGroup::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
307cdf0e10cSrcweir {
308cdf0e10cSrcweir     return GroupPropertySet::getPropertyValue( PropertyName);
309cdf0e10cSrcweir }
310cdf0e10cSrcweir // -----------------------------------------------------------------------------
addPropertyChangeListener(const::rtl::OUString & aPropertyName,const uno::Reference<beans::XPropertyChangeListener> & xListener)311cdf0e10cSrcweir void SAL_CALL OGroup::addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
312cdf0e10cSrcweir {
313cdf0e10cSrcweir     GroupPropertySet::addPropertyChangeListener( aPropertyName, xListener );
314cdf0e10cSrcweir }
315cdf0e10cSrcweir // -----------------------------------------------------------------------------
removePropertyChangeListener(const::rtl::OUString & aPropertyName,const uno::Reference<beans::XPropertyChangeListener> & aListener)316cdf0e10cSrcweir void SAL_CALL OGroup::removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
317cdf0e10cSrcweir {
318cdf0e10cSrcweir     GroupPropertySet::removePropertyChangeListener( aPropertyName, aListener );
319cdf0e10cSrcweir }
320cdf0e10cSrcweir // -----------------------------------------------------------------------------
addVetoableChangeListener(const::rtl::OUString & PropertyName,const uno::Reference<beans::XVetoableChangeListener> & aListener)321cdf0e10cSrcweir void SAL_CALL OGroup::addVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
322cdf0e10cSrcweir {
323cdf0e10cSrcweir     GroupPropertySet::addVetoableChangeListener( PropertyName, aListener );
324cdf0e10cSrcweir }
325cdf0e10cSrcweir // -----------------------------------------------------------------------------
removeVetoableChangeListener(const::rtl::OUString & PropertyName,const uno::Reference<beans::XVetoableChangeListener> & aListener)326cdf0e10cSrcweir void SAL_CALL OGroup::removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
327cdf0e10cSrcweir {
328cdf0e10cSrcweir     GroupPropertySet::removeVetoableChangeListener( PropertyName, aListener );
329cdf0e10cSrcweir }
330cdf0e10cSrcweir // -----------------------------------------------------------------------------
setSection(const::rtl::OUString & _sProperty,const sal_Bool & _bOn,const::rtl::OUString & _sName,uno::Reference<report::XSection> & _member)331cdf0e10cSrcweir void OGroup::setSection(     const ::rtl::OUString& _sProperty
332cdf0e10cSrcweir                             ,const sal_Bool& _bOn
333cdf0e10cSrcweir                             ,const ::rtl::OUString& _sName
334cdf0e10cSrcweir                             ,uno::Reference< report::XSection>& _member)
335cdf0e10cSrcweir {
336cdf0e10cSrcweir     BoundListeners l;
337cdf0e10cSrcweir     {
338cdf0e10cSrcweir         ::osl::MutexGuard aGuard(m_aMutex);
339cdf0e10cSrcweir         prepareSet(_sProperty, uno::makeAny(_member), uno::makeAny(_bOn), &l);
340cdf0e10cSrcweir         lcl_createSectionIfNeeded(_bOn ,this,_member);
341cdf0e10cSrcweir         if ( _member.is() )
342cdf0e10cSrcweir             _member->setName(_sName);
343cdf0e10cSrcweir     }
344cdf0e10cSrcweir     l.notify();
345cdf0e10cSrcweir }
346cdf0e10cSrcweir // -----------------------------------------------------------------------------
getFunctions()347cdf0e10cSrcweir uno::Reference< report::XFunctions > SAL_CALL OGroup::getFunctions() throw (uno::RuntimeException)
348cdf0e10cSrcweir {
349cdf0e10cSrcweir     return m_xFunctions;
350cdf0e10cSrcweir }
351cdf0e10cSrcweir // =============================================================================
352cdf0e10cSrcweir } // namespace reportdesign
353cdf0e10cSrcweir // =============================================================================
354