Update ooo320-m1
[ooovba.git] / reportdesign / source / core / api / FixedLine.cxx
blob2612655efac44b674094e57e7bf285036a405cae
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FixedLine.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #include "FixedLine.hxx"
31 #include <com/sun/star/beans/PropertyAttribute.hpp>
32 #ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
33 #include "corestrings.hrc"
34 #endif
35 #ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
36 #include "core_resource.hrc"
37 #endif
38 #include "core_resource.hxx"
39 #include <comphelper/sequence.hxx>
40 #include <tools/debug.hxx>
41 #include <comphelper/property.hxx>
42 #include "Tools.hxx"
43 #include "FormatCondition.hxx"
44 #include <com/sun/star/beans/XPropertyState.hpp>
45 #include <com/sun/star/text/ParagraphVertAlign.hpp>
46 #include <boost/bind.hpp>
47 #include "ReportHelperImpl.hxx"
49 #define MIN_WIDTH 80
50 #define MIN_HEIGHT 20
51 // =============================================================================
52 namespace reportdesign
54 // =============================================================================
55 using namespace com::sun::star;
56 using namespace comphelper;
57 uno::Sequence< ::rtl::OUString > lcl_getLineOptionals()
59 ::rtl::OUString pProps[] = {
60 PROPERTY_DATAFIELD
61 ,PROPERTY_DEFAULTCONTROL
62 ,PROPERTY_CONTROLBORDER
63 ,PROPERTY_CONTROLBORDERCOLOR
64 ,PROPERTY_CHARCOLOR
65 ,PROPERTY_CHAREMPHASIS
66 ,PROPERTY_CHARFONTCHARSET
67 ,PROPERTY_CHARFONTFAMILY
68 ,PROPERTY_CHARFONTNAME
69 ,PROPERTY_CHARFONTPITCH
70 ,PROPERTY_CHARFONTSTYLENAME
71 ,PROPERTY_CHARHEIGHT
72 ,PROPERTY_CHARPOSTURE
73 ,PROPERTY_CHARRELIEF
74 ,PROPERTY_FONTDESCRIPTOR
75 ,PROPERTY_FONTDESCRIPTORASIAN
76 ,PROPERTY_FONTDESCRIPTORCOMPLEX
77 ,PROPERTY_CONTROLTEXTEMPHASISMARK
78 ,PROPERTY_CHARROTATION
79 ,PROPERTY_CHARSCALEWIDTH
80 ,PROPERTY_CHARSTRIKEOUT
81 ,PROPERTY_CHARUNDERLINECOLOR
82 ,PROPERTY_CHARUNDERLINE
83 ,PROPERTY_CHARWEIGHT
84 ,PROPERTY_CHARWORDMODE
85 ,PROPERTY_CONTROLBACKGROUND
86 ,PROPERTY_CONTROLBACKGROUNDTRANSPARENT
87 ,PROPERTY_CHARFLASH
88 ,PROPERTY_CHARAUTOKERNING
89 ,PROPERTY_CHARESCAPEMENTHEIGHT
90 ,PROPERTY_CHARLOCALE
91 ,PROPERTY_CHARESCAPEMENT
92 ,PROPERTY_CHARCASEMAP
93 ,PROPERTY_CHARCOMBINEISON
94 ,PROPERTY_CHARCOMBINEPREFIX
95 ,PROPERTY_CHARCOMBINESUFFIX
96 ,PROPERTY_CHARHIDDEN
97 ,PROPERTY_CHARSHADOWED
98 ,PROPERTY_CHARCONTOURED
99 ,PROPERTY_HYPERLINKURL
100 ,PROPERTY_HYPERLINKTARGET
101 ,PROPERTY_HYPERLINKNAME
102 ,PROPERTY_VISITEDCHARSTYLENAME
103 ,PROPERTY_UNVISITEDCHARSTYLENAME
104 ,PROPERTY_CHARKERNING
105 ,PROPERTY_PRINTREPEATEDVALUES
106 ,PROPERTY_CONDITIONALPRINTEXPRESSION
107 ,PROPERTY_PRINTWHENGROUPCHANGE
108 ,PROPERTY_MASTERFIELDS
109 ,PROPERTY_DETAILFIELDS
110 ,PROPERTY_PARAADJUST
112 , PROPERTY_CHAREMPHASISASIAN
113 , PROPERTY_CHARFONTNAMEASIAN
114 , PROPERTY_CHARFONTSTYLENAMEASIAN
115 , PROPERTY_CHARFONTFAMILYASIAN
116 , PROPERTY_CHARFONTCHARSETASIAN
117 , PROPERTY_CHARFONTPITCHASIAN
118 , PROPERTY_CHARHEIGHTASIAN
119 , PROPERTY_CHARUNDERLINEASIAN
120 , PROPERTY_CHARWEIGHTASIAN
121 , PROPERTY_CHARPOSTUREASIAN
122 , PROPERTY_CHARWORDMODEASIAN
123 , PROPERTY_CHARROTATIONASIAN
124 , PROPERTY_CHARSCALEWIDTHASIAN
125 , PROPERTY_CHARLOCALEASIAN
126 , PROPERTY_CHAREMPHASISCOMPLEX
127 , PROPERTY_CHARFONTNAMECOMPLEX
128 , PROPERTY_CHARFONTSTYLENAMECOMPLEX
129 , PROPERTY_CHARFONTFAMILYCOMPLEX
130 , PROPERTY_CHARFONTCHARSETCOMPLEX
131 , PROPERTY_CHARFONTPITCHCOMPLEX
132 , PROPERTY_CHARHEIGHTCOMPLEX
133 , PROPERTY_CHARUNDERLINECOMPLEX
134 , PROPERTY_CHARWEIGHTCOMPLEX
135 , PROPERTY_CHARPOSTURECOMPLEX
136 , PROPERTY_CHARWORDMODECOMPLEX
137 , PROPERTY_CHARROTATIONCOMPLEX
138 , PROPERTY_CHARSCALEWIDTHCOMPLEX
139 , PROPERTY_CHARLOCALECOMPLEX
143 return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
145 DBG_NAME(rpt_OFixedLine)
146 // -----------------------------------------------------------------------------
147 OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContext)
148 :FixedLineBase(m_aMutex)
149 ,FixedLinePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getLineOptionals())
150 ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
151 ,m_nOrientation(1)
152 ,m_LineColor(0)
153 ,m_LineTransparence(0)
154 ,m_LineWidth(0)
156 DBG_CTOR(rpt_OFixedLine,NULL);
157 m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
158 m_aProps.aComponent.m_nWidth = MIN_WIDTH;
160 // -----------------------------------------------------------------------------
161 OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContext
162 ,const uno::Reference< lang::XMultiServiceFactory>& _xFactory
163 ,uno::Reference< drawing::XShape >& _xShape
164 ,sal_Int32 _nOrientation)
165 :FixedLineBase(m_aMutex)
166 ,FixedLinePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getLineOptionals())
167 ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
168 ,m_nOrientation(_nOrientation)
169 ,m_LineColor(0)
170 ,m_LineTransparence(0)
171 ,m_LineWidth(0)
173 DBG_CTOR(rpt_OFixedLine,NULL);
174 m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
175 m_aProps.aComponent.m_xFactory = _xFactory;
176 osl_incrementInterlockedCount( &m_refCount );
179 awt::Size aSize = _xShape->getSize();
180 if ( m_nOrientation == 1 )
182 if ( aSize.Width < MIN_WIDTH )
184 aSize.Width = MIN_WIDTH;
185 _xShape->setSize(aSize);
188 else if ( MIN_HEIGHT > aSize.Height )
190 aSize.Height = MIN_HEIGHT;
191 _xShape->setSize(aSize);
193 m_aProps.aComponent.setShape(_xShape,this,m_refCount);
195 catch(uno::Exception&)
197 OSL_ENSURE(0,"OFixedLine::OFixedLine: Exception caught!");
199 osl_decrementInterlockedCount( &m_refCount );
201 // -----------------------------------------------------------------------------
202 OFixedLine::~OFixedLine()
204 DBG_DTOR(rpt_OFixedLine,NULL);
206 // -----------------------------------------------------------------------------
207 //IMPLEMENT_FORWARD_XINTERFACE2(OFixedLine,FixedLineBase,FixedLinePropertySet)
208 IMPLEMENT_FORWARD_REFCOUNT( OFixedLine, FixedLineBase )
209 // --------------------------------------------------------------------------------
210 uno::Any SAL_CALL OFixedLine::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException)
212 uno::Any aReturn = FixedLineBase::queryInterface(_rType);
213 if ( !aReturn.hasValue() )
214 aReturn = FixedLinePropertySet::queryInterface(_rType);
215 if ( !aReturn.hasValue() && OReportControlModel::isInterfaceForbidden(_rType) )
216 return aReturn;
218 return aReturn.hasValue() ? aReturn : (m_aProps.aComponent.m_xProxy.is() ? m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
220 // -----------------------------------------------------------------------------
221 void SAL_CALL OFixedLine::dispose() throw(uno::RuntimeException)
223 FixedLinePropertySet::dispose();
224 cppu::WeakComponentImplHelperBase::dispose();
226 // -----------------------------------------------------------------------------
227 ::rtl::OUString OFixedLine::getImplementationName_Static( ) throw(uno::RuntimeException)
229 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.OFixedLine"));
232 //--------------------------------------------------------------------------
233 ::rtl::OUString SAL_CALL OFixedLine::getImplementationName( ) throw(uno::RuntimeException)
235 return getImplementationName_Static();
237 //--------------------------------------------------------------------------
238 uno::Sequence< ::rtl::OUString > OFixedLine::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
240 uno::Sequence< ::rtl::OUString > aServices(1);
241 aServices.getArray()[0] = SERVICE_FIXEDLINE;
243 return aServices;
245 //------------------------------------------------------------------------------
246 uno::Reference< uno::XInterface > OFixedLine::create(uno::Reference< uno::XComponentContext > const & xContext)
248 return *(new OFixedLine(xContext));
251 //--------------------------------------------------------------------------
252 uno::Sequence< ::rtl::OUString > SAL_CALL OFixedLine::getSupportedServiceNames( ) throw(uno::RuntimeException)
254 return getSupportedServiceNames_Static();
256 //------------------------------------------------------------------------------
257 sal_Bool SAL_CALL OFixedLine::supportsService(const ::rtl::OUString& ServiceName) throw( uno::RuntimeException )
259 return ::comphelper::existsValue(ServiceName,getSupportedServiceNames_Static());
261 // -----------------------------------------------------------------------------
262 // XReportComponent
263 REPORTCOMPONENT_IMPL3(OFixedLine,m_aProps.aComponent)
264 REPORTCOMPONENT_NOMASTERDETAIL(OFixedLine)
265 // -----------------------------------------------------------------------------
266 ::sal_Int16 SAL_CALL OFixedLine::getControlBorder( ) throw (beans::UnknownPropertyException, uno::RuntimeException)
268 throw beans::UnknownPropertyException();
270 // -----------------------------------------------------------------------------
271 void SAL_CALL OFixedLine::setControlBorder( ::sal_Int16 /*_border*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
273 throw beans::UnknownPropertyException();
275 // -----------------------------------------------------------------------------
276 ::sal_Int32 SAL_CALL OFixedLine::getControlBorderColor() throw (beans::UnknownPropertyException,uno::RuntimeException)
278 throw beans::UnknownPropertyException();
280 // -----------------------------------------------------------------------------
281 void SAL_CALL OFixedLine::setControlBorderColor( ::sal_Int32 /*_bordercolor*/ ) throw (beans::UnknownPropertyException,lang::IllegalArgumentException,uno::RuntimeException)
283 throw beans::UnknownPropertyException();
285 // -----------------------------------------------------------------------------
286 uno::Reference< beans::XPropertySetInfo > SAL_CALL OFixedLine::getPropertySetInfo( ) throw(uno::RuntimeException)
288 return FixedLinePropertySet::getPropertySetInfo();
290 // -----------------------------------------------------------------------------
291 void SAL_CALL OFixedLine::setPropertyValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
293 FixedLinePropertySet::setPropertyValue( aPropertyName, aValue );
295 // -----------------------------------------------------------------------------
296 uno::Any SAL_CALL OFixedLine::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
298 return FixedLinePropertySet::getPropertyValue( PropertyName);
300 // -----------------------------------------------------------------------------
301 void SAL_CALL OFixedLine::addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
303 FixedLinePropertySet::addPropertyChangeListener( aPropertyName, xListener );
305 // -----------------------------------------------------------------------------
306 void SAL_CALL OFixedLine::removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
308 FixedLinePropertySet::removePropertyChangeListener( aPropertyName, aListener );
310 // -----------------------------------------------------------------------------
311 void SAL_CALL OFixedLine::addVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
313 FixedLinePropertySet::addVetoableChangeListener( PropertyName, aListener );
315 // -----------------------------------------------------------------------------
316 void SAL_CALL OFixedLine::removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
318 FixedLinePropertySet::removeVetoableChangeListener( PropertyName, aListener );
320 // -----------------------------------------------------------------------------
321 // XReportControlModel
322 ::rtl::OUString SAL_CALL OFixedLine::getDataField() throw (beans::UnknownPropertyException, uno::RuntimeException)
324 throw beans::UnknownPropertyException();
326 // -----------------------------------------------------------------------------
327 void SAL_CALL OFixedLine::setDataField( const ::rtl::OUString& /*_datafield*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
329 throw beans::UnknownPropertyException();
331 // -----------------------------------------------------------------------------
332 ::sal_Int32 SAL_CALL OFixedLine::getControlBackground() throw (beans::UnknownPropertyException, uno::RuntimeException)
334 throw beans::UnknownPropertyException();
336 // -----------------------------------------------------------------------------
337 void SAL_CALL OFixedLine::setControlBackground( ::sal_Int32 /*_backgroundcolor*/ ) throw (uno::RuntimeException,beans::UnknownPropertyException)
339 throw beans::UnknownPropertyException();
341 // -----------------------------------------------------------------------------
342 ::sal_Bool SAL_CALL OFixedLine::getControlBackgroundTransparent() throw (beans::UnknownPropertyException, uno::RuntimeException)
344 throw beans::UnknownPropertyException();
346 // -----------------------------------------------------------------------------
347 void SAL_CALL OFixedLine::setControlBackgroundTransparent( ::sal_Bool /*_controlbackgroundtransparent*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
349 throw beans::UnknownPropertyException();
351 // -----------------------------------------------------------------------------
352 ::sal_Bool SAL_CALL OFixedLine::getPrintWhenGroupChange() throw (beans::UnknownPropertyException, uno::RuntimeException)
354 throw beans::UnknownPropertyException();
356 // -----------------------------------------------------------------------------
357 void SAL_CALL OFixedLine::setPrintWhenGroupChange( ::sal_Bool /*_printwhengroupchange*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
359 throw beans::UnknownPropertyException();
361 // -----------------------------------------------------------------------------
362 ::rtl::OUString SAL_CALL OFixedLine::getConditionalPrintExpression() throw (beans::UnknownPropertyException, uno::RuntimeException)
364 throw beans::UnknownPropertyException();
366 // -----------------------------------------------------------------------------
367 void SAL_CALL OFixedLine::setConditionalPrintExpression( const ::rtl::OUString& /*_conditionalprintexpression*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
369 throw beans::UnknownPropertyException();
371 // -----------------------------------------------------------------------------
372 // XCloneable
373 uno::Reference< util::XCloneable > SAL_CALL OFixedLine::createClone( ) throw (uno::RuntimeException)
375 uno::Reference< report::XReportComponent> xSource = this;
376 uno::Reference< report::XFixedLine> xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_FIXEDLINE),uno::UNO_QUERY_THROW);
377 return xSet.get();
379 // -----------------------------------------------------------------------------
381 // XFixedLine
382 // -----------------------------------------------------------------------------
383 ::sal_Int32 SAL_CALL OFixedLine::getOrientation() throw (beans::UnknownPropertyException,uno::RuntimeException)
385 ::osl::MutexGuard aGuard(m_aMutex);
386 return m_nOrientation;
388 // -----------------------------------------------------------------------------
389 void SAL_CALL OFixedLine::setOrientation( ::sal_Int32 _orientation ) throw (beans::UnknownPropertyException,uno::RuntimeException)
391 set(PROPERTY_ORIENTATION,_orientation,m_nOrientation);
393 // -----------------------------------------------------------------------------
394 drawing::LineStyle SAL_CALL OFixedLine::getLineStyle() throw (uno::RuntimeException)
396 ::osl::MutexGuard aGuard(m_aMutex);
397 return m_LineStyle;
399 // -----------------------------------------------------------------------------
400 void SAL_CALL OFixedLine::setLineStyle( drawing::LineStyle _linestyle ) throw (uno::RuntimeException)
402 set(PROPERTY_LINESTYLE,_linestyle,m_LineStyle);
404 // -----------------------------------------------------------------------------
405 drawing::LineDash SAL_CALL OFixedLine::getLineDash() throw (uno::RuntimeException)
407 ::osl::MutexGuard aGuard(m_aMutex);
408 return m_LineDash;
410 // -----------------------------------------------------------------------------
411 void SAL_CALL OFixedLine::setLineDash( const drawing::LineDash& _linedash ) throw (uno::RuntimeException)
413 set(PROPERTY_LINEDASH,_linedash,m_LineDash);
415 // -----------------------------------------------------------------------------
416 ::sal_Int32 SAL_CALL OFixedLine::getLineColor() throw (uno::RuntimeException)
418 ::osl::MutexGuard aGuard(m_aMutex);
419 return m_LineColor;
421 // -----------------------------------------------------------------------------
422 void SAL_CALL OFixedLine::setLineColor( ::sal_Int32 _linecolor ) throw (uno::RuntimeException)
424 set(PROPERTY_LINECOLOR,_linecolor,m_LineColor);
426 // -----------------------------------------------------------------------------
427 ::sal_Int16 SAL_CALL OFixedLine::getLineTransparence() throw (uno::RuntimeException)
429 ::osl::MutexGuard aGuard(m_aMutex);
430 return m_LineTransparence;
432 // -----------------------------------------------------------------------------
433 void SAL_CALL OFixedLine::setLineTransparence( ::sal_Int16 _linetransparence ) throw (uno::RuntimeException)
435 set(PROPERTY_LINETRANSPARENCE,_linetransparence,m_LineTransparence);
437 // -----------------------------------------------------------------------------
438 ::sal_Int32 SAL_CALL OFixedLine::getLineWidth() throw (uno::RuntimeException)
440 ::osl::MutexGuard aGuard(m_aMutex);
441 return m_LineWidth;
443 // -----------------------------------------------------------------------------
444 void SAL_CALL OFixedLine::setLineWidth( ::sal_Int32 _linewidth ) throw (uno::RuntimeException)
446 set(PROPERTY_LINEWIDTH,_linewidth,m_LineWidth);
448 // -----------------------------------------------------------------------------
449 // -----------------------------------------------------------------------------
450 // XChild
451 uno::Reference< uno::XInterface > SAL_CALL OFixedLine::getParent( ) throw (uno::RuntimeException)
453 return OShapeHelper::getParent(this);
455 // -----------------------------------------------------------------------------
456 void SAL_CALL OFixedLine::setParent( const uno::Reference< uno::XInterface >& Parent ) throw (lang::NoSupportException, uno::RuntimeException)
458 OShapeHelper::setParent(Parent,this);
460 // -----------------------------------------------------------------------------
461 uno::Reference< report::XFormatCondition > SAL_CALL OFixedLine::createFormatCondition( ) throw (uno::Exception, uno::RuntimeException)
463 return new OFormatCondition(m_aProps.aComponent.m_xContext);
465 // -----------------------------------------------------------------------------
466 // XContainer
467 void SAL_CALL OFixedLine::addContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
469 m_aProps.addContainerListener(xListener);
471 // -----------------------------------------------------------------------------
472 void SAL_CALL OFixedLine::removeContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
474 m_aProps.removeContainerListener(xListener);
476 // -----------------------------------------------------------------------------
477 // XElementAccess
478 uno::Type SAL_CALL OFixedLine::getElementType( ) throw (uno::RuntimeException)
480 return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
482 // -----------------------------------------------------------------------------
483 ::sal_Bool SAL_CALL OFixedLine::hasElements( ) throw (uno::RuntimeException)
485 return m_aProps.hasElements();
487 // -----------------------------------------------------------------------------
488 // XIndexContainer
489 void SAL_CALL OFixedLine::insertByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
491 m_aProps.insertByIndex(Index,Element);
493 // -----------------------------------------------------------------------------
494 void SAL_CALL OFixedLine::removeByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
496 m_aProps.removeByIndex(Index);
498 // -----------------------------------------------------------------------------
499 // XIndexReplace
500 void SAL_CALL OFixedLine::replaceByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
502 m_aProps.replaceByIndex(Index,Element);
504 // -----------------------------------------------------------------------------
505 // XIndexAccess
506 ::sal_Int32 SAL_CALL OFixedLine::getCount( ) throw (uno::RuntimeException)
508 return m_aProps.getCount();
510 // -----------------------------------------------------------------------------
511 uno::Any SAL_CALL OFixedLine::getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
513 return m_aProps.getByIndex( Index );
515 // -----------------------------------------------------------------------------
516 // XShape
517 awt::Point SAL_CALL OFixedLine::getPosition( ) throw (uno::RuntimeException)
519 return OShapeHelper::getPosition(this);
521 // -----------------------------------------------------------------------------
522 void SAL_CALL OFixedLine::setPosition( const awt::Point& aPosition ) throw (uno::RuntimeException)
524 OShapeHelper::setPosition(aPosition,this);
526 // -----------------------------------------------------------------------------
527 awt::Size SAL_CALL OFixedLine::getSize( ) throw (uno::RuntimeException)
529 return OShapeHelper::getSize(this);
531 // -----------------------------------------------------------------------------
532 void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::PropertyVetoException, uno::RuntimeException)
534 if ( (aSize.Width < MIN_WIDTH && m_nOrientation == 1) || (aSize.Height < MIN_HEIGHT && m_nOrientation == 0) )
535 throw beans::PropertyVetoException();
536 OShapeHelper::setSize(aSize,this);
538 // -----------------------------------------------------------------------------
539 // XShapeDescriptor
540 ::rtl::OUString SAL_CALL OFixedLine::getShapeType( ) throw (uno::RuntimeException)
542 ::osl::MutexGuard aGuard(m_aMutex);
543 if ( m_aProps.aComponent.m_xShape.is() )
544 return m_aProps.aComponent.m_xShape->getShapeType();
545 return ::rtl::OUString();
547 // -----------------------------------------------------------------------------
548 ::rtl::OUString SAL_CALL OFixedLine::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException)
550 throw beans::UnknownPropertyException();
552 void SAL_CALL OFixedLine::setHyperLinkURL(const ::rtl::OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException)
554 throw beans::UnknownPropertyException();
556 ::rtl::OUString SAL_CALL OFixedLine::getHyperLinkTarget() throw (uno::RuntimeException, beans::UnknownPropertyException)
558 throw beans::UnknownPropertyException();
560 void SAL_CALL OFixedLine::setHyperLinkTarget(const ::rtl::OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException)
562 throw beans::UnknownPropertyException();
564 ::rtl::OUString SAL_CALL OFixedLine::getHyperLinkName() throw (uno::RuntimeException, beans::UnknownPropertyException)
566 throw beans::UnknownPropertyException();
568 void SAL_CALL OFixedLine::setHyperLinkName(const ::rtl::OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException)
570 throw beans::UnknownPropertyException();
573 NO_REPORTCONTROLFORMAT_IMPL(OFixedLine)
575 ::sal_Bool SAL_CALL OFixedLine::getPrintRepeatedValues() throw (beans::UnknownPropertyException, uno::RuntimeException)
577 throw beans::UnknownPropertyException();
579 void SAL_CALL OFixedLine::setPrintRepeatedValues( ::sal_Bool /*_printrepeatedvalues*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
581 throw beans::UnknownPropertyException();
584 // -----------------------------------------------------------------------------
585 // =============================================================================
586 } // namespace reportdesign
587 // =============================================================================