1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #include "precompiled_reportdesign.hxx"
24 #include "FixedLine.hxx"
25 #include <com/sun/star/beans/PropertyAttribute.hpp>
26 #ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
27 #include "corestrings.hrc"
28 #endif
29 #ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
30 #include "core_resource.hrc"
31 #endif
32 #include "core_resource.hxx"
33 #include <comphelper/sequence.hxx>
34 #include <tools/debug.hxx>
35 #include <comphelper/property.hxx>
36 #include "Tools.hxx"
37 #include "FormatCondition.hxx"
38 #include <com/sun/star/beans/XPropertyState.hpp>
39 #include <com/sun/star/text/ParagraphVertAlign.hpp>
40 #include <boost/bind.hpp>
41 #include "ReportHelperImpl.hxx"
42 
43 #define MIN_WIDTH   80
44 #define MIN_HEIGHT  20
45 // =============================================================================
46 namespace reportdesign
47 {
48 // =============================================================================
49 	using namespace com::sun::star;
50 	using namespace comphelper;
lcl_getLineOptionals()51 uno::Sequence< ::rtl::OUString > lcl_getLineOptionals()
52 {
53 	::rtl::OUString pProps[] = {
54 			 PROPERTY_DATAFIELD
55 			,PROPERTY_DEFAULTCONTROL
56 			,PROPERTY_CONTROLBORDER
57             ,PROPERTY_CONTROLBORDERCOLOR
58             ,PROPERTY_CHARCOLOR
59             ,PROPERTY_CHAREMPHASIS
60             ,PROPERTY_CHARFONTCHARSET
61             ,PROPERTY_CHARFONTFAMILY
62             ,PROPERTY_CHARFONTNAME
63             ,PROPERTY_CHARFONTPITCH
64             ,PROPERTY_CHARFONTSTYLENAME
65             ,PROPERTY_CHARHEIGHT
66             ,PROPERTY_CHARPOSTURE
67             ,PROPERTY_CHARRELIEF
68             ,PROPERTY_FONTDESCRIPTOR
69             ,PROPERTY_FONTDESCRIPTORASIAN
70             ,PROPERTY_FONTDESCRIPTORCOMPLEX
71             ,PROPERTY_CONTROLTEXTEMPHASISMARK
72             ,PROPERTY_CHARROTATION
73             ,PROPERTY_CHARSCALEWIDTH
74             ,PROPERTY_CHARSTRIKEOUT
75             ,PROPERTY_CHARUNDERLINECOLOR
76             ,PROPERTY_CHARUNDERLINE
77             ,PROPERTY_CHARWEIGHT
78             ,PROPERTY_CHARWORDMODE
79             ,PROPERTY_CONTROLBACKGROUND
80             ,PROPERTY_CONTROLBACKGROUNDTRANSPARENT
81             ,PROPERTY_CHARFLASH
82             ,PROPERTY_CHARAUTOKERNING
83             ,PROPERTY_CHARESCAPEMENTHEIGHT
84             ,PROPERTY_CHARLOCALE
85             ,PROPERTY_CHARESCAPEMENT
86             ,PROPERTY_CHARCASEMAP
87             ,PROPERTY_CHARCOMBINEISON
88             ,PROPERTY_CHARCOMBINEPREFIX
89             ,PROPERTY_CHARCOMBINESUFFIX
90             ,PROPERTY_CHARHIDDEN
91             ,PROPERTY_CHARSHADOWED
92             ,PROPERTY_CHARCONTOURED
93             ,PROPERTY_HYPERLINKURL
94             ,PROPERTY_HYPERLINKTARGET
95             ,PROPERTY_HYPERLINKNAME
96             ,PROPERTY_VISITEDCHARSTYLENAME
97             ,PROPERTY_UNVISITEDCHARSTYLENAME
98             ,PROPERTY_CHARKERNING
99             ,PROPERTY_PRINTREPEATEDVALUES
100             ,PROPERTY_CONDITIONALPRINTEXPRESSION
101             ,PROPERTY_PRINTWHENGROUPCHANGE
102             ,PROPERTY_MASTERFIELDS
103             ,PROPERTY_DETAILFIELDS
104             ,PROPERTY_PARAADJUST
105 
106             , PROPERTY_CHAREMPHASISASIAN
107             , PROPERTY_CHARFONTNAMEASIAN
108             , PROPERTY_CHARFONTSTYLENAMEASIAN
109             , PROPERTY_CHARFONTFAMILYASIAN
110             , PROPERTY_CHARFONTCHARSETASIAN
111             , PROPERTY_CHARFONTPITCHASIAN
112             , PROPERTY_CHARHEIGHTASIAN
113             , PROPERTY_CHARUNDERLINEASIAN
114             , PROPERTY_CHARWEIGHTASIAN
115             , PROPERTY_CHARPOSTUREASIAN
116             , PROPERTY_CHARWORDMODEASIAN
117             , PROPERTY_CHARROTATIONASIAN
118             , PROPERTY_CHARSCALEWIDTHASIAN
119             , PROPERTY_CHARLOCALEASIAN
120             , PROPERTY_CHAREMPHASISCOMPLEX
121             , PROPERTY_CHARFONTNAMECOMPLEX
122             , PROPERTY_CHARFONTSTYLENAMECOMPLEX
123             , PROPERTY_CHARFONTFAMILYCOMPLEX
124             , PROPERTY_CHARFONTCHARSETCOMPLEX
125             , PROPERTY_CHARFONTPITCHCOMPLEX
126             , PROPERTY_CHARHEIGHTCOMPLEX
127             , PROPERTY_CHARUNDERLINECOMPLEX
128             , PROPERTY_CHARWEIGHTCOMPLEX
129             , PROPERTY_CHARPOSTURECOMPLEX
130             , PROPERTY_CHARWORDMODECOMPLEX
131             , PROPERTY_CHARROTATIONCOMPLEX
132             , PROPERTY_CHARSCALEWIDTHCOMPLEX
133             , PROPERTY_CHARLOCALECOMPLEX
134 
135 
136 	};
137 	return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
138 }
DBG_NAME(rpt_OFixedLine)139 DBG_NAME(rpt_OFixedLine)
140 // -----------------------------------------------------------------------------
141 OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContext)
142 :FixedLineBase(m_aMutex)
143 ,FixedLinePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getLineOptionals())
144 ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
145 ,m_nOrientation(1)
146 ,m_LineColor(0)
147 ,m_LineTransparence(0)
148 ,m_LineWidth(0)
149 {
150 	DBG_CTOR(rpt_OFixedLine,NULL);
151 	m_aProps.aComponent.m_sName  = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
152     m_aProps.aComponent.m_nWidth = MIN_WIDTH;
153 }
154 // -----------------------------------------------------------------------------
OFixedLine(uno::Reference<uno::XComponentContext> const & _xContext,const uno::Reference<lang::XMultiServiceFactory> & _xFactory,uno::Reference<drawing::XShape> & _xShape,sal_Int32 _nOrientation)155 OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContext
156                        ,const uno::Reference< lang::XMultiServiceFactory>& _xFactory
157                        ,uno::Reference< drawing::XShape >& _xShape
158                        ,sal_Int32 _nOrientation)
159 :FixedLineBase(m_aMutex)
160 ,FixedLinePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getLineOptionals())
161 ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
162 ,m_nOrientation(_nOrientation)
163 ,m_LineColor(0)
164 ,m_LineTransparence(0)
165 ,m_LineWidth(0)
166 {
167 	DBG_CTOR(rpt_OFixedLine,NULL);
168 	m_aProps.aComponent.m_sName  = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
169     m_aProps.aComponent.m_xFactory = _xFactory;
170     osl_incrementInterlockedCount( &m_refCount );
171     try
172     {
173         awt::Size aSize = _xShape->getSize();
174         if ( m_nOrientation == 1 )
175         {
176             if ( aSize.Width < MIN_WIDTH )
177             {
178                 aSize.Width = MIN_WIDTH;
179                 _xShape->setSize(aSize);
180             }
181         }
182         else if ( MIN_HEIGHT > aSize.Height )
183         {
184             aSize.Height = MIN_HEIGHT;
185             _xShape->setSize(aSize);
186         }
187         m_aProps.aComponent.setShape(_xShape,this,m_refCount);
188     }
189     catch(uno::Exception&)
190     {
191         OSL_ENSURE(0,"OFixedLine::OFixedLine: Exception caught!");
192     }
193     osl_decrementInterlockedCount( &m_refCount );
194 }
195 // -----------------------------------------------------------------------------
~OFixedLine()196 OFixedLine::~OFixedLine()
197 {
198     DBG_DTOR(rpt_OFixedLine,NULL);
199 }
200 // -----------------------------------------------------------------------------
201 //IMPLEMENT_FORWARD_XINTERFACE2(OFixedLine,FixedLineBase,FixedLinePropertySet)
IMPLEMENT_FORWARD_REFCOUNT(OFixedLine,FixedLineBase)202 IMPLEMENT_FORWARD_REFCOUNT( OFixedLine, FixedLineBase )
203 // --------------------------------------------------------------------------------
204 uno::Any SAL_CALL OFixedLine::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException)
205 {
206 	uno::Any aReturn = FixedLineBase::queryInterface(_rType);
207     if ( !aReturn.hasValue() )
208         aReturn = FixedLinePropertySet::queryInterface(_rType);
209     if ( !aReturn.hasValue() && OReportControlModel::isInterfaceForbidden(_rType) )
210         return aReturn;
211 
212 	return aReturn.hasValue() ? aReturn : (m_aProps.aComponent.m_xProxy.is() ? m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
213 }
214 // -----------------------------------------------------------------------------
dispose()215 void SAL_CALL OFixedLine::dispose() throw(uno::RuntimeException)
216 {
217 	FixedLinePropertySet::dispose();
218 	cppu::WeakComponentImplHelperBase::dispose();
219 }
220 // -----------------------------------------------------------------------------
getImplementationName_Static()221 ::rtl::OUString OFixedLine::getImplementationName_Static(  ) throw(uno::RuntimeException)
222 {
223 	return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.OFixedLine"));
224 }
225 
226 //--------------------------------------------------------------------------
getImplementationName()227 ::rtl::OUString SAL_CALL OFixedLine::getImplementationName(  ) throw(uno::RuntimeException)
228 {
229 	return getImplementationName_Static();
230 }
231 //--------------------------------------------------------------------------
getSupportedServiceNames_Static()232 uno::Sequence< ::rtl::OUString > OFixedLine::getSupportedServiceNames_Static(  ) throw(uno::RuntimeException)
233 {
234 	uno::Sequence< ::rtl::OUString > aServices(1);
235 	aServices.getArray()[0] = SERVICE_FIXEDLINE;
236 
237 	return aServices;
238 }
239 //------------------------------------------------------------------------------
create(uno::Reference<uno::XComponentContext> const & xContext)240 uno::Reference< uno::XInterface > OFixedLine::create(uno::Reference< uno::XComponentContext > const & xContext)
241 {
242 	return *(new OFixedLine(xContext));
243 }
244 
245 //--------------------------------------------------------------------------
getSupportedServiceNames()246 uno::Sequence< ::rtl::OUString > SAL_CALL OFixedLine::getSupportedServiceNames(  ) throw(uno::RuntimeException)
247 {
248 	return getSupportedServiceNames_Static();
249 }
250 //------------------------------------------------------------------------------
supportsService(const::rtl::OUString & ServiceName)251 sal_Bool SAL_CALL OFixedLine::supportsService(const ::rtl::OUString& ServiceName) throw( uno::RuntimeException )
252 {
253 	return ::comphelper::existsValue(ServiceName,getSupportedServiceNames_Static());
254 }
255 // -----------------------------------------------------------------------------
256 // XReportComponent
257 REPORTCOMPONENT_IMPL3(OFixedLine,m_aProps.aComponent)
REPORTCOMPONENT_NOMASTERDETAIL(OFixedLine)258 REPORTCOMPONENT_NOMASTERDETAIL(OFixedLine)
259 // -----------------------------------------------------------------------------
260 ::sal_Int16  SAL_CALL OFixedLine::getControlBorder( ) throw (beans::UnknownPropertyException, uno::RuntimeException)
261 {
262 	throw beans::UnknownPropertyException();
263 }
264 // -----------------------------------------------------------------------------
setControlBorder(::sal_Int16)265 void SAL_CALL OFixedLine::setControlBorder( ::sal_Int16 /*_border*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
266 {
267 	throw beans::UnknownPropertyException();
268 }
269 // -----------------------------------------------------------------------------
getControlBorderColor()270 ::sal_Int32 SAL_CALL OFixedLine::getControlBorderColor() throw (beans::UnknownPropertyException,uno::RuntimeException)
271 {
272 	throw beans::UnknownPropertyException();
273 }
274 // -----------------------------------------------------------------------------
setControlBorderColor(::sal_Int32)275 void SAL_CALL OFixedLine::setControlBorderColor( ::sal_Int32 /*_bordercolor*/ ) throw (beans::UnknownPropertyException,lang::IllegalArgumentException,uno::RuntimeException)
276 {
277 	throw beans::UnknownPropertyException();
278 }
279 // -----------------------------------------------------------------------------
getPropertySetInfo()280 uno::Reference< beans::XPropertySetInfo > SAL_CALL OFixedLine::getPropertySetInfo(  ) throw(uno::RuntimeException)
281 {
282 	return FixedLinePropertySet::getPropertySetInfo();
283 }
284 // -----------------------------------------------------------------------------
setPropertyValue(const::rtl::OUString & aPropertyName,const uno::Any & aValue)285 void SAL_CALL OFixedLine::setPropertyValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
286 {
287 	FixedLinePropertySet::setPropertyValue( aPropertyName, aValue );
288 }
289 // -----------------------------------------------------------------------------
getPropertyValue(const::rtl::OUString & PropertyName)290 uno::Any SAL_CALL OFixedLine::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
291 {
292 	return FixedLinePropertySet::getPropertyValue( PropertyName);
293 }
294 // -----------------------------------------------------------------------------
addPropertyChangeListener(const::rtl::OUString & aPropertyName,const uno::Reference<beans::XPropertyChangeListener> & xListener)295 void SAL_CALL OFixedLine::addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
296 {
297 	FixedLinePropertySet::addPropertyChangeListener( aPropertyName, xListener );
298 }
299 // -----------------------------------------------------------------------------
removePropertyChangeListener(const::rtl::OUString & aPropertyName,const uno::Reference<beans::XPropertyChangeListener> & aListener)300 void SAL_CALL OFixedLine::removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
301 {
302 	FixedLinePropertySet::removePropertyChangeListener( aPropertyName, aListener );
303 }
304 // -----------------------------------------------------------------------------
addVetoableChangeListener(const::rtl::OUString & PropertyName,const uno::Reference<beans::XVetoableChangeListener> & aListener)305 void SAL_CALL OFixedLine::addVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
306 {
307 	FixedLinePropertySet::addVetoableChangeListener( PropertyName, aListener );
308 }
309 // -----------------------------------------------------------------------------
removeVetoableChangeListener(const::rtl::OUString & PropertyName,const uno::Reference<beans::XVetoableChangeListener> & aListener)310 void SAL_CALL OFixedLine::removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
311 {
312 	FixedLinePropertySet::removeVetoableChangeListener( PropertyName, aListener );
313 }
314 // -----------------------------------------------------------------------------
315 // XReportControlModel
getDataField()316 ::rtl::OUString SAL_CALL OFixedLine::getDataField() throw (beans::UnknownPropertyException, uno::RuntimeException)
317 {
318 	throw beans::UnknownPropertyException();
319 }
320 // -----------------------------------------------------------------------------
setDataField(const::rtl::OUString &)321 void SAL_CALL OFixedLine::setDataField( const ::rtl::OUString& /*_datafield*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
322 {
323 	throw beans::UnknownPropertyException();
324 }
325 // -----------------------------------------------------------------------------
getControlBackground()326 ::sal_Int32 SAL_CALL OFixedLine::getControlBackground() throw (beans::UnknownPropertyException, uno::RuntimeException)
327 {
328 	throw beans::UnknownPropertyException();
329 }
330 // -----------------------------------------------------------------------------
setControlBackground(::sal_Int32)331 void SAL_CALL OFixedLine::setControlBackground( ::sal_Int32 /*_backgroundcolor*/ ) throw (uno::RuntimeException,beans::UnknownPropertyException)
332 {
333     throw beans::UnknownPropertyException();
334 }
335 // -----------------------------------------------------------------------------
getControlBackgroundTransparent()336 ::sal_Bool SAL_CALL OFixedLine::getControlBackgroundTransparent() throw (beans::UnknownPropertyException, uno::RuntimeException)
337 {
338     throw beans::UnknownPropertyException();
339 }
340 // -----------------------------------------------------------------------------
setControlBackgroundTransparent(::sal_Bool)341 void SAL_CALL OFixedLine::setControlBackgroundTransparent( ::sal_Bool /*_controlbackgroundtransparent*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
342 {
343     throw beans::UnknownPropertyException();
344 }
345 // -----------------------------------------------------------------------------
getPrintWhenGroupChange()346 ::sal_Bool SAL_CALL OFixedLine::getPrintWhenGroupChange() throw (beans::UnknownPropertyException, uno::RuntimeException)
347 {
348 	throw beans::UnknownPropertyException();
349 }
350 // -----------------------------------------------------------------------------
setPrintWhenGroupChange(::sal_Bool)351 void SAL_CALL OFixedLine::setPrintWhenGroupChange( ::sal_Bool /*_printwhengroupchange*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
352 {
353 	throw beans::UnknownPropertyException();
354 }
355 // -----------------------------------------------------------------------------
getConditionalPrintExpression()356 ::rtl::OUString SAL_CALL OFixedLine::getConditionalPrintExpression() throw (beans::UnknownPropertyException, uno::RuntimeException)
357 {
358 	throw beans::UnknownPropertyException();
359 }
360 // -----------------------------------------------------------------------------
setConditionalPrintExpression(const::rtl::OUString &)361 void SAL_CALL OFixedLine::setConditionalPrintExpression( const ::rtl::OUString& /*_conditionalprintexpression*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
362 {
363 	throw beans::UnknownPropertyException();
364 }
365 // -----------------------------------------------------------------------------
366 // XCloneable
createClone()367 uno::Reference< util::XCloneable > SAL_CALL OFixedLine::createClone(  ) throw (uno::RuntimeException)
368 {
369     uno::Reference< report::XReportComponent> xSource = this;
370     uno::Reference< report::XFixedLine> xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_FIXEDLINE),uno::UNO_QUERY_THROW);
371 	return xSet.get();
372 }
373 // -----------------------------------------------------------------------------
374 
375 // XFixedLine
376 // -----------------------------------------------------------------------------
getOrientation()377 ::sal_Int32 SAL_CALL OFixedLine::getOrientation() throw (beans::UnknownPropertyException,uno::RuntimeException)
378 {
379 	::osl::MutexGuard aGuard(m_aMutex);
380 	return m_nOrientation;
381 }
382 // -----------------------------------------------------------------------------
setOrientation(::sal_Int32 _orientation)383 void SAL_CALL OFixedLine::setOrientation( ::sal_Int32 _orientation ) throw (beans::UnknownPropertyException,uno::RuntimeException)
384 {
385 	set(PROPERTY_ORIENTATION,_orientation,m_nOrientation);
386 }
387 // -----------------------------------------------------------------------------
getLineStyle()388 drawing::LineStyle SAL_CALL OFixedLine::getLineStyle() throw (uno::RuntimeException)
389 {
390 	::osl::MutexGuard aGuard(m_aMutex);
391 	return m_LineStyle;
392 }
393 // -----------------------------------------------------------------------------
setLineStyle(drawing::LineStyle _linestyle)394 void SAL_CALL OFixedLine::setLineStyle( drawing::LineStyle _linestyle ) throw (uno::RuntimeException)
395 {
396 	set(PROPERTY_LINESTYLE,_linestyle,m_LineStyle);
397 }
398 // -----------------------------------------------------------------------------
getLineDash()399 drawing::LineDash SAL_CALL OFixedLine::getLineDash() throw (uno::RuntimeException)
400 {
401 	::osl::MutexGuard aGuard(m_aMutex);
402 	return m_LineDash;
403 }
404 // -----------------------------------------------------------------------------
setLineDash(const drawing::LineDash & _linedash)405 void SAL_CALL OFixedLine::setLineDash( const drawing::LineDash& _linedash ) throw (uno::RuntimeException)
406 {
407 	set(PROPERTY_LINEDASH,_linedash,m_LineDash);
408 }
409 // -----------------------------------------------------------------------------
getLineColor()410 ::sal_Int32 SAL_CALL OFixedLine::getLineColor() throw (uno::RuntimeException)
411 {
412 	::osl::MutexGuard aGuard(m_aMutex);
413 	return m_LineColor;
414 }
415 // -----------------------------------------------------------------------------
setLineColor(::sal_Int32 _linecolor)416 void SAL_CALL OFixedLine::setLineColor( ::sal_Int32 _linecolor ) throw (uno::RuntimeException)
417 {
418 	set(PROPERTY_LINECOLOR,_linecolor,m_LineColor);
419 }
420 // -----------------------------------------------------------------------------
getLineTransparence()421 ::sal_Int16 SAL_CALL OFixedLine::getLineTransparence() throw (uno::RuntimeException)
422 {
423 	::osl::MutexGuard aGuard(m_aMutex);
424 	return m_LineTransparence;
425 }
426 // -----------------------------------------------------------------------------
setLineTransparence(::sal_Int16 _linetransparence)427 void SAL_CALL OFixedLine::setLineTransparence( ::sal_Int16 _linetransparence ) throw (uno::RuntimeException)
428 {
429 	set(PROPERTY_LINETRANSPARENCE,_linetransparence,m_LineTransparence);
430 }
431 // -----------------------------------------------------------------------------
getLineWidth()432 ::sal_Int32 SAL_CALL OFixedLine::getLineWidth() throw (uno::RuntimeException)
433 {
434 	::osl::MutexGuard aGuard(m_aMutex);
435 	return m_LineWidth;
436 }
437 // -----------------------------------------------------------------------------
setLineWidth(::sal_Int32 _linewidth)438 void SAL_CALL OFixedLine::setLineWidth( ::sal_Int32 _linewidth ) throw (uno::RuntimeException)
439 {
440 	set(PROPERTY_LINEWIDTH,_linewidth,m_LineWidth);
441 }
442 // -----------------------------------------------------------------------------
443 // -----------------------------------------------------------------------------
444 // XChild
getParent()445 uno::Reference< uno::XInterface > SAL_CALL OFixedLine::getParent(  ) throw (uno::RuntimeException)
446 {
447 	return OShapeHelper::getParent(this);
448 }
449 // -----------------------------------------------------------------------------
setParent(const uno::Reference<uno::XInterface> & Parent)450 void SAL_CALL OFixedLine::setParent( const uno::Reference< uno::XInterface >& Parent ) throw (lang::NoSupportException, uno::RuntimeException)
451 {
452 	OShapeHelper::setParent(Parent,this);
453 }
454 // -----------------------------------------------------------------------------
createFormatCondition()455 uno::Reference< report::XFormatCondition > SAL_CALL OFixedLine::createFormatCondition(  ) throw (uno::Exception, uno::RuntimeException)
456 {
457 	return new OFormatCondition(m_aProps.aComponent.m_xContext);
458 }
459 // -----------------------------------------------------------------------------
460 // XContainer
addContainerListener(const uno::Reference<container::XContainerListener> & xListener)461 void SAL_CALL OFixedLine::addContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
462 {
463 	m_aProps.addContainerListener(xListener);
464 }
465 // -----------------------------------------------------------------------------
removeContainerListener(const uno::Reference<container::XContainerListener> & xListener)466 void SAL_CALL OFixedLine::removeContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
467 {
468 	m_aProps.removeContainerListener(xListener);
469 }
470 // -----------------------------------------------------------------------------
471 // XElementAccess
getElementType()472 uno::Type SAL_CALL OFixedLine::getElementType(  ) throw (uno::RuntimeException)
473 {
474 	return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
475 }
476 // -----------------------------------------------------------------------------
hasElements()477 ::sal_Bool SAL_CALL OFixedLine::hasElements(  ) throw (uno::RuntimeException)
478 {
479 	return m_aProps.hasElements();
480 }
481 // -----------------------------------------------------------------------------
482 // XIndexContainer
insertByIndex(::sal_Int32 Index,const uno::Any & Element)483 void SAL_CALL OFixedLine::insertByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
484 {
485     m_aProps.insertByIndex(Index,Element);
486 }
487 // -----------------------------------------------------------------------------
removeByIndex(::sal_Int32 Index)488 void SAL_CALL OFixedLine::removeByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
489 {
490     m_aProps.removeByIndex(Index);
491 }
492 // -----------------------------------------------------------------------------
493 // XIndexReplace
replaceByIndex(::sal_Int32 Index,const uno::Any & Element)494 void SAL_CALL OFixedLine::replaceByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
495 {
496     m_aProps.replaceByIndex(Index,Element);
497 }
498 // -----------------------------------------------------------------------------
499 // XIndexAccess
getCount()500 ::sal_Int32 SAL_CALL OFixedLine::getCount(  ) throw (uno::RuntimeException)
501 {
502 	return m_aProps.getCount();
503 }
504 // -----------------------------------------------------------------------------
getByIndex(::sal_Int32 Index)505 uno::Any SAL_CALL OFixedLine::getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
506 {
507     return m_aProps.getByIndex( Index );
508 }
509 // -----------------------------------------------------------------------------
510 // XShape
getPosition()511 awt::Point SAL_CALL OFixedLine::getPosition(  ) throw (uno::RuntimeException)
512 {
513 	return OShapeHelper::getPosition(this);
514 }
515 // -----------------------------------------------------------------------------
setPosition(const awt::Point & aPosition)516 void SAL_CALL OFixedLine::setPosition( const awt::Point& aPosition ) throw (uno::RuntimeException)
517 {
518     OShapeHelper::setPosition(aPosition,this);
519 }
520 // -----------------------------------------------------------------------------
getSize()521 awt::Size SAL_CALL OFixedLine::getSize(  ) throw (uno::RuntimeException)
522 {
523 	return OShapeHelper::getSize(this);
524 }
525 // -----------------------------------------------------------------------------
setSize(const awt::Size & aSize)526 void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::PropertyVetoException, uno::RuntimeException)
527 {
528     if ( (aSize.Width < MIN_WIDTH && m_nOrientation == 1) || (aSize.Height < MIN_HEIGHT && m_nOrientation == 0) )
529         throw beans::PropertyVetoException();
530     OShapeHelper::setSize(aSize,this);
531 }
532 // -----------------------------------------------------------------------------
533 // XShapeDescriptor
getShapeType()534 ::rtl::OUString SAL_CALL OFixedLine::getShapeType(  ) throw (uno::RuntimeException)
535 {
536 	return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
537 }
538 // -----------------------------------------------------------------------------
getHyperLinkURL()539 ::rtl::OUString SAL_CALL OFixedLine::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException)
540 {
541 	throw beans::UnknownPropertyException();
542 }
setHyperLinkURL(const::rtl::OUString &)543 void SAL_CALL OFixedLine::setHyperLinkURL(const ::rtl::OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException)
544 {
545 	throw beans::UnknownPropertyException();
546 }
getHyperLinkTarget()547 ::rtl::OUString SAL_CALL OFixedLine::getHyperLinkTarget() throw (uno::RuntimeException, beans::UnknownPropertyException)
548 {
549 	throw beans::UnknownPropertyException();
550 }
setHyperLinkTarget(const::rtl::OUString &)551 void SAL_CALL OFixedLine::setHyperLinkTarget(const ::rtl::OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException)
552 {
553 	throw beans::UnknownPropertyException();
554 }
getHyperLinkName()555 ::rtl::OUString SAL_CALL OFixedLine::getHyperLinkName() throw (uno::RuntimeException, beans::UnknownPropertyException)
556 {
557 	throw beans::UnknownPropertyException();
558 }
setHyperLinkName(const::rtl::OUString &)559 void SAL_CALL OFixedLine::setHyperLinkName(const ::rtl::OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException)
560 {
561 	throw beans::UnknownPropertyException();
562 }
563 
NO_REPORTCONTROLFORMAT_IMPL(OFixedLine)564 NO_REPORTCONTROLFORMAT_IMPL(OFixedLine)
565 
566 ::sal_Bool SAL_CALL OFixedLine::getPrintRepeatedValues() throw (beans::UnknownPropertyException, uno::RuntimeException)
567 {
568 	throw beans::UnknownPropertyException();
569 }
setPrintRepeatedValues(::sal_Bool)570 void SAL_CALL OFixedLine::setPrintRepeatedValues( ::sal_Bool /*_printrepeatedvalues*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
571 {
572 	throw beans::UnknownPropertyException();
573 }
574 
575 // -----------------------------------------------------------------------------
576 // =============================================================================
577 } // namespace reportdesign
578 // =============================================================================
579 
580