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