xref: /AOO41X/main/reportdesign/source/core/api/FixedText.cxx (revision 9e0e41911c53968aad5ad356e2b2126da667034f)
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 "FixedText.hxx"
24cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
25cdf0e10cSrcweir #ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
26cdf0e10cSrcweir #include "corestrings.hrc"
27cdf0e10cSrcweir #endif
28cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp>
29cdf0e10cSrcweir #ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
30cdf0e10cSrcweir #include "core_resource.hrc"
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #include "core_resource.hxx"
33cdf0e10cSrcweir #include <comphelper/sequence.hxx>
34cdf0e10cSrcweir #include "Tools.hxx"
35cdf0e10cSrcweir #include <tools/debug.hxx>
36cdf0e10cSrcweir #include <comphelper/property.hxx>
37cdf0e10cSrcweir #include "FormatCondition.hxx"
38cdf0e10cSrcweir #include <com/sun/star/text/ParagraphVertAlign.hpp>
39cdf0e10cSrcweir #include "ReportHelperImpl.hxx"
40cdf0e10cSrcweir // =============================================================================
41cdf0e10cSrcweir namespace reportdesign
42cdf0e10cSrcweir {
43cdf0e10cSrcweir // =============================================================================
44cdf0e10cSrcweir 	using namespace com::sun::star;
45cdf0e10cSrcweir 	using namespace comphelper;
lcl_getFixedTextOptionals()46cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > lcl_getFixedTextOptionals()
47cdf0e10cSrcweir {
48cdf0e10cSrcweir 	::rtl::OUString pProps[] = { PROPERTY_DATAFIELD,PROPERTY_MASTERFIELDS,PROPERTY_DETAILFIELDS };
49cdf0e10cSrcweir 	return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
50cdf0e10cSrcweir }
DBG_NAME(rpt_OFixedText)51cdf0e10cSrcweir DBG_NAME( rpt_OFixedText )
52cdf0e10cSrcweir // -----------------------------------------------------------------------------
53cdf0e10cSrcweir OFixedText::OFixedText(uno::Reference< uno::XComponentContext > const & _xContext)
54cdf0e10cSrcweir :FixedTextBase(m_aMutex)
55cdf0e10cSrcweir ,FixedTextPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getFixedTextOptionals())
56cdf0e10cSrcweir ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
57cdf0e10cSrcweir {
58cdf0e10cSrcweir 	DBG_CTOR( rpt_OFixedText,NULL);
59cdf0e10cSrcweir 	m_aProps.aComponent.m_sName  = RPT_RESSTRING(RID_STR_FIXEDTEXT,m_aProps.aComponent.m_xContext->getServiceManager());
60cdf0e10cSrcweir 	m_aProps.aComponent.m_nBorder = 0; // no border
61cdf0e10cSrcweir }
62cdf0e10cSrcweir // -----------------------------------------------------------------------------
OFixedText(uno::Reference<uno::XComponentContext> const & _xContext,const uno::Reference<lang::XMultiServiceFactory> & _xFactory,uno::Reference<drawing::XShape> & _xShape)63cdf0e10cSrcweir OFixedText::OFixedText(uno::Reference< uno::XComponentContext > const & _xContext
64cdf0e10cSrcweir                        ,const uno::Reference< lang::XMultiServiceFactory>& _xFactory
65cdf0e10cSrcweir                        ,uno::Reference< drawing::XShape >& _xShape)
66cdf0e10cSrcweir :FixedTextBase(m_aMutex)
67cdf0e10cSrcweir ,FixedTextPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getFixedTextOptionals())
68cdf0e10cSrcweir ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
69cdf0e10cSrcweir {
70cdf0e10cSrcweir 	DBG_CTOR( rpt_OFixedText,NULL);
71cdf0e10cSrcweir 	m_aProps.aComponent.m_sName  = RPT_RESSTRING(RID_STR_FIXEDTEXT,m_aProps.aComponent.m_xContext->getServiceManager());
72cdf0e10cSrcweir 	m_aProps.aComponent.m_nBorder = 0; // no border
73cdf0e10cSrcweir     m_aProps.aComponent.m_xFactory = _xFactory;
74cdf0e10cSrcweir     osl_incrementInterlockedCount( &m_refCount );
75cdf0e10cSrcweir     {
76cdf0e10cSrcweir         m_aProps.aComponent.setShape(_xShape,this,m_refCount);
77cdf0e10cSrcweir     }
78cdf0e10cSrcweir     osl_decrementInterlockedCount( &m_refCount );
79cdf0e10cSrcweir }
80cdf0e10cSrcweir // -----------------------------------------------------------------------------
~OFixedText()81cdf0e10cSrcweir OFixedText::~OFixedText()
82cdf0e10cSrcweir {
83cdf0e10cSrcweir     DBG_DTOR( rpt_OFixedText,NULL);
84cdf0e10cSrcweir }
85cdf0e10cSrcweir // -----------------------------------------------------------------------------
IMPLEMENT_FORWARD_REFCOUNT(OFixedText,FixedTextBase)86cdf0e10cSrcweir IMPLEMENT_FORWARD_REFCOUNT( OFixedText, FixedTextBase )
87cdf0e10cSrcweir // --------------------------------------------------------------------------------
88cdf0e10cSrcweir uno::Any SAL_CALL OFixedText::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException)
89cdf0e10cSrcweir {
90cdf0e10cSrcweir 	uno::Any aReturn = FixedTextBase::queryInterface(_rType);
91cdf0e10cSrcweir     if ( !aReturn.hasValue() )
92cdf0e10cSrcweir         aReturn = FixedTextPropertySet::queryInterface(_rType);
93cdf0e10cSrcweir     if ( !aReturn.hasValue() && OReportControlModel::isInterfaceForbidden(_rType) )
94cdf0e10cSrcweir         return aReturn;
95cdf0e10cSrcweir 
96cdf0e10cSrcweir 	return aReturn.hasValue() ? aReturn : (m_aProps.aComponent.m_xProxy.is() ? m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
97cdf0e10cSrcweir }
98cdf0e10cSrcweir 
99cdf0e10cSrcweir //IMPLEMENT_FORWARD_XINTERFACE2(OFixedText,FixedTextBase,FixedTextPropertySet)
100cdf0e10cSrcweir // -----------------------------------------------------------------------------
dispose()101cdf0e10cSrcweir void SAL_CALL OFixedText::dispose() throw(uno::RuntimeException)
102cdf0e10cSrcweir {
103cdf0e10cSrcweir 	FixedTextPropertySet::dispose();
104cdf0e10cSrcweir 	cppu::WeakComponentImplHelperBase::dispose();
105cdf0e10cSrcweir     uno::Reference< report::XFixedText> xHoldAlive = this;
106cdf0e10cSrcweir }
107cdf0e10cSrcweir // -----------------------------------------------------------------------------
getImplementationName_Static()108cdf0e10cSrcweir ::rtl::OUString OFixedText::getImplementationName_Static(  ) throw(uno::RuntimeException)
109cdf0e10cSrcweir {
110cdf0e10cSrcweir 	return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.OFixedText"));
111cdf0e10cSrcweir }
112cdf0e10cSrcweir 
113cdf0e10cSrcweir //--------------------------------------------------------------------------
getImplementationName()114cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedText::getImplementationName(  ) throw(uno::RuntimeException)
115cdf0e10cSrcweir {
116cdf0e10cSrcweir 	return getImplementationName_Static();
117cdf0e10cSrcweir }
118cdf0e10cSrcweir //--------------------------------------------------------------------------
getSupportedServiceNames_Static()119cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > OFixedText::getSupportedServiceNames_Static(  ) throw(uno::RuntimeException)
120cdf0e10cSrcweir {
121cdf0e10cSrcweir 	uno::Sequence< ::rtl::OUString > aServices(1);//2);
122cdf0e10cSrcweir 	aServices.getArray()[0] = SERVICE_FIXEDTEXT;
123cdf0e10cSrcweir     //aServices.getArray()[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FixedText"));
124cdf0e10cSrcweir 
125cdf0e10cSrcweir 	return aServices;
126cdf0e10cSrcweir }
127cdf0e10cSrcweir //------------------------------------------------------------------------------
create(uno::Reference<uno::XComponentContext> const & xContext)128cdf0e10cSrcweir uno::Reference< uno::XInterface > OFixedText::create(uno::Reference< uno::XComponentContext > const & xContext)
129cdf0e10cSrcweir {
130cdf0e10cSrcweir 	return *(new OFixedText(xContext));
131cdf0e10cSrcweir }
132cdf0e10cSrcweir 
133cdf0e10cSrcweir //--------------------------------------------------------------------------
getSupportedServiceNames()134cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > SAL_CALL OFixedText::getSupportedServiceNames(  ) throw(uno::RuntimeException)
135cdf0e10cSrcweir {
136cdf0e10cSrcweir 	return getSupportedServiceNames_Static();
137cdf0e10cSrcweir }
138cdf0e10cSrcweir //------------------------------------------------------------------------------
supportsService(const::rtl::OUString & ServiceName)139cdf0e10cSrcweir sal_Bool SAL_CALL OFixedText::supportsService(const ::rtl::OUString& ServiceName) throw( uno::RuntimeException )
140cdf0e10cSrcweir {
141cdf0e10cSrcweir 	return ::comphelper::existsValue(ServiceName,getSupportedServiceNames_Static());
142cdf0e10cSrcweir }
143cdf0e10cSrcweir // -----------------------------------------------------------------------------
144cdf0e10cSrcweir // XReportComponent
145cdf0e10cSrcweir REPORTCOMPONENT_IMPL(OFixedText,m_aProps.aComponent)
146cdf0e10cSrcweir REPORTCOMPONENT_IMPL2(OFixedText,m_aProps.aComponent)
REPORTCOMPONENT_NOMASTERDETAIL(OFixedText)147cdf0e10cSrcweir REPORTCOMPONENT_NOMASTERDETAIL(OFixedText)
148cdf0e10cSrcweir REPORTCONTROLFORMAT_IMPL(OFixedText,m_aProps.aFormatProperties)
149cdf0e10cSrcweir // -----------------------------------------------------------------------------
150cdf0e10cSrcweir uno::Reference< beans::XPropertySetInfo > SAL_CALL OFixedText::getPropertySetInfo(  ) throw(uno::RuntimeException)
151cdf0e10cSrcweir {
152cdf0e10cSrcweir 	return FixedTextPropertySet::getPropertySetInfo();
153cdf0e10cSrcweir }
154cdf0e10cSrcweir // -----------------------------------------------------------------------------
setPropertyValue(const::rtl::OUString & aPropertyName,const uno::Any & aValue)155cdf0e10cSrcweir void SAL_CALL OFixedText::setPropertyValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
156cdf0e10cSrcweir {
157cdf0e10cSrcweir 	FixedTextPropertySet::setPropertyValue( aPropertyName, aValue );
158cdf0e10cSrcweir }
159cdf0e10cSrcweir // -----------------------------------------------------------------------------
getPropertyValue(const::rtl::OUString & PropertyName)160cdf0e10cSrcweir uno::Any SAL_CALL OFixedText::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
161cdf0e10cSrcweir {
162cdf0e10cSrcweir 	return FixedTextPropertySet::getPropertyValue( PropertyName);
163cdf0e10cSrcweir }
164cdf0e10cSrcweir // -----------------------------------------------------------------------------
addPropertyChangeListener(const::rtl::OUString & aPropertyName,const uno::Reference<beans::XPropertyChangeListener> & xListener)165cdf0e10cSrcweir void SAL_CALL OFixedText::addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
166cdf0e10cSrcweir {
167cdf0e10cSrcweir 	FixedTextPropertySet::addPropertyChangeListener( aPropertyName, xListener );
168cdf0e10cSrcweir }
169cdf0e10cSrcweir // -----------------------------------------------------------------------------
removePropertyChangeListener(const::rtl::OUString & aPropertyName,const uno::Reference<beans::XPropertyChangeListener> & aListener)170cdf0e10cSrcweir void SAL_CALL OFixedText::removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
171cdf0e10cSrcweir {
172cdf0e10cSrcweir 	FixedTextPropertySet::removePropertyChangeListener( aPropertyName, aListener );
173cdf0e10cSrcweir }
174cdf0e10cSrcweir // -----------------------------------------------------------------------------
addVetoableChangeListener(const::rtl::OUString & PropertyName,const uno::Reference<beans::XVetoableChangeListener> & aListener)175cdf0e10cSrcweir void SAL_CALL OFixedText::addVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
176cdf0e10cSrcweir {
177cdf0e10cSrcweir 	FixedTextPropertySet::addVetoableChangeListener( PropertyName, aListener );
178cdf0e10cSrcweir }
179cdf0e10cSrcweir // -----------------------------------------------------------------------------
removeVetoableChangeListener(const::rtl::OUString & PropertyName,const uno::Reference<beans::XVetoableChangeListener> & aListener)180cdf0e10cSrcweir void SAL_CALL OFixedText::removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
181cdf0e10cSrcweir {
182cdf0e10cSrcweir 	FixedTextPropertySet::removeVetoableChangeListener( PropertyName, aListener );
183cdf0e10cSrcweir }
184cdf0e10cSrcweir // -----------------------------------------------------------------------------
185cdf0e10cSrcweir // XReportControlModel
getDataField()186cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedText::getDataField() throw ( beans::UnknownPropertyException, uno::RuntimeException)
187cdf0e10cSrcweir {
188cdf0e10cSrcweir 	throw beans::UnknownPropertyException();
189cdf0e10cSrcweir }
190cdf0e10cSrcweir // -----------------------------------------------------------------------------
setDataField(const::rtl::OUString &)191cdf0e10cSrcweir void SAL_CALL OFixedText::setDataField( const ::rtl::OUString& /*_datafield*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
192cdf0e10cSrcweir {
193cdf0e10cSrcweir 	throw beans::UnknownPropertyException();
194cdf0e10cSrcweir }
195cdf0e10cSrcweir // -----------------------------------------------------------------------------
196cdf0e10cSrcweir 
197cdf0e10cSrcweir // -----------------------------------------------------------------------------
getPrintWhenGroupChange()198cdf0e10cSrcweir ::sal_Bool SAL_CALL OFixedText::getPrintWhenGroupChange() throw (beans::UnknownPropertyException, uno::RuntimeException)
199cdf0e10cSrcweir {
200cdf0e10cSrcweir 	::osl::MutexGuard aGuard(m_aMutex);
201cdf0e10cSrcweir 	return m_aProps.bPrintWhenGroupChange;
202cdf0e10cSrcweir }
203cdf0e10cSrcweir // -----------------------------------------------------------------------------
setPrintWhenGroupChange(::sal_Bool _printwhengroupchange)204cdf0e10cSrcweir void SAL_CALL OFixedText::setPrintWhenGroupChange( ::sal_Bool _printwhengroupchange ) throw (beans::UnknownPropertyException, uno::RuntimeException)
205cdf0e10cSrcweir {
206cdf0e10cSrcweir 	set(PROPERTY_PRINTWHENGROUPCHANGE,_printwhengroupchange,m_aProps.bPrintWhenGroupChange);
207cdf0e10cSrcweir }
208cdf0e10cSrcweir // -----------------------------------------------------------------------------
getConditionalPrintExpression()209cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedText::getConditionalPrintExpression() throw (beans::UnknownPropertyException, uno::RuntimeException)
210cdf0e10cSrcweir {
211cdf0e10cSrcweir 	::osl::MutexGuard aGuard(m_aMutex);
212cdf0e10cSrcweir 	return m_aProps.aConditionalPrintExpression;
213cdf0e10cSrcweir }
214cdf0e10cSrcweir // -----------------------------------------------------------------------------
setConditionalPrintExpression(const::rtl::OUString & _conditionalprintexpression)215cdf0e10cSrcweir void SAL_CALL OFixedText::setConditionalPrintExpression( const ::rtl::OUString& _conditionalprintexpression ) throw (beans::UnknownPropertyException, uno::RuntimeException)
216cdf0e10cSrcweir {
217cdf0e10cSrcweir 	set(PROPERTY_CONDITIONALPRINTEXPRESSION,_conditionalprintexpression,m_aProps.aConditionalPrintExpression);
218cdf0e10cSrcweir }
219cdf0e10cSrcweir // -----------------------------------------------------------------------------
220cdf0e10cSrcweir 
221cdf0e10cSrcweir // XCloneable
createClone()222cdf0e10cSrcweir uno::Reference< util::XCloneable > SAL_CALL OFixedText::createClone(  ) throw (uno::RuntimeException)
223cdf0e10cSrcweir {
224cdf0e10cSrcweir     uno::Reference< report::XReportComponent> xSource = this;
225cdf0e10cSrcweir     uno::Reference< report::XFixedText> xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_FIXEDTEXT),uno::UNO_QUERY_THROW);
226cdf0e10cSrcweir 	return xSet.get();
227cdf0e10cSrcweir }
228cdf0e10cSrcweir // -----------------------------------------------------------------------------
229cdf0e10cSrcweir 
230cdf0e10cSrcweir // XFixedText
getLabel()231cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedText::getLabel() throw (uno::RuntimeException)
232cdf0e10cSrcweir {
233cdf0e10cSrcweir 	::osl::MutexGuard aGuard(m_aMutex);
234cdf0e10cSrcweir 	return m_sLabel;
235cdf0e10cSrcweir }
236cdf0e10cSrcweir // -----------------------------------------------------------------------------
setLabel(const::rtl::OUString & _label)237cdf0e10cSrcweir void SAL_CALL OFixedText::setLabel( const ::rtl::OUString& _label ) throw (uno::RuntimeException)
238cdf0e10cSrcweir {
239cdf0e10cSrcweir 	set(PROPERTY_LABEL,_label,m_sLabel);
240cdf0e10cSrcweir }
241cdf0e10cSrcweir // -----------------------------------------------------------------------------
242cdf0e10cSrcweir // XChild
getParent()243cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL OFixedText::getParent(  ) throw (uno::RuntimeException)
244cdf0e10cSrcweir {
245cdf0e10cSrcweir     return OShapeHelper::getParent(this);
246cdf0e10cSrcweir }
247cdf0e10cSrcweir // -----------------------------------------------------------------------------
setParent(const uno::Reference<uno::XInterface> & Parent)248cdf0e10cSrcweir void SAL_CALL OFixedText::setParent( const uno::Reference< uno::XInterface >& Parent ) throw (lang::NoSupportException, uno::RuntimeException)
249cdf0e10cSrcweir {
250cdf0e10cSrcweir 	OShapeHelper::setParent(Parent,this);
251cdf0e10cSrcweir }
252cdf0e10cSrcweir // -----------------------------------------------------------------------------
createFormatCondition()253cdf0e10cSrcweir uno::Reference< report::XFormatCondition > SAL_CALL OFixedText::createFormatCondition(  ) throw (uno::Exception, uno::RuntimeException)
254cdf0e10cSrcweir {
255cdf0e10cSrcweir 	return new OFormatCondition(m_aProps.aComponent.m_xContext);
256cdf0e10cSrcweir }
257cdf0e10cSrcweir // -----------------------------------------------------------------------------
258cdf0e10cSrcweir // XContainer
addContainerListener(const uno::Reference<container::XContainerListener> & xListener)259cdf0e10cSrcweir void SAL_CALL OFixedText::addContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
260cdf0e10cSrcweir {
261cdf0e10cSrcweir 	m_aProps.addContainerListener(xListener);
262cdf0e10cSrcweir }
263cdf0e10cSrcweir // -----------------------------------------------------------------------------
removeContainerListener(const uno::Reference<container::XContainerListener> & xListener)264cdf0e10cSrcweir void SAL_CALL OFixedText::removeContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
265cdf0e10cSrcweir {
266cdf0e10cSrcweir 	m_aProps.removeContainerListener(xListener);
267cdf0e10cSrcweir }
268cdf0e10cSrcweir // -----------------------------------------------------------------------------
269cdf0e10cSrcweir // XElementAccess
getElementType()270cdf0e10cSrcweir uno::Type SAL_CALL OFixedText::getElementType(  ) throw (uno::RuntimeException)
271cdf0e10cSrcweir {
272cdf0e10cSrcweir 	return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
273cdf0e10cSrcweir }
274cdf0e10cSrcweir // -----------------------------------------------------------------------------
hasElements()275cdf0e10cSrcweir ::sal_Bool SAL_CALL OFixedText::hasElements(  ) throw (uno::RuntimeException)
276cdf0e10cSrcweir {
277cdf0e10cSrcweir 	return m_aProps.hasElements();
278cdf0e10cSrcweir }
279cdf0e10cSrcweir // -----------------------------------------------------------------------------
280cdf0e10cSrcweir // XIndexContainer
insertByIndex(::sal_Int32 Index,const uno::Any & Element)281cdf0e10cSrcweir void SAL_CALL OFixedText::insertByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
282cdf0e10cSrcweir {
283cdf0e10cSrcweir     m_aProps.insertByIndex(Index,Element);
284cdf0e10cSrcweir }
285cdf0e10cSrcweir // -----------------------------------------------------------------------------
removeByIndex(::sal_Int32 Index)286cdf0e10cSrcweir void SAL_CALL OFixedText::removeByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
287cdf0e10cSrcweir {
288cdf0e10cSrcweir     m_aProps.removeByIndex(Index);
289cdf0e10cSrcweir }
290cdf0e10cSrcweir // -----------------------------------------------------------------------------
291cdf0e10cSrcweir // XIndexReplace
replaceByIndex(::sal_Int32 Index,const uno::Any & Element)292cdf0e10cSrcweir void SAL_CALL OFixedText::replaceByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
293cdf0e10cSrcweir {
294cdf0e10cSrcweir     m_aProps.replaceByIndex(Index,Element);
295cdf0e10cSrcweir }
296cdf0e10cSrcweir // -----------------------------------------------------------------------------
297cdf0e10cSrcweir // XIndexAccess
getCount()298cdf0e10cSrcweir ::sal_Int32 SAL_CALL OFixedText::getCount(  ) throw (uno::RuntimeException)
299cdf0e10cSrcweir {
300cdf0e10cSrcweir 	return m_aProps.getCount();
301cdf0e10cSrcweir }
302cdf0e10cSrcweir // -----------------------------------------------------------------------------
getByIndex(::sal_Int32 Index)303cdf0e10cSrcweir uno::Any SAL_CALL OFixedText::getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
304cdf0e10cSrcweir {
305cdf0e10cSrcweir     return m_aProps.getByIndex( Index );
306cdf0e10cSrcweir }
307cdf0e10cSrcweir // -----------------------------------------------------------------------------
308cdf0e10cSrcweir // XShape
getPosition()309cdf0e10cSrcweir awt::Point SAL_CALL OFixedText::getPosition(  ) throw (uno::RuntimeException)
310cdf0e10cSrcweir {
311cdf0e10cSrcweir 	return OShapeHelper::getPosition(this);
312cdf0e10cSrcweir }
313cdf0e10cSrcweir // -----------------------------------------------------------------------------
setPosition(const awt::Point & aPosition)314cdf0e10cSrcweir void SAL_CALL OFixedText::setPosition( const awt::Point& aPosition ) throw (uno::RuntimeException)
315cdf0e10cSrcweir {
316cdf0e10cSrcweir     OShapeHelper::setPosition(aPosition,this);
317cdf0e10cSrcweir }
318cdf0e10cSrcweir // -----------------------------------------------------------------------------
getSize()319cdf0e10cSrcweir awt::Size SAL_CALL OFixedText::getSize(  ) throw (uno::RuntimeException)
320cdf0e10cSrcweir {
321cdf0e10cSrcweir 	return OShapeHelper::getSize(this);
322cdf0e10cSrcweir }
323cdf0e10cSrcweir // -----------------------------------------------------------------------------
setSize(const awt::Size & aSize)324cdf0e10cSrcweir void SAL_CALL OFixedText::setSize( const awt::Size& aSize ) throw (beans::PropertyVetoException, uno::RuntimeException)
325cdf0e10cSrcweir {
326cdf0e10cSrcweir     OShapeHelper::setSize(aSize,this);
327cdf0e10cSrcweir }
328cdf0e10cSrcweir // -----------------------------------------------------------------------------
329cdf0e10cSrcweir 
330cdf0e10cSrcweir // XShapeDescriptor
getShapeType()331cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedText::getShapeType(  ) throw (uno::RuntimeException)
332cdf0e10cSrcweir {
3339320a50fSMichael Stahl 	return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
334cdf0e10cSrcweir }
335cdf0e10cSrcweir // -----------------------------------------------------------------------------
336cdf0e10cSrcweir // -----------------------------------------------------------------------------
337cdf0e10cSrcweir // =============================================================================
338cdf0e10cSrcweir } // namespace reportdesign
339cdf0e10cSrcweir // =============================================================================
340cdf0e10cSrcweir 
341