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