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