1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #include "FixedLine.hxx"
20 #include <com/sun/star/beans/PropertyAttribute.hpp>
21 #include "corestrings.hrc"
22 #include "core_resource.hrc"
23 #include "core_resource.hxx"
24 #include <tools/debug.hxx>
25 #include <comphelper/property.hxx>
26 #include <cppuhelper/supportsservice.hxx>
28 #include "FormatCondition.hxx"
29 #include <com/sun/star/beans/XPropertyState.hpp>
30 #include <com/sun/star/text/ParagraphVertAlign.hpp>
31 #include "ReportHelperImpl.hxx"
36 namespace reportdesign
39 using namespace com::sun::star
;
40 using namespace comphelper
;
41 uno::Sequence
< OUString
> lcl_getLineOptionals()
44 OUString(PROPERTY_DATAFIELD
)
45 ,OUString(PROPERTY_DEFAULTCONTROL
)
46 ,OUString(PROPERTY_CONTROLBORDER
)
47 ,OUString(PROPERTY_CONTROLBORDERCOLOR
)
48 ,OUString(PROPERTY_CHARCOLOR
)
49 ,OUString(PROPERTY_CHAREMPHASIS
)
50 ,OUString(PROPERTY_CHARFONTCHARSET
)
51 ,OUString(PROPERTY_CHARFONTFAMILY
)
52 ,OUString(PROPERTY_CHARFONTNAME
)
53 ,OUString(PROPERTY_CHARFONTPITCH
)
54 ,OUString(PROPERTY_CHARFONTSTYLENAME
)
55 ,OUString(PROPERTY_CHARHEIGHT
)
56 ,OUString(PROPERTY_CHARPOSTURE
)
57 ,OUString(PROPERTY_CHARRELIEF
)
58 ,OUString(PROPERTY_FONTDESCRIPTOR
)
59 ,OUString(PROPERTY_FONTDESCRIPTORASIAN
)
60 ,OUString(PROPERTY_FONTDESCRIPTORCOMPLEX
)
61 ,OUString(PROPERTY_CONTROLTEXTEMPHASISMARK
)
62 ,OUString(PROPERTY_CHARROTATION
)
63 ,OUString(PROPERTY_CHARSCALEWIDTH
)
64 ,OUString(PROPERTY_CHARSTRIKEOUT
)
65 ,OUString(PROPERTY_CHARUNDERLINECOLOR
)
66 ,OUString(PROPERTY_CHARUNDERLINE
)
67 ,OUString(PROPERTY_CHARWEIGHT
)
68 ,OUString(PROPERTY_CHARWORDMODE
)
69 ,OUString(PROPERTY_CONTROLBACKGROUND
)
70 ,OUString(PROPERTY_CONTROLBACKGROUNDTRANSPARENT
)
71 ,OUString(PROPERTY_CHARFLASH
)
72 ,OUString(PROPERTY_CHARAUTOKERNING
)
73 ,OUString(PROPERTY_CHARESCAPEMENTHEIGHT
)
74 ,OUString(PROPERTY_CHARLOCALE
)
75 ,OUString(PROPERTY_CHARESCAPEMENT
)
76 ,OUString(PROPERTY_CHARCASEMAP
)
77 ,OUString(PROPERTY_CHARCOMBINEISON
)
78 ,OUString(PROPERTY_CHARCOMBINEPREFIX
)
79 ,OUString(PROPERTY_CHARCOMBINESUFFIX
)
80 ,OUString(PROPERTY_CHARHIDDEN
)
81 ,OUString(PROPERTY_CHARSHADOWED
)
82 ,OUString(PROPERTY_CHARCONTOURED
)
83 ,OUString(PROPERTY_HYPERLINKURL
)
84 ,OUString(PROPERTY_HYPERLINKTARGET
)
85 ,OUString(PROPERTY_HYPERLINKNAME
)
86 ,OUString(PROPERTY_VISITEDCHARSTYLENAME
)
87 ,OUString(PROPERTY_UNVISITEDCHARSTYLENAME
)
88 ,OUString(PROPERTY_CHARKERNING
)
89 ,OUString(PROPERTY_PRINTREPEATEDVALUES
)
90 ,OUString(PROPERTY_CONDITIONALPRINTEXPRESSION
)
91 ,OUString(PROPERTY_PRINTWHENGROUPCHANGE
)
92 ,OUString(PROPERTY_MASTERFIELDS
)
93 ,OUString(PROPERTY_DETAILFIELDS
)
94 ,OUString(PROPERTY_PARAADJUST
)
96 , OUString(PROPERTY_CHAREMPHASISASIAN
)
97 , OUString(PROPERTY_CHARFONTNAMEASIAN
)
98 , OUString(PROPERTY_CHARFONTSTYLENAMEASIAN
)
99 , OUString(PROPERTY_CHARFONTFAMILYASIAN
)
100 , OUString(PROPERTY_CHARFONTCHARSETASIAN
)
101 , OUString(PROPERTY_CHARFONTPITCHASIAN
)
102 , OUString(PROPERTY_CHARHEIGHTASIAN
)
103 , OUString(PROPERTY_CHARUNDERLINEASIAN
)
104 , OUString(PROPERTY_CHARWEIGHTASIAN
)
105 , OUString(PROPERTY_CHARPOSTUREASIAN
)
106 , OUString(PROPERTY_CHARWORDMODEASIAN
)
107 , OUString(PROPERTY_CHARROTATIONASIAN
)
108 , OUString(PROPERTY_CHARSCALEWIDTHASIAN
)
109 , OUString(PROPERTY_CHARLOCALEASIAN
)
110 , OUString(PROPERTY_CHAREMPHASISCOMPLEX
)
111 , OUString(PROPERTY_CHARFONTNAMECOMPLEX
)
112 , OUString(PROPERTY_CHARFONTSTYLENAMECOMPLEX
)
113 , OUString(PROPERTY_CHARFONTFAMILYCOMPLEX
)
114 , OUString(PROPERTY_CHARFONTCHARSETCOMPLEX
)
115 , OUString(PROPERTY_CHARFONTPITCHCOMPLEX
)
116 , OUString(PROPERTY_CHARHEIGHTCOMPLEX
)
117 , OUString(PROPERTY_CHARUNDERLINECOMPLEX
)
118 , OUString(PROPERTY_CHARWEIGHTCOMPLEX
)
119 , OUString(PROPERTY_CHARPOSTURECOMPLEX
)
120 , OUString(PROPERTY_CHARWORDMODECOMPLEX
)
121 , OUString(PROPERTY_CHARROTATIONCOMPLEX
)
122 , OUString(PROPERTY_CHARSCALEWIDTHCOMPLEX
)
123 , OUString(PROPERTY_CHARLOCALECOMPLEX
)
127 return uno::Sequence
< OUString
>(pProps
,sizeof(pProps
)/sizeof(pProps
[0]));
130 OFixedLine::OFixedLine(uno::Reference
< uno::XComponentContext
> const & _xContext
)
131 :FixedLineBase(m_aMutex
)
132 ,FixedLinePropertySet(_xContext
,static_cast< Implements
>(IMPLEMENTS_PROPERTY_SET
),lcl_getLineOptionals())
133 ,m_aProps(m_aMutex
,static_cast< container::XContainer
*>( this ),_xContext
)
134 ,m_LineStyle( drawing::LineStyle_NONE
)
137 ,m_LineTransparence(0)
140 m_aProps
.aComponent
.m_sName
= RPT_RESSTRING(RID_STR_FIXEDLINE
,m_aProps
.aComponent
.m_xContext
->getServiceManager());
141 m_aProps
.aComponent
.m_nWidth
= MIN_WIDTH
;
144 OFixedLine::OFixedLine(uno::Reference
< uno::XComponentContext
> const & _xContext
145 ,const uno::Reference
< lang::XMultiServiceFactory
>& _xFactory
146 ,uno::Reference
< drawing::XShape
>& _xShape
147 ,sal_Int32 _nOrientation
)
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_LineStyle( drawing::LineStyle_NONE
)
152 ,m_nOrientation(_nOrientation
)
154 ,m_LineTransparence(0)
157 m_aProps
.aComponent
.m_sName
= RPT_RESSTRING(RID_STR_FIXEDLINE
,m_aProps
.aComponent
.m_xContext
->getServiceManager());
158 m_aProps
.aComponent
.m_xFactory
= _xFactory
;
159 osl_atomic_increment( &m_refCount
);
162 awt::Size aSize
= _xShape
->getSize();
163 if ( m_nOrientation
== 1 )
165 if ( aSize
.Width
< MIN_WIDTH
)
167 aSize
.Width
= MIN_WIDTH
;
168 _xShape
->setSize(aSize
);
171 else if ( MIN_HEIGHT
> aSize
.Height
)
173 aSize
.Height
= MIN_HEIGHT
;
174 _xShape
->setSize(aSize
);
176 m_aProps
.aComponent
.setShape(_xShape
,this,m_refCount
);
178 catch(uno::Exception
&)
180 OSL_FAIL("OFixedLine::OFixedLine: Exception caught!");
182 osl_atomic_decrement( &m_refCount
);
185 OFixedLine::~OFixedLine()
189 IMPLEMENT_FORWARD_REFCOUNT( OFixedLine
, FixedLineBase
)
191 uno::Any SAL_CALL
OFixedLine::queryInterface( const uno::Type
& _rType
) throw (uno::RuntimeException
, std::exception
)
193 uno::Any aReturn
= FixedLineBase::queryInterface(_rType
);
194 if ( !aReturn
.hasValue() )
195 aReturn
= FixedLinePropertySet::queryInterface(_rType
);
196 if ( !aReturn
.hasValue() && OReportControlModel::isInterfaceForbidden(_rType
) )
199 return aReturn
.hasValue() ? aReturn
: (m_aProps
.aComponent
.m_xProxy
.is() ? m_aProps
.aComponent
.m_xProxy
->queryAggregation(_rType
) : aReturn
);
202 void SAL_CALL
OFixedLine::dispose() throw(uno::RuntimeException
, std::exception
)
204 FixedLinePropertySet::dispose();
205 cppu::WeakComponentImplHelperBase::dispose();
208 OUString
OFixedLine::getImplementationName_Static( ) throw(uno::RuntimeException
)
210 return OUString("com.sun.star.comp.report.OFixedLine");
214 OUString SAL_CALL
OFixedLine::getImplementationName( ) throw(uno::RuntimeException
, std::exception
)
216 return getImplementationName_Static();
219 uno::Sequence
< OUString
> OFixedLine::getSupportedServiceNames_Static( ) throw(uno::RuntimeException
)
221 uno::Sequence
< OUString
> aServices(1);
222 aServices
.getArray()[0] = SERVICE_FIXEDLINE
;
227 uno::Reference
< uno::XInterface
> OFixedLine::create(uno::Reference
< uno::XComponentContext
> const & xContext
)
229 return *(new OFixedLine(xContext
));
233 uno::Sequence
< OUString
> SAL_CALL
OFixedLine::getSupportedServiceNames( ) throw(uno::RuntimeException
, std::exception
)
235 return getSupportedServiceNames_Static();
238 sal_Bool SAL_CALL
OFixedLine::supportsService(const OUString
& ServiceName
) throw( uno::RuntimeException
, std::exception
)
240 return cppu::supportsService(this, ServiceName
);
244 REPORTCOMPONENT_IMPL3(OFixedLine
,m_aProps
.aComponent
)
245 REPORTCOMPONENT_NOMASTERDETAIL(OFixedLine
)
247 ::sal_Int16 SAL_CALL
OFixedLine::getControlBorder( ) throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
249 throw beans::UnknownPropertyException();
252 void SAL_CALL
OFixedLine::setControlBorder( ::sal_Int16
/*_border*/ ) throw (lang::IllegalArgumentException
, beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
254 throw beans::UnknownPropertyException();
257 ::sal_Int32 SAL_CALL
OFixedLine::getControlBorderColor() throw (beans::UnknownPropertyException
,uno::RuntimeException
, std::exception
)
259 throw beans::UnknownPropertyException();
262 void SAL_CALL
OFixedLine::setControlBorderColor( ::sal_Int32
/*_bordercolor*/ ) throw (beans::UnknownPropertyException
,lang::IllegalArgumentException
,uno::RuntimeException
, std::exception
)
264 throw beans::UnknownPropertyException();
267 uno::Reference
< beans::XPropertySetInfo
> SAL_CALL
OFixedLine::getPropertySetInfo( ) throw(uno::RuntimeException
, std::exception
)
269 return FixedLinePropertySet::getPropertySetInfo();
272 void SAL_CALL
OFixedLine::setPropertyValue( const OUString
& aPropertyName
, const uno::Any
& aValue
) throw (beans::UnknownPropertyException
, beans::PropertyVetoException
, lang::IllegalArgumentException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
274 FixedLinePropertySet::setPropertyValue( aPropertyName
, aValue
);
277 uno::Any SAL_CALL
OFixedLine::getPropertyValue( const OUString
& PropertyName
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
279 return FixedLinePropertySet::getPropertyValue( PropertyName
);
282 void SAL_CALL
OFixedLine::addPropertyChangeListener( const OUString
& aPropertyName
, const uno::Reference
< beans::XPropertyChangeListener
>& xListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
284 FixedLinePropertySet::addPropertyChangeListener( aPropertyName
, xListener
);
287 void SAL_CALL
OFixedLine::removePropertyChangeListener( const OUString
& aPropertyName
, const uno::Reference
< beans::XPropertyChangeListener
>& aListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
289 FixedLinePropertySet::removePropertyChangeListener( aPropertyName
, aListener
);
292 void SAL_CALL
OFixedLine::addVetoableChangeListener( const OUString
& PropertyName
, const uno::Reference
< beans::XVetoableChangeListener
>& aListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
294 FixedLinePropertySet::addVetoableChangeListener( PropertyName
, aListener
);
297 void SAL_CALL
OFixedLine::removeVetoableChangeListener( const OUString
& PropertyName
, const uno::Reference
< beans::XVetoableChangeListener
>& aListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
299 FixedLinePropertySet::removeVetoableChangeListener( PropertyName
, aListener
);
302 // XReportControlModel
303 OUString SAL_CALL
OFixedLine::getDataField() throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
305 throw beans::UnknownPropertyException();
308 void SAL_CALL
OFixedLine::setDataField( const OUString
& /*_datafield*/ ) throw (lang::IllegalArgumentException
, beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
310 throw beans::UnknownPropertyException();
313 ::sal_Int32 SAL_CALL
OFixedLine::getControlBackground() throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
315 throw beans::UnknownPropertyException();
318 void SAL_CALL
OFixedLine::setControlBackground( ::sal_Int32
/*_backgroundcolor*/ ) throw (uno::RuntimeException
,beans::UnknownPropertyException
, std::exception
)
320 throw beans::UnknownPropertyException();
323 sal_Bool SAL_CALL
OFixedLine::getControlBackgroundTransparent() throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
325 throw beans::UnknownPropertyException();
328 void SAL_CALL
OFixedLine::setControlBackgroundTransparent( sal_Bool
/*_controlbackgroundtransparent*/ ) throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
330 throw beans::UnknownPropertyException();
333 sal_Bool SAL_CALL
OFixedLine::getPrintWhenGroupChange() throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
335 throw beans::UnknownPropertyException();
338 void SAL_CALL
OFixedLine::setPrintWhenGroupChange( sal_Bool
/*_printwhengroupchange*/ ) throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
340 throw beans::UnknownPropertyException();
343 OUString SAL_CALL
OFixedLine::getConditionalPrintExpression() throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
345 throw beans::UnknownPropertyException();
348 void SAL_CALL
OFixedLine::setConditionalPrintExpression( const OUString
& /*_conditionalprintexpression*/ ) throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
350 throw beans::UnknownPropertyException();
354 uno::Reference
< util::XCloneable
> SAL_CALL
OFixedLine::createClone( ) throw (uno::RuntimeException
, std::exception
)
356 uno::Reference
< report::XReportComponent
> xSource
= this;
357 uno::Reference
< report::XFixedLine
> xSet(cloneObject(xSource
,m_aProps
.aComponent
.m_xFactory
,SERVICE_FIXEDLINE
),uno::UNO_QUERY_THROW
);
364 ::sal_Int32 SAL_CALL
OFixedLine::getOrientation() throw (beans::UnknownPropertyException
,uno::RuntimeException
, std::exception
)
366 ::osl::MutexGuard
aGuard(m_aMutex
);
367 return m_nOrientation
;
370 void SAL_CALL
OFixedLine::setOrientation( ::sal_Int32 _orientation
) throw (beans::UnknownPropertyException
,uno::RuntimeException
, std::exception
)
372 set(PROPERTY_ORIENTATION
,_orientation
,m_nOrientation
);
375 drawing::LineStyle SAL_CALL
OFixedLine::getLineStyle() throw (uno::RuntimeException
, std::exception
)
377 ::osl::MutexGuard
aGuard(m_aMutex
);
381 void SAL_CALL
OFixedLine::setLineStyle( drawing::LineStyle _linestyle
) throw (uno::RuntimeException
, std::exception
)
383 set(PROPERTY_LINESTYLE
,_linestyle
,m_LineStyle
);
386 drawing::LineDash SAL_CALL
OFixedLine::getLineDash() throw (uno::RuntimeException
, std::exception
)
388 ::osl::MutexGuard
aGuard(m_aMutex
);
392 void SAL_CALL
OFixedLine::setLineDash( const drawing::LineDash
& _linedash
) throw (uno::RuntimeException
, std::exception
)
394 set(PROPERTY_LINEDASH
,_linedash
,m_LineDash
);
397 ::sal_Int32 SAL_CALL
OFixedLine::getLineColor() throw (uno::RuntimeException
, std::exception
)
399 ::osl::MutexGuard
aGuard(m_aMutex
);
403 void SAL_CALL
OFixedLine::setLineColor( ::sal_Int32 _linecolor
) throw (uno::RuntimeException
, std::exception
)
405 set(PROPERTY_LINECOLOR
,_linecolor
,m_LineColor
);
408 ::sal_Int16 SAL_CALL
OFixedLine::getLineTransparence() throw (uno::RuntimeException
, std::exception
)
410 ::osl::MutexGuard
aGuard(m_aMutex
);
411 return m_LineTransparence
;
414 void SAL_CALL
OFixedLine::setLineTransparence( ::sal_Int16 _linetransparence
) throw (uno::RuntimeException
, std::exception
)
416 set(PROPERTY_LINETRANSPARENCE
,_linetransparence
,m_LineTransparence
);
419 ::sal_Int32 SAL_CALL
OFixedLine::getLineWidth() throw (uno::RuntimeException
, std::exception
)
421 ::osl::MutexGuard
aGuard(m_aMutex
);
425 void SAL_CALL
OFixedLine::setLineWidth( ::sal_Int32 _linewidth
) throw (uno::RuntimeException
, std::exception
)
427 set(PROPERTY_LINEWIDTH
,_linewidth
,m_LineWidth
);
432 uno::Reference
< uno::XInterface
> SAL_CALL
OFixedLine::getParent( ) throw (uno::RuntimeException
, std::exception
)
434 return OShapeHelper::getParent(this);
437 void SAL_CALL
OFixedLine::setParent( const uno::Reference
< uno::XInterface
>& Parent
) throw (lang::NoSupportException
, uno::RuntimeException
, std::exception
)
439 OShapeHelper::setParent(Parent
,this);
442 uno::Reference
< report::XFormatCondition
> SAL_CALL
OFixedLine::createFormatCondition( ) throw (uno::Exception
, uno::RuntimeException
, std::exception
)
444 return new OFormatCondition(m_aProps
.aComponent
.m_xContext
);
448 void SAL_CALL
OFixedLine::addContainerListener( const uno::Reference
< container::XContainerListener
>& xListener
) throw (uno::RuntimeException
, std::exception
)
450 m_aProps
.addContainerListener(xListener
);
453 void SAL_CALL
OFixedLine::removeContainerListener( const uno::Reference
< container::XContainerListener
>& xListener
) throw (uno::RuntimeException
, std::exception
)
455 m_aProps
.removeContainerListener(xListener
);
459 uno::Type SAL_CALL
OFixedLine::getElementType( ) throw (uno::RuntimeException
, std::exception
)
461 return cppu::UnoType
<report::XFormatCondition
>::get();
464 sal_Bool SAL_CALL
OFixedLine::hasElements( ) throw (uno::RuntimeException
, std::exception
)
466 return m_aProps
.hasElements();
470 void SAL_CALL
OFixedLine::insertByIndex( ::sal_Int32 Index
, const uno::Any
& Element
) throw (lang::IllegalArgumentException
, lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
472 m_aProps
.insertByIndex(Index
,Element
);
475 void SAL_CALL
OFixedLine::removeByIndex( ::sal_Int32 Index
) throw (lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
477 m_aProps
.removeByIndex(Index
);
481 void SAL_CALL
OFixedLine::replaceByIndex( ::sal_Int32 Index
, const uno::Any
& Element
) throw (lang::IllegalArgumentException
, lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
483 m_aProps
.replaceByIndex(Index
,Element
);
487 ::sal_Int32 SAL_CALL
OFixedLine::getCount( ) throw (uno::RuntimeException
, std::exception
)
489 return m_aProps
.getCount();
492 uno::Any SAL_CALL
OFixedLine::getByIndex( ::sal_Int32 Index
) throw (lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
494 return m_aProps
.getByIndex( Index
);
498 awt::Point SAL_CALL
OFixedLine::getPosition( ) throw (uno::RuntimeException
, std::exception
)
500 return OShapeHelper::getPosition(this);
503 void SAL_CALL
OFixedLine::setPosition( const awt::Point
& aPosition
) throw (uno::RuntimeException
, std::exception
)
505 OShapeHelper::setPosition(aPosition
,this);
508 awt::Size SAL_CALL
OFixedLine::getSize( ) throw (uno::RuntimeException
, std::exception
)
510 return OShapeHelper::getSize(this);
513 void SAL_CALL
OFixedLine::setSize( const awt::Size
& aSize
) throw (beans::PropertyVetoException
, uno::RuntimeException
, std::exception
)
515 const char hundredthmmC
[] = "0\xe2\x80\x89\xC2\xB5""m"; // in UTF-8: 0, thin space, ยต (micro), m (meter)
516 const OUString
hundredthmm(hundredthmmC
, sizeof(hundredthmmC
)-1, RTL_TEXTENCODING_UTF8
);
517 if ( aSize
.Width
< MIN_WIDTH
&& m_nOrientation
== 1 )
518 throw beans::PropertyVetoException("Too small width for FixedLine; minimum is " + OUString::number(MIN_WIDTH
) + hundredthmm
, static_cast<cppu::OWeakObject
*>(this));
519 else if ( aSize
.Height
< MIN_HEIGHT
&& m_nOrientation
== 0 )
520 throw beans::PropertyVetoException("Too small height for FixedLine; minimum is " + OUString::number(MIN_HEIGHT
) + hundredthmm
, static_cast<cppu::OWeakObject
*>(this));
521 OShapeHelper::setSize(aSize
,this);
525 OUString SAL_CALL
OFixedLine::getShapeType( ) throw (uno::RuntimeException
, std::exception
)
527 ::osl::MutexGuard
aGuard(m_aMutex
);
528 if ( m_aProps
.aComponent
.m_xShape
.is() )
529 return m_aProps
.aComponent
.m_xShape
->getShapeType();
530 return OUString("com.sun.star.drawing.ControlShape");
533 OUString SAL_CALL
OFixedLine::getHyperLinkURL() throw (uno::RuntimeException
, beans::UnknownPropertyException
, std::exception
)
535 throw beans::UnknownPropertyException();
537 void SAL_CALL
OFixedLine::setHyperLinkURL(const OUString
& /*the_value*/) throw (uno::RuntimeException
, beans::UnknownPropertyException
, std::exception
)
539 throw beans::UnknownPropertyException();
541 OUString SAL_CALL
OFixedLine::getHyperLinkTarget() throw (uno::RuntimeException
, beans::UnknownPropertyException
, std::exception
)
543 throw beans::UnknownPropertyException();
545 void SAL_CALL
OFixedLine::setHyperLinkTarget(const OUString
& /*the_value*/) throw (uno::RuntimeException
, beans::UnknownPropertyException
, std::exception
)
547 throw beans::UnknownPropertyException();
549 OUString SAL_CALL
OFixedLine::getHyperLinkName() throw (uno::RuntimeException
, beans::UnknownPropertyException
, std::exception
)
551 throw beans::UnknownPropertyException();
553 void SAL_CALL
OFixedLine::setHyperLinkName(const OUString
& /*the_value*/) throw (uno::RuntimeException
, beans::UnknownPropertyException
, std::exception
)
555 throw beans::UnknownPropertyException();
558 NO_REPORTCONTROLFORMAT_IMPL(OFixedLine
)
560 sal_Bool SAL_CALL
OFixedLine::getPrintRepeatedValues() throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
562 throw beans::UnknownPropertyException();
564 void SAL_CALL
OFixedLine::setPrintRepeatedValues( sal_Bool
/*_printrepeatedvalues*/ ) throw (beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
566 throw beans::UnknownPropertyException();
571 } // namespace reportdesign
574 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */